Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform MP: update parsers with the required fields #4823

Merged
merged 7 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelog/4823.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Update Graph parsers to support the new marketplace properties.
type: feature
pr_number: 4823
16 changes: 15 additions & 1 deletion demisto_sdk/commands/common/schemas/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ mapping:
type: bool
isremotesyncout_x2:
type: bool
supportsquickactions:
type: bool
commands:
type: seq
sequence:
Expand Down Expand Up @@ -180,6 +182,7 @@ mapping:
hybrid:
type: bool


# integration->configuration
name:xsoar:
type: str
Expand Down Expand Up @@ -287,6 +290,8 @@ schema;command_schema:
name:
type: str
required: true
prettyname:
type: str
execution:
type: bool
description:
Expand Down Expand Up @@ -316,7 +321,8 @@ schema;command_schema:
type: bool
polling:
type: bool

quickaction:
type: bool
# int
name:xsoar:
type: str
Expand Down Expand Up @@ -354,6 +360,14 @@ schema;argument_schema:
name:
type: str
required: true
prettyname:
type: str
prettypredefined:
allowempty: true
type: map
mapping:
".*":
type: str
required:
type: bool
default:
Expand Down
12 changes: 12 additions & 0 deletions demisto_sdk/commands/common/schemas/script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ mapping:
sequence:
- type: str
enum: ['script-name-incident-to-alert']
quickaction:
type: bool
prettyname:
type: str

# script->args
name:xsoar:
Expand Down Expand Up @@ -184,6 +188,14 @@ schema;argument_schema:
type: str
hidden:
type: bool
prettyname:
type: str
prettypredefined:
allowempty: true
type: map
mapping:
".*":
type: str

# script->outputs
name:xsoar:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class _CommonFields(BaseStrictModel):

class _Argument(BaseStrictModel):
name: str
prettyname: Optional[str] = None
pretty_predefined: Optional[dict] = Field(None, alias="prettypredefined")
required: Optional[bool] = None
default: Optional[bool] = None
description: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class _Command(BaseStrictModel):
timeout: Optional[int] = None
hidden: Optional[bool] = None
polling: Optional[bool] = None
prettyname: Optional[str] = None
quickaction: Optional[bool] = None


Command = create_model(
Expand Down Expand Up @@ -111,6 +113,7 @@ class _Script(BaseStrictModel):
is_mappable: Optional[bool] = Field(None, alias="ismappable")
is_remote_sync_in: Optional[bool] = Field(None, alias="isremotesyncin")
is_remote_sync_out: Optional[bool] = Field(None, alias="isremotesyncout")
supports_quick_actions: Optional[bool] = Field(None, alias="supportsquickactions")
commands: Optional[List[Command]] = None # type:ignore[valid-type]
run_once: Optional[bool] = Field(None, alias="runonce")
sub_type: Optional[str] = Field([TYPE_PYTHON2, TYPE_PYTHON3], alias="subtype")
Expand Down
2 changes: 2 additions & 0 deletions demisto_sdk/commands/content_graph/strict_objects/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class _StrictScript(BaseIntegrationScript): # type:ignore[misc,valid-type]
)
polling: Optional[bool] = None
skip_prepare: Optional[List[SkipPrepare]] = Field(None, alias="skipprepare")
prettyname: Optional[str] = None
quickaction: Optional[bool] = None


StrictScript = create_model(
Expand Down