/** * 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. */ export interface Customization extends CustomizationCustomizationSettingsOneOf { /** * Free text input settings. * * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`. */ freeTextInput?: FreeTextSettings; /** * Choices settings. * * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`. */ choicesSettings?: ChoicesSettings; /** * Customization ID. * @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; /** Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`). */ name?: string; /** Customization type. */ customizationType?: CustomizationType; /** * Customization render type. * * Defines how the customization will be displayed in the storefront. */ customizationRenderType?: CustomizationRenderType; /** * 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 */ export interface CustomizationCustomizationSettingsOneOf { /** * Free text input settings. * * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`. */ freeTextInput?: FreeTextSettings; /** * Choices settings. * * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`. */ choicesSettings?: ChoicesSettings; } export declare enum CustomizationType { UNKNOWN_CUSTOMIZATION_TYPE = "UNKNOWN_CUSTOMIZATION_TYPE", PRODUCT_OPTION = "PRODUCT_OPTION", MODIFIER = "MODIFIER" } export declare enum CustomizationRenderType { UNKNOWN_CUSTOMIZATION_RENDER_TYPE = "UNKNOWN_CUSTOMIZATION_RENDER_TYPE", FREE_TEXT = "FREE_TEXT", TEXT_CHOICES = "TEXT_CHOICES", SWATCH_CHOICES = "SWATCH_CHOICES" } export interface FreeTextSettings { /** Minimum text character length. */ minCharCount?: number; /** Maximum text character length. */ maxCharCount?: number; /** Default amount added to a product's price when this choice is assigned to a modifier. */ defaultAddedPrice?: string | null; /** Title to display to customer for their free-text input. */ title?: string; } export interface ChoicesSettings { /** List of choices. */ choices?: Choice[]; } export interface Choice extends ChoiceValueOneOf { /** Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color). */ colorCode?: string; /** * Choice ID. * @readonly */ _id?: string; /** * Choice type. * * > **Notes:** * > + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` values are: `ONE_COLOR`, `MULTIPLE_COLORS`, or `IMAGE`. * > + For a `customizationRenderType` of `TEXT_CHOICES` and `FREE_TEXT`, the supported `choiceType` value is: `CHOICE_TEXT`. */ choiceType?: ChoiceType; /** * A read-only key generated based on choice name. Used for eCommerce integration. * @readonly */ key?: string | null; /** Choice name. */ name?: string; /** Default amount added to a product's price when this customization is assigned to a modifier. */ defaultAddedPrice?: string | null; /** * Number of products this choice is assigned to . * @readonly */ assignedProductsCount?: number; } /** @oneof */ export interface ChoiceValueOneOf { /** Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color). */ colorCode?: string; } export declare enum ChoiceType { UNKNOWN_CHOICE_TYPE = "UNKNOWN_CHOICE_TYPE", /** For a `customizationRenderType` of `TEXT_CHOICES` and `FREE_TEXT`. */ CHOICE_TEXT = "CHOICE_TEXT", /** For `customizationRenderType: SWATCH_CHOICES`. */ ONE_COLOR = "ONE_COLOR", /** For `customizationRenderType: SWATCH_CHOICES`. */ MULTIPLE_COLORS = "MULTIPLE_COLORS", /** For `customizationRenderType: SWATCH_CHOICES`. */ IMAGE = "IMAGE" } export interface MultipleColors { /** A list of color codes. */ colorCodes?: string[]; } export 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; } export interface InvalidateCache extends InvalidateCacheGetByOneOf { /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */ metaSiteId?: string; /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */ 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; /** tell us why you're invalidating the cache. You don't need to add your app name */ reason?: string | null; /** Is local DS */ localDc?: boolean; hardPurge?: boolean; } /** @oneof */ export interface InvalidateCacheGetByOneOf { /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */ metaSiteId?: string; /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */ 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; } export interface App { /** The AppDefId */ appDefId?: string; /** The instance Id */ instanceId?: string; } export interface Page { /** the msid the page is on */ metaSiteId?: string; /** Invalidate by Page ID */ pageId?: string; } export interface URI { /** the msid the URI is on */ metaSiteId?: string; /** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */ uriPath?: string; } export interface File { /** the msid the file is related to */ metaSiteId?: string; /** Invalidate by filename (for media files such as PDFs) */ fileName?: string; } export interface CreateCustomizationRequest { /** Customization to create. */ customization: Customization; } export interface CreateCustomizationResponse { /** Created customization. */ customization?: Customization; } export interface GetCustomizationRequest { /** Customization ID. */ customizationId: string; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } export declare enum RequestedFields { /** Unknown requested field. */ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD", /** Assigned products count. */ ASSIGNED_PRODUCTS_COUNT = "ASSIGNED_PRODUCTS_COUNT" } export interface GetCustomizationResponse { /** Customization. */ customization?: Customization; } export interface UpdateCustomizationRequest { /** Customization to update. */ customization: Customization; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } export interface UpdateCustomizationResponse { /** Updated customization. */ customization?: Customization; } export interface DeleteCustomizationRequest { /** Customization ID. */ customizationId: string; } export interface DeleteCustomizationResponse { } export interface QueryCustomizationsRequest { /** Query options. */ query?: CursorQuery; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } export 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"}]` */ sort?: Sorting[]; } /** @oneof */ export 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; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { /** Ascending order. */ ASC = "ASC", /** Descending order. */ DESC = "DESC" } export interface CursorPaging { /** Maximum number of items to return in the results. */ 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. */ cursor?: string | null; } export interface QueryCustomizationsResponse { /** List of customizations. */ customizations?: Customization[]; /** Details on the paged set of results returned. */ pagingMetadata?: CursorPagingMetadata; } export 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; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export interface BulkCreateCustomizationsRequest { /** Customizations to create. */ customizations: Customization[]; /** * Whether to return the full customization entities in the response. * * Default: `false` */ returnEntity?: boolean; } export interface BulkCreateCustomizationsResponse { /** Customizations created by bulk action. */ results?: BulkCustomizationResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } export interface BulkCustomizationResult { /** Bulk action metadata for customization. */ itemMetadata?: ItemMetadata; /** * Full customization entity. * * Returned only if `returnEntity: true` is passed in the request. */ customization?: Customization; } export interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _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; } export interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } export 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; } export interface CustomizationIdsWrapper { /** * list of all the customization ids that are invalid * e.g list of failed choices ids */ customizationIds?: string[]; } export interface AddCustomizationChoicesRequest { /** Customization ID. */ customizationId: string; /** Choices to add. */ choices: Choice[]; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } export interface AddCustomizationChoicesResponse { /** Updated customization. */ customization?: Customization; } export interface SetCustomizationChoicesRequest { /** Customization ID. */ customizationId: string; /** Choices to set. */ choices: Choice[]; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } export interface SetCustomizationChoicesResponse { /** Updated customization. */ customization?: Customization; } export interface RemoveCustomizationChoicesRequest { /** Customization ID. */ customizationId: string; /** IDs of choices to remove. */ choiceIds: string[]; /** Customization revision. */ revision?: string; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } export interface RemoveCustomizationChoicesResponse { /** Updated customization. */ customization?: Customization; } export interface BulkAddCustomizationChoicesRequest { /** List of customization IDs and choices. */ 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` */ fields?: RequestedFields[]; } export interface CustomizationChoices { /** Customization ID. */ customizationId?: string; /** Choices to add. */ choices?: Choice[]; } export interface BulkAddCustomizationChoicesResponse { /** Customizations updated by bulk action. */ results?: BulkCustomizationResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } export interface BulkUpdateCustomizationsRequest { /** List of customizations to update. */ 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` */ fields?: RequestedFields[]; } export interface MaskedCustomization { /** Customization to update. */ customization?: Customization; } export interface BulkUpdateCustomizationsResponse { /** Customizations updated by bulk action. */ results?: BulkCustomizationResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * 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 defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export interface RestoreInfo { deletedDate?: Date | null; } export 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; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface Empty { } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface FreeTextSettingsNonNullableFields { minCharCount: number; maxCharCount: number; title: string; } interface MultipleColorsNonNullableFields { colorCodes: string[]; } interface ChoiceNonNullableFields { colorCode: string; colorCodes?: MultipleColorsNonNullableFields; image: string; _id: string; choiceType: ChoiceType; name: string; assignedProductsCount: number; } interface ChoicesSettingsNonNullableFields { choices: ChoiceNonNullableFields[]; } export interface CustomizationNonNullableFields { freeTextInput?: FreeTextSettingsNonNullableFields; choicesSettings?: ChoicesSettingsNonNullableFields; name: string; customizationType: CustomizationType; customizationRenderType: CustomizationRenderType; } export interface CreateCustomizationResponseNonNullableFields { customization?: CustomizationNonNullableFields; } export interface GetCustomizationResponseNonNullableFields { customization?: CustomizationNonNullableFields; } export interface UpdateCustomizationResponseNonNullableFields { customization?: CustomizationNonNullableFields; } export interface QueryCustomizationsResponseNonNullableFields { customizations: CustomizationNonNullableFields[]; } interface ApplicationErrorNonNullableFields { code: string; description: string; } interface ItemMetadataNonNullableFields { originalIndex: number; success: boolean; error?: ApplicationErrorNonNullableFields; } interface BulkCustomizationResultNonNullableFields { itemMetadata?: ItemMetadataNonNullableFields; customization?: CustomizationNonNullableFields; } interface BulkActionMetadataNonNullableFields { totalSuccesses: number; totalFailures: number; undetailedFailures: number; } export interface BulkCreateCustomizationsResponseNonNullableFields { results: BulkCustomizationResultNonNullableFields[]; bulkActionMetadata?: BulkActionMetadataNonNullableFields; } export interface AddCustomizationChoicesResponseNonNullableFields { customization?: CustomizationNonNullableFields; } export interface SetCustomizationChoicesResponseNonNullableFields { customization?: CustomizationNonNullableFields; } export interface RemoveCustomizationChoicesResponseNonNullableFields { customization?: CustomizationNonNullableFields; } export interface BulkAddCustomizationChoicesResponseNonNullableFields { results: BulkCustomizationResultNonNullableFields[]; bulkActionMetadata?: BulkActionMetadataNonNullableFields; } export interface BulkUpdateCustomizationsResponseNonNullableFields { results: BulkCustomizationResultNonNullableFields[]; bulkActionMetadata?: BulkActionMetadataNonNullableFields; } export interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } export interface EventMetadata extends BaseEventMetadata { /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * 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 defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } export interface CustomizationCreatedEnvelope { entity: Customization; metadata: EventMetadata; } /** * Triggered when a customization is created. * @permissionScope Read v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_READ * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Read Products * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS * @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 Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId WIX_STORES.CUSTOMIZATION_READ * @webhook * @eventType wix.stores.catalog.v3.customization_created * @documentationMaturity preview */ export declare function onCustomizationCreated(handler: (event: CustomizationCreatedEnvelope) => void | Promise): void; export interface CustomizationDeletedEnvelope { entity: Customization; metadata: EventMetadata; } /** * Triggered when a customization is deleted. * @webhook * @eventType wix.stores.catalog.v3.customization_deleted * @documentationMaturity preview */ export declare function onCustomizationDeleted(handler: (event: CustomizationDeletedEnvelope) => void | Promise): void; export interface CustomizationUpdatedEnvelope { entity: Customization; metadata: EventMetadata; } /** * Triggered when a customization is updated. * @webhook * @eventType wix.stores.catalog.v3.customization_updated * @documentationMaturity preview */ export declare function onCustomizationUpdated(handler: (event: CustomizationUpdatedEnvelope) => void | Promise): void; /** * Creates a customization. * @param customization - Customization to create. * @public * @documentationMaturity preview * @requiredField customization * @requiredField customization.choicesSettings.choices * @requiredField customization.customizationRenderType * @requiredField customization.customizationType * @requiredField customization.freeTextInput.title * @requiredField customization.name * @permissionId WIX_STORES.CUSTOMIZATION_CREATE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @returns Created customization. * @fqn wix.stores.catalog.customization.v3.CustomizationService.CreateCustomization */ export declare function createCustomization(customization: Customization): Promise; /** * Retrieves a customization. * @param customizationId - Customization ID. * @public * @documentationMaturity preview * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_READ * @permissionScope Read v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_READ * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Read Products * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS * @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 Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @applicableIdentity APP * @applicableIdentity VISITOR * @returns Customization. * @fqn wix.stores.catalog.customization.v3.CustomizationService.GetCustomization */ export declare function getCustomization(customizationId: string, options?: GetCustomizationOptions): Promise; export interface GetCustomizationOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } /** * 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 * @documentationMaturity preview * @requiredField _id * @requiredField customization * @requiredField customization.revision * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @returns Updated customization. * @fqn wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomization */ export declare function updateCustomization(_id: string | null, customization: UpdateCustomization, options?: UpdateCustomizationOptions): Promise; export interface UpdateCustomization { /** * Free text input settings. * * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`. */ freeTextInput?: FreeTextSettings; /** * Choices settings. * * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`. */ choicesSettings?: ChoicesSettings; /** * Customization ID. * @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; /** Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`). */ name?: string; /** Customization type. */ customizationType?: CustomizationType; /** * Customization render type. * * Defines how the customization will be displayed in the storefront. */ customizationRenderType?: CustomizationRenderType; /** * 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; } export interface UpdateCustomizationOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } /** * Deletes a customization. * * > **Note:** A customization cannot be deleted if it is assigned to one or more products. * @param customizationId - Customization ID. * @public * @documentationMaturity preview * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_DELETE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.DeleteCustomization */ export 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` * * For field support for filters and sorting, * see [Customizations: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/customizations-v3/supported-filters-and-sorting). * * To learn about working with _Query_ endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). * @public * @documentationMaturity preview * @permissionScope Read v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_READ * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Read Products * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS * @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 Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId WIX_STORES.CUSTOMIZATION_READ * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn wix.stores.catalog.customization.v3.CustomizationService.QueryCustomizations */ export declare function queryCustomizations(options?: QueryCustomizationsOptions): CustomizationsQueryBuilder; export interface QueryCustomizationsOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[] | undefined; } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } export interface CustomizationsQueryResult extends QueryCursorResult { items: Customization[]; query: CustomizationsQueryBuilder; next: () => Promise; prev: () => Promise; } export interface CustomizationsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ 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. * @documentationMaturity preview */ 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. * @documentationMaturity preview */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'name', value: string) => CustomizationsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any[]) => CustomizationsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any) => CustomizationsQueryBuilder; /** @documentationMaturity preview */ 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. * @documentationMaturity preview */ 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. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'name'>) => CustomizationsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => CustomizationsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => CustomizationsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Creates multiple brands. * @param customizations - Customizations to create. * @public * @documentationMaturity preview * @requiredField customizations * @permissionId WIX_STORES.CUSTOMIZATION_CREATE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkCreateCustomizations */ export declare function bulkCreateCustomizations(customizations: Customization[], options?: BulkCreateCustomizationsOptions): Promise; export 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 * @documentationMaturity preview * @requiredField choices * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.AddCustomizationChoices */ export declare function addCustomizationChoices(customizationId: string, choices: Choice[], options?: AddCustomizationChoicesOptions): Promise; export interface AddCustomizationChoicesOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } /** * 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 * @documentationMaturity preview * @requiredField choices * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.SetCustomizationChoices */ export declare function setCustomizationChoices(customizationId: string, choices: Choice[], options?: SetCustomizationChoicesOptions): Promise; export interface SetCustomizationChoicesOptions { /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } /** * Removes choices from a customization. * * +> **Note:** A choice cannot be removed if it is assigned to one or more products. * @param customizationId - Customization ID. * @param choiceIds - IDs of choices to remove. * @public * @documentationMaturity preview * @requiredField choiceIds * @requiredField customizationId * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.RemoveCustomizationChoices */ export declare function removeCustomizationChoices(customizationId: string, choiceIds: string[], options?: RemoveCustomizationChoicesOptions): Promise; export interface RemoveCustomizationChoicesOptions { /** Customization revision. */ revision?: string; /** * Fields to include in the response. * * Supported values: `ASSIGNED_PRODUCTS_COUNT` */ fields?: RequestedFields[]; } /** * Adds choices to multiple customizations. * @param customizationsChoices - List of customization IDs and choices. * @public * @documentationMaturity preview * @requiredField customizationsChoices * @requiredField customizationsChoices.choices * @requiredField customizationsChoices.customizationId * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkAddCustomizationChoices */ export declare function bulkAddCustomizationChoices(customizationsChoices: CustomizationChoices[], options?: BulkAddCustomizationChoicesOptions): Promise; export 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` */ fields?: RequestedFields[]; } /** * 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 * @documentationMaturity preview * @requiredField customizations * @requiredField customizations.customization._id * @requiredField customizations.customization.name * @requiredField customizations.customization.revision * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE * @permissionScope Customization write in v3 catalog * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE * @permissionScope Manage Products * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS * @permissionScope Product write in v3 catalog * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE * @permissionScope Manage v3 catalog * @permissionScopeId SCOPE.STORES.CATALOG_WRITE * @applicableIdentity APP * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkUpdateCustomizations */ export declare function bulkUpdateCustomizations(customizations: MaskedCustomization[], options?: BulkUpdateCustomizationsOptions): Promise; export 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` */ fields?: RequestedFields[]; } export {};