{"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  /** When the origin of the automation is `TEMPLATE`, the details of the template automation. */\n  templateInfo?: TemplateOrigin;\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  /** When the origin of the automation is `TEMPLATE`, the details of the template automation. */\n  templateInfo?: TemplateOrigin;\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  /** 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 in bracket notation.\n   *\n   * For the automation to run, the expression must evaluate to `true`.\n   * @maxLength 5000\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 5000\n   */\n  booleanExpressions?: string[];\n}\n\nexport enum 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 1500\n   */\n  code?: string;\n}\n\nexport enum 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 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   * Editable display name for the path.\n   * @minLength 1\n   * @maxLength 60\n   */\n  displayName?: string | null;\n}\n\nexport enum 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   * ID of the MERGE action for this condition. When absent, branches run independently (current behavior).\n   * @format GUID\n   */\n  mergeActionId?: string | null;\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   * ID of the MERGE action for this condition. When absent, branches run independently (current behavior).\n   * @format GUID\n   */\n  mergeActionId?: string | null;\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 interface MergeAction {\n  /**\n   * ID of the action to execute after the arriving branch completes.\n   * @format GUID\n   */\n  postActionId?: string | null;\n}\n\nexport enum 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  /** 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 TemplateOrigin {\n  /**\n   * ID of the app that added the template automation.\n   * @format GUID\n   */\n  appId?: string;\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}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origin","IdentityType","provideHandlers"]}