import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; /** * Customizations include options and modifiers which can later be applied to products. * Options are designed to add variations to a product, where modifiers add a customizable change to the product but without creating another variant. */ interface Customization extends CustomizationCustomizationSettingsOneOf { /** * Free text input settings. * * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`. * @immutable */ freeTextInput?: FreeTextSettings; /** * Choices settings. * * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`. */ choicesSettings?: ChoicesSettings; /** * Customization ID. * @minLength 1 * @maxLength 36 * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the customization is updated. * To prevent conflicting changes, * the current revision must be passed when updating the customization. * * Ignored when creating a customization. * @readonly */ revision?: string | null; /** * Date and time the customization was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the customization was updated. * @readonly */ _updatedDate?: Date | null; /** * A read-only identifier generated from the customization name. * * Use `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration). * @readonly * @minLength 1 * @maxLength 50 */ key?: string | null; /** * Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`). * @minLength 1 * @maxLength 50 */ name?: string; /** * Customization type. * @immutable */ customizationType?: CustomizationTypeWithLiterals; /** * Customization render type. * * Defines how the customization will be displayed in the storefront. * @immutable */ customizationRenderType?: CustomizationRenderTypeWithLiterals; /** * Number of products this customization is assigned to. * > **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests. * @readonly */ assignedProductsCount?: number | null; } /** @oneof */ interface CustomizationCustomizationSettingsOneOf { /** * Free text input settings. * * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`. * @immutable */ freeTextInput?: FreeTextSettings; /** * Choices settings. * * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`. */ choicesSettings?: ChoicesSettings; } declare enum CustomizationType { PRODUCT_OPTION = "PRODUCT_OPTION", MODIFIER = "MODIFIER" } /** @enumType */ type CustomizationTypeWithLiterals = CustomizationType | 'PRODUCT_OPTION' | 'MODIFIER'; declare enum CustomizationRenderType { /** Customization by free text input. */ FREE_TEXT = "FREE_TEXT", /** Customization by selection of text choices. */ TEXT_CHOICES = "TEXT_CHOICES", /** Customization by selection of colors. */ SWATCH_CHOICES = "SWATCH_CHOICES" } /** @enumType */ type CustomizationRenderTypeWithLiterals = CustomizationRenderType | 'FREE_TEXT' | 'TEXT_CHOICES' | 'SWATCH_CHOICES'; interface FreeTextSettings { /** Minimum text character length. */ minCharCount?: number; /** * Maximum text character length. * @max 500 */ maxCharCount?: number; /** * Default amount added to a product's price when this choice is assigned to a modifier. * @decimalValue options { gte:0, lte:999999999, maxScale:3 } */ defaultAddedPrice?: string | null; /** * Title to display to customer for their free-text input. * @minLength 1 * @maxLength 100 */ title?: string; /** * A read-only identifier generated from the title. * * Use `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration). * @readonly * @minLength 1 * @maxLength 150 */ key?: string | null; } /** Settings for choice-based customizations. */ interface ChoicesSettings { /** * List of choices. * @minSize 1 * @maxSize 200 * @immutable */ choices?: Choice[]; } interface Choice extends ChoiceValueOneOf { /** * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color). * @minLength 3 * @maxLength 20 * @format COLOR_HEX */ colorCode?: string; /** * Choice ID. * @format GUID * @readonly */ _id?: string; /** * Choice type. * * > **Notes:** * > + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`. * > + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`. * @immutable */ choiceType?: ChoiceTypeWithLiterals; /** * A read-only identifier generated from the choice name. * * Use `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration). * @readonly * @minLength 1 * @maxLength 50 */ key?: string | null; /** * Choice name. * @minLength 1 * @maxLength 50 */ name?: string; /** * Default amount added to a product's price when this customization is assigned to a modifier. * @decimalValue options { gte:0, lte:999999999, maxScale:3 } */ defaultAddedPrice?: string | null; } /** @oneof */ interface ChoiceValueOneOf { /** * Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color). * @minLength 3 * @maxLength 20 * @format COLOR_HEX */ colorCode?: string; } declare enum ChoiceType { /** For a `customizationRenderType` of `TEXT_CHOICES`. */ CHOICE_TEXT = "CHOICE_TEXT", /** For `customizationRenderType: SWATCH_CHOICES`. */ ONE_COLOR = "ONE_COLOR" } /** @enumType */ type ChoiceTypeWithLiterals = ChoiceType | 'CHOICE_TEXT' | 'ONE_COLOR'; interface MultipleColors { /** * A list of color codes. * @minLength 3 * @maxLength 20 * @minSize 2 * @maxSize 2 */ colorCodes?: string[]; } interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } declare enum ChoiceSortStrategy { /** Default. Text choices are sorted by name, swatch choices are sorted by product count. */ DEFAULT = "DEFAULT", /** Alphabetically by name, case-insensitive. Numeric values are sorted first. */ BY_NAME = "BY_NAME", /** By the number of products assigned to each choice, in descending order. */ BY_PRODUCT_COUNT = "BY_PRODUCT_COUNT", /** By the order of the choices list. Use [Reorder Customization Choices](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/customizations-v3/reorder-customization-choices) to set the order. */ MANUAL = "MANUAL" } /** @enumType */ type ChoiceSortStrategyWithLiterals = ChoiceSortStrategy | 'DEFAULT' | 'BY_NAME' | 'BY_PRODUCT_COUNT' | 'MANUAL'; interface InvalidateCache extends InvalidateCacheGetByOneOf { /** * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ metaSiteId?: string; /** * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ siteId?: string; /** Invalidate by App */ app?: App; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */ customTag?: CustomTag; /** Invalidate by multiple page ids */ pages?: Pages; /** Invalidate by multiple URI paths */ uris?: URIs; /** * tell us why you're invalidating the cache. You don't need to add your app name * @maxLength 256 */ reason?: string | null; /** Is local DS */ localDc?: boolean; hardPurge?: boolean; /** * Optional caller-provided ID for tracking this invalidation through the system. * When set, the corresponding CDN purge completion event will include this ID, * allowing you to confirm when the invalidation has fully propagated. * Example: generate a UUID, pass it here, and later match it in the CDN purge completion event. * @maxLength 256 */ correlationId?: string | null; } /** @oneof */ interface InvalidateCacheGetByOneOf { /** * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ metaSiteId?: string; /** * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ siteId?: string; /** Invalidate by App */ app?: App; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */ customTag?: CustomTag; /** Invalidate by multiple page ids */ pages?: Pages; /** Invalidate by multiple URI paths */ uris?: URIs; } interface App { /** * The AppDefId * @minLength 1 */ appDefId?: string; /** * The instance Id * @format GUID */ instanceId?: string; } interface Page { /** * the msid the page is on * @format GUID */ metaSiteId?: string; /** * Invalidate by Page ID * @minLength 1 */ pageId?: string; } interface URI { /** * the msid the URI is on * @format GUID */ metaSiteId?: string; /** * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes * @minLength 1 */ uriPath?: string; } interface File { /** * the msid the file is related to * @format GUID */ metaSiteId?: string; /** * Invalidate by filename (for media files such as PDFs) * @minLength 1 * @maxLength 256 */ fileName?: string; } interface CustomTag { /** * the msid the tag is related to * @format GUID */ metaSiteId?: string; /** * Tag to invalidate by * @minLength 1 * @maxLength 256 */ tag?: string; } interface Pages { /** * the msid the pages are on * @format GUID */ metaSiteId?: string; /** * Invalidate by multiple Page IDs in a single message * @maxSize 100 * @minLength 1 */ pageIds?: string[]; } interface URIs { /** * the msid the URIs are on * @format GUID */ metaSiteId?: string; /** * URI paths to invalidate (e.g. page/my/path) - without leading/trailing slashes * @maxSize 100 * @minLength 1 */ uriPaths?: string[]; } interface CreateCustomizationRequest { /** Customization to create. */ customization: Customization; } interface CreateCustomizationResponse { /** Created customization. */ customization?: Customization; } interface GetCustomizationRequest { /** * Customization ID. * @format GUID */ customizationId: string; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } declare enum RequestedFields { /** Assigned products count. */ ASSIGNED_PRODUCTS_COUNT = "ASSIGNED_PRODUCTS_COUNT" } /** @enumType */ type RequestedFieldsWithLiterals = RequestedFields | 'ASSIGNED_PRODUCTS_COUNT'; interface GetCustomizationResponse { /** Customization. */ customization?: Customization; } interface UpdateCustomizationRequest { /** Customization to update. */ customization: Customization; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface UpdateCustomizationResponse { /** Updated customization. */ customization?: Customization; } interface DeleteCustomizationRequest { /** * Customization ID. * @format GUID */ customizationId: string; } interface DeleteCustomizationResponse { } interface QueryCustomizationsRequest { /** Query options. */ query?: CursorQuery; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } 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 { /** Ascending order. */ ASC = "ASC", /** Descending order. */ 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 QueryCustomizationsResponse { /** * List of customizations. * @minSize 1 * @maxSize 200 */ customizations?: Customization[]; /** Details on the paged set of results returned. */ 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 BulkCreateCustomizationsRequest { /** * Customizations to create. * @minSize 1 * @maxSize 100 */ customizations: Customization[]; /** * Whether to return the full customization entities in the response. * * Default: `false` */ returnEntity?: boolean; } interface BulkCreateCustomizationsResponse { /** * Customizations created by bulk action. * @minSize 1 * @maxSize 100 */ results?: BulkCustomizationResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkCustomizationResult { /** Bulk action metadata for customization. */ itemMetadata?: ItemMetadata; /** * Full customization entity. * * Returned only if `returnEntity: true` is passed in the request. */ customization?: Customization; } interface ItemMetadata { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). * @minLength 1 * @maxLength 36 */ _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 was successful for this item. When `false`, the `error` field is populated. */ 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 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 CustomizationIdsWrapper { /** * list of all the customization ids that are invalid * e.g list of failed choices ids * @minSize 1 * @maxSize 100 * @minLength 1 * @maxLength 36 */ customizationIds?: string[]; } interface BulkCreateCustomizationsForMigrationRequest { /** * Customizations to create. * @minSize 1 * @maxSize 100 */ customizations?: Customization[]; /** * Whether to return the full customization entities in the response. * * Default: `false` */ returnEntity?: boolean; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface BulkCreateCustomizationsForMigrationResponse { /** * Customizations created by bulk action. * @minSize 1 * @maxSize 100 */ results?: BulkCustomizationResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface AddCustomizationChoicesRequest { /** * Customization ID. * @format GUID */ customizationId: string; /** * Choices to add. * @minSize 1 * @maxSize 100 */ choices: Choice[]; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface AddCustomizationChoicesResponse { /** Updated customization. */ customization?: Customization; } interface SetCustomizationChoicesRequest { /** * Customization ID. * @format GUID */ customizationId: string; /** * Choices to set. * @minSize 1 * @maxSize 200 */ choices: Choice[]; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface SetCustomizationChoicesResponse { /** Updated customization. */ customization?: Customization; } interface RemoveCustomizationChoicesRequest { /** * Customization ID. * @format GUID */ customizationId: string; /** * IDs of choices to remove. * @format GUID * @minSize 1 * @maxSize 100 */ choiceIds: string[]; /** Customization revision. */ revision?: string; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface RemoveCustomizationChoicesResponse { /** Updated customization. */ customization?: Customization; } interface UpdateCustomizationChoicesRequest { /** * Customization ID. * @format GUID */ customizationId: string; /** * Revision number, which increments by 1 each time the customization is updated. * To prevent conflicting changes, * the current revision must be passed when updating the customization. */ revision: string; /** * Choices to update. Each item must include a `choice` with a valid `id` matching an existing choice in the customization. * @minSize 1 * @maxSize 100 */ choices: MaskedChoice[]; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface MaskedChoice { /** Choice to update. */ choice?: Choice; } interface UpdateCustomizationChoicesResponse { /** Updated customization. */ customization?: Customization; } interface ReorderCustomizationChoicesRequest { /** * Customization ID. * @format GUID */ customizationId: string; /** Revision number, which increments by 1 each time the customization is updated. To prevent conflicting changes, the current revision must be passed when updating the customization. */ revision: string; /** * Choice IDs in the desired display order. Must contain exactly the same set of IDs as the customization's current choices — no additions or removals. * @format GUID * @minSize 1 * @maxSize 200 */ choiceIds: string[]; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface ReorderCustomizationChoicesResponse { /** Updated customization. */ customization?: Customization; } /** Additional error details returned with the `CHOICE_IDS_MISMATCH` error. */ interface ChoiceIdsMismatchData { /** Choice IDs that exist in the customization but are missing from the request. */ missingIds?: string[]; /** Choice IDs included in the request that don't exist in the customization. */ extraIds?: string[]; } interface BulkAddCustomizationChoicesRequest { /** * List of customization IDs and choices. * @minSize 1 * @maxSize 100 */ customizationsChoices: CustomizationChoices[]; /** * Whether to return the full customization entities in the response. * * Default: `false` */ returnEntity?: boolean; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface CustomizationChoices { /** * Customization ID. * @minLength 1 * @maxLength 36 */ customizationId?: string; /** * Choices to add. * @minSize 1 * @maxSize 100 */ choices?: Choice[]; } interface BulkAddCustomizationChoicesResponse { /** * Customizations updated by bulk action. * @minSize 1 * @maxSize 100 */ results?: BulkCustomizationResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkUpdateCustomizationsRequest { /** * List of customizations to update. * @minSize 1 * @maxSize 100 */ customizations: MaskedCustomization[]; /** * Whether to return the full customization entities in the response. * * Default: `false` */ returnEntity?: boolean; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface MaskedCustomization { /** Customization to update. */ customization?: Customization; } interface BulkUpdateCustomizationsResponse { /** * Customizations updated by bulk action. * @minSize 1 * @maxSize 100 */ results?: BulkCustomizationResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } 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 { entity?: string; } 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. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface Empty { } interface RecloneSiteRequest { /** @format GUID */ cloneFrom?: string; } interface RecloneSiteResponse { } 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 CreateCustomizationApplicationErrors = { code?: 'OPTIONS_LIMIT_EXCEEDED'; description?: string; data?: Record; } | { code?: 'MODIFIERS_LIMIT_EXCEEDED'; description?: string; data?: Record; } | { code?: 'INVALID_CUSTOMIZATION_RENDER_TYPE'; description?: string; data?: Record; } | { code?: 'INVALID_FREE_TEXT_SETTINGS'; description?: string; data?: Record; }; /** @docsIgnore */ type CreateCustomizationValidationErrors = { ruleName?: 'ONLY_SPACES_STRING_ERROR'; } | { ruleName?: 'DUPLICATE_CHOICE_NAME'; } | { ruleName?: 'CUSTOMIZATION_WITH_ONLY_ID_OR_CHOICE_IDS'; } | { ruleName?: 'MIXED_CHOICE_IDS_CONSISTENCY'; } | { ruleName?: 'ID_NOT_ALLOWED_IN_REQUEST'; } | { ruleName?: 'PRIMARY_CHOICE_SELF_REFERENCE'; } | { ruleName?: 'PRIMARY_CHOICE_NOT_FOUND'; } | { ruleName?: 'PRIMARY_CHOICE_HIERARCHY_VIOLATION'; }; /** @docsIgnore */ type DeleteCustomizationValidationErrors = { ruleName?: 'NOT_ALLOWED_DELETE_CUSTOMIZATION_ASSIGNED_TO_PRODUCT'; }; /** @docsIgnore */ type BulkCreateCustomizationsApplicationErrors = { code?: 'OPTIONS_LIMIT_EXCEEDED'; description?: string; data?: Record; } | { code?: 'MODIFIERS_LIMIT_EXCEEDED'; description?: string; data?: Record; } | { code?: 'DOESNT_SUPPORT_CHOICES'; description?: string; data?: Record; } | { code?: 'CHOICES_LIMIT_EXCEEDED'; description?: string; data?: CustomizationIdsWrapper; }; /** @docsIgnore */ type BulkCreateCustomizationsValidationErrors = { ruleName?: 'ONLY_SPACES_STRING_ERROR'; } | { ruleName?: 'INVALID_CHOICE_TYPE'; } | { ruleName?: 'DUPLICATE_CHOICE_NAME'; } | { ruleName?: 'INVALID_CHOICE_VALUE'; } | { ruleName?: 'CUSTOMIZATION_WITH_ONLY_ID_OR_CHOICE_IDS'; } | { ruleName?: 'MIXED_CHOICE_IDS_CONSISTENCY'; } | { ruleName?: 'ID_NOT_ALLOWED_IN_REQUEST'; } | { ruleName?: 'PRIMARY_CHOICE_SELF_REFERENCE'; } | { ruleName?: 'PRIMARY_CHOICE_NOT_FOUND'; } | { ruleName?: 'PRIMARY_CHOICE_HIERARCHY_VIOLATION'; }; /** @docsIgnore */ type AddCustomizationChoicesApplicationErrors = { code?: 'CHOICES_LIMIT_EXCEEDED'; description?: string; data?: Record; } | { code?: 'DOESNT_SUPPORT_CHOICES'; description?: string; data?: Record; }; /** @docsIgnore */ type AddCustomizationChoicesValidationErrors = { ruleName?: 'INVALID_CHOICE_TYPE'; } | { ruleName?: 'INVALID_CHOICE_VALUE'; } | { ruleName?: 'DUPLICATE_CHOICE_NAME'; } | { ruleName?: 'PRIMARY_CHOICE_SELF_REFERENCE'; } | { ruleName?: 'PRIMARY_CHOICE_NOT_FOUND'; } | { ruleName?: 'PRIMARY_CHOICE_HIERARCHY_VIOLATION'; }; /** @docsIgnore */ type SetCustomizationChoicesApplicationErrors = { code?: 'DOESNT_SUPPORT_CHOICES'; description?: string; data?: Record; } | { code?: 'CHOICES_LIMIT_EXCEEDED'; description?: string; data?: CustomizationIdsWrapper; }; /** @docsIgnore */ type SetCustomizationChoicesValidationErrors = { ruleName?: 'INVALID_CHOICE_TYPE'; } | { ruleName?: 'INVALID_CHOICE_VALUE'; } | { ruleName?: 'NOT_ALLOWED_DELETE_CHOICE_ASSIGNED_TO_PRODUCT'; } | { ruleName?: 'DUPLICATE_CHOICE_NAME'; } | { ruleName?: 'PRIMARY_CHOICE_SELF_REFERENCE'; } | { ruleName?: 'PRIMARY_CHOICE_NOT_FOUND'; } | { ruleName?: 'PRIMARY_CHOICE_HIERARCHY_VIOLATION'; }; /** @docsIgnore */ type RemoveCustomizationChoicesApplicationErrors = { code?: 'CHOICE_ASSIGNED_TO_PRODUCT'; description?: string; data?: Record; }; /** @docsIgnore */ type RemoveCustomizationChoicesValidationErrors = { ruleName?: 'NOT_ALLOWED_CUSTOMIZATION_WITHOUT_CHOICES'; } | { ruleName?: 'PRIMARY_CHOICE_DELETE_REFERENCED'; }; /** @docsIgnore */ type UpdateCustomizationChoicesApplicationErrors = { code?: 'CHOICE_NOT_FOUND'; description?: string; data?: Record; }; /** @docsIgnore */ type UpdateCustomizationChoicesValidationErrors = { ruleName?: 'UNSUPPORTED_CHOICE_FIELD'; } | { ruleName?: 'PRIMARY_CHOICE_SELF_REFERENCE'; } | { ruleName?: 'PRIMARY_CHOICE_NOT_FOUND'; } | { ruleName?: 'PRIMARY_CHOICE_HIERARCHY_VIOLATION'; }; /** @docsIgnore */ type ReorderCustomizationChoicesApplicationErrors = { code?: 'DOESNT_SUPPORT_CHOICES'; description?: string; data?: Record; } | { code?: 'CHOICE_IDS_MISMATCH'; description?: string; data?: ChoiceIdsMismatchData; }; /** @docsIgnore */ type BulkAddCustomizationChoicesApplicationErrors = { code?: 'CHOICES_LIMIT_EXCEEDED'; description?: string; data?: CustomizationIdsWrapper; } | { code?: 'DOESNT_SUPPORT_CHOICES'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkAddCustomizationChoicesValidationErrors = { ruleName?: 'INVALID_CHOICE_TYPE'; } | { ruleName?: 'INVALID_CHOICE_VALUE'; } | { ruleName?: 'PRIMARY_CHOICE_SELF_REFERENCE'; } | { ruleName?: 'PRIMARY_CHOICE_NOT_FOUND'; } | { ruleName?: 'PRIMARY_CHOICE_HIERARCHY_VIOLATION'; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** 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; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface CustomizationCreatedEnvelope { entity: Customization; metadata: EventMetadata; } /** * Triggered when a customization is created. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read customizations in v3 catalog (PII) * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ_LIMITED * @permissionScope Read v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_READ * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Read Products * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Read customizations in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @permissionScope Read v3 catalog (PII) * @permissionScopeId SCOPE.STORES.CATALOG_READ_LIMITED * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId WIX_STORES.CUSTOMIZATION_READ * @webhook * @eventType wix.stores.catalog.v3.customization_created * @serviceIdentifier wix.stores.catalog.customization.v3.CustomizationService * @slug created */ declare function onCustomizationCreated(handler: (event: CustomizationCreatedEnvelope) => void | Promise): void; interface CustomizationDeletedEnvelope { entity: Customization; metadata: EventMetadata; } /** * Triggered when a customization is deleted. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read customizations in v3 catalog (PII) * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ_LIMITED * @permissionScope Read v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_READ * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Read Products * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Read customizations in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @permissionScope Read v3 catalog (PII) * @permissionScopeId SCOPE.STORES.CATALOG_READ_LIMITED * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId WIX_STORES.CUSTOMIZATION_READ * @webhook * @eventType wix.stores.catalog.v3.customization_deleted * @serviceIdentifier wix.stores.catalog.customization.v3.CustomizationService * @slug deleted */ declare function onCustomizationDeleted(handler: (event: CustomizationDeletedEnvelope) => void | Promise): void; interface CustomizationUpdatedEnvelope { entity: Customization; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when a customization is updated. * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read customizations in v3 catalog (PII) * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ_LIMITED * @permissionScope Read v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_READ * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Read Products * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Read customizations in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @permissionScope Read v3 catalog (PII) * @permissionScopeId SCOPE.STORES.CATALOG_READ_LIMITED * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId WIX_STORES.CUSTOMIZATION_READ * @webhook * @eventType wix.stores.catalog.v3.customization_updated * @serviceIdentifier wix.stores.catalog.customization.v3.CustomizationService * @slug updated */ declare function onCustomizationUpdated(handler: (event: CustomizationUpdatedEnvelope) => void | Promise): void; /** * Creates a customization. * @param customization - Customization to create. * @public * @requiredField customization * @requiredField customization.choicesSettings.choices * @requiredField customization.customizationRenderType * @requiredField customization.customizationSettings * @requiredField customization.customizationType * @requiredField customization.name * @permissionId WIX_STORES.CUSTOMIZATION_CREATE * @applicableIdentity APP * @returns Created customization. * @fqn wix.stores.catalog.customization.v3.CustomizationService.CreateCustomization */ declare function createCustomization(customization: NonNullablePaths): Promise & { __applicationErrorsType?: CreateCustomizationApplicationErrors; __validationErrorsType?: CreateCustomizationValidationErrors; }>; /** * Retrieves a customization. * @param customizationId - Customization ID. * @public * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_READ * @applicableIdentity APP * @returns Customization. * @fqn wix.stores.catalog.customization.v3.CustomizationService.GetCustomization */ declare function getCustomization(customizationId: string, options?: GetCustomizationOptions): Promise>; interface GetCustomizationOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } /** * Updates a customization. * * Each time the customization is updated, `revision` increments by 1. * The current `revision` must be passed when updating the customization. * This ensures you're working with the latest customization and prevents unintended overwrites. * @param _id - Customization ID. * @public * @requiredField _id * @requiredField customization * @requiredField customization.revision * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @applicableIdentity APP * @returns Updated customization. * @fqn wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomization */ declare function updateCustomization(_id: string, customization: NonNullablePaths, options?: UpdateCustomizationOptions): Promise>; interface UpdateCustomization { /** * Free text input settings. * * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`. * @immutable */ freeTextInput?: FreeTextSettings; /** * Choices settings. * * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`. */ choicesSettings?: ChoicesSettings; /** * Customization ID. * @minLength 1 * @maxLength 36 * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the customization is updated. * To prevent conflicting changes, * the current revision must be passed when updating the customization. * * Ignored when creating a customization. * @readonly */ revision?: string | null; /** * Date and time the customization was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the customization was updated. * @readonly */ _updatedDate?: Date | null; /** * A read-only identifier generated from the customization name. * * Use `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration). * @readonly * @minLength 1 * @maxLength 50 */ key?: string | null; /** * Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`). * @minLength 1 * @maxLength 50 */ name?: string; /** * Customization type. * @immutable */ customizationType?: CustomizationTypeWithLiterals; /** * Customization render type. * * Defines how the customization will be displayed in the storefront. * @immutable */ customizationRenderType?: CustomizationRenderTypeWithLiterals; /** * Number of products this customization is assigned to. * > **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests. * @readonly */ assignedProductsCount?: number | null; } interface UpdateCustomizationOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } /** * Deletes a customization. * * > **Notes:** * > + **Options** (customizations with `customizationType: PRODUCT_OPTION`) can't be deleted while assigned to any product because they affect product variants and inventory. * > + **Modifiers** can be deleted freely. When deleted, they are automatically removed from all products that reference them. * @param customizationId - Customization ID. * @public * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_DELETE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.DeleteCustomization */ declare function deleteCustomization(customizationId: string): Promise; /** * Retrieves a list of up to 100 customizations, given the provided filtering, sorting, and cursor paging. * Pass supported values to the `fields` array in the request to include those fields in the response. * * * Query Customizations runs with these defaults, which you can override: * * - `createdDate` is sorted in `DESC` order * - `cursorPaging.limit` is `100` * * To learn about working with _Query_ endpoints, see * [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), * and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging). * @public * @permissionId WIX_STORES.CUSTOMIZATION_READ * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.QueryCustomizations */ declare function queryCustomizations(options?: QueryCustomizationsOptions): CustomizationsQueryBuilder; interface QueryCustomizationsOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[] | undefined; } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface CustomizationsQueryResult extends QueryCursorResult { items: Customization[]; query: CustomizationsQueryBuilder; next: () => Promise; prev: () => Promise; } interface CustomizationsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: '_id' | 'name', value: string) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any[]) => CustomizationsQueryBuilder; in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any) => CustomizationsQueryBuilder; exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: boolean) => CustomizationsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'name'>) => CustomizationsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'name'>) => CustomizationsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => CustomizationsQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => CustomizationsQueryBuilder; find: () => Promise; } /** * @hidden * @fqn wix.stores.catalog.customization.v3.CustomizationService.QueryCustomizations * @requiredField query */ declare function typedQueryCustomizations(query: CustomizationQuery, options?: QueryCustomizationsOptions): Promise>; interface CustomizationQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['_createdDate', '_id', '_updatedDate', 'name']; operators: '*'; sort: 'BOTH'; }, { fields: ['customizationRenderType', 'customizationType']; operators: '*'; sort: 'NONE'; } ]; } type CommonQueryWithEntityContext = Query; type CustomizationQuery = { /** 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?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | 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?: NonNullable['cursor'] | null; }; /** 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?: CommonQueryWithEntityContext['filter'] | null; /** Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` @maxSize: 5 */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; /** * Creates multiple customizations. * @param customizations - Customizations to create. * @public * @requiredField customizations * @permissionId WIX_STORES.CUSTOMIZATION_CREATE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkCreateCustomizations */ declare function bulkCreateCustomizations(customizations: Customization[], options?: BulkCreateCustomizationsOptions): Promise & { __applicationErrorsType?: BulkCreateCustomizationsApplicationErrors; __validationErrorsType?: BulkCreateCustomizationsValidationErrors; }>; interface BulkCreateCustomizationsOptions { /** * Whether to return the full customization entities in the response. * * Default: `false` */ returnEntity?: boolean; } /** * Adds choices to a customization. * @param customizationId - Customization ID. * @param choices - Choices to add. * @public * @requiredField choices * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.AddCustomizationChoices */ declare function addCustomizationChoices(customizationId: string, choices: Choice[], options?: AddCustomizationChoicesOptions): Promise & { __applicationErrorsType?: AddCustomizationChoicesApplicationErrors; __validationErrorsType?: AddCustomizationChoicesValidationErrors; }>; interface AddCustomizationChoicesOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } /** * Sets a customization's choices. Any and all existing choices will be overridden. * * > **Note:** A choice cannot be overridden if it is assigned to one or more products. * @param customizationId - Customization ID. * @param choices - Choices to set. * @public * @requiredField choices * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.SetCustomizationChoices */ declare function setCustomizationChoices(customizationId: string, choices: Choice[], options?: SetCustomizationChoicesOptions): Promise & { __applicationErrorsType?: SetCustomizationChoicesApplicationErrors; __validationErrorsType?: SetCustomizationChoicesValidationErrors; }>; interface SetCustomizationChoicesOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } /** * Removes choices from a customization. * * > **Note:** A choice can't be removed if it's assigned to one or more product variants. This applies to option choices only; modifier choices can be removed freely. * @param customizationId - Customization ID. * @param choiceIds - IDs of choices to remove. * @public * @requiredField choiceIds * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.RemoveCustomizationChoices */ declare function removeCustomizationChoices(customizationId: string, choiceIds: string[], options?: RemoveCustomizationChoicesOptions): Promise & { __applicationErrorsType?: RemoveCustomizationChoicesApplicationErrors; __validationErrorsType?: RemoveCustomizationChoicesValidationErrors; }>; interface RemoveCustomizationChoicesOptions { /** Customization revision. */ revision?: string; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface UpdateCustomizationChoicesOptions { /** * Choices to update. Each item must include a `choice` with a valid `id` matching an existing choice in the customization. * @minSize 1 * @maxSize 100 */ choices: MaskedChoice[]; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } interface ReorderCustomizationChoicesOptions { /** * Choice IDs in the desired display order. Must contain exactly the same set of IDs as the customization's current choices — no additions or removals. * @format GUID * @minSize 1 * @maxSize 200 */ choiceIds: string[]; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } /** * Adds choices to multiple customizations. * @param customizationsChoices - List of customization IDs and choices. * @public * @requiredField customizationsChoices * @requiredField customizationsChoices.choices * @requiredField customizationsChoices.customizationId * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkAddCustomizationChoices */ declare function bulkAddCustomizationChoices(customizationsChoices: NonNullablePaths[], options?: BulkAddCustomizationChoicesOptions): Promise & { __applicationErrorsType?: BulkAddCustomizationChoicesApplicationErrors; __validationErrorsType?: BulkAddCustomizationChoicesValidationErrors; }>; interface BulkAddCustomizationChoicesOptions { /** * Whether to return the full customization entities in the response. * * Default: `false` */ returnEntity?: boolean; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } /** * Updates multiple customizations. * * Each time the customization is updated, `revision` increments by 1. * The current `revision` must be passed when updating the customization. * This ensures you're working with the latest customization and prevents unintended overwrites. * @param customizations - List of customizations to update. * @public * @requiredField customizations * @requiredField customizations.customization._id * @requiredField customizations.customization.name * @requiredField customizations.customization.revision * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkUpdateCustomizations */ declare function bulkUpdateCustomizations(customizations: NonNullablePaths[], options?: BulkUpdateCustomizationsOptions): Promise>; interface BulkUpdateCustomizationsOptions { /** * Whether to return the full customization entities in the response. * * Default: `false` */ returnEntity?: boolean; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` * @maxSize 100 */ fields?: RequestedFieldsWithLiterals[]; } export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddCustomizationChoicesApplicationErrors, type AddCustomizationChoicesOptions, type AddCustomizationChoicesRequest, type AddCustomizationChoicesResponse, type AddCustomizationChoicesValidationErrors, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkAddCustomizationChoicesApplicationErrors, type BulkAddCustomizationChoicesOptions, type BulkAddCustomizationChoicesRequest, type BulkAddCustomizationChoicesResponse, type BulkAddCustomizationChoicesValidationErrors, type BulkCreateCustomizationsApplicationErrors, type BulkCreateCustomizationsForMigrationRequest, type BulkCreateCustomizationsForMigrationResponse, type BulkCreateCustomizationsOptions, type BulkCreateCustomizationsRequest, type BulkCreateCustomizationsResponse, type BulkCreateCustomizationsValidationErrors, type BulkCustomizationResult, type BulkUpdateCustomizationsOptions, type BulkUpdateCustomizationsRequest, type BulkUpdateCustomizationsResponse, type Choice, type ChoiceIdsMismatchData, ChoiceSortStrategy, type ChoiceSortStrategyWithLiterals, ChoiceType, type ChoiceTypeWithLiterals, type ChoiceValueOneOf, type ChoicesSettings, type CommonQueryWithEntityContext, type CreateCustomizationApplicationErrors, type CreateCustomizationRequest, type CreateCustomizationResponse, type CreateCustomizationValidationErrors, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type Customization, type CustomizationChoices, type CustomizationCreatedEnvelope, type CustomizationCustomizationSettingsOneOf, type CustomizationDeletedEnvelope, type CustomizationIdsWrapper, type CustomizationQuery, type CustomizationQuerySpec, CustomizationRenderType, type CustomizationRenderTypeWithLiterals, CustomizationType, type CustomizationTypeWithLiterals, type CustomizationUpdatedEnvelope, type CustomizationsQueryBuilder, type CustomizationsQueryResult, type DeleteCustomizationRequest, type DeleteCustomizationResponse, type DeleteCustomizationValidationErrors, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type FocalPoint, type FreeTextSettings, type GetCustomizationOptions, type GetCustomizationRequest, type GetCustomizationResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type MaskedChoice, type MaskedCustomization, type MessageEnvelope, type MultipleColors, type Page, type Pages, type QueryCustomizationsOptions, type QueryCustomizationsRequest, type QueryCustomizationsResponse, type RecloneSiteRequest, type RecloneSiteResponse, type RemoveCustomizationChoicesApplicationErrors, type RemoveCustomizationChoicesOptions, type RemoveCustomizationChoicesRequest, type RemoveCustomizationChoicesResponse, type RemoveCustomizationChoicesValidationErrors, type ReorderCustomizationChoicesApplicationErrors, type ReorderCustomizationChoicesOptions, type ReorderCustomizationChoicesRequest, type ReorderCustomizationChoicesResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type SetCustomizationChoicesApplicationErrors, type SetCustomizationChoicesOptions, type SetCustomizationChoicesRequest, type SetCustomizationChoicesResponse, type SetCustomizationChoicesValidationErrors, SortOrder, type SortOrderWithLiterals, type Sorting, type URI, type URIs, type UpdateCustomization, type UpdateCustomizationChoicesApplicationErrors, type UpdateCustomizationChoicesOptions, type UpdateCustomizationChoicesRequest, type UpdateCustomizationChoicesResponse, type UpdateCustomizationChoicesValidationErrors, type UpdateCustomizationOptions, type UpdateCustomizationRequest, type UpdateCustomizationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, setCustomizationChoices, typedQueryCustomizations, updateCustomization, utils };