import { CreateFunctionRequest as CreateFunctionRequest$1, CreateFunctionResponse as CreateFunctionResponse$1, GetFunctionRequest as GetFunctionRequest$1, GetFunctionResponse as GetFunctionResponse$1, UpdateFunctionRequest as UpdateFunctionRequest$1, UpdateFunctionResponse as UpdateFunctionResponse$1, DeleteFunctionRequest as DeleteFunctionRequest$1, DeleteFunctionResponse as DeleteFunctionResponse$1, QueryFunctionsRequest as QueryFunctionsRequest$1, QueryFunctionsResponse as QueryFunctionsResponse$1, BulkUpdateFunctionTagsRequest as BulkUpdateFunctionTagsRequest$1, BulkUpdateFunctionTagsResponse as BulkUpdateFunctionTagsResponse$1, BulkUpdateFunctionTagsByFilterRequest as BulkUpdateFunctionTagsByFilterRequest$1, BulkUpdateFunctionTagsByFilterResponse as BulkUpdateFunctionTagsByFilterResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** 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). */ interface _Function { /** * Function ID. * @format GUID * @readonly */ id?: string | null; /** * Revision number, which increments by 1 each time the function is updated. * To prevent conflicting changes, * the current revision must be passed when updating the function. * * Ignored when creating a function. * @readonly */ revision?: string | null; /** * Date and time the function was created. * @readonly */ createdDate?: Date | null; /** * Date and time the function was last updated. * @readonly */ updatedDate?: Date | null; /** * ID of the function type that defines when and how the function runs. This is the function type that the function is based on. * @format GUID */ functionExtensionId?: string | null; /** * Display name for the function in the dashboard's function builder. * @maxLength 100 */ functionName?: string | null; /** * Activation status. * @readonly */ activationStatus?: ActivationStatusWithLiterals; /** * ID of the Wix app that defines the function type that the function is based on. * @format GUID */ appId?: string | null; /** * Display name of the function type. * @minLength 1 * @maxLength 100 */ functionExtensionName?: string | null; /** * ID of the function template used to create this function. * @format GUID */ functionTemplateExtensionId?: string | null; /** * 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. * @format GUID */ formTemplateExtensionId?: string | null; /** Whether the function has changes that were made since it was last activated. */ hasUnpublishedChanges?: boolean | null; /** Tags assigned to the function for organization and filtering. */ tags?: Tags; } declare enum ActivationStatus { /** Function is active and runs when triggered. */ ACTIVE = "ACTIVE", /** Function is inactive and doesn't run when triggered. */ INACTIVE = "INACTIVE", /** Function is saved but has never been activated. */ DRAFT = "DRAFT" } /** @enumType */ type ActivationStatusWithLiterals = ActivationStatus | 'ACTIVE' | 'INACTIVE' | 'DRAFT'; /** * Common object for tags. * Should be use as in this example: * message Foo { * option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo"; * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * public_tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags { /** Tags that require an additional permission in order to access them, typically restricted from site members and visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone with access to the entity, including site members and visitors. */ publicTags?: TagList; } interface TagList { /** * List of tag IDs. * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } interface DraftDiscarded { /** * Function ID associated with the discarded draft * @format GUID */ functionId?: string; /** Date and time when the draft was discarded */ discardedDate?: Date | null; } interface TagsModified { /** Updated function. */ function?: _Function; /** Tags that were assigned to the Function. */ assignedTags?: Tags; /** Tags that were unassigned from the Function. */ unassignedTags?: Tags; } interface CreateFunctionRequest { /** Function to create. */ function: _Function; } interface CreateFunctionResponse { /** The created function. */ function?: _Function; } interface GetFunctionRequest { /** * ID of the function to retrieve. * @format GUID */ functionId: string; } interface GetFunctionResponse { /** The retrieved function. */ function?: _Function; } interface UpdateFunctionRequest { /** Function to update. */ function: _Function; } interface UpdateFunctionResponse { /** Updated function. */ function?: _Function; } interface DeleteFunctionRequest { /** * ID of the function to delete. * @format GUID */ functionId: string; } interface DeleteFunctionResponse { } interface QueryFunctionsRequest { /** Wix Query Language expression. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryFunctionsResponse { /** List of retrieved functions. */ functions?: _Function[]; /** Metadata for the paginated results. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface ListValuesByFieldRequest { /** * Field to list values for. * @minLength 1 * @maxLength 100 */ field?: string; } interface ListValuesByFieldResponse { /** * List of values for the field. * @maxSize 100 */ fieldAndCount?: FieldAndCount[]; } interface FieldAndCount { /** * Field value. * @minLength 1 * @maxLength 100 */ field?: string; /** Number of times the value occurs. */ count?: number; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface Empty { } interface UpdateFunctionExternalIdsRequest { /** * ID of the function to update. * @format GUID */ functionId?: string; /** * External ids to set. * @format GUID * @maxSize 100 */ externalIds?: string[]; } interface UpdateFunctionExternalIdsResponse { /** The updated function. */ function?: _Function; } interface BulkUpdateFunctionTagsRequest { /** * IDs of functions to update tags for. * @minSize 1 * @maxSize 100 * @format GUID */ ids: string[]; /** List of tags to assign. */ assignTags: Tags; /** List of tags to unassign. */ unassignTags?: Tags; } interface BulkUpdateFunctionTagsResponse { /** * Results. * @minSize 1 * @maxSize 100 */ results?: BulkUpdateFunctionTagsResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed. * @format GUID */ id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkUpdateFunctionTagsResult { /** Item metadata. */ itemMetadata?: ItemMetadata; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkUpdateFunctionTagsByFilterRequest { /** Filter. */ filter: Record | null; /** List of tags to assign. */ assignTags: Tags; /** List of tags to unassign. */ unassignTags?: Tags; } interface BulkUpdateFunctionTagsByFilterResponse { /** * Job ID for the bulk update operation. * @format GUID */ jobId?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type BulkUpdateFunctionTagsApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkUpdateFunctionTagsByFilterApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createFunction(): __PublicMethodMetaInfo<'POST', {}, CreateFunctionRequest$1, CreateFunctionRequest, CreateFunctionResponse$1, CreateFunctionResponse>; declare function getFunction(): __PublicMethodMetaInfo<'GET', { functionId: string; }, GetFunctionRequest$1, GetFunctionRequest, GetFunctionResponse$1, GetFunctionResponse>; declare function updateFunction(): __PublicMethodMetaInfo<'PATCH', { functionId: string; }, UpdateFunctionRequest$1, UpdateFunctionRequest, UpdateFunctionResponse$1, UpdateFunctionResponse>; declare function deleteFunction(): __PublicMethodMetaInfo<'DELETE', { functionId: string; }, DeleteFunctionRequest$1, DeleteFunctionRequest, DeleteFunctionResponse$1, DeleteFunctionResponse>; declare function queryFunctions(): __PublicMethodMetaInfo<'GET', {}, QueryFunctionsRequest$1, QueryFunctionsRequest, QueryFunctionsResponse$1, QueryFunctionsResponse>; declare function bulkUpdateFunctionTags(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateFunctionTagsRequest$1, BulkUpdateFunctionTagsRequest, BulkUpdateFunctionTagsResponse$1, BulkUpdateFunctionTagsResponse>; declare function bulkUpdateFunctionTagsByFilter(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateFunctionTagsByFilterRequest$1, BulkUpdateFunctionTagsByFilterRequest, BulkUpdateFunctionTagsByFilterResponse$1, BulkUpdateFunctionTagsByFilterResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, ActivationStatus as ActivationStatusOriginal, type ActivationStatusWithLiterals as ActivationStatusWithLiteralsOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkUpdateFunctionTagsApplicationErrors as BulkUpdateFunctionTagsApplicationErrorsOriginal, type BulkUpdateFunctionTagsByFilterApplicationErrors as BulkUpdateFunctionTagsByFilterApplicationErrorsOriginal, type BulkUpdateFunctionTagsByFilterRequest as BulkUpdateFunctionTagsByFilterRequestOriginal, type BulkUpdateFunctionTagsByFilterResponse as BulkUpdateFunctionTagsByFilterResponseOriginal, type BulkUpdateFunctionTagsRequest as BulkUpdateFunctionTagsRequestOriginal, type BulkUpdateFunctionTagsResponse as BulkUpdateFunctionTagsResponseOriginal, type BulkUpdateFunctionTagsResult as BulkUpdateFunctionTagsResultOriginal, type CreateFunctionRequest as CreateFunctionRequestOriginal, type CreateFunctionResponse as CreateFunctionResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteFunctionRequest as DeleteFunctionRequestOriginal, type DeleteFunctionResponse as DeleteFunctionResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type DraftDiscarded as DraftDiscardedOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type FieldAndCount as FieldAndCountOriginal, type GetFunctionRequest as GetFunctionRequestOriginal, type GetFunctionResponse as GetFunctionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type ListValuesByFieldRequest as ListValuesByFieldRequestOriginal, type ListValuesByFieldResponse as ListValuesByFieldResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type QueryFunctionsRequest as QueryFunctionsRequestOriginal, type QueryFunctionsResponse as QueryFunctionsResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type TagList as TagListOriginal, type TagsModified as TagsModifiedOriginal, type Tags as TagsOriginal, type UpdateFunctionExternalIdsRequest as UpdateFunctionExternalIdsRequestOriginal, type UpdateFunctionExternalIdsResponse as UpdateFunctionExternalIdsResponseOriginal, type UpdateFunctionRequest as UpdateFunctionRequestOriginal, type UpdateFunctionResponse as UpdateFunctionResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type _Function as _FunctionOriginal, type __PublicMethodMetaInfo, bulkUpdateFunctionTags, bulkUpdateFunctionTagsByFilter, createFunction, deleteFunction, getFunction, queryFunctions, updateFunction };