@wix/auto_sdk_automations_trigger-provider 1.0.51 → 1.0.53

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.
Files changed (29) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js +1 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +2 -2
  5. package/build/cjs/index.typings.js +1 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/{service-plugins-error-classes-cPyala5q.d.ts → service-plugins-error-classes-CNZUS91e.d.ts} +43 -23
  8. package/build/es/index.d.mts +2 -2
  9. package/build/es/index.mjs +1 -0
  10. package/build/es/index.mjs.map +1 -1
  11. package/build/es/index.typings.d.mts +2 -2
  12. package/build/es/index.typings.mjs +1 -0
  13. package/build/es/index.typings.mjs.map +1 -1
  14. package/build/es/{service-plugins-error-classes-cPyala5q.d.mts → service-plugins-error-classes-CNZUS91e.d.mts} +43 -23
  15. package/build/internal/cjs/index.d.ts +2 -2
  16. package/build/internal/cjs/index.js +1 -0
  17. package/build/internal/cjs/index.js.map +1 -1
  18. package/build/internal/cjs/index.typings.d.ts +2 -2
  19. package/build/internal/cjs/index.typings.js +1 -0
  20. package/build/internal/cjs/index.typings.js.map +1 -1
  21. package/build/internal/cjs/{service-plugins-error-classes-cPyala5q.d.ts → service-plugins-error-classes-CNZUS91e.d.ts} +43 -23
  22. package/build/internal/es/index.d.mts +2 -2
  23. package/build/internal/es/index.mjs +1 -0
  24. package/build/internal/es/index.mjs.map +1 -1
  25. package/build/internal/es/index.typings.d.mts +2 -2
  26. package/build/internal/es/index.typings.mjs +1 -0
  27. package/build/internal/es/index.typings.mjs.map +1 -1
  28. package/build/internal/es/{service-plugins-error-classes-cPyala5q.d.mts → service-plugins-error-classes-CNZUS91e.d.mts} +43 -23
  29. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
- import { p as provideHandlers$1 } from './service-plugins-error-classes-cPyala5q.mjs';
2
- export { e as AIMetadata, I as Action, J as ActionInfoOneOf, f as ActionSettings, s as AppDefinedAction, N as ApplicationOrigin, g as AuditInfo, h as AuditInfoIdOneOf, Z as AutoArchivePolicy, A as Automation, i as AutomationConfiguration, d as AutomationOriginInfoOneOf, U as AutomationSettings, u as CodeConditionAction, o as CodeSnippet, t as ConditionAction, C as ConditionExpressionGroup, a7 as Context, v as DelayAction, a2 as Dimensions, D as Domain, W as DraftInfo, E as Enrichment, X as Enrichments, Y as ExtendedFields, F as Filter, m as FilterValueSelection, K as FilterableAppDefinedActions, k as FutureDateActivationOffset, G as GetDynamicSchemaRequest, b as GetDynamicSchemaResponse, a9 as IdentificationData, aa as IdentificationDataIdOneOf, a8 as IdentityType, L as Language, $ as Note, _ as Notes, a1 as Offset, a4 as OnAutomationDeletedRequest, a5 as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, a3 as OnAutomationSavedResponse, n as Operator, M as Origin, y as OutputAction, q as Path, a0 as Position, Q as PreinstalledOrigin, P as ProviderConfigurationError, ab as ProviderNotFoundWixError, l as RateLimit, w as RateLimitAction, R as RefreshPayloadRequest, c as RefreshPayloadResponse, S as SelectedFilterOptions, x as SetVariablesAction, z as SplitAction, B as Status, j as TimeUnit, H as Trigger, a6 as TriggerProviderSPIConfig, T as TriggerSettings, r as Type, V as ValidateConfigurationRequest, a as ValidateConfigurationResponse } from './service-plugins-error-classes-cPyala5q.mjs';
1
+ import { p as provideHandlers$1 } from './service-plugins-error-classes-CNZUS91e.mjs';
2
+ export { e as AIMetadata, I as Action, J as ActionInfoOneOf, f as ActionSettings, s as AppDefinedAction, N as ApplicationOrigin, g as AuditInfo, h as AuditInfoIdOneOf, Z as AutoArchivePolicy, A as Automation, i as AutomationConfiguration, d as AutomationOriginInfoOneOf, U as AutomationSettings, u as CodeConditionAction, o as CodeSnippet, t as ConditionAction, C as ConditionExpressionGroup, a7 as Context, v as DelayAction, a2 as Dimensions, D as Domain, W as DraftInfo, E as Enrichment, X as Enrichments, Y as ExtendedFields, F as Filter, m as FilterValueSelection, K as FilterableAppDefinedActions, k as FutureDateActivationOffset, G as GetDynamicSchemaRequest, b as GetDynamicSchemaResponse, a9 as IdentificationData, aa as IdentificationDataIdOneOf, a8 as IdentityType, L as Language, $ as Note, _ as Notes, a1 as Offset, a4 as OnAutomationDeletedRequest, a5 as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, a3 as OnAutomationSavedResponse, n as Operator, M as Origin, y as OutputAction, q as Path, a0 as Position, Q as PreinstalledOrigin, P as ProviderConfigurationError, ab as ProviderNotFoundWixError, l as RateLimit, w as RateLimitAction, R as RefreshPayloadRequest, c as RefreshPayloadResponse, S as SelectedFilterOptions, x as SetVariablesAction, z as SplitAction, B as Status, j as TimeUnit, H as Trigger, a6 as TriggerProviderSPIConfig, T as TriggerSettings, r as Type, V as ValidateConfigurationRequest, a as ValidateConfigurationResponse } from './service-plugins-error-classes-CNZUS91e.mjs';
3
3
  import { BuildServicePluginDefinition } from '@wix/sdk-types';
4
4
 
5
5
  declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1> & typeof provideHandlers$1;
@@ -29,6 +29,7 @@ var Type = /* @__PURE__ */ ((Type2) => {
29
29
  Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
30
30
  Type2["APP_DEFINED"] = "APP_DEFINED";
31
31
  Type2["CONDITION"] = "CONDITION";
32
+ Type2["CODE_CONDITION"] = "CODE_CONDITION";
32
33
  Type2["DELAY"] = "DELAY";
33
34
  Type2["RATE_LIMIT"] = "RATE_LIMIT";
34
35
  return Type2;
@@ -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 /** Scheme field key. */\n fieldKey?: string | null;\n /** Error message. */\n message?: string;\n /** Label for the call-to-action button displayed with the error. */\n ctaLabel?: string | null;\n /** When the call-to-action button is clicked, the redirect URL. */\n ctaUrl?: string | null;\n /** Error title. */\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. Applied only for pre-installed and application automations. Not applied to User origin automations */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/** @oneof */\nexport interface AutomationOriginInfoOneOf {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n}\n\nexport interface AIMetadata {\n /**\n * Origin agent identifier.\n * @minLength 1\n * @maxLength 64\n */\n originAgentIdentifier?: string | null;\n}\n\nexport interface ActionSettings {\n /**\n * Permanent actions. PermanentAction's skipActionExpression cannot be modified.\n *\n * When empty, all actions can be set as skipped\n * @maxSize 30\n * @format GUID\n */\n permanentActionIds?: string[];\n /**\n * Read-only actions. Read-only actions cannot be edited.\n *\n * When empty, all actions are editable.\n * @maxSize 30\n * @format GUID\n */\n readonlyActionIds?: string[];\n}\n\nexport enum Domain {\n /** User domain (default). */\n USER = 'USER',\n /** Wix domain. */\n WIX = 'WIX',\n /** Wix account-level domain. */\n WIX_ACCOUNT = 'WIX_ACCOUNT',\n}\n\nexport interface TriggerSettings {}\n\nexport interface Enrichment {\n /**\n * Enrichment input mappings.\n * @maxSize 2\n */\n inputMappings?: Record<string, any>[] | null;\n}\n\nexport interface AuditInfo extends AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface AutomationConfiguration {\n /** Status of the automation on the site. */\n status?: Status;\n /** Trigger configuration. */\n trigger?: Trigger;\n /**\n * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.\n *\n * > **Note**: You can currently only specify 1 root action.\n * @maxSize 20\n * @format GUID\n */\n rootActionIds?: string[];\n /** Actions the automation can execute, as `key:value` pairs. For the key, specify the action ID. The value must be an object structured as described below. */\n actions?: Record<string, Action>;\n}\n\nexport enum TimeUnit {\n UNKNOWN_TIME_UNIT = 'UNKNOWN_TIME_UNIT',\n /** Minutes. */\n MINUTES = 'MINUTES',\n /** Hours. */\n HOURS = 'HOURS',\n /** Days. */\n DAYS = 'DAYS',\n /** Weeks. */\n WEEKS = 'WEEKS',\n /** Months. */\n MONTHS = 'MONTHS',\n}\n\nexport interface Filter {\n /**\n * Filter ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Field key.\n *\n * You can find the field key in [the trigger payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema).\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Filter expression.\n *\n * For the automation to run, the expression must evaluate to `true`.\n * @maxLength 2500\n */\n filterExpression?: string;\n}\n\nexport interface FutureDateActivationOffset {\n /**\n * Amount of time before the trigger to run the automation.\n *\n * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).\n * @maxLength 1000\n */\n preScheduledEventOffsetExpression?: string;\n /** Unit in which to set the action offset. */\n scheduledEventOffsetTimeUnit?: TimeUnit;\n}\n\nexport interface RateLimit {\n /**\n * Maximum number of times the trigger can be activated.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Duration of the rate limit. The rate limit applies for the specified duration and then expires.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n durationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n durationTimeUnit?: TimeUnit;\n /**\n * Activation identifier used to count the number of activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n}\n\nexport interface FilterValueSelection {\n /**\n * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.\n * @maxLength 80\n * @maxSize 50\n */\n selectedFilterValues?: string[];\n}\n\nexport interface ConditionExpressionGroup {\n /** Logical operator used to evaluate the condition expressions. */\n operator?: Operator;\n /**\n * Expressions evaluated using the selected operator.\n * @minSize 1\n * @maxSize 20\n * @maxLength 2500\n */\n booleanExpressions?: string[];\n}\n\nexport enum Operator {\n /** Unknown. */\n UNKNOWN_OPERATOR = 'UNKNOWN_OPERATOR',\n /** `OR` operator. */\n OR = 'OR',\n /** `AND` operator. */\n AND = 'AND',\n}\n\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: Language;\n /**\n * Expressions evaluated using the selected operator. this code should comply the language syntax. and format\n * @maxLength 1000\n */\n code?: string;\n}\n\nexport enum Language {\n /** Unknown. */\n UNKNOWN_LANGUAGE = 'UNKNOWN_LANGUAGE',\n /** JavaScript. */\n JAVASCRIPT = 'JAVASCRIPT',\n}\n\n/** Path definition */\nexport interface Path {\n /**\n * Unique path ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Path display name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * ID of the action to run when this path is taken.\n * @format GUID\n */\n postActionId?: string | null;\n}\n\nexport enum Type {\n /** Based on the trigger. */\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */\n APP_DEFINED = 'APP_DEFINED',\n /** Condition. This determines which action runs next. */\n CONDITION = 'CONDITION',\n /** Delay. The automation must wait before executing the next step. */\n DELAY = 'DELAY',\n /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */\n RATE_LIMIT = 'RATE_LIMIT',\n}\n\nexport interface AppDefinedAction {\n /**\n * ID of the app that defines the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /**\n * Action input mapping as defined in the action's [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema).\n *\n * The input mapping must include all parameters specified in the action's input schema's `required` array, and can include any other parameters from the schema.\n */\n inputMapping?: Record<string, any> | null;\n /**\n * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @maxSize 10\n * @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @replacedBy skip_action_expression\n * @targetRemovalDate 2026-02-01\n */\n skipConditionOrExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions that run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n /** Action output schema. When specified, this replaces the action schema. */\n overrideOutputSchema?: Record<string, any> | null;\n}\n\nexport interface ConditionAction {\n /**\n * Condition is `true` if one or more of the expression groups evaluates to `true`.\n * @minSize 1\n * @maxSize 10\n */\n orExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface CodeConditionAction {\n /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */\n snippet?: CodeSnippet;\n /**\n * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.\n * this list is mainly for validation purpose.\n * @maxSize 50\n * @maxLength 100\n */\n dynamicVariableExpressions?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface DelayAction {\n /**\n * Time to wait before running the action. The wait time starts from when the current action completes.\n *\n * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.\n * @maxLength 1000\n */\n offsetExpression?: string | null;\n /** Unit in which to set the wait time to wait before the action runs. */\n offsetTimeUnit?: TimeUnit;\n /**\n * Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n * @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @replacedBy due_date_expression\n * @targetRemovalDate 2026-02-01\n */\n dueDateEpochExpression?: string | null;\n /**\n * Action run date as a timestamp or DateTime expression using bracket notation.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n */\n dueDateExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the time delay.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface RateLimitAction {\n /**\n * Maximum number of times the action can run.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Rate limit duration.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n rateLimitDurationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n rateLimitDurationTimeUnit?: TimeUnit;\n /**\n * Unique identifier of each activation by which rate limiter counts activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface SetVariablesAction {\n /** Output mapping. For example: `{\"someField\": \"{{10}}\", \"someOtherField\": \"{{multiply( var('account.points.balance') ;2 )}}\" }`. */\n outputMapping?: Record<string, any> | null;\n /**\n * Output JSON schema representation.\n *\n * > **Note**: To minimize request size, you can also specify a string.\n */\n outputSchema?: Record<string, any> | null;\n /**\n * IDs of actions to run in parallel after variable initialization.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface OutputAction {\n /** Output action output mapping. */\n outputMapping?: Record<string, any> | null;\n}\n\nexport interface SplitAction {\n /**\n * List of paths to split execution into.\n * @minSize 2\n * @maxSize 10\n */\n paths?: Path[];\n}\n\nexport enum Status {\n /** Unknown. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Active. Active automations can be triggered. */\n ACTIVE = 'ACTIVE',\n /** Inactive. Inactive automations cannot be triggered. */\n INACTIVE = 'INACTIVE',\n}\n\nexport interface Trigger {\n /**\n * ID of the app that defines the trigger.\n * @format GUID\n */\n appId?: string;\n /**\n * Trigger key.\n *\n * Learn about [setting up a trigger](https://dev.wix.com/docs/rest/business-management/automations/triggers/add-a-trigger-to-your-app#step-1--set-up-the-trigger).\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * Schema field filters. All filter conditions must be met for the automation to run.\n *\n * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#filters).\n * @maxSize 5\n */\n filters?: Filter[];\n /**\n * Automation offset. You can schedule automations to run before the trigger occurs.\n *\n * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).\n */\n scheduledEventOffset?: FutureDateActivationOffset;\n /** Limit on the number of times an automation can be triggered. */\n rateLimit?: RateLimit;\n /** Trigger schema override. When specified, this replaces the trigger schema. */\n overrideSchema?: Record<string, any> | null;\n}\n\nexport interface Action extends ActionInfoOneOf {\n /** Details of the action when its `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action when its `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action when its `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action when its `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action when its `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n /**\n * Action ID.\n *\n * Unique identifier for the action instance in the current automation. Use this to refer to this action in the automation flow.\n *\n * If not specified, automatically generated by Wix.\n * @format GUID\n */\n _id?: string | null;\n /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#action-type). */\n type?: Type;\n /**\n * Editable display name for the action.\n * @minLength 1\n * @maxLength 60\n */\n displayName?: string | null;\n /**\n * [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#namespace). This differentiates it from other actions of the same type.\n *\n * If the action outputs any data, the data appears under the namespace in the payload sent to the subsequent steps in the automation. If the user has multiple actions with the same `appId` and `actionKey`, the output of the previous action is overwritten.\n * @minLength 1\n * @maxLength 100\n */\n namespace?: string | null;\n /**\n * Evaluated to boolean to decide whether the action is skipped.\n * For ConditionAction: if skipped, true_post_action_ids execute; false_post_action_ids are skipped\n * SplitAction and OutputAction do not support skip_action_expression\n * @maxLength 1000\n */\n skipActionExpression?: string | null;\n}\n\n/** @oneof */\nexport interface ActionInfoOneOf {\n /** Details of the action when its `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action when its `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action when its `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action when its `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action when its `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n}\n\nexport interface FilterableAppDefinedActions {\n /**\n * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.\n * @minSize 1\n * @maxSize 100\n * @minLength 1\n * @maxLength 150\n */\n actionIdentifiers?: string[];\n}\n\nexport enum Origin {\n /** Default value. */\n UNKNOWN_ORIGIN = 'UNKNOWN_ORIGIN',\n /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */\n USER = 'USER',\n /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */\n APPLICATION = 'APPLICATION',\n /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */\n PREINSTALLED = 'PREINSTALLED',\n}\n\nexport interface ApplicationOrigin {\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface PreinstalledOrigin {\n /**\n * ID of the app that added the [preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations).\n * @format GUID\n */\n appId?: string;\n /**\n * Whether the automation is an override.\n *\n * When a user modifies the preinstalled automation installed on their site, a site-specific version of the automation is created that overrides the automation that was originally installed. This override automation has the same automation ID as the original preinstalled automation.\n *\n * > **Note**: An override automation can no longer be updated by the app that originally installed it.\n * >\n * > To revert to the original preinstalled version, the user must delete the override by calling the Delete Automation method. Calling Delete Automation on an override automation removes the override method and restores the preinstalled automation that was previously installed.\n *\n * Default: `false`.\n * @immutable\n * @readonly\n */\n override?: boolean | null;\n}\n\nexport interface AutomationSettings {\n /**\n * Whether the automation is hidden from users.\n *\n * Default: `false`\n */\n hidden?: boolean;\n /**\n * Whether the automation is read-only.\n * If true - modifications to the automation trigger or action/s are disabled.\n * **Note**: this setting takes precedent over triggerSettings/actionSettings.\n * If false - allows selective read-only settings via those fields.\n *\n * Default: `false`\n */\n readonly?: boolean;\n /**\n * Whether to disable the option to delete the automation from the site.\n *\n * Default: `false`.\n */\n disableDelete?: boolean;\n /**\n * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.\n *\n * Default: `false`.\n */\n disableStatusChange?: boolean;\n /** Automation action settings. */\n actionSettings?: ActionSettings;\n}\n\nexport interface DraftInfo {\n /**\n * ID of the original automation.\n * @format GUID\n * @readonly\n */\n originalAutomationId?: string | null;\n}\n\nexport interface Enrichments {\n /** Whether the studio site enrichment is wanted. */\n studioSite?: Enrichment;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface AutoArchivePolicy {\n /**\n * Date when to archive the automation\n * If this date in the past, nothing will happen (automation will not go into archived state)\n * If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE\n * After this date the automation may be unarchived and archived again, this date will have no influence\n */\n archiveDate?: Date | null;\n}\n\nexport interface Notes {}\n\nexport interface Note {}\n\nexport interface Position {}\n\nexport interface Offset {}\n\nexport interface Dimensions {}\n\nexport interface OnAutomationSavedResponse {}\n\nexport interface OnAutomationDeletedRequest {\n /**\n * ID of the deleted automation.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface OnAutomationDeletedResponse {}\n\nexport interface TriggerProviderSPIConfig {\n /**\n * The trigger configuration\n *\n * example of a trigger:\n *\n * {\n * appId: \"56cc7843-fdfc-417f-a660-d4af9a2eafe3\",\n * triggerKey: \"form_submit\",\n * displayName: \"Visitor submits a form\",\n * payloadDataSchema: {\n * \"$schema\": \"http://json-schema.org/draft-07/schema\",\n * \"type\": \"object\",\n * \"title\": \"Visitor submits a form Payload Schema\",\n * \"description\": \"The schema of the payload that is part of the triggered event\",\n * \"default\": {},\n * \"examples\": [\n * {\n * \"formId\": \"60d2cd50-1047-4164-884d-8c24fbda84bb\",\n * \"formName\": \"My Cool Form\n * }\n * ],\n * \"properties\": {\n * \"formId\": {\n * \"$id\": \"#/properties/formId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Form ID\",\n * \"description\": \"The form identifier\",\n * \"default\": \"\",\n * \"examples\": [\n * \"60d2cd50-1047-4164-884d-8c24fbda84bb\"\n * ]\n * },\n * \"formName\": {\n * \"$id\": \"#/properties/formName\",\n * \"type\": \"string\",\n * \"title\": \"Form Name\",\n * \"description\": \"The form display name\",\n * \"default\": \"\",\n * \"examples\": [\n * \"My Form\"\n * ]\n * },\n * \"contactId\": {\n * \"$id\": \"#/properties/contactId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Contact Id\",\n * \"description\": \"The Id of the contact which submitted the form\",\n * \"default\": \"\",\n * \"identityType\": \"contact\", // can be contact, visitor, user limited to 1 type per identity,\n * \"namespace\": \"contact\" // friendly name to be used later on, in order to user that person's data \"contact.firstName\"\n * }\n * },\n * \"required\": [\n * \"formId\",\n * \"formName\",\n * \"contactId\"\n * ],\n * \"additionalProperties\": false\n * }\n * }\n */\n triggerConfig?: Record<string, any> | null;\n /** URL to the trigger provider service */\n baseUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n","import { ServicePluginDefinition } from '@wix/sdk-types';\nimport {\n Context,\n ValidateConfigurationRequest,\n ValidateConfigurationResponse,\n GetDynamicSchemaRequest,\n GetDynamicSchemaResponse,\n RefreshPayloadRequest,\n RefreshPayloadResponse,\n} from './service-plugins-types.js';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\n\nexport interface ValidateConfigurationEnvelope {\n request: ValidateConfigurationRequest;\n metadata: Context;\n}\n\nexport interface GetDynamicSchemaEnvelope {\n request: GetDynamicSchemaRequest;\n metadata: Context;\n}\n\nexport interface RefreshPayloadEnvelope {\n request: RefreshPayloadRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * This endpoint allows you to run your own logic to validate trigger fields. Implement this endpoint if you need to perform extra validation on top of\n * the Wix validation process.\n *\n * Wix calls Validate Configuration in the following cases:\n *\n * - When a Wix user activates the automation.\n * - When a Wix user selects the automation from the **Your automations** list in the [**Automations**](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations)\n * dashboard.\n * - When a Wix user opens the automation to edit it.\n *\n * If the user configured filters when setting up their automation, these are included in the request.\n * Wix uses the returned response to display an error message to a user if the requested trigger is invalid. */\n validateConfiguration(\n payload: ValidateConfigurationEnvelope\n ): ValidateConfigurationResponse | Promise<ValidateConfigurationResponse>;\n\n /**\n *\n * This endpoint returns a [JSON schema](https://json-schema.org/) object\n * that's used to dynamically update the fields available to a Wix user\n * when they configure an [automation](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations).\n *\n * Wix calls this endpoint when a user selects an option from an\n * [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection)\n * configured for a trigger.\n * Wix appends the returned schema to the\n * [payload schema](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/payload-schema)\n * you defined for the trigger and makes the fields available to the Wix user's automation. */\n getDynamicSchema(\n payload: GetDynamicSchemaEnvelope\n ): GetDynamicSchemaResponse | Promise<GetDynamicSchemaResponse>;\n\n /**\n *\n * If an automation's action is delayed, implement this method to retrieve the latest data in the trigger payload before the action fires.\n *\n * For example, if an automation is triggered but its action is set to fire only 24 hours later, Wix calls Refresh Payload before starting\n * the action. This fetches the latest data in the trigger payload. The returned data can be used to update the trigger payload that is passed\n * to the action. */\n refreshPayload(\n payload: RefreshPayloadEnvelope\n ): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;\n}>('AUTOMATIONS_TRIGGER_PROVIDER', [\n {\n name: 'validateConfiguration',\n primaryHttpMappingPath: '/validate-configuration',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'getDynamicSchema',\n primaryHttpMappingPath: '/dynamic-schema',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'refreshPayload',\n primaryHttpMappingPath: '/refresh-payload',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-automations-v1-trigger-provider.public.js';\nimport { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';\nimport { BuildServicePluginDefinition } from '@wix/sdk-types';\nimport { provideHandlers as publicProvideHandlers } from './interfaces-automations-v1-trigger-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> &\n typeof publicProvideHandlers = createServicePluginModule(\n publicProvideHandlers\n);\n","export class ProviderNotFoundWixError extends Error {\n /** @hidden */\n httpCode: number;\n /** @hidden */\n statusCode: string;\n /** @hidden */\n applicationCode: string;\n /** @hidden */\n name: string;\n /** @hidden */\n errorType: string;\n /** @hidden */\n spiErrorData: object;\n\n constructor() {\n super('ProviderNotFound');\n\n this.httpCode = 404;\n this.statusCode = 'NOT_FOUND';\n this.applicationCode = 'PROVIDER_NOT_FOUND';\n this.name = 'ProviderNotFound';\n this.errorType = 'SPI';\n this.spiErrorData = {\n name: 'ProviderNotFound',\n applicationCode: 'PROVIDER_NOT_FOUND',\n };\n }\n\n /** @hidden */\n static readonly __type = 'wix_spi_error';\n}\n"],"mappings":";AAiNO,IAAK,SAAL,kBAAKA,YAAL;AAEL,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,SAAM;AAEN,EAAAA,QAAA,iBAAc;AANJ,SAAAA;AAAA,GAAA;AAmEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,uBAAoB;AAEpB,EAAAA,UAAA,aAAU;AAEV,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,UAAO;AAEP,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,YAAS;AAXC,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,QAAK;AAEL,EAAAA,UAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAmBL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AA2BL,IAAK,OAAL,kBAAKC,UAAL;AAEL,EAAAA,MAAA,yBAAsB;AAEtB,EAAAA,MAAA,iBAAc;AAEd,EAAAA,MAAA,eAAY;AAEZ,EAAAA,MAAA,WAAQ;AAER,EAAAA,MAAA,gBAAa;AAVH,SAAAA;AAAA,GAAA;AAmML,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAgHL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AA0OL,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;;;AC57BZ,SAAS,+BAA+B;AAUxC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAiBA,IAAM,kBAAkB,wBA6C5B,gCAAgC;AAAA,EACjC;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;AC7HD,SAAS,iCAAiC;AAMnC,IAAMC,mBAGoB;AAAA,EAC/B;AACF;;;ACZO,IAAM,2BAAN,cAAuC,MAAM;AAAA,EAclD,cAAc;AACZ,UAAM,kBAAkB;AAExB,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAIF;AAAA;AA9Ba,yBA6BK,SAAS;","names":["Domain","TimeUnit","Operator","Language","Type","Status","Origin","IdentityType","provideHandlers"]}
1
+ {"version":3,"sources":["../../src/service-plugins-types.ts","../../src/interfaces-automations-v1-trigger-provider.public.ts","../../src/interfaces-automations-v1-trigger-provider.context.ts","../../src/service-plugins-error-classes.ts"],"sourcesContent":["export interface ValidateConfigurationRequest {\n /**\n * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.\n * @minLength 1\n * @maxLength 100\n */\n triggerKey: string;\n /**\n * Current selection state of the trigger's filters.\n * @maxSize 5\n */\n selectedFilterOptions?: SelectedFilterOptions[];\n /** Trigger configuration mapping that's saved on the automation. */\n automationConfigMapping?: Record<string, any> | null;\n}\n\nexport interface SelectedFilterOptions {\n /**\n * Key representing a field from the trigger's [payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema) that has been configured as an [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection). For example `formId`.\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Values selected for the filter field.\n * @maxSize 100\n */\n values?: string[];\n}\n\nexport interface ValidateConfigurationResponse {\n /** Whether the trigger configuration is valid. */\n valid?: boolean;\n /** Error details for an invalid trigger configuration. */\n configurationErrors?: ProviderConfigurationError[];\n}\n\nexport interface ProviderConfigurationError {\n /** Scheme field key. */\n fieldKey?: string | null;\n /** Error message. */\n message?: string;\n /** Label for the call-to-action button displayed with the error. */\n ctaLabel?: string | null;\n /** When the call-to-action button is clicked, the redirect URL. */\n ctaUrl?: string | null;\n /** Error title. */\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. Applied only for pre-installed and application automations. Not applied to User origin automations */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/** @oneof */\nexport interface AutomationOriginInfoOneOf {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n}\n\nexport interface AIMetadata {\n /**\n * Origin agent identifier.\n * @minLength 1\n * @maxLength 64\n */\n originAgentIdentifier?: string | null;\n}\n\nexport interface ActionSettings {\n /**\n * IDs of actions whose `skipActionExpression` can't be modified.\n *\n * An action's `skipActionExpression` determines whether the action is skipped. Including an action's ID in this array makes its `skipActionExpression` permanent, so it can't be changed.\n *\n * When empty, the `skipActionExpression` of all actions can be edited.\n * @maxSize 30\n * @format GUID\n */\n permanentActionIds?: string[];\n /**\n * IDs of read-only actions. Read-only actions cannot be modified.\n *\n * When empty and the automation's `settings.readonly` is `false`, all actions are modifiable.\n * @maxSize 30\n * @format GUID\n */\n readonlyActionIds?: string[];\n}\n\nexport enum Domain {\n /** User domain (default). */\n USER = 'USER',\n /** Wix domain. */\n WIX = 'WIX',\n /** Wix account-level domain. */\n WIX_ACCOUNT = 'WIX_ACCOUNT',\n}\n\nexport interface TriggerSettings {}\n\nexport interface Enrichment {\n /**\n * Enrichment input mappings.\n * @maxSize 2\n */\n inputMappings?: Record<string, any>[] | null;\n}\n\nexport interface AuditInfo extends AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface AutomationConfiguration {\n /** Status of the automation on the site. */\n status?: Status;\n /** Trigger configuration. */\n trigger?: Trigger;\n /**\n * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.\n *\n * > **Note**: You can currently only specify 1 root action.\n * @maxSize 20\n * @format GUID\n */\n rootActionIds?: string[];\n /** Actions the automation can execute, as `key:value` pairs. For the key, specify the action ID. The value must be an object structured as described below. */\n actions?: Record<string, Action>;\n}\n\nexport enum TimeUnit {\n UNKNOWN_TIME_UNIT = 'UNKNOWN_TIME_UNIT',\n /** Minutes. */\n MINUTES = 'MINUTES',\n /** Hours. */\n HOURS = 'HOURS',\n /** Days. */\n DAYS = 'DAYS',\n /** Weeks. */\n WEEKS = 'WEEKS',\n /** Months. */\n MONTHS = 'MONTHS',\n}\n\nexport interface Filter {\n /**\n * Filter ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Field key.\n *\n * You can find the field key in [the trigger payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema).\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Filter expression.\n *\n * For the automation to run, the expression must evaluate to `true`.\n * @maxLength 2500\n */\n filterExpression?: string;\n}\n\nexport interface FutureDateActivationOffset {\n /**\n * Amount of time before the trigger to run the automation.\n *\n * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).\n * @maxLength 1000\n */\n preScheduledEventOffsetExpression?: string;\n /** Unit in which to set the action offset. */\n scheduledEventOffsetTimeUnit?: TimeUnit;\n}\n\nexport interface RateLimit {\n /**\n * Maximum number of times the trigger can be activated.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Duration of the rate limit. The rate limit applies for the specified duration and then expires.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n durationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n durationTimeUnit?: TimeUnit;\n /**\n * Activation identifier used to count the number of activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n}\n\nexport interface FilterValueSelection {\n /**\n * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.\n * @maxLength 80\n * @maxSize 50\n */\n selectedFilterValues?: string[];\n}\n\nexport interface ConditionExpressionGroup {\n /** Logical operator used to evaluate the condition expressions. */\n operator?: Operator;\n /**\n * Expressions evaluated using the selected operator.\n * @minSize 1\n * @maxSize 20\n * @maxLength 2500\n */\n booleanExpressions?: string[];\n}\n\nexport enum Operator {\n /** Unknown. */\n UNKNOWN_OPERATOR = 'UNKNOWN_OPERATOR',\n /** `OR` operator. */\n OR = 'OR',\n /** `AND` operator. */\n AND = 'AND',\n}\n\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: Language;\n /**\n * Expressions evaluated using the selected operator. this code should comply the language syntax. and format\n * @maxLength 1000\n */\n code?: string;\n}\n\nexport enum Language {\n /** Unknown. */\n UNKNOWN_LANGUAGE = 'UNKNOWN_LANGUAGE',\n /** JavaScript. */\n JAVASCRIPT = 'JAVASCRIPT',\n}\n\n/** Path definition */\nexport interface Path {\n /**\n * Unique path ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Path display name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * ID of the action to run when this path is taken.\n * @format GUID\n */\n postActionId?: string | null;\n}\n\nexport enum Type {\n /** Based on the trigger. */\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */\n APP_DEFINED = 'APP_DEFINED',\n /**\n * Condition action. Evaluates a condition to determine which action runs next.\n *\n * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.\n *\n * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `conditionInfo.truePostActionIds` run and those in `conditionInfo.falsePostActionIds` are skipped.\n */\n CONDITION = 'CONDITION',\n /**\n * Code condition action. Evaluates custom code to determine which action runs next.\n *\n * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.\n *\n * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `codeConditionInfo.truePostActionIds` run and those in `codeConditionInfo.falsePostActionIds` are skipped.\n */\n CODE_CONDITION = 'CODE_CONDITION',\n /** Delay. The automation must wait before executing the next step. */\n DELAY = 'DELAY',\n /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */\n RATE_LIMIT = 'RATE_LIMIT',\n}\n\nexport interface AppDefinedAction {\n /**\n * ID of the app that defines the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /**\n * Action input mapping as defined in the action's [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema).\n *\n * The input mapping must include all parameters specified in the action's input schema's `required` array, and can include any other parameters from the schema.\n */\n inputMapping?: Record<string, any> | null;\n /**\n * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @maxSize 10\n * @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @replacedBy skip_action_expression\n * @targetRemovalDate 2026-02-01\n */\n skipConditionOrExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions that run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n /** Action output schema. When specified, this replaces the action schema. */\n overrideOutputSchema?: Record<string, any> | null;\n}\n\nexport interface ConditionAction {\n /**\n * Condition is `true` if one or more of the expression groups evaluates to `true`.\n * @minSize 1\n * @maxSize 10\n */\n orExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface CodeConditionAction {\n /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */\n snippet?: CodeSnippet;\n /**\n * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.\n * this list is mainly for validation purpose.\n * @maxSize 50\n * @maxLength 100\n */\n dynamicVariableExpressions?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface DelayAction {\n /**\n * Time to wait before running the action. The wait time starts from when the current action completes.\n *\n * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.\n * @maxLength 1000\n */\n offsetExpression?: string | null;\n /** Unit in which to set the wait time to wait before the action runs. */\n offsetTimeUnit?: TimeUnit;\n /**\n * Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n * @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @replacedBy due_date_expression\n * @targetRemovalDate 2026-02-01\n */\n dueDateEpochExpression?: string | null;\n /**\n * Action run date as a timestamp or DateTime expression using bracket notation.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n */\n dueDateExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the time delay.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface RateLimitAction {\n /**\n * Maximum number of times the action can run.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Rate limit duration.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n rateLimitDurationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n rateLimitDurationTimeUnit?: TimeUnit;\n /**\n * Unique identifier of each activation by which rate limiter counts activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface SetVariablesAction {\n /** Output mapping. For example: `{\"someField\": \"{{10}}\", \"someOtherField\": \"{{multiply( var('account.points.balance') ;2 )}}\" }`. */\n outputMapping?: Record<string, any> | null;\n /**\n * Output JSON schema representation.\n *\n * > **Note**: To minimize request size, you can also specify a string.\n */\n outputSchema?: Record<string, any> | null;\n /**\n * IDs of actions to run in parallel after variable initialization.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface OutputAction {\n /** Output action output mapping. */\n outputMapping?: Record<string, any> | null;\n}\n\nexport interface SplitAction {\n /**\n * List of paths to split execution into.\n * @minSize 2\n * @maxSize 10\n */\n paths?: Path[];\n}\n\nexport enum Status {\n /** Unknown. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Active. Active automations can be triggered. */\n ACTIVE = 'ACTIVE',\n /** Inactive. Inactive automations cannot be triggered. */\n INACTIVE = 'INACTIVE',\n}\n\nexport interface Trigger {\n /**\n * ID of the app that defines the trigger.\n * @format GUID\n */\n appId?: string;\n /**\n * Trigger key.\n *\n * Learn about [setting up a trigger](https://dev.wix.com/docs/rest/business-management/automations/triggers/add-a-trigger-to-your-app#step-1--set-up-the-trigger).\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * Schema field filters. All filter conditions must be met for the automation to run.\n *\n * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#filters).\n * @maxSize 5\n */\n filters?: Filter[];\n /**\n * Automation offset. You can schedule automations to run before the trigger occurs.\n *\n * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).\n */\n scheduledEventOffset?: FutureDateActivationOffset;\n /** Limit on the number of times an automation can be triggered. */\n rateLimit?: RateLimit;\n /** Trigger schema override. When specified, this replaces the trigger schema. */\n overrideSchema?: Record<string, any> | null;\n}\n\nexport interface Action extends ActionInfoOneOf {\n /** Details of the action whose `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action whose `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action whose `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action whose `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action whose `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n /**\n * Action ID.\n *\n * Unique identifier for the action instance in the current automation. Use this to refer to this action in the automation flow.\n *\n * If not specified, automatically generated by Wix.\n * @format GUID\n */\n _id?: string | null;\n /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#action-type). */\n type?: Type;\n /**\n * Editable display name for the action.\n * @minLength 1\n * @maxLength 60\n */\n displayName?: string | null;\n /**\n * [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#namespace). This differentiates it from other actions of the same type.\n *\n * If the action outputs any data, the data appears under the namespace in the payload sent to the subsequent steps in the automation. If the user has multiple actions with the same `appId` and `actionKey`, the output of the previous action is overwritten.\n * @minLength 1\n * @maxLength 100\n */\n namespace?: string | null;\n /**\n * Evaluated to determine whether the action is skipped. When evaluated to `true`, the action is skipped. Otherwise, the action runs.\n *\n * When empty, the action runs.\n * @maxLength 1000\n */\n skipActionExpression?: string | null;\n}\n\n/** @oneof */\nexport interface ActionInfoOneOf {\n /** Details of the action whose `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action whose `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action whose `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action whose `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action whose `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 * When `true`, site owners can't modify the automation or any of its actions. When `false`, users can configure specific actions as skippable or read-only using `settings.actionSettings`.\n *\n * Default: `false`.\n *\n * > **Note**: Setting `readOnly` to `true` overrides `settings.actionSettings`.\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`.\n *\n * Default: `false`.\n */\n disableStatusChange?: boolean;\n /** Automation action settings. */\n actionSettings?: ActionSettings;\n}\n\nexport interface DraftInfo {\n /**\n * ID of the original automation.\n * @format GUID\n * @readonly\n */\n originalAutomationId?: string | null;\n}\n\nexport interface Enrichments {\n /** Whether the studio site enrichment is wanted. */\n studioSite?: Enrichment;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface AutoArchivePolicy {\n /**\n * Date when to archive the automation\n * If this date in the past, nothing will happen (automation will not go into archived state)\n * If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE\n * After this date the automation may be unarchived and archived again, this date will have no influence\n */\n archiveDate?: Date | null;\n}\n\nexport interface Notes {}\n\nexport interface Note {}\n\nexport interface Position {}\n\nexport interface Offset {}\n\nexport interface Dimensions {}\n\nexport interface OnAutomationSavedResponse {}\n\nexport interface OnAutomationDeletedRequest {\n /**\n * ID of the deleted automation.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface OnAutomationDeletedResponse {}\n\nexport interface TriggerProviderSPIConfig {\n /**\n * The trigger configuration\n *\n * example of a trigger:\n *\n * {\n * appId: \"56cc7843-fdfc-417f-a660-d4af9a2eafe3\",\n * triggerKey: \"form_submit\",\n * displayName: \"Visitor submits a form\",\n * payloadDataSchema: {\n * \"$schema\": \"http://json-schema.org/draft-07/schema\",\n * \"type\": \"object\",\n * \"title\": \"Visitor submits a form Payload Schema\",\n * \"description\": \"The schema of the payload that is part of the triggered event\",\n * \"default\": {},\n * \"examples\": [\n * {\n * \"formId\": \"60d2cd50-1047-4164-884d-8c24fbda84bb\",\n * \"formName\": \"My Cool Form\n * }\n * ],\n * \"properties\": {\n * \"formId\": {\n * \"$id\": \"#/properties/formId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Form ID\",\n * \"description\": \"The form identifier\",\n * \"default\": \"\",\n * \"examples\": [\n * \"60d2cd50-1047-4164-884d-8c24fbda84bb\"\n * ]\n * },\n * \"formName\": {\n * \"$id\": \"#/properties/formName\",\n * \"type\": \"string\",\n * \"title\": \"Form Name\",\n * \"description\": \"The form display name\",\n * \"default\": \"\",\n * \"examples\": [\n * \"My Form\"\n * ]\n * },\n * \"contactId\": {\n * \"$id\": \"#/properties/contactId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Contact Id\",\n * \"description\": \"The Id of the contact which submitted the form\",\n * \"default\": \"\",\n * \"identityType\": \"contact\", // can be contact, visitor, user limited to 1 type per identity,\n * \"namespace\": \"contact\" // friendly name to be used later on, in order to user that person's data \"contact.firstName\"\n * }\n * },\n * \"required\": [\n * \"formId\",\n * \"formName\",\n * \"contactId\"\n * ],\n * \"additionalProperties\": false\n * }\n * }\n */\n triggerConfig?: Record<string, any> | null;\n /** URL to the trigger provider service */\n baseUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n","import { ServicePluginDefinition } from '@wix/sdk-types';\nimport {\n Context,\n ValidateConfigurationRequest,\n ValidateConfigurationResponse,\n GetDynamicSchemaRequest,\n GetDynamicSchemaResponse,\n RefreshPayloadRequest,\n RefreshPayloadResponse,\n} from './service-plugins-types.js';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\n\nexport interface ValidateConfigurationEnvelope {\n request: ValidateConfigurationRequest;\n metadata: Context;\n}\n\nexport interface GetDynamicSchemaEnvelope {\n request: GetDynamicSchemaRequest;\n metadata: Context;\n}\n\nexport interface RefreshPayloadEnvelope {\n request: RefreshPayloadRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * This endpoint allows you to run your own logic to validate trigger fields. Implement this endpoint if you need to perform extra validation on top of\n * the Wix validation process.\n *\n * Wix calls Validate Configuration in the following cases:\n *\n * - When a Wix user activates the automation.\n * - When a Wix user selects the automation from the **Your automations** list in the [**Automations**](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations)\n * dashboard.\n * - When a Wix user opens the automation to edit it.\n *\n * If the user configured filters when setting up their automation, these are included in the request.\n * Wix uses the returned response to display an error message to a user if the requested trigger is invalid. */\n validateConfiguration(\n payload: ValidateConfigurationEnvelope\n ): ValidateConfigurationResponse | Promise<ValidateConfigurationResponse>;\n\n /**\n *\n * This endpoint returns a [JSON schema](https://json-schema.org/) object\n * that's used to dynamically update the fields available to a Wix user\n * when they configure an [automation](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations).\n *\n * Wix calls this endpoint when a user selects an option from an\n * [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection)\n * configured for a trigger.\n * Wix appends the returned schema to the\n * [payload schema](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/payload-schema)\n * you defined for the trigger and makes the fields available to the Wix user's automation. */\n getDynamicSchema(\n payload: GetDynamicSchemaEnvelope\n ): GetDynamicSchemaResponse | Promise<GetDynamicSchemaResponse>;\n\n /**\n *\n * If an automation's action is delayed, implement this method to retrieve the latest data in the trigger payload before the action fires.\n *\n * For example, if an automation is triggered but its action is set to fire only 24 hours later, Wix calls Refresh Payload before starting\n * the action. This fetches the latest data in the trigger payload. The returned data can be used to update the trigger payload that is passed\n * to the action. */\n refreshPayload(\n payload: RefreshPayloadEnvelope\n ): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;\n}>('AUTOMATIONS_TRIGGER_PROVIDER', [\n {\n name: 'validateConfiguration',\n primaryHttpMappingPath: '/validate-configuration',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'getDynamicSchema',\n primaryHttpMappingPath: '/dynamic-schema',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n\n {\n name: 'refreshPayload',\n primaryHttpMappingPath: '/refresh-payload',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-automations-v1-trigger-provider.public.js';\nimport { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';\nimport { BuildServicePluginDefinition } from '@wix/sdk-types';\nimport { provideHandlers as publicProvideHandlers } from './interfaces-automations-v1-trigger-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> &\n typeof publicProvideHandlers = createServicePluginModule(\n publicProvideHandlers\n);\n","/**\n * Service provider not found.\n */\nexport 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":";AAmNO,IAAK,SAAL,kBAAKA,YAAL;AAEL,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,SAAM;AAEN,EAAAA,QAAA,iBAAc;AANJ,SAAAA;AAAA,GAAA;AAmEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,uBAAoB;AAEpB,EAAAA,UAAA,aAAU;AAEV,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,UAAO;AAEP,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,YAAS;AAXC,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,QAAK;AAEL,EAAAA,UAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAmBL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AA2BL,IAAK,OAAL,kBAAKC,UAAL;AAEL,EAAAA,MAAA,yBAAsB;AAEtB,EAAAA,MAAA,iBAAc;AAQd,EAAAA,MAAA,eAAY;AAQZ,EAAAA,MAAA,oBAAiB;AAEjB,EAAAA,MAAA,WAAQ;AAER,EAAAA,MAAA,gBAAa;AAxBH,SAAAA;AAAA,GAAA;AAiNL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAgHL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AA2OL,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;;;AC78BZ,SAAS,+BAA+B;AAUxC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAiBA,IAAM,kBAAkB,wBA6C5B,gCAAgC;AAAA,EACjC;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,iBAAiB;AAEvB,eAAO,sCAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,eAAO,wCAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;AC7HD,SAAS,iCAAiC;AAMnC,IAAMC,mBAGoB;AAAA,EAC/B;AACF;;;ACTO,IAAM,2BAAN,cAAuC,MAAM;AAAA,EAclD,cAAc;AACZ,UAAM,kBAAkB;AAExB,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAIF;AAAA;AA9Ba,yBA6BK,SAAS;","names":["Domain","TimeUnit","Operator","Language","Type","Status","Origin","IdentityType","provideHandlers"]}
@@ -1,5 +1,5 @@
1
- import { ac as ValidateConfigurationEnvelope, a as ValidateConfigurationResponse, ad as GetDynamicSchemaEnvelope, b as GetDynamicSchemaResponse, ae as RefreshPayloadEnvelope, c as RefreshPayloadResponse } from './service-plugins-error-classes-cPyala5q.mjs';
2
- export { e as AIMetadata, I as Action, J as ActionInfoOneOf, f as ActionSettings, s as AppDefinedAction, N as ApplicationOrigin, g as AuditInfo, h as AuditInfoIdOneOf, Z as AutoArchivePolicy, A as Automation, i as AutomationConfiguration, d as AutomationOriginInfoOneOf, U as AutomationSettings, u as CodeConditionAction, o as CodeSnippet, t as ConditionAction, C as ConditionExpressionGroup, a7 as Context, v as DelayAction, a2 as Dimensions, D as Domain, W as DraftInfo, E as Enrichment, X as Enrichments, Y as ExtendedFields, F as Filter, m as FilterValueSelection, K as FilterableAppDefinedActions, k as FutureDateActivationOffset, G as GetDynamicSchemaRequest, a9 as IdentificationData, aa as IdentificationDataIdOneOf, a8 as IdentityType, L as Language, $ as Note, _ as Notes, a1 as Offset, a4 as OnAutomationDeletedRequest, a5 as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, a3 as OnAutomationSavedResponse, n as Operator, M as Origin, y as OutputAction, q as Path, a0 as Position, Q as PreinstalledOrigin, P as ProviderConfigurationError, ab as ProviderNotFoundWixError, l as RateLimit, w as RateLimitAction, R as RefreshPayloadRequest, S as SelectedFilterOptions, x as SetVariablesAction, z as SplitAction, B as Status, j as TimeUnit, H as Trigger, a6 as TriggerProviderSPIConfig, T as TriggerSettings, r as Type, V as ValidateConfigurationRequest } from './service-plugins-error-classes-cPyala5q.mjs';
1
+ import { ac as ValidateConfigurationEnvelope, a as ValidateConfigurationResponse, ad as GetDynamicSchemaEnvelope, b as GetDynamicSchemaResponse, ae as RefreshPayloadEnvelope, c as RefreshPayloadResponse } from './service-plugins-error-classes-CNZUS91e.mjs';
2
+ export { e as AIMetadata, I as Action, J as ActionInfoOneOf, f as ActionSettings, s as AppDefinedAction, N as ApplicationOrigin, g as AuditInfo, h as AuditInfoIdOneOf, Z as AutoArchivePolicy, A as Automation, i as AutomationConfiguration, d as AutomationOriginInfoOneOf, U as AutomationSettings, u as CodeConditionAction, o as CodeSnippet, t as ConditionAction, C as ConditionExpressionGroup, a7 as Context, v as DelayAction, a2 as Dimensions, D as Domain, W as DraftInfo, E as Enrichment, X as Enrichments, Y as ExtendedFields, F as Filter, m as FilterValueSelection, K as FilterableAppDefinedActions, k as FutureDateActivationOffset, G as GetDynamicSchemaRequest, a9 as IdentificationData, aa as IdentificationDataIdOneOf, a8 as IdentityType, L as Language, $ as Note, _ as Notes, a1 as Offset, a4 as OnAutomationDeletedRequest, a5 as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, a3 as OnAutomationSavedResponse, n as Operator, M as Origin, y as OutputAction, q as Path, a0 as Position, Q as PreinstalledOrigin, P as ProviderConfigurationError, ab as ProviderNotFoundWixError, l as RateLimit, w as RateLimitAction, R as RefreshPayloadRequest, S as SelectedFilterOptions, x as SetVariablesAction, z as SplitAction, B as Status, j as TimeUnit, H as Trigger, a6 as TriggerProviderSPIConfig, T as TriggerSettings, r as Type, V as ValidateConfigurationRequest } from './service-plugins-error-classes-CNZUS91e.mjs';
3
3
  import '@wix/sdk-types';
4
4
 
5
5
  /**
@@ -47,6 +47,7 @@ var Type = /* @__PURE__ */ ((Type2) => {
47
47
  Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
48
48
  Type2["APP_DEFINED"] = "APP_DEFINED";
49
49
  Type2["CONDITION"] = "CONDITION";
50
+ Type2["CODE_CONDITION"] = "CODE_CONDITION";
50
51
  Type2["DELAY"] = "DELAY";
51
52
  Type2["RATE_LIMIT"] = "RATE_LIMIT";
52
53
  return Type2;
@@ -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 /** Scheme field key. */\n fieldKey?: string | null;\n /** Error message. */\n message?: string;\n /** Label for the call-to-action button displayed with the error. */\n ctaLabel?: string | null;\n /** When the call-to-action button is clicked, the redirect URL. */\n ctaUrl?: string | null;\n /** Error title. */\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. Applied only for pre-installed and application automations. Not applied to User origin automations */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/** @oneof */\nexport interface AutomationOriginInfoOneOf {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n}\n\nexport interface AIMetadata {\n /**\n * Origin agent identifier.\n * @minLength 1\n * @maxLength 64\n */\n originAgentIdentifier?: string | null;\n}\n\nexport interface ActionSettings {\n /**\n * Permanent actions. PermanentAction's skipActionExpression cannot be modified.\n *\n * When empty, all actions can be set as skipped\n * @maxSize 30\n * @format GUID\n */\n permanentActionIds?: string[];\n /**\n * Read-only actions. Read-only actions cannot be edited.\n *\n * When empty, all actions are editable.\n * @maxSize 30\n * @format GUID\n */\n readonlyActionIds?: string[];\n}\n\nexport enum Domain {\n /** User domain (default). */\n USER = 'USER',\n /** Wix domain. */\n WIX = 'WIX',\n /** Wix account-level domain. */\n WIX_ACCOUNT = 'WIX_ACCOUNT',\n}\n\nexport interface TriggerSettings {}\n\nexport interface Enrichment {\n /**\n * Enrichment input mappings.\n * @maxSize 2\n */\n inputMappings?: Record<string, any>[] | null;\n}\n\nexport interface AuditInfo extends AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface AutomationConfiguration {\n /** Status of the automation on the site. */\n status?: Status;\n /** Trigger configuration. */\n trigger?: Trigger;\n /**\n * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.\n *\n * > **Note**: You can currently only specify 1 root action.\n * @maxSize 20\n * @format GUID\n */\n rootActionIds?: string[];\n /** Actions the automation can execute, as `key:value` pairs. For the key, specify the action ID. The value must be an object structured as described below. */\n actions?: Record<string, Action>;\n}\n\nexport enum TimeUnit {\n UNKNOWN_TIME_UNIT = 'UNKNOWN_TIME_UNIT',\n /** Minutes. */\n MINUTES = 'MINUTES',\n /** Hours. */\n HOURS = 'HOURS',\n /** Days. */\n DAYS = 'DAYS',\n /** Weeks. */\n WEEKS = 'WEEKS',\n /** Months. */\n MONTHS = 'MONTHS',\n}\n\nexport interface Filter {\n /**\n * Filter ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Field key.\n *\n * You can find the field key in [the trigger payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema).\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Filter expression.\n *\n * For the automation to run, the expression must evaluate to `true`.\n * @maxLength 2500\n */\n filterExpression?: string;\n}\n\nexport interface FutureDateActivationOffset {\n /**\n * Amount of time before the trigger to run the automation.\n *\n * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).\n * @maxLength 1000\n */\n preScheduledEventOffsetExpression?: string;\n /** Unit in which to set the action offset. */\n scheduledEventOffsetTimeUnit?: TimeUnit;\n}\n\nexport interface RateLimit {\n /**\n * Maximum number of times the trigger can be activated.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Duration of the rate limit. The rate limit applies for the specified duration and then expires.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n durationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n durationTimeUnit?: TimeUnit;\n /**\n * Activation identifier used to count the number of activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n}\n\nexport interface FilterValueSelection {\n /**\n * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.\n * @maxLength 80\n * @maxSize 50\n */\n selectedFilterValues?: string[];\n}\n\nexport interface ConditionExpressionGroup {\n /** Logical operator used to evaluate the condition expressions. */\n operator?: Operator;\n /**\n * Expressions evaluated using the selected operator.\n * @minSize 1\n * @maxSize 20\n * @maxLength 2500\n */\n booleanExpressions?: string[];\n}\n\nexport enum Operator {\n /** Unknown. */\n UNKNOWN_OPERATOR = 'UNKNOWN_OPERATOR',\n /** `OR` operator. */\n OR = 'OR',\n /** `AND` operator. */\n AND = 'AND',\n}\n\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: Language;\n /**\n * Expressions evaluated using the selected operator. this code should comply the language syntax. and format\n * @maxLength 1000\n */\n code?: string;\n}\n\nexport enum Language {\n /** Unknown. */\n UNKNOWN_LANGUAGE = 'UNKNOWN_LANGUAGE',\n /** JavaScript. */\n JAVASCRIPT = 'JAVASCRIPT',\n}\n\n/** Path definition */\nexport interface Path {\n /**\n * Unique path ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Path display name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * ID of the action to run when this path is taken.\n * @format GUID\n */\n postActionId?: string | null;\n}\n\nexport enum Type {\n /** Based on the trigger. */\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */\n APP_DEFINED = 'APP_DEFINED',\n /** Condition. This determines which action runs next. */\n CONDITION = 'CONDITION',\n /** Delay. The automation must wait before executing the next step. */\n DELAY = 'DELAY',\n /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */\n RATE_LIMIT = 'RATE_LIMIT',\n}\n\nexport interface AppDefinedAction {\n /**\n * ID of the app that defines the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /**\n * Action input mapping as defined in the action's [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema).\n *\n * The input mapping must include all parameters specified in the action's input schema's `required` array, and can include any other parameters from the schema.\n */\n inputMapping?: Record<string, any> | null;\n /**\n * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @maxSize 10\n * @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @replacedBy skip_action_expression\n * @targetRemovalDate 2026-02-01\n */\n skipConditionOrExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions that run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n /** Action output schema. When specified, this replaces the action schema. */\n overrideOutputSchema?: Record<string, any> | null;\n}\n\nexport interface ConditionAction {\n /**\n * Condition is `true` if one or more of the expression groups evaluates to `true`.\n * @minSize 1\n * @maxSize 10\n */\n orExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface CodeConditionAction {\n /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */\n snippet?: CodeSnippet;\n /**\n * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.\n * this list is mainly for validation purpose.\n * @maxSize 50\n * @maxLength 100\n */\n dynamicVariableExpressions?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface DelayAction {\n /**\n * Time to wait before running the action. The wait time starts from when the current action completes.\n *\n * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.\n * @maxLength 1000\n */\n offsetExpression?: string | null;\n /** Unit in which to set the wait time to wait before the action runs. */\n offsetTimeUnit?: TimeUnit;\n /**\n * Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n * @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @replacedBy due_date_expression\n * @targetRemovalDate 2026-02-01\n */\n dueDateEpochExpression?: string | null;\n /**\n * Action run date as a timestamp or DateTime expression using bracket notation.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n */\n dueDateExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the time delay.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface RateLimitAction {\n /**\n * Maximum number of times the action can run.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Rate limit duration.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n rateLimitDurationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n rateLimitDurationTimeUnit?: TimeUnit;\n /**\n * Unique identifier of each activation by which rate limiter counts activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface SetVariablesAction {\n /** Output mapping. For example: `{\"someField\": \"{{10}}\", \"someOtherField\": \"{{multiply( var('account.points.balance') ;2 )}}\" }`. */\n outputMapping?: Record<string, any> | null;\n /**\n * Output JSON schema representation.\n *\n * > **Note**: To minimize request size, you can also specify a string.\n */\n outputSchema?: Record<string, any> | null;\n /**\n * IDs of actions to run in parallel after variable initialization.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface OutputAction {\n /** Output action output mapping. */\n outputMapping?: Record<string, any> | null;\n}\n\nexport interface SplitAction {\n /**\n * List of paths to split execution into.\n * @minSize 2\n * @maxSize 10\n */\n paths?: Path[];\n}\n\nexport enum Status {\n /** Unknown. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Active. Active automations can be triggered. */\n ACTIVE = 'ACTIVE',\n /** Inactive. Inactive automations cannot be triggered. */\n INACTIVE = 'INACTIVE',\n}\n\nexport interface Trigger {\n /**\n * ID of the app that defines the trigger.\n * @format GUID\n */\n appId?: string;\n /**\n * Trigger key.\n *\n * Learn about [setting up a trigger](https://dev.wix.com/docs/rest/business-management/automations/triggers/add-a-trigger-to-your-app#step-1--set-up-the-trigger).\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * Schema field filters. All filter conditions must be met for the automation to run.\n *\n * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#filters).\n * @maxSize 5\n */\n filters?: Filter[];\n /**\n * Automation offset. You can schedule automations to run before the trigger occurs.\n *\n * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).\n */\n scheduledEventOffset?: FutureDateActivationOffset;\n /** Limit on the number of times an automation can be triggered. */\n rateLimit?: RateLimit;\n /** Trigger schema override. When specified, this replaces the trigger schema. */\n overrideSchema?: Record<string, any> | null;\n}\n\nexport interface Action extends ActionInfoOneOf {\n /** Details of the action when its `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action when its `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action when its `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action when its `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action when its `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n /**\n * Action ID.\n *\n * Unique identifier for the action instance in the current automation. Use this to refer to this action in the automation flow.\n *\n * If not specified, automatically generated by Wix.\n * @format GUID\n */\n _id?: string | null;\n /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#action-type). */\n type?: Type;\n /**\n * Editable display name for the action.\n * @minLength 1\n * @maxLength 60\n */\n displayName?: string | null;\n /**\n * [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#namespace). This differentiates it from other actions of the same type.\n *\n * If the action outputs any data, the data appears under the namespace in the payload sent to the subsequent steps in the automation. If the user has multiple actions with the same `appId` and `actionKey`, the output of the previous action is overwritten.\n * @minLength 1\n * @maxLength 100\n */\n namespace?: string | null;\n /**\n * Evaluated to boolean to decide whether the action is skipped.\n * For ConditionAction: if skipped, true_post_action_ids execute; false_post_action_ids are skipped\n * SplitAction and OutputAction do not support skip_action_expression\n * @maxLength 1000\n */\n skipActionExpression?: string | null;\n}\n\n/** @oneof */\nexport interface ActionInfoOneOf {\n /** Details of the action when its `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action when its `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action when its `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action when its `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action when its `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n}\n\nexport interface FilterableAppDefinedActions {\n /**\n * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.\n * @minSize 1\n * @maxSize 100\n * @minLength 1\n * @maxLength 150\n */\n actionIdentifiers?: string[];\n}\n\nexport enum Origin {\n /** Default value. */\n UNKNOWN_ORIGIN = 'UNKNOWN_ORIGIN',\n /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */\n USER = 'USER',\n /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */\n APPLICATION = 'APPLICATION',\n /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */\n PREINSTALLED = 'PREINSTALLED',\n}\n\nexport interface ApplicationOrigin {\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface PreinstalledOrigin {\n /**\n * ID of the app that added the [preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations).\n * @format GUID\n */\n appId?: string;\n /**\n * Whether the automation is an override.\n *\n * When a user modifies the preinstalled automation installed on their site, a site-specific version of the automation is created that overrides the automation that was originally installed. This override automation has the same automation ID as the original preinstalled automation.\n *\n * > **Note**: An override automation can no longer be updated by the app that originally installed it.\n * >\n * > To revert to the original preinstalled version, the user must delete the override by calling the Delete Automation method. Calling Delete Automation on an override automation removes the override method and restores the preinstalled automation that was previously installed.\n *\n * Default: `false`.\n * @immutable\n * @readonly\n */\n override?: boolean | null;\n}\n\nexport interface AutomationSettings {\n /**\n * Whether the automation is hidden from users.\n *\n * Default: `false`\n */\n hidden?: boolean;\n /**\n * Whether the automation is read-only.\n * If true - modifications to the automation trigger or action/s are disabled.\n * **Note**: this setting takes precedent over triggerSettings/actionSettings.\n * If false - allows selective read-only settings via those fields.\n *\n * Default: `false`\n */\n readonly?: boolean;\n /**\n * Whether to disable the option to delete the automation from the site.\n *\n * Default: `false`.\n */\n disableDelete?: boolean;\n /**\n * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.\n *\n * Default: `false`.\n */\n disableStatusChange?: boolean;\n /** Automation action settings. */\n actionSettings?: ActionSettings;\n}\n\nexport interface DraftInfo {\n /**\n * ID of the original automation.\n * @format GUID\n * @readonly\n */\n originalAutomationId?: string | null;\n}\n\nexport interface Enrichments {\n /** Whether the studio site enrichment is wanted. */\n studioSite?: Enrichment;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface AutoArchivePolicy {\n /**\n * Date when to archive the automation\n * If this date in the past, nothing will happen (automation will not go into archived state)\n * If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE\n * After this date the automation may be unarchived and archived again, this date will have no influence\n */\n archiveDate?: Date | null;\n}\n\nexport interface Notes {}\n\nexport interface Note {}\n\nexport interface Position {}\n\nexport interface Offset {}\n\nexport interface Dimensions {}\n\nexport interface OnAutomationSavedResponse {}\n\nexport interface OnAutomationDeletedRequest {\n /**\n * ID of the deleted automation.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface OnAutomationDeletedResponse {}\n\nexport interface TriggerProviderSPIConfig {\n /**\n * The trigger configuration\n *\n * example of a trigger:\n *\n * {\n * appId: \"56cc7843-fdfc-417f-a660-d4af9a2eafe3\",\n * triggerKey: \"form_submit\",\n * displayName: \"Visitor submits a form\",\n * payloadDataSchema: {\n * \"$schema\": \"http://json-schema.org/draft-07/schema\",\n * \"type\": \"object\",\n * \"title\": \"Visitor submits a form Payload Schema\",\n * \"description\": \"The schema of the payload that is part of the triggered event\",\n * \"default\": {},\n * \"examples\": [\n * {\n * \"formId\": \"60d2cd50-1047-4164-884d-8c24fbda84bb\",\n * \"formName\": \"My Cool Form\n * }\n * ],\n * \"properties\": {\n * \"formId\": {\n * \"$id\": \"#/properties/formId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Form ID\",\n * \"description\": \"The form identifier\",\n * \"default\": \"\",\n * \"examples\": [\n * \"60d2cd50-1047-4164-884d-8c24fbda84bb\"\n * ]\n * },\n * \"formName\": {\n * \"$id\": \"#/properties/formName\",\n * \"type\": \"string\",\n * \"title\": \"Form Name\",\n * \"description\": \"The form display name\",\n * \"default\": \"\",\n * \"examples\": [\n * \"My Form\"\n * ]\n * },\n * \"contactId\": {\n * \"$id\": \"#/properties/contactId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Contact Id\",\n * \"description\": \"The Id of the contact which submitted the form\",\n * \"default\": \"\",\n * \"identityType\": \"contact\", // can be contact, visitor, user limited to 1 type per identity,\n * \"namespace\": \"contact\" // friendly name to be used later on, in order to user that person's data \"contact.firstName\"\n * }\n * },\n * \"required\": [\n * \"formId\",\n * \"formName\",\n * \"contactId\"\n * ],\n * \"additionalProperties\": false\n * }\n * }\n */\n triggerConfig?: Record<string, any> | null;\n /** URL to the trigger provider service */\n baseUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n"],"mappings":";AAAO,IAAM,2BAAN,cAAuC,MAAM;AAAA,EAclD,cAAc;AACZ,UAAM,kBAAkB;AAExB,SAAK,WAAW;AAChB,SAAK,aAAa;AAClB,SAAK,kBAAkB;AACvB,SAAK,OAAO;AACZ,SAAK,YAAY;AACjB,SAAK,eAAe;AAAA,MAClB,MAAM;AAAA,MACN,iBAAiB;AAAA,IACnB;AAAA,EACF;AAIF;AAAA;AA9Ba,yBA6BK,SAAS;;;ACoLpB,IAAK,SAAL,kBAAKA,YAAL;AAEL,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,SAAM;AAEN,EAAAA,QAAA,iBAAc;AANJ,SAAAA;AAAA,GAAA;AAmEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,uBAAoB;AAEpB,EAAAA,UAAA,aAAU;AAEV,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,UAAO;AAEP,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,YAAS;AAXC,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,QAAK;AAEL,EAAAA,UAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAmBL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AA2BL,IAAK,OAAL,kBAAKC,UAAL;AAEL,EAAAA,MAAA,yBAAsB;AAEtB,EAAAA,MAAA,iBAAc;AAEd,EAAAA,MAAA,eAAY;AAEZ,EAAAA,MAAA,WAAQ;AAER,EAAAA,MAAA,gBAAa;AAVH,SAAAA;AAAA,GAAA;AAmML,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAgHL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AA0OL,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":["/**\n * Service provider not found.\n */\nexport 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 /** Scheme field key. */\n fieldKey?: string | null;\n /** Error message. */\n message?: string;\n /** Label for the call-to-action button displayed with the error. */\n ctaLabel?: string | null;\n /** When the call-to-action button is clicked, the redirect URL. */\n ctaUrl?: string | null;\n /** Error title. */\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. Applied only for pre-installed and application automations. Not applied to User origin automations */\n settings?: AutomationSettings;\n /**\n * When the automation is a draft, the draft details.\n * @readonly\n */\n draftInfo?: DraftInfo;\n /**\n * Whether the automation is archived.\n *\n * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.\n */\n archived?: boolean;\n /** Auto archive policy */\n autoArchivePolicy?: AutoArchivePolicy;\n}\n\n/** @oneof */\nexport interface AutomationOriginInfoOneOf {\n /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */\n applicationInfo?: ApplicationOrigin;\n /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */\n preinstalledInfo?: PreinstalledOrigin;\n}\n\nexport interface AIMetadata {\n /**\n * Origin agent identifier.\n * @minLength 1\n * @maxLength 64\n */\n originAgentIdentifier?: string | null;\n}\n\nexport interface ActionSettings {\n /**\n * IDs of actions whose `skipActionExpression` can't be modified.\n *\n * An action's `skipActionExpression` determines whether the action is skipped. Including an action's ID in this array makes its `skipActionExpression` permanent, so it can't be changed.\n *\n * When empty, the `skipActionExpression` of all actions can be edited.\n * @maxSize 30\n * @format GUID\n */\n permanentActionIds?: string[];\n /**\n * IDs of read-only actions. Read-only actions cannot be modified.\n *\n * When empty and the automation's `settings.readonly` is `false`, all actions are modifiable.\n * @maxSize 30\n * @format GUID\n */\n readonlyActionIds?: string[];\n}\n\nexport enum Domain {\n /** User domain (default). */\n USER = 'USER',\n /** Wix domain. */\n WIX = 'WIX',\n /** Wix account-level domain. */\n WIX_ACCOUNT = 'WIX_ACCOUNT',\n}\n\nexport interface TriggerSettings {}\n\nexport interface Enrichment {\n /**\n * Enrichment input mappings.\n * @maxSize 2\n */\n inputMappings?: Record<string, any>[] | null;\n}\n\nexport interface AuditInfo extends AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\n/** @oneof */\nexport interface AuditInfoIdOneOf {\n /**\n * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).\n * @format GUID\n */\n userId?: string;\n /**\n * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n}\n\nexport interface AutomationConfiguration {\n /** Status of the automation on the site. */\n status?: Status;\n /** Trigger configuration. */\n trigger?: Trigger;\n /**\n * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.\n *\n * > **Note**: You can currently only specify 1 root action.\n * @maxSize 20\n * @format GUID\n */\n rootActionIds?: string[];\n /** Actions the automation can execute, as `key:value` pairs. For the key, specify the action ID. The value must be an object structured as described below. */\n actions?: Record<string, Action>;\n}\n\nexport enum TimeUnit {\n UNKNOWN_TIME_UNIT = 'UNKNOWN_TIME_UNIT',\n /** Minutes. */\n MINUTES = 'MINUTES',\n /** Hours. */\n HOURS = 'HOURS',\n /** Days. */\n DAYS = 'DAYS',\n /** Weeks. */\n WEEKS = 'WEEKS',\n /** Months. */\n MONTHS = 'MONTHS',\n}\n\nexport interface Filter {\n /**\n * Filter ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Field key.\n *\n * You can find the field key in [the trigger payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema).\n * @minLength 1\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Filter expression.\n *\n * For the automation to run, the expression must evaluate to `true`.\n * @maxLength 2500\n */\n filterExpression?: string;\n}\n\nexport interface FutureDateActivationOffset {\n /**\n * Amount of time before the trigger to run the automation.\n *\n * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).\n * @maxLength 1000\n */\n preScheduledEventOffsetExpression?: string;\n /** Unit in which to set the action offset. */\n scheduledEventOffsetTimeUnit?: TimeUnit;\n}\n\nexport interface RateLimit {\n /**\n * Maximum number of times the trigger can be activated.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Duration of the rate limit. The rate limit applies for the specified duration and then expires.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n durationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n durationTimeUnit?: TimeUnit;\n /**\n * Activation identifier used to count the number of activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n}\n\nexport interface FilterValueSelection {\n /**\n * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.\n * @maxLength 80\n * @maxSize 50\n */\n selectedFilterValues?: string[];\n}\n\nexport interface ConditionExpressionGroup {\n /** Logical operator used to evaluate the condition expressions. */\n operator?: Operator;\n /**\n * Expressions evaluated using the selected operator.\n * @minSize 1\n * @maxSize 20\n * @maxLength 2500\n */\n booleanExpressions?: string[];\n}\n\nexport enum Operator {\n /** Unknown. */\n UNKNOWN_OPERATOR = 'UNKNOWN_OPERATOR',\n /** `OR` operator. */\n OR = 'OR',\n /** `AND` operator. */\n AND = 'AND',\n}\n\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: Language;\n /**\n * Expressions evaluated using the selected operator. this code should comply the language syntax. and format\n * @maxLength 1000\n */\n code?: string;\n}\n\nexport enum Language {\n /** Unknown. */\n UNKNOWN_LANGUAGE = 'UNKNOWN_LANGUAGE',\n /** JavaScript. */\n JAVASCRIPT = 'JAVASCRIPT',\n}\n\n/** Path definition */\nexport interface Path {\n /**\n * Unique path ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Path display name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * ID of the action to run when this path is taken.\n * @format GUID\n */\n postActionId?: string | null;\n}\n\nexport enum Type {\n /** Based on the trigger. */\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */\n APP_DEFINED = 'APP_DEFINED',\n /**\n * Condition action. Evaluates a condition to determine which action runs next.\n *\n * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.\n *\n * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `conditionInfo.truePostActionIds` run and those in `conditionInfo.falsePostActionIds` are skipped.\n */\n CONDITION = 'CONDITION',\n /**\n * Code condition action. Evaluates custom code to determine which action runs next.\n *\n * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.\n *\n * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `codeConditionInfo.truePostActionIds` run and those in `codeConditionInfo.falsePostActionIds` are skipped.\n */\n CODE_CONDITION = 'CODE_CONDITION',\n /** Delay. The automation must wait before executing the next step. */\n DELAY = 'DELAY',\n /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */\n RATE_LIMIT = 'RATE_LIMIT',\n}\n\nexport interface AppDefinedAction {\n /**\n * ID of the app that defines the action.\n * @format GUID\n */\n appId?: string;\n /**\n * Action key.\n * @minLength 1\n * @maxLength 100\n */\n actionKey?: string;\n /**\n * Action input mapping as defined in the action's [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema).\n *\n * The input mapping must include all parameters specified in the action's input schema's `required` array, and can include any other parameters from the schema.\n */\n inputMapping?: Record<string, any> | null;\n /**\n * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @maxSize 10\n * @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.\n *\n * > **Note**: Actions that follow a skipped action still run.\n * @replacedBy skip_action_expression\n * @targetRemovalDate 2026-02-01\n */\n skipConditionOrExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions that run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n /** Action output schema. When specified, this replaces the action schema. */\n overrideOutputSchema?: Record<string, any> | null;\n}\n\nexport interface ConditionAction {\n /**\n * Condition is `true` if one or more of the expression groups evaluates to `true`.\n * @minSize 1\n * @maxSize 10\n */\n orExpressionGroups?: ConditionExpressionGroup[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface CodeConditionAction {\n /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */\n snippet?: CodeSnippet;\n /**\n * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.\n * this list is mainly for validation purpose.\n * @maxSize 50\n * @maxLength 100\n */\n dynamicVariableExpressions?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface DelayAction {\n /**\n * Time to wait before running the action. The wait time starts from when the current action completes.\n *\n * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.\n * @maxLength 1000\n */\n offsetExpression?: string | null;\n /** Unit in which to set the wait time to wait before the action runs. */\n offsetTimeUnit?: TimeUnit;\n /**\n * Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n * @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @replacedBy due_date_expression\n * @targetRemovalDate 2026-02-01\n */\n dueDateEpochExpression?: string | null;\n /**\n * Action run date as a timestamp or DateTime expression using bracket notation.\n *\n * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.\n * @maxLength 1000\n */\n dueDateExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the time delay.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface RateLimitAction {\n /**\n * Maximum number of times the action can run.\n * @maxLength 1000\n */\n maxActivationsExpression?: string;\n /**\n * Rate limit duration.\n *\n * When empty, the rate limit does not expire.\n * @maxLength 1000\n */\n rateLimitDurationExpression?: string | null;\n /** Unit in which to set the duration of the rate limit. */\n rateLimitDurationTimeUnit?: TimeUnit;\n /**\n * Unique identifier of each activation by which rate limiter counts activations.\n * @minLength 1\n * @maxLength 400\n */\n uniqueIdentifierExpression?: string | null;\n /**\n * IDs of actions to run in parallel after the action completes.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface SetVariablesAction {\n /** Output mapping. For example: `{\"someField\": \"{{10}}\", \"someOtherField\": \"{{multiply( var('account.points.balance') ;2 )}}\" }`. */\n outputMapping?: Record<string, any> | null;\n /**\n * Output JSON schema representation.\n *\n * > **Note**: To minimize request size, you can also specify a string.\n */\n outputSchema?: Record<string, any> | null;\n /**\n * IDs of actions to run in parallel after variable initialization.\n * @maxSize 1\n * @format GUID\n */\n postActionIds?: string[];\n}\n\nexport interface OutputAction {\n /** Output action output mapping. */\n outputMapping?: Record<string, any> | null;\n}\n\nexport interface SplitAction {\n /**\n * List of paths to split execution into.\n * @minSize 2\n * @maxSize 10\n */\n paths?: Path[];\n}\n\nexport enum Status {\n /** Unknown. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Active. Active automations can be triggered. */\n ACTIVE = 'ACTIVE',\n /** Inactive. Inactive automations cannot be triggered. */\n INACTIVE = 'INACTIVE',\n}\n\nexport interface Trigger {\n /**\n * ID of the app that defines the trigger.\n * @format GUID\n */\n appId?: string;\n /**\n * Trigger key.\n *\n * Learn about [setting up a trigger](https://dev.wix.com/docs/rest/business-management/automations/triggers/add-a-trigger-to-your-app#step-1--set-up-the-trigger).\n * @minLength 1\n * @maxLength 100\n */\n triggerKey?: string;\n /**\n * Schema field filters. All filter conditions must be met for the automation to run.\n *\n * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#filters).\n * @maxSize 5\n */\n filters?: Filter[];\n /**\n * Automation offset. You can schedule automations to run before the trigger occurs.\n *\n * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).\n */\n scheduledEventOffset?: FutureDateActivationOffset;\n /** Limit on the number of times an automation can be triggered. */\n rateLimit?: RateLimit;\n /** Trigger schema override. When specified, this replaces the trigger schema. */\n overrideSchema?: Record<string, any> | null;\n}\n\nexport interface Action extends ActionInfoOneOf {\n /** Details of the action whose `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action whose `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action whose `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action whose `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action whose `type` is `RATE_LIMIT`. */\n rateLimitInfo?: RateLimitAction;\n /**\n * Action ID.\n *\n * Unique identifier for the action instance in the current automation. Use this to refer to this action in the automation flow.\n *\n * If not specified, automatically generated by Wix.\n * @format GUID\n */\n _id?: string | null;\n /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#action-type). */\n type?: Type;\n /**\n * Editable display name for the action.\n * @minLength 1\n * @maxLength 60\n */\n displayName?: string | null;\n /**\n * [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#namespace). This differentiates it from other actions of the same type.\n *\n * If the action outputs any data, the data appears under the namespace in the payload sent to the subsequent steps in the automation. If the user has multiple actions with the same `appId` and `actionKey`, the output of the previous action is overwritten.\n * @minLength 1\n * @maxLength 100\n */\n namespace?: string | null;\n /**\n * Evaluated to determine whether the action is skipped. When evaluated to `true`, the action is skipped. Otherwise, the action runs.\n *\n * When empty, the action runs.\n * @maxLength 1000\n */\n skipActionExpression?: string | null;\n}\n\n/** @oneof */\nexport interface ActionInfoOneOf {\n /** Details of the action whose `type` is `APP_DEFINED`. */\n appDefinedInfo?: AppDefinedAction;\n /** Details of the action whose `type` is `CONDITION`. */\n conditionInfo?: ConditionAction;\n /** Details of the action whose `type` is `CODE_CONDITION`. */\n codeConditionInfo?: CodeConditionAction;\n /** Details of the action whose `type` is `DELAY`. */\n delayInfo?: DelayAction;\n /** Details of the action whose `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 * When `true`, site owners can't modify the automation or any of its actions. When `false`, users can configure specific actions as skippable or read-only using `settings.actionSettings`.\n *\n * Default: `false`.\n *\n * > **Note**: Setting `readOnly` to `true` overrides `settings.actionSettings`.\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`.\n *\n * Default: `false`.\n */\n disableStatusChange?: boolean;\n /** Automation action settings. */\n actionSettings?: ActionSettings;\n}\n\nexport interface DraftInfo {\n /**\n * ID of the original automation.\n * @format GUID\n * @readonly\n */\n originalAutomationId?: string | null;\n}\n\nexport interface Enrichments {\n /** Whether the studio site enrichment is wanted. */\n studioSite?: Enrichment;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface AutoArchivePolicy {\n /**\n * Date when to archive the automation\n * If this date in the past, nothing will happen (automation will not go into archived state)\n * If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE\n * After this date the automation may be unarchived and archived again, this date will have no influence\n */\n archiveDate?: Date | null;\n}\n\nexport interface Notes {}\n\nexport interface Note {}\n\nexport interface Position {}\n\nexport interface Offset {}\n\nexport interface Dimensions {}\n\nexport interface OnAutomationSavedResponse {}\n\nexport interface OnAutomationDeletedRequest {\n /**\n * ID of the deleted automation.\n * @format GUID\n */\n automationId: string;\n}\n\nexport interface OnAutomationDeletedResponse {}\n\nexport interface TriggerProviderSPIConfig {\n /**\n * The trigger configuration\n *\n * example of a trigger:\n *\n * {\n * appId: \"56cc7843-fdfc-417f-a660-d4af9a2eafe3\",\n * triggerKey: \"form_submit\",\n * displayName: \"Visitor submits a form\",\n * payloadDataSchema: {\n * \"$schema\": \"http://json-schema.org/draft-07/schema\",\n * \"type\": \"object\",\n * \"title\": \"Visitor submits a form Payload Schema\",\n * \"description\": \"The schema of the payload that is part of the triggered event\",\n * \"default\": {},\n * \"examples\": [\n * {\n * \"formId\": \"60d2cd50-1047-4164-884d-8c24fbda84bb\",\n * \"formName\": \"My Cool Form\n * }\n * ],\n * \"properties\": {\n * \"formId\": {\n * \"$id\": \"#/properties/formId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Form ID\",\n * \"description\": \"The form identifier\",\n * \"default\": \"\",\n * \"examples\": [\n * \"60d2cd50-1047-4164-884d-8c24fbda84bb\"\n * ]\n * },\n * \"formName\": {\n * \"$id\": \"#/properties/formName\",\n * \"type\": \"string\",\n * \"title\": \"Form Name\",\n * \"description\": \"The form display name\",\n * \"default\": \"\",\n * \"examples\": [\n * \"My Form\"\n * ]\n * },\n * \"contactId\": {\n * \"$id\": \"#/properties/contactId\",\n * \"type\": \"string\",\n * \"format\": \"uuid\",\n * \"title\": \"Contact Id\",\n * \"description\": \"The Id of the contact which submitted the form\",\n * \"default\": \"\",\n * \"identityType\": \"contact\", // can be contact, visitor, user limited to 1 type per identity,\n * \"namespace\": \"contact\" // friendly name to be used later on, in order to user that person's data \"contact.firstName\"\n * }\n * },\n * \"required\": [\n * \"formId\",\n * \"formName\",\n * \"contactId\"\n * ],\n * \"additionalProperties\": false\n * }\n * }\n */\n triggerConfig?: Record<string, any> | null;\n /** URL to the trigger provider service */\n baseUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n"],"mappings":";AAGO,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;;;ACmLpB,IAAK,SAAL,kBAAKA,YAAL;AAEL,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,SAAM;AAEN,EAAAA,QAAA,iBAAc;AANJ,SAAAA;AAAA,GAAA;AAmEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,uBAAoB;AAEpB,EAAAA,UAAA,aAAU;AAEV,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,UAAO;AAEP,EAAAA,UAAA,WAAQ;AAER,EAAAA,UAAA,YAAS;AAXC,SAAAA;AAAA,GAAA;AA6FL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,QAAK;AAEL,EAAAA,UAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAmBL,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AA2BL,IAAK,OAAL,kBAAKC,UAAL;AAEL,EAAAA,MAAA,yBAAsB;AAEtB,EAAAA,MAAA,iBAAc;AAQd,EAAAA,MAAA,eAAY;AAQZ,EAAAA,MAAA,oBAAiB;AAEjB,EAAAA,MAAA,WAAQ;AAER,EAAAA,MAAA,gBAAa;AAxBH,SAAAA;AAAA,GAAA;AAiNL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,YAAS;AAET,EAAAA,QAAA,cAAW;AAND,SAAAA;AAAA,GAAA;AAgHL,IAAK,SAAL,kBAAKC,YAAL;AAEL,EAAAA,QAAA,oBAAiB;AAEjB,EAAAA,QAAA,UAAO;AAEP,EAAAA,QAAA,iBAAc;AAEd,EAAAA,QAAA,kBAAe;AARL,SAAAA;AAAA,GAAA;AA2OL,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"]}
@@ -180,17 +180,19 @@ interface AIMetadata {
180
180
  }
181
181
  interface ActionSettings {
182
182
  /**
183
- * Permanent actions. PermanentAction's skipActionExpression cannot be modified.
183
+ * IDs of actions whose `skipActionExpression` can't be modified.
184
184
  *
185
- * When empty, all actions can be set as skipped
185
+ * An action's `skipActionExpression` determines whether the action is skipped. Including an action's ID in this array makes its `skipActionExpression` permanent, so it can't be changed.
186
+ *
187
+ * When empty, the `skipActionExpression` of all actions can be edited.
186
188
  * @maxSize 30
187
189
  * @format GUID
188
190
  */
189
191
  permanentActionIds?: string[];
190
192
  /**
191
- * Read-only actions. Read-only actions cannot be edited.
193
+ * IDs of read-only actions. Read-only actions cannot be modified.
192
194
  *
193
- * When empty, all actions are editable.
195
+ * When empty and the automation's `settings.readonly` is `false`, all actions are modifiable.
194
196
  * @maxSize 30
195
197
  * @format GUID
196
198
  */
@@ -392,8 +394,22 @@ declare enum Type {
392
394
  UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
393
395
  /** 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. */
394
396
  APP_DEFINED = "APP_DEFINED",
395
- /** Condition. This determines which action runs next. */
397
+ /**
398
+ * Condition action. Evaluates a condition to determine which action runs next.
399
+ *
400
+ * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.
401
+ *
402
+ * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `conditionInfo.truePostActionIds` run and those in `conditionInfo.falsePostActionIds` are skipped.
403
+ */
396
404
  CONDITION = "CONDITION",
405
+ /**
406
+ * Code condition action. Evaluates custom code to determine which action runs next.
407
+ *
408
+ * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.
409
+ *
410
+ * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `codeConditionInfo.truePostActionIds` run and those in `codeConditionInfo.falsePostActionIds` are skipped.
411
+ */
412
+ CODE_CONDITION = "CODE_CONDITION",
397
413
  /** Delay. The automation must wait before executing the next step. */
398
414
  DELAY = "DELAY",
399
415
  /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
@@ -614,15 +630,15 @@ interface Trigger {
614
630
  overrideSchema?: Record<string, any> | null;
615
631
  }
616
632
  interface Action extends ActionInfoOneOf {
617
- /** Details of the action when its `type` is `APP_DEFINED`. */
633
+ /** Details of the action whose `type` is `APP_DEFINED`. */
618
634
  appDefinedInfo?: AppDefinedAction;
619
- /** Details of the action when its `type` is `CONDITION`. */
635
+ /** Details of the action whose `type` is `CONDITION`. */
620
636
  conditionInfo?: ConditionAction;
621
- /** Details of the action when its `type` is `CODE_CONDITION`. */
637
+ /** Details of the action whose `type` is `CODE_CONDITION`. */
622
638
  codeConditionInfo?: CodeConditionAction;
623
- /** Details of the action when its `type` is `DELAY`. */
639
+ /** Details of the action whose `type` is `DELAY`. */
624
640
  delayInfo?: DelayAction;
625
- /** Details of the action when its `type` is `RATE_LIMIT`. */
641
+ /** Details of the action whose `type` is `RATE_LIMIT`. */
626
642
  rateLimitInfo?: RateLimitAction;
627
643
  /**
628
644
  * Action ID.
@@ -650,24 +666,24 @@ interface Action extends ActionInfoOneOf {
650
666
  */
651
667
  namespace?: string | null;
652
668
  /**
653
- * Evaluated to boolean to decide whether the action is skipped.
654
- * For ConditionAction: if skipped, true_post_action_ids execute; false_post_action_ids are skipped
655
- * SplitAction and OutputAction do not support skip_action_expression
669
+ * Evaluated to determine whether the action is skipped. When evaluated to `true`, the action is skipped. Otherwise, the action runs.
670
+ *
671
+ * When empty, the action runs.
656
672
  * @maxLength 1000
657
673
  */
658
674
  skipActionExpression?: string | null;
659
675
  }
660
676
  /** @oneof */
661
677
  interface ActionInfoOneOf {
662
- /** Details of the action when its `type` is `APP_DEFINED`. */
678
+ /** Details of the action whose `type` is `APP_DEFINED`. */
663
679
  appDefinedInfo?: AppDefinedAction;
664
- /** Details of the action when its `type` is `CONDITION`. */
680
+ /** Details of the action whose `type` is `CONDITION`. */
665
681
  conditionInfo?: ConditionAction;
666
- /** Details of the action when its `type` is `CODE_CONDITION`. */
682
+ /** Details of the action whose `type` is `CODE_CONDITION`. */
667
683
  codeConditionInfo?: CodeConditionAction;
668
- /** Details of the action when its `type` is `DELAY`. */
684
+ /** Details of the action whose `type` is `DELAY`. */
669
685
  delayInfo?: DelayAction;
670
- /** Details of the action when its `type` is `RATE_LIMIT`. */
686
+ /** Details of the action whose `type` is `RATE_LIMIT`. */
671
687
  rateLimitInfo?: RateLimitAction;
672
688
  }
673
689
  interface FilterableAppDefinedActions {
@@ -729,11 +745,12 @@ interface AutomationSettings {
729
745
  hidden?: boolean;
730
746
  /**
731
747
  * Whether the automation is read-only.
732
- * If true - modifications to the automation trigger or action/s are disabled.
733
- * **Note**: this setting takes precedent over triggerSettings/actionSettings.
734
- * If false - allows selective read-only settings via those fields.
735
748
  *
736
- * Default: `false`
749
+ * When `true`, site owners can't modify the automation or any of its actions. When `false`, users can configure specific actions as skippable or read-only using `settings.actionSettings`.
750
+ *
751
+ * Default: `false`.
752
+ *
753
+ * > **Note**: Setting `readOnly` to `true` overrides `settings.actionSettings`.
737
754
  */
738
755
  readonly?: boolean;
739
756
  /**
@@ -743,7 +760,7 @@ interface AutomationSettings {
743
760
  */
744
761
  disableDelete?: boolean;
745
762
  /**
746
- * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.
763
+ * Whether to disable the option to change the automation's `configuration.status`.
747
764
  *
748
765
  * Default: `false`.
749
766
  */
@@ -1009,6 +1026,9 @@ declare const provideHandlers: ServicePluginDefinition<{
1009
1026
  refreshPayload(payload: RefreshPayloadEnvelope): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;
1010
1027
  }>;
1011
1028
 
1029
+ /**
1030
+ * Service provider not found.
1031
+ */
1012
1032
  declare class ProviderNotFoundWixError extends Error {
1013
1033
  /** @hidden */
1014
1034
  httpCode: number;
@@ -1,5 +1,5 @@
1
- import { p as provideHandlers$1 } from './service-plugins-error-classes-cPyala5q.js';
2
- export { e as AIMetadata, I as Action, J as ActionInfoOneOf, f as ActionSettings, s as AppDefinedAction, N as ApplicationOrigin, g as AuditInfo, h as AuditInfoIdOneOf, Z as AutoArchivePolicy, A as Automation, i as AutomationConfiguration, d as AutomationOriginInfoOneOf, U as AutomationSettings, u as CodeConditionAction, o as CodeSnippet, t as ConditionAction, C as ConditionExpressionGroup, a7 as Context, v as DelayAction, a2 as Dimensions, D as Domain, W as DraftInfo, E as Enrichment, X as Enrichments, Y as ExtendedFields, F as Filter, m as FilterValueSelection, K as FilterableAppDefinedActions, k as FutureDateActivationOffset, G as GetDynamicSchemaRequest, b as GetDynamicSchemaResponse, a9 as IdentificationData, aa as IdentificationDataIdOneOf, a8 as IdentityType, L as Language, $ as Note, _ as Notes, a1 as Offset, a4 as OnAutomationDeletedRequest, a5 as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, a3 as OnAutomationSavedResponse, n as Operator, M as Origin, y as OutputAction, q as Path, a0 as Position, Q as PreinstalledOrigin, P as ProviderConfigurationError, ab as ProviderNotFoundWixError, l as RateLimit, w as RateLimitAction, R as RefreshPayloadRequest, c as RefreshPayloadResponse, S as SelectedFilterOptions, x as SetVariablesAction, z as SplitAction, B as Status, j as TimeUnit, H as Trigger, a6 as TriggerProviderSPIConfig, T as TriggerSettings, r as Type, V as ValidateConfigurationRequest, a as ValidateConfigurationResponse } from './service-plugins-error-classes-cPyala5q.js';
1
+ import { p as provideHandlers$1 } from './service-plugins-error-classes-CNZUS91e.js';
2
+ export { e as AIMetadata, I as Action, J as ActionInfoOneOf, f as ActionSettings, s as AppDefinedAction, N as ApplicationOrigin, g as AuditInfo, h as AuditInfoIdOneOf, Z as AutoArchivePolicy, A as Automation, i as AutomationConfiguration, d as AutomationOriginInfoOneOf, U as AutomationSettings, u as CodeConditionAction, o as CodeSnippet, t as ConditionAction, C as ConditionExpressionGroup, a7 as Context, v as DelayAction, a2 as Dimensions, D as Domain, W as DraftInfo, E as Enrichment, X as Enrichments, Y as ExtendedFields, F as Filter, m as FilterValueSelection, K as FilterableAppDefinedActions, k as FutureDateActivationOffset, G as GetDynamicSchemaRequest, b as GetDynamicSchemaResponse, a9 as IdentificationData, aa as IdentificationDataIdOneOf, a8 as IdentityType, L as Language, $ as Note, _ as Notes, a1 as Offset, a4 as OnAutomationDeletedRequest, a5 as OnAutomationDeletedResponse, O as OnAutomationSavedRequest, a3 as OnAutomationSavedResponse, n as Operator, M as Origin, y as OutputAction, q as Path, a0 as Position, Q as PreinstalledOrigin, P as ProviderConfigurationError, ab as ProviderNotFoundWixError, l as RateLimit, w as RateLimitAction, R as RefreshPayloadRequest, c as RefreshPayloadResponse, S as SelectedFilterOptions, x as SetVariablesAction, z as SplitAction, B as Status, j as TimeUnit, H as Trigger, a6 as TriggerProviderSPIConfig, T as TriggerSettings, r as Type, V as ValidateConfigurationRequest, a as ValidateConfigurationResponse } from './service-plugins-error-classes-CNZUS91e.js';
3
3
  import { BuildServicePluginDefinition } from '@wix/sdk-types';
4
4
 
5
5
  declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1> & typeof provideHandlers$1;