@wix/auto_sdk_functions_function-productions 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/functions-v1-production-function-productions.universal.ts","../../src/functions-v1-production-function-productions.http.ts","../../src/functions-v1-production-function-productions.public.ts","../../src/functions-v1-production-function-productions.context.ts"],"sourcesContent":["export * from './src/functions-v1-production-function-productions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixFunctionsV1Production from './functions-v1-production-function-productions.http.js';\n\n/** A function production defines a function and its related entities. */\nexport interface FunctionProduction extends FunctionProductionOptionsOneOf {\n /** Options for creating a function from a function type. */\n blankOptions?: BlankOptions;\n /** Options for creating a function from a function template. */\n templateOptions?: TemplateOptions;\n /**\n * Function production ID. This is the same as the created function's ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * App ID of the business solution that created the function type the function production is based on.\n * @format GUID\n */\n appId?: string;\n /** Type that the function is created from. */\n type?: FunctionProductionTypeWithLiterals;\n /** Service plugin configuration for the function. */\n functionSpiConfiguration?: FunctionSpiConfiguration;\n /** Function created from the function production. */\n function?: _Function;\n /**\n * Function methods created from the function production.\n * @readonly\n * @maxSize 100\n */\n functionMethods?: FunctionMethod[];\n /**\n * Automations created from the function production.\n * @readonly\n * @maxSize 100\n */\n automations?: Automation[];\n /**\n * Date and time the function production was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the function production was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\n/** @oneof */\nexport interface FunctionProductionOptionsOneOf {\n /** Options for creating a function from a function type. */\n blankOptions?: BlankOptions;\n /** Options for creating a function from a function template. */\n templateOptions?: TemplateOptions;\n}\n\nexport enum FunctionProductionType {\n /** Function created from a function type. */\n BLANK = 'BLANK',\n /** Function created from a function template. */\n TEMPLATE = 'TEMPLATE',\n}\n\n/** @enumType */\nexport type FunctionProductionTypeWithLiterals =\n | FunctionProductionType\n | 'BLANK'\n | 'TEMPLATE';\n\nexport interface BlankOptions {\n /**\n * ID of the function type that the function was created from.\n * @format GUID\n */\n functionExtensionId?: string;\n}\n\nexport interface TemplateOptions {\n /**\n * ID of the function template that the function was created from.\n * @format GUID\n */\n functionTemplateExtensionId?: string;\n}\n\n/** SpiConfiguration is a spi configuration for a specific function. */\nexport interface FunctionSpiConfiguration {\n /**\n * SpiConfiguration ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * SpiConfiguration revision.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the SpiConfiguration was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the SpiConfiguration was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Function ID\n * @format GUID\n * @readonly\n */\n functionId?: string | null;\n /** Function SPI configuration dev center component payload. */\n configuration?: Record<string, any> | null;\n}\n\nexport interface _Function {\n /**\n * Function ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the function is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the function.\n *\n * Ignored when creating a function.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the function was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the function was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * The function's app extension ID.\n * @readonly\n * @format GUID\n */\n functionExtensionId?: string | null;\n /**\n * Function name.\n * @maxLength 100\n */\n functionName?: string | null;\n /**\n * Activation status\n * @readonly\n */\n activationStatus?: ActivationStatusWithLiterals;\n /**\n * ID of the app that defines the function.\n * @readonly\n * @format GUID\n */\n appId?: string | null;\n /**\n * The function's app extension name.\n * @readonly\n * @minLength 1\n * @maxLength 100\n */\n functionExtensionName?: string | null;\n /**\n * Function template extension id\n * @readonly\n * @format GUID\n */\n functionTemplateExtensionId?: string | null;\n}\n\nexport enum ActivationStatus {\n /** Function is activated. */\n ACTIVE = 'ACTIVE',\n /** Function is deactivated. */\n INACTIVE = 'INACTIVE',\n /** Function is saved but has never been activated. */\n DRAFT = 'DRAFT',\n}\n\n/** @enumType */\nexport type ActivationStatusWithLiterals =\n | ActivationStatus\n | 'ACTIVE'\n | 'INACTIVE'\n | 'DRAFT';\n\n/** A function method is a link between a function and an automation, which defines the logic that runs when a function is triggered. */\nexport interface FunctionMethod {\n /**\n * Function method ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Function method revision.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the function method was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the function method was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the automation to link to the function.\n * @format GUID\n */\n automationId?: string;\n /**\n * ID of the function that this method links to an automation.\n * @format GUID\n */\n functionId?: string;\n /**\n * Display name for the function method.\n * @maxLength 160\n */\n methodName?: string;\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?: OriginWithLiterals;\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\n/** @enumType */\nexport type DomainWithLiterals = Domain | 'USER' | 'WIX' | 'WIX_ACCOUNT';\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?: StatusWithLiterals;\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\n/** @enumType */\nexport type TimeUnitWithLiterals =\n | TimeUnit\n | 'MINUTES'\n | 'HOURS'\n | 'DAYS'\n | 'WEEKS'\n | 'MONTHS';\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?: TimeUnitWithLiterals;\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?: TimeUnitWithLiterals;\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?: OperatorWithLiterals;\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\n/** @enumType */\nexport type OperatorWithLiterals = Operator | 'OR' | 'AND';\n\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: LanguageWithLiterals;\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/** @enumType */\nexport type LanguageWithLiterals = Language | 'JAVASCRIPT';\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\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'APP_DEFINED'\n | 'CONDITION'\n | 'CODE_CONDITION'\n | 'DELAY'\n | 'RATE_LIMIT';\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?: TimeUnitWithLiterals;\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?: TimeUnitWithLiterals;\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\n/** @enumType */\nexport type StatusWithLiterals = Status | 'ACTIVE' | 'INACTIVE';\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?: TypeWithLiterals;\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\n/** @enumType */\nexport type OriginWithLiterals =\n | Origin\n | 'USER'\n | 'APPLICATION'\n | 'PREINSTALLED';\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\n/** Creation of function production */\nexport interface CreateFunctionProductionRequest {\n /** Function production to create. */\n functionProduction: FunctionProduction;\n}\n\nexport interface CreateFunctionProductionResponse {\n /** The created function production. */\n functionProduction?: FunctionProduction;\n}\n\n/** Update of function production */\nexport interface UpdateFunctionProductionRequest {\n /** Function production to update. */\n functionProduction: FunctionProduction;\n}\n\nexport interface UpdateFunctionProductionResponse {\n /** Updated function production. */\n functionProduction?: FunctionProduction;\n}\n\nexport interface DeleteFunctionProductionRequest {\n /**\n * ID of the function production to delete.\n * @format GUID\n */\n functionProductionId: string;\n}\n\nexport interface DeleteFunctionProductionResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\n/**\n * Creates a function production.\n *\n * This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation#quick-creation-and-configuration).\n *\n * You can create a function production from a function type or a function template. If you create a function production from a function type, the automation created will not contain any logic. If you create a function production from a function template, the automation created will contain the template's automation logic.\n *\n * > **Note:** Some function types have a default template applied, in which case the automation created will contain the default template's automation logic.\n *\n * Once created, all parts of the function production can be updated using the [Update Function Production](https://dev.wix.com/docs/api-reference/business-management/functions/function-productions/update-function-production) method or other APIs. They work together so if you update the function, or anything related to it, the function production object will be updated to reflect the changes.\n * @param functionProduction - Function production to create.\n * @public\n * @requiredField functionProduction\n * @requiredField functionProduction.appId\n * @requiredField functionProduction.options\n * @requiredField functionProduction.type\n * @permissionId FUNCTIONS.FUNCTION_PRODUCTION_CREATE\n * @applicableIdentity APP\n * @returns The created function production.\n * @fqn wix.functions.v1.productions.FunctionProductions.CreateFunctionProduction\n */\nexport async function createFunctionProduction(\n functionProduction: NonNullablePaths<FunctionProduction, `appId` | `type`, 2>\n): Promise<\n NonNullablePaths<\n FunctionProduction,\n | `blankOptions.functionExtensionId`\n | `templateOptions.functionTemplateExtensionId`\n | `appId`\n | `type`\n | `function.activationStatus`\n | `functionMethods`\n | `functionMethods.${number}.automationId`\n | `functionMethods.${number}.functionId`\n | `functionMethods.${number}.methodName`\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.templateInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n functionProduction: functionProduction,\n });\n\n const reqOpts =\n ambassadorWixFunctionsV1Production.createFunctionProduction(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.functionProduction!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { functionProduction: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['functionProduction']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a function production.\n * @param _id - Function production ID. This is the same as the created function's ID.\n * @public\n * @requiredField _id\n * @requiredField functionProduction\n * @requiredField functionProduction.automations\n * @requiredField functionProduction.functionSpiConfiguration\n * @permissionId FUNCTIONS.FUNCTION_PRODUCTION_UPDATE\n * @applicableIdentity APP\n * @returns Updated function production.\n * @fqn wix.functions.v1.productions.FunctionProductions.UpdateFunctionProduction\n */\nexport async function updateFunctionProduction(\n _id: string,\n functionProduction: NonNullablePaths<\n UpdateFunctionProduction,\n `automations` | `functionSpiConfiguration`,\n 2\n >\n): Promise<\n NonNullablePaths<\n FunctionProduction,\n | `blankOptions.functionExtensionId`\n | `templateOptions.functionTemplateExtensionId`\n | `appId`\n | `type`\n | `function.activationStatus`\n | `functionMethods`\n | `functionMethods.${number}.automationId`\n | `functionMethods.${number}.functionId`\n | `functionMethods.${number}.methodName`\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.templateInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n functionProduction: { ...functionProduction, id: _id },\n });\n\n const reqOpts =\n ambassadorWixFunctionsV1Production.updateFunctionProduction(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.functionProduction!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { functionProduction: '$[1]' },\n explicitPathsToArguments: { 'functionProduction.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'functionProduction']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateFunctionProduction {\n /** Options for creating a function from a function type. */\n blankOptions?: BlankOptions;\n /** Options for creating a function from a function template. */\n templateOptions?: TemplateOptions;\n /**\n * Function production ID. This is the same as the created function's ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * App ID of the business solution that created the function type the function production is based on.\n * @format GUID\n */\n appId?: string;\n /** Type that the function is created from. */\n type?: FunctionProductionTypeWithLiterals;\n /** Service plugin configuration for the function. */\n functionSpiConfiguration?: FunctionSpiConfiguration;\n /** Function created from the function production. */\n function?: _Function;\n /**\n * Function methods created from the function production.\n * @readonly\n * @maxSize 100\n */\n functionMethods?: FunctionMethod[];\n /**\n * Automations created from the function production.\n * @readonly\n * @maxSize 100\n */\n automations?: Automation[];\n /**\n * Date and time the function production was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the function production was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\n/**\n * Deletes a function production and all its associated entities.\n * @param functionProductionId - ID of the function production to delete.\n * @public\n * @requiredField functionProductionId\n * @permissionId FUNCTIONS.FUNCTION_PRODUCTION_DELETE\n * @applicableIdentity APP\n * @fqn wix.functions.v1.productions.FunctionProductions.DeleteFunctionProduction\n */\nexport async function deleteFunctionProduction(\n functionProductionId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n functionProductionId: functionProductionId,\n });\n\n const reqOpts =\n ambassadorWixFunctionsV1Production.deleteFunctionProduction(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { functionProductionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['functionProductionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\nimport { _Function } from './functions-v1-production-function-productions.types';\n\nfunction resolveWixFunctionsV1ProductionsFunctionProductionsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/functions/v1/function-productions',\n destPath: '/v1/function-productions',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/functions/v1/productions',\n destPath: '/v1/function-productions',\n },\n {\n srcPath: '/functions/v1/function-productions',\n destPath: '/v1/function-productions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/functions/v1/function-productions',\n destPath: '/v1/function-productions',\n },\n ],\n _: [\n {\n srcPath: '/functions/v1/function-productions',\n destPath: '/v1/function-productions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_functions_function-productions';\n\n/**\n * Creates a function production.\n *\n * This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation#quick-creation-and-configuration).\n *\n * You can create a function production from a function type or a function template. If you create a function production from a function type, the automation created will not contain any logic. If you create a function production from a function template, the automation created will contain the template's automation logic.\n *\n * > **Note:** Some function types have a default template applied, in which case the automation created will contain the default template's automation logic.\n *\n * Once created, all parts of the function production can be updated using the [Update Function Production](https://dev.wix.com/docs/api-reference/business-management/functions/function-productions/update-function-production) method or other APIs. They work together so if you update the function, or anything related to it, the function production object will be updated to reflect the changes.\n */\nexport function createFunctionProduction(\n payload: object\n): RequestOptionsFactory<any> {\n function __createFunctionProduction({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'functionProduction.createdDate' },\n { path: 'functionProduction.updatedDate' },\n { path: 'functionProduction.functionSpiConfiguration.createdDate' },\n { path: 'functionProduction.functionSpiConfiguration.updatedDate' },\n { path: 'functionProduction.function.createdDate' },\n { path: 'functionProduction.function.updatedDate' },\n { path: 'functionProduction.functionMethods.createdDate' },\n { path: 'functionProduction.functionMethods.updatedDate' },\n { path: 'functionProduction.automations.createdDate' },\n { path: 'functionProduction.automations.updatedDate' },\n { path: 'functionProduction.automations.draftUpdatedDate' },\n {\n path: 'functionProduction.automations.autoArchivePolicy.archiveDate',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.functions.v1.production',\n method: 'POST' as any,\n methodFqn:\n 'wix.functions.v1.productions.FunctionProductions.CreateFunctionProduction',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixFunctionsV1ProductionsFunctionProductionsUrl({\n protoPath: '/v1/function-productions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'functionProduction.createdDate' },\n { path: 'functionProduction.updatedDate' },\n {\n path: 'functionProduction.functionSpiConfiguration.createdDate',\n },\n {\n path: 'functionProduction.functionSpiConfiguration.updatedDate',\n },\n { path: 'functionProduction.function.createdDate' },\n { path: 'functionProduction.function.updatedDate' },\n { path: 'functionProduction.functionMethods.createdDate' },\n { path: 'functionProduction.functionMethods.updatedDate' },\n { path: 'functionProduction.automations.createdDate' },\n { path: 'functionProduction.automations.updatedDate' },\n { path: 'functionProduction.automations.draftUpdatedDate' },\n {\n path: 'functionProduction.automations.autoArchivePolicy.archiveDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createFunctionProduction;\n}\n\n/** Updates a function production. */\nexport function updateFunctionProduction(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateFunctionProduction({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'functionProduction.createdDate' },\n { path: 'functionProduction.updatedDate' },\n { path: 'functionProduction.functionSpiConfiguration.createdDate' },\n { path: 'functionProduction.functionSpiConfiguration.updatedDate' },\n { path: 'functionProduction.function.createdDate' },\n { path: 'functionProduction.function.updatedDate' },\n { path: 'functionProduction.functionMethods.createdDate' },\n { path: 'functionProduction.functionMethods.updatedDate' },\n { path: 'functionProduction.automations.createdDate' },\n { path: 'functionProduction.automations.updatedDate' },\n { path: 'functionProduction.automations.draftUpdatedDate' },\n {\n path: 'functionProduction.automations.autoArchivePolicy.archiveDate',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.functions.v1.production',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.functions.v1.productions.FunctionProductions.UpdateFunctionProduction',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixFunctionsV1ProductionsFunctionProductionsUrl({\n protoPath: '/v1/function-productions/{functionProduction.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'functionProduction.createdDate' },\n { path: 'functionProduction.updatedDate' },\n {\n path: 'functionProduction.functionSpiConfiguration.createdDate',\n },\n {\n path: 'functionProduction.functionSpiConfiguration.updatedDate',\n },\n { path: 'functionProduction.function.createdDate' },\n { path: 'functionProduction.function.updatedDate' },\n { path: 'functionProduction.functionMethods.createdDate' },\n { path: 'functionProduction.functionMethods.updatedDate' },\n { path: 'functionProduction.automations.createdDate' },\n { path: 'functionProduction.automations.updatedDate' },\n { path: 'functionProduction.automations.draftUpdatedDate' },\n {\n path: 'functionProduction.automations.autoArchivePolicy.archiveDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateFunctionProduction;\n}\n\n/** Deletes a function production and all its associated entities. */\nexport function deleteFunctionProduction(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteFunctionProduction({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.functions.v1.production',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.functions.v1.productions.FunctionProductions.DeleteFunctionProduction',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixFunctionsV1ProductionsFunctionProductionsUrl({\n protoPath: '/v1/function-productions/{functionProductionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteFunctionProduction;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n FunctionProduction,\n UpdateFunctionProduction,\n createFunctionProduction as universalCreateFunctionProduction,\n deleteFunctionProduction as universalDeleteFunctionProduction,\n updateFunctionProduction as universalUpdateFunctionProduction,\n} from './functions-v1-production-function-productions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/functions' };\n\nexport function createFunctionProduction(\n httpClient: HttpClient\n): CreateFunctionProductionSignature {\n return (\n functionProduction: NonNullablePaths<\n FunctionProduction,\n `appId` | `type`,\n 2\n >\n ) =>\n universalCreateFunctionProduction(\n functionProduction,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateFunctionProductionSignature {\n /**\n * Creates a function production.\n *\n * This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation#quick-creation-and-configuration).\n *\n * You can create a function production from a function type or a function template. If you create a function production from a function type, the automation created will not contain any logic. If you create a function production from a function template, the automation created will contain the template's automation logic.\n *\n * > **Note:** Some function types have a default template applied, in which case the automation created will contain the default template's automation logic.\n *\n * Once created, all parts of the function production can be updated using the [Update Function Production](https://dev.wix.com/docs/api-reference/business-management/functions/function-productions/update-function-production) method or other APIs. They work together so if you update the function, or anything related to it, the function production object will be updated to reflect the changes.\n * @param - Function production to create.\n * @returns The created function production.\n */\n (\n functionProduction: NonNullablePaths<\n FunctionProduction,\n `appId` | `type`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n FunctionProduction,\n | `blankOptions.functionExtensionId`\n | `templateOptions.functionTemplateExtensionId`\n | `appId`\n | `type`\n | `function.activationStatus`\n | `functionMethods`\n | `functionMethods.${number}.automationId`\n | `functionMethods.${number}.functionId`\n | `functionMethods.${number}.methodName`\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.templateInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n >;\n}\n\nexport function updateFunctionProduction(\n httpClient: HttpClient\n): UpdateFunctionProductionSignature {\n return (\n _id: string,\n functionProduction: NonNullablePaths<\n UpdateFunctionProduction,\n `automations` | `functionSpiConfiguration`,\n 2\n >\n ) =>\n universalUpdateFunctionProduction(\n _id,\n functionProduction,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateFunctionProductionSignature {\n /**\n * Updates a function production.\n * @param - Function production ID. This is the same as the created function's ID.\n * @returns Updated function production.\n */\n (\n _id: string,\n functionProduction: NonNullablePaths<\n UpdateFunctionProduction,\n `automations` | `functionSpiConfiguration`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n FunctionProduction,\n | `blankOptions.functionExtensionId`\n | `templateOptions.functionTemplateExtensionId`\n | `appId`\n | `type`\n | `function.activationStatus`\n | `functionMethods`\n | `functionMethods.${number}.automationId`\n | `functionMethods.${number}.functionId`\n | `functionMethods.${number}.methodName`\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.templateInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n >;\n}\n\nexport function deleteFunctionProduction(\n httpClient: HttpClient\n): DeleteFunctionProductionSignature {\n return (functionProductionId: string) =>\n universalDeleteFunctionProduction(\n functionProductionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteFunctionProductionSignature {\n /**\n * Deletes a function production and all its associated entities.\n * @param - ID of the function production to delete.\n */\n (functionProductionId: string): Promise<void>;\n}\n\nexport {\n AIMetadata,\n Action,\n ActionEvent,\n ActionInfoOneOf,\n ActionSettings,\n ActivationStatus,\n AppDefinedAction,\n ApplicationOrigin,\n AuditInfo,\n AuditInfoIdOneOf,\n AutoArchivePolicy,\n Automation,\n AutomationConfiguration,\n AutomationOriginInfoOneOf,\n AutomationSettings,\n BlankOptions,\n CodeConditionAction,\n CodeSnippet,\n ConditionAction,\n ConditionExpressionGroup,\n CreateFunctionProductionRequest,\n CreateFunctionProductionResponse,\n DelayAction,\n DeleteFunctionProductionRequest,\n DeleteFunctionProductionResponse,\n Dimensions,\n Domain,\n DomainEvent,\n DomainEventBodyOneOf,\n DraftInfo,\n Empty,\n Enrichment,\n Enrichments,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n Filter,\n FilterValueSelection,\n FilterableAppDefinedActions,\n FunctionMethod,\n FunctionProduction,\n FunctionProductionOptionsOneOf,\n FunctionProductionType,\n FunctionSpiConfiguration,\n FutureDateActivationOffset,\n Language,\n MergeAction,\n Note,\n Notes,\n Offset,\n Operator,\n Origin,\n OutputAction,\n Path,\n Position,\n PreinstalledOrigin,\n RateLimit,\n RateLimitAction,\n RestoreInfo,\n SetVariablesAction,\n SplitAction,\n Status,\n TemplateOptions,\n TemplateOrigin,\n TimeUnit,\n Trigger,\n TriggerSettings,\n Type,\n UpdateFunctionProduction,\n UpdateFunctionProductionRequest,\n UpdateFunctionProductionResponse,\n _Function,\n} from './functions-v1-production-function-productions.universal.js';\n","import {\n createFunctionProduction as publicCreateFunctionProduction,\n updateFunctionProduction as publicUpdateFunctionProduction,\n deleteFunctionProduction as publicDeleteFunctionProduction,\n} from './functions-v1-production-function-productions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createFunctionProduction: MaybeContext<\n BuildRESTFunction<typeof publicCreateFunctionProduction> &\n typeof publicCreateFunctionProduction\n> = /*#__PURE__*/ createRESTModule(publicCreateFunctionProduction);\nexport const updateFunctionProduction: MaybeContext<\n BuildRESTFunction<typeof publicUpdateFunctionProduction> &\n typeof publicUpdateFunctionProduction\n> = /*#__PURE__*/ createRESTModule(publicUpdateFunctionProduction);\nexport const deleteFunctionProduction: MaybeContext<\n BuildRESTFunction<typeof publicDeleteFunctionProduction> &\n typeof publicDeleteFunctionProduction\n> = /*#__PURE__*/ createRESTModule(publicDeleteFunctionProduction);\n\nexport {\n FunctionProductionType,\n ActivationStatus,\n Domain,\n TimeUnit,\n Operator,\n Language,\n Type,\n Status,\n Origin,\n} from './functions-v1-production-function-productions.universal.js';\nexport {\n FunctionProduction,\n FunctionProductionOptionsOneOf,\n BlankOptions,\n TemplateOptions,\n FunctionSpiConfiguration,\n _Function,\n FunctionMethod,\n Automation,\n AutomationOriginInfoOneOf,\n AIMetadata,\n ActionSettings,\n TriggerSettings,\n Enrichment,\n AuditInfo,\n AuditInfoIdOneOf,\n AutomationConfiguration,\n Filter,\n FutureDateActivationOffset,\n RateLimit,\n FilterValueSelection,\n ConditionExpressionGroup,\n CodeSnippet,\n Path,\n AppDefinedAction,\n ConditionAction,\n CodeConditionAction,\n DelayAction,\n RateLimitAction,\n SetVariablesAction,\n OutputAction,\n SplitAction,\n MergeAction,\n Trigger,\n Action,\n ActionInfoOneOf,\n FilterableAppDefinedActions,\n ApplicationOrigin,\n PreinstalledOrigin,\n TemplateOrigin,\n AutomationSettings,\n DraftInfo,\n Enrichments,\n ExtendedFields,\n AutoArchivePolicy,\n Notes,\n Note,\n Position,\n Offset,\n Dimensions,\n CreateFunctionProductionRequest,\n CreateFunctionProductionResponse,\n UpdateFunctionProductionRequest,\n UpdateFunctionProductionResponse,\n DeleteFunctionProductionRequest,\n DeleteFunctionProductionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n UpdateFunctionProduction,\n} from './functions-v1-production-function-productions.universal.js';\nexport {\n FunctionProductionTypeWithLiterals,\n ActivationStatusWithLiterals,\n DomainWithLiterals,\n TimeUnitWithLiterals,\n OperatorWithLiterals,\n LanguageWithLiterals,\n TypeWithLiterals,\n StatusWithLiterals,\n OriginWithLiterals,\n} from './functions-v1-production-function-productions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AA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;AAAA,EACf;AACJ;;;ACtJA,IAAAC,uBAAiC;AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,4BAGK,2DAAiBA,yBAA8B;","names":["createFunctionProduction","deleteFunctionProduction","updateFunctionProduction","import_timestamp","import_rest_modules","payload","FunctionProductionType","ActivationStatus","Domain","TimeUnit","Operator","Language","Type","Status","Origin","createFunctionProduction","sdkTransformError","updateFunctionProduction","deleteFunctionProduction","createFunctionProduction","updateFunctionProduction","deleteFunctionProduction","import_rest_modules","createFunctionProduction","updateFunctionProduction","deleteFunctionProduction"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/functions-v1-production-function-productions.universal.ts","../../src/functions-v1-production-function-productions.http.ts","../../src/functions-v1-production-function-productions.public.ts","../../src/functions-v1-production-function-productions.context.ts"],"sourcesContent":["export * from './src/functions-v1-production-function-productions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixFunctionsV1Production from './functions-v1-production-function-productions.http.js';\n\n/** A function production defines a function and its related entities. */\nexport interface FunctionProduction extends FunctionProductionOptionsOneOf {\n /** Options for creating a function from a function type. */\n blankOptions?: BlankOptions;\n /** Options for creating a function from a function template. */\n templateOptions?: TemplateOptions;\n /**\n * Function production ID. This is the same as the created function's ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * App ID of the business solution that created the function type the function production is based on.\n * @format GUID\n */\n appId?: string;\n /** Type that the function is created from. */\n type?: FunctionProductionTypeWithLiterals;\n /** Service plugin configuration for the function. */\n functionSpiConfiguration?: FunctionSpiConfiguration;\n /** Function created from the function production. */\n function?: _Function;\n /**\n * Function methods created from the function production.\n * @readonly\n * @maxSize 100\n */\n functionMethods?: FunctionMethod[];\n /**\n * Automations created from the function production.\n * @readonly\n * @maxSize 100\n */\n automations?: Automation[];\n /**\n * Date and time the function production was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the function production was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\n/** @oneof */\nexport interface FunctionProductionOptionsOneOf {\n /** Options for creating a function from a function type. */\n blankOptions?: BlankOptions;\n /** Options for creating a function from a function template. */\n templateOptions?: TemplateOptions;\n}\n\nexport enum FunctionProductionType {\n /** Function created from a function type. */\n BLANK = 'BLANK',\n /** Function created from a function template. */\n TEMPLATE = 'TEMPLATE',\n}\n\n/** @enumType */\nexport type FunctionProductionTypeWithLiterals =\n | FunctionProductionType\n | 'BLANK'\n | 'TEMPLATE';\n\nexport interface BlankOptions {\n /**\n * ID of the function type that the function was created from.\n * @format GUID\n */\n functionExtensionId?: string;\n}\n\nexport interface TemplateOptions {\n /**\n * ID of the function template that the function was created from.\n * @format GUID\n */\n functionTemplateExtensionId?: string;\n}\n\n/** SpiConfiguration is a spi configuration for a specific function. */\nexport interface FunctionSpiConfiguration {\n /**\n * SpiConfiguration ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * SpiConfiguration revision.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the SpiConfiguration was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the SpiConfiguration was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Function ID\n * @format GUID\n * @readonly\n */\n functionId?: string | null;\n /** Function SPI configuration dev center component payload. */\n configuration?: Record<string, any> | null;\n}\n\nexport interface _Function {\n /**\n * Function ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the function is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the function.\n *\n * Ignored when creating a function.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the function was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the function was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * The function's app extension ID.\n * @readonly\n * @format GUID\n */\n functionExtensionId?: string | null;\n /**\n * Function name.\n * @maxLength 100\n */\n functionName?: string | null;\n /**\n * Activation status\n * @readonly\n */\n activationStatus?: ActivationStatusWithLiterals;\n /**\n * ID of the app that defines the function.\n * @readonly\n * @format GUID\n */\n appId?: string | null;\n /**\n * The function's app extension name.\n * @readonly\n * @minLength 1\n * @maxLength 100\n */\n functionExtensionName?: string | null;\n /**\n * Function template extension id\n * @readonly\n * @format GUID\n */\n functionTemplateExtensionId?: string | null;\n}\n\nexport enum ActivationStatus {\n /** Function is activated. */\n ACTIVE = 'ACTIVE',\n /** Function is deactivated. */\n INACTIVE = 'INACTIVE',\n /** Function is saved but has never been activated. */\n DRAFT = 'DRAFT',\n}\n\n/** @enumType */\nexport type ActivationStatusWithLiterals =\n | ActivationStatus\n | 'ACTIVE'\n | 'INACTIVE'\n | 'DRAFT';\n\n/** A function method is a link between a function and an automation, which defines the logic that runs when a function is triggered. */\nexport interface FunctionMethod {\n /**\n * Function method ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Function method revision.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the function method was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the function method was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the automation to link to the function.\n * @format GUID\n */\n automationId?: string;\n /**\n * ID of the function that this method links to an automation.\n * @format GUID\n */\n functionId?: string;\n /**\n * Display name for the function method.\n * @maxLength 160\n */\n methodName?: string;\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?: OriginWithLiterals;\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\n/** @enumType */\nexport type DomainWithLiterals = Domain | 'USER' | 'WIX' | 'WIX_ACCOUNT';\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?: StatusWithLiterals;\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\n/** @enumType */\nexport type TimeUnitWithLiterals =\n | TimeUnit\n | 'MINUTES'\n | 'HOURS'\n | 'DAYS'\n | 'WEEKS'\n | 'MONTHS';\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?: TimeUnitWithLiterals;\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?: TimeUnitWithLiterals;\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?: OperatorWithLiterals;\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\n/** @enumType */\nexport type OperatorWithLiterals = Operator | 'OR' | 'AND';\n\nexport interface CodeSnippet {\n /** Logical operator used to evaluate the condition expressions. */\n language?: LanguageWithLiterals;\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/** @enumType */\nexport type LanguageWithLiterals = Language | 'JAVASCRIPT';\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\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'APP_DEFINED'\n | 'CONDITION'\n | 'CODE_CONDITION'\n | 'DELAY'\n | 'RATE_LIMIT';\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?: TimeUnitWithLiterals;\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?: TimeUnitWithLiterals;\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\n/** @enumType */\nexport type StatusWithLiterals = Status | 'ACTIVE' | 'INACTIVE';\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?: TypeWithLiterals;\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\n/** @enumType */\nexport type OriginWithLiterals =\n | Origin\n | 'USER'\n | 'APPLICATION'\n | 'PREINSTALLED';\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\n/** Creation of function production */\nexport interface CreateFunctionProductionRequest {\n /** Function production to create. */\n functionProduction: FunctionProduction;\n}\n\nexport interface CreateFunctionProductionResponse {\n /** The created function production. */\n functionProduction?: FunctionProduction;\n}\n\n/** Update of function production */\nexport interface UpdateFunctionProductionRequest {\n /** Function production to update. */\n functionProduction: FunctionProduction;\n}\n\nexport interface UpdateFunctionProductionResponse {\n /** Updated function production. */\n functionProduction?: FunctionProduction;\n}\n\nexport interface DeleteFunctionProductionRequest {\n /**\n * ID of the function production to delete.\n * @format GUID\n */\n functionProductionId: string;\n}\n\nexport interface DeleteFunctionProductionResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\n/**\n * Creates a function production.\n *\n * This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation#quick-creation-and-configuration).\n *\n * You can create a function production from a function type or a function template. If you create a function production from a function type, the automation created will not contain any logic. If you create a function production from a function template, the automation created will contain the template's automation logic.\n *\n * > **Note:** Some function types have a default template applied, in which case the automation created will contain the default template's automation logic.\n *\n * Once created, all parts of the function production can be updated using the [Update Function Production](https://dev.wix.com/docs/api-reference/business-management/functions/function-productions/update-function-production) method or other APIs. They work together so if you update the function, or anything related to it, the function production object will be updated to reflect the changes.\n * @param functionProduction - Function production to create.\n * @public\n * @requiredField functionProduction\n * @requiredField functionProduction.appId\n * @requiredField functionProduction.options\n * @requiredField functionProduction.type\n * @permissionId FUNCTIONS.FUNCTION_PRODUCTION_CREATE\n * @applicableIdentity APP\n * @returns The created function production.\n * @fqn wix.functions.v1.productions.FunctionProductions.CreateFunctionProduction\n */\nexport async function createFunctionProduction(\n functionProduction: NonNullablePaths<FunctionProduction, `appId` | `type`, 2>\n): Promise<\n NonNullablePaths<\n FunctionProduction,\n | `blankOptions.functionExtensionId`\n | `templateOptions.functionTemplateExtensionId`\n | `appId`\n | `type`\n | `function.activationStatus`\n | `functionMethods`\n | `functionMethods.${number}.automationId`\n | `functionMethods.${number}.functionId`\n | `functionMethods.${number}.methodName`\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.templateInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n functionProduction: functionProduction,\n });\n\n const reqOpts =\n ambassadorWixFunctionsV1Production.createFunctionProduction(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.functionProduction!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { functionProduction: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['functionProduction']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a function production.\n * @param _id - Function production ID. This is the same as the created function's ID.\n * @public\n * @requiredField _id\n * @requiredField functionProduction\n * @requiredField functionProduction.automations\n * @requiredField functionProduction.functionSpiConfiguration\n * @permissionId FUNCTIONS.FUNCTION_PRODUCTION_UPDATE\n * @applicableIdentity APP\n * @returns Updated function production.\n * @fqn wix.functions.v1.productions.FunctionProductions.UpdateFunctionProduction\n */\nexport async function updateFunctionProduction(\n _id: string,\n functionProduction: NonNullablePaths<\n UpdateFunctionProduction,\n `automations` | `functionSpiConfiguration`,\n 2\n >\n): Promise<\n NonNullablePaths<\n FunctionProduction,\n | `blankOptions.functionExtensionId`\n | `templateOptions.functionTemplateExtensionId`\n | `appId`\n | `type`\n | `function.activationStatus`\n | `functionMethods`\n | `functionMethods.${number}.automationId`\n | `functionMethods.${number}.functionId`\n | `functionMethods.${number}.methodName`\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.templateInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n functionProduction: { ...functionProduction, id: _id },\n });\n\n const reqOpts =\n ambassadorWixFunctionsV1Production.updateFunctionProduction(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.functionProduction!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { functionProduction: '$[1]' },\n explicitPathsToArguments: { 'functionProduction.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'functionProduction']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateFunctionProduction {\n /** Options for creating a function from a function type. */\n blankOptions?: BlankOptions;\n /** Options for creating a function from a function template. */\n templateOptions?: TemplateOptions;\n /**\n * Function production ID. This is the same as the created function's ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * App ID of the business solution that created the function type the function production is based on.\n * @format GUID\n */\n appId?: string;\n /** Type that the function is created from. */\n type?: FunctionProductionTypeWithLiterals;\n /** Service plugin configuration for the function. */\n functionSpiConfiguration?: FunctionSpiConfiguration;\n /** Function created from the function production. */\n function?: _Function;\n /**\n * Function methods created from the function production.\n * @readonly\n * @maxSize 100\n */\n functionMethods?: FunctionMethod[];\n /**\n * Automations created from the function production.\n * @readonly\n * @maxSize 100\n */\n automations?: Automation[];\n /**\n * Date and time the function production was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the function production was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\n/**\n * Deletes a function production and all its associated entities.\n * @param functionProductionId - ID of the function production to delete.\n * @public\n * @requiredField functionProductionId\n * @permissionId FUNCTIONS.FUNCTION_PRODUCTION_DELETE\n * @applicableIdentity APP\n * @fqn wix.functions.v1.productions.FunctionProductions.DeleteFunctionProduction\n */\nexport async function deleteFunctionProduction(\n functionProductionId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n functionProductionId: functionProductionId,\n });\n\n const reqOpts =\n ambassadorWixFunctionsV1Production.deleteFunctionProduction(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { functionProductionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['functionProductionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\nimport { _Function } from './functions-v1-production-function-productions.types';\n\nfunction resolveWixFunctionsV1ProductionsFunctionProductionsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/functions/v1/function-productions',\n destPath: '/v1/function-productions',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/functions/v1/productions',\n destPath: '/v1/function-productions',\n },\n {\n srcPath: '/functions/v1/function-productions',\n destPath: '/v1/function-productions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/functions/v1/function-productions',\n destPath: '/v1/function-productions',\n },\n ],\n _: [\n {\n srcPath: '/functions/v1/function-productions',\n destPath: '/v1/function-productions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_functions_function-productions';\n\n/**\n * Creates a function production.\n *\n * This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation#quick-creation-and-configuration).\n *\n * You can create a function production from a function type or a function template. If you create a function production from a function type, the automation created will not contain any logic. If you create a function production from a function template, the automation created will contain the template's automation logic.\n *\n * > **Note:** Some function types have a default template applied, in which case the automation created will contain the default template's automation logic.\n *\n * Once created, all parts of the function production can be updated using the [Update Function Production](https://dev.wix.com/docs/api-reference/business-management/functions/function-productions/update-function-production) method or other APIs. They work together so if you update the function, or anything related to it, the function production object will be updated to reflect the changes.\n */\nexport function createFunctionProduction(\n payload: object\n): RequestOptionsFactory<any> {\n function __createFunctionProduction({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'functionProduction.createdDate' },\n { path: 'functionProduction.updatedDate' },\n { path: 'functionProduction.functionSpiConfiguration.createdDate' },\n { path: 'functionProduction.functionSpiConfiguration.updatedDate' },\n { path: 'functionProduction.function.createdDate' },\n { path: 'functionProduction.function.updatedDate' },\n { path: 'functionProduction.functionMethods.createdDate' },\n { path: 'functionProduction.functionMethods.updatedDate' },\n { path: 'functionProduction.automations.createdDate' },\n { path: 'functionProduction.automations.updatedDate' },\n { path: 'functionProduction.automations.draftUpdatedDate' },\n {\n path: 'functionProduction.automations.autoArchivePolicy.archiveDate',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.functions.v1.production',\n method: 'POST' as any,\n methodFqn:\n 'wix.functions.v1.productions.FunctionProductions.CreateFunctionProduction',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixFunctionsV1ProductionsFunctionProductionsUrl({\n protoPath: '/v1/function-productions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'functionProduction.createdDate' },\n { path: 'functionProduction.updatedDate' },\n {\n path: 'functionProduction.functionSpiConfiguration.createdDate',\n },\n {\n path: 'functionProduction.functionSpiConfiguration.updatedDate',\n },\n { path: 'functionProduction.function.createdDate' },\n { path: 'functionProduction.function.updatedDate' },\n { path: 'functionProduction.functionMethods.createdDate' },\n { path: 'functionProduction.functionMethods.updatedDate' },\n { path: 'functionProduction.automations.createdDate' },\n { path: 'functionProduction.automations.updatedDate' },\n { path: 'functionProduction.automations.draftUpdatedDate' },\n {\n path: 'functionProduction.automations.autoArchivePolicy.archiveDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createFunctionProduction;\n}\n\n/** Updates a function production. */\nexport function updateFunctionProduction(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateFunctionProduction({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'functionProduction.createdDate' },\n { path: 'functionProduction.updatedDate' },\n { path: 'functionProduction.functionSpiConfiguration.createdDate' },\n { path: 'functionProduction.functionSpiConfiguration.updatedDate' },\n { path: 'functionProduction.function.createdDate' },\n { path: 'functionProduction.function.updatedDate' },\n { path: 'functionProduction.functionMethods.createdDate' },\n { path: 'functionProduction.functionMethods.updatedDate' },\n { path: 'functionProduction.automations.createdDate' },\n { path: 'functionProduction.automations.updatedDate' },\n { path: 'functionProduction.automations.draftUpdatedDate' },\n {\n path: 'functionProduction.automations.autoArchivePolicy.archiveDate',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.functions.v1.production',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.functions.v1.productions.FunctionProductions.UpdateFunctionProduction',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixFunctionsV1ProductionsFunctionProductionsUrl({\n protoPath: '/v1/function-productions/{functionProduction.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'functionProduction.createdDate' },\n { path: 'functionProduction.updatedDate' },\n {\n path: 'functionProduction.functionSpiConfiguration.createdDate',\n },\n {\n path: 'functionProduction.functionSpiConfiguration.updatedDate',\n },\n { path: 'functionProduction.function.createdDate' },\n { path: 'functionProduction.function.updatedDate' },\n { path: 'functionProduction.functionMethods.createdDate' },\n { path: 'functionProduction.functionMethods.updatedDate' },\n { path: 'functionProduction.automations.createdDate' },\n { path: 'functionProduction.automations.updatedDate' },\n { path: 'functionProduction.automations.draftUpdatedDate' },\n {\n path: 'functionProduction.automations.autoArchivePolicy.archiveDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateFunctionProduction;\n}\n\n/** Deletes a function production and all its associated entities. */\nexport function deleteFunctionProduction(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteFunctionProduction({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.functions.v1.production',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.functions.v1.productions.FunctionProductions.DeleteFunctionProduction',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixFunctionsV1ProductionsFunctionProductionsUrl({\n protoPath: '/v1/function-productions/{functionProductionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteFunctionProduction;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n FunctionProduction,\n UpdateFunctionProduction,\n createFunctionProduction as universalCreateFunctionProduction,\n deleteFunctionProduction as universalDeleteFunctionProduction,\n updateFunctionProduction as universalUpdateFunctionProduction,\n} from './functions-v1-production-function-productions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/functions' };\n\nexport function createFunctionProduction(\n httpClient: HttpClient\n): CreateFunctionProductionSignature {\n return (\n functionProduction: NonNullablePaths<\n FunctionProduction,\n `appId` | `type`,\n 2\n >\n ) =>\n universalCreateFunctionProduction(\n functionProduction,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateFunctionProductionSignature {\n /**\n * Creates a function production.\n *\n * This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation#quick-creation-and-configuration).\n *\n * You can create a function production from a function type or a function template. If you create a function production from a function type, the automation created will not contain any logic. If you create a function production from a function template, the automation created will contain the template's automation logic.\n *\n * > **Note:** Some function types have a default template applied, in which case the automation created will contain the default template's automation logic.\n *\n * Once created, all parts of the function production can be updated using the [Update Function Production](https://dev.wix.com/docs/api-reference/business-management/functions/function-productions/update-function-production) method or other APIs. They work together so if you update the function, or anything related to it, the function production object will be updated to reflect the changes.\n * @param - Function production to create.\n * @returns The created function production.\n */\n (\n functionProduction: NonNullablePaths<\n FunctionProduction,\n `appId` | `type`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n FunctionProduction,\n | `blankOptions.functionExtensionId`\n | `templateOptions.functionTemplateExtensionId`\n | `appId`\n | `type`\n | `function.activationStatus`\n | `functionMethods`\n | `functionMethods.${number}.automationId`\n | `functionMethods.${number}.functionId`\n | `functionMethods.${number}.methodName`\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.templateInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n >;\n}\n\nexport function updateFunctionProduction(\n httpClient: HttpClient\n): UpdateFunctionProductionSignature {\n return (\n _id: string,\n functionProduction: NonNullablePaths<\n UpdateFunctionProduction,\n `automations` | `functionSpiConfiguration`,\n 2\n >\n ) =>\n universalUpdateFunctionProduction(\n _id,\n functionProduction,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateFunctionProductionSignature {\n /**\n * Updates a function production.\n * @param - Function production ID. This is the same as the created function's ID.\n * @returns Updated function production.\n */\n (\n _id: string,\n functionProduction: NonNullablePaths<\n UpdateFunctionProduction,\n `automations` | `functionSpiConfiguration`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n FunctionProduction,\n | `blankOptions.functionExtensionId`\n | `templateOptions.functionTemplateExtensionId`\n | `appId`\n | `type`\n | `function.activationStatus`\n | `functionMethods`\n | `functionMethods.${number}.automationId`\n | `functionMethods.${number}.functionId`\n | `functionMethods.${number}.methodName`\n | `automations`\n | `automations.${number}.applicationInfo.appId`\n | `automations.${number}.preinstalledInfo.appId`\n | `automations.${number}.templateInfo.appId`\n | `automations.${number}.createdBy.userId`\n | `automations.${number}.createdBy.appId`\n | `automations.${number}.name`\n | `automations.${number}.configuration.status`\n | `automations.${number}.configuration.trigger.appId`\n | `automations.${number}.configuration.trigger.triggerKey`\n | `automations.${number}.origin`\n | `automations.${number}.settings.hidden`\n | `automations.${number}.settings.readonly`\n | `automations.${number}.settings.disableDelete`\n | `automations.${number}.settings.disableStatusChange`\n | `automations.${number}.archived`,\n 6\n >\n >;\n}\n\nexport function deleteFunctionProduction(\n httpClient: HttpClient\n): DeleteFunctionProductionSignature {\n return (functionProductionId: string) =>\n universalDeleteFunctionProduction(\n functionProductionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteFunctionProductionSignature {\n /**\n * Deletes a function production and all its associated entities.\n * @param - ID of the function production to delete.\n */\n (functionProductionId: string): Promise<void>;\n}\n\nexport {\n AIMetadata,\n Action,\n ActionEvent,\n ActionInfoOneOf,\n ActionSettings,\n ActivationStatus,\n AppDefinedAction,\n ApplicationOrigin,\n AuditInfo,\n AuditInfoIdOneOf,\n AutoArchivePolicy,\n Automation,\n AutomationConfiguration,\n AutomationOriginInfoOneOf,\n AutomationSettings,\n BlankOptions,\n CodeConditionAction,\n CodeSnippet,\n ConditionAction,\n ConditionExpressionGroup,\n CreateFunctionProductionRequest,\n CreateFunctionProductionResponse,\n DelayAction,\n DeleteFunctionProductionRequest,\n DeleteFunctionProductionResponse,\n Dimensions,\n Domain,\n DomainEvent,\n DomainEventBodyOneOf,\n DraftInfo,\n Empty,\n Enrichment,\n Enrichments,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n Filter,\n FilterValueSelection,\n FilterableAppDefinedActions,\n FunctionMethod,\n FunctionProduction,\n FunctionProductionOptionsOneOf,\n FunctionProductionType,\n FunctionSpiConfiguration,\n FutureDateActivationOffset,\n Language,\n MergeAction,\n Note,\n Notes,\n Offset,\n Operator,\n Origin,\n OutputAction,\n Path,\n Position,\n PreinstalledOrigin,\n RateLimit,\n RateLimitAction,\n RestoreInfo,\n SetVariablesAction,\n SplitAction,\n Status,\n TemplateOptions,\n TemplateOrigin,\n TimeUnit,\n Trigger,\n TriggerSettings,\n Type,\n UpdateFunctionProduction,\n UpdateFunctionProductionRequest,\n UpdateFunctionProductionResponse,\n _Function,\n} from './functions-v1-production-function-productions.universal.js';\n","import {\n createFunctionProduction as publicCreateFunctionProduction,\n updateFunctionProduction as publicUpdateFunctionProduction,\n deleteFunctionProduction as publicDeleteFunctionProduction,\n} from './functions-v1-production-function-productions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createFunctionProduction: MaybeContext<\n BuildRESTFunction<typeof publicCreateFunctionProduction> &\n typeof publicCreateFunctionProduction\n> = /*#__PURE__*/ createRESTModule(publicCreateFunctionProduction);\nexport const updateFunctionProduction: MaybeContext<\n BuildRESTFunction<typeof publicUpdateFunctionProduction> &\n typeof publicUpdateFunctionProduction\n> = /*#__PURE__*/ createRESTModule(publicUpdateFunctionProduction);\nexport const deleteFunctionProduction: MaybeContext<\n BuildRESTFunction<typeof publicDeleteFunctionProduction> &\n typeof publicDeleteFunctionProduction\n> = /*#__PURE__*/ createRESTModule(publicDeleteFunctionProduction);\n\nexport {\n FunctionProductionType,\n ActivationStatus,\n Domain,\n TimeUnit,\n Operator,\n Language,\n Type,\n Status,\n Origin,\n} from './functions-v1-production-function-productions.universal.js';\nexport {\n FunctionProduction,\n FunctionProductionOptionsOneOf,\n BlankOptions,\n TemplateOptions,\n FunctionSpiConfiguration,\n _Function,\n FunctionMethod,\n Automation,\n AutomationOriginInfoOneOf,\n AIMetadata,\n ActionSettings,\n TriggerSettings,\n Enrichment,\n AuditInfo,\n AuditInfoIdOneOf,\n AutomationConfiguration,\n Filter,\n FutureDateActivationOffset,\n RateLimit,\n FilterValueSelection,\n ConditionExpressionGroup,\n CodeSnippet,\n Path,\n AppDefinedAction,\n ConditionAction,\n CodeConditionAction,\n DelayAction,\n RateLimitAction,\n SetVariablesAction,\n OutputAction,\n SplitAction,\n MergeAction,\n Trigger,\n Action,\n ActionInfoOneOf,\n FilterableAppDefinedActions,\n ApplicationOrigin,\n PreinstalledOrigin,\n TemplateOrigin,\n AutomationSettings,\n DraftInfo,\n Enrichments,\n ExtendedFields,\n AutoArchivePolicy,\n Notes,\n Note,\n Position,\n Offset,\n Dimensions,\n CreateFunctionProductionRequest,\n CreateFunctionProductionResponse,\n UpdateFunctionProductionRequest,\n UpdateFunctionProductionResponse,\n DeleteFunctionProductionRequest,\n DeleteFunctionProductionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n UpdateFunctionProduction,\n} from './functions-v1-production-function-productions.universal.js';\nexport {\n FunctionProductionTypeWithLiterals,\n ActivationStatusWithLiterals,\n DomainWithLiterals,\n TimeUnitWithLiterals,\n OperatorWithLiterals,\n LanguageWithLiterals,\n TypeWithLiterals,\n StatusWithLiterals,\n OriginWithLiterals,\n} from './functions-v1-production-function-productions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,gCAAAC;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAK3B,SAAS,uDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAad,SAAS,yBACd,SAC4B;AAC5B,WAAS,2BAA2B,EAAE,KAAK,GAAQ;AACjD,UAAM,qBAAiB,uCAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AA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AA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuDO,SAASC,0BACd,YACmC;AACnC,SAAO,CACL,KACA,uBAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAgDO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,yBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtJA,IAAAC,uBAAiC;AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,4BAGK,2DAAiBA,yBAA8B;","names":["createFunctionProduction","deleteFunctionProduction","updateFunctionProduction","import_timestamp","import_rest_modules","payload","FunctionProductionType","ActivationStatus","Domain","TimeUnit","Operator","Language","Type","Status","Origin","createFunctionProduction","sdkTransformError","updateFunctionProduction","deleteFunctionProduction","createFunctionProduction","updateFunctionProduction","deleteFunctionProduction","import_rest_modules","createFunctionProduction","updateFunctionProduction","deleteFunctionProduction"]}
@@ -1029,7 +1029,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
1029
1029
  /** If present, indicates the action that triggered the event. */
1030
1030
  originatedFrom?: string | null;
1031
1031
  /**
1032
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
1032
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
1033
1033
  * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
1034
1034
  */
1035
1035
  entityEventSequence?: string | null;