@wix/auto_sdk_automations_trigger-provider 1.0.23 → 1.0.25
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.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/{service-plugins-error-classes-BYmTKKRu.d.ts → service-plugins-error-classes-B6GVJnwG.d.ts} +26 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/{service-plugins-error-classes-BYmTKKRu.d.mts → service-plugins-error-classes-B6GVJnwG.d.mts} +26 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/{service-plugins-error-classes-BYmTKKRu.d.ts → service-plugins-error-classes-B6GVJnwG.d.ts} +26 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -2
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/{service-plugins-error-classes-BYmTKKRu.d.mts → service-plugins-error-classes-B6GVJnwG.d.mts} +26 -1
- package/package.json +2 -2
|
@@ -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 ActionSettings {\n /**\n * Permanent actions. Permanent actions cannot be deleted.\n *\n * When empty, all actions can be deleted by the user.\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` language. */\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 /** 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 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 */\n skipConditionOrExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions that run in parallel after the action completes.\n * @maxSize 20\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 20\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 20\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 20\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 20\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 `dueDateEpochExpression`.\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 */\n dueDateEpochExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the time delay.\n * @maxSize 20\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 20\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 20\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 * 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 * [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\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 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> = createServicePluginModule(publicProvideHandlers);\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":";AAoNO,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;AAuKL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAiGL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AA6NL,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;;;ACr4BZ,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,mBAET,0BAA0B,eAAqB;;;ACT5C,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 ActionSettings {\n /**\n * Permanent actions. Permanent actions cannot be deleted.\n *\n * When empty, all actions can be deleted by the user.\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` language. */\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 /** 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 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 20\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 20\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 20\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 20\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 20\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 `dueDateEpochExpression` or `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/datetime string expression using bracket language.\n * The expression will be converted to JSONata and should evaluate to a timestamp/datetime format.\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 20\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 20\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 20\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 * 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 * [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 * skip_expression: evaluates to a boolean to decide if the action should be 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_expression\n * @maxLength 1000\n */\n skipExpression?: 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 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> = createServicePluginModule(publicProvideHandlers);\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":";AAoNO,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;AAyLL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAwGL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AA6NL,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;;;AC95BZ,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,mBAET,0BAA0B,eAAqB;;;ACT5C,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 { a5 as ValidateConfigurationEnvelope, a as ValidateConfigurationResponse, a6 as GetDynamicSchemaEnvelope, b as GetDynamicSchemaResponse, a7 as RefreshPayloadEnvelope, c as RefreshPayloadResponse } from './service-plugins-error-classes-
|
|
2
|
-
export { B as Action, H as ActionInfoOneOf, e as ActionSettings, q as AppDefinedAction, K as ApplicationOrigin, f as AuditInfo, g as AuditInfoIdOneOf, X as AutoArchivePolicy, A as Automation, h as AutomationConfiguration, d as AutomationOriginInfoOneOf, N as AutomationSettings, s as CodeConditionAction, m as CodeSnippet, r as ConditionAction, C as ConditionExpressionGroup, a0 as Context, t as DelayAction, D as Domain, Q as DraftInfo, E as Enrichment, U as Enrichments, W as ExtendedFields, F as Filter, k as FilterValueSelection, I as FilterableAppDefinedActions, i as FutureDateActivationOffset, G as GetDynamicSchemaRequest, a2 as IdentificationData, a3 as IdentificationDataIdOneOf, a1 as IdentityType, L as Language, Z as OnAutomationDeletedRequest, _ as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, Y as OnAutomationSavedResponse, l as Operator, J as Origin, w as OutputAction, n as Path, M as PreinstalledOrigin, P as ProviderConfigurationError, a4 as ProviderNotFoundWixError, j as RateLimit, u as RateLimitAction, R as RefreshPayloadRequest, S as SelectedFilterOptions, v as SetVariablesAction, x as SplitAction, y as Status, T as TimeUnit, z as Trigger, $ as TriggerProviderSPIConfig, o as Type, V as ValidateConfigurationRequest } from './service-plugins-error-classes-
|
|
1
|
+
import { a5 as ValidateConfigurationEnvelope, a as ValidateConfigurationResponse, a6 as GetDynamicSchemaEnvelope, b as GetDynamicSchemaResponse, a7 as RefreshPayloadEnvelope, c as RefreshPayloadResponse } from './service-plugins-error-classes-B6GVJnwG.mjs';
|
|
2
|
+
export { B as Action, H as ActionInfoOneOf, e as ActionSettings, q as AppDefinedAction, K as ApplicationOrigin, f as AuditInfo, g as AuditInfoIdOneOf, X as AutoArchivePolicy, A as Automation, h as AutomationConfiguration, d as AutomationOriginInfoOneOf, N as AutomationSettings, s as CodeConditionAction, m as CodeSnippet, r as ConditionAction, C as ConditionExpressionGroup, a0 as Context, t as DelayAction, D as Domain, Q as DraftInfo, E as Enrichment, U as Enrichments, W as ExtendedFields, F as Filter, k as FilterValueSelection, I as FilterableAppDefinedActions, i as FutureDateActivationOffset, G as GetDynamicSchemaRequest, a2 as IdentificationData, a3 as IdentificationDataIdOneOf, a1 as IdentityType, L as Language, Z as OnAutomationDeletedRequest, _ as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, Y as OnAutomationSavedResponse, l as Operator, J as Origin, w as OutputAction, n as Path, M as PreinstalledOrigin, P as ProviderConfigurationError, a4 as ProviderNotFoundWixError, j as RateLimit, u as RateLimitAction, R as RefreshPayloadRequest, S as SelectedFilterOptions, v as SetVariablesAction, x as SplitAction, y as Status, T as TimeUnit, z as Trigger, $ as TriggerProviderSPIConfig, o as Type, V as ValidateConfigurationRequest } from './service-plugins-error-classes-B6GVJnwG.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 ActionSettings {\n /**\n * Permanent actions. Permanent actions cannot be deleted.\n *\n * When empty, all actions can be deleted by the user.\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` language. */\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 /** 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 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 */\n skipConditionOrExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions that run in parallel after the action completes.\n * @maxSize 20\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 20\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 20\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 20\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 20\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 `dueDateEpochExpression`.\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 */\n dueDateEpochExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the time delay.\n * @maxSize 20\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 20\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 20\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 * 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 * [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\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 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;;;ACuLpB,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;AAuKL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAiGL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AA6NL,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 ActionSettings {\n /**\n * Permanent actions. Permanent actions cannot be deleted.\n *\n * When empty, all actions can be deleted by the user.\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` language. */\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 /** 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 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 20\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 20\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 20\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 20\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 20\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 `dueDateEpochExpression` or `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/datetime string expression using bracket language.\n * The expression will be converted to JSONata and should evaluate to a timestamp/datetime format.\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 20\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 20\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 20\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 * 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 * [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 * skip_expression: evaluates to a boolean to decide if the action should be 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_expression\n * @maxLength 1000\n */\n skipExpression?: 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 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;;;ACuLpB,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;AAyLL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAwGL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AA6NL,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"]}
|
|
@@ -420,6 +420,11 @@ interface AppDefinedAction {
|
|
|
420
420
|
*
|
|
421
421
|
* > **Note**: Actions that follow a skipped action still run.
|
|
422
422
|
* @maxSize 10
|
|
423
|
+
* @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
|
|
424
|
+
*
|
|
425
|
+
* > **Note**: Actions that follow a skipped action still run.
|
|
426
|
+
* @replacedBy skip_expression
|
|
427
|
+
* @targetRemovalDate 2026-02-01
|
|
423
428
|
*/
|
|
424
429
|
skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
|
|
425
430
|
/**
|
|
@@ -471,7 +476,7 @@ interface DelayAction {
|
|
|
471
476
|
/**
|
|
472
477
|
* Time to wait before running the action. The wait time starts from when the current action completes.
|
|
473
478
|
*
|
|
474
|
-
* > **Note**: To define the wait time from a specific moment in time, use `dueDateEpochExpression`.
|
|
479
|
+
* > **Note**: To define the wait time from a specific moment in time, use `dueDateEpochExpression` or `dueDateExpression`.
|
|
475
480
|
* @maxLength 1000
|
|
476
481
|
*/
|
|
477
482
|
offsetExpression?: string | null;
|
|
@@ -482,8 +487,21 @@ interface DelayAction {
|
|
|
482
487
|
*
|
|
483
488
|
* > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
|
|
484
489
|
* @maxLength 1000
|
|
490
|
+
* @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.
|
|
491
|
+
*
|
|
492
|
+
* > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
|
|
493
|
+
* @replacedBy due_date_expression
|
|
494
|
+
* @targetRemovalDate 2026-02-01
|
|
485
495
|
*/
|
|
486
496
|
dueDateEpochExpression?: string | null;
|
|
497
|
+
/**
|
|
498
|
+
* Action run date as a timestamp/datetime string expression using bracket language.
|
|
499
|
+
* The expression will be converted to JSONata and should evaluate to a timestamp/datetime format.
|
|
500
|
+
*
|
|
501
|
+
* > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
|
|
502
|
+
* @maxLength 1000
|
|
503
|
+
*/
|
|
504
|
+
dueDateExpression?: string | null;
|
|
487
505
|
/**
|
|
488
506
|
* IDs of actions to run in parallel after the time delay.
|
|
489
507
|
* @maxSize 20
|
|
@@ -615,6 +633,13 @@ interface Action extends ActionInfoOneOf {
|
|
|
615
633
|
* @maxLength 100
|
|
616
634
|
*/
|
|
617
635
|
namespace?: string | null;
|
|
636
|
+
/**
|
|
637
|
+
* skip_expression: evaluates to a boolean to decide if the action should be skipped
|
|
638
|
+
* For ConditionAction: if skipped, true_post_action_ids execute; false_post_action_ids are skipped
|
|
639
|
+
* SplitAction and OutputAction do not support skip_expression
|
|
640
|
+
* @maxLength 1000
|
|
641
|
+
*/
|
|
642
|
+
skipExpression?: string | null;
|
|
618
643
|
}
|
|
619
644
|
/** @oneof */
|
|
620
645
|
interface ActionInfoOneOf {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_automations_trigger-provider",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
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": "
|
|
53
|
+
"falconPackageHash": "b50dbbd002c20b0ba5ff1bba685407ed9195e480c7541247337886a1"
|
|
54
54
|
}
|