@wix/auto_sdk_functions_function-productions 1.0.17 → 1.0.18

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":["../../../src/functions-v1-production-function-productions.universal.ts","../../../src/functions-v1-production-function-productions.http.ts"],"sourcesContent":["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 /** Unknown function production type. */\n UNKNOWN_FUNCTION_PRODUCTION = 'UNKNOWN_FUNCTION_PRODUCTION',\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 | 'UNKNOWN_FUNCTION_PRODUCTION'\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 /** Activation status is unknown. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\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 | 'UNKNOWN_STATUS'\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 /**\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}\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 UNKNOWN_TIME_UNIT = 'UNKNOWN_TIME_UNIT',\n /** Minutes. */\n MINUTES = 'MINUTES',\n /** Hours. */\n HOURS = 'HOURS',\n /** Days. */\n DAYS = 'DAYS',\n /** Weeks. */\n WEEKS = 'WEEKS',\n /** Months. */\n MONTHS = 'MONTHS',\n}\n\n/** @enumType */\nexport type TimeUnitWithLiterals =\n | TimeUnit\n | 'UNKNOWN_TIME_UNIT'\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.\n *\n * For the automation to run, the expression must evaluate to `true`.\n * @maxLength 2500\n */\n filterExpression?: string;\n}\n\nexport interface FutureDateActivationOffset {\n /**\n * Amount of time before the trigger to run the automation.\n *\n * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).\n * @maxLength 1000\n */\n preScheduledEventOffsetExpression?: string;\n /** Unit in which to set the action offset. */\n scheduledEventOffsetTimeUnit?: 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 2500\n */\n booleanExpressions?: string[];\n}\n\nexport enum Operator {\n /** Unknown. */\n UNKNOWN_OPERATOR = 'UNKNOWN_OPERATOR',\n /** `OR` operator. */\n OR = 'OR',\n /** `AND` operator. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type OperatorWithLiterals = Operator | 'UNKNOWN_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 /** Unknown. */\n UNKNOWN_LANGUAGE = 'UNKNOWN_LANGUAGE',\n /** JavaScript. */\n JAVASCRIPT = 'JAVASCRIPT',\n}\n\n/** @enumType */\nexport type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';\n\n/** Path definition */\nexport interface Path {\n /**\n * Unique path ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Path display name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * ID of the action to run when this path is taken.\n * @format GUID\n */\n postActionId?: string | null;\n}\n\nexport enum Type {\n /** Based on the trigger. */\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */\n APP_DEFINED = 'APP_DEFINED',\n /**\n * Condition action. Evaluates a condition to determine which action runs next.\n *\n * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.\n *\n * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `conditionInfo.truePostActionIds` run and those in `conditionInfo.falsePostActionIds` are skipped.\n */\n CONDITION = 'CONDITION',\n /**\n * Code condition action. Evaluates custom code to determine which action runs next.\n *\n * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.\n *\n * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `codeConditionInfo.truePostActionIds` run and those in `codeConditionInfo.falsePostActionIds` are skipped.\n */\n CODE_CONDITION = 'CODE_CONDITION',\n /** Delay. The automation must wait before executing the next step. */\n DELAY = 'DELAY',\n /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */\n RATE_LIMIT = 'RATE_LIMIT',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_ACTION_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\nexport interface CodeConditionAction {\n /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */\n snippet?: CodeSnippet;\n /**\n * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.\n * this list is mainly for validation purpose.\n * @maxSize 50\n * @maxLength 100\n */\n dynamicVariableExpressions?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface DelayAction {\n /**\n * Time to wait before running the action. The wait time starts from when the current action completes.\n *\n * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.\n * @maxLength 1000\n */\n offsetExpression?: string | null;\n /** Unit in which to set the wait time to wait before the action runs. */\n offsetTimeUnit?: 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 enum Status {\n /** Unknown. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Active. Active automations can be triggered. */\n ACTIVE = 'ACTIVE',\n /** Inactive. Inactive automations cannot be triggered. */\n INACTIVE = 'INACTIVE',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'ACTIVE'\n | '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 /** Default value. */\n UNKNOWN_ORIGIN = 'UNKNOWN_ORIGIN',\n /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */\n USER = 'USER',\n /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */\n APPLICATION = 'APPLICATION',\n /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */\n PREINSTALLED = 'PREINSTALLED',\n}\n\n/** @enumType */\nexport type OriginWithLiterals =\n | Origin\n | 'UNKNOWN_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 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}.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}.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"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;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;AA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,MAC3B;AAAA,MACA,CAAC,OAAO,oBAAoB;AAAA,IAC9B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAyDA,eAAsBC,0BACpB,sBACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+B,yBAAyB,OAAO;AAErE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,sBAAsB,OAAO;AAAA,QACzD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,sBAAsB;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","FunctionProductionType","ActivationStatus","Domain","TimeUnit","Operator","Language","Type","Status","Origin","createFunctionProduction","updateFunctionProduction","deleteFunctionProduction"]}
1
+ {"version":3,"sources":["../../../src/functions-v1-production-function-productions.universal.ts","../../../src/functions-v1-production-function-productions.http.ts"],"sourcesContent":["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 /**\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}\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.\n *\n * For the automation to run, the expression must evaluate to `true`.\n * @maxLength 2500\n */\n filterExpression?: string;\n}\n\nexport interface FutureDateActivationOffset {\n /**\n * Amount of time before the trigger to run the automation.\n *\n * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).\n * @maxLength 1000\n */\n preScheduledEventOffsetExpression?: string;\n /** Unit in which to set the action offset. */\n scheduledEventOffsetTimeUnit?: 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 2500\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 display name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * ID of the action to run when this path is taken.\n * @format GUID\n */\n postActionId?: string | null;\n}\n\nexport enum Type {\n /** 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\nexport interface CodeConditionAction {\n /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */\n snippet?: CodeSnippet;\n /**\n * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.\n * this list is mainly for validation purpose.\n * @maxSize 50\n * @maxLength 100\n */\n dynamicVariableExpressions?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `true`.\n * @maxSize 1\n * @format GUID\n */\n truePostActionIds?: string[];\n /**\n * IDs of actions to run when the condition evaluates to `false`.\n * @maxSize 1\n * @format GUID\n */\n falsePostActionIds?: string[];\n}\n\nexport interface DelayAction {\n /**\n * Time to wait before running the action. The wait time starts from when the current action completes.\n *\n * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.\n * @maxLength 1000\n */\n offsetExpression?: string | null;\n /** Unit in which to set the wait time to wait before the action runs. */\n offsetTimeUnit?: 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 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 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}.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}.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"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;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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a;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,sBAAsB,OAAO;AAAA,QACzD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,sBAAsB;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","FunctionProductionType","ActivationStatus","Domain","TimeUnit","Operator","Language","Type","Status","Origin","createFunctionProduction","updateFunctionProduction","deleteFunctionProduction"]}
@@ -55,15 +55,13 @@ interface FunctionProductionOptionsOneOf {
55
55
  templateOptions?: TemplateOptions;
56
56
  }
57
57
  declare enum FunctionProductionType {
58
- /** Unknown function production type. */
59
- UNKNOWN_FUNCTION_PRODUCTION = "UNKNOWN_FUNCTION_PRODUCTION",
60
58
  /** Function created from a function type. */
61
59
  BLANK = "BLANK",
62
60
  /** Function created from a function template. */
63
61
  TEMPLATE = "TEMPLATE"
64
62
  }
65
63
  /** @enumType */
66
- type FunctionProductionTypeWithLiterals = FunctionProductionType | 'UNKNOWN_FUNCTION_PRODUCTION' | 'BLANK' | 'TEMPLATE';
64
+ type FunctionProductionTypeWithLiterals = FunctionProductionType | 'BLANK' | 'TEMPLATE';
67
65
  interface BlankOptions {
68
66
  /**
69
67
  * ID of the function type that the function was created from.
@@ -173,8 +171,6 @@ interface _Function {
173
171
  functionTemplateExtensionId?: string | null;
174
172
  }
175
173
  declare enum ActivationStatus {
176
- /** Activation status is unknown. */
177
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
178
174
  /** Function is activated. */
179
175
  ACTIVE = "ACTIVE",
180
176
  /** Function is deactivated. */
@@ -183,7 +179,7 @@ declare enum ActivationStatus {
183
179
  DRAFT = "DRAFT"
184
180
  }
185
181
  /** @enumType */
186
- type ActivationStatusWithLiterals = ActivationStatus | 'UNKNOWN_STATUS' | 'ACTIVE' | 'INACTIVE' | 'DRAFT';
182
+ type ActivationStatusWithLiterals = ActivationStatus | 'ACTIVE' | 'INACTIVE' | 'DRAFT';
187
183
  /** A function method is a link between a function and an automation, which defines the logic that runs when a function is triggered. */
188
184
  interface FunctionMethod {
189
185
  /**
@@ -394,7 +390,6 @@ interface AutomationConfiguration {
394
390
  actions?: Record<string, Action>;
395
391
  }
396
392
  declare enum TimeUnit {
397
- UNKNOWN_TIME_UNIT = "UNKNOWN_TIME_UNIT",
398
393
  /** Minutes. */
399
394
  MINUTES = "MINUTES",
400
395
  /** Hours. */
@@ -407,7 +402,7 @@ declare enum TimeUnit {
407
402
  MONTHS = "MONTHS"
408
403
  }
409
404
  /** @enumType */
410
- type TimeUnitWithLiterals = TimeUnit | 'UNKNOWN_TIME_UNIT' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS';
405
+ type TimeUnitWithLiterals = TimeUnit | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS';
411
406
  interface Filter {
412
407
  /**
413
408
  * Filter ID.
@@ -483,15 +478,13 @@ interface ConditionExpressionGroup {
483
478
  booleanExpressions?: string[];
484
479
  }
485
480
  declare enum Operator {
486
- /** Unknown. */
487
- UNKNOWN_OPERATOR = "UNKNOWN_OPERATOR",
488
481
  /** `OR` operator. */
489
482
  OR = "OR",
490
483
  /** `AND` operator. */
491
484
  AND = "AND"
492
485
  }
493
486
  /** @enumType */
494
- type OperatorWithLiterals = Operator | 'UNKNOWN_OPERATOR' | 'OR' | 'AND';
487
+ type OperatorWithLiterals = Operator | 'OR' | 'AND';
495
488
  interface CodeSnippet {
496
489
  /** Logical operator used to evaluate the condition expressions. */
497
490
  language?: LanguageWithLiterals;
@@ -502,13 +495,11 @@ interface CodeSnippet {
502
495
  code?: string;
503
496
  }
504
497
  declare enum Language {
505
- /** Unknown. */
506
- UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
507
498
  /** JavaScript. */
508
499
  JAVASCRIPT = "JAVASCRIPT"
509
500
  }
510
501
  /** @enumType */
511
- type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';
502
+ type LanguageWithLiterals = Language | 'JAVASCRIPT';
512
503
  /** Path definition */
513
504
  interface Path {
514
505
  /**
@@ -529,8 +520,6 @@ interface Path {
529
520
  postActionId?: string | null;
530
521
  }
531
522
  declare enum Type {
532
- /** Based on the trigger. */
533
- UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
534
523
  /** 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. */
535
524
  APP_DEFINED = "APP_DEFINED",
536
525
  /**
@@ -555,7 +544,7 @@ declare enum Type {
555
544
  RATE_LIMIT = "RATE_LIMIT"
556
545
  }
557
546
  /** @enumType */
558
- type TypeWithLiterals = Type | 'UNKNOWN_ACTION_TYPE' | 'APP_DEFINED' | 'CONDITION' | 'CODE_CONDITION' | 'DELAY' | 'RATE_LIMIT';
547
+ type TypeWithLiterals = Type | 'APP_DEFINED' | 'CONDITION' | 'CODE_CONDITION' | 'DELAY' | 'RATE_LIMIT';
559
548
  interface AppDefinedAction {
560
549
  /**
561
550
  * ID of the app that defines the action.
@@ -731,15 +720,13 @@ interface SplitAction {
731
720
  paths?: Path[];
732
721
  }
733
722
  declare enum Status {
734
- /** Unknown. */
735
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
736
723
  /** Active. Active automations can be triggered. */
737
724
  ACTIVE = "ACTIVE",
738
725
  /** Inactive. Inactive automations cannot be triggered. */
739
726
  INACTIVE = "INACTIVE"
740
727
  }
741
728
  /** @enumType */
742
- type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'ACTIVE' | 'INACTIVE';
729
+ type StatusWithLiterals = Status | 'ACTIVE' | 'INACTIVE';
743
730
  interface Trigger {
744
731
  /**
745
732
  * ID of the app that defines the trigger.
@@ -840,8 +827,6 @@ interface FilterableAppDefinedActions {
840
827
  actionIdentifiers?: string[];
841
828
  }
842
829
  declare enum Origin {
843
- /** Default value. */
844
- UNKNOWN_ORIGIN = "UNKNOWN_ORIGIN",
845
830
  /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
846
831
  USER = "USER",
847
832
  /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */
@@ -850,7 +835,7 @@ declare enum Origin {
850
835
  PREINSTALLED = "PREINSTALLED"
851
836
  }
852
837
  /** @enumType */
853
- type OriginWithLiterals = Origin | 'UNKNOWN_ORIGIN' | 'USER' | 'APPLICATION' | 'PREINSTALLED';
838
+ type OriginWithLiterals = Origin | 'USER' | 'APPLICATION' | 'PREINSTALLED';
854
839
  interface ApplicationOrigin {
855
840
  /**
856
841
  * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
@@ -201,13 +201,11 @@ function deleteFunctionProduction(payload) {
201
201
 
202
202
  // src/functions-v1-production-function-productions.types.ts
203
203
  var FunctionProductionType = /* @__PURE__ */ ((FunctionProductionType2) => {
204
- FunctionProductionType2["UNKNOWN_FUNCTION_PRODUCTION"] = "UNKNOWN_FUNCTION_PRODUCTION";
205
204
  FunctionProductionType2["BLANK"] = "BLANK";
206
205
  FunctionProductionType2["TEMPLATE"] = "TEMPLATE";
207
206
  return FunctionProductionType2;
208
207
  })(FunctionProductionType || {});
209
208
  var ActivationStatus = /* @__PURE__ */ ((ActivationStatus2) => {
210
- ActivationStatus2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
211
209
  ActivationStatus2["ACTIVE"] = "ACTIVE";
212
210
  ActivationStatus2["INACTIVE"] = "INACTIVE";
213
211
  ActivationStatus2["DRAFT"] = "DRAFT";
@@ -220,7 +218,6 @@ var Domain = /* @__PURE__ */ ((Domain2) => {
220
218
  return Domain2;
221
219
  })(Domain || {});
222
220
  var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
223
- TimeUnit2["UNKNOWN_TIME_UNIT"] = "UNKNOWN_TIME_UNIT";
224
221
  TimeUnit2["MINUTES"] = "MINUTES";
225
222
  TimeUnit2["HOURS"] = "HOURS";
226
223
  TimeUnit2["DAYS"] = "DAYS";
@@ -229,18 +226,15 @@ var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
229
226
  return TimeUnit2;
230
227
  })(TimeUnit || {});
231
228
  var Operator = /* @__PURE__ */ ((Operator2) => {
232
- Operator2["UNKNOWN_OPERATOR"] = "UNKNOWN_OPERATOR";
233
229
  Operator2["OR"] = "OR";
234
230
  Operator2["AND"] = "AND";
235
231
  return Operator2;
236
232
  })(Operator || {});
237
233
  var Language = /* @__PURE__ */ ((Language2) => {
238
- Language2["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
239
234
  Language2["JAVASCRIPT"] = "JAVASCRIPT";
240
235
  return Language2;
241
236
  })(Language || {});
242
237
  var Type = /* @__PURE__ */ ((Type2) => {
243
- Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
244
238
  Type2["APP_DEFINED"] = "APP_DEFINED";
245
239
  Type2["CONDITION"] = "CONDITION";
246
240
  Type2["CODE_CONDITION"] = "CODE_CONDITION";
@@ -249,13 +243,11 @@ var Type = /* @__PURE__ */ ((Type2) => {
249
243
  return Type2;
250
244
  })(Type || {});
251
245
  var Status = /* @__PURE__ */ ((Status2) => {
252
- Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
253
246
  Status2["ACTIVE"] = "ACTIVE";
254
247
  Status2["INACTIVE"] = "INACTIVE";
255
248
  return Status2;
256
249
  })(Status || {});
257
250
  var Origin = /* @__PURE__ */ ((Origin2) => {
258
- Origin2["UNKNOWN_ORIGIN"] = "UNKNOWN_ORIGIN";
259
251
  Origin2["USER"] = "USER";
260
252
  Origin2["APPLICATION"] = "APPLICATION";
261
253
  Origin2["PREINSTALLED"] = "PREINSTALLED";