{"version":3,"sources":["jsdelivr-header.js","/npm/@wix/auto_sdk_automations_action-provider@1.0.40/index.ts","/npm/@wix/auto_sdk_automations_action-provider@1.0.40/src/service-plugins-types.ts","/npm/@wix/auto_sdk_automations_action-provider@1.0.40/src/interfaces-automations-v1-action-provider.public.ts","/npm/@wix/auto_sdk_automations_action-provider@1.0.40/src/interfaces-automations-v1-action-provider.context.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,8iBCNA,cAAA,GAAA,SAAA,cAAA,CAAA,cAAA,IAAA,cAAA,aAAA,IAAA,aAAA,gBAAA,IAAA,gBAAA,kBAAA,IAAA,kBAAA,WAAA,IAAA,WAAA,OAAA,IAAA,OAAA,KAAA,IAAA,KAAA,gBAAA,IAAA,iBAAA,sBAAA,IAAA,kBAAA,OAAA,QAAA,aAAA,eC2RO,IAAK,kBAAL,CAAK,IACV,EAAA,4BAA8B,8BAE9B,EAAA,UAAY,YAEZ,EAAA,eAAiB,iBAEjB,EAAA,aAAe,eAPL,GAAL,CAAK,mBAAA,IA0KA,OAAL,CAAK,IACV,EAAA,eAAiB,iBACjB,EAAA,wBAA0B,0BAC1B,EAAA,gCAAkC,kCAHxB,GAAL,CAAK,QAAA,IAyIA,KAAL,CAAK,IACV,EAAA,aAAe,eACf,EAAA,QAAU,UAFA,GAAL,CAAK,MAAA,IAmBA,gBAAL,CAAK,IACV,EAAA,yBAA2B,2BAE3B,EAAA,QAAU,UAHA,GAAL,CAAK,iBAAA,IAMA,WAAL,CAAK,IACV,EAAA,oBAAsB,sBAEtB,EAAA,WAAa,aAEb,EAAA,QAAU,UAEV,EAAA,YAAc,cAPJ,GAAL,CAAK,YAAA,IA+DA,cAAL,CAAK,IACV,EAAA,uBAAyB,yBACzB,EAAA,KAAO,OACP,EAAA,MAAQ,QAHE,GAAL,CAAK,eAAA,IAmFA,aAAL,CAAK,IACV,EAAA,QAAU,UACV,EAAA,kBAAoB,oBACpB,EAAA,OAAS,SACT,EAAA,SAAW,WACX,EAAA,IAAM,MALI,GAAL,CAAK,cAAA,ICzvBZ,iBAAwC,QAAA,kBAUxC,iBAAqD,QAAA,8CACrD,uBAA+B,QAAA,oDAC/B,8BAGO,QAAA,2CAiBM,iBAAA,EAAkB,iBAAA,yBAmD5B,8BAA+B,CAChC,CACE,KAAM,wBACN,uBAAwB,6BACxB,gBAAiB,CACf,OAAS,IACP,MAAM,EAAiB,EAEvB,SAAO,8BAAA,uCAAsC,EAAc,EAE7D,SAAW,IACT,MAAM,EAAkB,EAExB,SAAO,8BAAA,yCAAwC,EAAe,IAKpE,CACE,KAAM,eACN,uBAAwB,iBACxB,gBAAiB,CACf,OAAS,IACP,MAAM,GAAA,EAAiB,uBAAA,gBAAe,EAAS,CAC7C,CACE,YAAa,iBAAA,qCACb,MAAO,CAAC,CAAE,KAAM,oDAIpB,SAAO,8BAAA,uCAAsC,EAAc,EAE7D,SAAW,IACT,MAAM,EAAkB,EAExB,SAAO,8BAAA,yCAAwC,EAAe,IAKpE,CACE,KAAM,SACN,uBAAwB,aACxB,gBAAiB,CACf,OAAS,IACP,MAAM,GAAA,EAAiB,uBAAA,gBAAe,EAAS,CAC7C,CACE,YAAa,iBAAA,qCACb,MAAO,CAAC,CAAE,KAAM,sCAIpB,SAAO,8BAAA,uCAAsC,EAAc,EAE7D,SAAW,IACT,MAAM,EAAkB,EAExB,SAAO,8BAAA,yCAAwC,EAAe,MC3ItE,8BAA0C,QAAA,2CAM7B,oBAGoB,8BAAA,2BAC/B","file":"/npm/@wix/auto_sdk_automations_action-provider@1.0.40/build/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@wix/auto_sdk_automations_action-provider@1.0.40/build/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export * from './src/service-plugins-types.js';\nexport * from './src/interfaces-automations-v1-action-provider.context.js';\n","export interface ValidateConfigurationRequest {\n  /**\n   * Action key as defined in your app's action configuration in the app dashboard.\n   * For example, `send-email` or `generate-invoice`.\n   */\n  actionKey: string;\n  /**\n   * Stringified object representing the mapping a Wix user made between keys in the input schema and their expected\n   * values when running the automation. A field can be a static value mapping, or an expression that will be evaluated\n   * dynamically on each activation.\n   */\n  inputMapping: string;\n}\n\nexport interface ValidateConfigurationResponse {\n  /** Whether the action configuration is valid. */\n  valid?: boolean;\n  /** Error details for an invalid action configuration. These are the errors displayed to the user. */\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 DuplicateInputMappingRequest {\n  /** Identifier for this action - human-readable action key - unique per app def ID */\n  actionKey: string;\n  /** Action input mapping to duplicate */\n  inputMapping: string;\n}\n\nexport interface DuplicateInputMappingResponse {\n  /** Duplicated action input mapping */\n  inputMapping?: string;\n}\n\nexport interface GenerateApplicationAutomationInputMappingRequest {\n  /** Identifier for this action - human-readable action key - unique per app def ID */\n  actionKey: string;\n  /** Action input mapping to generate from */\n  inputMapping: string;\n}\n\nexport interface GenerateApplicationAutomationInputMappingResponse {\n  /** Generated action input mapping */\n  inputMapping?: string;\n}\n\nexport interface GetQuotaInfoRequest {\n  /**\n   * Action key as defined in your app's action configuration in the app dashboard.\n   * For example, `send-email` or `generate-invoice`.\n   * @minLength 1\n   */\n  actionKey: string;\n}\n\nexport interface GetQuotaInfoResponse {\n  /** Details about the quotas for your action. */\n  actionQuotaInfo?: ActionQuotaInfo;\n}\n\nexport interface ActionQuotaInfo {\n  /**\n   * Whether the quotas for your action are enforced. If you mark this as `true` in the response body,\n   * Wix displays the information in the quota object on the site dashboard. If you mark this as `false` for\n   * a user, Wix does not display any quota info on the site dashboard for your service.\n   */\n  enforced?: boolean;\n  /**\n   * The plans your service provides, together with the quotas enforced by each plan. A site may be enrolled\n   * in multiple plans. Plans and quotas can be related as follows:\n   *\n   * + A single plan has a single quota.\n   * + A single plan has multiple quotas.\n   * + Multiple plans are associated with multiple quotas.\n   *\n   * Plans and quotas that are related should be grouped together in a single `quotaInfo`\n   * object.\n   */\n  quotaInfo?: QuotaInfo[];\n}\n\nexport interface QuotaInfo {\n  /** List of plans associated with the site making the request. */\n  plans?: Plan[];\n  /**\n   * List of quotas associated with the plans the site is enrolled in.\n   * @minSize 1\n   */\n  quotas?: Quota[];\n  /**\n   * Details for an upgrade call-to-action button.\n   * Displayed in the Wix user’s site dashboard together with the quota details.\n   */\n  upgradeCta?: UpgradeCTA;\n}\n\nexport interface Plan {\n  /** Plan ID defined by the action provider. */\n  _id?: string;\n  /** Plan name to display in the Wix user’s site dashboard. */\n  name?: string;\n}\n\nexport interface Quota {\n  /**\n   * Name of the feature the quota is related to. For example, \"Messages sent\".\n   * @minLength 1\n   */\n  featureName?: string;\n  /**\n   * Quota renewal date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.\n   * For example, 10 July 2020 at 15:00 is written as `2020-07-10 15:00:00.000`.\n   */\n  renewalDate?: Date | null;\n  /** The user's current quota usage. */\n  currentUsage?: string;\n  /** Quota limit data. */\n  limit?: string | null;\n  /** Additional information about the quota. Displayed as a tooltip in the Wix user’s dashboard. */\n  additionalInfo?: AdditionalInfo;\n}\n\nexport interface CTA {\n  /**\n   * Call-to-action redirect URL.\n   * @minLength 1\n   */\n  url?: string;\n  /**\n   * Call-to-action label.\n   * @minLength 1\n   */\n  label?: string;\n}\n\nexport interface AdditionalInfo {\n  /**\n   * Tooltip content.\n   * @minLength 1\n   */\n  description?: string;\n  /** Details for an options call-to-action link that appears in the tooltip. */\n  cta?: CTA;\n}\n\nexport interface UpgradeCTA {\n  /**\n   * CTA button redirect URL.\n   * @minLength 1\n   */\n  url?: string;\n  /**\n   * CTA button label.\n   * @minLength 1\n   */\n  label?: string;\n}\n\nexport interface GetDynamicInputSchemaRequest {\n  /**\n   * Action key as defined in your app's action configuration in the app dashboard.\n   * For example, `send-email` or `generate-invoice`.\n   * @minLength 5\n   * @maxLength 50\n   */\n  actionKey: string;\n  /**\n   * Object representing the mapping a Wix user made between keys in the [input schema](https://dev.wix.com/docs/rest/api-reference/wix-automations/action-spi/about-the-action-spi-input-schema) and their expected\n   * values when running the automation. A field can be a static value mapping, or an expression that will be evaluated\n   * dynamically on each activation.\n   */\n  inputMapping: Record<string, any> | null;\n}\n\nexport interface GetDynamicInputSchemaResponse {\n  /** A [JSON schema](https://json-schema.org/) containing the action's added dynamic fields and its static fields. */\n  inputSchema?: Record<string, any> | null;\n  /** A [UI schema](https://bo.wix.com/pages/automations-ui-lib/?path=/story/getting-started--about) is a JSON Schema that describes the UI of the static and dynamic fields. */\n  uiSchema?: Record<string, any> | null;\n}\n\nexport interface GetDynamicOutputSchemaRequest {\n  /**\n   * Action key as defined in your app's action configuration in the app dashboard.\n   * For example, `send-email` or `generate-invoice`.\n   * @minLength 5\n   * @maxLength 50\n   */\n  actionKey: string;\n  /**\n   * list of actions details which will be used to generate the output schema\n   * @minSize 1\n   * @maxSize 80\n   */\n  actionsInputMappings: ActionInputMapping[];\n}\n\nexport interface ActionInputMapping {\n  /**\n   * action identifier in the automation\n   * @format GUID\n   */\n  actionId?: string;\n  /**\n   * Objects representing mapping a Wix user made between keys in the [input schema](https://dev.wix.com/docs/rest/api-reference/wix-automations/action-spi/about-the-action-spi-input-schema) and their expected\n   * values when configuring the automation.\n   */\n  inputMapping?: Record<string, any> | null;\n}\n\nexport interface GetDynamicOutputSchemaResponse {\n  /** list of action's output schemas */\n  actionOutputSchemas?: ActionOutputSchema[];\n}\n\nexport interface ActionOutputSchema {\n  /**\n   * action identifier in the automation\n   * @format GUID\n   */\n  actionId?: string;\n  /** A [JSON schema](https://json-schema.org/) containing the action's output schema. */\n  outputSchema?: Record<string, any> | null;\n}\n\nexport interface InvokeRequest {\n  /**\n   * Data required for executing your action.\n   * Structured according to the [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema)\n   * you provided when configuring the action in your app's dashboard.\n   */\n  actionParams: Record<string, any> | null;\n  /**\n   * Action key as defined in your app's action configuration in the app dashboard.\n   * For example, `send-email` or `generate-invoice`.\n   */\n  actionKey: string;\n}\n\nexport interface ActivationContext {\n  /** @format GUID */\n  activationId?: string | null;\n  /** @format GUID */\n  esbConfigurationId?: string | null;\n  triggerKey?: string | null;\n  /** @format GUID */\n  triggerAppId?: string | null;\n  /** @format GUID */\n  actionId?: string | null;\n  payload?: Record<string, any> | null;\n  /** @format GUID */\n  actionAppId?: string | null;\n  /**\n   * Invocation token - in case of async invocation, this should be passed back in ReportActionInvocationCompletedRequest\n   * @maxLength 500\n   */\n  invocationToken?: string | null;\n}\n\nexport interface InvokeResponse\n  extends InvokeResponseInvokeTimeoutOptionsOneOf {\n  /**\n   * If the action has no [output schema](https://dev.wix.com/docs/rest/business-management/automations/actions/about-actions#the-output-schema), return an empty object.\n   * If the action defines an output schema, return a JSON object that correlates to the output schema.\n   */\n  result?: Record<string, any> | null;\n}\n\n/** @oneof */\nexport interface InvokeResponseInvokeTimeoutOptionsOneOf {}\n\nexport enum InvokeTimeoutType {\n  UNKNOWN_INVOKE_TIMEOUT_TYPE = 'UNKNOWN_INVOKE_TIMEOUT_TYPE',\n  /** Action completes immediately and the automation can proceed to the next action. */\n  IMMEDIATE = 'IMMEDIATE',\n  /** Action must complete within the specified length of time. */\n  TIMEOUT_LENGTH = 'TIMEOUT_LENGTH',\n  /** Action must complete by the specified date. */\n  TIMEOUT_DATE = 'TIMEOUT_DATE',\n}\n\nexport interface TimeoutLengthOptions {\n  /**\n   * Length of time that Wix waits for the action to complete.\n   *\n   * If you don't send a request to Report Action Invocation Completed\n   * ((SDK)[link-to-sdk]|(REST)[https://dev.wix.com/docs/rest/business-management/automations/triggers/triggered-events/report-action-invocation-completed])\n   * by the end of this time period, Wix marks the action as timed out and moves onto\n   * the next action.\n   * @min 1\n   * @max 1440\n   */\n  timeoutInMinutes?: number | null;\n}\n\nexport interface TimeoutDateOptions {\n  /**\n   * Date that Wix waits until for you to send a request to Report Action Invocation Completed\n   * ((SDK)[link-to-sdk]|(REST)[https://dev.wix.com/docs/rest/business-management/automations/triggers/triggered-events/report-action-invocation-completed])\n   * indicating that the action is complete.\n   *\n   * If you don't send a response by this date, Wix marks the action as timed out and moves onto\n   * the next action. You can set a date up to 1 year from the current date.\n   */\n  timeoutDate?: Date | null;\n}\n\nexport interface ResetActionRequest {\n  /**\n   * Identifier for this action - human-readable action key - unique per app def ID\n   * @minLength 5\n   * @maxLength 50\n   */\n  actionKey: string;\n  /** Action input mapping to reset */\n  inputMapping: string;\n}\n\nexport interface ResetActionResponse {}\n\nexport interface OnRemoveActionRequest {\n  /**\n   * Identifier for this action - human-readable action key - unique per app def ID\n   * @minLength 5\n   * @maxLength 50\n   */\n  actionKey: string;\n  /**\n   * Action input mappings to remove\n   * @maxSize 80\n   */\n  inputMappings: Record<string, any>[] | null;\n}\n\nexport interface OnRemoveActionResponse {}\n\nexport interface OnBeforeSaveRequest {\n  /**\n   * Identifier for this action - human readable action key - unique per app def id\n   * @minLength 5\n   * @maxLength 50\n   */\n  actionKey: string;\n  /**\n   * list of action input mappings\n   * @maxSize 80\n   */\n  inputMappings: string[];\n}\n\nexport interface OnBeforeSaveResponse {}\n\nexport interface GenerateActionInputMappingFromTemplateRequest {\n  /** action input mapping template the action spi provider will generate input mapping from */\n  actionInputMappingTemplate: Record<string, any> | null;\n}\n\nexport interface GenerateActionInputMappingFromTemplateResponse {\n  /** generated action input mapping spi provider returns */\n  generatedActionInputMapping?: Record<string, any> | null;\n}\n\nexport interface MergeInputMappingsRequest {\n  /**\n   * relevant actionKey\n   * @minLength 1\n   * @maxLength 100\n   */\n  actionKey: string;\n  /**\n   * list of input mappings to merge per action in the automation\n   * if the same type of AppDefined action exists multiple times in the automation, all instances of input mapping would be passed\n   * @minSize 1\n   * @maxSize 80\n   */\n  inputMappingsToMerge: InputMappingToMerge[];\n}\n\nexport interface InputMappingToMerge {\n  /**\n   * action identifier in the automation\n   * @format GUID\n   */\n  actionId?: string;\n  /** the input mapping of the source automation to be merged into the target automation */\n  sourceInputMapping?: Record<string, any> | null;\n  /** input mapping of the target automation that the source automation would be merge into */\n  targetInputMapping?: Record<string, any> | null;\n}\n\nexport interface MergeInputMappingsResponse {\n  /** list of merged input mappings */\n  mergedInputMappings?: MergedInputMapping[];\n}\n\nexport interface MergedInputMapping {\n  /**\n   * action identifier in the automation\n   * @format GUID\n   */\n  actionId?: string;\n  /** merged input mapping */\n  inputMapping?: Record<string, any> | null;\n}\n\nexport interface GenerateInputMappingFromIntentRequest {\n  /**\n   * User's/Agent's natural language intent describing the desired action configuration\n   * @minLength 1\n   * @maxLength 10000\n   */\n  intent: string;\n  /**\n   * Conversation identifier for maintaining context across multiple requests.\n   * This represents the entire conversation ID with the clients agent.\n   * @minLength 1\n   * @maxLength 256\n   */\n  conversationId: string;\n  /** The accumulated payload schema for an action. */\n  actionSchema: Record<string, any> | null;\n}\n\nexport interface GenerateInputMappingFromIntentResponse\n  extends GenerateInputMappingFromIntentResponseStatusInfoOneOf {\n  /** The generated input mapping conforming to the action's input schema */\n  inputMappingGeneratedInfo?: InputMappingGeneratedInfo;\n  /** Human-readable feedback for the user to refine their intent and structured reason for the failure */\n  additionalInformationRequiredInfo?: AdditionalInformationRequiredInfo;\n  /** Type of result returned */\n  status?: Status;\n}\n\n/** @oneof */\nexport interface GenerateInputMappingFromIntentResponseStatusInfoOneOf {\n  /** The generated input mapping conforming to the action's input schema */\n  inputMappingGeneratedInfo?: InputMappingGeneratedInfo;\n  /** Human-readable feedback for the user to refine their intent and structured reason for the failure */\n  additionalInformationRequiredInfo?: AdditionalInformationRequiredInfo;\n}\n\nexport enum Status {\n  UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n  INPUT_MAPPING_GENERATED = 'INPUT_MAPPING_GENERATED',\n  ADDITIONAL_INFORMATION_REQUIRED = 'ADDITIONAL_INFORMATION_REQUIRED',\n}\n\nexport interface InputMappingGeneratedInfo {\n  /** The generated action input mapping conforming to the action's input schema */\n  inputMapping?: Record<string, any> | null;\n}\n\nexport interface AdditionalInformationRequiredInfo {\n  /**\n   * Human-readable feedback for the user to refine their intent\n   * @minLength 1\n   * @maxLength 10000\n   */\n  feedback?: string;\n}\n\nexport interface ActionProviderSPIConfig {\n  /** URL to action provider service for this action */\n  baseUri?: string;\n  /** Action service plugin configuration */\n  actionConfig?: ActionSPIConfig;\n}\n\nexport interface ActionSPIConfig {\n  /**\n   * Identifier for this action - human-readable action key - unique per app def ID\n   * @minLength 5\n   * @maxLength 50\n   */\n  actionKey?: string;\n  /**\n   * The action expects the following input\n   * The schema is described according to the JSON Schema standard: https://json-schema.org/\n   *\n   * Example - Add Label to Contact Action input schema:\n   * {\n   * \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n   * \"type\": \"object\",\n   * \"title\": \"Add label to contact input schema\",\n   * \"description\": \"The schema of the JSON that is sent when invoking this add label to contact action\",\n   * \"default\": {},\n   * \"examples\": [\n   * {\n   * \"contactId\": \"a647eb32-c5f4-11ec-9d64-0242ac120002\",\n   * \"labelId\": \"1e8b5e5e-dba2-11ec-9d64-0242ac120002\"\n   * }\n   * ],\n   * \"required\": [\n   * \"contactId\",\n   * \"labelId\"\n   * ],\n   * \"properties\": {\n   * \"contactId\": {\n   * \"$id\": \"#/properties/contactId\",\n   * \"type\": \"string\",\n   * \"format\": \"uuid\",\n   * \"title\": \"Contact Id\",\n   * \"description\": \"The ID of the contact to apply the label to\",\n   * \"default\": \"\",\n   * \"identityType\": \"contact\" // can be contact/visitor/user, limited to 1 type per identity.\n   * },\n   * \"labelId\": {\n   * \"$id\": \"#/properties/labelId\",\n   * \"type\": \"string\",\n   * \"format\": \"uuid\",\n   * \"title\": \"Label Id\",\n   * \"description\": \"The ID of the label to apply\",\n   * \"default\": \"\",\n   * }\n   * }\n   * }\n   */\n  inputSchema?: Record<string, any> | null;\n  /**\n   * The output of the action, which will be added to the payload after execution.\n   * The schema is described according to the JSON Schema standard: https://json-schema.org/\n   *\n   * Example - Output of create task action\n   * {\n   * \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n   * \"type\": \"object\",\n   * \"title\": \"Create task action schema\",\n   * \"description\": \"The schema of the JSON that is sent when invoking this create task action\",\n   * \"default\": {},\n   * \"examples\": [\n   * {\n   * \"taskId\": \"a647eb32-c5f4-11ec-9d64-0242ac120002\",\n   * }\n   * ],\n   * \"required\": [\n   * \"taskId\"\n   * ],\n   * \"properties\": {\n   * \"taskId\": {\n   * \"$id\": \"#/properties/taskId\",\n   * \"type\": \"string\",\n   * \"format\": \"uuid\",\n   * \"title\": \"Contact Id\",\n   * \"description\": \"The ID of the task created\",\n   * \"default\": \"\",\n   * }\n   * }\n   * }\n   */\n  outputSchema?: Record<string, any> | null;\n  /**\n   * Actions display name - human-readable field. Ex. - \"Send SMS\"\n   * @minLength 5\n   * @maxLength 80\n   */\n  displayName?: string | null;\n  description?: string | null;\n  /** Specifies which optional methods were implemented */\n  implementedMethods?: ImplementedMethods;\n  /**\n   * Indicates whether we should wait for the action to complete before executing the next actions or finish and\n   * expect a callback in the `actionCompleted` method.\n   * @deprecated Indicates whether we should wait for the action to complete before executing the next actions or finish and\n   * expect a callback in the `actionCompleted` method.\n   * @targetRemovalDate 2025-03-10\n   */\n  executionType?: ExecutionType;\n  /** Chosen interface for action. */\n  interfaceConfiguration?: InterfaceConfiguration;\n  /** Icon representing the action in the UI */\n  icon?: string;\n  /**\n   * action id\n   * @format GUID\n   */\n  _id?: string | null;\n}\n\nexport enum Type {\n  UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n  GENERIC = 'GENERIC',\n}\n\nexport interface WidgetComponentOptions {\n  /**\n   * Name of provided component\n   * @minLength 1\n   * @maxLength 80\n   */\n  componentName?: string;\n}\n\nexport interface GenericOptions {\n  /** UI schema */\n  uiSchema?: Record<string, any> | null;\n}\n\nexport enum IntegrationType {\n  UNKNOWN_INTEGRATION_TYPE = 'UNKNOWN_INTEGRATION_TYPE',\n  /** Integration with Wix API methods */\n  WIX_API = 'WIX_API',\n}\n\nexport enum SourceType {\n  UNKNOWN_SOURCE_TYPE = 'UNKNOWN_SOURCE_TYPE',\n  /** The input/output schemas are constructed by developers in Dev Center using the self-service flow */\n  DEV_CENTER = 'DEV_CENTER',\n  /** The input/output schemas are derived from an existing Wix API through the API-to-Action feature */\n  WIX_API = 'WIX_API',\n  /** The action invokes external API methods based on configuration */\n  INTEGRATION = 'INTEGRATION',\n}\n\nexport interface WixApiOptions {\n  /**\n   * Service entity fqdn\n   * @minLength 1\n   * @maxLength 100\n   */\n  serviceEntityFqdn?: string;\n  /**\n   * The service providing the API\n   * @minLength 1\n   * @maxLength 200\n   */\n  serviceName?: string;\n  /**\n   * The method name\n   * @minLength 1\n   * @maxLength 200\n   */\n  methodName?: string;\n}\n\nexport interface IntegrationOptions {\n  /** The integration type */\n  integrationType?: IntegrationType;\n}\n\nexport interface ImplementedMethods {\n  /** Implements ValidateConfiguration */\n  validateConfiguration?: boolean;\n  /** Implements DuplicateInputMapping */\n  duplicateInputMapping?: boolean;\n  /** Implements GenerateApplicationAutomationInputMapping */\n  generateApplicationAutomationInputMapping?: boolean;\n  /** Implements GetQuotaInfo */\n  getQuotaInfo?: boolean;\n  /** Implements OnBeforeSave */\n  onBeforeSave?: boolean;\n  /** Implements OnReset */\n  onReset?: boolean;\n  /** implements generateActionInputMappingFromTemplate */\n  generateActionInputMappingFromTemplate?: boolean;\n  /** implements OnRemove */\n  onRemove?: boolean;\n  /** Implements GetDynamicInputSchema */\n  getDynamicInputSchema?: boolean;\n  /** Implements MergeInputMappings */\n  mergeInputMappings?: boolean;\n  /** Implements GetDynamicOutputSchema */\n  getDynamicOutputSchema?: boolean;\n  /** Implements GenerateInputMappingFromIntent */\n  generateInputMappingFromIntent?: boolean;\n}\n\nexport enum ExecutionType {\n  UNKNOWN_EXECUTION_TYPE = 'UNKNOWN_EXECUTION_TYPE',\n  SYNC = 'SYNC',\n  ASYNC = 'ASYNC',\n}\n\nexport interface Metadata {\n  /** Show action only to advanced mode users (Wix staff) */\n  hidden?: boolean;\n}\n\nexport interface InterfaceConfiguration\n  extends InterfaceConfigurationOptionsOneOf {\n  genericOptions?: GenericOptions;\n  /** Type of chosen interface. */\n  type?: Type;\n}\n\n/** @oneof */\nexport interface InterfaceConfigurationOptionsOneOf {\n  genericOptions?: GenericOptions;\n}\n\nexport interface FocalPoint {\n  /** X-coordinate of the focal point. */\n  x?: number;\n  /** Y-coordinate of the focal point. */\n  y?: number;\n  /** crop by height */\n  height?: number | null;\n  /** crop by width */\n  width?: number | null;\n}\n\nexport interface Source extends SourceOptionsOneOf {\n  /** Wix API options */\n  wixApiOptions?: WixApiOptions;\n  /** Integration options */\n  integrationOptions?: IntegrationOptions;\n  /** the source type */\n  type?: SourceType;\n}\n\n/** @oneof */\nexport interface SourceOptionsOneOf {\n  /** Wix API options */\n  wixApiOptions?: WixApiOptions;\n  /** Integration options */\n  integrationOptions?: IntegrationOptions;\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  GetQuotaInfoRequest,\n  GetQuotaInfoResponse,\n  InvokeRequest,\n  InvokeResponse,\n} from './service-plugins-types.js';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\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 GetQuotaInfoEnvelope {\n  request: GetQuotaInfoRequest;\n  metadata: Context;\n}\n\nexport interface InvokeEnvelope {\n  request: InvokeRequest;\n  metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n  /**\n   *\n   * This method is used to validate a Wix user's action configuration.\n   *\n   * Wix calls this method when a Wix user configures an automation with your action,\n   * and when they select the automation from the **Your automations** list in the **Automations** dashboard.\n   * Wix uses the returned response to display an error message to the Wix user if the action is invalid.\n   *\n   * Implementing this method is optional. To implement it, select the method under **Service plugin endpoints** when editing your\n   * action in the app dashboard. If you don't implement this method, Wix assumes that the action is always valid.\n   *\n   * As an example, a Wix user configures an action called “Send gift card”, where a gift card is identified by a unique UUID.\n   * After some period of time the user deletes the gift card, making the action’s mapping with the current\n   * UUID invalid. Validate Configuration checks the validity of the action’s input values, and returns an error to the user\n   * if one or more of the values is not valid. */\n  validateConfiguration(\n    payload: ValidateConfigurationEnvelope\n  ): ValidateConfigurationResponse | Promise<ValidateConfigurationResponse>;\n\n  /**\n   *\n   * This method retrieves quota information for an action.\n   *\n   * Wix calls this method when a Wix user opens the **Manage your automations quotas** modal\n   * in the **Automations** dashboard. The response from this method is displayed in the modal.\n   * The data is displayed based on the response body format.\n   *\n   * Implementing this method is optional. To implement it, select the method under **Service plugin endpoints** when editing your\n   * action in the app dashboard.\n   *\n   * > **Note:**\n   * > Wix doesn't enforce action quota limits. It only displays them to Wix users.\n   * > Enforcing quota limits is the action provider's responsibility. */\n  getQuotaInfo(\n    payload: GetQuotaInfoEnvelope\n  ): GetQuotaInfoResponse | Promise<GetQuotaInfoResponse>;\n\n  /**\n   *\n   * This method is used to execute your action.\n   *\n   * Wix calls Invoke when an automation using your action is triggered. The request body includes\n   * all the data needed to execute the action including the final values of any dynamic parameters.\n   *\n   * If you defined an output schema when configuring the action in the app dashboard, return your action's output data in the response body.\n   * The output should match the defined schema.\n   *\n   * There's no need to validate the data in the request body against the JSON schema defined when the action was configured.\n   * Wix validates the data before calling this method. */\n  invoke(payload: InvokeEnvelope): InvokeResponse | Promise<InvokeResponse>;\n}>('AUTOMATIONS_ACTION_PROVIDER', [\n  {\n    name: 'validateConfiguration',\n    primaryHttpMappingPath: '/v1/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: 'getQuotaInfo',\n    primaryHttpMappingPath: '/v1/quota-info',\n    transformations: {\n      toREST: (payload: any) => {\n        const toRestResponse = transformPaths(payload, [\n          {\n            transformFn: transformSDKTimestampToRESTTimestamp,\n            paths: [{ path: 'actionQuotaInfo.quotaInfo.quotas.renewalDate' }],\n          },\n        ]);\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: 'invoke',\n    primaryHttpMappingPath: '/v1/invoke',\n    transformations: {\n      toREST: (payload: any) => {\n        const toRestResponse = transformPaths(payload, [\n          {\n            transformFn: transformSDKTimestampToRESTTimestamp,\n            paths: [{ path: 'timeoutDateOptions.timeoutDate' }],\n          },\n        ]);\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-action-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-action-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n  typeof publicProvideHandlers\n> &\n  typeof publicProvideHandlers = createServicePluginModule(\n  publicProvideHandlers\n);\n"]}