@wix/auto_sdk_ecom_catalog 1.0.26 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/{interfaces-ecommerce-v1-catalog-provider.public-BrXA1osj.d.ts → interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.d.ts} +1 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/{interfaces-ecommerce-v1-catalog-provider.public-BrXA1osj.d.mts → interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.d.mts} +1 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/{interfaces-ecommerce-v1-catalog-provider.public-BrXA1osj.d.ts → interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.d.ts} +1 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -2
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/{interfaces-ecommerce-v1-catalog-provider.public-BrXA1osj.d.mts → interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.d.mts} +1 -1
- package/package.json +3 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as provideHandlers$1 } from './interfaces-ecommerce-v1-catalog-provider.public-
|
|
2
|
-
export { J as AdditionalFee, Z as AllItemsDiscountConfig, U as BasicItem, B as BuyerInfo, b as BuyerInfoIdOneOf, a as CatalogReference, C as CatalogReferenceAndQuantity, Y as CatalogSPIConfig, l as Color, $ as Context, t as Description, D as DescriptionLine, i as DescriptionLineDescriptionLineValueOneOf, j as DescriptionLineName, m as DescriptionLineType, h as DescriptionLineValueOneOf, v as FileType, F as FreeTrialPeriod, G as GetCatalogItemsRequest, c as GetCatalogItemsResponse, o as Group, a1 as IdentificationData, a2 as IdentificationDataIdOneOf, a0 as IdentityType, I as Item, d as ItemData, N as ItemModifier, e as ItemType, g as ItemTypeItemType, f as ItemTypeItemTypeDataOneOf, M as ModifierGroup, V as NumericPropertyRange, O as Paging, X as PagingMetadata, w as PaymentOptionType, n as PhysicalProperties, k as PlainTextValue, H as Policy, y as PriceDescription, P as ProductName, Q as QueryCatalogItemsRequest, R as QueryCatalogItemsResponse, S as Scope, u as SecuredMedia, x as ServiceProperties, _ as SpecificItemsDiscountConfig, s as SubscriptionFrequency, q as SubscriptionOptionInfo, r as SubscriptionSettings, K as TaxDetails, z as TaxableAddress, A as TaxableAddressTaxableAddressDataOneOf, E as TaxableAddressType, T as Title, L as TranslatableString, W as WeightUnit } from './interfaces-ecommerce-v1-catalog-provider.public-
|
|
1
|
+
import { p as provideHandlers$1 } from './interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.js';
|
|
2
|
+
export { J as AdditionalFee, Z as AllItemsDiscountConfig, U as BasicItem, B as BuyerInfo, b as BuyerInfoIdOneOf, a as CatalogReference, C as CatalogReferenceAndQuantity, Y as CatalogSPIConfig, l as Color, $ as Context, t as Description, D as DescriptionLine, i as DescriptionLineDescriptionLineValueOneOf, j as DescriptionLineName, m as DescriptionLineType, h as DescriptionLineValueOneOf, v as FileType, F as FreeTrialPeriod, G as GetCatalogItemsRequest, c as GetCatalogItemsResponse, o as Group, a1 as IdentificationData, a2 as IdentificationDataIdOneOf, a0 as IdentityType, I as Item, d as ItemData, N as ItemModifier, e as ItemType, g as ItemTypeItemType, f as ItemTypeItemTypeDataOneOf, M as ModifierGroup, V as NumericPropertyRange, O as Paging, X as PagingMetadata, w as PaymentOptionType, n as PhysicalProperties, k as PlainTextValue, H as Policy, y as PriceDescription, P as ProductName, Q as QueryCatalogItemsRequest, R as QueryCatalogItemsResponse, S as Scope, u as SecuredMedia, x as ServiceProperties, _ as SpecificItemsDiscountConfig, s as SubscriptionFrequency, q as SubscriptionOptionInfo, r as SubscriptionSettings, K as TaxDetails, z as TaxableAddress, A as TaxableAddressTaxableAddressDataOneOf, E as TaxableAddressType, T as Title, L as TranslatableString, W as WeightUnit } from './interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.js';
|
|
3
3
|
import { BuildServicePluginDefinition } from '@wix/sdk-types';
|
|
4
4
|
|
|
5
5
|
declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1>;
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/service-plugins-types.ts","../../src/interfaces-ecommerce-v1-catalog-provider.public.ts","../../src/interfaces-ecommerce-v1-catalog-provider.context.ts"],"sourcesContent":["export * from './src/service-plugins-types.js';\nexport * from './src/interfaces-ecommerce-v1-catalog-provider.context.js';\n","export interface GetCatalogItemsRequest {\n /**\n * Catalog reference details for the items to retrieve, including quantity of each item.\n * @minSize 1\n * @maxSize 300\n */\n catalogReferences?: CatalogReferenceAndQuantity[];\n /**\n * Weight measurement unit.\n *\n * By default, Wix sends the weight unit specified in the site's settings.\n */\n weightUnit?: WeightUnit;\n /**\n * Currency to return item prices in, in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, `USD` or `EUR`.\n *\n * By default, Wix sends the currency specified in the site's settings.\n * @format CURRENCY\n */\n currency?: string;\n}\n\nexport interface CatalogReferenceAndQuantity {\n /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */\n catalogReference?: CatalogReference;\n /** Item quantity. */\n quantity?: number;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).\n */\n options?: Record<string, any> | null;\n}\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** Buyer Info */\nexport interface BuyerInfo extends BuyerInfoIdOneOf {\n /**\n * Visitor ID - if the buyer is **not** a site member.\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID - if the buyer is a site member.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * User ID - if the buyer (or cart owner) is a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string;\n /**\n * Contact ID. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).\n * @format GUID\n */\n contactId?: string | null;\n /**\n * Buyer email address.\n * @format EMAIL\n */\n email?: string | null;\n}\n\n/** @oneof */\nexport interface BuyerInfoIdOneOf {\n /**\n * Visitor ID - if the buyer is **not** a site member.\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID - if the buyer is a site member.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * User ID - if the buyer (or cart owner) is a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string;\n}\n\nexport interface GetCatalogItemsResponse {\n /**\n * Details for each item, including catalog reference details and item data. Any items that don't exist in the catalog are excluded.\n * If none of the requested items exist in the catalog, this array must be empty.\n */\n catalogItems?: Item[];\n}\n\nexport interface Item {\n /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */\n catalogReference?: CatalogReference;\n /** Item data. Contains full details about the item. */\n data?: ItemData;\n}\n\nexport interface ItemData {\n /** __Required.__ Item name. */\n productName?: ProductName;\n /**\n * URL for the item's page on the site.\n *\n * This is used to link back to the relevant item page from the cart page. If not provided, the site URL is used.\n */\n url?: string;\n /** __Required.__ Item type. Either one of the preset types or a custom type. */\n itemType?: ItemType;\n /**\n * __Required.__ Item price with discounts applied. If a catalog-defined discount applies, the discount is reflected in this price.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n price?: string;\n /**\n * Item price **before** applying any catalog-defined discount.\n *\n * Default: Value of `price` field, if no catalog-defined discount applies.\n * @format DECIMAL_VALUE\n */\n fullPrice?: string | null;\n /**\n * The tax group ID associated with this item. Learn more about the [Tax Groups Service Plugin](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/tax-groups-integration-service-plugin/introduction).\n * @format GUID\n */\n taxGroupId?: string | null;\n /**\n * Line item description lines. Used for displaying the item in a cart, checkout or order. For example, if you want `Size: Large` to appear under the item name, create a description line with `\"name\": {\"original\": \"Size\"}` and `\"plainText\": {\"original\": \"Large\"}`.\n *\n * Default: No description line.\n * @maxSize 20\n */\n descriptionLines?: DescriptionLine[];\n /**\n * Line item image details. Supports images from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-accessing-the-media-manager) only.\n *\n * To use an image from another source, first upload it to the Media Manager.\n * You can retrieve the ID, width and height of an image from the Wix Media Manager.\n */\n media?: string;\n /**\n * Quantity of the item available for purchase. Only return if the catalog manages inventory.\n * If not returned, a buyer can increase the quantity of this item to add to the cart or checkout without limit.\n * @max 100000000\n */\n quantityAvailable?: number | null;\n /** Physical properties of the item. Only return for physical items. When applicable, contains information such as SKU and item weight. */\n physicalProperties?: PhysicalProperties;\n /** Subscription option info. */\n subscriptionOptionInfo?: SubscriptionOptionInfo;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionType;\n /** Service properties. When applicable, this contains information such as time and number of participants. */\n serviceProperties?: ServiceProperties;\n /**\n * Additional ID for the item in the catalog.\n * This field provides an additional identifier for the item if your flow requires another ID as well as `catalogReference.catalogItemId`.\n * Can be used for membership validation.\n *\n * Default: Same as `catalogReference.catalogItemId`.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n /**\n * Additional description for the price. Return when additional information about the price is needed.\n *\n * For example, when `price` is `\"0\"` but additional details about the actual price are needed, such as `\"Starts at $67\"`.\n */\n priceDescription?: PriceDescription;\n /**\n * Partial payment to be paid upfront during the checkout. Return when `paymentOption` is `DEPOSIT_ONLINE`.\n *\n * Default: If `paymentOption` is `DEPOSIT_ONLINE` but `depositAmount` is not provided, the item is treated as if `paymentOption` is `FULL_PAYMENT_ONLINE`.\n * @format DECIMAL_VALUE\n */\n depositAmount?: string | null;\n /**\n * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.\n * @minLength 1\n * @maxLength 2500\n */\n consentRequiredPaymentPolicy?: string | null;\n /**\n * Whether the price is not yet defined, and will be updated after the order is created.\n *\n * Default: `false`\n */\n priceUndetermined?: boolean;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\n *\n * Default: `false`\n */\n fixedQuantity?: boolean;\n /**\n * Whether to save the payment method on the order.\n *\n * Default: `false`\n */\n savePaymentMethod?: boolean;\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Policies to be displayed to the customer on the checkout page.\n * @maxSize 5\n */\n policies?: Policy[];\n /**\n * Additional Fees to be added to this item calculation.\n * @maxSize 5\n */\n additionalFees?: AdditionalFee[];\n /**\n * Whether the item can only be purchased by site members.\n *\n * Default: `false`\n */\n membersOnly?: boolean;\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n}\n\nexport interface ProductName {\n /**\n * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * Item name translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemType;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\n/** @oneof */\nexport interface ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemType;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypeItemType {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\n}\n\nexport interface DescriptionLine\n extends DescriptionLineValueOneOf,\n DescriptionLineDescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n /** Description line name. */\n name?: DescriptionLineName;\n}\n\n/** @oneof */\nexport interface DescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n}\n\n/** @oneof */\nexport interface DescriptionLineDescriptionLineValueOneOf {}\n\nexport interface DescriptionLineName {\n /**\n * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 100\n */\n original?: string;\n /**\n * Description line name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 200\n */\n translated?: string | null;\n}\n\nexport interface PlainTextValue {\n /**\n * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 600\n */\n original?: string;\n /**\n * Description line plain text value translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 600\n */\n translated?: string | null;\n}\n\nexport interface Color {\n /**\n * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 500\n */\n original?: string;\n /**\n * Description line color name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 500\n */\n translated?: string | null;\n /** HEX or RGB color code for display. */\n code?: string | null;\n}\n\nexport enum DescriptionLineType {\n /** Unrecognized type. */\n UNRECOGNISED = 'UNRECOGNISED',\n /** Plain text type. */\n PLAIN_TEXT = 'PLAIN_TEXT',\n /** Color type. */\n COLOR = 'COLOR',\n}\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface Scope {\n /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n namespace?: string;\n /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */\n group?: Group;\n}\n\nexport interface Group {\n /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n name?: string;\n /** Item ID (when the coupon scope is limited to just one item). */\n entityId?: string | null;\n}\n\nexport interface SubscriptionOptionInfo {\n /** Subscription option settings. */\n subscriptionSettings?: SubscriptionSettings;\n /** Subscription option title. */\n title?: Title;\n /** Subscription option description. */\n description?: Description;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequency;\n /**\n * Interval of recurring payment.\n *\n * Default: `1`.\n * If SubscriptionFrequency is Day the minimum interval is 7\n * @min 1\n * @max 3650\n */\n interval?: number | null;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n * @min 1\n */\n billingCycles?: number | null;\n /** Whether to allow the customer to cancel the subscription.. */\n enableCustomerCancellation?: boolean;\n /**\n * Period until first cycle starts. If applied payNow will be 0\n * If None => no free trial\n */\n freeTrialPeriod?: FreeTrialPeriod;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\nexport interface FreeTrialPeriod {\n /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n frequency?: SubscriptionFrequency;\n /**\n * interval of period\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface Title {\n /**\n * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 150\n */\n original?: string;\n /**\n * Subscription option name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 150\n */\n translated?: string | null;\n}\n\nexport interface Description {\n /**\n * Subscription option description.\n * @maxLength 500\n */\n original?: string;\n /**\n * Translated subscription option description.\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface SecuredMedia {\n /**\n * Media ID in Wix Media Manager.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Original filename.\n * @minLength 1\n * @maxLength 1000\n */\n fileName?: string;\n /** File type. */\n fileType?: FileType;\n}\n\nexport enum FileType {\n UNSPECIFIED = 'UNSPECIFIED',\n SECURE_PICTURE = 'SECURE_PICTURE',\n SECURE_VIDEO = 'SECURE_VIDEO',\n SECURE_DOCUMENT = 'SECURE_DOCUMENT',\n SECURE_MUSIC = 'SECURE_MUSIC',\n SECURE_ARCHIVE = 'SECURE_ARCHIVE',\n}\n\n/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n /** The entire payment for this item happens as part of the checkout. */\n FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */\n MEMBERSHIP = 'MEMBERSHIP',\n /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n /**\n * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.\n * @documentationMaturity preview\n */\n MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER',\n}\n\nexport interface ServiceProperties {\n /**\n * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the start time of a class.\n */\n scheduledDate?: Date | null;\n /**\n * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.\n * @min 1\n * @max 10000\n */\n numberOfParticipants?: number | null;\n}\n\nexport interface PriceDescription {\n /**\n * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 100\n */\n original?: string;\n /**\n * Price description translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressType;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressType;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n BUSINESS = 'BUSINESS',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\nexport interface Policy {\n /**\n * Policy title - should be translated\n * @minLength 1\n * @maxLength 29\n */\n title?: string | null;\n /**\n * Policy content - should be translated\n * @minLength 1\n * @maxLength 3000\n */\n content?: string;\n}\n\nexport interface AdditionalFee {\n /**\n * Additional fee's unique code or ID.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Additional fee's name.\n *\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }\n */\n price?: string;\n /**\n * Tax details.\n *\n * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.\n */\n taxDetails?: TaxDetails;\n}\n\n/** Tax details. */\nexport interface TaxDetails {\n /** Whether additional fee is taxable. */\n taxable?: boolean;\n /**\n * Reserved for internal use.\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group id.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: ItemModifier[];\n}\n\nexport interface TranslatableString {\n /**\n * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * String translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Optional additional details or clarification for the modifier. */\n details?: TranslatableString;\n /**\n * The price of the modifier.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string | null;\n}\n\nexport interface QueryCatalogItemsRequest {\n /**\n * A list of itemIDs to filter by. If exists, the result will only include the items with the IDs passed.\n * @minLength 1\n * @maxLength 100\n * @maxSize 100\n */\n catalogItemIds?: string[] | null;\n /**\n * An item name to filter by. If exists, the result will only include items with name that starts with this string.\n * @minLength 1\n * @maxLength 100\n */\n catalogItemName?: string | null;\n /** Paging options to limit and skip a number of items. */\n paging?: Paging;\n /**\n * Optional, if exist add filter by numericId gt last_numeric_id\n * https://dev.wix.com/api/rest/wix-stores/pagination#wix-stores_pagination_pagination\n */\n lastNumericId?: string | null;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryCatalogItemsResponse {\n /** Catalog info and item data. */\n catalogItems?: BasicItem[];\n /** Paging metadata. */\n metadata?: PagingMetadata;\n}\n\nexport interface BasicItem {\n /**\n * The ID of the item.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /** The name of the item. */\n name?: string;\n /** Item Media items. */\n image?: string[];\n /** The current status of the inventory */\n inStock?: boolean;\n /** current version of an item. Each time the item is modified, its `revision` changes */\n revision?: string | null;\n /**\n * Unique numeric ID\n * @readonly\n */\n numericId?: string | null;\n}\n\nexport interface NumericPropertyRange {\n /** Minimum value. */\n minValue?: number;\n /** Maximum value. */\n maxValue?: number;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface CatalogSPIConfig {\n /** Base URI which Wix eCommerce will call to access Catalog service plugin endpoints. For example, to call the Get Catalog Items endpoint at `https://my-external-catalog.com/get-catalog-items`, the base URI you provide here is `https://my-external-catalog.com`. */\n deploymentUri?: string;\n /** Configuration details for discounts applied to all items in the catalog. */\n allItemsDiscount?: AllItemsDiscountConfig;\n /** Configuration details for discounts applied to specific items in the catalog. */\n specificItemsDiscount?: SpecificItemsDiscountConfig;\n}\n\n/** Configuration for all items discount functionality in the catalog. */\nexport interface AllItemsDiscountConfig {\n /**\n * Whether the discount is enabled.\n *\n * Default: `false`.\n */\n enabled?: boolean;\n /**\n * Translatable name for \"all items discount\" in the catalog.\n * For example, for restaurant menus, this could be \"All dishes\".\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n}\n\n/** Configuration for discount functionality in the catalog. */\nexport interface SpecificItemsDiscountConfig {\n /**\n * Whether the discount is enabled.\n *\n * Default: `false`.\n */\n enabled?: boolean;\n /**\n * Translatable name for \"all items discount\" in the catalog.\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n","import { ServicePluginDefinition } from '@wix/sdk-types';\nimport {\n Context,\n GetCatalogItemsRequest,\n GetCatalogItemsResponse,\n} from './service-plugins-types.js';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformSDKPageURLV2ToRESTPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\n\nexport interface GetCatalogItemsEnvelope {\n request: GetCatalogItemsRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * Retrieves data for specified items in a specified catalog.\n *\n * Wix calls this method whenever a cart or checkout is updated, and when an item is added to an order.\n *\n * The method receives a `catalogReferences` array. Each catalog reference in the array contains:\n * + The ID of the item whose latest information Wix needs to retrieve.\n * + The ID of the app providing the catalog containing the item.\n * + Optional details about preferences or customization of the item.\n *\n * The method also receives preferences for the currency and weight unit to be used in the response.\n *\n * Your external catalog can store and organize item details in any way you prefer.\n * When implementing the Catalog service plugin, learn how to handle item variants ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/catalog/handle-item-variants)) in a way that meets your needs.\n *\n * The method's response must contain a `catalogItems` array. Each item in the array must contain:\n * + A `catalogReference` object. This must be identical to the `catalogReference` object received in the request.\n * + A `data` object with full details about the item.\n *\n * > **Notes:**\n * > + If an item doesn't exist in the catalog, the response must exclude it from the `catalogItems` array in the response.\n * > + When none of the items requested exist in the catalog, `catalogItems` must contain an empty array.\n * > + Wix calls the method every time a cart or checkout is updated. If the response doesn't include an item that was already in the cart or checkout, Wix removes the item from the cart or checkout. */\n getCatalogItems(\n payload: GetCatalogItemsEnvelope\n ): GetCatalogItemsResponse | Promise<GetCatalogItemsResponse>;\n}>('ECOM_CATALOG', [\n {\n name: 'getCatalogItems',\n primaryHttpMappingPath: '/get-catalog-items',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = transformPaths(payload, [\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [{ path: 'catalogItems.data.url' }],\n },\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'catalogItems.data.media' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'catalogItems.data.physicalProperties.weight' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n {\n path: 'catalogItems.data.subscriptionOptionInfo.subscriptionSettings.startDate',\n },\n { path: 'catalogItems.data.serviceProperties.scheduledDate' },\n ],\n },\n ]);\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-ecommerce-v1-catalog-provider.public.js';\nimport { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';\nimport { BuildServicePluginDefinition } from '@wix/sdk-types';\nimport { provideHandlers as publicProvideHandlers } from './interfaces-ecommerce-v1-catalog-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> = createServicePluginModule(publicProvideHandlers);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA;AAAA;AAAA;;;ACyDO,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,6BAA0B;AAE1B,EAAAA,YAAA,QAAK;AAEL,EAAAA,YAAA,QAAK;AANK,SAAAA;AAAA,GAAA;AAuPL,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,aAAU;AALA,SAAAA;AAAA,GAAA;AA6EL,IAAK,sBAAL,kBAAKC,yBAAL;AAEL,EAAAA,qBAAA,kBAAe;AAEf,EAAAA,qBAAA,gBAAa;AAEb,EAAAA,qBAAA,WAAQ;AANE,SAAAA;AAAA,GAAA;AAyEL,IAAK,wBAAL,kBAAKC,2BAAL;AACL,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,SAAM;AACN,EAAAA,uBAAA,UAAO;AACP,EAAAA,uBAAA,WAAQ;AACR,EAAAA,uBAAA,UAAO;AALG,SAAAA;AAAA,GAAA;AAkEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,iBAAc;AACd,EAAAA,UAAA,oBAAiB;AACjB,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,qBAAkB;AAClB,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,oBAAiB;AANP,SAAAA;AAAA,GAAA;AAUL,IAAK,oBAAL,kBAAKC,uBAAL;AAEL,EAAAA,mBAAA,yBAAsB;AAEtB,EAAAA,mBAAA,0BAAuB;AAEvB,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,oBAAiB;AAEjB,EAAAA,mBAAA,wBAAqB;AAKrB,EAAAA,mBAAA,8CAA2C;AAfjC,SAAAA;AAAA,GAAA;AA4DL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,6BAA0B;AAC1B,EAAAA,oBAAA,cAAW;AACX,EAAAA,oBAAA,aAAU;AACV,EAAAA,oBAAA,cAAW;AAJD,SAAAA;AAAA,GAAA;AAmRL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACj2BZ,uBAAwC;AAMxC,mBAA6C;AAC7C,yBAAqD;AACrD,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,oCAGO;AAOA,IAAM,sBAAkB,0CA4B5B,gBAAgB;AAAA,EACjB;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,qBAAiB,uCAAe,SAAS;AAAA,UAC7C;AAAA,YACE,aAAa;AAAA,YACb,OAAO,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAAA,UAC3C;AAAA,UACA;AAAA,YACE,aAAa;AAAA,YACb,OAAO,CAAC,EAAE,MAAM,0BAA0B,CAAC;AAAA,UAC7C;AAAA,UACA;AAAA,YACE,aAAa;AAAA,YACb,OAAO,CAAC,EAAE,MAAM,8CAA8C,CAAC;AAAA,UACjE;AAAA,UACA;AAAA,YACE,aAAa;AAAA,YACb,OAAO;AAAA,cACL;AAAA,gBACE,MAAM;AAAA,cACR;AAAA,cACA,EAAE,MAAM,oDAAoD;AAAA,YAC9D;AAAA,UACF;AAAA,QACF,CAAC;AAED,mBAAO,qEAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,mBAAO,uEAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;ACvFD,oCAA0C;AAMnC,IAAMC,uBAET,yDAA0B,eAAqB;","names":["provideHandlers","WeightUnit","ItemTypeItemType","DescriptionLineType","SubscriptionFrequency","FileType","PaymentOptionType","TaxableAddressType","IdentityType","provideHandlers"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/service-plugins-types.ts","../../src/interfaces-ecommerce-v1-catalog-provider.public.ts","../../src/interfaces-ecommerce-v1-catalog-provider.context.ts"],"sourcesContent":["export * from './src/service-plugins-types.js';\nexport * from './src/interfaces-ecommerce-v1-catalog-provider.context.js';\n","export interface GetCatalogItemsRequest {\n /**\n * Catalog reference details for the items to retrieve, including quantity of each item.\n * @minSize 1\n * @maxSize 300\n */\n catalogReferences?: CatalogReferenceAndQuantity[];\n /**\n * Weight measurement unit.\n *\n * By default, Wix sends the weight unit specified in the site's settings.\n */\n weightUnit?: WeightUnit;\n /**\n * Currency to return item prices in, in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, `USD` or `EUR`.\n *\n * By default, Wix sends the currency specified in the site's settings.\n * @format CURRENCY\n */\n currency?: string;\n}\n\nexport interface CatalogReferenceAndQuantity {\n /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */\n catalogReference?: CatalogReference;\n /** Item quantity. */\n quantity?: number;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).\n */\n options?: Record<string, any> | null;\n}\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** Buyer Info */\nexport interface BuyerInfo extends BuyerInfoIdOneOf {\n /**\n * Visitor ID - if the buyer is **not** a site member.\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID - if the buyer is a site member.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * User ID - if the buyer (or cart owner) is a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string;\n /**\n * Contact ID. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).\n * @format GUID\n */\n contactId?: string | null;\n /**\n * Buyer email address.\n * @format EMAIL\n */\n email?: string | null;\n}\n\n/** @oneof */\nexport interface BuyerInfoIdOneOf {\n /**\n * Visitor ID - if the buyer is **not** a site member.\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID - if the buyer is a site member.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * User ID - if the buyer (or cart owner) is a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string;\n}\n\nexport interface GetCatalogItemsResponse {\n /**\n * Details for each item, including catalog reference details and item data. Any items that don't exist in the catalog are excluded.\n * If none of the requested items exist in the catalog, this array must be empty.\n */\n catalogItems?: Item[];\n}\n\nexport interface Item {\n /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */\n catalogReference?: CatalogReference;\n /** Item data. Contains full details about the item. */\n data?: ItemData;\n}\n\nexport interface ItemData {\n /** __Required.__ Item name. */\n productName?: ProductName;\n /**\n * URL for the item's page on the site.\n *\n * This is used to link back to the relevant item page from the cart page. If not provided, the site URL is used.\n */\n url?: string;\n /** __Required.__ Item type. Either one of the preset types or a custom type. */\n itemType?: ItemType;\n /**\n * __Required.__ Item price with discounts applied. If a catalog-defined discount applies, the discount is reflected in this price.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n price?: string;\n /**\n * Item price **before** applying any catalog-defined discount.\n *\n * Default: Value of `price` field, if no catalog-defined discount applies.\n * @format DECIMAL_VALUE\n */\n fullPrice?: string | null;\n /**\n * The tax group ID associated with this item. Learn more about the [Tax Groups Service Plugin](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/tax-groups-integration-service-plugin/introduction).\n * @format GUID\n */\n taxGroupId?: string | null;\n /**\n * Line item description lines. Used for displaying the item in a cart, checkout or order. For example, if you want `Size: Large` to appear under the item name, create a description line with `\"name\": {\"original\": \"Size\"}` and `\"plainText\": {\"original\": \"Large\"}`.\n *\n * Default: No description line.\n * @maxSize 20\n */\n descriptionLines?: DescriptionLine[];\n /**\n * Line item image details. Supports images from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-accessing-the-media-manager) only.\n *\n * To use an image from another source, first upload it to the Media Manager.\n * You can retrieve the ID, width and height of an image from the Wix Media Manager.\n */\n media?: string;\n /**\n * Quantity of the item available for purchase. Only return if the catalog manages inventory.\n * If not returned, a buyer can increase the quantity of this item to add to the cart or checkout without limit.\n * @max 100000000\n */\n quantityAvailable?: number | null;\n /** Physical properties of the item. Only return for physical items. When applicable, contains information such as SKU and item weight. */\n physicalProperties?: PhysicalProperties;\n /** Subscription option info. */\n subscriptionOptionInfo?: SubscriptionOptionInfo;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionType;\n /** Service properties. When applicable, this contains information such as time and number of participants. */\n serviceProperties?: ServiceProperties;\n /**\n * Additional ID for the item in the catalog.\n * This field provides an additional identifier for the item if your flow requires another ID as well as `catalogReference.catalogItemId`.\n * Can be used for membership validation.\n *\n * Default: Same as `catalogReference.catalogItemId`.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n /**\n * Additional description for the price. Return when additional information about the price is needed.\n *\n * For example, when `price` is `\"0\"` but additional details about the actual price are needed, such as `\"Starts at $67\"`.\n */\n priceDescription?: PriceDescription;\n /**\n * Partial payment to be paid upfront during the checkout. Return when `paymentOption` is `DEPOSIT_ONLINE`.\n *\n * Default: If `paymentOption` is `DEPOSIT_ONLINE` but `depositAmount` is not provided, the item is treated as if `paymentOption` is `FULL_PAYMENT_ONLINE`.\n * @format DECIMAL_VALUE\n */\n depositAmount?: string | null;\n /**\n * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.\n * @minLength 1\n * @maxLength 2500\n */\n consentRequiredPaymentPolicy?: string | null;\n /**\n * Whether the price is not yet defined, and will be updated after the order is created.\n *\n * Default: `false`\n */\n priceUndetermined?: boolean;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\n *\n * Default: `false`\n */\n fixedQuantity?: boolean;\n /**\n * Whether to save the payment method on the order.\n *\n * Default: `false`\n */\n savePaymentMethod?: boolean;\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Policies to be displayed to the customer on the checkout page.\n * @maxSize 5\n */\n policies?: Policy[];\n /**\n * Additional Fees to be added to this item calculation.\n * @maxSize 5\n */\n additionalFees?: AdditionalFee[];\n /**\n * Whether the item can only be purchased by site members.\n *\n * Default: `false`\n */\n membersOnly?: boolean;\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n}\n\nexport interface ProductName {\n /**\n * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * Item name translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemType;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\n/** @oneof */\nexport interface ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemType;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypeItemType {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\n}\n\nexport interface DescriptionLine\n extends DescriptionLineValueOneOf,\n DescriptionLineDescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n /** Description line name. */\n name?: DescriptionLineName;\n}\n\n/** @oneof */\nexport interface DescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n}\n\n/** @oneof */\nexport interface DescriptionLineDescriptionLineValueOneOf {}\n\nexport interface DescriptionLineName {\n /**\n * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 100\n */\n original?: string;\n /**\n * Description line name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 200\n */\n translated?: string | null;\n}\n\nexport interface PlainTextValue {\n /**\n * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 600\n */\n original?: string;\n /**\n * Description line plain text value translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 600\n */\n translated?: string | null;\n}\n\nexport interface Color {\n /**\n * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 500\n */\n original?: string;\n /**\n * Description line color name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 500\n */\n translated?: string | null;\n /** HEX or RGB color code for display. */\n code?: string | null;\n}\n\nexport enum DescriptionLineType {\n /** Unrecognized type. */\n UNRECOGNISED = 'UNRECOGNISED',\n /** Plain text type. */\n PLAIN_TEXT = 'PLAIN_TEXT',\n /** Color type. */\n COLOR = 'COLOR',\n}\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface Scope {\n /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n namespace?: string;\n /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */\n group?: Group;\n}\n\nexport interface Group {\n /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n name?: string;\n /** Item ID (when the coupon scope is limited to just one item). */\n entityId?: string | null;\n}\n\nexport interface SubscriptionOptionInfo {\n /** Subscription option settings. */\n subscriptionSettings?: SubscriptionSettings;\n /** Subscription option title. */\n title?: Title;\n /** Subscription option description. */\n description?: Description;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequency;\n /**\n * Interval of recurring payment.\n *\n * Default: `1`.\n * If SubscriptionFrequency is Day the minimum interval is 7\n * @min 1\n * @max 3650\n */\n interval?: number | null;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n * @min 1\n */\n billingCycles?: number | null;\n /** Whether to allow the customer to cancel the subscription.. */\n enableCustomerCancellation?: boolean;\n /**\n * Period until first cycle starts. If applied payNow will be 0\n * If None => no free trial\n */\n freeTrialPeriod?: FreeTrialPeriod;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\nexport interface FreeTrialPeriod {\n /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n frequency?: SubscriptionFrequency;\n /**\n * interval of period\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface Title {\n /**\n * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 150\n */\n original?: string;\n /**\n * Subscription option name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 150\n */\n translated?: string | null;\n}\n\nexport interface Description {\n /**\n * Subscription option description.\n * @maxLength 500\n */\n original?: string;\n /**\n * Translated subscription option description.\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface SecuredMedia {\n /**\n * Media ID in Wix Media Manager.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Original filename.\n * @minLength 1\n * @maxLength 1000\n */\n fileName?: string;\n /** File type. */\n fileType?: FileType;\n}\n\nexport enum FileType {\n UNSPECIFIED = 'UNSPECIFIED',\n SECURE_PICTURE = 'SECURE_PICTURE',\n SECURE_VIDEO = 'SECURE_VIDEO',\n SECURE_DOCUMENT = 'SECURE_DOCUMENT',\n SECURE_MUSIC = 'SECURE_MUSIC',\n SECURE_ARCHIVE = 'SECURE_ARCHIVE',\n}\n\n/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n /** The entire payment for this item happens as part of the checkout. */\n FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n /** Payment for this item is done by charging a membership. When selected, `price` is `0`. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */\n MEMBERSHIP = 'MEMBERSHIP',\n /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n /**\n * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.\n * @documentationMaturity preview\n */\n MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER',\n}\n\nexport interface ServiceProperties {\n /**\n * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the start time of a class.\n */\n scheduledDate?: Date | null;\n /**\n * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.\n * @min 1\n * @max 10000\n */\n numberOfParticipants?: number | null;\n}\n\nexport interface PriceDescription {\n /**\n * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 100\n */\n original?: string;\n /**\n * Price description translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressType;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressType;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n BUSINESS = 'BUSINESS',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\nexport interface Policy {\n /**\n * Policy title - should be translated\n * @minLength 1\n * @maxLength 29\n */\n title?: string | null;\n /**\n * Policy content - should be translated\n * @minLength 1\n * @maxLength 3000\n */\n content?: string;\n}\n\nexport interface AdditionalFee {\n /**\n * Additional fee's unique code or ID.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Additional fee's name.\n *\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }\n */\n price?: string;\n /**\n * Tax details.\n *\n * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.\n */\n taxDetails?: TaxDetails;\n}\n\n/** Tax details. */\nexport interface TaxDetails {\n /** Whether additional fee is taxable. */\n taxable?: boolean;\n /**\n * Reserved for internal use.\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group id.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: ItemModifier[];\n}\n\nexport interface TranslatableString {\n /**\n * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * String translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Optional additional details or clarification for the modifier. */\n details?: TranslatableString;\n /**\n * The price of the modifier.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string | null;\n}\n\nexport interface QueryCatalogItemsRequest {\n /**\n * A list of itemIDs to filter by. If exists, the result will only include the items with the IDs passed.\n * @minLength 1\n * @maxLength 100\n * @maxSize 100\n */\n catalogItemIds?: string[] | null;\n /**\n * An item name to filter by. If exists, the result will only include items with name that starts with this string.\n * @minLength 1\n * @maxLength 100\n */\n catalogItemName?: string | null;\n /** Paging options to limit and skip a number of items. */\n paging?: Paging;\n /**\n * Optional, if exist add filter by numericId gt last_numeric_id\n * https://dev.wix.com/api/rest/wix-stores/pagination#wix-stores_pagination_pagination\n */\n lastNumericId?: string | null;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryCatalogItemsResponse {\n /** Catalog info and item data. */\n catalogItems?: BasicItem[];\n /** Paging metadata. */\n metadata?: PagingMetadata;\n}\n\nexport interface BasicItem {\n /**\n * The ID of the item.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /** The name of the item. */\n name?: string;\n /** Item Media items. */\n image?: string[];\n /** The current status of the inventory */\n inStock?: boolean;\n /** current version of an item. Each time the item is modified, its `revision` changes */\n revision?: string | null;\n /**\n * Unique numeric ID\n * @readonly\n */\n numericId?: string | null;\n}\n\nexport interface NumericPropertyRange {\n /** Minimum value. */\n minValue?: number;\n /** Maximum value. */\n maxValue?: number;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface CatalogSPIConfig {\n /** Base URI which Wix eCommerce will call to access Catalog service plugin endpoints. For example, to call the Get Catalog Items endpoint at `https://my-external-catalog.com/get-catalog-items`, the base URI you provide here is `https://my-external-catalog.com`. */\n deploymentUri?: string;\n /** Configuration details for discounts applied to all items in the catalog. */\n allItemsDiscount?: AllItemsDiscountConfig;\n /** Configuration details for discounts applied to specific items in the catalog. */\n specificItemsDiscount?: SpecificItemsDiscountConfig;\n}\n\n/** Configuration for all items discount functionality in the catalog. */\nexport interface AllItemsDiscountConfig {\n /**\n * Whether the discount is enabled.\n *\n * Default: `false`.\n */\n enabled?: boolean;\n /**\n * Translatable name for \"all items discount\" in the catalog.\n * For example, for restaurant menus, this could be \"All dishes\".\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n}\n\n/** Configuration for discount functionality in the catalog. */\nexport interface SpecificItemsDiscountConfig {\n /**\n * Whether the discount is enabled.\n *\n * Default: `false`.\n */\n enabled?: boolean;\n /**\n * Translatable name for \"all items discount\" in the catalog.\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n","import { ServicePluginDefinition } from '@wix/sdk-types';\nimport {\n Context,\n GetCatalogItemsRequest,\n GetCatalogItemsResponse,\n} from './service-plugins-types.js';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformSDKPageURLV2ToRESTPageURLV2 } from '@wix/sdk-runtime/transformations/page-url-v2';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\n\nexport interface GetCatalogItemsEnvelope {\n request: GetCatalogItemsRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * Retrieves data for specified items in a specified catalog.\n *\n * Wix calls this method whenever a cart or checkout is updated, and when an item is added to an order.\n *\n * The method receives a `catalogReferences` array. Each catalog reference in the array contains:\n * + The ID of the item whose latest information Wix needs to retrieve.\n * + The ID of the app providing the catalog containing the item.\n * + Optional details about preferences or customization of the item.\n *\n * The method also receives preferences for the currency and weight unit to be used in the response.\n *\n * Your external catalog can store and organize item details in any way you prefer.\n * When implementing the Catalog service plugin, learn how to handle item variants ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/catalog/handle-item-variants)) in a way that meets your needs.\n *\n * The method's response must contain a `catalogItems` array. Each item in the array must contain:\n * + A `catalogReference` object. This must be identical to the `catalogReference` object received in the request.\n * + A `data` object with full details about the item.\n *\n * > **Notes:**\n * > + If an item doesn't exist in the catalog, the response must exclude it from the `catalogItems` array in the response.\n * > + When none of the items requested exist in the catalog, `catalogItems` must contain an empty array.\n * > + Wix calls the method every time a cart or checkout is updated. If the response doesn't include an item that was already in the cart or checkout, Wix removes the item from the cart or checkout. */\n getCatalogItems(\n payload: GetCatalogItemsEnvelope\n ): GetCatalogItemsResponse | Promise<GetCatalogItemsResponse>;\n}>('ECOM_CATALOG', [\n {\n name: 'getCatalogItems',\n primaryHttpMappingPath: '/get-catalog-items',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = transformPaths(payload, [\n {\n transformFn: transformSDKPageURLV2ToRESTPageURLV2,\n paths: [{ path: 'catalogItems.data.url' }],\n },\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [{ path: 'catalogItems.data.media' }],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'catalogItems.data.physicalProperties.weight' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n {\n path: 'catalogItems.data.subscriptionOptionInfo.subscriptionSettings.startDate',\n },\n { path: 'catalogItems.data.serviceProperties.scheduledDate' },\n ],\n },\n ]);\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = payload;\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-ecommerce-v1-catalog-provider.public.js';\nimport { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';\nimport { BuildServicePluginDefinition } from '@wix/sdk-types';\nimport { provideHandlers as publicProvideHandlers } from './interfaces-ecommerce-v1-catalog-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> = createServicePluginModule(publicProvideHandlers);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA;AAAA;AAAA;;;ACyDO,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,6BAA0B;AAE1B,EAAAA,YAAA,QAAK;AAEL,EAAAA,YAAA,QAAK;AANK,SAAAA;AAAA,GAAA;AAuPL,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,aAAU;AALA,SAAAA;AAAA,GAAA;AA6EL,IAAK,sBAAL,kBAAKC,yBAAL;AAEL,EAAAA,qBAAA,kBAAe;AAEf,EAAAA,qBAAA,gBAAa;AAEb,EAAAA,qBAAA,WAAQ;AANE,SAAAA;AAAA,GAAA;AAyEL,IAAK,wBAAL,kBAAKC,2BAAL;AACL,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,SAAM;AACN,EAAAA,uBAAA,UAAO;AACP,EAAAA,uBAAA,WAAQ;AACR,EAAAA,uBAAA,UAAO;AALG,SAAAA;AAAA,GAAA;AAkEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,iBAAc;AACd,EAAAA,UAAA,oBAAiB;AACjB,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,qBAAkB;AAClB,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,oBAAiB;AANP,SAAAA;AAAA,GAAA;AAUL,IAAK,oBAAL,kBAAKC,uBAAL;AAEL,EAAAA,mBAAA,yBAAsB;AAEtB,EAAAA,mBAAA,0BAAuB;AAEvB,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,oBAAiB;AAEjB,EAAAA,mBAAA,wBAAqB;AAKrB,EAAAA,mBAAA,8CAA2C;AAfjC,SAAAA;AAAA,GAAA;AA4DL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,6BAA0B;AAC1B,EAAAA,oBAAA,cAAW;AACX,EAAAA,oBAAA,aAAU;AACV,EAAAA,oBAAA,cAAW;AAJD,SAAAA;AAAA,GAAA;AAmRL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;ACj2BZ,uBAAwC;AAMxC,mBAA6C;AAC7C,yBAAqD;AACrD,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,oCAGO;AAOA,IAAM,sBAAkB,0CA4B5B,gBAAgB;AAAA,EACjB;AAAA,IACE,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,MACf,QAAQ,CAAC,YAAiB;AACxB,cAAM,qBAAiB,uCAAe,SAAS;AAAA,UAC7C;AAAA,YACE,aAAa;AAAA,YACb,OAAO,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAAA,UAC3C;AAAA,UACA;AAAA,YACE,aAAa;AAAA,YACb,OAAO,CAAC,EAAE,MAAM,0BAA0B,CAAC;AAAA,UAC7C;AAAA,UACA;AAAA,YACE,aAAa;AAAA,YACb,OAAO,CAAC,EAAE,MAAM,8CAA8C,CAAC;AAAA,UACjE;AAAA,UACA;AAAA,YACE,aAAa;AAAA,YACb,OAAO;AAAA,cACL;AAAA,gBACE,MAAM;AAAA,cACR;AAAA,cACA,EAAE,MAAM,oDAAoD;AAAA,YAC9D;AAAA,UACF;AAAA,QACF,CAAC;AAED,mBAAO,qEAAsC,cAAc;AAAA,MAC7D;AAAA,MACA,UAAU,CAAC,YAAiB;AAC1B,cAAM,kBAAkB;AAExB,mBAAO,uEAAwC,eAAe;AAAA,MAChE;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;ACvFD,oCAA0C;AAMnC,IAAMC,uBAET,yDAA0B,eAAqB;","names":["provideHandlers","WeightUnit","ItemTypeItemType","DescriptionLineType","SubscriptionFrequency","FileType","PaymentOptionType","TaxableAddressType","IdentityType","provideHandlers"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a3 as GetCatalogItemsEnvelope, c as GetCatalogItemsResponse } from './interfaces-ecommerce-v1-catalog-provider.public-
|
|
2
|
-
export { J as AdditionalFee, Z as AllItemsDiscountConfig, U as BasicItem, B as BuyerInfo, b as BuyerInfoIdOneOf, a as CatalogReference, C as CatalogReferenceAndQuantity, Y as CatalogSPIConfig, l as Color, $ as Context, t as Description, D as DescriptionLine, i as DescriptionLineDescriptionLineValueOneOf, j as DescriptionLineName, m as DescriptionLineType, h as DescriptionLineValueOneOf, v as FileType, F as FreeTrialPeriod, G as GetCatalogItemsRequest, o as Group, a1 as IdentificationData, a2 as IdentificationDataIdOneOf, a0 as IdentityType, I as Item, d as ItemData, N as ItemModifier, e as ItemType, g as ItemTypeItemType, f as ItemTypeItemTypeDataOneOf, M as ModifierGroup, V as NumericPropertyRange, O as Paging, X as PagingMetadata, w as PaymentOptionType, n as PhysicalProperties, k as PlainTextValue, H as Policy, y as PriceDescription, P as ProductName, Q as QueryCatalogItemsRequest, R as QueryCatalogItemsResponse, S as Scope, u as SecuredMedia, x as ServiceProperties, _ as SpecificItemsDiscountConfig, s as SubscriptionFrequency, q as SubscriptionOptionInfo, r as SubscriptionSettings, K as TaxDetails, z as TaxableAddress, A as TaxableAddressTaxableAddressDataOneOf, E as TaxableAddressType, T as Title, L as TranslatableString, W as WeightUnit } from './interfaces-ecommerce-v1-catalog-provider.public-
|
|
1
|
+
import { a3 as GetCatalogItemsEnvelope, c as GetCatalogItemsResponse } from './interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.js';
|
|
2
|
+
export { J as AdditionalFee, Z as AllItemsDiscountConfig, U as BasicItem, B as BuyerInfo, b as BuyerInfoIdOneOf, a as CatalogReference, C as CatalogReferenceAndQuantity, Y as CatalogSPIConfig, l as Color, $ as Context, t as Description, D as DescriptionLine, i as DescriptionLineDescriptionLineValueOneOf, j as DescriptionLineName, m as DescriptionLineType, h as DescriptionLineValueOneOf, v as FileType, F as FreeTrialPeriod, G as GetCatalogItemsRequest, o as Group, a1 as IdentificationData, a2 as IdentificationDataIdOneOf, a0 as IdentityType, I as Item, d as ItemData, N as ItemModifier, e as ItemType, g as ItemTypeItemType, f as ItemTypeItemTypeDataOneOf, M as ModifierGroup, V as NumericPropertyRange, O as Paging, X as PagingMetadata, w as PaymentOptionType, n as PhysicalProperties, k as PlainTextValue, H as Policy, y as PriceDescription, P as ProductName, Q as QueryCatalogItemsRequest, R as QueryCatalogItemsResponse, S as Scope, u as SecuredMedia, x as ServiceProperties, _ as SpecificItemsDiscountConfig, s as SubscriptionFrequency, q as SubscriptionOptionInfo, r as SubscriptionSettings, K as TaxDetails, z as TaxableAddress, A as TaxableAddressTaxableAddressDataOneOf, E as TaxableAddressType, T as Title, L as TranslatableString, W as WeightUnit } from './interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.js';
|
|
3
3
|
import '@wix/sdk-types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/service-plugins-types.ts"],"sourcesContent":["import { GetCatalogItemsResponse } from './src/service-plugins-types.js';\nimport { GetCatalogItemsEnvelope } from './src/interfaces-ecommerce-v1-catalog-provider.public.js';\n\nexport * from './src/service-plugins-types';\nexport { GetCatalogItemsEnvelope };\n\n/**\n * Retrieves data for specified items in a specified catalog.\n *\n * Wix calls this method whenever a cart or checkout is updated, and when an item is added to an order.\n *\n * The method receives a `catalogReferences` array. Each catalog reference in the array contains:\n * + The ID of the item whose latest information Wix needs to retrieve.\n * + The ID of the app providing the catalog containing the item.\n * + Optional details about preferences or customization of the item.\n *\n * The method also receives preferences for the currency and weight unit to be used in the response.\n *\n * Your external catalog can store and organize item details in any way you prefer.\n * When implementing the Catalog service plugin, learn how to handle item variants ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/catalog/handle-item-variants)) in a way that meets your needs.\n *\n * The method's response must contain a `catalogItems` array. Each item in the array must contain:\n * + A `catalogReference` object. This must be identical to the `catalogReference` object received in the request.\n * + A `data` object with full details about the item.\n *\n * > **Notes:**\n * > + If an item doesn't exist in the catalog, the response must exclude it from the `catalogItems` array in the response.\n * > + When none of the items requested exist in the catalog, `catalogItems` must contain an empty array.\n * > + Wix calls the method every time a cart or checkout is updated. If the response doesn't include an item that was already in the cart or checkout, Wix removes the item from the cart or checkout.\n */\nexport declare function getCatalogItems(\n payload: GetCatalogItemsEnvelope\n): GetCatalogItemsResponse | Promise<GetCatalogItemsResponse>;\n","export interface GetCatalogItemsRequest {\n /**\n * Catalog reference details for the items to retrieve, including quantity of each item.\n * @minSize 1\n * @maxSize 300\n */\n catalogReferences?: CatalogReferenceAndQuantity[];\n /**\n * Weight measurement unit.\n *\n * By default, Wix sends the weight unit specified in the site's settings.\n */\n weightUnit?: WeightUnit;\n /**\n * Currency to return item prices in, in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, `USD` or `EUR`.\n *\n * By default, Wix sends the currency specified in the site's settings.\n * @format CURRENCY\n */\n currency?: string;\n}\n\nexport interface CatalogReferenceAndQuantity {\n /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */\n catalogReference?: CatalogReference;\n /** Item quantity. */\n quantity?: number;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).\n */\n options?: Record<string, any> | null;\n}\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** Buyer Info */\nexport interface BuyerInfo extends BuyerInfoIdOneOf {\n /**\n * Visitor ID - if the buyer is **not** a site member.\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID - if the buyer is a site member.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * User ID - if the buyer (or cart owner) is a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string;\n /**\n * Contact ID. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).\n * @format GUID\n */\n contactId?: string | null;\n /**\n * Buyer email address.\n * @format EMAIL\n */\n email?: string | null;\n}\n\n/** @oneof */\nexport interface BuyerInfoIdOneOf {\n /**\n * Visitor ID - if the buyer is **not** a site member.\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID - if the buyer is a site member.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * User ID - if the buyer (or cart owner) is a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string;\n}\n\nexport interface GetCatalogItemsResponse {\n /**\n * Details for each item, including catalog reference details and item data. Any items that don't exist in the catalog are excluded.\n * If none of the requested items exist in the catalog, this array must be empty.\n */\n catalogItems?: Item[];\n}\n\nexport interface Item {\n /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */\n catalogReference?: CatalogReference;\n /** Item data. Contains full details about the item. */\n data?: ItemData;\n}\n\nexport interface ItemData {\n /** __Required.__ Item name. */\n productName?: ProductName;\n /**\n * URL for the item's page on the site.\n *\n * This is used to link back to the relevant item page from the cart page. If not provided, the site URL is used.\n */\n url?: string;\n /** __Required.__ Item type. Either one of the preset types or a custom type. */\n itemType?: ItemType;\n /**\n * __Required.__ Item price with discounts applied. If a catalog-defined discount applies, the discount is reflected in this price.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n price?: string;\n /**\n * Item price **before** applying any catalog-defined discount.\n *\n * Default: Value of `price` field, if no catalog-defined discount applies.\n * @format DECIMAL_VALUE\n */\n fullPrice?: string | null;\n /**\n * The tax group ID associated with this item. Learn more about the [Tax Groups Service Plugin](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/tax-groups-integration-service-plugin/introduction).\n * @format GUID\n */\n taxGroupId?: string | null;\n /**\n * Line item description lines. Used for displaying the item in a cart, checkout or order. For example, if you want `Size: Large` to appear under the item name, create a description line with `\"name\": {\"original\": \"Size\"}` and `\"plainText\": {\"original\": \"Large\"}`.\n *\n * Default: No description line.\n * @maxSize 20\n */\n descriptionLines?: DescriptionLine[];\n /**\n * Line item image details. Supports images from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-accessing-the-media-manager) only.\n *\n * To use an image from another source, first upload it to the Media Manager.\n * You can retrieve the ID, width and height of an image from the Wix Media Manager.\n */\n media?: string;\n /**\n * Quantity of the item available for purchase. Only return if the catalog manages inventory.\n * If not returned, a buyer can increase the quantity of this item to add to the cart or checkout without limit.\n * @max 100000000\n */\n quantityAvailable?: number | null;\n /** Physical properties of the item. Only return for physical items. When applicable, contains information such as SKU and item weight. */\n physicalProperties?: PhysicalProperties;\n /** Subscription option info. */\n subscriptionOptionInfo?: SubscriptionOptionInfo;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionType;\n /** Service properties. When applicable, this contains information such as time and number of participants. */\n serviceProperties?: ServiceProperties;\n /**\n * Additional ID for the item in the catalog.\n * This field provides an additional identifier for the item if your flow requires another ID as well as `catalogReference.catalogItemId`.\n * Can be used for membership validation.\n *\n * Default: Same as `catalogReference.catalogItemId`.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n /**\n * Additional description for the price. Return when additional information about the price is needed.\n *\n * For example, when `price` is `\"0\"` but additional details about the actual price are needed, such as `\"Starts at $67\"`.\n */\n priceDescription?: PriceDescription;\n /**\n * Partial payment to be paid upfront during the checkout. Return when `paymentOption` is `DEPOSIT_ONLINE`.\n *\n * Default: If `paymentOption` is `DEPOSIT_ONLINE` but `depositAmount` is not provided, the item is treated as if `paymentOption` is `FULL_PAYMENT_ONLINE`.\n * @format DECIMAL_VALUE\n */\n depositAmount?: string | null;\n /**\n * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.\n * @minLength 1\n * @maxLength 2500\n */\n consentRequiredPaymentPolicy?: string | null;\n /**\n * Whether the price is not yet defined, and will be updated after the order is created.\n *\n * Default: `false`\n */\n priceUndetermined?: boolean;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\n *\n * Default: `false`\n */\n fixedQuantity?: boolean;\n /**\n * Whether to save the payment method on the order.\n *\n * Default: `false`\n */\n savePaymentMethod?: boolean;\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Policies to be displayed to the customer on the checkout page.\n * @maxSize 5\n */\n policies?: Policy[];\n /**\n * Additional Fees to be added to this item calculation.\n * @maxSize 5\n */\n additionalFees?: AdditionalFee[];\n /**\n * Whether the item can only be purchased by site members.\n *\n * Default: `false`\n */\n membersOnly?: boolean;\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n}\n\nexport interface ProductName {\n /**\n * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * Item name translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemType;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\n/** @oneof */\nexport interface ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemType;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypeItemType {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\n}\n\nexport interface DescriptionLine\n extends DescriptionLineValueOneOf,\n DescriptionLineDescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n /** Description line name. */\n name?: DescriptionLineName;\n}\n\n/** @oneof */\nexport interface DescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n}\n\n/** @oneof */\nexport interface DescriptionLineDescriptionLineValueOneOf {}\n\nexport interface DescriptionLineName {\n /**\n * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 100\n */\n original?: string;\n /**\n * Description line name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 200\n */\n translated?: string | null;\n}\n\nexport interface PlainTextValue {\n /**\n * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 600\n */\n original?: string;\n /**\n * Description line plain text value translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 600\n */\n translated?: string | null;\n}\n\nexport interface Color {\n /**\n * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 500\n */\n original?: string;\n /**\n * Description line color name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 500\n */\n translated?: string | null;\n /** HEX or RGB color code for display. */\n code?: string | null;\n}\n\nexport enum DescriptionLineType {\n /** Unrecognized type. */\n UNRECOGNISED = 'UNRECOGNISED',\n /** Plain text type. */\n PLAIN_TEXT = 'PLAIN_TEXT',\n /** Color type. */\n COLOR = 'COLOR',\n}\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface Scope {\n /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n namespace?: string;\n /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */\n group?: Group;\n}\n\nexport interface Group {\n /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n name?: string;\n /** Item ID (when the coupon scope is limited to just one item). */\n entityId?: string | null;\n}\n\nexport interface SubscriptionOptionInfo {\n /** Subscription option settings. */\n subscriptionSettings?: SubscriptionSettings;\n /** Subscription option title. */\n title?: Title;\n /** Subscription option description. */\n description?: Description;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequency;\n /**\n * Interval of recurring payment.\n *\n * Default: `1`.\n * If SubscriptionFrequency is Day the minimum interval is 7\n * @min 1\n * @max 3650\n */\n interval?: number | null;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n * @min 1\n */\n billingCycles?: number | null;\n /** Whether to allow the customer to cancel the subscription.. */\n enableCustomerCancellation?: boolean;\n /**\n * Period until first cycle starts. If applied payNow will be 0\n * If None => no free trial\n */\n freeTrialPeriod?: FreeTrialPeriod;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\nexport interface FreeTrialPeriod {\n /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n frequency?: SubscriptionFrequency;\n /**\n * interval of period\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface Title {\n /**\n * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 150\n */\n original?: string;\n /**\n * Subscription option name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 150\n */\n translated?: string | null;\n}\n\nexport interface Description {\n /**\n * Subscription option description.\n * @maxLength 500\n */\n original?: string;\n /**\n * Translated subscription option description.\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface SecuredMedia {\n /**\n * Media ID in Wix Media Manager.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Original filename.\n * @minLength 1\n * @maxLength 1000\n */\n fileName?: string;\n /** File type. */\n fileType?: FileType;\n}\n\nexport enum FileType {\n UNSPECIFIED = 'UNSPECIFIED',\n SECURE_PICTURE = 'SECURE_PICTURE',\n SECURE_VIDEO = 'SECURE_VIDEO',\n SECURE_DOCUMENT = 'SECURE_DOCUMENT',\n SECURE_MUSIC = 'SECURE_MUSIC',\n SECURE_ARCHIVE = 'SECURE_ARCHIVE',\n}\n\n/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n /** The entire payment for this item happens as part of the checkout. */\n FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */\n MEMBERSHIP = 'MEMBERSHIP',\n /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n /**\n * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.\n * @documentationMaturity preview\n */\n MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER',\n}\n\nexport interface ServiceProperties {\n /**\n * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the start time of a class.\n */\n scheduledDate?: Date | null;\n /**\n * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.\n * @min 1\n * @max 10000\n */\n numberOfParticipants?: number | null;\n}\n\nexport interface PriceDescription {\n /**\n * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 100\n */\n original?: string;\n /**\n * Price description translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressType;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressType;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n BUSINESS = 'BUSINESS',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\nexport interface Policy {\n /**\n * Policy title - should be translated\n * @minLength 1\n * @maxLength 29\n */\n title?: string | null;\n /**\n * Policy content - should be translated\n * @minLength 1\n * @maxLength 3000\n */\n content?: string;\n}\n\nexport interface AdditionalFee {\n /**\n * Additional fee's unique code or ID.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Additional fee's name.\n *\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }\n */\n price?: string;\n /**\n * Tax details.\n *\n * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.\n */\n taxDetails?: TaxDetails;\n}\n\n/** Tax details. */\nexport interface TaxDetails {\n /** Whether additional fee is taxable. */\n taxable?: boolean;\n /**\n * Reserved for internal use.\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group id.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: ItemModifier[];\n}\n\nexport interface TranslatableString {\n /**\n * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * String translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Optional additional details or clarification for the modifier. */\n details?: TranslatableString;\n /**\n * The price of the modifier.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string | null;\n}\n\nexport interface QueryCatalogItemsRequest {\n /**\n * A list of itemIDs to filter by. If exists, the result will only include the items with the IDs passed.\n * @minLength 1\n * @maxLength 100\n * @maxSize 100\n */\n catalogItemIds?: string[] | null;\n /**\n * An item name to filter by. If exists, the result will only include items with name that starts with this string.\n * @minLength 1\n * @maxLength 100\n */\n catalogItemName?: string | null;\n /** Paging options to limit and skip a number of items. */\n paging?: Paging;\n /**\n * Optional, if exist add filter by numericId gt last_numeric_id\n * https://dev.wix.com/api/rest/wix-stores/pagination#wix-stores_pagination_pagination\n */\n lastNumericId?: string | null;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryCatalogItemsResponse {\n /** Catalog info and item data. */\n catalogItems?: BasicItem[];\n /** Paging metadata. */\n metadata?: PagingMetadata;\n}\n\nexport interface BasicItem {\n /**\n * The ID of the item.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /** The name of the item. */\n name?: string;\n /** Item Media items. */\n image?: string[];\n /** The current status of the inventory */\n inStock?: boolean;\n /** current version of an item. Each time the item is modified, its `revision` changes */\n revision?: string | null;\n /**\n * Unique numeric ID\n * @readonly\n */\n numericId?: string | null;\n}\n\nexport interface NumericPropertyRange {\n /** Minimum value. */\n minValue?: number;\n /** Maximum value. */\n maxValue?: number;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface CatalogSPIConfig {\n /** Base URI which Wix eCommerce will call to access Catalog service plugin endpoints. For example, to call the Get Catalog Items endpoint at `https://my-external-catalog.com/get-catalog-items`, the base URI you provide here is `https://my-external-catalog.com`. */\n deploymentUri?: string;\n /** Configuration details for discounts applied to all items in the catalog. */\n allItemsDiscount?: AllItemsDiscountConfig;\n /** Configuration details for discounts applied to specific items in the catalog. */\n specificItemsDiscount?: SpecificItemsDiscountConfig;\n}\n\n/** Configuration for all items discount functionality in the catalog. */\nexport interface AllItemsDiscountConfig {\n /**\n * Whether the discount is enabled.\n *\n * Default: `false`.\n */\n enabled?: boolean;\n /**\n * Translatable name for \"all items discount\" in the catalog.\n * For example, for restaurant menus, this could be \"All dishes\".\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n}\n\n/** Configuration for discount functionality in the catalog. */\nexport interface SpecificItemsDiscountConfig {\n /**\n * Whether the discount is enabled.\n *\n * Default: `false`.\n */\n enabled?: boolean;\n /**\n * Translatable name for \"all items discount\" in the catalog.\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACyDO,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,6BAA0B;AAE1B,EAAAA,YAAA,QAAK;AAEL,EAAAA,YAAA,QAAK;AANK,SAAAA;AAAA,GAAA;AAuPL,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,aAAU;AALA,SAAAA;AAAA,GAAA;AA6EL,IAAK,sBAAL,kBAAKC,yBAAL;AAEL,EAAAA,qBAAA,kBAAe;AAEf,EAAAA,qBAAA,gBAAa;AAEb,EAAAA,qBAAA,WAAQ;AANE,SAAAA;AAAA,GAAA;AAyEL,IAAK,wBAAL,kBAAKC,2BAAL;AACL,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,SAAM;AACN,EAAAA,uBAAA,UAAO;AACP,EAAAA,uBAAA,WAAQ;AACR,EAAAA,uBAAA,UAAO;AALG,SAAAA;AAAA,GAAA;AAkEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,iBAAc;AACd,EAAAA,UAAA,oBAAiB;AACjB,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,qBAAkB;AAClB,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,oBAAiB;AANP,SAAAA;AAAA,GAAA;AAUL,IAAK,oBAAL,kBAAKC,uBAAL;AAEL,EAAAA,mBAAA,yBAAsB;AAEtB,EAAAA,mBAAA,0BAAuB;AAEvB,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,oBAAiB;AAEjB,EAAAA,mBAAA,wBAAqB;AAKrB,EAAAA,mBAAA,8CAA2C;AAfjC,SAAAA;AAAA,GAAA;AA4DL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,6BAA0B;AAC1B,EAAAA,oBAAA,cAAW;AACX,EAAAA,oBAAA,aAAU;AACV,EAAAA,oBAAA,cAAW;AAJD,SAAAA;AAAA,GAAA;AAmRL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;","names":["WeightUnit","ItemTypeItemType","DescriptionLineType","SubscriptionFrequency","FileType","PaymentOptionType","TaxableAddressType","IdentityType"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/service-plugins-types.ts"],"sourcesContent":["import { GetCatalogItemsResponse } from './src/service-plugins-types.js';\nimport { GetCatalogItemsEnvelope } from './src/interfaces-ecommerce-v1-catalog-provider.public.js';\n\nexport * from './src/service-plugins-types';\nexport { GetCatalogItemsEnvelope };\n\n/**\n * Retrieves data for specified items in a specified catalog.\n *\n * Wix calls this method whenever a cart or checkout is updated, and when an item is added to an order.\n *\n * The method receives a `catalogReferences` array. Each catalog reference in the array contains:\n * + The ID of the item whose latest information Wix needs to retrieve.\n * + The ID of the app providing the catalog containing the item.\n * + Optional details about preferences or customization of the item.\n *\n * The method also receives preferences for the currency and weight unit to be used in the response.\n *\n * Your external catalog can store and organize item details in any way you prefer.\n * When implementing the Catalog service plugin, learn how to handle item variants ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/catalog/handle-item-variants)) in a way that meets your needs.\n *\n * The method's response must contain a `catalogItems` array. Each item in the array must contain:\n * + A `catalogReference` object. This must be identical to the `catalogReference` object received in the request.\n * + A `data` object with full details about the item.\n *\n * > **Notes:**\n * > + If an item doesn't exist in the catalog, the response must exclude it from the `catalogItems` array in the response.\n * > + When none of the items requested exist in the catalog, `catalogItems` must contain an empty array.\n * > + Wix calls the method every time a cart or checkout is updated. If the response doesn't include an item that was already in the cart or checkout, Wix removes the item from the cart or checkout.\n */\nexport declare function getCatalogItems(\n payload: GetCatalogItemsEnvelope\n): GetCatalogItemsResponse | Promise<GetCatalogItemsResponse>;\n","export interface GetCatalogItemsRequest {\n /**\n * Catalog reference details for the items to retrieve, including quantity of each item.\n * @minSize 1\n * @maxSize 300\n */\n catalogReferences?: CatalogReferenceAndQuantity[];\n /**\n * Weight measurement unit.\n *\n * By default, Wix sends the weight unit specified in the site's settings.\n */\n weightUnit?: WeightUnit;\n /**\n * Currency to return item prices in, in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, `USD` or `EUR`.\n *\n * By default, Wix sends the currency specified in the site's settings.\n * @format CURRENCY\n */\n currency?: string;\n}\n\nexport interface CatalogReferenceAndQuantity {\n /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */\n catalogReference?: CatalogReference;\n /** Item quantity. */\n quantity?: number;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).\n */\n options?: Record<string, any> | null;\n}\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** Buyer Info */\nexport interface BuyerInfo extends BuyerInfoIdOneOf {\n /**\n * Visitor ID - if the buyer is **not** a site member.\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID - if the buyer is a site member.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * User ID - if the buyer (or cart owner) is a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string;\n /**\n * Contact ID. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).\n * @format GUID\n */\n contactId?: string | null;\n /**\n * Buyer email address.\n * @format EMAIL\n */\n email?: string | null;\n}\n\n/** @oneof */\nexport interface BuyerInfoIdOneOf {\n /**\n * Visitor ID - if the buyer is **not** a site member.\n * @format GUID\n * @readonly\n */\n visitorId?: string;\n /**\n * Member ID - if the buyer is a site member.\n * @format GUID\n * @readonly\n */\n memberId?: string;\n /**\n * User ID - if the buyer (or cart owner) is a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string;\n}\n\nexport interface GetCatalogItemsResponse {\n /**\n * Details for each item, including catalog reference details and item data. Any items that don't exist in the catalog are excluded.\n * If none of the requested items exist in the catalog, this array must be empty.\n */\n catalogItems?: Item[];\n}\n\nexport interface Item {\n /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */\n catalogReference?: CatalogReference;\n /** Item data. Contains full details about the item. */\n data?: ItemData;\n}\n\nexport interface ItemData {\n /** __Required.__ Item name. */\n productName?: ProductName;\n /**\n * URL for the item's page on the site.\n *\n * This is used to link back to the relevant item page from the cart page. If not provided, the site URL is used.\n */\n url?: string;\n /** __Required.__ Item type. Either one of the preset types or a custom type. */\n itemType?: ItemType;\n /**\n * __Required.__ Item price with discounts applied. If a catalog-defined discount applies, the discount is reflected in this price.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n price?: string;\n /**\n * Item price **before** applying any catalog-defined discount.\n *\n * Default: Value of `price` field, if no catalog-defined discount applies.\n * @format DECIMAL_VALUE\n */\n fullPrice?: string | null;\n /**\n * The tax group ID associated with this item. Learn more about the [Tax Groups Service Plugin](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/tax-groups-integration-service-plugin/introduction).\n * @format GUID\n */\n taxGroupId?: string | null;\n /**\n * Line item description lines. Used for displaying the item in a cart, checkout or order. For example, if you want `Size: Large` to appear under the item name, create a description line with `\"name\": {\"original\": \"Size\"}` and `\"plainText\": {\"original\": \"Large\"}`.\n *\n * Default: No description line.\n * @maxSize 20\n */\n descriptionLines?: DescriptionLine[];\n /**\n * Line item image details. Supports images from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-accessing-the-media-manager) only.\n *\n * To use an image from another source, first upload it to the Media Manager.\n * You can retrieve the ID, width and height of an image from the Wix Media Manager.\n */\n media?: string;\n /**\n * Quantity of the item available for purchase. Only return if the catalog manages inventory.\n * If not returned, a buyer can increase the quantity of this item to add to the cart or checkout without limit.\n * @max 100000000\n */\n quantityAvailable?: number | null;\n /** Physical properties of the item. Only return for physical items. When applicable, contains information such as SKU and item weight. */\n physicalProperties?: PhysicalProperties;\n /** Subscription option info. */\n subscriptionOptionInfo?: SubscriptionOptionInfo;\n /**\n * Type of selected payment option for current item.\n *\n * Default: `FULL_PAYMENT_ONLINE`\n */\n paymentOption?: PaymentOptionType;\n /** Service properties. When applicable, this contains information such as time and number of participants. */\n serviceProperties?: ServiceProperties;\n /**\n * Additional ID for the item in the catalog.\n * This field provides an additional identifier for the item if your flow requires another ID as well as `catalogReference.catalogItemId`.\n * Can be used for membership validation.\n *\n * Default: Same as `catalogReference.catalogItemId`.\n * @minLength 1\n * @maxLength 36\n */\n rootCatalogItemId?: string | null;\n /**\n * Additional description for the price. Return when additional information about the price is needed.\n *\n * For example, when `price` is `\"0\"` but additional details about the actual price are needed, such as `\"Starts at $67\"`.\n */\n priceDescription?: PriceDescription;\n /**\n * Partial payment to be paid upfront during the checkout. Return when `paymentOption` is `DEPOSIT_ONLINE`.\n *\n * Default: If `paymentOption` is `DEPOSIT_ONLINE` but `depositAmount` is not provided, the item is treated as if `paymentOption` is `FULL_PAYMENT_ONLINE`.\n * @format DECIMAL_VALUE\n */\n depositAmount?: string | null;\n /**\n * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.\n * @minLength 1\n * @maxLength 2500\n */\n consentRequiredPaymentPolicy?: string | null;\n /**\n * Whether the price is not yet defined, and will be updated after the order is created.\n *\n * Default: `false`\n */\n priceUndetermined?: boolean;\n /**\n * Whether the line item quantity is fixed and cannot be changed.\n *\n * Default: `false`\n */\n fixedQuantity?: boolean;\n /**\n * Whether to save the payment method on the order.\n *\n * Default: `false`\n */\n savePaymentMethod?: boolean;\n /** Address to use for tax calculation purposes. */\n taxableAddress?: TaxableAddress;\n /**\n * Policies to be displayed to the customer on the checkout page.\n * @maxSize 5\n */\n policies?: Policy[];\n /**\n * Additional Fees to be added to this item calculation.\n * @maxSize 5\n */\n additionalFees?: AdditionalFee[];\n /**\n * Whether the item can only be purchased by site members.\n *\n * Default: `false`\n */\n membersOnly?: boolean;\n /**\n * Modifier groups that were added to the item.\n * @maxSize 25\n */\n modifierGroups?: ModifierGroup[];\n}\n\nexport interface ProductName {\n /**\n * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * Item name translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemType;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\n/** @oneof */\nexport interface ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypeItemType;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypeItemType {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\n}\n\nexport interface DescriptionLine\n extends DescriptionLineValueOneOf,\n DescriptionLineDescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n /** Description line name. */\n name?: DescriptionLineName;\n}\n\n/** @oneof */\nexport interface DescriptionLineValueOneOf {\n /** Description line plain text value. */\n plainText?: PlainTextValue;\n /** Description line color value. */\n colorInfo?: Color;\n}\n\n/** @oneof */\nexport interface DescriptionLineDescriptionLineValueOneOf {}\n\nexport interface DescriptionLineName {\n /**\n * Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 100\n */\n original?: string;\n /**\n * Description line name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 200\n */\n translated?: string | null;\n}\n\nexport interface PlainTextValue {\n /**\n * Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 600\n */\n original?: string;\n /**\n * Description line plain text value translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 600\n */\n translated?: string | null;\n}\n\nexport interface Color {\n /**\n * Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @maxLength 500\n */\n original?: string;\n /**\n * Description line color name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @maxLength 500\n */\n translated?: string | null;\n /** HEX or RGB color code for display. */\n code?: string | null;\n}\n\nexport enum DescriptionLineType {\n /** Unrecognized type. */\n UNRECOGNISED = 'UNRECOGNISED',\n /** Plain text type. */\n PLAIN_TEXT = 'PLAIN_TEXT',\n /** Color type. */\n COLOR = 'COLOR',\n}\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface Scope {\n /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */\n namespace?: string;\n /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */\n group?: Group;\n}\n\nexport interface Group {\n /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */\n name?: string;\n /** Item ID (when the coupon scope is limited to just one item). */\n entityId?: string | null;\n}\n\nexport interface SubscriptionOptionInfo {\n /** Subscription option settings. */\n subscriptionSettings?: SubscriptionSettings;\n /** Subscription option title. */\n title?: Title;\n /** Subscription option description. */\n description?: Description;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. */\n frequency?: SubscriptionFrequency;\n /**\n * Interval of recurring payment.\n *\n * Default: `1`.\n * If SubscriptionFrequency is Day the minimum interval is 7\n * @min 1\n * @max 3650\n */\n interval?: number | null;\n /** Whether subscription is renewed automatically at the end of each period. */\n autoRenewal?: boolean;\n /**\n * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n * @min 1\n */\n billingCycles?: number | null;\n /** Whether to allow the customer to cancel the subscription.. */\n enableCustomerCancellation?: boolean;\n /**\n * Period until first cycle starts. If applied payNow will be 0\n * If None => no free trial\n */\n freeTrialPeriod?: FreeTrialPeriod;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\nexport interface FreeTrialPeriod {\n /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n frequency?: SubscriptionFrequency;\n /**\n * interval of period\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface Title {\n /**\n * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 150\n */\n original?: string;\n /**\n * Subscription option name translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 150\n */\n translated?: string | null;\n}\n\nexport interface Description {\n /**\n * Subscription option description.\n * @maxLength 500\n */\n original?: string;\n /**\n * Translated subscription option description.\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface SecuredMedia {\n /**\n * Media ID in Wix Media Manager.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Original filename.\n * @minLength 1\n * @maxLength 1000\n */\n fileName?: string;\n /** File type. */\n fileType?: FileType;\n}\n\nexport enum FileType {\n UNSPECIFIED = 'UNSPECIFIED',\n SECURE_PICTURE = 'SECURE_PICTURE',\n SECURE_VIDEO = 'SECURE_VIDEO',\n SECURE_DOCUMENT = 'SECURE_DOCUMENT',\n SECURE_MUSIC = 'SECURE_MUSIC',\n SECURE_ARCHIVE = 'SECURE_ARCHIVE',\n}\n\n/** Type of selected payment option for catalog item */\nexport enum PaymentOptionType {\n /** The entire payment for this item happens as part of the checkout. */\n FULL_PAYMENT_ONLINE = 'FULL_PAYMENT_ONLINE',\n /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */\n FULL_PAYMENT_OFFLINE = 'FULL_PAYMENT_OFFLINE',\n /** Payment for this item is done by charging a membership. When selected, `price` is `0`. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */\n MEMBERSHIP = 'MEMBERSHIP',\n /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */\n DEPOSIT_ONLINE = 'DEPOSIT_ONLINE',\n /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */\n MEMBERSHIP_OFFLINE = 'MEMBERSHIP_OFFLINE',\n /**\n * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.\n * @documentationMaturity preview\n */\n MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER',\n}\n\nexport interface ServiceProperties {\n /**\n * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * For example, the start time of a class.\n */\n scheduledDate?: Date | null;\n /**\n * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.\n * @min 1\n * @max 10000\n */\n numberOfParticipants?: number | null;\n}\n\nexport interface PriceDescription {\n /**\n * __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n * @minLength 1\n * @maxLength 100\n */\n original?: string;\n /**\n * Price description translated into the buyer's language.\n *\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 100\n */\n translated?: string | null;\n}\n\nexport interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressType;\n}\n\n/** @oneof */\nexport interface TaxableAddressTaxableAddressDataOneOf {\n /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */\n addressType?: TaxableAddressType;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN_TAXABLE_ADDRESS = 'UNKNOWN_TAXABLE_ADDRESS',\n BUSINESS = 'BUSINESS',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\nexport interface Policy {\n /**\n * Policy title - should be translated\n * @minLength 1\n * @maxLength 29\n */\n title?: string | null;\n /**\n * Policy content - should be translated\n * @minLength 1\n * @maxLength 3000\n */\n content?: string;\n}\n\nexport interface AdditionalFee {\n /**\n * Additional fee's unique code or ID.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Additional fee's name.\n *\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n name?: string;\n /**\n * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }\n */\n price?: string;\n /**\n * Tax details.\n *\n * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.\n */\n taxDetails?: TaxDetails;\n}\n\n/** Tax details. */\nexport interface TaxDetails {\n /** Whether additional fee is taxable. */\n taxable?: boolean;\n /**\n * Reserved for internal use.\n * @format GUID\n */\n taxGroupId?: string | null;\n}\n\nexport interface ModifierGroup {\n /**\n * Modifier group id.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /** Modifier group name. */\n name?: TranslatableString;\n /**\n * List of modifiers in this group.\n * @minSize 1\n * @maxSize 25\n */\n modifiers?: ItemModifier[];\n}\n\nexport interface TranslatableString {\n /**\n * __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n *\n * Min: 1 character.\n * Max: 200 characters.\n * @minLength 1\n * @maxLength 200\n */\n original?: string;\n /**\n * String translated into the buyer's language.\n *\n * Min: 1 character.\n * Max: 400 characters.\n * Default: Same as `original`.\n * @minLength 1\n * @maxLength 400\n */\n translated?: string | null;\n}\n\nexport interface ItemModifier {\n /**\n * Modifier ID.\n * @minLength 1\n * @maxLength 36\n */\n _id?: string;\n /**\n * The quantity of this modifier.\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n /** Primary display label for the modifier. */\n label?: TranslatableString;\n /** Optional additional details or clarification for the modifier. */\n details?: TranslatableString;\n /**\n * The price of the modifier.\n * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }\n */\n price?: string | null;\n}\n\nexport interface QueryCatalogItemsRequest {\n /**\n * A list of itemIDs to filter by. If exists, the result will only include the items with the IDs passed.\n * @minLength 1\n * @maxLength 100\n * @maxSize 100\n */\n catalogItemIds?: string[] | null;\n /**\n * An item name to filter by. If exists, the result will only include items with name that starts with this string.\n * @minLength 1\n * @maxLength 100\n */\n catalogItemName?: string | null;\n /** Paging options to limit and skip a number of items. */\n paging?: Paging;\n /**\n * Optional, if exist add filter by numericId gt last_numeric_id\n * https://dev.wix.com/api/rest/wix-stores/pagination#wix-stores_pagination_pagination\n */\n lastNumericId?: string | null;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface QueryCatalogItemsResponse {\n /** Catalog info and item data. */\n catalogItems?: BasicItem[];\n /** Paging metadata. */\n metadata?: PagingMetadata;\n}\n\nexport interface BasicItem {\n /**\n * The ID of the item.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /** The name of the item. */\n name?: string;\n /** Item Media items. */\n image?: string[];\n /** The current status of the inventory */\n inStock?: boolean;\n /** current version of an item. Each time the item is modified, its `revision` changes */\n revision?: string | null;\n /**\n * Unique numeric ID\n * @readonly\n */\n numericId?: string | null;\n}\n\nexport interface NumericPropertyRange {\n /** Minimum value. */\n minValue?: number;\n /** Maximum value. */\n maxValue?: number;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface CatalogSPIConfig {\n /** Base URI which Wix eCommerce will call to access Catalog service plugin endpoints. For example, to call the Get Catalog Items endpoint at `https://my-external-catalog.com/get-catalog-items`, the base URI you provide here is `https://my-external-catalog.com`. */\n deploymentUri?: string;\n /** Configuration details for discounts applied to all items in the catalog. */\n allItemsDiscount?: AllItemsDiscountConfig;\n /** Configuration details for discounts applied to specific items in the catalog. */\n specificItemsDiscount?: SpecificItemsDiscountConfig;\n}\n\n/** Configuration for all items discount functionality in the catalog. */\nexport interface AllItemsDiscountConfig {\n /**\n * Whether the discount is enabled.\n *\n * Default: `false`.\n */\n enabled?: boolean;\n /**\n * Translatable name for \"all items discount\" in the catalog.\n * For example, for restaurant menus, this could be \"All dishes\".\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n}\n\n/** Configuration for discount functionality in the catalog. */\nexport interface SpecificItemsDiscountConfig {\n /**\n * Whether the discount is enabled.\n *\n * Default: `false`.\n */\n enabled?: boolean;\n /**\n * Translatable name for \"all items discount\" in the catalog.\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n requestId?: string | null;\n /**\n * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n * @format CURRENCY\n */\n currency?: string | null;\n /** An object that describes the identity that triggered this request. */\n identity?: IdentificationData;\n /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n languages?: string[];\n /**\n * The service provider app's instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: IdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACyDO,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,6BAA0B;AAE1B,EAAAA,YAAA,QAAK;AAEL,EAAAA,YAAA,QAAK;AANK,SAAAA;AAAA,GAAA;AAuPL,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,aAAU;AALA,SAAAA;AAAA,GAAA;AA6EL,IAAK,sBAAL,kBAAKC,yBAAL;AAEL,EAAAA,qBAAA,kBAAe;AAEf,EAAAA,qBAAA,gBAAa;AAEb,EAAAA,qBAAA,WAAQ;AANE,SAAAA;AAAA,GAAA;AAyEL,IAAK,wBAAL,kBAAKC,2BAAL;AACL,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,SAAM;AACN,EAAAA,uBAAA,UAAO;AACP,EAAAA,uBAAA,WAAQ;AACR,EAAAA,uBAAA,UAAO;AALG,SAAAA;AAAA,GAAA;AAkEL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,UAAA,iBAAc;AACd,EAAAA,UAAA,oBAAiB;AACjB,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,qBAAkB;AAClB,EAAAA,UAAA,kBAAe;AACf,EAAAA,UAAA,oBAAiB;AANP,SAAAA;AAAA,GAAA;AAUL,IAAK,oBAAL,kBAAKC,uBAAL;AAEL,EAAAA,mBAAA,yBAAsB;AAEtB,EAAAA,mBAAA,0BAAuB;AAEvB,EAAAA,mBAAA,gBAAa;AAEb,EAAAA,mBAAA,oBAAiB;AAEjB,EAAAA,mBAAA,wBAAqB;AAKrB,EAAAA,mBAAA,8CAA2C;AAfjC,SAAAA;AAAA,GAAA;AA4DL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,6BAA0B;AAC1B,EAAAA,oBAAA,cAAW;AACX,EAAAA,oBAAA,aAAU;AACV,EAAAA,oBAAA,cAAW;AAJD,SAAAA;AAAA,GAAA;AAmRL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,SAAM;AALI,SAAAA;AAAA,GAAA;","names":["WeightUnit","ItemTypeItemType","DescriptionLineType","SubscriptionFrequency","FileType","PaymentOptionType","TaxableAddressType","IdentityType"]}
|
|
@@ -503,7 +503,7 @@ declare enum PaymentOptionType {
|
|
|
503
503
|
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
504
504
|
/** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
|
|
505
505
|
FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
|
|
506
|
-
/** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
|
|
506
|
+
/** Payment for this item is done by charging a membership. When selected, `price` is `0`. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */
|
|
507
507
|
MEMBERSHIP = "MEMBERSHIP",
|
|
508
508
|
/** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
|
|
509
509
|
DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as provideHandlers$1 } from './interfaces-ecommerce-v1-catalog-provider.public-
|
|
2
|
-
export { J as AdditionalFee, Z as AllItemsDiscountConfig, U as BasicItem, B as BuyerInfo, b as BuyerInfoIdOneOf, a as CatalogReference, C as CatalogReferenceAndQuantity, Y as CatalogSPIConfig, l as Color, $ as Context, t as Description, D as DescriptionLine, i as DescriptionLineDescriptionLineValueOneOf, j as DescriptionLineName, m as DescriptionLineType, h as DescriptionLineValueOneOf, v as FileType, F as FreeTrialPeriod, G as GetCatalogItemsRequest, c as GetCatalogItemsResponse, o as Group, a1 as IdentificationData, a2 as IdentificationDataIdOneOf, a0 as IdentityType, I as Item, d as ItemData, N as ItemModifier, e as ItemType, g as ItemTypeItemType, f as ItemTypeItemTypeDataOneOf, M as ModifierGroup, V as NumericPropertyRange, O as Paging, X as PagingMetadata, w as PaymentOptionType, n as PhysicalProperties, k as PlainTextValue, H as Policy, y as PriceDescription, P as ProductName, Q as QueryCatalogItemsRequest, R as QueryCatalogItemsResponse, S as Scope, u as SecuredMedia, x as ServiceProperties, _ as SpecificItemsDiscountConfig, s as SubscriptionFrequency, q as SubscriptionOptionInfo, r as SubscriptionSettings, K as TaxDetails, z as TaxableAddress, A as TaxableAddressTaxableAddressDataOneOf, E as TaxableAddressType, T as Title, L as TranslatableString, W as WeightUnit } from './interfaces-ecommerce-v1-catalog-provider.public-
|
|
1
|
+
import { p as provideHandlers$1 } from './interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.mjs';
|
|
2
|
+
export { J as AdditionalFee, Z as AllItemsDiscountConfig, U as BasicItem, B as BuyerInfo, b as BuyerInfoIdOneOf, a as CatalogReference, C as CatalogReferenceAndQuantity, Y as CatalogSPIConfig, l as Color, $ as Context, t as Description, D as DescriptionLine, i as DescriptionLineDescriptionLineValueOneOf, j as DescriptionLineName, m as DescriptionLineType, h as DescriptionLineValueOneOf, v as FileType, F as FreeTrialPeriod, G as GetCatalogItemsRequest, c as GetCatalogItemsResponse, o as Group, a1 as IdentificationData, a2 as IdentificationDataIdOneOf, a0 as IdentityType, I as Item, d as ItemData, N as ItemModifier, e as ItemType, g as ItemTypeItemType, f as ItemTypeItemTypeDataOneOf, M as ModifierGroup, V as NumericPropertyRange, O as Paging, X as PagingMetadata, w as PaymentOptionType, n as PhysicalProperties, k as PlainTextValue, H as Policy, y as PriceDescription, P as ProductName, Q as QueryCatalogItemsRequest, R as QueryCatalogItemsResponse, S as Scope, u as SecuredMedia, x as ServiceProperties, _ as SpecificItemsDiscountConfig, s as SubscriptionFrequency, q as SubscriptionOptionInfo, r as SubscriptionSettings, K as TaxDetails, z as TaxableAddress, A as TaxableAddressTaxableAddressDataOneOf, E as TaxableAddressType, T as Title, L as TranslatableString, W as WeightUnit } from './interfaces-ecommerce-v1-catalog-provider.public-BF_vRD6m.mjs';
|
|
3
3
|
import { BuildServicePluginDefinition } from '@wix/sdk-types';
|
|
4
4
|
|
|
5
5
|
declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1>;
|