@wix/auto_sdk_automations_trigger-provider 1.0.35 → 1.0.36

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":["../../../src/service-plugins-types.ts","../../../src/interfaces-automations-v1-trigger-provider.public.ts","../../../src/interfaces-automations-v1-trigger-provider.context.ts","../../../src/service-plugins-error-classes.ts"],"sourcesContent":["export interface ValidateConfigurationRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n /** Trigger configuration mapping that's saved on the automation. */\n automationConfigMapping?: Record<string, any> | null;\n}\n\nexport interface SelectedFilterOptions {\n /**\n * Key representing a field from the trigger's [payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema) that has been configured as an [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection). For example `formId`.\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Values selected for the filter field.\n * @maxSize 100\n */\n values?: string[];\n}\n\nexport interface ValidateConfigurationResponse {\n /** Whether the trigger configuration is valid. */\n valid?: boolean;\n /** Error details for an invalid trigger configuration. */\n configurationErrors?: ProviderConfigurationError[];\n}\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 interface GetDynamicSchemaRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n}\n\nexport interface GetDynamicSchemaResponse {\n /** A [JSON schema](https://json-schema.org/) corresponding to the filter selection sent in the request. */\n dynamicSchema?: Record<string, any> | null;\n}\n\nexport interface RefreshPayloadRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * ID of the related resource in GUID format.\n * @format GUID\n */\n externalEntityId?: string | null;\n /** Payload to update. */\n payload: Record<string, any> | null;\n}\n\nexport interface RefreshPayloadResponse {\n /** Updated payload. */\n payload?: Record<string, any> | null;\n /**\n * Whether the automation activation should be canceled.\n *\n * Default: `false`.\n */\n cancelActivation?: boolean | null;\n}\n\nexport interface OnAutomationSavedRequest {\n /** Saved automation. */\n automation: Automation;\n}\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?: Origin;\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\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?: Status;\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\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?: TimeUnit;\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?: TimeUnit;\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?: Operator;\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\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: Language;\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/** 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\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_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 * 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?: TimeUnit;\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?: TimeUnit;\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\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?: Type;\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\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 OnAutomationSavedResponse {}\n\nexport interface OnAutomationDeletedRequest {\n /**\n * ID of the deleted automation.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface OnAutomationDeletedResponse {}\n\nexport interface TriggerProviderSPIConfig {\n /**\n * The trigger configuration\n *\n * example of a trigger:\n *\n * {\n * appId: \"56cc7843-fdfc-417f-a660-d4af9a2eafe3\",\n * triggerKey: \"form_submit\",\n * displayName: \"Visitor submits a form\",\n * payloadDataSchema: {\n * \"$schema\": \"http://json-schema.org/draft-07/schema\",\n * \"type\": \"object\",\n * \"title\": \"Visitor submits a form Payload Schema\",\n * \"description\": \"The schema of the payload that is part of the triggered event\",\n * \"default\": {},\n * \"examples\": [\n * {\n * \"formId\": \"60d2cd50-1047-4164-884d-8c24fbda84bb\",\n * \"formName\": \"My Cool Form\n * }\n * ],\n * \"properties\": {\n * \"formId\": {\n * \"$id\": \"#/properties/formId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Form ID\",\n * \"description\": \"The form identifier\",\n * \"default\": \"\",\n * \"examples\": [\n * \"60d2cd50-1047-4164-884d-8c24fbda84bb\"\n * ]\n * },\n * \"formName\": {\n * \"$id\": \"#/properties/formName\",\n * \"type\": \"string\",\n * \"title\": \"Form Name\",\n * \"description\": \"The form display name\",\n * \"default\": \"\",\n * \"examples\": [\n * \"My Form\"\n * ]\n * },\n * \"contactId\": {\n * \"$id\": \"#/properties/contactId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Contact Id\",\n * \"description\": \"The Id of the contact which submitted the form\",\n * \"default\": \"\",\n * \"identityType\": \"contact\", // can be contact, visitor, user limited to 1 type per identity,\n * \"namespace\": \"contact\" // friendly name to be used later on, in order to user that person's data \"contact.firstName\"\n * }\n * },\n * \"required\": [\n * \"formId\",\n * \"formName\",\n * \"contactId\"\n * ],\n * \"additionalProperties\": false\n * }\n * }\n */\n triggerConfig?: Record<string, any> | null;\n /** URL to the trigger provider service */\n baseUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\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?: IdentityType;\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","import { ServicePluginDefinition } from '@wix/sdk-types';\nimport {\n Context,\n ValidateConfigurationRequest,\n ValidateConfigurationResponse,\n GetDynamicSchemaRequest,\n GetDynamicSchemaResponse,\n RefreshPayloadRequest,\n RefreshPayloadResponse,\n} from './service-plugins-types.js';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\n\nexport interface ValidateConfigurationEnvelope {\n request: ValidateConfigurationRequest;\n metadata: Context;\n}\n\nexport interface GetDynamicSchemaEnvelope {\n request: GetDynamicSchemaRequest;\n metadata: Context;\n}\n\nexport interface RefreshPayloadEnvelope {\n request: RefreshPayloadRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * This endpoint allows you to run your own logic to validate trigger fields. Implement this endpoint if you need to perform extra validation on top of\n * the Wix validation process.\n *\n * Wix calls Validate Configuration in the following cases:\n *\n * - When a Wix user activates the automation.\n * - When a Wix user selects the automation from the **Your automations** list in the [**Automations**](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations)\n * dashboard.\n * - When a Wix user opens the automation to edit it.\n *\n * If the user configured filters when setting up their automation, these are included in the request.\n * Wix uses the returned response to display an error message to a user if the requested trigger is invalid. */\n validateConfiguration(\n payload: ValidateConfigurationEnvelope\n ): ValidateConfigurationResponse | Promise<ValidateConfigurationResponse>;\n\n /**\n *\n * This endpoint returns a [JSON schema](https://json-schema.org/) object\n * that's used to dynamically update the fields available to a Wix user\n * when they configure an [automation](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations).\n *\n * Wix calls this endpoint when a user selects an option from an\n * [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection)\n * configured for a trigger.\n * Wix appends the returned schema to the\n * [payload schema](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/payload-schema)\n * you defined for the trigger and makes the fields available to the Wix user's automation. */\n getDynamicSchema(\n payload: GetDynamicSchemaEnvelope\n ): GetDynamicSchemaResponse | Promise<GetDynamicSchemaResponse>;\n\n /**\n *\n * If an automation's action is delayed, implement this method to retrieve the latest data in the trigger payload before the action fires.\n *\n * For example, if an automation is triggered but its action is set to fire only 24 hours later, Wix calls Refresh Payload before starting\n * the action. This fetches the latest data in the trigger payload. The returned data can be used to update the trigger payload that is passed\n * to the action. */\n refreshPayload(\n payload: RefreshPayloadEnvelope\n ): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;\n}>('AUTOMATIONS_TRIGGER_PROVIDER', [\n {\n name: 'validateConfiguration',\n primaryHttpMappingPath: '/validate-configuration',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'getDynamicSchema',\n primaryHttpMappingPath: '/dynamic-schema',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'refreshPayload',\n primaryHttpMappingPath: '/refresh-payload',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-automations-v1-trigger-provider.public.js';\nimport { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';\nimport { BuildServicePluginDefinition } from '@wix/sdk-types';\nimport { provideHandlers as publicProvideHandlers } from './interfaces-automations-v1-trigger-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> &\n typeof publicProvideHandlers = createServicePluginModule(\n publicProvideHandlers\n);\n","export class ProviderNotFoundWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('ProviderNotFound');\n\n this.httpCode = 404;\n this.statusCode = 'NOT_FOUND';\n this.applicationCode = 'PROVIDER_NOT_FOUND';\n this.name = 'ProviderNotFound';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'ProviderNotFound',\n applicationCode: 'PROVIDER_NOT_FOUND',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n"],"mappings":";AA0MO,IAAK,SAAL,kBAAKA,YAAL;AAEL,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,SAAM;AAEN,EAAAA,QAAA,iBAAc;AANJ,SAAAA;AAAA,GAAA;AAmEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,uBAAoB;AAEpB,EAAAA,UAAA,aAAU;AAEV,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,UAAO;AAEP,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,YAAS;AAXC,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,QAAK;AAEL,EAAAA,UAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAmBL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AA2BL,IAAK,OAAL,kBAAKC,UAAL;AAEL,EAAAA,MAAA,yBAAsB;AAEtB,EAAAA,MAAA,iBAAc;AAEd,EAAAA,MAAA,eAAY;AAEZ,EAAAA,MAAA,WAAQ;AAER,EAAAA,MAAA,gBAAa;AAVH,SAAAA;AAAA,GAAA;AA4LL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAgHL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AAuOL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;AC36BZ,SAAS,+BAA+B;AAUxC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAiBA,IAAM,kBAAkB,wBA6C5B,gCAAgC;AAAA,EACjC;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;AC7HD,SAAS,iCAAiC;AAMnC,IAAMC,mBAGoB;AAAA,EAC/B;AACF;;;ACZO,IAAM,2BAAN,cAAuC,MAAM;AAAA,EAclD,cAAc;AACZ,UAAM,kBAAkB;AAExB,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAIF;AAAA;AA9Ba,yBA6BK,SAAS;","names":["Domain","TimeUnit","Operator","Language","Type","Status","Origin","IdentityType","provideHandlers"]}
1
+ {"version":3,"sources":["../../../src/service-plugins-types.ts","../../../src/interfaces-automations-v1-trigger-provider.public.ts","../../../src/interfaces-automations-v1-trigger-provider.context.ts","../../../src/service-plugins-error-classes.ts"],"sourcesContent":["export interface ValidateConfigurationRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n /** Trigger configuration mapping that's saved on the automation. */\n automationConfigMapping?: Record<string, any> | null;\n}\n\nexport interface SelectedFilterOptions {\n /**\n * Key representing a field from the trigger's [payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema) that has been configured as an [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection). For example `formId`.\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Values selected for the filter field.\n * @maxSize 100\n */\n values?: string[];\n}\n\nexport interface ValidateConfigurationResponse {\n /** Whether the trigger configuration is valid. */\n valid?: boolean;\n /** Error details for an invalid trigger configuration. */\n configurationErrors?: ProviderConfigurationError[];\n}\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 interface GetDynamicSchemaRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n}\n\nexport interface GetDynamicSchemaResponse {\n /** A [JSON schema](https://json-schema.org/) corresponding to the filter selection sent in the request. */\n dynamicSchema?: Record<string, any> | null;\n}\n\nexport interface RefreshPayloadRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * ID of the related resource in GUID format.\n * @format GUID\n */\n externalEntityId?: string | null;\n /** Payload to update. */\n payload: Record<string, any> | null;\n}\n\nexport interface RefreshPayloadResponse {\n /** Updated payload. */\n payload?: Record<string, any> | null;\n /**\n * Whether the automation activation should be canceled.\n *\n * Default: `false`.\n */\n cancelActivation?: boolean | null;\n}\n\nexport interface OnAutomationSavedRequest {\n /** Saved automation. */\n automation: Automation;\n}\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?: Origin;\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 * Whether to disable the ability to add a delay to the automation.\n *\n * Default: `false`.\n */\n disableDelayAddition?: boolean;\n /**\n * Whether to disable the ability to add a condition to the automation.\n *\n * Default: `false`.\n */\n disableConditionAddition?: boolean;\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\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?: Status;\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\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?: TimeUnit;\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?: TimeUnit;\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?: Operator;\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\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: Language;\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/** 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\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_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 * 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?: TimeUnit;\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?: TimeUnit;\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\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?: Type;\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\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 OnAutomationSavedResponse {}\n\nexport interface OnAutomationDeletedRequest {\n /**\n * ID of the deleted automation.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface OnAutomationDeletedResponse {}\n\nexport interface TriggerProviderSPIConfig {\n /**\n * The trigger configuration\n *\n * example of a trigger:\n *\n * {\n * appId: \"56cc7843-fdfc-417f-a660-d4af9a2eafe3\",\n * triggerKey: \"form_submit\",\n * displayName: \"Visitor submits a form\",\n * payloadDataSchema: {\n * \"$schema\": \"http://json-schema.org/draft-07/schema\",\n * \"type\": \"object\",\n * \"title\": \"Visitor submits a form Payload Schema\",\n * \"description\": \"The schema of the payload that is part of the triggered event\",\n * \"default\": {},\n * \"examples\": [\n * {\n * \"formId\": \"60d2cd50-1047-4164-884d-8c24fbda84bb\",\n * \"formName\": \"My Cool Form\n * }\n * ],\n * \"properties\": {\n * \"formId\": {\n * \"$id\": \"#/properties/formId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Form ID\",\n * \"description\": \"The form identifier\",\n * \"default\": \"\",\n * \"examples\": [\n * \"60d2cd50-1047-4164-884d-8c24fbda84bb\"\n * ]\n * },\n * \"formName\": {\n * \"$id\": \"#/properties/formName\",\n * \"type\": \"string\",\n * \"title\": \"Form Name\",\n * \"description\": \"The form display name\",\n * \"default\": \"\",\n * \"examples\": [\n * \"My Form\"\n * ]\n * },\n * \"contactId\": {\n * \"$id\": \"#/properties/contactId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Contact Id\",\n * \"description\": \"The Id of the contact which submitted the form\",\n * \"default\": \"\",\n * \"identityType\": \"contact\", // can be contact, visitor, user limited to 1 type per identity,\n * \"namespace\": \"contact\" // friendly name to be used later on, in order to user that person's data \"contact.firstName\"\n * }\n * },\n * \"required\": [\n * \"formId\",\n * \"formName\",\n * \"contactId\"\n * ],\n * \"additionalProperties\": false\n * }\n * }\n */\n triggerConfig?: Record<string, any> | null;\n /** URL to the trigger provider service */\n baseUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\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?: IdentityType;\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","import { ServicePluginDefinition } from '@wix/sdk-types';\nimport {\n Context,\n ValidateConfigurationRequest,\n ValidateConfigurationResponse,\n GetDynamicSchemaRequest,\n GetDynamicSchemaResponse,\n RefreshPayloadRequest,\n RefreshPayloadResponse,\n} from './service-plugins-types.js';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\n\nexport interface ValidateConfigurationEnvelope {\n request: ValidateConfigurationRequest;\n metadata: Context;\n}\n\nexport interface GetDynamicSchemaEnvelope {\n request: GetDynamicSchemaRequest;\n metadata: Context;\n}\n\nexport interface RefreshPayloadEnvelope {\n request: RefreshPayloadRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * This endpoint allows you to run your own logic to validate trigger fields. Implement this endpoint if you need to perform extra validation on top of\n * the Wix validation process.\n *\n * Wix calls Validate Configuration in the following cases:\n *\n * - When a Wix user activates the automation.\n * - When a Wix user selects the automation from the **Your automations** list in the [**Automations**](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations)\n * dashboard.\n * - When a Wix user opens the automation to edit it.\n *\n * If the user configured filters when setting up their automation, these are included in the request.\n * Wix uses the returned response to display an error message to a user if the requested trigger is invalid. */\n validateConfiguration(\n payload: ValidateConfigurationEnvelope\n ): ValidateConfigurationResponse | Promise<ValidateConfigurationResponse>;\n\n /**\n *\n * This endpoint returns a [JSON schema](https://json-schema.org/) object\n * that's used to dynamically update the fields available to a Wix user\n * when they configure an [automation](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations).\n *\n * Wix calls this endpoint when a user selects an option from an\n * [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection)\n * configured for a trigger.\n * Wix appends the returned schema to the\n * [payload schema](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/payload-schema)\n * you defined for the trigger and makes the fields available to the Wix user's automation. */\n getDynamicSchema(\n payload: GetDynamicSchemaEnvelope\n ): GetDynamicSchemaResponse | Promise<GetDynamicSchemaResponse>;\n\n /**\n *\n * If an automation's action is delayed, implement this method to retrieve the latest data in the trigger payload before the action fires.\n *\n * For example, if an automation is triggered but its action is set to fire only 24 hours later, Wix calls Refresh Payload before starting\n * the action. This fetches the latest data in the trigger payload. The returned data can be used to update the trigger payload that is passed\n * to the action. */\n refreshPayload(\n payload: RefreshPayloadEnvelope\n ): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;\n}>('AUTOMATIONS_TRIGGER_PROVIDER', [\n {\n name: 'validateConfiguration',\n primaryHttpMappingPath: '/validate-configuration',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'getDynamicSchema',\n primaryHttpMappingPath: '/dynamic-schema',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'refreshPayload',\n primaryHttpMappingPath: '/refresh-payload',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-automations-v1-trigger-provider.public.js';\nimport { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';\nimport { BuildServicePluginDefinition } from '@wix/sdk-types';\nimport { provideHandlers as publicProvideHandlers } from './interfaces-automations-v1-trigger-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> &\n typeof publicProvideHandlers = createServicePluginModule(\n publicProvideHandlers\n);\n","export class ProviderNotFoundWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('ProviderNotFound');\n\n this.httpCode = 404;\n this.statusCode = 'NOT_FOUND';\n this.applicationCode = 'PROVIDER_NOT_FOUND';\n this.name = 'ProviderNotFound';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'ProviderNotFound',\n applicationCode: 'PROVIDER_NOT_FOUND',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n"],"mappings":";AAsNO,IAAK,SAAL,kBAAKA,YAAL;AAEL,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,SAAM;AAEN,EAAAA,QAAA,iBAAc;AANJ,SAAAA;AAAA,GAAA;AAiEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,uBAAoB;AAEpB,EAAAA,UAAA,aAAU;AAEV,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,UAAO;AAEP,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,YAAS;AAXC,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,QAAK;AAEL,EAAAA,UAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAmBL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AA2BL,IAAK,OAAL,kBAAKC,UAAL;AAEL,EAAAA,MAAA,yBAAsB;AAEtB,EAAAA,MAAA,iBAAc;AAEd,EAAAA,MAAA,eAAY;AAEZ,EAAAA,MAAA,WAAQ;AAER,EAAAA,MAAA,gBAAa;AAVH,SAAAA;AAAA,GAAA;AA4LL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAgHL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AAuOL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACr7BZ,SAAS,+BAA+B;AAUxC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAiBA,IAAM,kBAAkB,wBA6C5B,gCAAgC;AAAA,EACjC;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;AC7HD,SAAS,iCAAiC;AAMnC,IAAMC,mBAGoB;AAAA,EAC/B;AACF;;;ACZO,IAAM,2BAAN,cAAuC,MAAM;AAAA,EAclD,cAAc;AACZ,UAAM,kBAAkB;AAExB,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAIF;AAAA;AA9Ba,yBA6BK,SAAS;","names":["Domain","TimeUnit","Operator","Language","Type","Status","Origin","IdentityType","provideHandlers"]}
@@ -1,5 +1,5 @@
1
- import { ac as ValidateConfigurationEnvelope, a as ValidateConfigurationResponse, ad as GetDynamicSchemaEnvelope, b as GetDynamicSchemaResponse, ae as RefreshPayloadEnvelope, c as RefreshPayloadResponse } from './service-plugins-error-classes-y2PuJhz-.mjs';
2
- export { e as AIMetadata, I as Action, J as ActionInfoOneOf, f as ActionSettings, s as AppDefinedAction, N as ApplicationOrigin, g as AuditInfo, h as AuditInfoIdOneOf, Z as AutoArchivePolicy, A as Automation, i as AutomationConfiguration, d as AutomationOriginInfoOneOf, U as AutomationSettings, u as CodeConditionAction, o as CodeSnippet, t as ConditionAction, C as ConditionExpressionGroup, a7 as Context, v as DelayAction, a2 as Dimensions, D as Domain, W as DraftInfo, E as Enrichment, X as Enrichments, Y as ExtendedFields, F as Filter, m as FilterValueSelection, K as FilterableAppDefinedActions, k as FutureDateActivationOffset, G as GetDynamicSchemaRequest, a9 as IdentificationData, aa as IdentificationDataIdOneOf, a8 as IdentityType, L as Language, $ as Note, _ as Notes, a1 as Offset, a4 as OnAutomationDeletedRequest, a5 as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, a3 as OnAutomationSavedResponse, n as Operator, M as Origin, y as OutputAction, q as Path, a0 as Position, Q as PreinstalledOrigin, P as ProviderConfigurationError, ab as ProviderNotFoundWixError, l as RateLimit, w as RateLimitAction, R as RefreshPayloadRequest, S as SelectedFilterOptions, x as SetVariablesAction, z as SplitAction, B as Status, j as TimeUnit, H as Trigger, a6 as TriggerProviderSPIConfig, T as TriggerSettings, r as Type, V as ValidateConfigurationRequest } from './service-plugins-error-classes-y2PuJhz-.mjs';
1
+ import { ab as ValidateConfigurationEnvelope, a as ValidateConfigurationResponse, ac as GetDynamicSchemaEnvelope, b as GetDynamicSchemaResponse, ad as RefreshPayloadEnvelope, c as RefreshPayloadResponse } from './service-plugins-error-classes-UpGdPhpK.mjs';
2
+ export { e as AIMetadata, H as Action, I as ActionInfoOneOf, f as ActionSettings, r as AppDefinedAction, M as ApplicationOrigin, g as AuditInfo, h as AuditInfoIdOneOf, Y as AutoArchivePolicy, A as Automation, i as AutomationConfiguration, d as AutomationOriginInfoOneOf, Q as AutomationSettings, t as CodeConditionAction, n as CodeSnippet, s as ConditionAction, C as ConditionExpressionGroup, a6 as Context, u as DelayAction, a1 as Dimensions, D as Domain, U as DraftInfo, E as Enrichment, W as Enrichments, X as ExtendedFields, F as Filter, l as FilterValueSelection, J as FilterableAppDefinedActions, j as FutureDateActivationOffset, G as GetDynamicSchemaRequest, a8 as IdentificationData, a9 as IdentificationDataIdOneOf, a7 as IdentityType, L as Language, _ as Note, Z as Notes, a0 as Offset, a3 as OnAutomationDeletedRequest, a4 as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, a2 as OnAutomationSavedResponse, m as Operator, K as Origin, x as OutputAction, o as Path, $ as Position, N as PreinstalledOrigin, P as ProviderConfigurationError, aa as ProviderNotFoundWixError, k as RateLimit, v as RateLimitAction, R as RefreshPayloadRequest, S as SelectedFilterOptions, w as SetVariablesAction, y as SplitAction, z as Status, T as TimeUnit, B as Trigger, a5 as TriggerProviderSPIConfig, q as Type, V as ValidateConfigurationRequest } from './service-plugins-error-classes-UpGdPhpK.mjs';
3
3
  import '@wix/sdk-types';
4
4
 
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/service-plugins-error-classes.ts","../../../src/service-plugins-types.ts"],"sourcesContent":["export class ProviderNotFoundWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('ProviderNotFound');\n\n this.httpCode = 404;\n this.statusCode = 'NOT_FOUND';\n this.applicationCode = 'PROVIDER_NOT_FOUND';\n this.name = 'ProviderNotFound';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'ProviderNotFound',\n applicationCode: 'PROVIDER_NOT_FOUND',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n","export interface ValidateConfigurationRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n /** Trigger configuration mapping that's saved on the automation. */\n automationConfigMapping?: Record<string, any> | null;\n}\n\nexport interface SelectedFilterOptions {\n /**\n * Key representing a field from the trigger's [payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema) that has been configured as an [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection). For example `formId`.\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Values selected for the filter field.\n * @maxSize 100\n */\n values?: string[];\n}\n\nexport interface ValidateConfigurationResponse {\n /** Whether the trigger configuration is valid. */\n valid?: boolean;\n /** Error details for an invalid trigger configuration. */\n configurationErrors?: ProviderConfigurationError[];\n}\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 interface GetDynamicSchemaRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n}\n\nexport interface GetDynamicSchemaResponse {\n /** A [JSON schema](https://json-schema.org/) corresponding to the filter selection sent in the request. */\n dynamicSchema?: Record<string, any> | null;\n}\n\nexport interface RefreshPayloadRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * ID of the related resource in GUID format.\n * @format GUID\n */\n externalEntityId?: string | null;\n /** Payload to update. */\n payload: Record<string, any> | null;\n}\n\nexport interface RefreshPayloadResponse {\n /** Updated payload. */\n payload?: Record<string, any> | null;\n /**\n * Whether the automation activation should be canceled.\n *\n * Default: `false`.\n */\n cancelActivation?: boolean | null;\n}\n\nexport interface OnAutomationSavedRequest {\n /** Saved automation. */\n automation: Automation;\n}\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?: Origin;\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\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?: Status;\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\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?: TimeUnit;\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?: TimeUnit;\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?: Operator;\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\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: Language;\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/** 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\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_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 * 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?: TimeUnit;\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?: TimeUnit;\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\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?: Type;\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\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 OnAutomationSavedResponse {}\n\nexport interface OnAutomationDeletedRequest {\n /**\n * ID of the deleted automation.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface OnAutomationDeletedResponse {}\n\nexport interface TriggerProviderSPIConfig {\n /**\n * The trigger configuration\n *\n * example of a trigger:\n *\n * {\n * appId: \"56cc7843-fdfc-417f-a660-d4af9a2eafe3\",\n * triggerKey: \"form_submit\",\n * displayName: \"Visitor submits a form\",\n * payloadDataSchema: {\n * \"$schema\": \"http://json-schema.org/draft-07/schema\",\n * \"type\": \"object\",\n * \"title\": \"Visitor submits a form Payload Schema\",\n * \"description\": \"The schema of the payload that is part of the triggered event\",\n * \"default\": {},\n * \"examples\": [\n * {\n * \"formId\": \"60d2cd50-1047-4164-884d-8c24fbda84bb\",\n * \"formName\": \"My Cool Form\n * }\n * ],\n * \"properties\": {\n * \"formId\": {\n * \"$id\": \"#/properties/formId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Form ID\",\n * \"description\": \"The form identifier\",\n * \"default\": \"\",\n * \"examples\": [\n * \"60d2cd50-1047-4164-884d-8c24fbda84bb\"\n * ]\n * },\n * \"formName\": {\n * \"$id\": \"#/properties/formName\",\n * \"type\": \"string\",\n * \"title\": \"Form Name\",\n * \"description\": \"The form display name\",\n * \"default\": \"\",\n * \"examples\": [\n * \"My Form\"\n * ]\n * },\n * \"contactId\": {\n * \"$id\": \"#/properties/contactId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Contact Id\",\n * \"description\": \"The Id of the contact which submitted the form\",\n * \"default\": \"\",\n * \"identityType\": \"contact\", // can be contact, visitor, user limited to 1 type per identity,\n * \"namespace\": \"contact\" // friendly name to be used later on, in order to user that person's data \"contact.firstName\"\n * }\n * },\n * \"required\": [\n * \"formId\",\n * \"formName\",\n * \"contactId\"\n * ],\n * \"additionalProperties\": false\n * }\n * }\n */\n triggerConfig?: Record<string, any> | null;\n /** URL to the trigger provider service */\n baseUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\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?: IdentityType;\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"],"mappings":";AAAO,IAAM,2BAAN,cAAuC,MAAM;AAAA,EAclD,cAAc;AACZ,UAAM,kBAAkB;AAExB,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAIF;AAAA;AA9Ba,yBA6BK,SAAS;;;AC6KpB,IAAK,SAAL,kBAAKA,YAAL;AAEL,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,SAAM;AAEN,EAAAA,QAAA,iBAAc;AANJ,SAAAA;AAAA,GAAA;AAmEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,uBAAoB;AAEpB,EAAAA,UAAA,aAAU;AAEV,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,UAAO;AAEP,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,YAAS;AAXC,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,QAAK;AAEL,EAAAA,UAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAmBL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AA2BL,IAAK,OAAL,kBAAKC,UAAL;AAEL,EAAAA,MAAA,yBAAsB;AAEtB,EAAAA,MAAA,iBAAc;AAEd,EAAAA,MAAA,eAAY;AAEZ,EAAAA,MAAA,WAAQ;AAER,EAAAA,MAAA,gBAAa;AAVH,SAAAA;AAAA,GAAA;AA4LL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAgHL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AAuOL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;","names":["Domain","TimeUnit","Operator","Language","Type","Status","Origin","IdentityType"]}
1
+ {"version":3,"sources":["../../../src/service-plugins-error-classes.ts","../../../src/service-plugins-types.ts"],"sourcesContent":["export class ProviderNotFoundWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('ProviderNotFound');\n\n this.httpCode = 404;\n this.statusCode = 'NOT_FOUND';\n this.applicationCode = 'PROVIDER_NOT_FOUND';\n this.name = 'ProviderNotFound';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'ProviderNotFound',\n applicationCode: 'PROVIDER_NOT_FOUND',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n","export interface ValidateConfigurationRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n /** Trigger configuration mapping that's saved on the automation. */\n automationConfigMapping?: Record<string, any> | null;\n}\n\nexport interface SelectedFilterOptions {\n /**\n * Key representing a field from the trigger's [payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema) that has been configured as an [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection). For example `formId`.\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Values selected for the filter field.\n * @maxSize 100\n */\n values?: string[];\n}\n\nexport interface ValidateConfigurationResponse {\n /** Whether the trigger configuration is valid. */\n valid?: boolean;\n /** Error details for an invalid trigger configuration. */\n configurationErrors?: ProviderConfigurationError[];\n}\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 interface GetDynamicSchemaRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n}\n\nexport interface GetDynamicSchemaResponse {\n /** A [JSON schema](https://json-schema.org/) corresponding to the filter selection sent in the request. */\n dynamicSchema?: Record<string, any> | null;\n}\n\nexport interface RefreshPayloadRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * ID of the related resource in GUID format.\n * @format GUID\n */\n externalEntityId?: string | null;\n /** Payload to update. */\n payload: Record<string, any> | null;\n}\n\nexport interface RefreshPayloadResponse {\n /** Updated payload. */\n payload?: Record<string, any> | null;\n /**\n * Whether the automation activation should be canceled.\n *\n * Default: `false`.\n */\n cancelActivation?: boolean | null;\n}\n\nexport interface OnAutomationSavedRequest {\n /** Saved automation. */\n automation: Automation;\n}\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?: Origin;\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 * Whether to disable the ability to add a delay to the automation.\n *\n * Default: `false`.\n */\n disableDelayAddition?: boolean;\n /**\n * Whether to disable the ability to add a condition to the automation.\n *\n * Default: `false`.\n */\n disableConditionAddition?: boolean;\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\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?: Status;\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\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?: TimeUnit;\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?: TimeUnit;\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?: Operator;\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\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: Language;\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/** 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\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_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 * 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?: TimeUnit;\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?: TimeUnit;\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\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?: Type;\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\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 OnAutomationSavedResponse {}\n\nexport interface OnAutomationDeletedRequest {\n /**\n * ID of the deleted automation.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface OnAutomationDeletedResponse {}\n\nexport interface TriggerProviderSPIConfig {\n /**\n * The trigger configuration\n *\n * example of a trigger:\n *\n * {\n * appId: \"56cc7843-fdfc-417f-a660-d4af9a2eafe3\",\n * triggerKey: \"form_submit\",\n * displayName: \"Visitor submits a form\",\n * payloadDataSchema: {\n * \"$schema\": \"http://json-schema.org/draft-07/schema\",\n * \"type\": \"object\",\n * \"title\": \"Visitor submits a form Payload Schema\",\n * \"description\": \"The schema of the payload that is part of the triggered event\",\n * \"default\": {},\n * \"examples\": [\n * {\n * \"formId\": \"60d2cd50-1047-4164-884d-8c24fbda84bb\",\n * \"formName\": \"My Cool Form\n * }\n * ],\n * \"properties\": {\n * \"formId\": {\n * \"$id\": \"#/properties/formId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Form ID\",\n * \"description\": \"The form identifier\",\n * \"default\": \"\",\n * \"examples\": [\n * \"60d2cd50-1047-4164-884d-8c24fbda84bb\"\n * ]\n * },\n * \"formName\": {\n * \"$id\": \"#/properties/formName\",\n * \"type\": \"string\",\n * \"title\": \"Form Name\",\n * \"description\": \"The form display name\",\n * \"default\": \"\",\n * \"examples\": [\n * \"My Form\"\n * ]\n * },\n * \"contactId\": {\n * \"$id\": \"#/properties/contactId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Contact Id\",\n * \"description\": \"The Id of the contact which submitted the form\",\n * \"default\": \"\",\n * \"identityType\": \"contact\", // can be contact, visitor, user limited to 1 type per identity,\n * \"namespace\": \"contact\" // friendly name to be used later on, in order to user that person's data \"contact.firstName\"\n * }\n * },\n * \"required\": [\n * \"formId\",\n * \"formName\",\n * \"contactId\"\n * ],\n * \"additionalProperties\": false\n * }\n * }\n */\n triggerConfig?: Record<string, any> | null;\n /** URL to the trigger provider service */\n baseUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\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?: IdentityType;\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"],"mappings":";AAAO,IAAM,2BAAN,cAAuC,MAAM;AAAA,EAclD,cAAc;AACZ,UAAM,kBAAkB;AAExB,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAIF;AAAA;AA9Ba,yBA6BK,SAAS;;;ACyLpB,IAAK,SAAL,kBAAKA,YAAL;AAEL,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,SAAM;AAEN,EAAAA,QAAA,iBAAc;AANJ,SAAAA;AAAA,GAAA;AAiEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,uBAAoB;AAEpB,EAAAA,UAAA,aAAU;AAEV,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,UAAO;AAEP,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,YAAS;AAXC,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,QAAK;AAEL,EAAAA,UAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAmBL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AA2BL,IAAK,OAAL,kBAAKC,UAAL;AAEL,EAAAA,MAAA,yBAAsB;AAEtB,EAAAA,MAAA,iBAAc;AAEd,EAAAA,MAAA,eAAY;AAEZ,EAAAA,MAAA,WAAQ;AAER,EAAAA,MAAA,gBAAa;AAVH,SAAAA;AAAA,GAAA;AA4LL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAgHL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AAuOL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;","names":["Domain","TimeUnit","Operator","Language","Type","Status","Origin","IdentityType"]}
@@ -189,6 +189,18 @@ interface ActionSettings {
189
189
  * @format GUID
190
190
  */
191
191
  readonlyActionIds?: string[];
192
+ /**
193
+ * Whether to disable the ability to add a delay to the automation.
194
+ *
195
+ * Default: `false`.
196
+ */
197
+ disableDelayAddition?: boolean;
198
+ /**
199
+ * Whether to disable the ability to add a condition to the automation.
200
+ *
201
+ * Default: `false`.
202
+ */
203
+ disableConditionAddition?: boolean;
192
204
  }
193
205
  declare enum Domain {
194
206
  /** User domain (default). */
@@ -198,8 +210,6 @@ declare enum Domain {
198
210
  /** Wix account-level domain. */
199
211
  WIX_ACCOUNT = "WIX_ACCOUNT"
200
212
  }
201
- interface TriggerSettings {
202
- }
203
213
  interface Enrichment {
204
214
  /**
205
215
  * Enrichment input mappings.
@@ -1011,4 +1021,4 @@ declare class ProviderNotFoundWixError extends Error {
1011
1021
  static readonly __type = "wix_spi_error";
1012
1022
  }
1013
1023
 
1014
- export { type Note as $, type Automation as A, Status as B, type ConditionExpressionGroup as C, Domain as D, type Enrichment as E, type Filter as F, type GetDynamicSchemaRequest as G, type Trigger as H, type Action as I, type ActionInfoOneOf as J, type FilterableAppDefinedActions as K, Language as L, Origin as M, type ApplicationOrigin as N, type OnAutomationSavedRequest as O, type ProviderConfigurationError as P, type PreinstalledOrigin as Q, type RefreshPayloadRequest as R, type SelectedFilterOptions as S, type TriggerSettings as T, type AutomationSettings as U, type ValidateConfigurationRequest as V, type DraftInfo as W, type Enrichments as X, type ExtendedFields as Y, type AutoArchivePolicy as Z, type Notes as _, type ValidateConfigurationResponse as a, type Position as a0, type Offset as a1, type Dimensions as a2, type OnAutomationSavedResponse as a3, type OnAutomationDeletedRequest as a4, type OnAutomationDeletedResponse as a5, type TriggerProviderSPIConfig as a6, type Context as a7, IdentityType as a8, type IdentificationData as a9, type IdentificationDataIdOneOf as aa, ProviderNotFoundWixError as ab, type ValidateConfigurationEnvelope as ac, type GetDynamicSchemaEnvelope as ad, type RefreshPayloadEnvelope as ae, type GetDynamicSchemaResponse as b, type RefreshPayloadResponse as c, type AutomationOriginInfoOneOf as d, type AIMetadata as e, type ActionSettings as f, type AuditInfo as g, type AuditInfoIdOneOf as h, type AutomationConfiguration as i, TimeUnit as j, type FutureDateActivationOffset as k, type RateLimit as l, type FilterValueSelection as m, Operator as n, type CodeSnippet as o, provideHandlers as p, type Path as q, Type as r, type AppDefinedAction as s, type ConditionAction as t, type CodeConditionAction as u, type DelayAction as v, type RateLimitAction as w, type SetVariablesAction as x, type OutputAction as y, type SplitAction as z };
1024
+ export { type Position as $, type Automation as A, type Trigger as B, type ConditionExpressionGroup as C, Domain as D, type Enrichment as E, type Filter as F, type GetDynamicSchemaRequest as G, type Action as H, type ActionInfoOneOf as I, type FilterableAppDefinedActions as J, Origin as K, Language as L, type ApplicationOrigin as M, type PreinstalledOrigin as N, type OnAutomationSavedRequest as O, type ProviderConfigurationError as P, type AutomationSettings as Q, type RefreshPayloadRequest as R, type SelectedFilterOptions as S, TimeUnit as T, type DraftInfo as U, type ValidateConfigurationRequest as V, type Enrichments as W, type ExtendedFields as X, type AutoArchivePolicy as Y, type Notes as Z, type Note as _, type ValidateConfigurationResponse as a, type Offset as a0, type Dimensions as a1, type OnAutomationSavedResponse as a2, type OnAutomationDeletedRequest as a3, type OnAutomationDeletedResponse as a4, type TriggerProviderSPIConfig as a5, type Context as a6, IdentityType as a7, type IdentificationData as a8, type IdentificationDataIdOneOf as a9, ProviderNotFoundWixError as aa, type ValidateConfigurationEnvelope as ab, type GetDynamicSchemaEnvelope as ac, type RefreshPayloadEnvelope as ad, type GetDynamicSchemaResponse as b, type RefreshPayloadResponse as c, type AutomationOriginInfoOneOf as d, type AIMetadata as e, type ActionSettings as f, type AuditInfo as g, type AuditInfoIdOneOf as h, type AutomationConfiguration as i, type FutureDateActivationOffset as j, type RateLimit as k, type FilterValueSelection as l, Operator as m, type CodeSnippet as n, type Path as o, provideHandlers as p, Type as q, type AppDefinedAction as r, type ConditionAction as s, type CodeConditionAction as t, type DelayAction as u, type RateLimitAction as v, type SetVariablesAction as w, type OutputAction as x, type SplitAction as y, Status as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_automations_trigger-provider",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -50,5 +50,5 @@
50
50
  "fqdn": "wix.interfaces.automations.v1.trigger_provider"
51
51
  }
52
52
  },
53
- "falconPackageHash": "ff5cacbc2545689ab756caa97184f56674bf85d4169dee0e91344442"
53
+ "falconPackageHash": "ba5b6943973fa87d57980eea5f4b674ac81f8eadc637d8813b19ed4d"
54
54
  }