import { NonNullablePaths } from '@wix/sdk-types'; /** A function builderless production defines a function and its related entities. */ interface FunctionBuilderlessProduction { /** * Function builderless production ID. This is the same as the associated function's ID. * @format GUID * @readonly */ _id?: string | null; /** * App ID of the business solution that created the function type the function builderless production is based on. * @format GUID */ appId?: string; /** * 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: * - `namespace`: `wix.function_template.form` * - `formIds`: An array that contains the function template's `formTemplateExtensionId` * - `kind`: `EXTENSION` */ formValues?: Record; /** Function created from the function builderless production. */ function?: _Function; /** Service plugin configuration for the function. */ functionSpiConfiguration?: FunctionSpiConfiguration; /** * Automations created from the function builderless production. * @format GUID * @readonly * @maxSize 100 */ automationIds?: string[]; } interface _Function { /** * Function ID. * @format GUID * @readonly */ _id?: string | null; /** * Date and time the function was created. * @readonly */ _createdDate?: Date | null; /** * The function's app extension ID. * @format GUID * @readonly */ functionExtensionId?: string | null; /** * Function name. * @maxLength 100 * @readonly */ functionName?: string | null; /** * Activation status * @readonly */ activationStatus?: ActivationStatusWithLiterals; /** * ID of the app that defines the function. * @format GUID * @readonly */ appId?: string | null; /** * The function's app extension name. * @minLength 1 * @maxLength 100 * @readonly */ functionExtensionName?: string | null; /** * Function template extension id * @format GUID */ functionTemplateExtensionId?: string | null; /** * Form template extension id * @format GUID */ formTemplateExtensionId?: string | null; /** * Date and time the function was last updated. * @readonly */ _updatedDate?: Date | null; /** * Revision number that increases with every update. * @readonly */ revision?: string | null; } declare enum ActivationStatus { /** Function is activated. */ ACTIVE = "ACTIVE", /** Function is deactivated. */ INACTIVE = "INACTIVE", /** Function is saved but has never been activated. */ DRAFT = "DRAFT" } /** @enumType */ type ActivationStatusWithLiterals = ActivationStatus | 'ACTIVE' | 'INACTIVE' | 'DRAFT'; /** SpiConfiguration is a spi configuration for a specific function. */ interface FunctionSpiConfiguration { /** * SpiConfiguration ID. * @format GUID * @readonly */ _id?: string | null; /** * SpiConfiguration revision. * @readonly */ revision?: string | null; /** * Date and time the SpiConfiguration was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the SpiConfiguration was last updated. * @readonly */ _updatedDate?: Date | null; /** * Function ID * @format GUID * @readonly */ functionId?: string | null; /** Function SPI configuration dev center component payload. */ configuration?: Record | null; } interface CreateFunctionBuilderlessProductionRequest { /** Function builderless production to create. */ functionBuilderlessProduction: FunctionBuilderlessProduction; } interface CreateFunctionBuilderlessProductionResponse { /** The created function builderless production. */ functionBuilderlessProduction?: FunctionBuilderlessProduction; } interface GetFunctionBuilderlessProductionRequest { /** * ID of the function to retrieve the builderless production for. * @format GUID */ functionId: string; } interface GetFunctionBuilderlessProductionResponse { /** The requested function builderless production. */ functionBuilderlessProduction?: FunctionBuilderlessProduction; } interface UpdateFunctionBuilderlessProductionRequest { /** Function builderless production to update. */ functionBuilderlessProduction: FunctionBuilderlessProduction; } interface UpdateFunctionBuilderlessProductionResponse { /** Updated function builderless production. */ functionBuilderlessProduction?: FunctionBuilderlessProduction; } /** * Creates a builderless function production. * * 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). * * 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: * - `namespace`: `wix.function_template.form` * - `formIds`: An array that contains the function template's `formTemplateExtensionId` * - `kind`: `EXTENSION` * @param functionBuilderlessProduction - Function builderless production to create. * @public * @requiredField functionBuilderlessProduction * @requiredField functionBuilderlessProduction.appId * @requiredField functionBuilderlessProduction.function.formTemplateExtensionId * @requiredField functionBuilderlessProduction.function.functionTemplateExtensionId * @permissionId FUNCTIONS.FUNCTION_BUILDERLESS_PRODUCTION_CREATE * @applicableIdentity APP * @returns The created function builderless production. * @fqn wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.CreateFunctionBuilderlessProduction */ declare function createFunctionBuilderlessProduction(functionBuilderlessProduction: NonNullablePaths): Promise>; /** * Retrieves a function builderless production. * @param functionId - ID of the function to retrieve the builderless production for. * @public * @requiredField functionId * @permissionId FUNCTIONS.FUNCTION_BUILDERLESS_PRODUCTION_READ * @applicableIdentity APP * @returns The requested function builderless production. * @fqn wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.GetFunctionBuilderlessProduction */ declare function getFunctionBuilderlessProduction(functionId: string): Promise>; /** * Updates a function builderless production. * * If you have updated a function, or anything other elements of a builderless production, using other APIs, updating the builderless production has no effect. * @param _id - Function builderless production ID. This is the same as the associated function's ID. * @public * @requiredField _id * @requiredField functionBuilderlessProduction * @requiredField functionBuilderlessProduction.formValues * @permissionId FUNCTIONS.FUNCTION_BUILDERLESS_PRODUCTION_UPDATE * @applicableIdentity APP * @returns Updated function builderless production. * @fqn wix.functions.builderlessproductions.v1.FunctionBuilderlessProductions.UpdateFunctionBuilderlessProduction */ declare function updateFunctionBuilderlessProduction(_id: string, functionBuilderlessProduction: NonNullablePaths): Promise>; interface UpdateFunctionBuilderlessProduction { /** * Function builderless production ID. This is the same as the associated function's ID. * @format GUID * @readonly */ _id?: string | null; /** * App ID of the business solution that created the function type the function builderless production is based on. * @format GUID */ appId?: string; /** * 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: * - `namespace`: `wix.function_template.form` * - `formIds`: An array that contains the function template's `formTemplateExtensionId` * - `kind`: `EXTENSION` */ formValues?: Record; /** Function created from the function builderless production. */ function?: _Function; /** Service plugin configuration for the function. */ functionSpiConfiguration?: FunctionSpiConfiguration; /** * Automations created from the function builderless production. * @format GUID * @readonly * @maxSize 100 */ automationIds?: string[]; } export { ActivationStatus, type ActivationStatusWithLiterals, type CreateFunctionBuilderlessProductionRequest, type CreateFunctionBuilderlessProductionResponse, type FunctionBuilderlessProduction, type FunctionSpiConfiguration, type GetFunctionBuilderlessProductionRequest, type GetFunctionBuilderlessProductionResponse, type UpdateFunctionBuilderlessProduction, type UpdateFunctionBuilderlessProductionRequest, type UpdateFunctionBuilderlessProductionResponse, type _Function, createFunctionBuilderlessProduction, getFunctionBuilderlessProduction, updateFunctionBuilderlessProduction };