{"version":3,"sources":["../../src/functions-v1-function-functions.public.ts","../../src/functions-v1-function-functions.universal.ts","../../src/functions-v1-function-functions.http.ts","../../src/functions-v1-function-functions.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  BulkUpdateFunctionTagsApplicationErrors,\n  BulkUpdateFunctionTagsByFilterApplicationErrors,\n  BulkUpdateFunctionTagsByFilterOptions,\n  BulkUpdateFunctionTagsByFilterResponse,\n  BulkUpdateFunctionTagsOptions,\n  BulkUpdateFunctionTagsResponse,\n  FunctionCreatedEnvelope,\n  FunctionDeletedEnvelope,\n  FunctionTagsModifiedEnvelope,\n  FunctionUpdatedEnvelope,\n  FunctionsQueryBuilder,\n  QueryFunctionsResponse,\n  UpdateFunction,\n  _Function,\n  _FunctionQuery,\n  bulkUpdateFunctionTags as universalBulkUpdateFunctionTags,\n  bulkUpdateFunctionTagsByFilter as universalBulkUpdateFunctionTagsByFilter,\n  createFunction as universalCreateFunction,\n  deleteFunction as universalDeleteFunction,\n  getFunction as universalGetFunction,\n  queryFunctions as universalQueryFunctions,\n  typedQueryFunctions as universalTypedQueryFunctions,\n  updateFunction as universalUpdateFunction,\n} from './functions-v1-function-functions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/functions' };\n\nexport function createFunction(\n  httpClient: HttpClient\n): CreateFunctionSignature {\n  return (_function?: _Function) =>\n    universalCreateFunction(\n      _function,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateFunctionSignature {\n  /**\n   * Creates a function with the specified configuration. After creation, you'll need to attach automation logic using the Function Methods API and configure any required service plugin settings before the function can be activated.\n   *\n   * This isn't the recommended way to create a function. 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   * @param - Function to create.\n   * @returns The created function.\n   */\n  (_function?: _Function): Promise<\n    NonNullablePaths<\n      _Function,\n      `activationStatus` | `tags.privateTags.tagIds`,\n      2\n    >\n  >;\n}\n\nexport function getFunction(httpClient: HttpClient): GetFunctionSignature {\n  return (functionId: string) =>\n    universalGetFunction(\n      functionId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetFunctionSignature {\n  /**\n   * Retrieves a function.\n   * @param - ID of the function to retrieve.\n   * @returns The retrieved function.\n   */\n  (functionId: string): Promise<\n    NonNullablePaths<\n      _Function,\n      `activationStatus` | `tags.privateTags.tagIds`,\n      2\n    >\n  >;\n}\n\nexport function updateFunction(\n  httpClient: HttpClient\n): UpdateFunctionSignature {\n  return (_id: string, _function?: UpdateFunction) =>\n    universalUpdateFunction(\n      _id,\n      _function,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateFunctionSignature {\n  /**\n   * Updates a function.\n   *\n   * Each time the function is updated,\n   * `revision` increments by 1.\n   * The existing `revision` must be passed when updating the function.\n   * This ensures you're working with the latest version of the function\n   * and prevents unintended overwrites.\n   * @param - Function ID.\n   * @returns Updated function.\n   */\n  (_id: string, _function?: UpdateFunction): Promise<\n    NonNullablePaths<\n      _Function,\n      `activationStatus` | `tags.privateTags.tagIds`,\n      2\n    >\n  >;\n}\n\nexport function deleteFunction(\n  httpClient: HttpClient\n): DeleteFunctionSignature {\n  return (functionId: string) =>\n    universalDeleteFunction(\n      functionId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface DeleteFunctionSignature {\n  /**\n   * Deletes a function.\n   *\n   * Deleting a function permanently removes it from the Function List\n   * in the site's dashboard.\n   * @param - ID of the function to delete.\n   */\n  (functionId: string): Promise<void>;\n}\n\nexport function queryFunctions(\n  httpClient: HttpClient\n): QueryFunctionsSignature {\n  return () =>\n    universalQueryFunctions(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryFunctionsSignature {\n  /**\n   * Creates a query to retrieve a list of functions.\n   *\n   * The Query Functions method builds a query to retrieve a list of functions and returns a `FunctionsQueryBuilder` object.\n   *\n   * The returned object contains the query definition, which is used to run the query using the `find()` method.\n   *\n   * You can refine the query by chaining `FunctionsQueryBuilder` methods onto the query. `FunctionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Functions returns.\n   *\n   * Query Functions has a default paging limit of 50, which you can override.\n   *\n   *  For a full description of the item object, see the object returned for the `items` property in `FunctionsQueryResult`.\n   */\n  (): FunctionsQueryBuilder;\n}\n\nexport function typedQueryFunctions(\n  httpClient: HttpClient\n): TypedQueryFunctionsSignature {\n  return (query: _FunctionQuery) =>\n    universalTypedQueryFunctions(\n      query,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface TypedQueryFunctionsSignature {\n  /** */\n  (query: _FunctionQuery): Promise<\n    NonNullablePaths<\n      QueryFunctionsResponse,\n      `functions` | `functions.${number}.activationStatus`,\n      2\n    >\n  >;\n}\n\nexport function bulkUpdateFunctionTags(\n  httpClient: HttpClient\n): BulkUpdateFunctionTagsSignature {\n  return (\n    ids: string[],\n    options?: NonNullablePaths<BulkUpdateFunctionTagsOptions, `assignTags`, 0>\n  ) =>\n    universalBulkUpdateFunctionTags(\n      ids,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkUpdateFunctionTagsSignature {\n  /**\n   * Synchronously update tags on multiple functions.\n   * A tag that appears both the list to assign and the list to unassign tags, will be assigned.\n   * @param - IDs of functions to update tags for.\n   */\n  (\n    ids: string[],\n    options?: NonNullablePaths<BulkUpdateFunctionTagsOptions, `assignTags`, 0>\n  ): Promise<\n    NonNullablePaths<\n      BulkUpdateFunctionTagsResponse,\n      | `results`\n      | `results.${number}.itemMetadata.originalIndex`\n      | `results.${number}.itemMetadata.success`\n      | `results.${number}.itemMetadata.error.code`\n      | `results.${number}.itemMetadata.error.description`\n      | `bulkActionMetadata.totalSuccesses`\n      | `bulkActionMetadata.totalFailures`\n      | `bulkActionMetadata.undetailedFailures`,\n      4\n    > & {\n      __applicationErrorsType?: BulkUpdateFunctionTagsApplicationErrors;\n    }\n  >;\n}\n\nexport function bulkUpdateFunctionTagsByFilter(\n  httpClient: HttpClient\n): BulkUpdateFunctionTagsByFilterSignature {\n  return (\n    filter: Record<string, any>,\n    options?: NonNullablePaths<\n      BulkUpdateFunctionTagsByFilterOptions,\n      `assignTags`,\n      0\n    >\n  ) =>\n    universalBulkUpdateFunctionTagsByFilter(\n      filter,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkUpdateFunctionTagsByFilterSignature {\n  /**\n   * Asynchronously update tags on multiple functions.\n   * An empty filter updates all functions.\n   * A tag that appears both the list to assign and the list to unassign tags, will be assigned.\n   * @param - Filter.\n   */\n  (\n    filter: Record<string, any>,\n    options?: NonNullablePaths<\n      BulkUpdateFunctionTagsByFilterOptions,\n      `assignTags`,\n      0\n    >\n  ): Promise<\n    NonNullablePaths<BulkUpdateFunctionTagsByFilterResponse, `jobId`, 0> & {\n      __applicationErrorsType?: BulkUpdateFunctionTagsByFilterApplicationErrors;\n    }\n  >;\n}\n\nexport const onFunctionCreated = /*#__PURE__*/ EventDefinition(\n  'wix.functions.v1.function_created',\n  true,\n  (event: FunctionCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<FunctionCreatedEnvelope>();\nexport const onFunctionDeleted = /*#__PURE__*/ EventDefinition(\n  'wix.functions.v1.function_deleted',\n  true,\n  (event: FunctionDeletedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<FunctionDeletedEnvelope>();\nexport const onFunctionTagsModified = /*#__PURE__*/ EventDefinition(\n  'wix.functions.v1.function_tags_modified',\n  true,\n  (event: FunctionTagsModifiedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.function.createdDate' },\n            { path: 'data.function.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<FunctionTagsModifiedEnvelope>();\nexport const onFunctionUpdated = /*#__PURE__*/ EventDefinition(\n  'wix.functions.v1.function_updated',\n  true,\n  (event: FunctionUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'metadata.eventTime' },\n            { path: 'modifiedFields.createdDate' },\n            { path: 'modifiedFields.updatedDate' },\n          ],\n        },\n      ])\n    )\n)<FunctionUpdatedEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  ActivationStatus,\n  ApplicationError,\n  BaseEventMetadata,\n  BulkActionMetadata,\n  BulkUpdateFunctionTagsByFilterOptions,\n  BulkUpdateFunctionTagsByFilterRequest,\n  BulkUpdateFunctionTagsByFilterResponse,\n  BulkUpdateFunctionTagsOptions,\n  BulkUpdateFunctionTagsRequest,\n  BulkUpdateFunctionTagsResponse,\n  BulkUpdateFunctionTagsResult,\n  CreateFunctionRequest,\n  CreateFunctionResponse,\n  CursorPaging,\n  CursorPagingMetadata,\n  CursorQuery,\n  CursorQueryPagingMethodOneOf,\n  Cursors,\n  DeleteFunctionRequest,\n  DeleteFunctionResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  DraftDiscarded,\n  Empty,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  FieldAndCount,\n  FunctionCreatedEnvelope,\n  FunctionDeletedEnvelope,\n  FunctionTagsModifiedEnvelope,\n  FunctionUpdatedEnvelope,\n  FunctionsQueryBuilder,\n  FunctionsQueryResult,\n  GetFunctionRequest,\n  GetFunctionResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ItemMetadata,\n  ListValuesByFieldRequest,\n  ListValuesByFieldResponse,\n  MessageEnvelope,\n  QueryFunctionsRequest,\n  QueryFunctionsResponse,\n  RestoreInfo,\n  SortOrder,\n  Sorting,\n  TagList,\n  Tags,\n  TagsModified,\n  UpdateFunction,\n  UpdateFunctionExternalIdsRequest,\n  UpdateFunctionExternalIdsResponse,\n  UpdateFunctionRequest,\n  UpdateFunctionResponse,\n  WebhookIdentityType,\n  _Function,\n  _FunctionQuerySpec,\n  utils,\n} from './functions-v1-function-functions.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n  HttpClient,\n  HttpResponse,\n  NonNullablePaths,\n  QuerySpec,\n  Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixFunctionsV1Function from './functions-v1-function-functions.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/** A function is the main entity in the Wix Functions ecosystem. All other entities are used to create functions or to define their behavior. Learn more about [Functions](https://support.wix.com/en/wix-functions). */\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   * ID of the function type that defines when and how the function runs. This is the function type that the function is based on.\n   * @format GUID\n   */\n  functionExtensionId?: string | null;\n  /**\n   * Display name for the function in the dashboard's function builder.\n   * @maxLength 100\n   */\n  functionName?: string | null;\n  /**\n   * Activation status.\n   * @readonly\n   */\n  activationStatus?: ActivationStatusWithLiterals;\n  /**\n   * ID of the Wix app that defines the function type that the function is based on.\n   * @format GUID\n   */\n  appId?: string | null;\n  /**\n   * Display name of the function type.\n   * @minLength 1\n   * @maxLength 100\n   */\n  functionExtensionName?: string | null;\n  /**\n   * External IDs that link the function to other entities.\n   * @internal\n   * @format GUID\n   * @maxSize 100\n   * @readonly\n   */\n  externalIds?: string[] | null;\n  /**\n   * ID of the function template used to create this function.\n   * @format GUID\n   */\n  functionTemplateExtensionId?: string | null;\n  /**\n   * ID of the form template used to create this function. Included if the function was created using the [Builderless Productions](https://dev.wix.com/docs/api-reference/business-management/functions/builderless-productions/introduction) API.\n   * @format GUID\n   */\n  formTemplateExtensionId?: string | null;\n  /** Whether the function has changes that were made since it was last activated. */\n  hasUnpublishedChanges?: boolean | null;\n  /** Tags assigned to the function for organization and filtering. */\n  tags?: Tags;\n}\n\nexport enum ActivationStatus {\n  /** Function is active and runs when triggered. */\n  ACTIVE = 'ACTIVE',\n  /** Function is inactive and doesn't run when triggered. */\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/**\n * Common object for tags.\n * Should be use as in this example:\n * message Foo {\n * option (.wix.api.decomposite_of) = \"wix.commons.v2.tags.Foo\";\n * string id = 1;\n * ...\n * Tags tags = 5\n * }\n *\n * example of taggable entity\n * {\n * id: \"123\"\n * tags: {\n * public_tags: {\n * tag_ids:[\"11\",\"22\"]\n * },\n * private_tags: {\n * tag_ids: [\"33\", \"44\"]\n * }\n * }\n * }\n */\nexport interface Tags {\n  /** Tags that require an additional permission in order to access them, typically restricted from site members and visitors. */\n  privateTags?: TagList;\n  /** Tags that are exposed to anyone with access to the entity, including site members and visitors. */\n  publicTags?: TagList;\n}\n\nexport interface TagList {\n  /**\n   * List of tag IDs.\n   * @maxSize 100\n   * @maxLength 5\n   */\n  tagIds?: string[];\n}\n\nexport interface DraftDiscarded {\n  /**\n   * Function ID associated with the discarded draft\n   * @format GUID\n   */\n  functionId?: string;\n  /** Date and time when the draft was discarded */\n  discardedDate?: Date | null;\n}\n\nexport interface TagsModified {\n  /** Updated function. */\n  function?: _Function;\n  /** Tags that were assigned to the Function. */\n  assignedTags?: Tags;\n  /** Tags that were unassigned from the Function. */\n  unassignedTags?: Tags;\n}\n\nexport interface CreateFunctionRequest {\n  /** Function to create. */\n  function: _Function;\n}\n\nexport interface CreateFunctionResponse {\n  /** The created function. */\n  function?: _Function;\n}\n\nexport interface GetFunctionRequest {\n  /**\n   * ID of the function to retrieve.\n   * @format GUID\n   */\n  functionId: string;\n}\n\nexport interface GetFunctionResponse {\n  /** The retrieved function. */\n  function?: _Function;\n}\n\nexport interface UpdateFunctionRequest {\n  /** Function to update. */\n  function: _Function;\n  /**\n   * Set of fields to update.\n   *\n   * Fields that aren't included in `fieldMask.paths` are ignored.\n   * @internal\n   */\n  fieldMask?: string[];\n}\n\nexport interface UpdateFunctionResponse {\n  /** Updated function. */\n  function?: _Function;\n}\n\nexport interface DeleteFunctionRequest {\n  /**\n   * ID of the function to delete.\n   * @format GUID\n   */\n  functionId: string;\n}\n\nexport interface DeleteFunctionResponse {}\n\nexport interface QueryFunctionsRequest {\n  /** Wix Query Language expression. */\n  query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   * @maxSize 5\n   */\n  sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n  /**\n   * Maximum number of items to return in the results.\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results.\n   *\n   * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   * @maxLength 16000\n   */\n  cursor?: string | null;\n}\n\nexport interface QueryFunctionsResponse {\n  /** List of retrieved functions. */\n  functions?: _Function[];\n  /** Metadata for the paginated results. */\n  pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Cursor strings that point to the next page, previous page, or both. */\n  cursors?: Cursors;\n  /**\n   * Whether there are more pages to retrieve following the current page.\n   *\n   * + `true`: Another page of results can be retrieved.\n   * + `false`: This is the last page.\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n  /**\n   * Cursor string pointing to the next page in the list of results.\n   * @maxLength 16000\n   */\n  next?: string | null;\n  /**\n   * Cursor pointing to the previous page in the list of results.\n   * @maxLength 16000\n   */\n  prev?: string | null;\n}\n\nexport interface ListValuesByFieldRequest {\n  /**\n   * Field to list values for.\n   * @minLength 1\n   * @maxLength 100\n   */\n  field?: string;\n}\n\nexport interface ListValuesByFieldResponse {\n  /**\n   * List of values for the field.\n   * @maxSize 100\n   */\n  fieldAndCount?: FieldAndCount[];\n}\n\nexport interface FieldAndCount {\n  /**\n   * Field value.\n   * @minLength 1\n   * @maxLength 100\n   */\n  field?: string;\n  /** Number of times the value occurs. */\n  count?: number;\n}\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\nexport interface UpdateFunctionExternalIdsRequest {\n  /**\n   * ID of the function to update.\n   * @format GUID\n   */\n  functionId?: string;\n  /**\n   * External ids to set.\n   * @format GUID\n   * @maxSize 100\n   */\n  externalIds?: string[];\n}\n\nexport interface UpdateFunctionExternalIdsResponse {\n  /** The updated function. */\n  function?: _Function;\n}\n\nexport interface BulkUpdateFunctionTagsRequest {\n  /**\n   * IDs of functions to update tags for.\n   * @minSize 1\n   * @maxSize 100\n   * @format GUID\n   */\n  ids: string[];\n  /** List of tags to assign. */\n  assignTags: Tags;\n  /** List of tags to unassign. */\n  unassignTags?: Tags;\n}\n\nexport interface BulkUpdateFunctionTagsResponse {\n  /**\n   * Results.\n   * @minSize 1\n   * @maxSize 100\n   */\n  results?: BulkUpdateFunctionTagsResult[];\n  /** Bulk action metadata. */\n  bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n  /**\n   * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.\n   * @format GUID\n   */\n  _id?: string | null;\n  /** Index of the item within the request array. Allows for correlation between request and response items. */\n  originalIndex?: number;\n  /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */\n  success?: boolean;\n  /** Details about the error in case of failure. */\n  error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n  /** Error code. */\n  code?: string;\n  /** Description of the error. */\n  description?: string;\n  /** Data related to the error. */\n  data?: Record<string, any> | null;\n}\n\nexport interface BulkUpdateFunctionTagsResult {\n  /** Item metadata. */\n  itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkActionMetadata {\n  /** Number of items that were successfully processed. */\n  totalSuccesses?: number;\n  /** Number of items that couldn't be processed. */\n  totalFailures?: number;\n  /** Number of failures without details because detailed failure threshold was exceeded. */\n  undetailedFailures?: number;\n}\n\nexport interface BulkUpdateFunctionTagsByFilterRequest {\n  /** Filter. */\n  filter: Record<string, any> | null;\n  /** List of tags to assign. */\n  assignTags: Tags;\n  /** List of tags to unassign. */\n  unassignTags?: Tags;\n}\n\nexport interface BulkUpdateFunctionTagsByFilterResponse {\n  /**\n   * Job ID for the bulk update operation.\n   * @format GUID\n   */\n  jobId?: string;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type BulkUpdateFunctionTagsApplicationErrors = {\n  code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdateFunctionTagsByFilterApplicationErrors = {\n  code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n  description?: string;\n  data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\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  accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n  /** ID of the Wix account associated with the event */\n  accountId: string;\n  /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n  siteId?: string;\n  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n  parentAccountId?: string;\n}\n\nexport interface FunctionCreatedEnvelope {\n  entity: _Function;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a function is created.\n * @permissionScope Manage_Wix_Rentals_App_Forms_submissions\n * @permissionScopeId SCOPE.RENTALS.MANAGE\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope View Forms\n * @permissionScopeId SCOPE.FORMS.VIEW-FORM\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage forms\n * @permissionScopeId SCOPE.FORMS.EDIT-FORM\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Functions\n * @permissionScopeId SCOPE.DC-FUNCTIONS.MANAGE-FUNCTIONS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId FUNCTIONS.FUNCTION_READ\n * @webhook\n * @eventType wix.functions.v1.function_created\n * @slug created\n */\nexport declare function onFunctionCreated(\n  handler: (event: FunctionCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface FunctionDeletedEnvelope {\n  entity: _Function;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a function is deleted.\n * @permissionScope Manage_Wix_Rentals_App_Forms_submissions\n * @permissionScopeId SCOPE.RENTALS.MANAGE\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope View Forms\n * @permissionScopeId SCOPE.FORMS.VIEW-FORM\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage forms\n * @permissionScopeId SCOPE.FORMS.EDIT-FORM\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Functions\n * @permissionScopeId SCOPE.DC-FUNCTIONS.MANAGE-FUNCTIONS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId FUNCTIONS.FUNCTION_READ\n * @webhook\n * @eventType wix.functions.v1.function_deleted\n * @slug deleted\n */\nexport declare function onFunctionDeleted(\n  handler: (event: FunctionDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface FunctionTagsModifiedEnvelope {\n  data: TagsModified;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when tags are modified.\n * @permissionScope Manage_Wix_Rentals_App_Forms_submissions\n * @permissionScopeId SCOPE.RENTALS.MANAGE\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope View Forms\n * @permissionScopeId SCOPE.FORMS.VIEW-FORM\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage forms\n * @permissionScopeId SCOPE.FORMS.EDIT-FORM\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Functions\n * @permissionScopeId SCOPE.DC-FUNCTIONS.MANAGE-FUNCTIONS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId FUNCTIONS.FUNCTION_READ\n * @webhook\n * @eventType wix.functions.v1.function_tags_modified\n * @slug tags_modified\n */\nexport declare function onFunctionTagsModified(\n  handler: (event: FunctionTagsModifiedEnvelope) => void | Promise<void>\n): void;\n\nexport interface FunctionUpdatedEnvelope {\n  entity: _Function;\n  metadata: EventMetadata;\n  /** @hidden */\n  modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a function is updated.\n * @permissionScope Manage_Wix_Rentals_App_Forms_submissions\n * @permissionScopeId SCOPE.RENTALS.MANAGE\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope View Forms\n * @permissionScopeId SCOPE.FORMS.VIEW-FORM\n * @permissionScope Manage form submissions.\n * @permissionScopeId SCOPE.FORMS.MANAGE-SUBMISSIONS\n * @permissionScope Manage forms\n * @permissionScopeId SCOPE.FORMS.EDIT-FORM\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Functions\n * @permissionScopeId SCOPE.DC-FUNCTIONS.MANAGE-FUNCTIONS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Set Up Automations\n * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS\n * @permissionId FUNCTIONS.FUNCTION_READ\n * @webhook\n * @eventType wix.functions.v1.function_updated\n * @slug updated\n */\nexport declare function onFunctionUpdated(\n  handler: (event: FunctionUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a function with the specified configuration. After creation, you'll need to attach automation logic using the Function Methods API and configure any required service plugin settings before the function can be activated.\n *\n * This isn't the recommended way to create a function. 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 * @param _function - Function to create.\n * @public\n * @requiredField function\n * @requiredField function.appId\n * @requiredField function.functionExtensionId\n * @permissionId FUNCTIONS.FUNCTION_CREATE\n * @applicableIdentity APP\n * @returns The created function.\n * @fqn wix.functions.api.v1.Functions.CreateFunction\n */\nexport async function createFunction(\n  _function?: _Function\n): Promise<\n  NonNullablePaths<_Function, `activationStatus` | `tags.privateTags.tagIds`, 2>\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    function: _function,\n  });\n\n  const reqOpts = ambassadorWixFunctionsV1Function.createFunction(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.function!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { function: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_function']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a function.\n * @param functionId - ID of the function to retrieve.\n * @public\n * @requiredField functionId\n * @permissionId FUNCTIONS.FUNCTION_READ\n * @applicableIdentity APP\n * @returns The retrieved function.\n * @fqn wix.functions.api.v1.Functions.GetFunction\n */\nexport async function getFunction(\n  functionId: string\n): Promise<\n  NonNullablePaths<_Function, `activationStatus` | `tags.privateTags.tagIds`, 2>\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 = ambassadorWixFunctionsV1Function.getFunction(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.function!;\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.\n *\n * Each time the function is updated,\n * `revision` increments by 1.\n * The existing `revision` must be passed when updating the function.\n * This ensures you're working with the latest version of the function\n * and prevents unintended overwrites.\n * @param _id - Function ID.\n * @public\n * @requiredField _id\n * @requiredField function\n * @requiredField function.revision\n * @permissionId FUNCTIONS.FUNCTION_UPDATE\n * @applicableIdentity APP\n * @returns Updated function.\n * @fqn wix.functions.api.v1.Functions.UpdateFunction\n */\nexport async function updateFunction(\n  _id: string,\n  _function?: UpdateFunction\n): Promise<\n  NonNullablePaths<_Function, `activationStatus` | `tags.privateTags.tagIds`, 2>\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    function: { ..._function, id: _id },\n  });\n\n  const reqOpts = ambassadorWixFunctionsV1Function.updateFunction(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.function!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { function: '$[1]' },\n        explicitPathsToArguments: { 'function.id': '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', '_function']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateFunction {\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   * ID of the function type that defines when and how the function runs. This is the function type that the function is based on.\n   * @format GUID\n   */\n  functionExtensionId?: string | null;\n  /**\n   * Display name for the function in the dashboard's function builder.\n   * @maxLength 100\n   */\n  functionName?: string | null;\n  /**\n   * Activation status.\n   * @readonly\n   */\n  activationStatus?: ActivationStatusWithLiterals;\n  /**\n   * ID of the Wix app that defines the function type that the function is based on.\n   * @format GUID\n   */\n  appId?: string | null;\n  /**\n   * Display name of the function type.\n   * @minLength 1\n   * @maxLength 100\n   */\n  functionExtensionName?: string | null;\n  /**\n   * External IDs that link the function to other entities.\n   * @internal\n   * @format GUID\n   * @maxSize 100\n   * @readonly\n   */\n  externalIds?: string[] | null;\n  /**\n   * ID of the function template used to create this function.\n   * @format GUID\n   */\n  functionTemplateExtensionId?: string | null;\n  /**\n   * ID of the form template used to create this function. Included if the function was created using the [Builderless Productions](https://dev.wix.com/docs/api-reference/business-management/functions/builderless-productions/introduction) API.\n   * @format GUID\n   */\n  formTemplateExtensionId?: string | null;\n  /** Whether the function has changes that were made since it was last activated. */\n  hasUnpublishedChanges?: boolean | null;\n  /** Tags assigned to the function for organization and filtering. */\n  tags?: Tags;\n}\n\n/**\n * Deletes a function.\n *\n * Deleting a function permanently removes it from the Function List\n * in the site's dashboard.\n * @param functionId - ID of the function to delete.\n * @public\n * @requiredField functionId\n * @permissionId FUNCTIONS.FUNCTION_DELETE\n * @applicableIdentity APP\n * @fqn wix.functions.api.v1.Functions.DeleteFunction\n */\nexport async function deleteFunction(functionId: string): 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    functionId: functionId,\n  });\n\n  const reqOpts = ambassadorWixFunctionsV1Function.deleteFunction(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: { functionId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['functionId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates a query to retrieve a list of functions.\n *\n * The Query Functions method builds a query to retrieve a list of functions and returns a `FunctionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `FunctionsQueryBuilder` methods onto the query. `FunctionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Functions returns.\n *\n * Query Functions has a default paging limit of 50, which you can override.\n *\n *  For a full description of the item object, see the object returned for the `items` property in `FunctionsQueryResult`.\n * @public\n * @permissionId FUNCTIONS.FUNCTION_READ\n * @applicableIdentity APP\n * @fqn wix.functions.api.v1.Functions.QueryFunctions\n */\nexport function queryFunctions(): FunctionsQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    _Function,\n    'CURSOR',\n    QueryFunctionsRequest,\n    QueryFunctionsResponse\n  >({\n    func: async (payload: QueryFunctionsRequest) => {\n      const reqOpts = ambassadorWixFunctionsV1Function.queryFunctions(payload);\n\n      sideEffects?.onSiteCall?.();\n      try {\n        const result = await httpClient.request(reqOpts);\n        sideEffects?.onSuccess?.(result);\n        return result;\n      } catch (err) {\n        sideEffects?.onError?.(err);\n        throw err;\n      }\n    },\n    requestTransformer: (query: QueryFunctionsRequest['query']) => {\n      const args = [query, {}] as [QueryFunctionsRequest['query'], {}];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({ data }: HttpResponse<QueryFunctionsResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [])\n      );\n\n      return {\n        items: transformedData?.functions,\n        pagingMetadata: transformedData?.pagingMetadata,\n      };\n    },\n    errorTransformer: (err: unknown) => {\n      const transformedError = sdkTransformError(err, {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      });\n\n      throw transformedError;\n    },\n    pagingMethod: 'CURSOR',\n    transformationPaths: {},\n  });\n}\n\ninterface QueryCursorResult {\n  cursors: Cursors;\n  hasNext: () => boolean;\n  hasPrev: () => boolean;\n  length: number;\n  pageSize: number;\n}\n\nexport interface FunctionsQueryResult extends QueryCursorResult {\n  items: _Function[];\n  query: FunctionsQueryBuilder;\n  next: () => Promise<FunctionsQueryResult>;\n  prev: () => Promise<FunctionsQueryResult>;\n}\n\nexport interface FunctionsQueryBuilder {\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  eq: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'activationStatus'\n      | 'appId'\n      | 'functionExtensionName',\n    value: any\n  ) => FunctionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ne: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'activationStatus'\n      | 'appId'\n      | 'functionExtensionName',\n    value: any\n  ) => FunctionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ge: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'appId'\n      | 'functionExtensionName',\n    value: any\n  ) => FunctionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  gt: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'appId'\n      | 'functionExtensionName',\n    value: any\n  ) => FunctionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  le: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'appId'\n      | 'functionExtensionName',\n    value: any\n  ) => FunctionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  lt: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'appId'\n      | 'functionExtensionName',\n    value: any\n  ) => FunctionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `string`.\n   * @param string - String to compare against. Case-insensitive.\n   */\n  startsWith: (\n    propertyName:\n      | '_id'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'appId'\n      | 'functionExtensionName',\n    value: string\n  ) => FunctionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   */\n  hasSome: (propertyName: string, value: any[]) => FunctionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   */\n  hasAll: (propertyName: string, value: any[]) => FunctionsQueryBuilder;\n  in: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'activationStatus'\n      | 'appId'\n      | 'functionExtensionName',\n    value: any\n  ) => FunctionsQueryBuilder;\n  exists: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'activationStatus'\n      | 'appId'\n      | 'functionExtensionName',\n    value: boolean\n  ) => FunctionsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n  ascending: (\n    ...propertyNames: Array<\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'activationStatus'\n      | 'appId'\n      | 'functionExtensionName'\n    >\n  ) => FunctionsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n  descending: (\n    ...propertyNames: Array<\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'functionExtensionId'\n      | 'functionName'\n      | 'activationStatus'\n      | 'appId'\n      | 'functionExtensionName'\n    >\n  ) => FunctionsQueryBuilder;\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n  limit: (limit: number) => FunctionsQueryBuilder;\n  /** @param cursor - A pointer to specific record */\n  skipTo: (cursor: string) => FunctionsQueryBuilder;\n  find: () => Promise<FunctionsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.functions.api.v1.Functions.QueryFunctions\n * @requiredField query\n */\nexport async function typedQueryFunctions(\n  query: _FunctionQuery\n): Promise<\n  NonNullablePaths<\n    QueryFunctionsResponse,\n    `functions` | `functions.${number}.activationStatus`,\n    2\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n  const reqOpts = ambassadorWixFunctionsV1Function.queryFunctions(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  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['query']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface _FunctionQuerySpec extends QuerySpec {\n  paging: 'cursor';\n  wql: [\n    {\n      fields: [\n        '_createdDate',\n        '_id',\n        '_updatedDate',\n        'activationStatus',\n        'appId',\n        'functionExtensionId',\n        'functionExtensionName',\n        'functionName'\n      ];\n      operators: '*';\n      sort: 'BOTH';\n    }\n  ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n  _Function,\n  _FunctionQuerySpec\n>;\nexport type _FunctionQuery = {\n  /** \n  Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  \n  */\n  cursorPaging?: {\n    /** \n  Maximum number of items to return in the results. \n  @max: 100 \n  */\n    limit?:\n      | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n      | null;\n    /** \n  Pointer to the next or previous page in the list of results.\n\n  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n  Not relevant for the first request. \n  @maxLength: 16000 \n  */\n    cursor?:\n      | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n      | null;\n  };\n  /** \n  Filter object in the following format:\n  `\"filter\" : {\n  \"fieldName1\": \"value1\",\n  \"fieldName2\":{\"$operator\":\"value2\"}\n  }`\n  Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  \n  */\n  filter?: CommonQueryWithEntityContext['filter'] | null;\n  /** \n  Sort object in the following format:\n  `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n  @maxSize: 5 \n  */\n  sort?: {\n    /** \n  Name of the field to sort by. \n  @maxLength: 512 \n  */\n    fieldName?: NonNullable<\n      CommonQueryWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n  }[];\n};\n\nexport const utils = {\n  query: /*#__PURE__*/ createQueryUtils<\n    _Function,\n    _FunctionQuerySpec,\n    _FunctionQuery\n  >(),\n};\n\n/**\n * Synchronously update tags on multiple functions.\n * A tag that appears both the list to assign and the list to unassign tags, will be assigned.\n * @param ids - IDs of functions to update tags for.\n * @public\n * @requiredField ids\n * @requiredField options.assignTags\n * @permissionId FUNCTIONS.FUNCTION_UPDATE_TAGS\n * @applicableIdentity APP\n * @fqn wix.functions.api.v1.Functions.BulkUpdateFunctionTags\n */\nexport async function bulkUpdateFunctionTags(\n  ids: string[],\n  options?: NonNullablePaths<BulkUpdateFunctionTagsOptions, `assignTags`, 0>\n): Promise<\n  NonNullablePaths<\n    BulkUpdateFunctionTagsResponse,\n    | `results`\n    | `results.${number}.itemMetadata.originalIndex`\n    | `results.${number}.itemMetadata.success`\n    | `results.${number}.itemMetadata.error.code`\n    | `results.${number}.itemMetadata.error.description`\n    | `bulkActionMetadata.totalSuccesses`\n    | `bulkActionMetadata.totalFailures`\n    | `bulkActionMetadata.undetailedFailures`,\n    4\n  > & {\n    __applicationErrorsType?: BulkUpdateFunctionTagsApplicationErrors;\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    ids: ids,\n    assignTags: options?.assignTags,\n    unassignTags: options?.unassignTags,\n  });\n\n  const reqOpts =\n    ambassadorWixFunctionsV1Function.bulkUpdateFunctionTags(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  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          ids: '$[0]',\n          assignTags: '$[1].assignTags',\n          unassignTags: '$[1].unassignTags',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['ids', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkUpdateFunctionTagsOptions {\n  /** List of tags to assign. */\n  assignTags: Tags;\n  /** List of tags to unassign. */\n  unassignTags?: Tags;\n}\n\n/**\n * Asynchronously update tags on multiple functions.\n * An empty filter updates all functions.\n * A tag that appears both the list to assign and the list to unassign tags, will be assigned.\n * @param filter - Filter.\n * @public\n * @requiredField filter\n * @requiredField options.assignTags\n * @permissionId FUNCTIONS.FUNCTION_UPDATE_TAGS\n * @applicableIdentity APP\n * @fqn wix.functions.api.v1.Functions.BulkUpdateFunctionTagsByFilter\n */\nexport async function bulkUpdateFunctionTagsByFilter(\n  filter: Record<string, any>,\n  options?: NonNullablePaths<\n    BulkUpdateFunctionTagsByFilterOptions,\n    `assignTags`,\n    0\n  >\n): Promise<\n  NonNullablePaths<BulkUpdateFunctionTagsByFilterResponse, `jobId`, 0> & {\n    __applicationErrorsType?: BulkUpdateFunctionTagsByFilterApplicationErrors;\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    filter: filter,\n    assignTags: options?.assignTags,\n    unassignTags: options?.unassignTags,\n  });\n\n  const reqOpts =\n    ambassadorWixFunctionsV1Function.bulkUpdateFunctionTagsByFilter(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  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          filter: '$[0]',\n          assignTags: '$[1].assignTags',\n          unassignTags: '$[1].unassignTags',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['filter', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkUpdateFunctionTagsByFilterOptions {\n  /** List of tags to assign. */\n  assignTags: Tags;\n  /** List of tags to unassign. */\n  unassignTags?: Tags;\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-function-functions.types';\n\nfunction resolveWixFunctionsApiV1FunctionsUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/functions/v1/functions',\n        destPath: '/v1/functions',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/functions/v1/functions',\n        destPath: '/v1/functions',\n      },\n      {\n        srcPath: '/functions/v1/bulk/functions',\n        destPath: '/v1/bulk/functions',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/functions/v1/functions',\n        destPath: '/v1/functions',\n      },\n      {\n        srcPath: '/functions/v1/bulk/functions',\n        destPath: '/v1/bulk/functions',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/functions/v1/functions',\n        destPath: '/v1/functions',\n      },\n      {\n        srcPath: '/functions/v1/bulk/functions',\n        destPath: '/v1/bulk/functions',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_functions_functions';\n\n/**\n * Creates a function with the specified configuration. After creation, you'll need to attach automation logic using the Function Methods API and configure any required service plugin settings before the function can be activated.\n *\n * This isn't the recommended way to create a function. 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 */\nexport function createFunction(payload: object): RequestOptionsFactory<any> {\n  function __createFunction({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'function.createdDate' },\n          { path: 'function.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.function',\n      method: 'POST' as any,\n      methodFqn: 'wix.functions.api.v1.Functions.CreateFunction',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsApiV1FunctionsUrl({\n        protoPath: '/v1/functions',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'function.createdDate' },\n              { path: 'function.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createFunction;\n}\n\n/** Retrieves a function. */\nexport function getFunction(payload: object): RequestOptionsFactory<any> {\n  function __getFunction({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.function',\n      method: 'GET' as any,\n      methodFqn: 'wix.functions.api.v1.Functions.GetFunction',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsApiV1FunctionsUrl({\n        protoPath: '/v1/functions/{functionId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'function.createdDate' },\n              { path: 'function.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getFunction;\n}\n\n/**\n * Updates a function.\n *\n * Each time the function is updated,\n * `revision` increments by 1.\n * The existing `revision` must be passed when updating the function.\n * This ensures you're working with the latest version of the function\n * and prevents unintended overwrites.\n */\nexport function updateFunction(payload: object): RequestOptionsFactory<any> {\n  function __updateFunction({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'function.createdDate' },\n          { path: 'function.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.function',\n      method: 'PATCH' as any,\n      methodFqn: 'wix.functions.api.v1.Functions.UpdateFunction',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsApiV1FunctionsUrl({\n        protoPath: '/v1/functions/{function.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: 'function.createdDate' },\n              { path: 'function.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateFunction;\n}\n\n/**\n * Deletes a function.\n *\n * Deleting a function permanently removes it from the Function List\n * in the site's dashboard.\n */\nexport function deleteFunction(payload: object): RequestOptionsFactory<any> {\n  function __deleteFunction({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.function',\n      method: 'DELETE' as any,\n      methodFqn: 'wix.functions.api.v1.Functions.DeleteFunction',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsApiV1FunctionsUrl({\n        protoPath: '/v1/functions/{functionId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deleteFunction;\n}\n\n/**\n * Creates a query to retrieve a list of functions.\n *\n * The Query Functions method builds a query to retrieve a list of functions and returns a `FunctionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `FunctionsQueryBuilder` methods onto the query. `FunctionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Functions returns.\n *\n * Query Functions has a default paging limit of 50, which you can override.\n *\n *  For a full description of the item object, see the object returned for the `items` property in `FunctionsQueryResult`.\n */\nexport function queryFunctions(payload: object): RequestOptionsFactory<any> {\n  function __queryFunctions({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.function',\n      method: 'GET' as any,\n      methodFqn: 'wix.functions.api.v1.Functions.QueryFunctions',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsApiV1FunctionsUrl({\n        protoPath: '/v1/functions/query',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload, true),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'functions.createdDate' },\n              { path: 'functions.updatedDate' },\n            ],\n          },\n        ]),\n      fallback: [\n        {\n          method: 'POST' as any,\n          url: resolveWixFunctionsApiV1FunctionsUrl({\n            protoPath: '/v1/functions/query',\n            data: payload,\n            host,\n          }),\n          data: payload,\n        },\n      ],\n    };\n\n    return metadata;\n  }\n\n  return __queryFunctions;\n}\n\n/**\n * Synchronously update tags on multiple functions.\n * A tag that appears both the list to assign and the list to unassign tags, will be assigned.\n */\nexport function bulkUpdateFunctionTags(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkUpdateFunctionTags({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.function',\n      method: 'POST' as any,\n      methodFqn: 'wix.functions.api.v1.Functions.BulkUpdateFunctionTags',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsApiV1FunctionsUrl({\n        protoPath: '/v1/bulk/functions/bulk-update-tags',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkUpdateFunctionTags;\n}\n\n/**\n * Asynchronously update tags on multiple functions.\n * An empty filter updates all functions.\n * A tag that appears both the list to assign and the list to unassign tags, will be assigned.\n */\nexport function bulkUpdateFunctionTagsByFilter(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkUpdateFunctionTagsByFilter({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.functions.v1.function',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.functions.api.v1.Functions.BulkUpdateFunctionTagsByFilter',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixFunctionsApiV1FunctionsUrl({\n        protoPath: '/v1/bulk/functions/update-tags-by-filter',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkUpdateFunctionTagsByFilter;\n}\n","import {\n  createFunction as publicCreateFunction,\n  getFunction as publicGetFunction,\n  updateFunction as publicUpdateFunction,\n  deleteFunction as publicDeleteFunction,\n  queryFunctions as publicQueryFunctions,\n  typedQueryFunctions as publicTypedQueryFunctions,\n  bulkUpdateFunctionTags as publicBulkUpdateFunctionTags,\n  bulkUpdateFunctionTagsByFilter as publicBulkUpdateFunctionTagsByFilter,\n} from './functions-v1-function-functions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n  BuildRESTFunction,\n  MaybeContext,\n  BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n  FunctionsQueryBuilder,\n  _FunctionQuery,\n  typedQueryFunctions as universalTypedQueryFunctions,\n} from './functions-v1-function-functions.universal.js';\nimport { onFunctionCreated as publicOnFunctionCreated } from './functions-v1-function-functions.public.js';\nimport { onFunctionDeleted as publicOnFunctionDeleted } from './functions-v1-function-functions.public.js';\nimport { onFunctionTagsModified as publicOnFunctionTagsModified } from './functions-v1-function-functions.public.js';\nimport { onFunctionUpdated as publicOnFunctionUpdated } from './functions-v1-function-functions.public.js';\n\nfunction customQueryFunctions(httpClient: HttpClient) {\n  const router = /*#__PURE__*/ createQueryOverloadRouter({\n    builderQueryFunction: () => publicQueryFunctions(httpClient)(),\n    typedQueryFunction: (query: _FunctionQuery) =>\n      publicTypedQueryFunctions(httpClient)(query),\n    hasOptionsParameter: false,\n  });\n\n  function overloadedQuery(): FunctionsQueryBuilder;\n  function overloadedQuery(\n    query: _FunctionQuery\n  ): ReturnType<typeof universalTypedQueryFunctions>;\n  function overloadedQuery(query?: _FunctionQuery): any {\n    return router(...arguments);\n  }\n\n  return overloadedQuery;\n}\n\nexport const createFunction: MaybeContext<\n  BuildRESTFunction<typeof publicCreateFunction> & typeof publicCreateFunction\n> = /*#__PURE__*/ createRESTModule(publicCreateFunction);\nexport const getFunction: MaybeContext<\n  BuildRESTFunction<typeof publicGetFunction> & typeof publicGetFunction\n> = /*#__PURE__*/ createRESTModule(publicGetFunction);\nexport const updateFunction: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateFunction> & typeof publicUpdateFunction\n> = /*#__PURE__*/ createRESTModule(publicUpdateFunction);\nexport const deleteFunction: MaybeContext<\n  BuildRESTFunction<typeof publicDeleteFunction> & typeof publicDeleteFunction\n> = /*#__PURE__*/ createRESTModule(publicDeleteFunction);\nexport const bulkUpdateFunctionTags: MaybeContext<\n  BuildRESTFunction<typeof publicBulkUpdateFunctionTags> &\n    typeof publicBulkUpdateFunctionTags\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateFunctionTags);\nexport const bulkUpdateFunctionTagsByFilter: MaybeContext<\n  BuildRESTFunction<typeof publicBulkUpdateFunctionTagsByFilter> &\n    typeof publicBulkUpdateFunctionTagsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateFunctionTagsByFilter);\nexport const queryFunctions: MaybeContext<\n  BuildRESTFunction<typeof customQueryFunctions> & typeof customQueryFunctions\n> = /*#__PURE__*/ createRESTModule(customQueryFunctions);\n/**\n * Triggered when a function is created.\n */\nexport const onFunctionCreated: BuildEventDefinition<\n  typeof publicOnFunctionCreated\n> &\n  typeof publicOnFunctionCreated = /*#__PURE__*/ createEventModule(\n  publicOnFunctionCreated\n);\n/**\n * Triggered when a function is deleted.\n */\nexport const onFunctionDeleted: BuildEventDefinition<\n  typeof publicOnFunctionDeleted\n> &\n  typeof publicOnFunctionDeleted = /*#__PURE__*/ createEventModule(\n  publicOnFunctionDeleted\n);\n/**\n * Triggered when tags are modified.\n */\nexport const onFunctionTagsModified: BuildEventDefinition<\n  typeof publicOnFunctionTagsModified\n> &\n  typeof publicOnFunctionTagsModified = /*#__PURE__*/ createEventModule(\n  publicOnFunctionTagsModified\n);\n/**\n * Triggered when a function is updated.\n */\nexport const onFunctionUpdated: BuildEventDefinition<\n  typeof publicOnFunctionUpdated\n> &\n  typeof publicOnFunctionUpdated = /*#__PURE__*/ createEventModule(\n  publicOnFunctionUpdated\n);\n\nexport {\n  ActivationStatus,\n  SortOrder,\n  WebhookIdentityType,\n} from './functions-v1-function-functions.universal.js';\nexport {\n  _Function,\n  Tags,\n  TagList,\n  DraftDiscarded,\n  TagsModified,\n  CreateFunctionRequest,\n  CreateFunctionResponse,\n  GetFunctionRequest,\n  GetFunctionResponse,\n  UpdateFunctionRequest,\n  UpdateFunctionResponse,\n  DeleteFunctionRequest,\n  DeleteFunctionResponse,\n  QueryFunctionsRequest,\n  CursorQuery,\n  CursorQueryPagingMethodOneOf,\n  Sorting,\n  CursorPaging,\n  QueryFunctionsResponse,\n  CursorPagingMetadata,\n  Cursors,\n  ListValuesByFieldRequest,\n  ListValuesByFieldResponse,\n  FieldAndCount,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  Empty,\n  UpdateFunctionExternalIdsRequest,\n  UpdateFunctionExternalIdsResponse,\n  BulkUpdateFunctionTagsRequest,\n  BulkUpdateFunctionTagsResponse,\n  ItemMetadata,\n  ApplicationError,\n  BulkUpdateFunctionTagsResult,\n  BulkActionMetadata,\n  BulkUpdateFunctionTagsByFilterRequest,\n  BulkUpdateFunctionTagsByFilterResponse,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  FunctionCreatedEnvelope,\n  FunctionDeletedEnvelope,\n  FunctionTagsModifiedEnvelope,\n  FunctionUpdatedEnvelope,\n  UpdateFunction,\n  FunctionsQueryResult,\n  FunctionsQueryBuilder,\n  _FunctionQuerySpec,\n  BulkUpdateFunctionTagsOptions,\n  BulkUpdateFunctionTagsByFilterOptions,\n} from './functions-v1-function-functions.universal.js';\nexport { utils } from './functions-v1-function-functions.universal.js';\nexport {\n  ActivationStatusWithLiterals,\n  SortOrderWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n  BulkUpdateFunctionTagsApplicationErrors,\n  BulkUpdateFunctionTagsByFilterApplicationErrors,\n  CommonQueryWithEntityContext,\n  _FunctionQuery,\n} from './functions-v1-function-functions.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAK3B,SAAS,qCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UA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AAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,eAEK,iCAAiBA,YAAiB;AAC7C,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,kCAGK,iCAAiBA,+BAAoC;AAChE,IAAMP,kBAEK,iCAAiB,oBAAoB;AAIhD,IAAMQ,qBAGoC;AAAA,EAC/C;AACF;AAIO,IAAMC,qBAGoC;AAAA,EAC/C;AACF;AAIO,IAAMC,0BAGyC;AAAA,EACpD;AACF;AAIO,IAAMC,qBAGoC;AAAA,EAC/C;AACF;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","transformPaths","ActivationStatus","SortOrder","WebhookIdentityType","createFunction","getFunction","updateFunction","deleteFunction","queryFunctions","bulkUpdateFunctionTags","bulkUpdateFunctionTagsByFilter","createFunction","getFunction","updateFunction","deleteFunction","queryFunctions","typedQueryFunctions","bulkUpdateFunctionTags","bulkUpdateFunctionTagsByFilter","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","queryFunctions","typedQueryFunctions","createFunction","getFunction","updateFunction","deleteFunction","bulkUpdateFunctionTags","bulkUpdateFunctionTagsByFilter","onFunctionCreated","onFunctionDeleted","onFunctionTagsModified","onFunctionUpdated"]}