{"version":3,"sources":["jsdelivr-header.js","/npm/@wix/auto_sdk_functions_function-builderless-productions@1.0.13/index.ts","/npm/@wix/auto_sdk_functions_function-builderless-productions@1.0.13/src/functions-v1-builderless-production-function-builderless-productions.universal.ts","/npm/@wix/auto_sdk_functions_function-builderless-productions@1.0.13/src/functions-v1-builderless-production-function-builderless-productions.http.ts","/npm/@wix/auto_sdk_functions_function-builderless-productions@1.0.13/src/functions-v1-builderless-production-function-builderless-productions.public.ts","/npm/@wix/auto_sdk_functions_function-builderless-productions@1.0.13/src/functions-v1-builderless-production-function-builderless-productions.context.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,8iBCNA,cAAA,GAAA,SAAA,cAAA,CAAA,iBAAA,IAAA,iBAAA,oCAAA,IAAA,qCAAA,iCAAA,IAAA,kCAAA,oCAAA,IAAA,uCAAA,OAAA,QAAA,aAAA,eCAA,IAAA,uBAAoD,QAAA,oCACpD,8BAGO,QAAA,2CCJP,oBAAkC,QAAA,iCAClC,iBAAqD,QAAA,8CACrD,kBAAqD,QAAA,8CACrD,kBAAqD,QAAA,+CACrD,uBAA+B,QAAA,oDAC/B,qBAA2B,QAAA,iCAK3B,SAAS,6EACP,GA6BA,SAAO,qBAAA,YAAW,OAAO,OAAO,EAAM,CAAE,iBA3Bf,CACvB,uBAAwB,CACtB,CACE,QAAS,sDACT,SAAU,yCAGd,kBAAmB,CACjB,CACE,QAAS,iDACT,SAAU,yCAGd,qBAAsB,CACpB,CACE,QAAS,iDACT,SAAU,yCAGd,EAAG,CACD,CACE,QAAS,iDACT,SAAU,4CAMlB,CAEA,IAAM,aAAe,2DAYd,SAAS,oCACd,GAwDA,OAtDA,UAA+C,KAAE,IAC/C,MAAM,GAAA,EAAiB,uBAAA,gBAAe,EAAS,CAC7C,CACE,YAAa,iBAAA,qCACb,MAAO,CACL,CAAE,KAAM,sDACR,CAAE,KAAM,sDACR,CACE,KAAM,sEAER,CACE,KAAM,0EAwCd,MAnCiB,CAC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ACvB,EACA,CACE,uBAAwB,CAAE,8BAA+B,QACzD,yBAA0B,CACxB,mCAAoC,QAEtC,yBAAyB,GAE3B,CAAC,MAAO,kCAIV,MAFA,GAAa,UAAU,GAEjB,CACR,CACF,CE7XO,SAAS,qCACd,GAEA,OACE,GAQA,qCACE,EAEA,CAAE,cAER,CAgCO,SAAS,kCACd,GAEA,OAAQ,GACN,kCACE,EAEA,CAAE,cAER,CAiBO,SAAS,qCACd,GAEA,MAAO,CACL,EACA,IAMA,qCACE,EACA,EAEA,CAAE,cAER,CClGA,IAAA,qBAAiC,QAAA,iCAGpB,sCAGK,EAAA,qBAAA,kBAAiB,sCACtB,mCAGK,EAAA,qBAAA,kBAAiB,mCACtB,sCAGK,EAAA,qBAAA,kBAAiB","file":"/npm/@wix/auto_sdk_functions_function-builderless-productions@1.0.13/build/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@wix/auto_sdk_functions_function-builderless-productions@1.0.13/build/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export * from './src/functions-v1-builderless-production-function-builderless-productions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixFunctionsV1BuilderlessProduction from './functions-v1-builderless-production-function-builderless-productions.http.js';\n\n/** A function builderless production defines a function and its related entities. */\nexport interface FunctionBuilderlessProduction {\n  /**\n   * Function builderless production ID. This is the same as the associated 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 builderless production is based on.\n   * @format GUID\n   */\n  appId?: string;\n  /**\n   * Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms) method, specifying the following parameters:\n   * - `namespace`: `wix.function_template.form`\n   * - `formIds`: An array that contains the function template's `formTemplateExtensionId`\n   * - `kind`: `EXTENSION`\n   */\n  formValues?: Record<string, any>;\n  /** Function created from the function builderless production. */\n  function?: _Function;\n  /** Service plugin configuration for the function. */\n  functionSpiConfiguration?: FunctionSpiConfiguration;\n  /**\n   * Automations created from the function builderless production.\n   * @format GUID\n   * @readonly\n   * @maxSize 100\n   */\n  automationIds?: string[];\n}\n\nexport interface _Function {\n  /**\n   * Function ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Date and time the function was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * The function's app extension ID.\n   * @format GUID\n   * @readonly\n   */\n  functionExtensionId?: string | null;\n  /**\n   * Function name.\n   * @maxLength 100\n   * @readonly\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   * @format GUID\n   * @readonly\n   */\n  appId?: string | null;\n  /**\n   * The function's app extension name.\n   * @minLength 1\n   * @maxLength 100\n   * @readonly\n   */\n  functionExtensionName?: string | null;\n  /**\n   * Function template extension id\n   * @format GUID\n   */\n  functionTemplateExtensionId?: string | null;\n  /**\n   * Form template extension id\n   * @format GUID\n   */\n  formTemplateExtensionId?: string | null;\n  /**\n   * Date and time the function was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Revision number that increases with every update.\n   * @readonly\n   */\n  revision?: 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/** 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 CreateFunctionBuilderlessProductionRequest {\n  /** Function builderless production to create. */\n  functionBuilderlessProduction: FunctionBuilderlessProduction;\n}\n\nexport interface CreateFunctionBuilderlessProductionResponse {\n  /** The created function builderless production. */\n  functionBuilderlessProduction?: FunctionBuilderlessProduction;\n}\n\nexport interface GetFunctionBuilderlessProductionRequest {\n  /**\n   * ID of the function to retrieve the builderless production for.\n   * @format GUID\n   */\n  functionId: string;\n}\n\nexport interface GetFunctionBuilderlessProductionResponse {\n  /** The requested function builderless production. */\n  functionBuilderlessProduction?: FunctionBuilderlessProduction;\n}\n\nexport interface UpdateFunctionBuilderlessProductionRequest {\n  /** Function builderless production to update. */\n  functionBuilderlessProduction: FunctionBuilderlessProduction;\n}\n\nexport interface UpdateFunctionBuilderlessProductionResponse {\n  /** Updated function builderless production. */\n  functionBuilderlessProduction?: FunctionBuilderlessProduction;\n}\n\n/**\n * Creates a builderless 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. Once created, the function is ready to be activated. 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 only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms) method, specifying the following parameters:\n * - `namespace`: `wix.function_template.form`\n * - `formIds`: An array that contains the function template's `formTemplateExtensionId`\n * - `kind`: `EXTENSION`\n * @param functionBuilderlessProduction - Function builderless production to create.\n * @public\n * @documentationMaturity preview\n * @requiredField functionBuilderlessProduction\n * @requiredField functionBuilderlessProduction.appId\n * @requiredField functionBuilderlessProduction.function.formTemplateExtensionId\n * @requiredField functionBuilderlessProduction.function.functionTemplateExtensionId\n * @permissionId FUNCTIONS.FUNCTION_BUILDERLESS_PRODUCTION_CREATE\n * @applicableIdentity APP\n * @returns The created function builderless production.\n * @fqn wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.CreateFunctionBuilderlessProduction\n */\nexport async function createFunctionBuilderlessProduction(\n  functionBuilderlessProduction: NonNullablePaths<\n    FunctionBuilderlessProduction,\n    | `appId`\n    | `function.formTemplateExtensionId`\n    | `function.functionTemplateExtensionId`,\n    3\n  >\n): Promise<\n  NonNullablePaths<\n    FunctionBuilderlessProduction,\n    `appId` | `function.activationStatus` | `automationIds`,\n    3\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    functionBuilderlessProduction: functionBuilderlessProduction,\n  });\n\n  const reqOpts =\n    ambassadorWixFunctionsV1BuilderlessProduction.createFunctionBuilderlessProduction(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.functionBuilderlessProduction!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { functionBuilderlessProduction: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['functionBuilderlessProduction']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a function builderless production.\n * @param functionId - ID of the function to retrieve the builderless production for.\n * @public\n * @documentationMaturity preview\n * @requiredField functionId\n * @permissionId FUNCTIONS.FUNCTION_BUILDERLESS_PRODUCTION_READ\n * @applicableIdentity APP\n * @returns The requested function builderless production.\n * @fqn wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.GetFunctionBuilderlessProduction\n */\nexport async function getFunctionBuilderlessProduction(\n  functionId: string\n): Promise<\n  NonNullablePaths<\n    FunctionBuilderlessProduction,\n    `appId` | `function.activationStatus` | `automationIds`,\n    3\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    functionId: functionId,\n  });\n\n  const reqOpts =\n    ambassadorWixFunctionsV1BuilderlessProduction.getFunctionBuilderlessProduction(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.functionBuilderlessProduction!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { functionId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['functionId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates a function builderless production.\n *\n * If you have updated a function, or anything other elements of a builderless production, using other APIs, updating the builderless production has no effect.\n * @param _id - Function builderless production ID. This is the same as the associated function's ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField functionBuilderlessProduction\n * @requiredField functionBuilderlessProduction.formValues\n * @permissionId FUNCTIONS.FUNCTION_BUILDERLESS_PRODUCTION_UPDATE\n * @applicableIdentity APP\n * @returns Updated function builderless production.\n * @fqn wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.UpdateFunctionBuilderlessProduction\n */\nexport async function updateFunctionBuilderlessProduction(\n  _id: string,\n  functionBuilderlessProduction: NonNullablePaths<\n    UpdateFunctionBuilderlessProduction,\n    `formValues`,\n    2\n  >\n): Promise<\n  NonNullablePaths<\n    FunctionBuilderlessProduction,\n    `appId` | `function.activationStatus` | `automationIds`,\n    3\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    functionBuilderlessProduction: {\n      ...functionBuilderlessProduction,\n      id: _id,\n    },\n  });\n\n  const reqOpts =\n    ambassadorWixFunctionsV1BuilderlessProduction.updateFunctionBuilderlessProduction(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.functionBuilderlessProduction!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { functionBuilderlessProduction: '$[1]' },\n        explicitPathsToArguments: {\n          'functionBuilderlessProduction.id': '$[0]',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'functionBuilderlessProduction']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateFunctionBuilderlessProduction {\n  /**\n   * Function builderless production ID. This is the same as the associated 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 builderless production is based on.\n   * @format GUID\n   */\n  appId?: string;\n  /**\n   * Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms) method, specifying the following parameters:\n   * - `namespace`: `wix.function_template.form`\n   * - `formIds`: An array that contains the function template's `formTemplateExtensionId`\n   * - `kind`: `EXTENSION`\n   */\n  formValues?: Record<string, any>;\n  /** Function created from the function builderless production. */\n  function?: _Function;\n  /** Service plugin configuration for the function. */\n  functionSpiConfiguration?: FunctionSpiConfiguration;\n  /**\n   * Automations created from the function builderless production.\n   * @format GUID\n   * @readonly\n   * @maxSize 100\n   */\n  automationIds?: string[];\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-builderless-production-function-builderless-productions.types';\n\nfunction resolveWixFunctionsBuilderlessproductionsV1FunctionBuilderlessProductionsUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/functions/v1/function-builderless-productions',\n        destPath: '/v1/function-builderless-productions',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/functions/v1/function-builderless-productions',\n        destPath: '/v1/function-builderless-productions',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/functions/v1/function-builderless-productions',\n        destPath: '/v1/function-builderless-productions',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/functions/v1/function-builderless-productions',\n        destPath: '/v1/function-builderless-productions',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_functions_function-builderless-productions';\n\n/**\n * Creates a builderless 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. Once created, the function is ready to be activated. 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 only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms) method, specifying the following parameters:\n * - `namespace`: `wix.function_template.form`\n * - `formIds`: An array that contains the function template's `formTemplateExtensionId`\n * - `kind`: `EXTENSION`\n */\nexport function createFunctionBuilderlessProduction(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createFunctionBuilderlessProduction({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'functionBuilderlessProduction.function.createdDate' },\n          { path: 'functionBuilderlessProduction.function.updatedDate' },\n          {\n            path: 'functionBuilderlessProduction.functionSpiConfiguration.createdDate',\n          },\n          {\n            path: 'functionBuilderlessProduction.functionSpiConfiguration.updatedDate',\n          },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.builderless_production',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.CreateFunctionBuilderlessProduction',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsBuilderlessproductionsV1FunctionBuilderlessProductionsUrl(\n        {\n          protoPath: '/v1/function-builderless-productions',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'functionBuilderlessProduction.function.createdDate' },\n              { path: 'functionBuilderlessProduction.function.updatedDate' },\n              {\n                path: 'functionBuilderlessProduction.functionSpiConfiguration.createdDate',\n              },\n              {\n                path: 'functionBuilderlessProduction.functionSpiConfiguration.updatedDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createFunctionBuilderlessProduction;\n}\n\n/** Retrieves a function builderless production. */\nexport function getFunctionBuilderlessProduction(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getFunctionBuilderlessProduction({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.builderless_production',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.GetFunctionBuilderlessProduction',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsBuilderlessproductionsV1FunctionBuilderlessProductionsUrl(\n        {\n          protoPath: '/v1/function-builderless-productions/{functionId}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'functionBuilderlessProduction.function.createdDate' },\n              { path: 'functionBuilderlessProduction.function.updatedDate' },\n              {\n                path: 'functionBuilderlessProduction.functionSpiConfiguration.createdDate',\n              },\n              {\n                path: 'functionBuilderlessProduction.functionSpiConfiguration.updatedDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getFunctionBuilderlessProduction;\n}\n\n/**\n * Updates a function builderless production.\n *\n * If you have updated a function, or anything other elements of a builderless production, using other APIs, updating the builderless production has no effect.\n */\nexport function updateFunctionBuilderlessProduction(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __updateFunctionBuilderlessProduction({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'functionBuilderlessProduction.function.createdDate' },\n          { path: 'functionBuilderlessProduction.function.updatedDate' },\n          {\n            path: 'functionBuilderlessProduction.functionSpiConfiguration.createdDate',\n          },\n          {\n            path: 'functionBuilderlessProduction.functionSpiConfiguration.updatedDate',\n          },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.builderless_production',\n      method: 'PATCH' as any,\n      methodFqn:\n        'wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.UpdateFunctionBuilderlessProduction',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsBuilderlessproductionsV1FunctionBuilderlessProductionsUrl(\n        {\n          protoPath:\n            '/v1/function-builderless-productions/{functionBuilderlessProduction.id}',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'functionBuilderlessProduction.function.createdDate' },\n              { path: 'functionBuilderlessProduction.function.updatedDate' },\n              {\n                path: 'functionBuilderlessProduction.functionSpiConfiguration.createdDate',\n              },\n              {\n                path: 'functionBuilderlessProduction.functionSpiConfiguration.updatedDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateFunctionBuilderlessProduction;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  FunctionBuilderlessProduction,\n  UpdateFunctionBuilderlessProduction,\n  createFunctionBuilderlessProduction as universalCreateFunctionBuilderlessProduction,\n  getFunctionBuilderlessProduction as universalGetFunctionBuilderlessProduction,\n  updateFunctionBuilderlessProduction as universalUpdateFunctionBuilderlessProduction,\n} from './functions-v1-builderless-production-function-builderless-productions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/functions' };\n\nexport function createFunctionBuilderlessProduction(\n  httpClient: HttpClient\n): CreateFunctionBuilderlessProductionSignature {\n  return (\n    functionBuilderlessProduction: NonNullablePaths<\n      FunctionBuilderlessProduction,\n      | `appId`\n      | `function.formTemplateExtensionId`\n      | `function.functionTemplateExtensionId`,\n      3\n    >\n  ) =>\n    universalCreateFunctionBuilderlessProduction(\n      functionBuilderlessProduction,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateFunctionBuilderlessProductionSignature {\n  /**\n   * Creates a builderless 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. Once created, the function is ready to be activated. 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 only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms) method, specifying the following parameters:\n   * - `namespace`: `wix.function_template.form`\n   * - `formIds`: An array that contains the function template's `formTemplateExtensionId`\n   * - `kind`: `EXTENSION`\n   * @param - Function builderless production to create.\n   * @returns The created function builderless production.\n   */\n  (\n    functionBuilderlessProduction: NonNullablePaths<\n      FunctionBuilderlessProduction,\n      | `appId`\n      | `function.formTemplateExtensionId`\n      | `function.functionTemplateExtensionId`,\n      3\n    >\n  ): Promise<\n    NonNullablePaths<\n      FunctionBuilderlessProduction,\n      `appId` | `function.activationStatus` | `automationIds`,\n      3\n    >\n  >;\n}\n\nexport function getFunctionBuilderlessProduction(\n  httpClient: HttpClient\n): GetFunctionBuilderlessProductionSignature {\n  return (functionId: string) =>\n    universalGetFunctionBuilderlessProduction(\n      functionId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetFunctionBuilderlessProductionSignature {\n  /**\n   * Retrieves a function builderless production.\n   * @param - ID of the function to retrieve the builderless production for.\n   * @returns The requested function builderless production.\n   */\n  (functionId: string): Promise<\n    NonNullablePaths<\n      FunctionBuilderlessProduction,\n      `appId` | `function.activationStatus` | `automationIds`,\n      3\n    >\n  >;\n}\n\nexport function updateFunctionBuilderlessProduction(\n  httpClient: HttpClient\n): UpdateFunctionBuilderlessProductionSignature {\n  return (\n    _id: string,\n    functionBuilderlessProduction: NonNullablePaths<\n      UpdateFunctionBuilderlessProduction,\n      `formValues`,\n      2\n    >\n  ) =>\n    universalUpdateFunctionBuilderlessProduction(\n      _id,\n      functionBuilderlessProduction,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateFunctionBuilderlessProductionSignature {\n  /**\n   * Updates a function builderless production.\n   *\n   * If you have updated a function, or anything other elements of a builderless production, using other APIs, updating the builderless production has no effect.\n   * @param - Function builderless production ID. This is the same as the associated function's ID.\n   * @returns Updated function builderless production.\n   */\n  (\n    _id: string,\n    functionBuilderlessProduction: NonNullablePaths<\n      UpdateFunctionBuilderlessProduction,\n      `formValues`,\n      2\n    >\n  ): Promise<\n    NonNullablePaths<\n      FunctionBuilderlessProduction,\n      `appId` | `function.activationStatus` | `automationIds`,\n      3\n    >\n  >;\n}\n\nexport {\n  ActivationStatus,\n  CreateFunctionBuilderlessProductionRequest,\n  CreateFunctionBuilderlessProductionResponse,\n  FunctionBuilderlessProduction,\n  FunctionSpiConfiguration,\n  GetFunctionBuilderlessProductionRequest,\n  GetFunctionBuilderlessProductionResponse,\n  UpdateFunctionBuilderlessProduction,\n  UpdateFunctionBuilderlessProductionRequest,\n  UpdateFunctionBuilderlessProductionResponse,\n  _Function,\n} from './functions-v1-builderless-production-function-builderless-productions.universal.js';\n","import {\n  createFunctionBuilderlessProduction as publicCreateFunctionBuilderlessProduction,\n  getFunctionBuilderlessProduction as publicGetFunctionBuilderlessProduction,\n  updateFunctionBuilderlessProduction as publicUpdateFunctionBuilderlessProduction,\n} from './functions-v1-builderless-production-function-builderless-productions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createFunctionBuilderlessProduction: MaybeContext<\n  BuildRESTFunction<typeof publicCreateFunctionBuilderlessProduction> &\n    typeof publicCreateFunctionBuilderlessProduction\n> = /*#__PURE__*/ createRESTModule(publicCreateFunctionBuilderlessProduction);\nexport const getFunctionBuilderlessProduction: MaybeContext<\n  BuildRESTFunction<typeof publicGetFunctionBuilderlessProduction> &\n    typeof publicGetFunctionBuilderlessProduction\n> = /*#__PURE__*/ createRESTModule(publicGetFunctionBuilderlessProduction);\nexport const updateFunctionBuilderlessProduction: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateFunctionBuilderlessProduction> &\n    typeof publicUpdateFunctionBuilderlessProduction\n> = /*#__PURE__*/ createRESTModule(publicUpdateFunctionBuilderlessProduction);\n\nexport { ActivationStatus } from './functions-v1-builderless-production-function-builderless-productions.universal.js';\nexport {\n  FunctionBuilderlessProduction,\n  _Function,\n  FunctionSpiConfiguration,\n  CreateFunctionBuilderlessProductionRequest,\n  CreateFunctionBuilderlessProductionResponse,\n  GetFunctionBuilderlessProductionRequest,\n  GetFunctionBuilderlessProductionResponse,\n  UpdateFunctionBuilderlessProductionRequest,\n  UpdateFunctionBuilderlessProductionResponse,\n  UpdateFunctionBuilderlessProduction,\n} from './functions-v1-builderless-production-function-builderless-productions.universal.js';\nexport { ActivationStatusWithLiterals } from './functions-v1-builderless-production-function-builderless-productions.universal.js';\n"]}