@wix/auto_sdk_automations_automations-v-2 1.0.55 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/automations-v2-automation-automations-v-2.universal.ts","../../src/automations-v2-automation-automations-v-2.http.ts"],"sourcesContent":["export * from './src/automations-v2-automation-automations-v-2.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAutomationsV2Automation from './automations-v2-automation-automations-v-2.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Automation extends AutomationOriginInfoOneOf {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n /**\n * Automation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Who created the automation.\n * @immutable\n * @readonly\n */\n createdBy?: AuditInfo;\n /**\n * When the automation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Who last updated the automation.\n * @readonly\n */\n updatedBy?: AuditInfo;\n /**\n * When the automation was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Automation name as displayed on the user's site.\n * @minLength 1\n * @maxLength 500\n */\n name?: string;\n /**\n * Automation description.\n * @maxLength 2000\n */\n description?: string | null;\n /** Automation configuration. */\n configuration?: AutomationConfiguration;\n /**\n * How the automation was added to the user's site.\n * @immutable\n */\n origin?: OriginWithLiterals;\n /** Automation settings. */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/** @oneof */\nexport interface AutomationOriginInfoOneOf {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n}\n\nexport interface AIMetadata {}\n\nexport interface ActionSettings {\n /**\n * Permanent actions. PermanentAction's skipActionExpression cannot be modified.\n *\n * When empty, all actions can be set as skipped\n * @maxSize 30\n * @format GUID\n */\n permanentActionIds?: string[];\n /**\n * Read-only actions. Read-only actions cannot be edited.\n *\n * When empty, all actions are editable.\n * @maxSize 30\n * @format GUID\n */\n readonlyActionIds?: string[];\n}\n\nexport enum Domain {\n /** User domain (default). */\n USER = 'USER',\n /** Wix domain. */\n WIX = 'WIX',\n /** Wix account-level domain. */\n WIX_ACCOUNT = 'WIX_ACCOUNT',\n}\n\n/** @enumType */\nexport type DomainWithLiterals = Domain | 'USER' | 'WIX' | 'WIX_ACCOUNT';\n\nexport interface TriggerSettings {}\n\nexport interface Enrichment {\n /**\n * Enrichment input mappings.\n * @maxSize 2\n */\n inputMappings?: Record<string, any>[] | null;\n}\n\nexport interface AuditInfo extends AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface AutomationConfiguration {\n /** Status of the automation on the site. */\n status?: StatusWithLiterals;\n /** Trigger configuration. */\n trigger?: Trigger;\n /**\n * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.\n *\n * > **Note**: You can currently only specify 1 root action.\n * @maxSize 20\n * @format GUID\n */\n rootActionIds?: string[];\n /** Actions the automation can execute, as `key:value` pairs. For the key, specify the action ID. The value must be an object structured as described below. */\n actions?: Record<string, Action>;\n}\n\nexport enum TimeUnit {\n UNKNOWN_TIME_UNIT = 'UNKNOWN_TIME_UNIT',\n /** Minutes. */\n MINUTES = 'MINUTES',\n /** Hours. */\n HOURS = 'HOURS',\n /** Days. */\n DAYS = 'DAYS',\n /** Weeks. */\n WEEKS = 'WEEKS',\n /** Months. */\n MONTHS = 'MONTHS',\n}\n\n/** @enumType */\nexport type TimeUnitWithLiterals =\n | TimeUnit\n | 'UNKNOWN_TIME_UNIT'\n | 'MINUTES'\n | 'HOURS'\n | 'DAYS'\n | 'WEEKS'\n | 'MONTHS';\n\nexport interface Filter {\n /**\n * Filter ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Field key.\n *\n * You can find the field key in [the trigger payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema).\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Filter expression.\n *\n * For the automation to run, the expression must evaluate to `true`.\n * @maxLength 2500\n */\n filterExpression?: string;\n}\n\nexport interface FutureDateActivationOffset {\n /**\n * Amount of time before the trigger to run the automation.\n *\n * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).\n * @maxLength 1000\n */\n preScheduledEventOffsetExpression?: string;\n /** Unit in which to set the action offset. */\n scheduledEventOffsetTimeUnit?: TimeUnitWithLiterals;\n}\n\nexport interface RateLimit {\n /**\n * Maximum number of times the trigger can be activated.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Duration of the rate limit. The rate limit applies for the specified duration and then expires.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n durationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n durationTimeUnit?: TimeUnitWithLiterals;\n /**\n * Activation identifier used to count the number of activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n}\n\nexport interface FilterValueSelection {\n /**\n * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.\n * @maxLength 80\n * @maxSize 50\n */\n selectedFilterValues?: string[];\n}\n\nexport interface ConditionExpressionGroup {\n /** Logical operator used to evaluate the condition expressions. */\n operator?: OperatorWithLiterals;\n /**\n * Expressions evaluated using the selected operator.\n * @minSize 1\n * @maxSize 20\n * @maxLength 2500\n */\n booleanExpressions?: string[];\n}\n\nexport enum Operator {\n /** Unknown. */\n UNKNOWN_OPERATOR = 'UNKNOWN_OPERATOR',\n /** `OR` operator. */\n OR = 'OR',\n /** `AND` operator. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type OperatorWithLiterals = Operator | 'UNKNOWN_OPERATOR' | 'OR' | 'AND';\n\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: LanguageWithLiterals;\n /**\n * Expressions evaluated using the selected operator. this code should comply the language syntax. and format\n * @maxLength 1000\n */\n code?: string;\n}\n\nexport enum Language {\n /** Unknown. */\n UNKNOWN_LANGUAGE = 'UNKNOWN_LANGUAGE',\n /** JavaScript. */\n JAVASCRIPT = 'JAVASCRIPT',\n}\n\n/** @enumType */\nexport type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';\n\n/** Path definition */\nexport interface Path {\n /**\n * Unique path ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Path display name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * ID of the action to run when this path is taken.\n * @format GUID\n */\n postActionId?: string | null;\n}\n\nexport enum Type {\n /** Based on the trigger. */\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */\n APP_DEFINED = 'APP_DEFINED',\n /** Condition. This determines which action runs next. */\n CONDITION = 'CONDITION',\n /** Delay. The automation must wait before executing the next step. */\n DELAY = 'DELAY',\n /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */\n RATE_LIMIT = 'RATE_LIMIT',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_ACTION_TYPE'\n | 'APP_DEFINED'\n | 'CONDITION'\n | 'DELAY'\n | 'RATE_LIMIT';\n\nexport interface AppDefinedAction {\n /**\n * ID of the app that defines the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /**\n * Action input mapping as defined in the action's [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema).\n *\n * The input mapping must include all parameters specified in the action's input schema's `required` array, and can include any other parameters from the schema.\n */\n inputMapping?: Record<string, any> | null;\n /**\n * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @maxSize 10\n * @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @replacedBy skip_action_expression\n * @targetRemovalDate 2026-02-01\n */\n skipConditionOrExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions that run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n /** Action output schema. When specified, this replaces the action schema. */\n overrideOutputSchema?: Record<string, any> | null;\n}\n\nexport interface ConditionAction {\n /**\n * Condition is `true` if one or more of the expression groups evaluates to `true`.\n * @minSize 1\n * @maxSize 10\n */\n orExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface CodeConditionAction {\n /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */\n snippet?: CodeSnippet;\n /**\n * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.\n * this list is mainly for validation purpose.\n * @maxSize 50\n * @maxLength 100\n */\n dynamicVariableExpressions?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface DelayAction {\n /**\n * Time to wait before running the action. The wait time starts from when the current action completes.\n *\n * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.\n * @maxLength 1000\n */\n offsetExpression?: string | null;\n /** Unit in which to set the wait time to wait before the action runs. */\n offsetTimeUnit?: TimeUnitWithLiterals;\n /**\n * Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n * @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @replacedBy due_date_expression\n * @targetRemovalDate 2026-02-01\n */\n dueDateEpochExpression?: string | null;\n /**\n * Action run date as a timestamp or DateTime expression using bracket notation.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n */\n dueDateExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the time delay.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface RateLimitAction {\n /**\n * Maximum number of times the action can run.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Rate limit duration.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n rateLimitDurationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n rateLimitDurationTimeUnit?: TimeUnitWithLiterals;\n /**\n * Unique identifier of each activation by which rate limiter counts activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface SetVariablesAction {\n /** Output mapping. For example: `{\"someField\": \"{{10}}\", \"someOtherField\": \"{{multiply( var('account.points.balance') ;2 )}}\" }`. */\n outputMapping?: Record<string, any> | null;\n /**\n * Output JSON schema representation.\n *\n * > **Note**: To minimize request size, you can also specify a string.\n */\n outputSchema?: Record<string, any> | null;\n /**\n * IDs of actions to run in parallel after variable initialization.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface OutputAction {\n /** Output action output mapping. */\n outputMapping?: Record<string, any> | null;\n}\n\nexport interface SplitAction {\n /**\n * List of paths to split execution into.\n * @minSize 2\n * @maxSize 10\n */\n paths?: Path[];\n}\n\nexport enum Status {\n /** Unknown. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Active. Active automations can be triggered. */\n ACTIVE = 'ACTIVE',\n /** Inactive. Inactive automations cannot be triggered. */\n INACTIVE = 'INACTIVE',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'ACTIVE'\n | 'INACTIVE';\n\nexport interface Trigger {\n /**\n * ID of the app that defines the trigger.\n * @format GUID\n */\n appId?: string;\n /**\n * Trigger key.\n *\n * Learn about [setting up a trigger](https://dev.wix.com/docs/rest/business-management/automations/triggers/add-a-trigger-to-your-app#step-1--set-up-the-trigger).\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * Schema field filters. All filter conditions must be met for the automation to run.\n *\n * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#filters).\n * @maxSize 5\n */\n filters?: Filter[];\n /**\n * Automation offset. You can schedule automations to run before the trigger occurs.\n *\n * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).\n */\n scheduledEventOffset?: FutureDateActivationOffset;\n /** Limit on the number of times an automation can be triggered. */\n rateLimit?: RateLimit;\n /** Trigger schema override. When specified, this replaces the trigger schema. */\n overrideSchema?: Record<string, any> | null;\n}\n\nexport interface Action extends ActionInfoOneOf {\n /** Details of the action when its `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action when its `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action when its `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action when its `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action when its `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n /**\n * Action ID.\n *\n * Unique identifier for the action instance in the current automation. Use this to refer to this action in the automation flow.\n *\n * If not specified, automatically generated by Wix.\n * @format GUID\n */\n _id?: string | null;\n /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#action-type). */\n type?: TypeWithLiterals;\n /**\n * Editable display name for the action.\n * @minLength 1\n * @maxLength 60\n */\n displayName?: string | null;\n /**\n * [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#namespace). This differentiates it from other actions of the same type.\n *\n * If the action outputs any data, the data appears under the namespace in the payload sent to the subsequent steps in the automation. If the user has multiple actions with the same `appId` and `actionKey`, the output of the previous action is overwritten.\n * @minLength 1\n * @maxLength 100\n */\n namespace?: string | null;\n /**\n * Evaluated to boolean to decide whether the action is skipped.\n * For ConditionAction: if skipped, true_post_action_ids execute; false_post_action_ids are skipped\n * SplitAction and OutputAction do not support skip_action_expression\n * @maxLength 1000\n */\n skipActionExpression?: string | null;\n}\n\n/** @oneof */\nexport interface ActionInfoOneOf {\n /** Details of the action when its `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action when its `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action when its `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action when its `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action when its `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n}\n\nexport interface FilterableAppDefinedActions {\n /**\n * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.\n * @minSize 1\n * @maxSize 100\n * @minLength 1\n * @maxLength 150\n */\n actionIdentifiers?: string[];\n}\n\nexport enum Origin {\n /** Default value. */\n UNKNOWN_ORIGIN = 'UNKNOWN_ORIGIN',\n /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */\n USER = 'USER',\n /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */\n APPLICATION = 'APPLICATION',\n /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */\n PREINSTALLED = 'PREINSTALLED',\n}\n\n/** @enumType */\nexport type OriginWithLiterals =\n | Origin\n | 'UNKNOWN_ORIGIN'\n | 'USER'\n | 'APPLICATION'\n | 'PREINSTALLED';\n\nexport interface ApplicationOrigin {\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface PreinstalledOrigin {\n /**\n * ID of the app that added the [preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations).\n * @format GUID\n */\n appId?: string;\n /**\n * Whether the automation is an override.\n *\n * When a user modifies the preinstalled automation installed on their site, a site-specific version of the automation is created that overrides the automation that was originally installed. This override automation has the same automation ID as the original preinstalled automation.\n *\n * > **Note**: An override automation can no longer be updated by the app that originally installed it.\n * >\n * > To revert to the original preinstalled version, the user must delete the override by calling the Delete Automation method. Calling Delete Automation on an override automation removes the override method and restores the preinstalled automation that was previously installed.\n *\n * Default: `false`.\n * @immutable\n * @readonly\n */\n override?: boolean | null;\n}\n\nexport interface AutomationSettings {\n /**\n * Whether the automation is hidden from users.\n *\n * Default: `false`\n */\n hidden?: boolean;\n /**\n * Whether the automation is read-only.\n *\n * Default: `false`\n */\n readonly?: boolean;\n /**\n * Whether to disable the option to delete the automation from the site.\n *\n * Default: `false`.\n */\n disableDelete?: boolean;\n /**\n * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.\n *\n * Default: `false`.\n */\n disableStatusChange?: boolean;\n /** Automation action settings. */\n actionSettings?: ActionSettings;\n}\n\nexport interface DraftInfo {\n /**\n * ID of the original automation.\n * @format GUID\n * @readonly\n */\n originalAutomationId?: string | null;\n}\n\nexport interface Enrichments {\n /** Whether the studio site enrichment is wanted. */\n studioSite?: Enrichment;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface AutoArchivePolicy {\n /**\n * Date when to archive the automation\n * If this date in the past, nothing will happen (automation will not go into archived state)\n * If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE\n * After this date the automation may be unarchived and archived again, this date will have no influence\n */\n archiveDate?: Date | null;\n}\n\nexport interface Notes {}\n\nexport interface Note {}\n\nexport interface Position {}\n\nexport interface Offset {}\n\nexport interface Dimensions {}\n\nexport interface UpdatedWithPreviousEntity {\n /** Previous automation. */\n previousAutomation?: Automation;\n /** Updated automation. */\n currentAutomation?: Automation;\n}\n\nexport interface DeletedWithEntity {\n /** Deleted automation. */\n automation?: Automation;\n}\n\nexport interface DraftPublished {\n /**\n * ID of the draft automation.\n * @format GUID\n */\n draftAutomationId?: string;\n /**\n * Original automation on which the draft is based.\n *\n * > **Note**: If the draft is not based on an existing automation, the draft itself is the original automation.\n */\n draftOriginalAutomation?: Automation;\n /** Updated, published automation. */\n updatedAutomation?: Automation;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface CreateAutomationRequest {\n /** Automation to create. */\n automation: Automation;\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n /** whether to return in response `configuration.trigger.override_output_schema` field and in `configuration.actions` the `override_output_schema` field */\n OVERRIDE_SCHEMA = 'OVERRIDE_SCHEMA',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'OVERRIDE_SCHEMA';\n\nexport interface CreateAutomationResponse {\n /** Details of the created automation. */\n automation?: Automation;\n}\n\nexport interface GetAutomationRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface GetAutomationResponse {\n /** Retrieved automation. */\n automation?: Automation;\n}\n\nexport interface UpdateAutomationRequest {\n /** Automation to update. */\n automation: Automation;\n}\n\nexport interface UpdateAutomationResponse {\n /** Updated automation. */\n automation?: Automation;\n}\n\nexport interface DeleteAutomationRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface DeleteAutomationResponse {}\n\nexport interface BulkDeleteAutomationsRequest {\n /**\n * IDs of the automations to delete.\n * @format GUID\n * @minSize 1\n * @maxSize 200\n */\n automationIds: string[];\n}\n\nexport interface BulkDeleteAutomationsResponse {\n /**\n * Results of the bulk deletion.\n * @minSize 1\n * @maxSize 200\n */\n results?: BulkDeleteResult[];\n /** Metadata for the API call. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteResult {\n /** Deleted item metadata. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface CreatePreinstalledAutomationRequest {\n /** Preinstalled automation to create. */\n automation?: Automation;\n /**\n * Hide the created automation behind a spec.\n *\n * For internal use only.\n */\n specInfo?: PreinstalledAutomationSpecInfo;\n /**\n * Original site automation used to create the current preinstalled automation.\n *\n * Usually an existing automation on a site is used to create the preinstalled automation.\n *\n * For internal use only.\n */\n originAutomationInfo?: OriginAutomationInfo;\n /**\n * ID of the app to which the automation belongs.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface PreinstalledAutomationSpecInfo {\n /**\n * Spec to conduct on for the automation.\n *\n * For internal use only.\n * @maxLength 128\n */\n spec?: string;\n /**\n * Value the spec should return in order to affect the user with the operation\n * e.g. creation - show the users the automation, update - show the users the updated automation, deletion - not show the users the automation\n * @maxLength 128\n */\n variantValue?: string | null;\n /**\n * Version from which the experiment should decide whether to expose it to users when !conduct(spec).contains(variant_value)\n * For example, if 50 is set, version 49 and below (including 49) will not expose the preinstalled automation to the user.\n */\n experimentVersion?: number;\n}\n\nexport interface OriginAutomationInfo {\n /**\n * ID of the original automation.\n * @format GUID\n */\n siteAutomationId?: string;\n /**\n * Metasite ID of the original automation.\n * @format GUID\n */\n metaSiteId?: string;\n}\n\nexport interface CreatePreinstalledAutomationResponse {\n /** Details of the created preinstalled automation. */\n automation?: Automation;\n}\n\nexport interface UpdatePreinstalledAutomationRequest {\n /** Preinstalled automation to update. */\n automation?: Automation;\n /**\n * Hide the updated automation behind a spec.\n *\n * For internal use only.\n */\n specInfo?: PreinstalledAutomationSpecInfo;\n /**\n * ID of the app to which the automation belongs.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface UpdatePreinstalledAutomationResponse {\n /** Updated preinstalled automation. */\n automation?: Automation;\n}\n\nexport interface DeletePreinstalledAutomationRequest {\n /**\n * ID of the preinstalled component.\n * @format GUID\n */\n componentId?: string;\n /**\n * Makes the deletion operation gradual.\n * The automation will not return if the variant returns for the site\n *\n * For internal use only.\n */\n specInfo?: PreinstalledAutomationSpecInfo;\n /**\n * ID of the app to which the component belongs.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface DeletePreinstalledAutomationResponse {}\n\nexport interface GeneratePreinstalledAutomationRequest {\n /** Automation. */\n automation: Automation;\n /**\n * ID of the app to which the automation belongs.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface GeneratePreinstalledAutomationResponse {\n /** Automation. */\n automation?: Automation;\n}\n\nexport interface QueryPreinstalledAutomationsForAppRequest {\n /**\n * Query.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n /**\n * ID of the app for which to query preinstalled automations.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\": { \"$operator\": \"value2\" }\n * }`\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort configuration in the following format:\n * `[{ \"fieldName\": \"sortField1\", \"order\": \"ASC\" }, { \"fieldName\":\" sortField2\", \"order\": \"DESC\" }]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 500\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 64000\n */\n cursor?: string | null;\n}\n\nexport interface QueryPreinstalledAutomationsForAppResponse {\n /** Automations. */\n automations?: Automation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 64000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 64000\n */\n prev?: string | null;\n}\n\nexport interface QueryPreinstalledAutomationsRequest {\n /**\n * Query.\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n}\n\nexport interface QueryPreinstalledAutomationsResponse {\n /** Automations. */\n automations?: Automation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface QueryAutomationsRequest {\n /**\n * Query.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n *\n * > **Note**: To query archived automations, specify `{ \"archived\": true }` in the [query filter object](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n */\n query?: CursorQuery;\n}\n\nexport interface QueryAutomationsResponse {\n /** Automations. */\n automations?: Automation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface GetAggregatedUsageInfoRequest {\n /**\n * Filter in the following format:\n *\n * `\"filter\" :\n * {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface GetAggregatedUsageInfoResponse {\n /** Triggers in use. */\n triggersUsageSummary?: TriggerUsageSummary[];\n /** Actions in use */\n actionsUsageSummary?: ActionUsageSummary[];\n /** Created by app ids in use */\n createdByAppIdUsageSummary?: CreatedByAppIdUsageSummary[];\n}\n\nexport interface TriggerUsageSummary {\n /**\n * ID of the app that defined the trigger.\n * @format GUID\n */\n appId?: string;\n /**\n * Trigger key.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /** Number of automations that include this trigger. */\n automationsCount?: number;\n}\n\nexport interface ActionUsageSummary {\n /**\n * ID of the app that defined the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /** Number of automations that include this action. */\n automationsCount?: number;\n}\n\nexport interface CreatedByAppIdUsageSummary {\n /**\n * ID of the app that created the automation.\n * @format GUID\n */\n appId?: string;\n /** Number of automations that include this app ID. */\n automationsCount?: number;\n}\n\nexport interface Empty {}\n\nexport interface CopyAutomationRequest {\n /**\n * ID of the automation to copy.\n * @format GUID\n */\n automationId: string;\n /** Origin of the automation to copy. */\n origin?: OriginWithLiterals;\n /** Automation to copy. Skips fetching by ID. */\n automation?: Automation;\n}\n\nexport interface CopyAutomationResponse {\n /** Copy of the automation. */\n automation?: Automation;\n}\n\nexport interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch\n * the actual URL.\n *\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459\n */\n urlChanged?: SiteUrlChanged;\n /** Site is marked as PurgedExternally */\n sitePurgedExternally?: SitePurgedExternally;\n /** Emitted when Odeditor is attached. */\n odeditorAssigned?: OdeditorAssigned;\n /** Emitted when Odeditor is detached. */\n odeditorUnassigned?: OdeditorUnassigned;\n /** Emitted when Picasso is attached. */\n picassoAssigned?: PicassoAssigned;\n /** Emitted when Picasso is detached. */\n picassoUnassigned?: PicassoUnassigned;\n /** Emitted when Wixel is attached. */\n wixelAssigned?: WixelAssigned;\n /** Emitted when Wixel is detached. */\n wixelUnassigned?: WixelUnassigned;\n /** Emitted when StudioTwo is attached. */\n studioTwoAssigned?: StudioTwoAssigned;\n /** Emitted when StudioTwo is detached. */\n studioTwoUnassigned?: StudioTwoUnassigned;\n /**\n * A meta site id.\n * @format GUID\n */\n metaSiteId?: string;\n /** A meta site version. Monotonically increasing. */\n version?: string;\n /** A timestamp of the event. */\n timestamp?: string;\n /**\n * TODO(meta-site): Change validation once validations are disabled for consumers\n * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659\n * @maxSize 4000\n */\n assets?: Asset[];\n}\n\n/** @oneof */\nexport interface MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch\n * the actual URL.\n *\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459\n */\n urlChanged?: SiteUrlChanged;\n /** Site is marked as PurgedExternally */\n sitePurgedExternally?: SitePurgedExternally;\n /** Emitted when Odeditor is attached. */\n odeditorAssigned?: OdeditorAssigned;\n /** Emitted when Odeditor is detached. */\n odeditorUnassigned?: OdeditorUnassigned;\n /** Emitted when Picasso is attached. */\n picassoAssigned?: PicassoAssigned;\n /** Emitted when Picasso is detached. */\n picassoUnassigned?: PicassoUnassigned;\n /** Emitted when Wixel is attached. */\n wixelAssigned?: WixelAssigned;\n /** Emitted when Wixel is detached. */\n wixelUnassigned?: WixelUnassigned;\n /** Emitted when StudioTwo is attached. */\n studioTwoAssigned?: StudioTwoAssigned;\n /** Emitted when StudioTwo is detached. */\n studioTwoUnassigned?: StudioTwoUnassigned;\n}\n\nexport interface Asset {\n /**\n * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * An instance id. For legacy reasons may be UUID or a string.\n * @maxLength 200\n */\n instanceId?: string;\n /** An application state. */\n state?: StateWithLiterals;\n}\n\nexport enum State {\n UNKNOWN = 'UNKNOWN',\n ENABLED = 'ENABLED',\n DISABLED = 'DISABLED',\n PENDING = 'PENDING',\n DEMO = 'DEMO',\n}\n\n/** @enumType */\nexport type StateWithLiterals =\n | State\n | 'UNKNOWN'\n | 'ENABLED'\n | 'DISABLED'\n | 'PENDING'\n | 'DEMO';\n\nexport interface SiteCreated {\n /**\n * A template identifier (empty if not created from a template).\n * @maxLength 36\n */\n originTemplateId?: string;\n /**\n * An account id of the owner.\n * @format GUID\n */\n ownerId?: string;\n /** A context in which meta site was created. */\n context?: SiteCreatedContextWithLiterals;\n /**\n * A meta site id from which this site was created.\n *\n * In case of a creation from a template it's a template id.\n * In case of a site duplication (\"Save As\" in dashboard or duplicate in UM) it's an id of a source site.\n * @format GUID\n */\n originMetaSiteId?: string | null;\n /**\n * A meta site name (URL slug).\n * @maxLength 20\n */\n siteName?: string;\n /** A namespace. */\n namespace?: NamespaceWithLiterals;\n}\n\nexport enum SiteCreatedContext {\n /** A valid option, we don't expose all reasons why site might be created. */\n OTHER = 'OTHER',\n /** A meta site was created from template. */\n FROM_TEMPLATE = 'FROM_TEMPLATE',\n /** A meta site was created by copying of the transfferred meta site. */\n DUPLICATE_BY_SITE_TRANSFER = 'DUPLICATE_BY_SITE_TRANSFER',\n /** A copy of existing meta site. */\n DUPLICATE = 'DUPLICATE',\n /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */\n OLD_SITE_TRANSFER = 'OLD_SITE_TRANSFER',\n /** deprecated A meta site was created for Flash editor. */\n FLASH = 'FLASH',\n}\n\n/** @enumType */\nexport type SiteCreatedContextWithLiterals =\n | SiteCreatedContext\n | 'OTHER'\n | 'FROM_TEMPLATE'\n | 'DUPLICATE_BY_SITE_TRANSFER'\n | 'DUPLICATE'\n | 'OLD_SITE_TRANSFER'\n | 'FLASH';\n\nexport enum Namespace {\n UNKNOWN_NAMESPACE = 'UNKNOWN_NAMESPACE',\n /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */\n WIX = 'WIX',\n /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n SHOUT_OUT = 'SHOUT_OUT',\n /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ALBUMS = 'ALBUMS',\n /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n WIX_STORES_TEST_DRIVE = 'WIX_STORES_TEST_DRIVE',\n /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n HOTELS = 'HOTELS',\n /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n CLUBS = 'CLUBS',\n /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ONBOARDING_DRAFT = 'ONBOARDING_DRAFT',\n /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_SITE = 'DEV_SITE',\n /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n LOGOS = 'LOGOS',\n /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n VIDEO_MAKER = 'VIDEO_MAKER',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n PARTNER_DASHBOARD = 'PARTNER_DASHBOARD',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_CENTER_COMPANY = 'DEV_CENTER_COMPANY',\n /**\n * A draft created by HTML editor on open. Upon \"first save\" it will be moved to be of WIX domain.\n *\n * Meta site with this namespace will *not* be shown in a user's site list by default.\n */\n HTML_DRAFT = 'HTML_DRAFT',\n /**\n * the user-journey for Fitness users who want to start from managing their business instead of designing their website.\n * Will be accessible from Site List and will not have a website app.\n * Once the user attaches a site, the site will become a regular wixsite.\n */\n SITELESS_BUSINESS = 'SITELESS_BUSINESS',\n /** Belongs to \"strategic products\" company. Supports new product in the creator's economy space. */\n CREATOR_ECONOMY = 'CREATOR_ECONOMY',\n /** It is to be used in the Business First efforts. */\n DASHBOARD_FIRST = 'DASHBOARD_FIRST',\n /** Bookings business flow with no site. */\n ANYWHERE = 'ANYWHERE',\n /** Namespace for Headless Backoffice with no editor */\n HEADLESS = 'HEADLESS',\n /**\n * Namespace for master site that will exist in parent account that will be referenced by subaccounts\n * The site will be used for account level CSM feature for enterprise\n */\n ACCOUNT_MASTER_CMS = 'ACCOUNT_MASTER_CMS',\n /** Rise.ai Siteless account management for Gift Cards and Store Credit. */\n RISE = 'RISE',\n /**\n * As part of the branded app new funnel, users now can create a meta site that will be branded app first.\n * There's a blank site behind the scene but it's blank).\n * The Mobile company will be the owner of this namespace.\n */\n BRANDED_FIRST = 'BRANDED_FIRST',\n /** Nownia.com Siteless account management for Ai Scheduling Assistant. */\n NOWNIA = 'NOWNIA',\n /**\n * UGC Templates are templates that are created by users for personal use and to sale to other users.\n * The Partners company owns this namespace.\n */\n UGC_TEMPLATE = 'UGC_TEMPLATE',\n /** Codux Headless Sites */\n CODUX = 'CODUX',\n /** Bobb - AI Design Creator. */\n MEDIA_DESIGN_CREATOR = 'MEDIA_DESIGN_CREATOR',\n /**\n * Shared Blog Site is a unique single site across Enterprise account,\n * This site will hold all Blog posts related to the Marketing product.\n */\n SHARED_BLOG_ENTERPRISE = 'SHARED_BLOG_ENTERPRISE',\n /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_FORMS = 'STANDALONE_FORMS',\n /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_EVENTS = 'STANDALONE_EVENTS',\n /** MIMIR - Siteless account for MIMIR Ai Job runner. */\n MIMIR = 'MIMIR',\n /** Wix Twins platform. */\n TWINS = 'TWINS',\n /** Wix Nano. */\n NANO = 'NANO',\n}\n\n/** @enumType */\nexport type NamespaceWithLiterals =\n | Namespace\n | 'UNKNOWN_NAMESPACE'\n | 'WIX'\n | 'SHOUT_OUT'\n | 'ALBUMS'\n | 'WIX_STORES_TEST_DRIVE'\n | 'HOTELS'\n | 'CLUBS'\n | 'ONBOARDING_DRAFT'\n | 'DEV_SITE'\n | 'LOGOS'\n | 'VIDEO_MAKER'\n | 'PARTNER_DASHBOARD'\n | 'DEV_CENTER_COMPANY'\n | 'HTML_DRAFT'\n | 'SITELESS_BUSINESS'\n | 'CREATOR_ECONOMY'\n | 'DASHBOARD_FIRST'\n | 'ANYWHERE'\n | 'HEADLESS'\n | 'ACCOUNT_MASTER_CMS'\n | 'RISE'\n | 'BRANDED_FIRST'\n | 'NOWNIA'\n | 'UGC_TEMPLATE'\n | 'CODUX'\n | 'MEDIA_DESIGN_CREATOR'\n | 'SHARED_BLOG_ENTERPRISE'\n | 'STANDALONE_FORMS'\n | 'STANDALONE_EVENTS'\n | 'MIMIR'\n | 'TWINS'\n | 'NANO';\n\n/** Site transferred to another user. */\nexport interface SiteTransferred {\n /**\n * A previous owner id (user that transfers meta site).\n * @format GUID\n */\n oldOwnerId?: string;\n /**\n * A new owner id (user that accepts meta site).\n * @format GUID\n */\n newOwnerId?: string;\n}\n\n/** Soft deletion of the meta site. Could be restored. */\nexport interface SiteDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface DeleteContext {\n /** When the meta site was deleted. */\n dateDeleted?: Date | null;\n /** A status. */\n deleteStatus?: DeleteStatusWithLiterals;\n /**\n * A reason (flow).\n * @maxLength 255\n */\n deleteOrigin?: string;\n /**\n * A service that deleted it.\n * @maxLength 255\n */\n initiatorId?: string | null;\n}\n\nexport enum DeleteStatus {\n UNKNOWN = 'UNKNOWN',\n TRASH = 'TRASH',\n DELETED = 'DELETED',\n PENDING_PURGE = 'PENDING_PURGE',\n PURGED_EXTERNALLY = 'PURGED_EXTERNALLY',\n}\n\n/** @enumType */\nexport type DeleteStatusWithLiterals =\n | DeleteStatus\n | 'UNKNOWN'\n | 'TRASH'\n | 'DELETED'\n | 'PENDING_PURGE'\n | 'PURGED_EXTERNALLY';\n\n/** Restoration of the meta site. */\nexport interface SiteUndeleted {}\n\n/** First publish of a meta site. Or subsequent publish after unpublish. */\nexport interface SitePublished {}\n\nexport interface SiteUnpublished {\n /**\n * A list of URLs previously associated with the meta site.\n * @maxLength 4000\n * @maxSize 10000\n */\n urls?: string[];\n}\n\nexport interface SiteMarkedAsTemplate {}\n\nexport interface SiteMarkedAsWixSite {}\n\n/**\n * Represents a service provisioned a site.\n *\n * Note on `origin_instance_id`:\n * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.\n * This is because of the following scenario:\n *\n * Imagine you have a template where a third-party application (TPA) includes some stub data,\n * such as a product catalog. When you create a site from this template, you inherit this\n * default product catalog. However, if the template's product catalog is modified,\n * your site will retain the catalog as it was at the time of site creation. This ensures that\n * your site remains consistent with what you initially received and does not include any\n * changes made to the original template afterward.\n * To ensure this, the TPA on the template gets a new instance_id.\n */\nexport interface ServiceProvisioned {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * An instance id from which this instance is originated.\n * @maxLength 36\n */\n originInstanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n /**\n * The origin meta site id\n * @format GUID\n */\n originMetaSiteId?: string | null;\n}\n\nexport interface ServiceRemoved {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n}\n\n/** Rename of the site. Meaning, free public url has been changed as well. */\nexport interface SiteRenamed {\n /**\n * A new meta site name (URL slug).\n * @maxLength 20\n */\n newSiteName?: string;\n /**\n * A previous meta site name (URL slug).\n * @maxLength 255\n */\n oldSiteName?: string;\n}\n\n/**\n * Hard deletion of the meta site.\n *\n * Could not be restored. Therefore it's desirable to cleanup data.\n */\nexport interface SiteHardDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface NamespaceChanged {\n /** A previous namespace. */\n oldNamespace?: NamespaceWithLiterals;\n /** A new namespace. */\n newNamespace?: NamespaceWithLiterals;\n}\n\n/** Assigned Studio editor */\nexport interface StudioAssigned {}\n\n/** Unassigned Studio editor */\nexport interface StudioUnassigned {}\n\n/**\n * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.\n *\n * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up\n * with sites and its urls, you need to listen to another topic/event. Read about it:\n *\n * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service\n */\nexport interface SiteUrlChanged {}\n\n/**\n * Used at the end of the deletion flow for both draft sites and when a user deletes a site.\n * Consumed by other teams to remove relevant data.\n */\nexport interface SitePurgedExternally {\n /**\n * @maxLength 2048\n * @maxSize 100\n * @deprecated\n * @targetRemovalDate 2025-04-15\n */\n appDefId?: string[];\n}\n\n/** Assigned Odeditor */\nexport interface OdeditorAssigned {}\n\n/** Unassigned Odeditor */\nexport interface OdeditorUnassigned {}\n\n/** Assigned Picasso editor */\nexport interface PicassoAssigned {}\n\n/** Unassigned Picasso */\nexport interface PicassoUnassigned {}\n\n/** Assigned Wixel */\nexport interface WixelAssigned {}\n\n/** Unassigned Wixel */\nexport interface WixelUnassigned {}\n\n/** Assigned StudioTwo */\nexport interface StudioTwoAssigned {}\n\n/** Unassigned StudioTwo */\nexport interface StudioTwoUnassigned {}\n\nexport interface CreateDraftAutomationRequest {\n /** Draft automation to create. */\n automation?: Automation;\n}\n\nexport interface CreateDraftAutomationResponse {\n /** Draft automation that was created. */\n automation?: Automation;\n}\n\nexport interface GetOrCreateDraftAutomationRequest {\n /**\n * ID of the original automation on which the draft is based.\n * @format GUID\n */\n originalAutomationId: string;\n}\n\nexport interface GetOrCreateDraftAutomationResponse {\n /** Draft automation. */\n automation?: Automation;\n}\n\nexport interface UpdateDraftAutomationRequest {\n /** Automation to update. Updates can be partial. */\n automation: Automation;\n}\n\nexport interface UpdateDraftAutomationResponse {\n /** Updated draft automation. */\n automation?: Automation;\n}\n\nexport interface QueryAutomationsWithDraftsRequest {\n /**\n * Query.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n}\n\nexport interface QueryAutomationsWithDraftsResponse {\n /** Retrieved automations. */\n automations?: Automation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /**\n * Map of existing automation IDs and their drafts' automation IDs.\n * When include_draft_data is set to `false`, the map is empty. The key is the automationId of the original automation, and the value a list of related draft automationIds.\n */\n originalAutomationIdToDrafts?: Record<string, DraftsInfo>;\n}\n\nexport interface DraftsInfo {\n /**\n * IDs of the draft automations.\n * @maxSize 1\n * @format GUID\n */\n draftAutomationIds?: string[];\n}\n\nexport interface BulkCountAutomationsWithDraftsRequest {\n /**\n * Array of filters in the following format:\n *\n * `\"filter\" :\n * [{\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }, {\n * \"fieldName3\": \"value3\",\n * \"fieldName4\":{\"$operator\":\"value4\"}\n * }]`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n * @maxSize 3\n * @deprecated Array of filters in the following format:\n *\n * `\"filter\" :\n * [{\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }, {\n * \"fieldName3\": \"value3\",\n * \"fieldName4\":{\"$operator\":\"value4\"}\n * }]`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n * @replacedBy requests\n * @targetRemovalDate 2025-09-01\n */\n filters?: Record<string, any>[] | null;\n}\n\nexport interface BulkCountAutomationsWithDraftsResponse {\n /** Total automations count */\n counts?: number[];\n}\n\nexport interface DeleteDraftAutomationRequest {\n /**\n * ID of the draft automation to delete.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface DeleteDraftAutomationResponse {}\n\nexport interface PublishDraftAutomationRequest {\n /**\n * ID of the draft automation to publish.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface PublishDraftAutomationResponse {\n /** Updated published automation. */\n automation?: Automation;\n}\n\nexport interface ValidateAutomationRequest {\n /** Automation to validate. */\n automation: Automation;\n /** Automation validation settings. */\n validationSettings?: ValidationSettings;\n}\n\nexport interface ValidationSettings {\n /**\n * IDs of actions to validate. Only actions whose IDs are specified are validated.\n *\n * When action IDs are specified, triggers are not validated. When empty, the full automation is validated, including triggers.\n * @maxSize 30\n * @format GUID\n */\n actionIds?: string[];\n /**\n * Whether to skip provider validations.\n *\n * Default: `false`.\n */\n skipProviderValidations?: boolean;\n}\n\nexport interface ValidateAutomationResponse {\n /** Automation validation status. */\n status?: ValidationResultStatusWithLiterals;\n /**\n * Validation errors related to the automation's trigger configuration.\n * @maxSize 100\n */\n triggerValidationErrors?: TriggerValidationError[];\n /**\n * Validation errors related to the automation's actions configuration.\n * @maxSize 100\n */\n actionValidationErrors?: ActionValidationError[];\n}\n\nexport enum ValidationResultStatus {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Automation is valid - no validation errors found. */\n VALID = 'VALID',\n /** Automation is partially valid - validation errors with Warning severity were found - might affect automation execution */\n VALID_WITH_WARNINGS = 'VALID_WITH_WARNINGS',\n /** Automation is not valid, validation errors with Critical severity were found - prevents proper automation/action execution and should be fixed. */\n INVALID = 'INVALID',\n}\n\n/** @enumType */\nexport type ValidationResultStatusWithLiterals =\n | ValidationResultStatus\n | 'UNKNOWN_STATUS'\n | 'VALID'\n | 'VALID_WITH_WARNINGS'\n | 'INVALID';\n\nexport interface TriggerValidationError\n extends TriggerValidationErrorErrorOneOf {\n /** Automation's Trigger configuration error. */\n configurationError?: TriggerConfigurationError;\n /** Trigger Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n /** Validation error type. */\n errorType?: TriggerValidationErrorValidationErrorTypeWithLiterals;\n /** Validation error severity */\n errorSeverity?: SeverityWithLiterals;\n}\n\n/** @oneof */\nexport interface TriggerValidationErrorErrorOneOf {\n /** Automation's Trigger configuration error. */\n configurationError?: TriggerConfigurationError;\n /** Trigger Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n}\n\nexport enum TriggerValidationErrorValidationErrorType {\n UNKNOWN_VALIDATION_ERROR_TYPE = 'UNKNOWN_VALIDATION_ERROR_TYPE',\n /** Automation's Trigger Configuration error. */\n CONFIGURATION_ERROR = 'CONFIGURATION_ERROR',\n /** Trigger Provider related error. */\n PROVIDER_ERROR = 'PROVIDER_ERROR',\n}\n\n/** @enumType */\nexport type TriggerValidationErrorValidationErrorTypeWithLiterals =\n | TriggerValidationErrorValidationErrorType\n | 'UNKNOWN_VALIDATION_ERROR_TYPE'\n | 'CONFIGURATION_ERROR'\n | 'PROVIDER_ERROR';\n\nexport interface TriggerConfigurationError {\n /** Trigger error type. */\n errorType?: TriggerErrorTypeWithLiterals;\n}\n\nexport enum TriggerErrorType {\n UNKNOWN_TRIGGER_ERROR_TYPE = 'UNKNOWN_TRIGGER_ERROR_TYPE',\n /** Configured trigger was not found. */\n NOT_FOUND = 'NOT_FOUND',\n /** App not installed. */\n APP_NOT_INSTALLED = 'APP_NOT_INSTALLED',\n /** Invalid trigger key. */\n INVALID_TRIGGER_KEY = 'INVALID_TRIGGER_KEY',\n /** Invalid filter field key. */\n INVALID_FILTER_FIELD_KEY = 'INVALID_FILTER_FIELD_KEY',\n /** Invalid filter expression. */\n INVALID_FILTER_EXPRESSION = 'INVALID_FILTER_EXPRESSION',\n /** Missing configuration for a required trigger filter */\n MISSING_REQUIRED_FILTER = 'MISSING_REQUIRED_FILTER',\n}\n\n/** @enumType */\nexport type TriggerErrorTypeWithLiterals =\n | TriggerErrorType\n | 'UNKNOWN_TRIGGER_ERROR_TYPE'\n | 'NOT_FOUND'\n | 'APP_NOT_INSTALLED'\n | 'INVALID_TRIGGER_KEY'\n | 'INVALID_FILTER_FIELD_KEY'\n | 'INVALID_FILTER_EXPRESSION'\n | 'MISSING_REQUIRED_FILTER';\n\nexport interface ProviderConfigurationError {\n /** Key corresponding to the field in the schema. */\n fieldKey?: string | null;\n /** Error message. */\n message?: string;\n /** Label for a call-to-action button that's displayed with the error. Translated according to the SPI language context. */\n ctaLabel?: string | null;\n /** URL to redirect to when the call-to-action button is clicked. */\n ctaUrl?: string | null;\n /** Title for the error. */\n title?: string;\n}\n\nexport enum ValidationErrorSeverity {\n UNKNOWN_VALIDATION_ERROR_SEVERITY = 'UNKNOWN_VALIDATION_ERROR_SEVERITY',\n /** Warning. */\n WARNING = 'WARNING',\n /** Error. */\n ERROR = 'ERROR',\n}\n\n/** @enumType */\nexport type ValidationErrorSeverityWithLiterals =\n | ValidationErrorSeverity\n | 'UNKNOWN_VALIDATION_ERROR_SEVERITY'\n | 'WARNING'\n | 'ERROR';\n\nexport enum Severity {\n UNKNOWN_SEVERITY = 'UNKNOWN_SEVERITY',\n /** Low severity error - may affect automation execution. */\n WARNING = 'WARNING',\n /** Critical severity error - prevents proper automation execution and should be fixed. */\n CRITICAL = 'CRITICAL',\n}\n\n/** @enumType */\nexport type SeverityWithLiterals =\n | Severity\n | 'UNKNOWN_SEVERITY'\n | 'WARNING'\n | 'CRITICAL';\n\nexport interface ActionValidationInfo {\n /**\n * Action ID.\n * @format GUID\n */\n actionId?: string | null;\n /**\n * ID of the app that defined the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Human-readable action identifier.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /**\n * Action validation errors.\n * @maxSize 100\n */\n validationErrors?: ActionValidationError[];\n}\n\nexport interface ActionValidationError extends ActionValidationErrorErrorOneOf {\n /** Action configuration error. */\n configurationError?: ActionConfigurationError;\n /** Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n /**\n * Action Identifier in the Automation.\n * @format GUID\n */\n actionId?: string;\n /**\n * ID of the app that defined the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Human-readable action identifier.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /** Validation error type. */\n errorType?: ValidationErrorTypeWithLiterals;\n /** Validation error severity */\n errorSeverity?: SeverityWithLiterals;\n}\n\n/** @oneof */\nexport interface ActionValidationErrorErrorOneOf {\n /** Action configuration error. */\n configurationError?: ActionConfigurationError;\n /** Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n}\n\nexport enum ValidationErrorType {\n UNKNOWN_VALIDATION_ERROR_TYPE = 'UNKNOWN_VALIDATION_ERROR_TYPE',\n /** Configuration error. */\n CONFIGURATION_ERROR = 'CONFIGURATION_ERROR',\n /** Provider error. */\n PROVIDER_ERROR = 'PROVIDER_ERROR',\n}\n\n/** @enumType */\nexport type ValidationErrorTypeWithLiterals =\n | ValidationErrorType\n | 'UNKNOWN_VALIDATION_ERROR_TYPE'\n | 'CONFIGURATION_ERROR'\n | 'PROVIDER_ERROR';\n\nexport interface ActionConfigurationError {\n /** Action error type. */\n errorType?: ActionErrorTypeWithLiterals;\n}\n\nexport enum ActionErrorType {\n UNKNOWN_ACTION_ERROR_TYPE = 'UNKNOWN_ACTION_ERROR_TYPE',\n /** Configured action was not found. */\n NOT_FOUND = 'NOT_FOUND',\n /** App not installed. */\n APP_NOT_INSTALLED = 'APP_NOT_INSTALLED',\n /** Invalid action key. */\n INVALID_ACTION_KEY = 'INVALID_ACTION_KEY',\n /** Invalid mapping */\n INVALID_MAPPING = 'INVALID_MAPPING',\n /** Mapping type mismatch. */\n MAPPING_TYPE_MISMATCH = 'MAPPING_TYPE_MISMATCH',\n /** Mapping missing required field. */\n MAPPING_MISSING_REQUIRED_FIELD = 'MAPPING_MISSING_REQUIRED_FIELD',\n /** Mapping schema mismatch. */\n MAPPING_SCHEMA_MISMATCH = 'MAPPING_SCHEMA_MISMATCH',\n /** Mapping variable missing from schema. */\n MAPPING_VARIABLE_MISSING_FROM_SCHEMA = 'MAPPING_VARIABLE_MISSING_FROM_SCHEMA',\n /** Configured post action not found. */\n POST_ACTION_NOT_FOUND = 'POST_ACTION_NOT_FOUND',\n}\n\n/** @enumType */\nexport type ActionErrorTypeWithLiterals =\n | ActionErrorType\n | 'UNKNOWN_ACTION_ERROR_TYPE'\n | 'NOT_FOUND'\n | 'APP_NOT_INSTALLED'\n | 'INVALID_ACTION_KEY'\n | 'INVALID_MAPPING'\n | 'MAPPING_TYPE_MISMATCH'\n | 'MAPPING_MISSING_REQUIRED_FIELD'\n | 'MAPPING_SCHEMA_MISMATCH'\n | 'MAPPING_VARIABLE_MISSING_FROM_SCHEMA'\n | 'POST_ACTION_NOT_FOUND';\n\nexport interface AutomationValidationError\n extends AutomationValidationErrorErrorOneOf {\n /** Automation configuration error. */\n configurationError?: AutomationConfigurationError;\n /** Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n /** Validation error type. */\n errorType?: AutomationValidationErrorValidationErrorTypeWithLiterals;\n /** Validation error severity */\n errorSeverity?: SeverityWithLiterals;\n}\n\n/** @oneof */\nexport interface AutomationValidationErrorErrorOneOf {\n /** Automation configuration error. */\n configurationError?: AutomationConfigurationError;\n /** Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n}\n\nexport enum AutomationValidationErrorValidationErrorType {\n UNKNOWN_VALIDATION_ERROR_TYPE = 'UNKNOWN_VALIDATION_ERROR_TYPE',\n CONFIGURATION_ERROR = 'CONFIGURATION_ERROR',\n PROVIDER_ERROR = 'PROVIDER_ERROR',\n}\n\n/** @enumType */\nexport type AutomationValidationErrorValidationErrorTypeWithLiterals =\n | AutomationValidationErrorValidationErrorType\n | 'UNKNOWN_VALIDATION_ERROR_TYPE'\n | 'CONFIGURATION_ERROR'\n | 'PROVIDER_ERROR';\n\nexport interface AutomationConfigurationError {\n /** Automation error type. */\n errorType?: AutomationErrorTypeWithLiterals;\n}\n\nexport enum AutomationErrorType {\n UNKNOWN_AUTOMATION_ERROR_TYPE = 'UNKNOWN_AUTOMATION_ERROR_TYPE',\n}\n\n/** @enumType */\nexport type AutomationErrorTypeWithLiterals =\n | AutomationErrorType\n | 'UNKNOWN_AUTOMATION_ERROR_TYPE';\n\nexport interface ValidateAutomationByIdRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId: string;\n /** Validation settings. */\n validationSettings?: ValidationSettings;\n}\n\nexport interface ValidateAutomationByIdResponse {\n /** Automation validation status. */\n status?: ValidationResultStatusWithLiterals;\n /**\n * Validation errors related to the automation's trigger configuration.\n * @maxSize 100\n */\n triggerValidationErrors?: TriggerValidationError[];\n /**\n * Validation errors related to the automation's actions configuration.\n * @maxSize 100\n */\n actionValidationErrors?: ActionValidationError[];\n}\n\nexport interface GetAutomationActionSchemaRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId?: string;\n /**\n * Action ID.\n * @format GUID\n */\n actionId?: string;\n}\n\nexport interface GetAutomationActionSchemaResponse {\n /** The accumulated payload schema for an action. */\n schema?: Record<string, any> | null;\n}\n\nexport interface GetActionsQuotaInfoRequest {}\n\nexport interface GetActionsQuotaInfoResponse {\n /** Action quotas. */\n actionProviderQuotaInfo?: ActionProviderQuotaInfo[];\n}\n\nexport interface ActionProviderQuotaInfo {\n /**\n * ID of the app that defined the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 80\n */\n actionKey?: string;\n /** Action quota information. */\n actionQuotaInfo?: ActionQuotaInfo;\n}\n\nexport interface ActionQuotaInfo {\n /**\n * Whether the quotas for your action are enforced. If you mark this as `true` in the response body,\n * Wix displays the information in the quota object on the site dashboard. If you mark this as `false` for\n * a user, Wix does not display any quota info on the site dashboard for your service.\n */\n enforced?: boolean;\n /**\n * The plans your service provides, together with the quotas enforced by each plan. A site may be enrolled\n * in multiple plans. Plans and quotas can be related as follows:\n *\n * + A single plan has a single quota.\n * + A single plan has multiple quotas.\n * + Multiple plans are associated with multiple quotas.\n *\n * Plans and quotas that are related should be grouped together in a single `quotaInfo`\n * object.\n */\n quotaInfo?: QuotaInfo[];\n}\n\nexport interface QuotaInfo {\n /** List of plans associated with the site making the request. */\n plans?: Plan[];\n /**\n * List of quotas associated with the plans the site is enrolled in.\n * @minSize 1\n */\n quotas?: Quota[];\n /**\n * Details for an upgrade call-to-action button.\n * Displayed in the Wix user’s site dashboard together with the quota details.\n */\n upgradeCta?: UpgradeCTA;\n}\n\nexport interface Plan {\n /** Plan ID defined by the action provider. */\n _id?: string;\n /** Plan name to display in the Wix user’s site dashboard. */\n name?: string;\n}\n\nexport interface Quota {\n /**\n * Name of the feature the quota is related to. For example, \"Messages sent\".\n * @minLength 1\n */\n featureName?: string;\n /**\n * Quota renewal date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.\n * For example, 10 July 2020 at 15:00 is written as `2020-07-10 15:00:00.000`.\n */\n renewalDate?: Date | null;\n /** The user's current quota usage. */\n currentUsage?: string;\n /** Quota limit data. */\n limit?: string | null;\n /** Additional information about the quota. Displayed as a tooltip in the Wix user’s dashboard. */\n additionalInfo?: AdditionalInfo;\n}\n\nexport interface CTA {\n /**\n * Call-to-action redirect URL.\n * @minLength 1\n */\n url?: string;\n /**\n * Call-to-action label.\n * @minLength 1\n */\n label?: string;\n}\n\nexport interface AdditionalInfo {\n /**\n * Tooltip content.\n * @minLength 1\n */\n description?: string;\n /** Details for an options call-to-action link that appears in the tooltip. */\n cta?: CTA;\n}\n\nexport interface UpgradeCTA {\n /**\n * CTA button redirect URL.\n * @minLength 1\n */\n url?: string;\n /**\n * CTA button label.\n * @minLength 1\n */\n label?: string;\n}\n\nexport interface MigrateVeloActionAutomationsRequest {\n /** @format GUID */\n oldAppId?: string;\n /** @format GUID */\n newAppId?: string;\n /** @format GUID */\n newComponentId?: string;\n}\n\nexport interface MigrateVeloActionAutomationsResponse {}\n\nexport interface MergeOverridePreinstalledWithRuntimeVersionRequest {\n /**\n * ID of the override preinstalled automation to merge.\n * @format GUID\n */\n automationId?: string;\n}\n\nexport interface MergeOverridePreinstalledWithRuntimeVersionResponse {\n /** The merged automation after applying the latest runtime version of the preinstalled automation. */\n automation?: Automation;\n}\n\nexport interface GetAutomationRevisionRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId: string;\n /** Revision number. */\n revision?: string | null;\n /**\n * Requested fields.\n * @maxSize 20\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface GetAutomationRevisionResponse {\n /** Automation revision. */\n automation?: Automation;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface AutomationCreatedEnvelope {\n entity: Automation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a new automation is created.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @webhook\n * @eventType wix.automations.v2.automation_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onAutomationCreated(\n handler: (event: AutomationCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface AutomationDeletedEnvelope {\n entity: Automation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an automation is deleted.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @webhook\n * @eventType wix.automations.v2.automation_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onAutomationDeleted(\n handler: (event: AutomationDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface AutomationUpdatedEnvelope {\n entity: Automation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an automation is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @webhook\n * @eventType wix.automations.v2.automation_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onAutomationUpdated(\n handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates an automation.\n * @param automation - Automation to create.\n * @public\n * @documentationMaturity preview\n * @requiredField automation\n * @requiredField automation.configuration\n * @requiredField automation.configuration.actions\n * @requiredField automation.configuration.rootActionIds\n * @requiredField automation.configuration.status\n * @requiredField automation.configuration.trigger\n * @requiredField automation.configuration.trigger.appId\n * @requiredField automation.configuration.trigger.triggerKey\n * @requiredField automation.name\n * @requiredField automation.origin\n * @permissionId AUTOMATIONS.AUTOMATION_CREATE\n * @applicableIdentity APP\n * @returns Details of the created automation.\n * @fqn wix.automations.v2.AutomationsService.CreateAutomation\n */\nexport async function createAutomation(\n automation: NonNullablePaths<\n Automation,\n | `configuration`\n | `configuration.actions`\n | `configuration.rootActionIds`\n | `configuration.status`\n | `configuration.trigger`\n | `configuration.trigger.appId`\n | `configuration.trigger.triggerKey`\n | `name`\n | `origin`,\n 4\n >\n): Promise<\n NonNullablePaths<\n Automation,\n | `applicationInfo.appId`\n | `preinstalledInfo.appId`\n | `createdBy.userId`\n | `createdBy.appId`\n | `name`\n | `configuration.status`\n | `configuration.trigger.appId`\n | `configuration.trigger.triggerKey`\n | `configuration.trigger.filters`\n | `configuration.trigger.filters.${number}._id`\n | `configuration.trigger.filters.${number}.fieldKey`\n | `configuration.trigger.filters.${number}.filterExpression`\n | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `configuration.trigger.rateLimit.maxActivationsExpression`\n | `configuration.trigger.rateLimit.durationTimeUnit`\n | `configuration.rootActionIds`\n | `origin`\n | `settings.hidden`\n | `settings.readonly`\n | `settings.disableDelete`\n | `settings.disableStatusChange`\n | `settings.actionSettings.permanentActionIds`\n | `settings.actionSettings.readonlyActionIds`\n | `archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: automation,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.createAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automation: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automation']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves an automation by ID.\n * @param automationId - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @applicableIdentity APP\n * @returns Retrieved automation.\n * @fqn wix.automations.v2.AutomationsService.GetAutomation\n */\nexport async function getAutomation(\n automationId: string\n): Promise<\n NonNullablePaths<\n Automation,\n | `applicationInfo.appId`\n | `preinstalledInfo.appId`\n | `createdBy.userId`\n | `createdBy.appId`\n | `name`\n | `configuration.status`\n | `configuration.trigger.appId`\n | `configuration.trigger.triggerKey`\n | `configuration.trigger.filters`\n | `configuration.trigger.filters.${number}._id`\n | `configuration.trigger.filters.${number}.fieldKey`\n | `configuration.trigger.filters.${number}.filterExpression`\n | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `configuration.trigger.rateLimit.maxActivationsExpression`\n | `configuration.trigger.rateLimit.durationTimeUnit`\n | `configuration.rootActionIds`\n | `origin`\n | `settings.hidden`\n | `settings.readonly`\n | `settings.disableDelete`\n | `settings.disableStatusChange`\n | `settings.actionSettings.permanentActionIds`\n | `settings.actionSettings.readonlyActionIds`\n | `archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n });\n\n const reqOpts = ambassadorWixAutomationsV2Automation.getAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the specified automation.\n *\n * When an automation is updated, its `revision` property is incremented by 1. When updating an automation, you must specify the current revision number.\n * @param _id - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField automation\n * @requiredField automation.revision\n * @permissionId AUTOMATIONS.AUTOMATION_UPDATE\n * @applicableIdentity APP\n * @returns Updated automation.\n * @fqn wix.automations.v2.AutomationsService.UpdateAutomation\n */\nexport async function updateAutomation(\n _id: string,\n automation: NonNullablePaths<UpdateAutomation, `revision`, 2>\n): Promise<\n NonNullablePaths<\n Automation,\n | `applicationInfo.appId`\n | `preinstalledInfo.appId`\n | `createdBy.userId`\n | `createdBy.appId`\n | `name`\n | `configuration.status`\n | `configuration.trigger.appId`\n | `configuration.trigger.triggerKey`\n | `configuration.trigger.filters`\n | `configuration.trigger.filters.${number}._id`\n | `configuration.trigger.filters.${number}.fieldKey`\n | `configuration.trigger.filters.${number}.filterExpression`\n | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `configuration.trigger.rateLimit.maxActivationsExpression`\n | `configuration.trigger.rateLimit.durationTimeUnit`\n | `configuration.rootActionIds`\n | `origin`\n | `settings.hidden`\n | `settings.readonly`\n | `settings.disableDelete`\n | `settings.disableStatusChange`\n | `settings.actionSettings.permanentActionIds`\n | `settings.actionSettings.readonlyActionIds`\n | `archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: { ...automation, id: _id },\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.updateAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { automation: '$[1]' },\n explicitPathsToArguments: { 'automation.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'automation']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateAutomation {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n /**\n * Automation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Who created the automation.\n * @immutable\n * @readonly\n */\n createdBy?: AuditInfo;\n /**\n * When the automation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Who last updated the automation.\n * @readonly\n */\n updatedBy?: AuditInfo;\n /**\n * When the automation was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Automation name as displayed on the user's site.\n * @minLength 1\n * @maxLength 500\n */\n name?: string;\n /**\n * Automation description.\n * @maxLength 2000\n */\n description?: string | null;\n /** Automation configuration. */\n configuration?: AutomationConfiguration;\n /**\n * How the automation was added to the user's site.\n * @immutable\n */\n origin?: OriginWithLiterals;\n /** Automation settings. */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/**\n * Deletes the specified automation.\n * @param automationId - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_DELETE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.DeleteAutomation\n */\nexport async function deleteAutomation(automationId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.deleteAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes one or more automations.\n * @param automationIds - IDs of the automations to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField automationIds\n * @permissionId AUTOMATIONS.AUTOMATION_DELETE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.BulkDeleteAutomations\n */\nexport async function bulkDeleteAutomations(\n automationIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteAutomationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationIds: automationIds,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.bulkDeleteAutomations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Generates a preinstalled automation from another automation.\n *\n * Calls the action providers for changes needed to make a preinstalled automation, such as changes made to email template.\n *\n * > **Note**: You must have an account permission to edit an app.\n * @param automation - Automation.\n * @public\n * @documentationMaturity preview\n * @requiredField automation\n * @fqn wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation\n */\nexport async function generatePreinstalledAutomation(\n automation: Automation,\n options?: GeneratePreinstalledAutomationOptions\n): Promise<\n NonNullablePaths<\n GeneratePreinstalledAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: automation,\n appId: options?.appId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.generatePreinstalledAutomation(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automation: '$[0]', appId: '$[1].appId' },\n singleArgumentUnchanged: false,\n },\n ['automation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GeneratePreinstalledAutomationOptions {\n /**\n * ID of the app to which the automation belongs.\n * @format GUID\n */\n appId?: string;\n}\n\n/**\n * Retrieves a list of automations. This includes both automations overridden on a site and preinstalled automations. If a preinstalled automation has been overridden on the site, the method returns the override automation.\n *\n * > **Note**: The method only returns automations by apps installed on the site.\n *\n * Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.QueryAutomations\n */\nexport function queryAutomations(): AutomationsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Automation,\n 'CURSOR',\n QueryAutomationsRequest,\n QueryAutomationsResponse\n >({\n func: async (payload: QueryAutomationsRequest) => {\n const reqOpts =\n ambassadorWixAutomationsV2Automation.queryAutomations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryAutomationsRequest['query']) => {\n const args = [query, {}] as [QueryAutomationsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryAutomationsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.automations,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface AutomationsQueryResult extends QueryCursorResult {\n items: Automation[];\n query: AutomationsQueryBuilder;\n next: () => Promise<AutomationsQueryResult>;\n prev: () => Promise<AutomationsQueryResult>;\n}\n\nexport interface AutomationsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: string\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: any[]\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasAll: (\n propertyName:\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds',\n value: any[]\n ) => AutomationsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: any\n ) => AutomationsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: boolean\n ) => AutomationsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filters'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived'\n >\n ) => AutomationsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filters'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived'\n >\n ) => AutomationsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => AutomationsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => AutomationsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<AutomationsQueryResult>;\n}\n\n/**\n * Get aggregated info\n * @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.GetAggregatedUsageInfo\n */\nexport async function getAggregatedUsageInfo(\n options?: GetAggregatedUsageInfoOptions\n): Promise<\n NonNullablePaths<\n GetAggregatedUsageInfoResponse,\n | `triggersUsageSummary`\n | `triggersUsageSummary.${number}.appId`\n | `triggersUsageSummary.${number}.triggerKey`\n | `triggersUsageSummary.${number}.automationsCount`\n | `actionsUsageSummary`\n | `actionsUsageSummary.${number}.appId`\n | `actionsUsageSummary.${number}.actionKey`\n | `actionsUsageSummary.${number}.automationsCount`\n | `createdByAppIdUsageSummary`\n | `createdByAppIdUsageSummary.${number}.appId`\n | `createdByAppIdUsageSummary.${number}.automationsCount`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.getAggregatedUsageInfo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetAggregatedUsageInfoOptions {\n /**\n * Filter in the following format:\n *\n * `\"filter\" :\n * {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Creates a copy of an action with a new ID, and changes the action's input mapping if necessary.\n *\n * The action copy isn't saved automatically. To save it, the user must perform an action\n * such as clicking the **Save** button.\n * @param automationId - ID of the automation to copy.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_COPY\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.CopyAutomation\n */\nexport async function copyAutomation(\n automationId: string,\n options?: CopyAutomationOptions\n): Promise<\n NonNullablePaths<\n CopyAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n origin: options?.origin,\n automation: options?.automation,\n });\n\n const reqOpts = ambassadorWixAutomationsV2Automation.copyAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n automationId: '$[0]',\n origin: '$[1].origin',\n automation: '$[1].automation',\n },\n singleArgumentUnchanged: false,\n },\n ['automationId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CopyAutomationOptions {\n /** Origin of the automation to copy. */\n origin?: OriginWithLiterals;\n /** Automation to copy. Skips fetching by ID. */\n automation?: Automation;\n}\n\n/**\n * Creates a draft automation.\n * @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.CreateDraftAutomation\n */\nexport async function createDraftAutomation(\n options?: CreateDraftAutomationOptions\n): Promise<\n NonNullablePaths<\n CreateDraftAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: options?.automation,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.createDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automation: '$[0].automation' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateDraftAutomationOptions {\n /** Draft automation to create. */\n automation?: Automation;\n}\n\n/**\n * Retrieves the draft of the specified automation. If a draft doesn't exist, the method creates one.\n *\n * > **Note**: If the specified automation is a draft, the method returns it.\n * @param originalAutomationId - ID of the original automation on which the draft is based.\n * @public\n * @documentationMaturity preview\n * @requiredField originalAutomationId\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation\n */\nexport async function getOrCreateDraftAutomation(\n originalAutomationId: string\n): Promise<\n NonNullablePaths<\n GetOrCreateDraftAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n originalAutomationId: originalAutomationId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.getOrCreateDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { originalAutomationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['originalAutomationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a draft automation.\n * @param _id - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField automation\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.UpdateDraftAutomation\n */\nexport async function updateDraftAutomation(\n _id: string,\n automation: UpdateDraftAutomation\n): Promise<\n NonNullablePaths<\n UpdateDraftAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: { ...automation, id: _id },\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.updateDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { automation: '$[1]' },\n explicitPathsToArguments: { 'automation.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'automation']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateDraftAutomation {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n /**\n * Automation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Who created the automation.\n * @immutable\n * @readonly\n */\n createdBy?: AuditInfo;\n /**\n * When the automation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Who last updated the automation.\n * @readonly\n */\n updatedBy?: AuditInfo;\n /**\n * When the automation was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Automation name as displayed on the user's site.\n * @minLength 1\n * @maxLength 500\n */\n name?: string;\n /**\n * Automation description.\n * @maxLength 2000\n */\n description?: string | null;\n /** Automation configuration. */\n configuration?: AutomationConfiguration;\n /**\n * How the automation was added to the user's site.\n * @immutable\n */\n origin?: OriginWithLiterals;\n /** Automation settings. */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/**\n * Retrieves a list of automations, including drafts. Max query filter depth is 3.\n *\n * Relevant automations for the query are returned. This includes automations created on the site and pre-installed automations.\n * If there's an existing override for a pre-installed automation, the override is returned in the query result.\n * The query only returns automations from apps that are installed on the site.\n *\n * - new drafts that are not related to existing automations will be returned in the list\n * - the response will contain a map of originalAutomationId => relatedDrafts\n *\n * To learn about working with _Query_ endpoints, see\n * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),\n * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),\n * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).\n * @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts\n */\nexport async function queryAutomationsWithDrafts(\n options?: QueryAutomationsWithDraftsOptions\n): Promise<\n NonNullablePaths<\n QueryAutomationsWithDraftsResponse,\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: options?.query,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.queryAutomationsWithDrafts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QueryAutomationsWithDraftsOptions {\n /**\n * Query.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n}\n\n/** @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.BulkCountAutomationsWithDrafts\n */\nexport async function bulkCountAutomationsWithDrafts(\n options?: BulkCountAutomationsWithDraftsOptions\n): Promise<\n NonNullablePaths<BulkCountAutomationsWithDraftsResponse, `counts`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filters: options?.filters,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.bulkCountAutomationsWithDrafts(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filters: '$[0].filters' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCountAutomationsWithDraftsOptions {\n /**\n * Array of filters in the following format:\n *\n * `\"filter\" :\n * [{\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }, {\n * \"fieldName3\": \"value3\",\n * \"fieldName4\":{\"$operator\":\"value4\"}\n * }]`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n * @maxSize 3\n * @deprecated Array of filters in the following format:\n *\n * `\"filter\" :\n * [{\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }, {\n * \"fieldName3\": \"value3\",\n * \"fieldName4\":{\"$operator\":\"value4\"}\n * }]`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n * @replacedBy requests\n * @targetRemovalDate 2025-09-01\n */\n filters?: Record<string, any>[] | null;\n}\n\n/**\n * Deletes a draft automation.\n * @param automationId - ID of the draft automation to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_DELETE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.DeleteDraftAutomation\n */\nexport async function deleteDraftAutomation(\n automationId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.deleteDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Publishes a draft automation. This applies any changes to the live automation.\n * @param automationId - ID of the draft automation to publish.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_UPDATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.PublishDraftAutomation\n */\nexport async function publishDraftAutomation(\n automationId: string\n): Promise<\n NonNullablePaths<\n PublishDraftAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.publishDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Validates the specified automation.\n * @param automation - Automation to validate.\n * @public\n * @documentationMaturity preview\n * @requiredField automation\n * @permissionId AUTOMATIONS.AUTOMATION_VALIDATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.ValidateAutomation\n */\nexport async function validateAutomation(\n automation: Automation,\n options?: ValidateAutomationOptions\n): Promise<\n NonNullablePaths<\n ValidateAutomationResponse,\n | `status`\n | `triggerValidationErrors`\n | `triggerValidationErrors.${number}.configurationError.errorType`\n | `triggerValidationErrors.${number}.providerConfigurationError.message`\n | `triggerValidationErrors.${number}.providerConfigurationError.title`\n | `triggerValidationErrors.${number}.errorType`\n | `triggerValidationErrors.${number}.errorSeverity`\n | `actionValidationErrors`\n | `actionValidationErrors.${number}.configurationError.errorType`\n | `actionValidationErrors.${number}.providerConfigurationError.message`\n | `actionValidationErrors.${number}.providerConfigurationError.title`\n | `actionValidationErrors.${number}.actionId`\n | `actionValidationErrors.${number}.appId`\n | `actionValidationErrors.${number}.actionKey`\n | `actionValidationErrors.${number}.errorType`\n | `actionValidationErrors.${number}.errorSeverity`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: automation,\n validationSettings: options?.validationSettings,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.validateAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n automation: '$[0]',\n validationSettings: '$[1].validationSettings',\n },\n singleArgumentUnchanged: false,\n },\n ['automation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ValidateAutomationOptions {\n /** Automation validation settings. */\n validationSettings?: ValidationSettings;\n}\n\n/**\n * Validates the automation specified by ID.\n * @param automationId - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_VALIDATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.ValidateAutomationById\n */\nexport async function validateAutomationById(\n automationId: string,\n options?: ValidateAutomationByIdOptions\n): Promise<\n NonNullablePaths<\n ValidateAutomationByIdResponse,\n | `status`\n | `triggerValidationErrors`\n | `triggerValidationErrors.${number}.configurationError.errorType`\n | `triggerValidationErrors.${number}.providerConfigurationError.message`\n | `triggerValidationErrors.${number}.providerConfigurationError.title`\n | `triggerValidationErrors.${number}.errorType`\n | `triggerValidationErrors.${number}.errorSeverity`\n | `actionValidationErrors`\n | `actionValidationErrors.${number}.configurationError.errorType`\n | `actionValidationErrors.${number}.providerConfigurationError.message`\n | `actionValidationErrors.${number}.providerConfigurationError.title`\n | `actionValidationErrors.${number}.actionId`\n | `actionValidationErrors.${number}.appId`\n | `actionValidationErrors.${number}.actionKey`\n | `actionValidationErrors.${number}.errorType`\n | `actionValidationErrors.${number}.errorSeverity`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n validationSettings: options?.validationSettings,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.validateAutomationById(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n automationId: '$[0]',\n validationSettings: '$[1].validationSettings',\n },\n singleArgumentUnchanged: false,\n },\n ['automationId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ValidateAutomationByIdOptions {\n /** Validation settings. */\n validationSettings?: ValidationSettings;\n}\n\n/**\n * Gets the specified automation revision.\n * @param automationId - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision\n */\nexport async function getAutomationRevision(\n automationId: string,\n options?: GetAutomationRevisionOptions\n): Promise<\n NonNullablePaths<\n GetAutomationRevisionResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n revision: options?.revision,\n fields: options?.fields,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.getAutomationRevision(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n automationId: '$[0]',\n revision: '$[1].revision',\n fields: '$[1].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['automationId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetAutomationRevisionOptions {\n /** Revision number. */\n revision?: string | null;\n /**\n * Requested fields.\n * @maxSize 20\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixAutomationsV2AutomationRevisionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n {\n srcPath: '/_api/automations-service',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/v2/automations',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixAutomationsV2AutomationsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n {\n srcPath: '/_api/automations-service',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/v2/automations',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_automations_automations-v-2';\n\n/** Creates an automation. */\nexport function createAutomation(payload: object): RequestOptionsFactory<any> {\n function __createAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.CreateAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createAutomation;\n}\n\n/** Retrieves an automation by ID. */\nexport function getAutomation(payload: object): RequestOptionsFactory<any> {\n function __getAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'GET' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.GetAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAutomation;\n}\n\n/**\n * Updates the specified automation.\n *\n * When an automation is updated, its `revision` property is incremented by 1. When updating an automation, you must specify the current revision number.\n */\nexport function updateAutomation(payload: object): RequestOptionsFactory<any> {\n function __updateAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'PATCH' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.UpdateAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automation.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateAutomation;\n}\n\n/** Deletes the specified automation. */\nexport function deleteAutomation(payload: object): RequestOptionsFactory<any> {\n function __deleteAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'DELETE' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.DeleteAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAutomation;\n}\n\n/** Deletes one or more automations. */\nexport function bulkDeleteAutomations(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteAutomations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.BulkDeleteAutomations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/bulk/automations/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteAutomations;\n}\n\n/**\n * Generates a preinstalled automation from another automation.\n *\n * Calls the action providers for changes needed to make a preinstalled automation, such as changes made to email template.\n *\n * > **Note**: You must have an account permission to edit an app.\n */\nexport function generatePreinstalledAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __generatePreinstalledAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn:\n 'wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/preinstalled-automation/generate',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generatePreinstalledAutomation;\n}\n\n/**\n * Retrieves a list of automations. This includes both automations overridden on a site and preinstalled automations. If a preinstalled automation has been overridden on the site, the method returns the override automation.\n *\n * > **Note**: The method only returns automations by apps installed on the site.\n *\n * Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n */\nexport function queryAutomations(payload: object): RequestOptionsFactory<any> {\n function __queryAutomations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.QueryAutomations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automations.createdDate' },\n { path: 'automations.updatedDate' },\n { path: 'automations.draftUpdatedDate' },\n { path: 'automations.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryAutomations;\n}\n\n/** Get aggregated info */\nexport function getAggregatedUsageInfo(\n payload: object\n): RequestOptionsFactory<any> {\n function __getAggregatedUsageInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'GET' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.GetAggregatedUsageInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/usage',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n };\n\n return metadata;\n }\n\n return __getAggregatedUsageInfo;\n}\n\n/**\n * Creates a copy of an action with a new ID, and changes the action's input mapping if necessary.\n *\n * The action copy isn't saved automatically. To save it, the user must perform an action\n * such as clicking the **Save** button.\n */\nexport function copyAutomation(payload: object): RequestOptionsFactory<any> {\n function __copyAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.CopyAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automationId}/copy',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __copyAutomation;\n}\n\n/** Creates a draft automation. */\nexport function createDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __createDraftAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.CreateDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/drafts',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDraftAutomation;\n}\n\n/**\n * Retrieves the draft of the specified automation. If a draft doesn't exist, the method creates one.\n *\n * > **Note**: If the specified automation is a draft, the method returns it.\n */\nexport function getOrCreateDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __getOrCreateDraftAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn:\n 'wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath:\n '/v2/automations/drafts/get-or-create/original-automation-id/{originalAutomationId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getOrCreateDraftAutomation;\n}\n\n/** Updates a draft automation. */\nexport function updateDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateDraftAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'PATCH' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.UpdateDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/drafts/{automation.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateDraftAutomation;\n}\n\n/**\n * Retrieves a list of automations, including drafts. Max query filter depth is 3.\n *\n * Relevant automations for the query are returned. This includes automations created on the site and pre-installed automations.\n * If there's an existing override for a pre-installed automation, the override is returned in the query result.\n * The query only returns automations from apps that are installed on the site.\n *\n * - new drafts that are not related to existing automations will be returned in the list\n * - the response will contain a map of originalAutomationId => relatedDrafts\n *\n * To learn about working with _Query_ endpoints, see\n * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),\n * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),\n * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).\n */\nexport function queryAutomationsWithDrafts(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryAutomationsWithDrafts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn:\n 'wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/query-with-drafts',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automations.createdDate' },\n { path: 'automations.updatedDate' },\n { path: 'automations.draftUpdatedDate' },\n { path: 'automations.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryAutomationsWithDrafts;\n}\n\nexport function bulkCountAutomationsWithDrafts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCountAutomationsWithDrafts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn:\n 'wix.automations.v2.AutomationsService.BulkCountAutomationsWithDrafts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/bulk-count-with-drafts',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkCountAutomationsWithDrafts;\n}\n\n/** Deletes a draft automation. */\nexport function deleteDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteDraftAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'DELETE' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.DeleteDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/drafts/{automationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteDraftAutomation;\n}\n\n/** Publishes a draft automation. This applies any changes to the live automation. */\nexport function publishDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __publishDraftAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.PublishDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/drafts/{automationId}/publish',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __publishDraftAutomation;\n}\n\n/** Validates the specified automation. */\nexport function validateAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __validateAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.ValidateAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/validate',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __validateAutomation;\n}\n\n/** Validates the automation specified by ID. */\nexport function validateAutomationById(\n payload: object\n): RequestOptionsFactory<any> {\n function __validateAutomationById({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.ValidateAutomationById',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automationId}/validate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __validateAutomationById;\n}\n\n/** Gets the specified automation revision. */\nexport function getAutomationRevision(\n payload: object\n): RequestOptionsFactory<any> {\n function __getAutomationRevision({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'GET' as any,\n methodFqn:\n 'wix.automations.v2.AutomationRevisionsService.GetAutomationRevision',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({\n protoPath: '/v1/automation-revisions/{automationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAutomationRevision;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wCAAAA;AAAA,EAAA,6BAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,8BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;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AAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAjB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,oBAAoB;AAAA,QACtB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAiBA,eAAsBkB,uBACpB,cACA,SA+BA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,UAAU,SAAS;AAAA,IACnB,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UACiC,sBAAsB,OAAO;AAEpE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAlB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,UAAU;AAAA,UACV,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkCountAutomationsWithDrafts","bulkDeleteAutomations","copyAutomation","createAutomation","createDraftAutomation","deleteAutomation","deleteDraftAutomation","generatePreinstalledAutomation","getAggregatedUsageInfo","getAutomation","getAutomationRevision","getOrCreateDraftAutomation","publishDraftAutomation","queryAutomations","queryAutomationsWithDrafts","updateAutomation","updateDraftAutomation","validateAutomation","validateAutomationById","import_timestamp","import_rest_modules","payload","import_transform_paths","Domain","TimeUnit","Operator","Language","Type","Status","Origin","WebhookIdentityType","RequestedFields","SortOrder","State","SiteCreatedContext","Namespace","DeleteStatus","ValidationResultStatus","TriggerValidationErrorValidationErrorType","TriggerErrorType","ValidationErrorSeverity","Severity","ValidationErrorType","ActionErrorType","AutomationValidationErrorValidationErrorType","AutomationErrorType","createAutomation","sdkTransformError","getAutomation","updateAutomation","deleteAutomation","bulkDeleteAutomations","generatePreinstalledAutomation","queryAutomations","getAggregatedUsageInfo","copyAutomation","createDraftAutomation","getOrCreateDraftAutomation","updateDraftAutomation","queryAutomationsWithDrafts","bulkCountAutomationsWithDrafts","deleteDraftAutomation","publishDraftAutomation","validateAutomation","validateAutomationById","getAutomationRevision"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/automations-v2-automation-automations-v-2.universal.ts","../../src/automations-v2-automation-automations-v-2.http.ts"],"sourcesContent":["export * from './src/automations-v2-automation-automations-v-2.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAutomationsV2Automation from './automations-v2-automation-automations-v-2.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Automation extends AutomationOriginInfoOneOf {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n /**\n * Automation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Who created the automation.\n * @immutable\n * @readonly\n */\n createdBy?: AuditInfo;\n /**\n * When the automation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Who last updated the automation.\n * @readonly\n */\n updatedBy?: AuditInfo;\n /**\n * When the automation was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Automation name as displayed on the user's site.\n * @minLength 1\n * @maxLength 500\n */\n name?: string;\n /**\n * Automation description.\n * @maxLength 2000\n */\n description?: string | null;\n /** Automation configuration. */\n configuration?: AutomationConfiguration;\n /**\n * How the automation was added to the user's site.\n * @immutable\n */\n origin?: OriginWithLiterals;\n /** Automation settings. */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/** @oneof */\nexport interface AutomationOriginInfoOneOf {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n}\n\nexport interface AIMetadata {}\n\nexport interface ActionSettings {\n /**\n * Permanent actions. PermanentAction's skipActionExpression cannot be modified.\n *\n * When empty, all actions can be set as skipped\n * @maxSize 30\n * @format GUID\n */\n permanentActionIds?: string[];\n /**\n * Read-only actions. Read-only actions cannot be edited.\n *\n * When empty, all actions are editable.\n * @maxSize 30\n * @format GUID\n */\n readonlyActionIds?: string[];\n}\n\nexport enum Domain {\n /** User domain (default). */\n USER = 'USER',\n /** Wix domain. */\n WIX = 'WIX',\n /** Wix account-level domain. */\n WIX_ACCOUNT = 'WIX_ACCOUNT',\n}\n\n/** @enumType */\nexport type DomainWithLiterals = Domain | 'USER' | 'WIX' | 'WIX_ACCOUNT';\n\nexport interface TriggerSettings {}\n\nexport interface Enrichment {\n /**\n * Enrichment input mappings.\n * @maxSize 2\n */\n inputMappings?: Record<string, any>[] | null;\n}\n\nexport interface AuditInfo extends AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface AutomationConfiguration {\n /** Status of the automation on the site. */\n status?: StatusWithLiterals;\n /** Trigger configuration. */\n trigger?: Trigger;\n /**\n * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.\n *\n * > **Note**: You can currently only specify 1 root action.\n * @maxSize 20\n * @format GUID\n */\n rootActionIds?: string[];\n /** Actions the automation can execute, as `key:value` pairs. For the key, specify the action ID. The value must be an object structured as described below. */\n actions?: Record<string, Action>;\n}\n\nexport enum TimeUnit {\n UNKNOWN_TIME_UNIT = 'UNKNOWN_TIME_UNIT',\n /** Minutes. */\n MINUTES = 'MINUTES',\n /** Hours. */\n HOURS = 'HOURS',\n /** Days. */\n DAYS = 'DAYS',\n /** Weeks. */\n WEEKS = 'WEEKS',\n /** Months. */\n MONTHS = 'MONTHS',\n}\n\n/** @enumType */\nexport type TimeUnitWithLiterals =\n | TimeUnit\n | 'UNKNOWN_TIME_UNIT'\n | 'MINUTES'\n | 'HOURS'\n | 'DAYS'\n | 'WEEKS'\n | 'MONTHS';\n\nexport interface Filter {\n /**\n * Filter ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Field key.\n *\n * You can find the field key in [the trigger payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema).\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Filter expression.\n *\n * For the automation to run, the expression must evaluate to `true`.\n * @maxLength 2500\n */\n filterExpression?: string;\n}\n\nexport interface FutureDateActivationOffset {\n /**\n * Amount of time before the trigger to run the automation.\n *\n * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).\n * @maxLength 1000\n */\n preScheduledEventOffsetExpression?: string;\n /** Unit in which to set the action offset. */\n scheduledEventOffsetTimeUnit?: TimeUnitWithLiterals;\n}\n\nexport interface RateLimit {\n /**\n * Maximum number of times the trigger can be activated.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Duration of the rate limit. The rate limit applies for the specified duration and then expires.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n durationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n durationTimeUnit?: TimeUnitWithLiterals;\n /**\n * Activation identifier used to count the number of activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n}\n\nexport interface FilterValueSelection {\n /**\n * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.\n * @maxLength 80\n * @maxSize 50\n */\n selectedFilterValues?: string[];\n}\n\nexport interface ConditionExpressionGroup {\n /** Logical operator used to evaluate the condition expressions. */\n operator?: OperatorWithLiterals;\n /**\n * Expressions evaluated using the selected operator.\n * @minSize 1\n * @maxSize 20\n * @maxLength 2500\n */\n booleanExpressions?: string[];\n}\n\nexport enum Operator {\n /** Unknown. */\n UNKNOWN_OPERATOR = 'UNKNOWN_OPERATOR',\n /** `OR` operator. */\n OR = 'OR',\n /** `AND` operator. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type OperatorWithLiterals = Operator | 'UNKNOWN_OPERATOR' | 'OR' | 'AND';\n\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: LanguageWithLiterals;\n /**\n * Expressions evaluated using the selected operator. this code should comply the language syntax. and format\n * @maxLength 1000\n */\n code?: string;\n}\n\nexport enum Language {\n /** Unknown. */\n UNKNOWN_LANGUAGE = 'UNKNOWN_LANGUAGE',\n /** JavaScript. */\n JAVASCRIPT = 'JAVASCRIPT',\n}\n\n/** @enumType */\nexport type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';\n\n/** Path definition */\nexport interface Path {\n /**\n * Unique path ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Path display name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * ID of the action to run when this path is taken.\n * @format GUID\n */\n postActionId?: string | null;\n}\n\nexport enum Type {\n /** Based on the trigger. */\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */\n APP_DEFINED = 'APP_DEFINED',\n /** Condition. This determines which action runs next. */\n CONDITION = 'CONDITION',\n /** Delay. The automation must wait before executing the next step. */\n DELAY = 'DELAY',\n /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */\n RATE_LIMIT = 'RATE_LIMIT',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_ACTION_TYPE'\n | 'APP_DEFINED'\n | 'CONDITION'\n | 'DELAY'\n | 'RATE_LIMIT';\n\nexport interface AppDefinedAction {\n /**\n * ID of the app that defines the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /**\n * Action input mapping as defined in the action's [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema).\n *\n * The input mapping must include all parameters specified in the action's input schema's `required` array, and can include any other parameters from the schema.\n */\n inputMapping?: Record<string, any> | null;\n /**\n * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @maxSize 10\n * @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @replacedBy skip_action_expression\n * @targetRemovalDate 2026-02-01\n */\n skipConditionOrExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions that run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n /** Action output schema. When specified, this replaces the action schema. */\n overrideOutputSchema?: Record<string, any> | null;\n}\n\nexport interface ConditionAction {\n /**\n * Condition is `true` if one or more of the expression groups evaluates to `true`.\n * @minSize 1\n * @maxSize 10\n */\n orExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface CodeConditionAction {\n /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */\n snippet?: CodeSnippet;\n /**\n * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.\n * this list is mainly for validation purpose.\n * @maxSize 50\n * @maxLength 100\n */\n dynamicVariableExpressions?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface DelayAction {\n /**\n * Time to wait before running the action. The wait time starts from when the current action completes.\n *\n * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.\n * @maxLength 1000\n */\n offsetExpression?: string | null;\n /** Unit in which to set the wait time to wait before the action runs. */\n offsetTimeUnit?: TimeUnitWithLiterals;\n /**\n * Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n * @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @replacedBy due_date_expression\n * @targetRemovalDate 2026-02-01\n */\n dueDateEpochExpression?: string | null;\n /**\n * Action run date as a timestamp or DateTime expression using bracket notation.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n */\n dueDateExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the time delay.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface RateLimitAction {\n /**\n * Maximum number of times the action can run.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Rate limit duration.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n rateLimitDurationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n rateLimitDurationTimeUnit?: TimeUnitWithLiterals;\n /**\n * Unique identifier of each activation by which rate limiter counts activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface SetVariablesAction {\n /** Output mapping. For example: `{\"someField\": \"{{10}}\", \"someOtherField\": \"{{multiply( var('account.points.balance') ;2 )}}\" }`. */\n outputMapping?: Record<string, any> | null;\n /**\n * Output JSON schema representation.\n *\n * > **Note**: To minimize request size, you can also specify a string.\n */\n outputSchema?: Record<string, any> | null;\n /**\n * IDs of actions to run in parallel after variable initialization.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface OutputAction {\n /** Output action output mapping. */\n outputMapping?: Record<string, any> | null;\n}\n\nexport interface SplitAction {\n /**\n * List of paths to split execution into.\n * @minSize 2\n * @maxSize 10\n */\n paths?: Path[];\n}\n\nexport enum Status {\n /** Unknown. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Active. Active automations can be triggered. */\n ACTIVE = 'ACTIVE',\n /** Inactive. Inactive automations cannot be triggered. */\n INACTIVE = 'INACTIVE',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'ACTIVE'\n | 'INACTIVE';\n\nexport interface Trigger {\n /**\n * ID of the app that defines the trigger.\n * @format GUID\n */\n appId?: string;\n /**\n * Trigger key.\n *\n * Learn about [setting up a trigger](https://dev.wix.com/docs/rest/business-management/automations/triggers/add-a-trigger-to-your-app#step-1--set-up-the-trigger).\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * Schema field filters. All filter conditions must be met for the automation to run.\n *\n * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#filters).\n * @maxSize 5\n */\n filters?: Filter[];\n /**\n * Automation offset. You can schedule automations to run before the trigger occurs.\n *\n * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).\n */\n scheduledEventOffset?: FutureDateActivationOffset;\n /** Limit on the number of times an automation can be triggered. */\n rateLimit?: RateLimit;\n /** Trigger schema override. When specified, this replaces the trigger schema. */\n overrideSchema?: Record<string, any> | null;\n}\n\nexport interface Action extends ActionInfoOneOf {\n /** Details of the action when its `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action when its `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action when its `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action when its `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action when its `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n /**\n * Action ID.\n *\n * Unique identifier for the action instance in the current automation. Use this to refer to this action in the automation flow.\n *\n * If not specified, automatically generated by Wix.\n * @format GUID\n */\n _id?: string | null;\n /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#action-type). */\n type?: TypeWithLiterals;\n /**\n * Editable display name for the action.\n * @minLength 1\n * @maxLength 60\n */\n displayName?: string | null;\n /**\n * [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#namespace). This differentiates it from other actions of the same type.\n *\n * If the action outputs any data, the data appears under the namespace in the payload sent to the subsequent steps in the automation. If the user has multiple actions with the same `appId` and `actionKey`, the output of the previous action is overwritten.\n * @minLength 1\n * @maxLength 100\n */\n namespace?: string | null;\n /**\n * Evaluated to boolean to decide whether the action is skipped.\n * For ConditionAction: if skipped, true_post_action_ids execute; false_post_action_ids are skipped\n * SplitAction and OutputAction do not support skip_action_expression\n * @maxLength 1000\n */\n skipActionExpression?: string | null;\n}\n\n/** @oneof */\nexport interface ActionInfoOneOf {\n /** Details of the action when its `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action when its `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action when its `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action when its `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action when its `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n}\n\nexport interface FilterableAppDefinedActions {\n /**\n * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.\n * @minSize 1\n * @maxSize 100\n * @minLength 1\n * @maxLength 150\n */\n actionIdentifiers?: string[];\n}\n\nexport enum Origin {\n /** Default value. */\n UNKNOWN_ORIGIN = 'UNKNOWN_ORIGIN',\n /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */\n USER = 'USER',\n /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */\n APPLICATION = 'APPLICATION',\n /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */\n PREINSTALLED = 'PREINSTALLED',\n}\n\n/** @enumType */\nexport type OriginWithLiterals =\n | Origin\n | 'UNKNOWN_ORIGIN'\n | 'USER'\n | 'APPLICATION'\n | 'PREINSTALLED';\n\nexport interface ApplicationOrigin {\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface PreinstalledOrigin {\n /**\n * ID of the app that added the [preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations).\n * @format GUID\n */\n appId?: string;\n /**\n * Whether the automation is an override.\n *\n * When a user modifies the preinstalled automation installed on their site, a site-specific version of the automation is created that overrides the automation that was originally installed. This override automation has the same automation ID as the original preinstalled automation.\n *\n * > **Note**: An override automation can no longer be updated by the app that originally installed it.\n * >\n * > To revert to the original preinstalled version, the user must delete the override by calling the Delete Automation method. Calling Delete Automation on an override automation removes the override method and restores the preinstalled automation that was previously installed.\n *\n * Default: `false`.\n * @immutable\n * @readonly\n */\n override?: boolean | null;\n}\n\nexport interface AutomationSettings {\n /**\n * Whether the automation is hidden from users.\n *\n * Default: `false`\n */\n hidden?: boolean;\n /**\n * Whether the automation is read-only.\n *\n * Default: `false`\n */\n readonly?: boolean;\n /**\n * Whether to disable the option to delete the automation from the site.\n *\n * Default: `false`.\n */\n disableDelete?: boolean;\n /**\n * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.\n *\n * Default: `false`.\n */\n disableStatusChange?: boolean;\n /** Automation action settings. */\n actionSettings?: ActionSettings;\n}\n\nexport interface DraftInfo {\n /**\n * ID of the original automation.\n * @format GUID\n * @readonly\n */\n originalAutomationId?: string | null;\n}\n\nexport interface Enrichments {\n /** Whether the studio site enrichment is wanted. */\n studioSite?: Enrichment;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface AutoArchivePolicy {\n /**\n * Date when to archive the automation\n * If this date in the past, nothing will happen (automation will not go into archived state)\n * If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE\n * After this date the automation may be unarchived and archived again, this date will have no influence\n */\n archiveDate?: Date | null;\n}\n\nexport interface Notes {}\n\nexport interface Note {}\n\nexport interface Position {}\n\nexport interface Offset {}\n\nexport interface Dimensions {}\n\nexport interface UpdatedWithPreviousEntity {\n /** Previous automation. */\n previousAutomation?: Automation;\n /** Updated automation. */\n currentAutomation?: Automation;\n}\n\nexport interface DeletedWithEntity {\n /** Deleted automation. */\n automation?: Automation;\n}\n\nexport interface DraftPublished {\n /**\n * ID of the draft automation.\n * @format GUID\n */\n draftAutomationId?: string;\n /**\n * Original automation on which the draft is based.\n *\n * > **Note**: If the draft is not based on an existing automation, the draft itself is the original automation.\n */\n draftOriginalAutomation?: Automation;\n /** Updated, published automation. */\n updatedAutomation?: Automation;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface CreateAutomationRequest {\n /** Automation to create. */\n automation: Automation;\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n /** whether to return in response `configuration.trigger.override_output_schema` field and in `configuration.actions` the `override_output_schema` field */\n OVERRIDE_SCHEMA = 'OVERRIDE_SCHEMA',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'OVERRIDE_SCHEMA';\n\nexport interface CreateAutomationResponse {\n /** Details of the created automation. */\n automation?: Automation;\n}\n\nexport interface GetAutomationRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface GetAutomationResponse {\n /** Retrieved automation. */\n automation?: Automation;\n}\n\nexport interface UpdateAutomationRequest {\n /** Automation to update. */\n automation: Automation;\n}\n\nexport interface UpdateAutomationResponse {\n /** Updated automation. */\n automation?: Automation;\n}\n\nexport interface DeleteAutomationRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface DeleteAutomationResponse {}\n\nexport interface BulkDeleteAutomationsRequest {\n /**\n * IDs of the automations to delete.\n * @format GUID\n * @minSize 1\n * @maxSize 200\n */\n automationIds: string[];\n}\n\nexport interface BulkDeleteAutomationsResponse {\n /**\n * Results of the bulk deletion.\n * @minSize 1\n * @maxSize 200\n */\n results?: BulkDeleteResult[];\n /** Metadata for the API call. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteResult {\n /** Deleted item metadata. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface CreatePreinstalledAutomationRequest {\n /** Preinstalled automation to create. */\n automation?: Automation;\n /**\n * Hide the created automation behind a spec.\n *\n * For internal use only.\n */\n specInfo?: PreinstalledAutomationSpecInfo;\n /**\n * Original site automation used to create the current preinstalled automation.\n *\n * Usually an existing automation on a site is used to create the preinstalled automation.\n *\n * For internal use only.\n */\n originAutomationInfo?: OriginAutomationInfo;\n /**\n * ID of the app to which the automation belongs.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface PreinstalledAutomationSpecInfo {\n /**\n * Spec to conduct on for the automation.\n *\n * For internal use only.\n * @maxLength 128\n */\n spec?: string;\n /**\n * Value the spec should return in order to affect the user with the operation\n * e.g. creation - show the users the automation, update - show the users the updated automation, deletion - not show the users the automation\n * @maxLength 128\n */\n variantValue?: string | null;\n /**\n * Version from which the experiment should decide whether to expose it to users when !conduct(spec).contains(variant_value)\n * For example, if 50 is set, version 49 and below (including 49) will not expose the preinstalled automation to the user.\n */\n experimentVersion?: number;\n}\n\nexport interface OriginAutomationInfo {\n /**\n * ID of the original automation.\n * @format GUID\n */\n siteAutomationId?: string;\n /**\n * Metasite ID of the original automation.\n * @format GUID\n */\n metaSiteId?: string;\n}\n\nexport interface CreatePreinstalledAutomationResponse {\n /** Details of the created preinstalled automation. */\n automation?: Automation;\n}\n\nexport interface UpdatePreinstalledAutomationRequest {\n /** Preinstalled automation to update. */\n automation?: Automation;\n /**\n * Hide the updated automation behind a spec.\n *\n * For internal use only.\n */\n specInfo?: PreinstalledAutomationSpecInfo;\n /**\n * ID of the app to which the automation belongs.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface UpdatePreinstalledAutomationResponse {\n /** Updated preinstalled automation. */\n automation?: Automation;\n}\n\nexport interface DeletePreinstalledAutomationRequest {\n /**\n * ID of the preinstalled component.\n * @format GUID\n */\n componentId?: string;\n /**\n * Makes the deletion operation gradual.\n * The automation will not return if the variant returns for the site\n *\n * For internal use only.\n */\n specInfo?: PreinstalledAutomationSpecInfo;\n /**\n * ID of the app to which the component belongs.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface DeletePreinstalledAutomationResponse {}\n\nexport interface GeneratePreinstalledAutomationRequest {\n /** Automation. */\n automation: Automation;\n /**\n * ID of the app to which the automation belongs.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface GeneratePreinstalledAutomationResponse {\n /** Automation. */\n automation?: Automation;\n}\n\nexport interface QueryPreinstalledAutomationsForAppRequest {\n /**\n * Query.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n /**\n * ID of the app for which to query preinstalled automations.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\": { \"$operator\": \"value2\" }\n * }`\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort configuration in the following format:\n * `[{ \"fieldName\": \"sortField1\", \"order\": \"ASC\" }, { \"fieldName\":\" sortField2\", \"order\": \"DESC\" }]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 500\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 64000\n */\n cursor?: string | null;\n}\n\nexport interface QueryPreinstalledAutomationsForAppResponse {\n /** Automations. */\n automations?: Automation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 64000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 64000\n */\n prev?: string | null;\n}\n\nexport interface QueryPreinstalledAutomationsRequest {\n /**\n * Query.\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n}\n\nexport interface QueryPreinstalledAutomationsResponse {\n /** Automations. */\n automations?: Automation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface QueryAutomationsRequest {\n /**\n * Query.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n *\n * > **Note**: To query archived automations, specify `{ \"archived\": true }` in the [query filter object](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n */\n query?: CursorQuery;\n}\n\nexport interface QueryAutomationsResponse {\n /** Automations. */\n automations?: Automation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface GetAggregatedUsageInfoRequest {\n /**\n * Filter in the following format:\n *\n * `\"filter\" :\n * {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface GetAggregatedUsageInfoResponse {\n /** Triggers in use. */\n triggersUsageSummary?: TriggerUsageSummary[];\n /** Actions in use */\n actionsUsageSummary?: ActionUsageSummary[];\n /** Created by app ids in use */\n createdByAppIdUsageSummary?: CreatedByAppIdUsageSummary[];\n}\n\nexport interface TriggerUsageSummary {\n /**\n * ID of the app that defined the trigger.\n * @format GUID\n */\n appId?: string;\n /**\n * Trigger key.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /** Number of automations that include this trigger. */\n automationsCount?: number;\n}\n\nexport interface ActionUsageSummary {\n /**\n * ID of the app that defined the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /** Number of automations that include this action. */\n automationsCount?: number;\n}\n\nexport interface CreatedByAppIdUsageSummary {\n /**\n * ID of the app that created the automation.\n * @format GUID\n */\n appId?: string;\n /** Number of automations that include this app ID. */\n automationsCount?: number;\n}\n\nexport interface Empty {}\n\nexport interface CopyAutomationRequest {\n /**\n * ID of the automation to copy.\n * @format GUID\n */\n automationId: string;\n /** Origin of the automation to copy. */\n origin?: OriginWithLiterals;\n /** Automation to copy. Skips fetching by ID. */\n automation?: Automation;\n}\n\nexport interface CopyAutomationResponse {\n /** Copy of the automation. */\n automation?: Automation;\n}\n\nexport interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch\n * the actual URL.\n *\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459\n */\n urlChanged?: SiteUrlChanged;\n /** Site is marked as PurgedExternally */\n sitePurgedExternally?: SitePurgedExternally;\n /** Emitted when Odeditor is attached. */\n odeditorAssigned?: OdeditorAssigned;\n /** Emitted when Odeditor is detached. */\n odeditorUnassigned?: OdeditorUnassigned;\n /** Emitted when Picasso is attached. */\n picassoAssigned?: PicassoAssigned;\n /** Emitted when Picasso is detached. */\n picassoUnassigned?: PicassoUnassigned;\n /** Emitted when Wixel is attached. */\n wixelAssigned?: WixelAssigned;\n /** Emitted when Wixel is detached. */\n wixelUnassigned?: WixelUnassigned;\n /** Emitted when StudioTwo is attached. */\n studioTwoAssigned?: StudioTwoAssigned;\n /** Emitted when StudioTwo is detached. */\n studioTwoUnassigned?: StudioTwoUnassigned;\n /**\n * A meta site id.\n * @format GUID\n */\n metaSiteId?: string;\n /** A meta site version. Monotonically increasing. */\n version?: string;\n /** A timestamp of the event. */\n timestamp?: string;\n /**\n * TODO(meta-site): Change validation once validations are disabled for consumers\n * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659\n * @maxSize 4000\n */\n assets?: Asset[];\n}\n\n/** @oneof */\nexport interface MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch\n * the actual URL.\n *\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459\n */\n urlChanged?: SiteUrlChanged;\n /** Site is marked as PurgedExternally */\n sitePurgedExternally?: SitePurgedExternally;\n /** Emitted when Odeditor is attached. */\n odeditorAssigned?: OdeditorAssigned;\n /** Emitted when Odeditor is detached. */\n odeditorUnassigned?: OdeditorUnassigned;\n /** Emitted when Picasso is attached. */\n picassoAssigned?: PicassoAssigned;\n /** Emitted when Picasso is detached. */\n picassoUnassigned?: PicassoUnassigned;\n /** Emitted when Wixel is attached. */\n wixelAssigned?: WixelAssigned;\n /** Emitted when Wixel is detached. */\n wixelUnassigned?: WixelUnassigned;\n /** Emitted when StudioTwo is attached. */\n studioTwoAssigned?: StudioTwoAssigned;\n /** Emitted when StudioTwo is detached. */\n studioTwoUnassigned?: StudioTwoUnassigned;\n}\n\nexport interface Asset {\n /**\n * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * An instance id. For legacy reasons may be UUID or a string.\n * @maxLength 200\n */\n instanceId?: string;\n /** An application state. */\n state?: StateWithLiterals;\n}\n\nexport enum State {\n UNKNOWN = 'UNKNOWN',\n ENABLED = 'ENABLED',\n DISABLED = 'DISABLED',\n PENDING = 'PENDING',\n DEMO = 'DEMO',\n}\n\n/** @enumType */\nexport type StateWithLiterals =\n | State\n | 'UNKNOWN'\n | 'ENABLED'\n | 'DISABLED'\n | 'PENDING'\n | 'DEMO';\n\nexport interface SiteCreated {\n /**\n * A template identifier (empty if not created from a template).\n * @maxLength 36\n */\n originTemplateId?: string;\n /**\n * An account id of the owner.\n * @format GUID\n */\n ownerId?: string;\n /** A context in which meta site was created. */\n context?: SiteCreatedContextWithLiterals;\n /**\n * A meta site id from which this site was created.\n *\n * In case of a creation from a template it's a template id.\n * In case of a site duplication (\"Save As\" in dashboard or duplicate in UM) it's an id of a source site.\n * @format GUID\n */\n originMetaSiteId?: string | null;\n /**\n * A meta site name (URL slug).\n * @maxLength 20\n */\n siteName?: string;\n /** A namespace. */\n namespace?: NamespaceWithLiterals;\n}\n\nexport enum SiteCreatedContext {\n /** A valid option, we don't expose all reasons why site might be created. */\n OTHER = 'OTHER',\n /** A meta site was created from template. */\n FROM_TEMPLATE = 'FROM_TEMPLATE',\n /** A meta site was created by copying of the transfferred meta site. */\n DUPLICATE_BY_SITE_TRANSFER = 'DUPLICATE_BY_SITE_TRANSFER',\n /** A copy of existing meta site. */\n DUPLICATE = 'DUPLICATE',\n /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */\n OLD_SITE_TRANSFER = 'OLD_SITE_TRANSFER',\n /** deprecated A meta site was created for Flash editor. */\n FLASH = 'FLASH',\n}\n\n/** @enumType */\nexport type SiteCreatedContextWithLiterals =\n | SiteCreatedContext\n | 'OTHER'\n | 'FROM_TEMPLATE'\n | 'DUPLICATE_BY_SITE_TRANSFER'\n | 'DUPLICATE'\n | 'OLD_SITE_TRANSFER'\n | 'FLASH';\n\nexport enum Namespace {\n UNKNOWN_NAMESPACE = 'UNKNOWN_NAMESPACE',\n /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */\n WIX = 'WIX',\n /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n SHOUT_OUT = 'SHOUT_OUT',\n /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ALBUMS = 'ALBUMS',\n /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n WIX_STORES_TEST_DRIVE = 'WIX_STORES_TEST_DRIVE',\n /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n HOTELS = 'HOTELS',\n /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n CLUBS = 'CLUBS',\n /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ONBOARDING_DRAFT = 'ONBOARDING_DRAFT',\n /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_SITE = 'DEV_SITE',\n /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n LOGOS = 'LOGOS',\n /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n VIDEO_MAKER = 'VIDEO_MAKER',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n PARTNER_DASHBOARD = 'PARTNER_DASHBOARD',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_CENTER_COMPANY = 'DEV_CENTER_COMPANY',\n /**\n * A draft created by HTML editor on open. Upon \"first save\" it will be moved to be of WIX domain.\n *\n * Meta site with this namespace will *not* be shown in a user's site list by default.\n */\n HTML_DRAFT = 'HTML_DRAFT',\n /**\n * the user-journey for Fitness users who want to start from managing their business instead of designing their website.\n * Will be accessible from Site List and will not have a website app.\n * Once the user attaches a site, the site will become a regular wixsite.\n */\n SITELESS_BUSINESS = 'SITELESS_BUSINESS',\n /** Belongs to \"strategic products\" company. Supports new product in the creator's economy space. */\n CREATOR_ECONOMY = 'CREATOR_ECONOMY',\n /** It is to be used in the Business First efforts. */\n DASHBOARD_FIRST = 'DASHBOARD_FIRST',\n /** Bookings business flow with no site. */\n ANYWHERE = 'ANYWHERE',\n /** Namespace for Headless Backoffice with no editor */\n HEADLESS = 'HEADLESS',\n /**\n * Namespace for master site that will exist in parent account that will be referenced by subaccounts\n * The site will be used for account level CSM feature for enterprise\n */\n ACCOUNT_MASTER_CMS = 'ACCOUNT_MASTER_CMS',\n /** Rise.ai Siteless account management for Gift Cards and Store Credit. */\n RISE = 'RISE',\n /**\n * As part of the branded app new funnel, users now can create a meta site that will be branded app first.\n * There's a blank site behind the scene but it's blank).\n * The Mobile company will be the owner of this namespace.\n */\n BRANDED_FIRST = 'BRANDED_FIRST',\n /** Nownia.com Siteless account management for Ai Scheduling Assistant. */\n NOWNIA = 'NOWNIA',\n /**\n * UGC Templates are templates that are created by users for personal use and to sale to other users.\n * The Partners company owns this namespace.\n */\n UGC_TEMPLATE = 'UGC_TEMPLATE',\n /** Codux Headless Sites */\n CODUX = 'CODUX',\n /** Bobb - AI Design Creator. */\n MEDIA_DESIGN_CREATOR = 'MEDIA_DESIGN_CREATOR',\n /**\n * Shared Blog Site is a unique single site across Enterprise account,\n * This site will hold all Blog posts related to the Marketing product.\n */\n SHARED_BLOG_ENTERPRISE = 'SHARED_BLOG_ENTERPRISE',\n /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_FORMS = 'STANDALONE_FORMS',\n /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_EVENTS = 'STANDALONE_EVENTS',\n /** MIMIR - Siteless account for MIMIR Ai Job runner. */\n MIMIR = 'MIMIR',\n /** Wix Twins platform. */\n TWINS = 'TWINS',\n /** Wix Nano. */\n NANO = 'NANO',\n}\n\n/** @enumType */\nexport type NamespaceWithLiterals =\n | Namespace\n | 'UNKNOWN_NAMESPACE'\n | 'WIX'\n | 'SHOUT_OUT'\n | 'ALBUMS'\n | 'WIX_STORES_TEST_DRIVE'\n | 'HOTELS'\n | 'CLUBS'\n | 'ONBOARDING_DRAFT'\n | 'DEV_SITE'\n | 'LOGOS'\n | 'VIDEO_MAKER'\n | 'PARTNER_DASHBOARD'\n | 'DEV_CENTER_COMPANY'\n | 'HTML_DRAFT'\n | 'SITELESS_BUSINESS'\n | 'CREATOR_ECONOMY'\n | 'DASHBOARD_FIRST'\n | 'ANYWHERE'\n | 'HEADLESS'\n | 'ACCOUNT_MASTER_CMS'\n | 'RISE'\n | 'BRANDED_FIRST'\n | 'NOWNIA'\n | 'UGC_TEMPLATE'\n | 'CODUX'\n | 'MEDIA_DESIGN_CREATOR'\n | 'SHARED_BLOG_ENTERPRISE'\n | 'STANDALONE_FORMS'\n | 'STANDALONE_EVENTS'\n | 'MIMIR'\n | 'TWINS'\n | 'NANO';\n\n/** Site transferred to another user. */\nexport interface SiteTransferred {\n /**\n * A previous owner id (user that transfers meta site).\n * @format GUID\n */\n oldOwnerId?: string;\n /**\n * A new owner id (user that accepts meta site).\n * @format GUID\n */\n newOwnerId?: string;\n}\n\n/** Soft deletion of the meta site. Could be restored. */\nexport interface SiteDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface DeleteContext {\n /** When the meta site was deleted. */\n dateDeleted?: Date | null;\n /** A status. */\n deleteStatus?: DeleteStatusWithLiterals;\n /**\n * A reason (flow).\n * @maxLength 255\n */\n deleteOrigin?: string;\n /**\n * A service that deleted it.\n * @maxLength 255\n */\n initiatorId?: string | null;\n}\n\nexport enum DeleteStatus {\n UNKNOWN = 'UNKNOWN',\n TRASH = 'TRASH',\n DELETED = 'DELETED',\n PENDING_PURGE = 'PENDING_PURGE',\n PURGED_EXTERNALLY = 'PURGED_EXTERNALLY',\n}\n\n/** @enumType */\nexport type DeleteStatusWithLiterals =\n | DeleteStatus\n | 'UNKNOWN'\n | 'TRASH'\n | 'DELETED'\n | 'PENDING_PURGE'\n | 'PURGED_EXTERNALLY';\n\n/** Restoration of the meta site. */\nexport interface SiteUndeleted {}\n\n/** First publish of a meta site. Or subsequent publish after unpublish. */\nexport interface SitePublished {}\n\nexport interface SiteUnpublished {\n /**\n * A list of URLs previously associated with the meta site.\n * @maxLength 4000\n * @maxSize 10000\n */\n urls?: string[];\n}\n\nexport interface SiteMarkedAsTemplate {}\n\nexport interface SiteMarkedAsWixSite {}\n\n/**\n * Represents a service provisioned a site.\n *\n * Note on `origin_instance_id`:\n * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.\n * This is because of the following scenario:\n *\n * Imagine you have a template where a third-party application (TPA) includes some stub data,\n * such as a product catalog. When you create a site from this template, you inherit this\n * default product catalog. However, if the template's product catalog is modified,\n * your site will retain the catalog as it was at the time of site creation. This ensures that\n * your site remains consistent with what you initially received and does not include any\n * changes made to the original template afterward.\n * To ensure this, the TPA on the template gets a new instance_id.\n */\nexport interface ServiceProvisioned {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * An instance id from which this instance is originated.\n * @maxLength 36\n */\n originInstanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n /**\n * The origin meta site id\n * @format GUID\n */\n originMetaSiteId?: string | null;\n}\n\nexport interface ServiceRemoved {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n}\n\n/** Rename of the site. Meaning, free public url has been changed as well. */\nexport interface SiteRenamed {\n /**\n * A new meta site name (URL slug).\n * @maxLength 20\n */\n newSiteName?: string;\n /**\n * A previous meta site name (URL slug).\n * @maxLength 255\n */\n oldSiteName?: string;\n}\n\n/**\n * Hard deletion of the meta site.\n *\n * Could not be restored. Therefore it's desirable to cleanup data.\n */\nexport interface SiteHardDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface NamespaceChanged {\n /** A previous namespace. */\n oldNamespace?: NamespaceWithLiterals;\n /** A new namespace. */\n newNamespace?: NamespaceWithLiterals;\n}\n\n/** Assigned Studio editor */\nexport interface StudioAssigned {}\n\n/** Unassigned Studio editor */\nexport interface StudioUnassigned {}\n\n/**\n * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.\n *\n * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up\n * with sites and its urls, you need to listen to another topic/event. Read about it:\n *\n * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service\n */\nexport interface SiteUrlChanged {}\n\n/**\n * Used at the end of the deletion flow for both draft sites and when a user deletes a site.\n * Consumed by other teams to remove relevant data.\n */\nexport interface SitePurgedExternally {\n /**\n * @maxLength 2048\n * @maxSize 100\n * @deprecated\n * @targetRemovalDate 2025-04-15\n */\n appDefId?: string[];\n}\n\n/** Assigned Odeditor */\nexport interface OdeditorAssigned {}\n\n/** Unassigned Odeditor */\nexport interface OdeditorUnassigned {}\n\n/** Assigned Picasso editor */\nexport interface PicassoAssigned {}\n\n/** Unassigned Picasso */\nexport interface PicassoUnassigned {}\n\n/** Assigned Wixel */\nexport interface WixelAssigned {}\n\n/** Unassigned Wixel */\nexport interface WixelUnassigned {}\n\n/** Assigned StudioTwo */\nexport interface StudioTwoAssigned {}\n\n/** Unassigned StudioTwo */\nexport interface StudioTwoUnassigned {}\n\nexport interface CreateDraftAutomationRequest {\n /** Draft automation to create. */\n automation?: Automation;\n}\n\nexport interface CreateDraftAutomationResponse {\n /** Draft automation that was created. */\n automation?: Automation;\n}\n\nexport interface GetOrCreateDraftAutomationRequest {\n /**\n * ID of the original automation on which the draft is based.\n * @format GUID\n */\n originalAutomationId: string;\n}\n\nexport interface GetOrCreateDraftAutomationResponse {\n /** Draft automation. */\n automation?: Automation;\n}\n\nexport interface UpdateDraftAutomationRequest {\n /** Automation to update. Updates can be partial. */\n automation: Automation;\n}\n\nexport interface UpdateDraftAutomationResponse {\n /** Updated draft automation. */\n automation?: Automation;\n}\n\nexport interface QueryAutomationsWithDraftsRequest {\n /**\n * Query.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n}\n\nexport interface QueryAutomationsWithDraftsResponse {\n /** Retrieved automations. */\n automations?: Automation[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /**\n * Map of existing automation IDs and their drafts' automation IDs.\n * When include_draft_data is set to `false`, the map is empty. The key is the automationId of the original automation, and the value a list of related draft automationIds.\n */\n originalAutomationIdToDrafts?: Record<string, DraftsInfo>;\n}\n\nexport interface DraftsInfo {\n /**\n * IDs of the draft automations.\n * @maxSize 1\n * @format GUID\n */\n draftAutomationIds?: string[];\n}\n\nexport interface BulkCountAutomationsWithDraftsRequest {\n /**\n * Array of filters in the following format:\n *\n * `\"filter\" :\n * [{\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }, {\n * \"fieldName3\": \"value3\",\n * \"fieldName4\":{\"$operator\":\"value4\"}\n * }]`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n * @maxSize 3\n * @deprecated Array of filters in the following format:\n *\n * `\"filter\" :\n * [{\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }, {\n * \"fieldName3\": \"value3\",\n * \"fieldName4\":{\"$operator\":\"value4\"}\n * }]`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n * @replacedBy requests\n * @targetRemovalDate 2025-09-01\n */\n filters?: Record<string, any>[] | null;\n}\n\nexport interface BulkCountAutomationsWithDraftsResponse {\n /** Total automations count */\n counts?: number[];\n}\n\nexport interface DeleteDraftAutomationRequest {\n /**\n * ID of the draft automation to delete.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface DeleteDraftAutomationResponse {}\n\nexport interface PublishDraftAutomationRequest {\n /**\n * ID of the draft automation to publish.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface PublishDraftAutomationResponse {\n /** Updated published automation. */\n automation?: Automation;\n}\n\nexport interface ValidateAutomationRequest {\n /** Automation to validate. */\n automation: Automation;\n /** Automation validation settings. */\n validationSettings?: ValidationSettings;\n}\n\nexport interface ValidationSettings {\n /**\n * IDs of actions to validate. Only actions whose IDs are specified are validated.\n *\n * When action IDs are specified, triggers are not validated. When empty, the full automation is validated, including triggers.\n * @maxSize 30\n * @format GUID\n */\n actionIds?: string[];\n /**\n * Whether to skip provider validations.\n *\n * Default: `false`.\n */\n skipProviderValidations?: boolean;\n}\n\nexport interface ValidateAutomationResponse {\n /** Automation validation status. */\n status?: ValidationResultStatusWithLiterals;\n /**\n * Validation errors related to the automation's trigger configuration.\n * @maxSize 100\n */\n triggerValidationErrors?: TriggerValidationError[];\n /**\n * Validation errors related to the automation's actions configuration.\n * @maxSize 100\n */\n actionValidationErrors?: ActionValidationError[];\n}\n\nexport enum ValidationResultStatus {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Automation is valid - no validation errors found. */\n VALID = 'VALID',\n /** Automation is partially valid - validation errors with Warning severity were found - might affect automation execution */\n VALID_WITH_WARNINGS = 'VALID_WITH_WARNINGS',\n /** Automation is not valid, validation errors with Critical severity were found - prevents proper automation/action execution and should be fixed. */\n INVALID = 'INVALID',\n}\n\n/** @enumType */\nexport type ValidationResultStatusWithLiterals =\n | ValidationResultStatus\n | 'UNKNOWN_STATUS'\n | 'VALID'\n | 'VALID_WITH_WARNINGS'\n | 'INVALID';\n\nexport interface TriggerValidationError\n extends TriggerValidationErrorErrorOneOf {\n /** Automation's Trigger configuration error. */\n configurationError?: TriggerConfigurationError;\n /** Trigger Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n /** Validation error type. */\n errorType?: TriggerValidationErrorValidationErrorTypeWithLiterals;\n /** Validation error severity */\n errorSeverity?: SeverityWithLiterals;\n}\n\n/** @oneof */\nexport interface TriggerValidationErrorErrorOneOf {\n /** Automation's Trigger configuration error. */\n configurationError?: TriggerConfigurationError;\n /** Trigger Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n}\n\nexport enum TriggerValidationErrorValidationErrorType {\n UNKNOWN_VALIDATION_ERROR_TYPE = 'UNKNOWN_VALIDATION_ERROR_TYPE',\n /** Automation's Trigger Configuration error. */\n CONFIGURATION_ERROR = 'CONFIGURATION_ERROR',\n /** Trigger Provider related error. */\n PROVIDER_ERROR = 'PROVIDER_ERROR',\n}\n\n/** @enumType */\nexport type TriggerValidationErrorValidationErrorTypeWithLiterals =\n | TriggerValidationErrorValidationErrorType\n | 'UNKNOWN_VALIDATION_ERROR_TYPE'\n | 'CONFIGURATION_ERROR'\n | 'PROVIDER_ERROR';\n\nexport interface TriggerConfigurationError {\n /** Trigger error type. */\n errorType?: TriggerErrorTypeWithLiterals;\n}\n\nexport enum TriggerErrorType {\n UNKNOWN_TRIGGER_ERROR_TYPE = 'UNKNOWN_TRIGGER_ERROR_TYPE',\n /** Configured trigger was not found. */\n NOT_FOUND = 'NOT_FOUND',\n /** App not installed. */\n APP_NOT_INSTALLED = 'APP_NOT_INSTALLED',\n /** Invalid trigger key. */\n INVALID_TRIGGER_KEY = 'INVALID_TRIGGER_KEY',\n /** Invalid filter field key. */\n INVALID_FILTER_FIELD_KEY = 'INVALID_FILTER_FIELD_KEY',\n /** Invalid filter expression. */\n INVALID_FILTER_EXPRESSION = 'INVALID_FILTER_EXPRESSION',\n /** Missing configuration for a required trigger filter */\n MISSING_REQUIRED_FILTER = 'MISSING_REQUIRED_FILTER',\n}\n\n/** @enumType */\nexport type TriggerErrorTypeWithLiterals =\n | TriggerErrorType\n | 'UNKNOWN_TRIGGER_ERROR_TYPE'\n | 'NOT_FOUND'\n | 'APP_NOT_INSTALLED'\n | 'INVALID_TRIGGER_KEY'\n | 'INVALID_FILTER_FIELD_KEY'\n | 'INVALID_FILTER_EXPRESSION'\n | 'MISSING_REQUIRED_FILTER';\n\nexport interface ProviderConfigurationError {\n /** Key corresponding to the field in the schema. */\n fieldKey?: string | null;\n /** Error message. */\n message?: string;\n /** Label for a call-to-action button that's displayed with the error. Translated according to the SPI language context. */\n ctaLabel?: string | null;\n /** URL to redirect to when the call-to-action button is clicked. */\n ctaUrl?: string | null;\n /** Title for the error. */\n title?: string;\n}\n\nexport enum ValidationErrorSeverity {\n UNKNOWN_VALIDATION_ERROR_SEVERITY = 'UNKNOWN_VALIDATION_ERROR_SEVERITY',\n /** Warning. */\n WARNING = 'WARNING',\n /** Error. */\n ERROR = 'ERROR',\n}\n\n/** @enumType */\nexport type ValidationErrorSeverityWithLiterals =\n | ValidationErrorSeverity\n | 'UNKNOWN_VALIDATION_ERROR_SEVERITY'\n | 'WARNING'\n | 'ERROR';\n\nexport enum Severity {\n UNKNOWN_SEVERITY = 'UNKNOWN_SEVERITY',\n /** Low severity error - may affect automation execution. */\n WARNING = 'WARNING',\n /** Critical severity error - prevents proper automation execution and should be fixed. */\n CRITICAL = 'CRITICAL',\n}\n\n/** @enumType */\nexport type SeverityWithLiterals =\n | Severity\n | 'UNKNOWN_SEVERITY'\n | 'WARNING'\n | 'CRITICAL';\n\nexport interface ActionValidationInfo {\n /**\n * Action ID.\n * @format GUID\n */\n actionId?: string | null;\n /**\n * ID of the app that defined the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Human-readable action identifier.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /**\n * Action validation errors.\n * @maxSize 100\n */\n validationErrors?: ActionValidationError[];\n}\n\nexport interface ActionValidationError extends ActionValidationErrorErrorOneOf {\n /** Action configuration error. */\n configurationError?: ActionConfigurationError;\n /** Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n /**\n * Action Identifier in the Automation.\n * @format GUID\n */\n actionId?: string;\n /**\n * ID of the app that defined the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Human-readable action identifier.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /** Validation error type. */\n errorType?: ValidationErrorTypeWithLiterals;\n /** Validation error severity */\n errorSeverity?: SeverityWithLiterals;\n}\n\n/** @oneof */\nexport interface ActionValidationErrorErrorOneOf {\n /** Action configuration error. */\n configurationError?: ActionConfigurationError;\n /** Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n}\n\nexport enum ValidationErrorType {\n UNKNOWN_VALIDATION_ERROR_TYPE = 'UNKNOWN_VALIDATION_ERROR_TYPE',\n /** Configuration error. */\n CONFIGURATION_ERROR = 'CONFIGURATION_ERROR',\n /** Provider error. */\n PROVIDER_ERROR = 'PROVIDER_ERROR',\n}\n\n/** @enumType */\nexport type ValidationErrorTypeWithLiterals =\n | ValidationErrorType\n | 'UNKNOWN_VALIDATION_ERROR_TYPE'\n | 'CONFIGURATION_ERROR'\n | 'PROVIDER_ERROR';\n\nexport interface ActionConfigurationError {\n /** Action error type. */\n errorType?: ActionErrorTypeWithLiterals;\n}\n\nexport enum ActionErrorType {\n UNKNOWN_ACTION_ERROR_TYPE = 'UNKNOWN_ACTION_ERROR_TYPE',\n /** Configured action was not found. */\n NOT_FOUND = 'NOT_FOUND',\n /** App not installed. */\n APP_NOT_INSTALLED = 'APP_NOT_INSTALLED',\n /** Invalid action key. */\n INVALID_ACTION_KEY = 'INVALID_ACTION_KEY',\n /** Invalid mapping */\n INVALID_MAPPING = 'INVALID_MAPPING',\n /** Mapping type mismatch. */\n MAPPING_TYPE_MISMATCH = 'MAPPING_TYPE_MISMATCH',\n /** Mapping missing required field. */\n MAPPING_MISSING_REQUIRED_FIELD = 'MAPPING_MISSING_REQUIRED_FIELD',\n /** Mapping schema mismatch. */\n MAPPING_SCHEMA_MISMATCH = 'MAPPING_SCHEMA_MISMATCH',\n /** Mapping variable missing from schema. */\n MAPPING_VARIABLE_MISSING_FROM_SCHEMA = 'MAPPING_VARIABLE_MISSING_FROM_SCHEMA',\n /** Configured post action not found. */\n POST_ACTION_NOT_FOUND = 'POST_ACTION_NOT_FOUND',\n}\n\n/** @enumType */\nexport type ActionErrorTypeWithLiterals =\n | ActionErrorType\n | 'UNKNOWN_ACTION_ERROR_TYPE'\n | 'NOT_FOUND'\n | 'APP_NOT_INSTALLED'\n | 'INVALID_ACTION_KEY'\n | 'INVALID_MAPPING'\n | 'MAPPING_TYPE_MISMATCH'\n | 'MAPPING_MISSING_REQUIRED_FIELD'\n | 'MAPPING_SCHEMA_MISMATCH'\n | 'MAPPING_VARIABLE_MISSING_FROM_SCHEMA'\n | 'POST_ACTION_NOT_FOUND';\n\nexport interface AutomationValidationError\n extends AutomationValidationErrorErrorOneOf {\n /** Automation configuration error. */\n configurationError?: AutomationConfigurationError;\n /** Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n /** Validation error type. */\n errorType?: AutomationValidationErrorValidationErrorTypeWithLiterals;\n /** Validation error severity */\n errorSeverity?: SeverityWithLiterals;\n}\n\n/** @oneof */\nexport interface AutomationValidationErrorErrorOneOf {\n /** Automation configuration error. */\n configurationError?: AutomationConfigurationError;\n /** Provider configuration error. */\n providerConfigurationError?: ProviderConfigurationError;\n}\n\nexport enum AutomationValidationErrorValidationErrorType {\n UNKNOWN_VALIDATION_ERROR_TYPE = 'UNKNOWN_VALIDATION_ERROR_TYPE',\n CONFIGURATION_ERROR = 'CONFIGURATION_ERROR',\n PROVIDER_ERROR = 'PROVIDER_ERROR',\n}\n\n/** @enumType */\nexport type AutomationValidationErrorValidationErrorTypeWithLiterals =\n | AutomationValidationErrorValidationErrorType\n | 'UNKNOWN_VALIDATION_ERROR_TYPE'\n | 'CONFIGURATION_ERROR'\n | 'PROVIDER_ERROR';\n\nexport interface AutomationConfigurationError {\n /** Automation error type. */\n errorType?: AutomationErrorTypeWithLiterals;\n}\n\nexport enum AutomationErrorType {\n UNKNOWN_AUTOMATION_ERROR_TYPE = 'UNKNOWN_AUTOMATION_ERROR_TYPE',\n}\n\n/** @enumType */\nexport type AutomationErrorTypeWithLiterals =\n | AutomationErrorType\n | 'UNKNOWN_AUTOMATION_ERROR_TYPE';\n\nexport interface ValidateAutomationByIdRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId: string;\n /** Validation settings. */\n validationSettings?: ValidationSettings;\n}\n\nexport interface ValidateAutomationByIdResponse {\n /** Automation validation status. */\n status?: ValidationResultStatusWithLiterals;\n /**\n * Validation errors related to the automation's trigger configuration.\n * @maxSize 100\n */\n triggerValidationErrors?: TriggerValidationError[];\n /**\n * Validation errors related to the automation's actions configuration.\n * @maxSize 100\n */\n actionValidationErrors?: ActionValidationError[];\n}\n\nexport interface GetAutomationActionSchemaRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId?: string;\n /**\n * Action ID.\n * @format GUID\n */\n actionId?: string;\n}\n\nexport interface GetAutomationActionSchemaResponse {\n /** The accumulated payload schema for an action. */\n schema?: Record<string, any> | null;\n}\n\nexport interface GetActionsQuotaInfoRequest {}\n\nexport interface GetActionsQuotaInfoResponse {\n /** Action quotas. */\n actionProviderQuotaInfo?: ActionProviderQuotaInfo[];\n}\n\nexport interface ActionProviderQuotaInfo {\n /**\n * ID of the app that defined the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 80\n */\n actionKey?: string;\n /** Action quota information. */\n actionQuotaInfo?: ActionQuotaInfo;\n}\n\nexport interface ActionQuotaInfo {\n /**\n * Whether the quotas for your action are enforced. If you mark this as `true` in the response body,\n * Wix displays the information in the quota object on the site dashboard. If you mark this as `false` for\n * a user, Wix does not display any quota info on the site dashboard for your service.\n */\n enforced?: boolean;\n /**\n * The plans your service provides, together with the quotas enforced by each plan. A site may be enrolled\n * in multiple plans. Plans and quotas can be related as follows:\n *\n * + A single plan has a single quota.\n * + A single plan has multiple quotas.\n * + Multiple plans are associated with multiple quotas.\n *\n * Plans and quotas that are related should be grouped together in a single `quotaInfo`\n * object.\n */\n quotaInfo?: QuotaInfo[];\n}\n\nexport interface QuotaInfo {\n /** List of plans associated with the site making the request. */\n plans?: Plan[];\n /**\n * List of quotas associated with the plans the site is enrolled in.\n * @minSize 1\n */\n quotas?: Quota[];\n /**\n * Details for an upgrade call-to-action button.\n * Displayed in the Wix user’s site dashboard together with the quota details.\n */\n upgradeCta?: UpgradeCTA;\n}\n\nexport interface Plan {\n /** Plan ID defined by the action provider. */\n _id?: string;\n /** Plan name to display in the Wix user’s site dashboard. */\n name?: string;\n}\n\nexport interface Quota {\n /**\n * Name of the feature the quota is related to. For example, \"Messages sent\".\n * @minLength 1\n */\n featureName?: string;\n /**\n * Quota renewal date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.\n * For example, 10 July 2020 at 15:00 is written as `2020-07-10 15:00:00.000`.\n */\n renewalDate?: Date | null;\n /** The user's current quota usage. */\n currentUsage?: string;\n /** Quota limit data. */\n limit?: string | null;\n /** Additional information about the quota. Displayed as a tooltip in the Wix user’s dashboard. */\n additionalInfo?: AdditionalInfo;\n}\n\nexport interface CTA {\n /**\n * Call-to-action redirect URL.\n * @minLength 1\n */\n url?: string;\n /**\n * Call-to-action label.\n * @minLength 1\n */\n label?: string;\n}\n\nexport interface AdditionalInfo {\n /**\n * Tooltip content.\n * @minLength 1\n */\n description?: string;\n /** Details for an options call-to-action link that appears in the tooltip. */\n cta?: CTA;\n}\n\nexport interface UpgradeCTA {\n /**\n * CTA button redirect URL.\n * @minLength 1\n */\n url?: string;\n /**\n * CTA button label.\n * @minLength 1\n */\n label?: string;\n}\n\nexport interface MigrateVeloActionAutomationsRequest {\n /** @format GUID */\n oldAppId?: string;\n /** @format GUID */\n newAppId?: string;\n /** @format GUID */\n newComponentId?: string;\n}\n\nexport interface MigrateVeloActionAutomationsResponse {}\n\nexport interface MergeOverridePreinstalledWithRuntimeVersionRequest {\n /**\n * ID of the override preinstalled automation to merge.\n * @format GUID\n */\n automationId?: string;\n}\n\nexport interface MergeOverridePreinstalledWithRuntimeVersionResponse {\n /** The merged automation after applying the latest runtime version of the preinstalled automation. */\n automation?: Automation;\n}\n\nexport interface GetAutomationRevisionRequest {\n /**\n * Automation ID.\n * @format GUID\n */\n automationId: string;\n /** Revision number. */\n revision?: string | null;\n /**\n * Requested fields.\n * @maxSize 20\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface GetAutomationRevisionResponse {\n /** Automation revision. */\n automation?: Automation;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface AutomationCreatedEnvelope {\n entity: Automation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a new automation is created.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @webhook\n * @eventType wix.automations.v2.automation_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onAutomationCreated(\n handler: (event: AutomationCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface AutomationDeletedEnvelope {\n entity: Automation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an automation is deleted.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @webhook\n * @eventType wix.automations.v2.automation_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onAutomationDeleted(\n handler: (event: AutomationDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface AutomationUpdatedEnvelope {\n entity: Automation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an automation is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @webhook\n * @eventType wix.automations.v2.automation_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onAutomationUpdated(\n handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates an automation.\n * @param automation - Automation to create.\n * @public\n * @documentationMaturity preview\n * @requiredField automation\n * @requiredField automation.configuration\n * @requiredField automation.configuration.actions\n * @requiredField automation.configuration.rootActionIds\n * @requiredField automation.configuration.status\n * @requiredField automation.configuration.trigger\n * @requiredField automation.configuration.trigger.appId\n * @requiredField automation.configuration.trigger.triggerKey\n * @requiredField automation.name\n * @requiredField automation.origin\n * @permissionId AUTOMATIONS.AUTOMATION_CREATE\n * @applicableIdentity APP\n * @returns Details of the created automation.\n * @fqn wix.automations.v2.AutomationsService.CreateAutomation\n */\nexport async function createAutomation(\n automation: NonNullablePaths<\n Automation,\n | `configuration`\n | `configuration.actions`\n | `configuration.rootActionIds`\n | `configuration.status`\n | `configuration.trigger`\n | `configuration.trigger.appId`\n | `configuration.trigger.triggerKey`\n | `name`\n | `origin`,\n 4\n >\n): Promise<\n NonNullablePaths<\n Automation,\n | `applicationInfo.appId`\n | `preinstalledInfo.appId`\n | `createdBy.userId`\n | `createdBy.appId`\n | `name`\n | `configuration.status`\n | `configuration.trigger.appId`\n | `configuration.trigger.triggerKey`\n | `configuration.trigger.filters`\n | `configuration.trigger.filters.${number}._id`\n | `configuration.trigger.filters.${number}.fieldKey`\n | `configuration.trigger.filters.${number}.filterExpression`\n | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `configuration.trigger.rateLimit.maxActivationsExpression`\n | `configuration.trigger.rateLimit.durationTimeUnit`\n | `configuration.rootActionIds`\n | `origin`\n | `settings.hidden`\n | `settings.readonly`\n | `settings.disableDelete`\n | `settings.disableStatusChange`\n | `settings.actionSettings.permanentActionIds`\n | `settings.actionSettings.readonlyActionIds`\n | `archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: automation,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.createAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automation: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automation']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves an automation by ID.\n * @param automationId - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @applicableIdentity APP\n * @returns Retrieved automation.\n * @fqn wix.automations.v2.AutomationsService.GetAutomation\n */\nexport async function getAutomation(\n automationId: string\n): Promise<\n NonNullablePaths<\n Automation,\n | `applicationInfo.appId`\n | `preinstalledInfo.appId`\n | `createdBy.userId`\n | `createdBy.appId`\n | `name`\n | `configuration.status`\n | `configuration.trigger.appId`\n | `configuration.trigger.triggerKey`\n | `configuration.trigger.filters`\n | `configuration.trigger.filters.${number}._id`\n | `configuration.trigger.filters.${number}.fieldKey`\n | `configuration.trigger.filters.${number}.filterExpression`\n | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `configuration.trigger.rateLimit.maxActivationsExpression`\n | `configuration.trigger.rateLimit.durationTimeUnit`\n | `configuration.rootActionIds`\n | `origin`\n | `settings.hidden`\n | `settings.readonly`\n | `settings.disableDelete`\n | `settings.disableStatusChange`\n | `settings.actionSettings.permanentActionIds`\n | `settings.actionSettings.readonlyActionIds`\n | `archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n });\n\n const reqOpts = ambassadorWixAutomationsV2Automation.getAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the specified automation.\n *\n * When an automation is updated, its `revision` property is incremented by 1. When updating an automation, you must specify the current revision number.\n * @param _id - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField automation\n * @requiredField automation.revision\n * @permissionId AUTOMATIONS.AUTOMATION_UPDATE\n * @applicableIdentity APP\n * @returns Updated automation.\n * @fqn wix.automations.v2.AutomationsService.UpdateAutomation\n */\nexport async function updateAutomation(\n _id: string,\n automation: NonNullablePaths<UpdateAutomation, `revision`, 2>\n): Promise<\n NonNullablePaths<\n Automation,\n | `applicationInfo.appId`\n | `preinstalledInfo.appId`\n | `createdBy.userId`\n | `createdBy.appId`\n | `name`\n | `configuration.status`\n | `configuration.trigger.appId`\n | `configuration.trigger.triggerKey`\n | `configuration.trigger.filters`\n | `configuration.trigger.filters.${number}._id`\n | `configuration.trigger.filters.${number}.fieldKey`\n | `configuration.trigger.filters.${number}.filterExpression`\n | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `configuration.trigger.rateLimit.maxActivationsExpression`\n | `configuration.trigger.rateLimit.durationTimeUnit`\n | `configuration.rootActionIds`\n | `origin`\n | `settings.hidden`\n | `settings.readonly`\n | `settings.disableDelete`\n | `settings.disableStatusChange`\n | `settings.actionSettings.permanentActionIds`\n | `settings.actionSettings.readonlyActionIds`\n | `archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: { ...automation, id: _id },\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.updateAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { automation: '$[1]' },\n explicitPathsToArguments: { 'automation.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'automation']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateAutomation {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n /**\n * Automation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Who created the automation.\n * @immutable\n * @readonly\n */\n createdBy?: AuditInfo;\n /**\n * When the automation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Who last updated the automation.\n * @readonly\n */\n updatedBy?: AuditInfo;\n /**\n * When the automation was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Automation name as displayed on the user's site.\n * @minLength 1\n * @maxLength 500\n */\n name?: string;\n /**\n * Automation description.\n * @maxLength 2000\n */\n description?: string | null;\n /** Automation configuration. */\n configuration?: AutomationConfiguration;\n /**\n * How the automation was added to the user's site.\n * @immutable\n */\n origin?: OriginWithLiterals;\n /** Automation settings. */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/**\n * Deletes the specified automation.\n * @param automationId - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_DELETE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.DeleteAutomation\n */\nexport async function deleteAutomation(automationId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.deleteAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes one or more automations.\n * @param automationIds - IDs of the automations to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField automationIds\n * @permissionId AUTOMATIONS.AUTOMATION_DELETE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.BulkDeleteAutomations\n */\nexport async function bulkDeleteAutomations(\n automationIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteAutomationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationIds: automationIds,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.bulkDeleteAutomations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Generates a preinstalled automation from another automation.\n *\n * Calls the action providers for changes needed to make a preinstalled automation, such as changes made to email template.\n *\n * > **Note**: You must have an account permission to edit an app.\n * @param automation - Automation.\n * @public\n * @documentationMaturity preview\n * @requiredField automation\n * @fqn wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation\n */\nexport async function generatePreinstalledAutomation(\n automation: Automation,\n options?: GeneratePreinstalledAutomationOptions\n): Promise<\n NonNullablePaths<\n GeneratePreinstalledAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: automation,\n appId: options?.appId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.generatePreinstalledAutomation(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automation: '$[0]', appId: '$[1].appId' },\n singleArgumentUnchanged: false,\n },\n ['automation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GeneratePreinstalledAutomationOptions {\n /**\n * ID of the app to which the automation belongs.\n * @format GUID\n */\n appId?: string;\n}\n\n/**\n * Retrieves a list of automations. This includes both automations overridden on a site and preinstalled automations. If a preinstalled automation has been overridden on the site, the method returns the override automation.\n *\n * > **Note**: The method only returns automations by apps installed on the site.\n *\n * Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.QueryAutomations\n */\nexport function queryAutomations(\n options?: QueryAutomationsOptions\n): AutomationsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Automation,\n 'CURSOR',\n QueryAutomationsRequest,\n QueryAutomationsResponse\n >({\n func: async (payload: QueryAutomationsRequest) => {\n const reqOpts = ambassadorWixAutomationsV2Automation.queryAutomations({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryAutomationsRequest['query']) => {\n const args = [query, options] as [\n QueryAutomationsRequest['query'],\n QueryAutomationsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryAutomationsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.automations,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\nexport interface QueryAutomationsOptions {}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface AutomationsQueryResult extends QueryCursorResult {\n items: Automation[];\n query: AutomationsQueryBuilder;\n next: () => Promise<AutomationsQueryResult>;\n prev: () => Promise<AutomationsQueryResult>;\n}\n\nexport interface AutomationsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: any\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey',\n value: string\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: any[]\n ) => AutomationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasAll: (\n propertyName:\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds',\n value: any[]\n ) => AutomationsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: any\n ) => AutomationsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived',\n value: boolean\n ) => AutomationsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filters'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived'\n >\n ) => AutomationsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | 'createdBy.appId'\n | 'name'\n | 'configuration.status'\n | 'configuration.trigger.appId'\n | 'configuration.trigger.triggerKey'\n | 'configuration.trigger.filters'\n | 'configuration.trigger.filterValueSelection.selectedFilterValues'\n | 'origin'\n | 'settings'\n | 'settings.readonly'\n | 'settings.disableDelete'\n | 'settings.disableStatusChange'\n | 'settings.actionSettings'\n | 'settings.actionSettings.permanentActionIds'\n | 'settings.actionSettings.readonlyActionIds'\n | 'archived'\n >\n ) => AutomationsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => AutomationsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => AutomationsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<AutomationsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.automations.v2.AutomationsService.QueryAutomations\n * @requiredField query\n */\nexport async function typedQueryAutomations(\n query: CursorQuery,\n options?: QueryAutomationsOptions\n): Promise<\n NonNullablePaths<\n QueryAutomationsResponse,\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n ...options,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.queryAutomations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Get aggregated info\n * @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.GetAggregatedUsageInfo\n */\nexport async function getAggregatedUsageInfo(\n options?: GetAggregatedUsageInfoOptions\n): Promise<\n NonNullablePaths<\n GetAggregatedUsageInfoResponse,\n | `triggersUsageSummary`\n | `triggersUsageSummary.${number}.appId`\n | `triggersUsageSummary.${number}.triggerKey`\n | `triggersUsageSummary.${number}.automationsCount`\n | `actionsUsageSummary`\n | `actionsUsageSummary.${number}.appId`\n | `actionsUsageSummary.${number}.actionKey`\n | `actionsUsageSummary.${number}.automationsCount`\n | `createdByAppIdUsageSummary`\n | `createdByAppIdUsageSummary.${number}.appId`\n | `createdByAppIdUsageSummary.${number}.automationsCount`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.getAggregatedUsageInfo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetAggregatedUsageInfoOptions {\n /**\n * Filter in the following format:\n *\n * `\"filter\" :\n * {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Creates a copy of an action with a new ID, and changes the action's input mapping if necessary.\n *\n * The action copy isn't saved automatically. To save it, the user must perform an action\n * such as clicking the **Save** button.\n * @param automationId - ID of the automation to copy.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_COPY\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.CopyAutomation\n */\nexport async function copyAutomation(\n automationId: string,\n options?: CopyAutomationOptions\n): Promise<\n NonNullablePaths<\n CopyAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n origin: options?.origin,\n automation: options?.automation,\n });\n\n const reqOpts = ambassadorWixAutomationsV2Automation.copyAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n automationId: '$[0]',\n origin: '$[1].origin',\n automation: '$[1].automation',\n },\n singleArgumentUnchanged: false,\n },\n ['automationId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CopyAutomationOptions {\n /** Origin of the automation to copy. */\n origin?: OriginWithLiterals;\n /** Automation to copy. Skips fetching by ID. */\n automation?: Automation;\n}\n\n/**\n * Creates a draft automation.\n * @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.CreateDraftAutomation\n */\nexport async function createDraftAutomation(\n options?: CreateDraftAutomationOptions\n): Promise<\n NonNullablePaths<\n CreateDraftAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: options?.automation,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.createDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automation: '$[0].automation' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateDraftAutomationOptions {\n /** Draft automation to create. */\n automation?: Automation;\n}\n\n/**\n * Retrieves the draft of the specified automation. If a draft doesn't exist, the method creates one.\n *\n * > **Note**: If the specified automation is a draft, the method returns it.\n * @param originalAutomationId - ID of the original automation on which the draft is based.\n * @public\n * @documentationMaturity preview\n * @requiredField originalAutomationId\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation\n */\nexport async function getOrCreateDraftAutomation(\n originalAutomationId: string\n): Promise<\n NonNullablePaths<\n GetOrCreateDraftAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n originalAutomationId: originalAutomationId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.getOrCreateDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { originalAutomationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['originalAutomationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a draft automation.\n * @param _id - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField automation\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.UpdateDraftAutomation\n */\nexport async function updateDraftAutomation(\n _id: string,\n automation: UpdateDraftAutomation\n): Promise<\n NonNullablePaths<\n UpdateDraftAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: { ...automation, id: _id },\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.updateDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { automation: '$[1]' },\n explicitPathsToArguments: { 'automation.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'automation']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateDraftAutomation {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n /**\n * Automation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.\n * @readonly\n */\n revision?: string | null;\n /**\n * Who created the automation.\n * @immutable\n * @readonly\n */\n createdBy?: AuditInfo;\n /**\n * When the automation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Who last updated the automation.\n * @readonly\n */\n updatedBy?: AuditInfo;\n /**\n * When the automation was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Automation name as displayed on the user's site.\n * @minLength 1\n * @maxLength 500\n */\n name?: string;\n /**\n * Automation description.\n * @maxLength 2000\n */\n description?: string | null;\n /** Automation configuration. */\n configuration?: AutomationConfiguration;\n /**\n * How the automation was added to the user's site.\n * @immutable\n */\n origin?: OriginWithLiterals;\n /** Automation settings. */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/**\n * Retrieves a list of automations, including drafts. Max query filter depth is 3.\n *\n * Relevant automations for the query are returned. This includes automations created on the site and pre-installed automations.\n * If there's an existing override for a pre-installed automation, the override is returned in the query result.\n * The query only returns automations from apps that are installed on the site.\n *\n * - new drafts that are not related to existing automations will be returned in the list\n * - the response will contain a map of originalAutomationId => relatedDrafts\n *\n * To learn about working with _Query_ endpoints, see\n * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),\n * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),\n * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).\n * @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts\n */\nexport async function queryAutomationsWithDrafts(\n options?: QueryAutomationsWithDraftsOptions\n): Promise<\n NonNullablePaths<\n QueryAutomationsWithDraftsResponse,\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: options?.query,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.queryAutomationsWithDrafts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QueryAutomationsWithDraftsOptions {\n /**\n * Query.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n}\n\n/** @public\n * @documentationMaturity preview\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.BulkCountAutomationsWithDrafts\n */\nexport async function bulkCountAutomationsWithDrafts(\n options?: BulkCountAutomationsWithDraftsOptions\n): Promise<\n NonNullablePaths<BulkCountAutomationsWithDraftsResponse, `counts`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filters: options?.filters,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.bulkCountAutomationsWithDrafts(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filters: '$[0].filters' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCountAutomationsWithDraftsOptions {\n /**\n * Array of filters in the following format:\n *\n * `\"filter\" :\n * [{\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }, {\n * \"fieldName3\": \"value3\",\n * \"fieldName4\":{\"$operator\":\"value4\"}\n * }]`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n * @maxSize 3\n * @deprecated Array of filters in the following format:\n *\n * `\"filter\" :\n * [{\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }, {\n * \"fieldName3\": \"value3\",\n * \"fieldName4\":{\"$operator\":\"value4\"}\n * }]`\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n * @replacedBy requests\n * @targetRemovalDate 2025-09-01\n */\n filters?: Record<string, any>[] | null;\n}\n\n/**\n * Deletes a draft automation.\n * @param automationId - ID of the draft automation to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_DELETE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.DeleteDraftAutomation\n */\nexport async function deleteDraftAutomation(\n automationId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.deleteDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Publishes a draft automation. This applies any changes to the live automation.\n * @param automationId - ID of the draft automation to publish.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_UPDATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.PublishDraftAutomation\n */\nexport async function publishDraftAutomation(\n automationId: string\n): Promise<\n NonNullablePaths<\n PublishDraftAutomationResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.publishDraftAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { automationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['automationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Validates the specified automation.\n * @param automation - Automation to validate.\n * @public\n * @documentationMaturity preview\n * @requiredField automation\n * @permissionId AUTOMATIONS.AUTOMATION_VALIDATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.ValidateAutomation\n */\nexport async function validateAutomation(\n automation: Automation,\n options?: ValidateAutomationOptions\n): Promise<\n NonNullablePaths<\n ValidateAutomationResponse,\n | `status`\n | `triggerValidationErrors`\n | `triggerValidationErrors.${number}.configurationError.errorType`\n | `triggerValidationErrors.${number}.providerConfigurationError.message`\n | `triggerValidationErrors.${number}.providerConfigurationError.title`\n | `triggerValidationErrors.${number}.errorType`\n | `triggerValidationErrors.${number}.errorSeverity`\n | `actionValidationErrors`\n | `actionValidationErrors.${number}.configurationError.errorType`\n | `actionValidationErrors.${number}.providerConfigurationError.message`\n | `actionValidationErrors.${number}.providerConfigurationError.title`\n | `actionValidationErrors.${number}.actionId`\n | `actionValidationErrors.${number}.appId`\n | `actionValidationErrors.${number}.actionKey`\n | `actionValidationErrors.${number}.errorType`\n | `actionValidationErrors.${number}.errorSeverity`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automation: automation,\n validationSettings: options?.validationSettings,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.validateAutomation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n automation: '$[0]',\n validationSettings: '$[1].validationSettings',\n },\n singleArgumentUnchanged: false,\n },\n ['automation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ValidateAutomationOptions {\n /** Automation validation settings. */\n validationSettings?: ValidationSettings;\n}\n\n/**\n * Validates the automation specified by ID.\n * @param automationId - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_VALIDATE\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationsService.ValidateAutomationById\n */\nexport async function validateAutomationById(\n automationId: string,\n options?: ValidateAutomationByIdOptions\n): Promise<\n NonNullablePaths<\n ValidateAutomationByIdResponse,\n | `status`\n | `triggerValidationErrors`\n | `triggerValidationErrors.${number}.configurationError.errorType`\n | `triggerValidationErrors.${number}.providerConfigurationError.message`\n | `triggerValidationErrors.${number}.providerConfigurationError.title`\n | `triggerValidationErrors.${number}.errorType`\n | `triggerValidationErrors.${number}.errorSeverity`\n | `actionValidationErrors`\n | `actionValidationErrors.${number}.configurationError.errorType`\n | `actionValidationErrors.${number}.providerConfigurationError.message`\n | `actionValidationErrors.${number}.providerConfigurationError.title`\n | `actionValidationErrors.${number}.actionId`\n | `actionValidationErrors.${number}.appId`\n | `actionValidationErrors.${number}.actionKey`\n | `actionValidationErrors.${number}.errorType`\n | `actionValidationErrors.${number}.errorSeverity`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n validationSettings: options?.validationSettings,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.validateAutomationById(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n automationId: '$[0]',\n validationSettings: '$[1].validationSettings',\n },\n singleArgumentUnchanged: false,\n },\n ['automationId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ValidateAutomationByIdOptions {\n /** Validation settings. */\n validationSettings?: ValidationSettings;\n}\n\n/**\n * Gets the specified automation revision.\n * @param automationId - Automation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField automationId\n * @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ\n * @applicableIdentity APP\n * @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision\n */\nexport async function getAutomationRevision(\n automationId: string,\n options?: GetAutomationRevisionOptions\n): Promise<\n NonNullablePaths<\n GetAutomationRevisionResponse,\n | `automation.applicationInfo.appId`\n | `automation.preinstalledInfo.appId`\n | `automation.createdBy.userId`\n | `automation.createdBy.appId`\n | `automation.name`\n | `automation.configuration.status`\n | `automation.configuration.trigger.appId`\n | `automation.configuration.trigger.triggerKey`\n | `automation.configuration.trigger.filters`\n | `automation.configuration.trigger.filters.${number}._id`\n | `automation.configuration.trigger.filters.${number}.fieldKey`\n | `automation.configuration.trigger.filters.${number}.filterExpression`\n | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression`\n | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit`\n | `automation.configuration.trigger.rateLimit.maxActivationsExpression`\n | `automation.configuration.trigger.rateLimit.durationTimeUnit`\n | `automation.configuration.rootActionIds`\n | `automation.origin`\n | `automation.settings.hidden`\n | `automation.settings.readonly`\n | `automation.settings.disableDelete`\n | `automation.settings.disableStatusChange`\n | `automation.settings.actionSettings.permanentActionIds`\n | `automation.settings.actionSettings.readonlyActionIds`\n | `automation.archived`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n automationId: automationId,\n revision: options?.revision,\n fields: options?.fields,\n });\n\n const reqOpts =\n ambassadorWixAutomationsV2Automation.getAutomationRevision(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n automationId: '$[0]',\n revision: '$[1].revision',\n fields: '$[1].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['automationId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetAutomationRevisionOptions {\n /** Revision number. */\n revision?: string | null;\n /**\n * Requested fields.\n * @maxSize 20\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixAutomationsV2AutomationRevisionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n {\n srcPath: '/_api/automations-service',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/v2/automations',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixAutomationsV2AutomationsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n {\n srcPath: '/_api/automations-service',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/v2/automations',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/automations-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_automations_automations-v-2';\n\n/** Creates an automation. */\nexport function createAutomation(payload: object): RequestOptionsFactory<any> {\n function __createAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.CreateAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createAutomation;\n}\n\n/** Retrieves an automation by ID. */\nexport function getAutomation(payload: object): RequestOptionsFactory<any> {\n function __getAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'GET' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.GetAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAutomation;\n}\n\n/**\n * Updates the specified automation.\n *\n * When an automation is updated, its `revision` property is incremented by 1. When updating an automation, you must specify the current revision number.\n */\nexport function updateAutomation(payload: object): RequestOptionsFactory<any> {\n function __updateAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'PATCH' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.UpdateAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automation.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateAutomation;\n}\n\n/** Deletes the specified automation. */\nexport function deleteAutomation(payload: object): RequestOptionsFactory<any> {\n function __deleteAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'DELETE' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.DeleteAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAutomation;\n}\n\n/** Deletes one or more automations. */\nexport function bulkDeleteAutomations(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteAutomations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.BulkDeleteAutomations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/bulk/automations/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteAutomations;\n}\n\n/**\n * Generates a preinstalled automation from another automation.\n *\n * Calls the action providers for changes needed to make a preinstalled automation, such as changes made to email template.\n *\n * > **Note**: You must have an account permission to edit an app.\n */\nexport function generatePreinstalledAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __generatePreinstalledAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn:\n 'wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/preinstalled-automation/generate',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generatePreinstalledAutomation;\n}\n\n/**\n * Retrieves a list of automations. This includes both automations overridden on a site and preinstalled automations. If a preinstalled automation has been overridden on the site, the method returns the override automation.\n *\n * > **Note**: The method only returns automations by apps installed on the site.\n *\n * Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n */\nexport function queryAutomations(payload: object): RequestOptionsFactory<any> {\n function __queryAutomations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.QueryAutomations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automations.createdDate' },\n { path: 'automations.updatedDate' },\n { path: 'automations.draftUpdatedDate' },\n { path: 'automations.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryAutomations;\n}\n\n/** Get aggregated info */\nexport function getAggregatedUsageInfo(\n payload: object\n): RequestOptionsFactory<any> {\n function __getAggregatedUsageInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'GET' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.GetAggregatedUsageInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/usage',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n };\n\n return metadata;\n }\n\n return __getAggregatedUsageInfo;\n}\n\n/**\n * Creates a copy of an action with a new ID, and changes the action's input mapping if necessary.\n *\n * The action copy isn't saved automatically. To save it, the user must perform an action\n * such as clicking the **Save** button.\n */\nexport function copyAutomation(payload: object): RequestOptionsFactory<any> {\n function __copyAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.CopyAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automationId}/copy',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __copyAutomation;\n}\n\n/** Creates a draft automation. */\nexport function createDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __createDraftAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.CreateDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/drafts',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDraftAutomation;\n}\n\n/**\n * Retrieves the draft of the specified automation. If a draft doesn't exist, the method creates one.\n *\n * > **Note**: If the specified automation is a draft, the method returns it.\n */\nexport function getOrCreateDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __getOrCreateDraftAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn:\n 'wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath:\n '/v2/automations/drafts/get-or-create/original-automation-id/{originalAutomationId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getOrCreateDraftAutomation;\n}\n\n/** Updates a draft automation. */\nexport function updateDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateDraftAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'PATCH' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.UpdateDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/drafts/{automation.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateDraftAutomation;\n}\n\n/**\n * Retrieves a list of automations, including drafts. Max query filter depth is 3.\n *\n * Relevant automations for the query are returned. This includes automations created on the site and pre-installed automations.\n * If there's an existing override for a pre-installed automation, the override is returned in the query result.\n * The query only returns automations from apps that are installed on the site.\n *\n * - new drafts that are not related to existing automations will be returned in the list\n * - the response will contain a map of originalAutomationId => relatedDrafts\n *\n * To learn about working with _Query_ endpoints, see\n * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),\n * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),\n * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).\n */\nexport function queryAutomationsWithDrafts(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryAutomationsWithDrafts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn:\n 'wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/query-with-drafts',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automations.createdDate' },\n { path: 'automations.updatedDate' },\n { path: 'automations.draftUpdatedDate' },\n { path: 'automations.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryAutomationsWithDrafts;\n}\n\nexport function bulkCountAutomationsWithDrafts(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCountAutomationsWithDrafts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn:\n 'wix.automations.v2.AutomationsService.BulkCountAutomationsWithDrafts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/bulk-count-with-drafts',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkCountAutomationsWithDrafts;\n}\n\n/** Deletes a draft automation. */\nexport function deleteDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteDraftAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'DELETE' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.DeleteDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/drafts/{automationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteDraftAutomation;\n}\n\n/** Publishes a draft automation. This applies any changes to the live automation. */\nexport function publishDraftAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __publishDraftAutomation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.PublishDraftAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/drafts/{automationId}/publish',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __publishDraftAutomation;\n}\n\n/** Validates the specified automation. */\nexport function validateAutomation(\n payload: object\n): RequestOptionsFactory<any> {\n function __validateAutomation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.ValidateAutomation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/validate',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __validateAutomation;\n}\n\n/** Validates the automation specified by ID. */\nexport function validateAutomationById(\n payload: object\n): RequestOptionsFactory<any> {\n function __validateAutomationById({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'POST' as any,\n methodFqn: 'wix.automations.v2.AutomationsService.ValidateAutomationById',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationsServiceUrl({\n protoPath: '/v2/automations/{automationId}/validate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __validateAutomationById;\n}\n\n/** Gets the specified automation revision. */\nexport function getAutomationRevision(\n payload: object\n): RequestOptionsFactory<any> {\n function __getAutomationRevision({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.automations.v2.automation',\n method: 'GET' as any,\n methodFqn:\n 'wix.automations.v2.AutomationRevisionsService.GetAutomationRevision',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({\n protoPath: '/v1/automation-revisions/{automationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'automation.createdDate' },\n { path: 'automation.updatedDate' },\n { path: 'automation.draftUpdatedDate' },\n { path: 'automation.autoArchivePolicy.archiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAutomationRevision;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wCAAAA;AAAA,EAAA,6BAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA;AAAA,0BAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,8BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QAC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CAAC;AAED,QAAM,UACiC,sBAAsB,OAAO;AAEpE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAlB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,UAAU;AAAA,UACV,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkCountAutomationsWithDrafts","bulkDeleteAutomations","copyAutomation","createAutomation","createDraftAutomation","deleteAutomation","deleteDraftAutomation","generatePreinstalledAutomation","getAggregatedUsageInfo","getAutomation","getAutomationRevision","getOrCreateDraftAutomation","publishDraftAutomation","queryAutomations","queryAutomationsWithDrafts","updateAutomation","updateDraftAutomation","validateAutomation","validateAutomationById","import_timestamp","import_rest_modules","payload","import_transform_paths","Domain","TimeUnit","Operator","Language","Type","Status","Origin","WebhookIdentityType","RequestedFields","SortOrder","State","SiteCreatedContext","Namespace","DeleteStatus","ValidationResultStatus","TriggerValidationErrorValidationErrorType","TriggerErrorType","ValidationErrorSeverity","Severity","ValidationErrorType","ActionErrorType","AutomationValidationErrorValidationErrorType","AutomationErrorType","createAutomation","sdkTransformError","getAutomation","updateAutomation","deleteAutomation","bulkDeleteAutomations","generatePreinstalledAutomation","queryAutomations","getAggregatedUsageInfo","copyAutomation","createDraftAutomation","getOrCreateDraftAutomation","updateDraftAutomation","queryAutomationsWithDrafts","bulkCountAutomationsWithDrafts","deleteDraftAutomation","publishDraftAutomation","validateAutomation","validateAutomationById","getAutomationRevision"]}