@wix/auto_sdk_ecom_validations 1.0.53 → 1.0.55

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.
Files changed (29) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js +0 -8
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +2 -2
  5. package/build/cjs/index.typings.js +0 -8
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/{interfaces-ecommerce-v1-validations-provider.public-DV4oEkPS.d.ts → interfaces-ecommerce-v1-validations-provider.public-DqSMj0EX.d.ts} +1 -41
  8. package/build/es/index.d.mts +2 -2
  9. package/build/es/index.mjs +0 -7
  10. package/build/es/index.mjs.map +1 -1
  11. package/build/es/index.typings.d.mts +2 -2
  12. package/build/es/index.typings.mjs +0 -7
  13. package/build/es/index.typings.mjs.map +1 -1
  14. package/build/es/{interfaces-ecommerce-v1-validations-provider.public-DV4oEkPS.d.mts → interfaces-ecommerce-v1-validations-provider.public-DqSMj0EX.d.mts} +1 -41
  15. package/build/internal/cjs/index.d.ts +2 -2
  16. package/build/internal/cjs/index.js +0 -8
  17. package/build/internal/cjs/index.js.map +1 -1
  18. package/build/internal/cjs/index.typings.d.ts +2 -2
  19. package/build/internal/cjs/index.typings.js +0 -8
  20. package/build/internal/cjs/index.typings.js.map +1 -1
  21. package/build/internal/cjs/{interfaces-ecommerce-v1-validations-provider.public-DV4oEkPS.d.ts → interfaces-ecommerce-v1-validations-provider.public-Ce7Pc-Pf.d.ts} +77 -39
  22. package/build/internal/es/index.d.mts +2 -2
  23. package/build/internal/es/index.mjs +0 -7
  24. package/build/internal/es/index.mjs.map +1 -1
  25. package/build/internal/es/index.typings.d.mts +2 -2
  26. package/build/internal/es/index.typings.mjs +0 -7
  27. package/build/internal/es/index.typings.mjs.map +1 -1
  28. package/build/internal/es/{interfaces-ecommerce-v1-validations-provider.public-DV4oEkPS.d.mts → interfaces-ecommerce-v1-validations-provider.public-Ce7Pc-Pf.d.mts} +77 -39
  29. package/package.json +4 -4
@@ -20,11 +20,12 @@ interface SourceInfo {
20
20
  */
21
21
  purchaseFlowId?: string | null;
22
22
  /**
23
- * The stage at which the service plugin is called.
24
- * @deprecated The stage at which the service plugin is called.
25
- * @targetRemovalDate 2026-02-01
23
+ * Whether this is a demo cart.
24
+ *
25
+ * Default: `false`
26
+ * @internal
26
27
  */
27
- stage?: Stage;
28
+ demo?: boolean;
28
29
  }
29
30
  declare enum Source {
30
31
  /** Context cannot be recognized */
@@ -34,40 +35,6 @@ declare enum Source {
34
35
  /** Called from Ecom's Checkout service */
35
36
  CHECKOUT = "CHECKOUT"
36
37
  }
37
- interface Stage extends StageStagesOneOf {
38
- /**
39
- * Deprecated. Will be removed on 2026-01-07.
40
- * @deprecated Deprecated. Will be removed on 2026-01-07.
41
- * @targetRemovalDate 2026-01-07
42
- */
43
- checkoutStage?: CheckoutStage;
44
- }
45
- /** @oneof */
46
- interface StageStagesOneOf {
47
- /**
48
- * Deprecated. Will be removed on 2026-01-07.
49
- * @deprecated Deprecated. Will be removed on 2026-01-07.
50
- * @targetRemovalDate 2026-01-07
51
- */
52
- checkoutStage?: CheckoutStage;
53
- }
54
- declare enum CheckoutStage {
55
- /**
56
- * Deprecated. Will be removed on 2026-01-07.
57
- * Used during the initialization of the checkout (Create Checkout).
58
- */
59
- INITIALIZATION = "INITIALIZATION",
60
- /**
61
- * Deprecated. Will be removed on 2026-01-07.
62
- * Used during the checkout process, such as updating or retrieving the checkout.
63
- */
64
- IN_PROGRESS = "IN_PROGRESS",
65
- /**
66
- * Deprecated. Will be removed on 2026-01-07.
67
- * Used during the creation of an order from the checkout.
68
- */
69
- ORDER_CREATION = "ORDER_CREATION"
70
- }
71
38
  /** ValidationsData is the main entity of ValidationsSPI, which contains all the data required for validations */
72
39
  interface ValidationInfo {
73
40
  /** Buyer details. */
@@ -108,6 +75,13 @@ interface ValidationInfo {
108
75
  * Used for integration and tracking across different platforms.
109
76
  */
110
77
  externalReference?: ExternalReference;
78
+ /**
79
+ * The business location ID associated with the purchase.
80
+ * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
81
+ * @internal
82
+ * @format GUID
83
+ */
84
+ businessLocationId?: string | null;
111
85
  /**
112
86
  * The site’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This represents the base currency configured for the site and remains constant regardless of the customer’s currency selection.
113
87
  * @format CURRENCY
@@ -262,6 +236,16 @@ interface PhysicalProperties {
262
236
  sku?: string | null;
263
237
  /** Whether this line item is shippable. */
264
238
  shippable?: boolean;
239
+ /**
240
+ * Product dimensions (length, width, height of the physical product).
241
+ * @internal
242
+ */
243
+ productDimensions?: Dimensions;
244
+ /**
245
+ * Package dimensions (length, width, height of the shipping package).
246
+ * @internal
247
+ */
248
+ packageDimensions?: Dimensions;
265
249
  }
266
250
  interface Dimensions {
267
251
  /**
@@ -351,6 +335,21 @@ interface SubscriptionSettings {
351
335
  * If None => no free trial
352
336
  */
353
337
  freeTrialPeriod?: FreeTrialPeriod;
338
+ /**
339
+ * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.
340
+ * @internal
341
+ */
342
+ startDate?: Date | null;
343
+ /**
344
+ * Billing configuration for recurring charges.
345
+ * @internal
346
+ */
347
+ billingSettings?: BillingSettings;
348
+ /**
349
+ * Whether the product/service/subscription access period is aligned with the billing period.
350
+ * @internal
351
+ */
352
+ productPeriodAlignment?: ProductPeriodAlignment;
354
353
  }
355
354
  /** Frequency unit of recurring payment */
356
355
  declare enum SubscriptionFrequency {
@@ -586,6 +585,16 @@ interface StreetAddress {
586
585
  number?: string;
587
586
  /** Street name. */
588
587
  name?: string;
588
+ /**
589
+ * Apartment number.
590
+ * @internal
591
+ */
592
+ apt?: string;
593
+ /**
594
+ * Optional address line 1
595
+ * @internal
596
+ */
597
+ formattedAddressLine?: string | null;
589
598
  }
590
599
  interface AddressLocation {
591
600
  /** Address latitude. */
@@ -913,6 +922,11 @@ interface TargetLineItem {
913
922
  name?: NameInLineItem;
914
923
  /** ID of the line item containing the violation. */
915
924
  _id?: string | null;
925
+ /**
926
+ * Suggested fix for resolving the line item violation.
927
+ * @internal
928
+ */
929
+ suggestedFix?: SuggestedFix;
916
930
  }
917
931
  interface ValidationsSPIConfig {
918
932
  /** Whether to validate the cart page in addition to the checkout page. Default: `false` */
@@ -923,6 +937,12 @@ interface ValidationsSPIConfig {
923
937
  * @minLength 1
924
938
  */
925
939
  deploymentUri?: string;
940
+ /**
941
+ * Optional WQL filter to apply to the validation info.
942
+ * When provided, only validation info requests that match the filter will be sent to the implementer.
943
+ * @internal
944
+ */
945
+ filter?: Record<string, any> | null;
926
946
  }
927
947
  /**
928
948
  * this message is not directly used by any service,
@@ -954,6 +974,24 @@ interface Context {
954
974
  * @format GUID
955
975
  */
956
976
  instanceId?: string | null;
977
+ /**
978
+ * Extension ID in Dev Center.
979
+ * @internal
980
+ * @maxLength 256
981
+ */
982
+ appExtensionId?: string | null;
983
+ /**
984
+ * Extension type in Dev Center.
985
+ * @internal
986
+ * @maxLength 256
987
+ */
988
+ appExtensionType?: string | null;
989
+ /**
990
+ * Invoked function.
991
+ * @internal
992
+ * @maxLength 256
993
+ */
994
+ functionName?: string | null;
957
995
  }
958
996
  declare enum IdentityType {
959
997
  UNKNOWN = "UNKNOWN",
@@ -1028,4 +1066,4 @@ declare const provideHandlers: ServicePluginDefinition<{
1028
1066
  getValidationViolations(payload: GetValidationViolationsEnvelope): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;
1029
1067
  }>;
1030
1068
 
1031
- export { DiscountType as $, type AddressWithContact as A, type BuyerDetails as B, CheckoutStage as C, type Dimensions as D, type ShippingInfo as E, type FreeTrialPeriod as F, type GetValidationViolationsRequest as G, type SelectedCarrierServiceOption as H, type ItemType as I, JurisdictionType as J, type SelectedCarrierServiceOptionPrices as K, type LineItem as L, type MultiCurrencyPrice as M, type DeliveryAllocation as N, type Carrier as O, type ProductName as P, type ApplicableLineItems as Q, type Region as R, type SourceInfo as S, type Title as T, type DeliveryTimeSlot as U, type ValidationInfo as V, WeightUnit as W, type CustomFields as X, type CustomField as Y, type AppliedDiscount as Z, type AppliedDiscountDiscountSourceOneOf as _, Source as a, type Coupon as a0, type MerchantDiscount as a1, type DiscountRule as a2, type DiscountRuleName as a3, type ExternalReference as a4, type ExtendedFields as a5, type GetValidationViolationsResponse as a6, type Violation as a7, Severity as a8, type Target as a9, type TargetTargetTypeOneOf as aa, NameInOther as ab, NameInLineItem as ac, SuggestedFix as ad, type Other as ae, type TargetLineItem as af, type ValidationsSPIConfig as ag, type Context as ah, IdentityType as ai, type IdentificationData as aj, type IdentificationDataIdOneOf as ak, type GetValidationViolationsEnvelope as al, type Stage as b, type StageStagesOneOf as c, type CatalogReference as d, type PhysicalProperties as e, DimensionsUnit as f, type ItemTypeItemTypeDataOneOf as g, ItemTypePreset as h, type SubscriptionOptionInfo as i, type SubscriptionSettings as j, SubscriptionFrequency as k, type BillingSettings as l, ProductPeriodAlignment as m, type Description as n, type LineItemPricesData as o, provideHandlers as p, type ItemTaxFullDetails as q, type TaxBreakdown as r, type GiftCard as s, type PriceSummary as t, type Address as u, type StreetAddress as v, type AddressLocation as w, type FullAddressContactDetails as x, type VatId as y, VatType as z };
1069
+ export { type DiscountRule as $, type AddressWithContact as A, type BuyerDetails as B, type CatalogReference as C, type Dimensions as D, type DeliveryAllocation as E, type FreeTrialPeriod as F, type GetValidationViolationsRequest as G, type Carrier as H, type ItemType as I, JurisdictionType as J, type ApplicableLineItems as K, type LineItem as L, type MultiCurrencyPrice as M, type DeliveryTimeSlot as N, type CustomFields as O, type ProductName as P, type CustomField as Q, type Region as R, type SourceInfo as S, type Title as T, type AppliedDiscount as U, type ValidationInfo as V, WeightUnit as W, type AppliedDiscountDiscountSourceOneOf as X, DiscountType as Y, type Coupon as Z, type MerchantDiscount as _, Source as a, type DiscountRuleName as a0, type ExternalReference as a1, type ExtendedFields as a2, type GetValidationViolationsResponse as a3, type Violation as a4, Severity as a5, type Target as a6, type TargetTargetTypeOneOf as a7, NameInOther as a8, NameInLineItem as a9, SuggestedFix as aa, type Other as ab, type TargetLineItem as ac, type ValidationsSPIConfig as ad, type Context as ae, IdentityType as af, type IdentificationData as ag, type IdentificationDataIdOneOf as ah, type GetValidationViolationsEnvelope as ai, type PhysicalProperties as b, DimensionsUnit as c, type ItemTypeItemTypeDataOneOf as d, ItemTypePreset as e, type SubscriptionOptionInfo as f, type SubscriptionSettings as g, SubscriptionFrequency as h, type BillingSettings as i, ProductPeriodAlignment as j, type Description as k, type LineItemPricesData as l, type ItemTaxFullDetails as m, type TaxBreakdown as n, type GiftCard as o, provideHandlers as p, type PriceSummary as q, type Address as r, type StreetAddress as s, type AddressLocation as t, type FullAddressContactDetails as u, type VatId as v, VatType as w, type ShippingInfo as x, type SelectedCarrierServiceOption as y, type SelectedCarrierServiceOptionPrices as z };
@@ -1,5 +1,5 @@
1
- import { p as provideHandlers$1 } from './interfaces-ecommerce-v1-validations-provider.public-DV4oEkPS.mjs';
2
- export { u as Address, w as AddressLocation, A as AddressWithContact, Q as ApplicableLineItems, Z as AppliedDiscount, _ as AppliedDiscountDiscountSourceOneOf, l as BillingSettings, B as BuyerDetails, O as Carrier, d as CatalogReference, C as CheckoutStage, ah as Context, a0 as Coupon, Y as CustomField, X as CustomFields, N as DeliveryAllocation, U as DeliveryTimeSlot, n as Description, D as Dimensions, f as DimensionsUnit, a2 as DiscountRule, a3 as DiscountRuleName, $ as DiscountType, a5 as ExtendedFields, a4 as ExternalReference, F as FreeTrialPeriod, x as FullAddressContactDetails, G as GetValidationViolationsRequest, a6 as GetValidationViolationsResponse, s as GiftCard, aj as IdentificationData, ak as IdentificationDataIdOneOf, ai as IdentityType, q as ItemTaxFullDetails, I as ItemType, g as ItemTypeItemTypeDataOneOf, h as ItemTypePreset, J as JurisdictionType, L as LineItem, o as LineItemPricesData, a1 as MerchantDiscount, M as MultiCurrencyPrice, ac as NameInLineItem, ab as NameInOther, ae as Other, e as PhysicalProperties, t as PriceSummary, P as ProductName, m as ProductPeriodAlignment, R as Region, H as SelectedCarrierServiceOption, K as SelectedCarrierServiceOptionPrices, a8 as Severity, E as ShippingInfo, a as Source, S as SourceInfo, b as Stage, c as StageStagesOneOf, v as StreetAddress, k as SubscriptionFrequency, i as SubscriptionOptionInfo, j as SubscriptionSettings, ad as SuggestedFix, a9 as Target, af as TargetLineItem, aa as TargetTargetTypeOneOf, r as TaxBreakdown, T as Title, V as ValidationInfo, ag as ValidationsSPIConfig, y as VatId, z as VatType, a7 as Violation, W as WeightUnit } from './interfaces-ecommerce-v1-validations-provider.public-DV4oEkPS.mjs';
1
+ import { p as provideHandlers$1 } from './interfaces-ecommerce-v1-validations-provider.public-Ce7Pc-Pf.mjs';
2
+ export { r as Address, t as AddressLocation, A as AddressWithContact, K as ApplicableLineItems, U as AppliedDiscount, X as AppliedDiscountDiscountSourceOneOf, i as BillingSettings, B as BuyerDetails, H as Carrier, C as CatalogReference, ae as Context, Z as Coupon, Q as CustomField, O as CustomFields, E as DeliveryAllocation, N as DeliveryTimeSlot, k as Description, D as Dimensions, c as DimensionsUnit, $ as DiscountRule, a0 as DiscountRuleName, Y as DiscountType, a2 as ExtendedFields, a1 as ExternalReference, F as FreeTrialPeriod, u as FullAddressContactDetails, G as GetValidationViolationsRequest, a3 as GetValidationViolationsResponse, o as GiftCard, ag as IdentificationData, ah as IdentificationDataIdOneOf, af as IdentityType, m as ItemTaxFullDetails, I as ItemType, d as ItemTypeItemTypeDataOneOf, e as ItemTypePreset, J as JurisdictionType, L as LineItem, l as LineItemPricesData, _ as MerchantDiscount, M as MultiCurrencyPrice, a9 as NameInLineItem, a8 as NameInOther, ab as Other, b as PhysicalProperties, q as PriceSummary, P as ProductName, j as ProductPeriodAlignment, R as Region, y as SelectedCarrierServiceOption, z as SelectedCarrierServiceOptionPrices, a5 as Severity, x as ShippingInfo, a as Source, S as SourceInfo, s as StreetAddress, h as SubscriptionFrequency, f as SubscriptionOptionInfo, g as SubscriptionSettings, aa as SuggestedFix, a6 as Target, ac as TargetLineItem, a7 as TargetTargetTypeOneOf, n as TaxBreakdown, T as Title, V as ValidationInfo, ad as ValidationsSPIConfig, v as VatId, w as VatType, a4 as Violation, W as WeightUnit } from './interfaces-ecommerce-v1-validations-provider.public-Ce7Pc-Pf.mjs';
3
3
  import { BuildServicePluginDefinition } from '@wix/sdk-types';
4
4
 
5
5
  declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1> & typeof provideHandlers$1;
@@ -5,12 +5,6 @@ var Source = /* @__PURE__ */ ((Source2) => {
5
5
  Source2["CHECKOUT"] = "CHECKOUT";
6
6
  return Source2;
7
7
  })(Source || {});
8
- var CheckoutStage = /* @__PURE__ */ ((CheckoutStage2) => {
9
- CheckoutStage2["INITIALIZATION"] = "INITIALIZATION";
10
- CheckoutStage2["IN_PROGRESS"] = "IN_PROGRESS";
11
- CheckoutStage2["ORDER_CREATION"] = "ORDER_CREATION";
12
- return CheckoutStage2;
13
- })(CheckoutStage || {});
14
8
  var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
15
9
  DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
16
10
  DimensionsUnit2["MM"] = "MM";
@@ -159,7 +153,6 @@ var provideHandlers2 = createServicePluginModule(
159
153
  provideHandlers
160
154
  );
161
155
  export {
162
- CheckoutStage,
163
156
  DimensionsUnit,
164
157
  DiscountType,
165
158
  IdentityType,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/service-plugins-types.ts","../../../src/interfaces-ecommerce-v1-validations-provider.public.ts","../../../src/interfaces-ecommerce-v1-validations-provider.context.ts"],"sourcesContent":["export interface GetValidationViolationsRequest {\n /** Information about the source of the request. */\n sourceInfo?: SourceInfo;\n /** Information to validate. */\n validationInfo?: ValidationInfo;\n /**\n * Custom field data to validate.\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface SourceInfo {\n /** Source of the request. */\n source?: Source;\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /**\n * The stage at which the service plugin is called.\n * @deprecated The stage at which the service plugin is called.\n * @targetRemovalDate 2026-02-01\n */\n stage?: Stage;\n}\n\nexport enum Source {\n /** Context cannot be recognized */\n OTHER = 'OTHER',\n /** Called from Ecom's Cart service */\n CART = 'CART',\n /** Called from Ecom's Checkout service */\n CHECKOUT = 'CHECKOUT',\n}\n\nexport interface Stage extends StageStagesOneOf {\n /**\n * Deprecated. Will be removed on 2026-01-07.\n * @deprecated Deprecated. Will be removed on 2026-01-07.\n * @targetRemovalDate 2026-01-07\n */\n checkoutStage?: CheckoutStage;\n}\n\n/** @oneof */\nexport interface StageStagesOneOf {\n /**\n * Deprecated. Will be removed on 2026-01-07.\n * @deprecated Deprecated. Will be removed on 2026-01-07.\n * @targetRemovalDate 2026-01-07\n */\n checkoutStage?: CheckoutStage;\n}\n\nexport enum CheckoutStage {\n /**\n * Deprecated. Will be removed on 2026-01-07.\n * Used during the initialization of the checkout (Create Checkout).\n */\n INITIALIZATION = 'INITIALIZATION',\n /**\n * Deprecated. Will be removed on 2026-01-07.\n * Used during the checkout process, such as updating or retrieving the checkout.\n */\n IN_PROGRESS = 'IN_PROGRESS',\n /**\n * Deprecated. Will be removed on 2026-01-07.\n * Used during the creation of an order from the checkout.\n */\n ORDER_CREATION = 'ORDER_CREATION',\n}\n\n/** ValidationsData is the main entity of ValidationsSPI, which contains all the data required for validations */\nexport interface ValidationInfo {\n /** Buyer details. */\n buyerDetails?: BuyerDetails;\n /**\n * Line items. Max: 300 line items\n * @maxSize 300\n */\n lineItems?: LineItem[];\n /**\n * Applied gift card details.\n *\n * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards).\n */\n giftCard?: GiftCard;\n /**\n * Weight measurement unit.\n * Default: Site's weight unit\n */\n weightUnit?: WeightUnit;\n /** Price summary. */\n priceSummary?: PriceSummary;\n /** Billing information. */\n billingInfo?: AddressWithContact;\n /** Shipping address and contact details. */\n shippingAddress?: AddressWithContact;\n /** Shipping information. */\n shippingInfo?: ShippingInfo;\n /** Custom fields. */\n customFields?: CustomFields;\n /**\n * Applied discounts.\n * @maxSize 320\n */\n appliedDiscounts?: AppliedDiscount[];\n /**\n * References to an external app and resource associated with this checkout.\n * Used for integration and tracking across different platforms.\n */\n externalReference?: ExternalReference;\n /**\n * The site’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This represents the base currency configured for the site and remains constant regardless of the customer’s currency selection.\n * @format CURRENCY\n * @readonly\n */\n currency?: string | null;\n /**\n * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview) during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n *\n * This reflects the customer’s preferred display currency and may differ from the site’s default currency.\n * When no specific currency is selected by the customer, this matches the `currency` property.\n * @readonly\n * @format CURRENCY\n */\n conversionCurrency?: string | null;\n /**\n * The currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n *\n * This is determined by the [customer's selected currency](https://support.wix.com/en/article/multicurrency-an-overview) and the site’s supported payment currencies.\n * If the customer’s selected currency is supported for payment, this matches the `conversionCurrency` property. If not supported, this falls back to the `currency` property.\n * @readonly\n * @format CURRENCY\n */\n paymentCurrency?: string | null;\n}\n\nexport interface BuyerDetails {\n /**\n * Buyer's email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * Contact ID if one exists.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface LineItem {\n /**\n * Line item ID.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Item quantity.\n * Min: `0`\n * Max: `100000`\n * @max 100000\n */\n quantity?: number;\n /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */\n catalogReference?: CatalogReference;\n /**\n * Product name. For example,\n * + Stores: `product.name`\n * + Bookings: `service.info.name`\n * + Events: `ticket.name`\n */\n productName?: ProductName;\n /** Price of the item **after** catalog-defined discount and line item discounts. */\n price?: MultiCurrencyPrice;\n /** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */\n physicalProperties?: PhysicalProperties;\n /** Item type. */\n itemType?: ItemType;\n /** [Subscription option](https://dev.wix.com/api/rest/wix-stores/subscription-options/introduction) information. A subscription is a product that is sold on a recurring basis. */\n subscriptionOptionInfo?: SubscriptionOptionInfo;\n /** Price breakdown for this line item. */\n pricesBreakdown?: LineItemPricesData;\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.\n *\n * Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\n *\n * For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\n * or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).\n */\n options?: Record<string, any> | null;\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 MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\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 Dimensions {\n /**\n * Length. Measurement unit is handled at the system level (metric/imperial).\n * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n */\n length?: string | null;\n /**\n * Width. Measurement unit is handled at the system level (metric/imperial).\n * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n */\n width?: string | null;\n /**\n * Height. Measurement unit is handled at the system level (metric/imperial).\n * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n */\n height?: string | null;\n /** Unit of measurement for dimensions (length, width, height). */\n unit?: DimensionsUnit;\n}\n\nexport enum DimensionsUnit {\n UNKNOWN_DIMENSIONS_UNIT = 'UNKNOWN_DIMENSIONS_UNIT',\n /** Millimeters. */\n MM = 'MM',\n /** Centimeters. */\n CM = 'CM',\n /** Meters. */\n M = 'M',\n /** Inches. */\n IN = 'IN',\n /** Feet. */\n FT = 'FT',\n /** Yards. */\n YD = 'YD',\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypePreset;\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?: ItemTypePreset;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypePreset {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\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 * Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface BillingSettings {\n /**\n * Day of month (1-28) to anchor recurring billing to. When set, billing recurs on this day each cycle. Does not apply to weekly subscriptions.\n * @min 1\n * @max 28\n */\n anchorDay?: number | null;\n}\n\nexport enum ProductPeriodAlignment {\n /** Billing period equals the product/service/subscription access period. */\n ALIGNED_WITH_BILLING_PERIOD = 'ALIGNED_WITH_BILLING_PERIOD',\n /** Billing period is independent of the product/service/subscription access period. */\n NOT_ALIGNED_WITH_BILLING_PERIOD = 'NOT_ALIGNED_WITH_BILLING_PERIOD',\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 LineItemPricesData {\n /** Total price after discounts and after tax. */\n totalPriceAfterTax?: MultiCurrencyPrice;\n /** Total price after discounts, and before tax. */\n totalPriceBeforeTax?: MultiCurrencyPrice;\n /** Tax details. */\n taxDetails?: ItemTaxFullDetails;\n /** Total discount applied for the line item. */\n totalDiscount?: MultiCurrencyPrice;\n /** Catalog price **after** catalog-defined discount and automatic discounts. */\n price?: MultiCurrencyPrice;\n /** Item price **before** automatic discounts, coupons, and global discounts, **after** catalog-defined discount. Defaults to `price` when not provided. */\n priceBeforeDiscounts?: MultiCurrencyPrice;\n /** Total price **after** catalog-defined discount and automatic discounts, taking line item's quantity into account. */\n lineItemPrice?: MultiCurrencyPrice;\n /** Item price **before** all discounts. Defaults to `price` when not provided. */\n fullPrice?: MultiCurrencyPrice;\n}\n\nexport interface ItemTaxFullDetails {\n /** The portion of the total amount of this estimate that was taxable. */\n taxableAmount?: MultiCurrencyPrice;\n /** Calculated tax, based on `taxable_amount`. */\n totalTax?: MultiCurrencyPrice;\n /** Indicates whether the price already includes tax. */\n isTaxIncluded?: boolean | null;\n /**\n * A detailed description of all the tax authorities applied on this item.\n * @maxSize 1000\n */\n taxBreakdown?: TaxBreakdown[];\n}\n\nexport interface TaxBreakdown {\n /**\n * The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\".\n * @maxLength 200\n */\n jurisdiction?: string | null;\n /** The amount of this line item price that was considered nontaxable. (Decimal value) */\n nonTaxableAmount?: MultiCurrencyPrice;\n /**\n * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)\n * @decimalValue options { maxScale:6 }\n */\n rate?: string | null;\n /** The amount of tax estimated for this line item. (Decimal value) */\n taxAmount?: MultiCurrencyPrice;\n /** The taxable amount of this line item. */\n taxableAmount?: MultiCurrencyPrice;\n /**\n * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc.\n * @maxLength 200\n */\n taxType?: string | null;\n /**\n * The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\n * This name should be explicit enough to allow the merchant to understand what tax was calculated.\n * @maxLength 200\n */\n taxName?: string | null;\n /** The type of the jurisdiction in which this tax detail applies. */\n jurisdictionType?: JurisdictionType;\n}\n\n/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\nexport enum JurisdictionType {\n /** Undefined jurisdiction type. */\n UNDEFINED = 'UNDEFINED',\n /** Country jurisdiction. */\n COUNTRY = 'COUNTRY',\n /** State jurisdiction. */\n STATE = 'STATE',\n /** County jurisdiction. */\n COUNTY = 'COUNTY',\n /** City jurisdiction. */\n CITY = 'CITY',\n /** Special jurisdiction. */\n SPECIAL = 'SPECIAL',\n}\n\nexport interface GiftCard {\n /**\n * Gift card ID.\n * @deprecated\n */\n _id?: string;\n /** Gift card obfuscated code. */\n obfuscatedCode?: string;\n /** Gift card value. */\n amount?: MultiCurrencyPrice;\n /**\n * App ID of the gift card provider.\n * @format GUID\n */\n appId?: string;\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\nexport interface PriceSummary {\n /** Subtotal of all line items, before discounts and before tax. */\n subtotal?: MultiCurrencyPrice;\n /** Total shipping price, before discounts and before tax. */\n shipping?: MultiCurrencyPrice;\n /** Total tax. */\n tax?: MultiCurrencyPrice;\n /** Total calculated discount value. */\n discount?: MultiCurrencyPrice;\n /** Total price **after** discounts, gift cards, and tax. */\n total?: MultiCurrencyPrice;\n /** Total additional fees price **before** tax. */\n additionalFees?: MultiCurrencyPrice;\n}\n\n/** Billing Info and shipping details */\nexport interface AddressWithContact {\n /** Address. */\n address?: Address;\n /** Contact details. */\n contactDetails?: FullAddressContactDetails;\n}\n\n/** Physical address */\nexport interface Address {\n /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 50\n */\n postalCode?: string | null;\n /** Street address. */\n streetAddress?: StreetAddress;\n /**\n * Main address line (usually street name and number).\n * @maxLength 150\n */\n addressLine1?: string | null;\n /**\n * Free text providing more detailed address info. Usually contains apt, suite, floor.\n * @maxLength 100\n */\n addressLine2?: string | null;\n /** Geocode object containing latitude and longitude coordinates. */\n location?: AddressLocation;\n /**\n * Country's full name.\n * @readonly\n */\n countryFullname?: string | null;\n /**\n * Subdivision full-name.\n * @readonly\n */\n subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /**\n * First name.\n * @maxLength 100\n */\n firstName?: string | null;\n /**\n * Last name.\n * @maxLength 100\n */\n lastName?: string | null;\n /**\n * Phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatType;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\nexport interface ShippingInfo {\n /** Selected option out of the options allowed for the `region`. */\n selectedCarrierServiceOption?: SelectedCarrierServiceOption;\n}\n\nexport interface SelectedCarrierServiceOption {\n /**\n * Unique identifier of selected option. For example, `usps_std_overnight`.\n * @maxLength 100\n */\n code?: string;\n /**\n * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).\n * For example, \"Standard\" or \"First-Class Package International\".\n * @maxLength 250\n */\n title?: string;\n /** Shipping costs. */\n cost?: SelectedCarrierServiceOptionPrices;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @maxSize 300\n */\n deliveryAllocations?: DeliveryAllocation[];\n /** If the delivery solution is a partial and doesn't apply to all items. */\n partial?: boolean | null;\n /** Expected delivery time slot. */\n deliveryTimeSlot?: DeliveryTimeSlot;\n}\n\nexport interface SelectedCarrierServiceOptionPrices {\n /** Total shipping price, after discount and after tax. */\n totalPriceAfterTax?: MultiCurrencyPrice;\n /** Total price of shipping after discounts (when relevant), and before tax. */\n totalPriceBeforeTax?: MultiCurrencyPrice;\n /** Tax details. */\n taxDetails?: ItemTaxFullDetails;\n /** Shipping discount before tax. */\n totalDiscount?: MultiCurrencyPrice;\n /** Shipping price before discount and before tax. */\n price?: MultiCurrencyPrice;\n}\n\nexport interface DeliveryAllocation {\n /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */\n deliveryCarrier?: Carrier;\n /** The delivery region that are relevant for this delivery solution. */\n deliveryRegion?: Region;\n /** Populated if the delivery solution is a partially supplied by this carrier. */\n applicableLineItems?: ApplicableLineItems;\n}\n\nexport interface Carrier {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface Region {\n /**\n * The delivery region id.\n * @format GUID\n */\n _id?: string | null;\n /**\n * The delivery region name.\n * @maxLength 100\n */\n name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n /**\n * Line items that the delivery solution is for.\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface DeliveryTimeSlot {\n /** starting time of the delivery time slot */\n from?: Date | null;\n /** ending time of the delivery time slot */\n to?: Date | null;\n}\n\nexport interface CustomFields {\n /**\n * List of custom fields\n * @maxSize 50\n */\n fields?: CustomField[];\n}\n\nexport interface CustomField {\n /** Custom field value. */\n value?: any;\n /**\n * Custom field title.\n * @minLength 1\n * @maxLength 500\n */\n title?: string;\n /**\n * Translated custom field title.\n * @minLength 1\n * @maxLength 500\n */\n translatedTitle?: string | null;\n}\n\nexport interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {\n /** Coupon details. */\n coupon?: Coupon;\n /** Merchant discount. */\n merchantDiscount?: MerchantDiscount;\n /** Discount rule. */\n discountRule?: DiscountRule;\n /** Discount type. */\n discountType?: DiscountType;\n /**\n * IDs of the line items the discount applies to.\n * @format GUID\n */\n lineItemIds?: string[];\n}\n\n/** @oneof */\nexport interface AppliedDiscountDiscountSourceOneOf {\n /** Coupon details. */\n coupon?: Coupon;\n /** Merchant discount. */\n merchantDiscount?: MerchantDiscount;\n /** Discount rule. */\n discountRule?: DiscountRule;\n}\n\nexport enum DiscountType {\n /** Global discount. */\n GLOBAL = 'GLOBAL',\n /** Discount for specific items. */\n SPECIFIC_ITEMS = 'SPECIFIC_ITEMS',\n /** Shipping discount. */\n SHIPPING = 'SHIPPING',\n}\n\n/** Coupon */\nexport interface Coupon {\n /** Coupon ID. */\n _id?: string;\n /** Coupon code. */\n code?: string;\n /** Coupon name. */\n name?: string;\n /** @decimalValue options { gte:0, lte:1000000000000000 } */\n amount?: string;\n}\n\nexport interface MerchantDiscount {\n /** @decimalValue options { gte:0, lte:1000000000000000 } */\n amount?: string;\n}\n\nexport interface DiscountRule {\n /**\n * Discount rule ID.\n * @format GUID\n */\n _id?: string;\n /** Discount rule name. */\n name?: DiscountRuleName;\n /** @decimalValue options { gte:0, lte:1000000000000000 } */\n amount?: string;\n}\n\nexport interface DiscountRuleName {\n /**\n * Original discount rule name (in site's default language).\n * @minLength 1\n * @maxLength 256\n */\n original?: string;\n /**\n * Translated discount rule name according to buyer language. Defaults to `original` when not provided.\n * @minLength 1\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetValidationViolationsResponse {\n /** List of validation violations. */\n violations?: Violation[];\n}\n\nexport interface Violation {\n /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */\n severity?: Severity;\n /** Target location on a checkout or cart page where the violation will be displayed. */\n target?: Target;\n /**\n * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href=\"https://www.wix.com\">Click me</a>`.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\nexport enum Severity {\n /** The user is allowed to move forward in the flow. */\n WARNING = 'WARNING',\n /**\n * The user is blocked from moving forward in the flow.\n * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.\n */\n ERROR = 'ERROR',\n}\n\nexport interface Target extends TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: TargetLineItem;\n}\n\n/** @oneof */\nexport interface TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: TargetLineItem;\n}\n\n/** Available locations on the webpage */\nexport enum NameInOther {\n /** Default location, in case no specific location is specified. */\n OTHER_DEFAULT = 'OTHER_DEFAULT',\n}\n\n/** Available locations on the line item */\nexport enum NameInLineItem {\n /** Default location, in case no specific location is specified. */\n LINE_ITEM_DEFAULT = 'LINE_ITEM_DEFAULT',\n}\n\nexport enum SuggestedFix {\n /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */\n UNKNOWN_SUGGESTED_FIX = 'UNKNOWN_SUGGESTED_FIX',\n /** The line item should be removed from the cart or checkout to resolve the violation. */\n REMOVE_LINE_ITEM = 'REMOVE_LINE_ITEM',\n}\n\n/** General (other) violation. */\nexport interface Other {\n /** Location on a checkout or a cart page where a general (other) violation will be displayed. */\n name?: NameInOther;\n}\n\n/** Specific line item violation. */\nexport interface TargetLineItem {\n /** Location on a checkout or a cart page where the specific line item violation will be displayed. */\n name?: NameInLineItem;\n /** ID of the line item containing the violation. */\n _id?: string | null;\n}\n\nexport interface ValidationsSPIConfig {\n /** Whether to validate the cart page in addition to the checkout page. Default: `false` */\n validateInCart?: boolean;\n /**\n * Required. Base URI where the endpoints are called. Wix appends the endpoint path to the base URI.\n * For example, to call the Get Validation Violations endpoint at `https://my-validations.com/v1/get-violations`, the base URI you provide here is `https://my-validations.com`.\n * @minLength 1\n */\n deploymentUri?: string;\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 GetValidationViolationsRequest,\n GetValidationViolationsResponse,\n} from './service-plugins-types.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } 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 GetValidationViolationsEnvelope {\n request: GetValidationViolationsRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * This method retrieves validation violations from your app.\n *\n * Wix calls this method when certain actions are performed on a visitor's cart and checkout. For example, when an item is added to the cart, or when a coupon is added to a checkout.\n * This method validates a visitor's cart and checkout, and returns any validation violations (using the structure provided by Wix eCommerce). Site visitors can see the validation violations in their cart and checkout pages. If there aren't any validation violations, the method returns an object containing an empty list.\n *\n * > __Notes:__\n * > + Do not call the Estimate Cart Totals, Estimate Current Cart Totals or Get Checkout methods from your implementation code for Get Validation Violations. Doing so will result in an error.\n * > + By default, this method only retrieves validation violations from a visitor's checkout. If you want to also retrieve validation violations from a visitor's cart, set the `validateInCart` parameter to `true` in the Ecom Validations Integration's config file. */\n getValidationViolations(\n payload: GetValidationViolationsEnvelope\n ): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;\n}>('ECOM_VALIDATIONS', [\n {\n name: 'getValidationViolations',\n primaryHttpMappingPath: '/v1/get-violations',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'request.validationInfo.lineItems.physicalProperties.weight',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n {\n path: 'request.validationInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'request.validationInfo.shippingInfo.selectedCarrierServiceOption.deliveryTimeSlot.from',\n },\n {\n path: 'request.validationInfo.shippingInfo.selectedCarrierServiceOption.deliveryTimeSlot.to',\n },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'request.validationInfo.billingInfo.address' },\n { path: 'request.validationInfo.shippingAddress.address' },\n ],\n },\n ]);\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-ecommerce-v1-validations-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-validations-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> &\n typeof publicProvideHandlers = createServicePluginModule(\n publicProvideHandlers\n);\n"],"mappings":"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","names":["Source","CheckoutStage","DimensionsUnit","ItemTypePreset","SubscriptionFrequency","ProductPeriodAlignment","JurisdictionType","WeightUnit","VatType","DiscountType","Severity","NameInOther","NameInLineItem","SuggestedFix","IdentityType","provideHandlers"]}
1
+ {"version":3,"sources":["../../../src/service-plugins-types.ts","../../../src/interfaces-ecommerce-v1-validations-provider.public.ts","../../../src/interfaces-ecommerce-v1-validations-provider.context.ts"],"sourcesContent":["export interface GetValidationViolationsRequest {\n /** Information about the source of the request. */\n sourceInfo?: SourceInfo;\n /** Information to validate. */\n validationInfo?: ValidationInfo;\n /**\n * Custom field data to validate.\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface SourceInfo {\n /** Source of the request. */\n source?: Source;\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /**\n * Whether this is a demo cart.\n *\n * Default: `false`\n * @internal\n */\n demo?: boolean;\n}\n\nexport enum Source {\n /** Context cannot be recognized */\n OTHER = 'OTHER',\n /** Called from Ecom's Cart service */\n CART = 'CART',\n /** Called from Ecom's Checkout service */\n CHECKOUT = 'CHECKOUT',\n}\n\n/** ValidationsData is the main entity of ValidationsSPI, which contains all the data required for validations */\nexport interface ValidationInfo {\n /** Buyer details. */\n buyerDetails?: BuyerDetails;\n /**\n * Line items. Max: 300 line items\n * @maxSize 300\n */\n lineItems?: LineItem[];\n /**\n * Applied gift card details.\n *\n * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards).\n */\n giftCard?: GiftCard;\n /**\n * Weight measurement unit.\n * Default: Site's weight unit\n */\n weightUnit?: WeightUnit;\n /** Price summary. */\n priceSummary?: PriceSummary;\n /** Billing information. */\n billingInfo?: AddressWithContact;\n /** Shipping address and contact details. */\n shippingAddress?: AddressWithContact;\n /** Shipping information. */\n shippingInfo?: ShippingInfo;\n /** Custom fields. */\n customFields?: CustomFields;\n /**\n * Applied discounts.\n * @maxSize 320\n */\n appliedDiscounts?: AppliedDiscount[];\n /**\n * References to an external app and resource associated with this checkout.\n * Used for integration and tracking across different platforms.\n */\n externalReference?: ExternalReference;\n /**\n * The business location ID associated with the purchase.\n * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).\n * @internal\n * @format GUID\n */\n businessLocationId?: string | null;\n /**\n * The site’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This represents the base currency configured for the site and remains constant regardless of the customer’s currency selection.\n * @format CURRENCY\n * @readonly\n */\n currency?: string | null;\n /**\n * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview) during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n *\n * This reflects the customer’s preferred display currency and may differ from the site’s default currency.\n * When no specific currency is selected by the customer, this matches the `currency` property.\n * @readonly\n * @format CURRENCY\n */\n conversionCurrency?: string | null;\n /**\n * The currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n *\n * This is determined by the [customer's selected currency](https://support.wix.com/en/article/multicurrency-an-overview) and the site’s supported payment currencies.\n * If the customer’s selected currency is supported for payment, this matches the `conversionCurrency` property. If not supported, this falls back to the `currency` property.\n * @readonly\n * @format CURRENCY\n */\n paymentCurrency?: string | null;\n}\n\nexport interface BuyerDetails {\n /**\n * Buyer's email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * Contact ID if one exists.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface LineItem {\n /**\n * Line item ID.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Item quantity.\n * Min: `0`\n * Max: `100000`\n * @max 100000\n */\n quantity?: number;\n /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */\n catalogReference?: CatalogReference;\n /**\n * Product name. For example,\n * + Stores: `product.name`\n * + Bookings: `service.info.name`\n * + Events: `ticket.name`\n */\n productName?: ProductName;\n /** Price of the item **after** catalog-defined discount and line item discounts. */\n price?: MultiCurrencyPrice;\n /** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */\n physicalProperties?: PhysicalProperties;\n /** Item type. */\n itemType?: ItemType;\n /** [Subscription option](https://dev.wix.com/api/rest/wix-stores/subscription-options/introduction) information. A subscription is a product that is sold on a recurring basis. */\n subscriptionOptionInfo?: SubscriptionOptionInfo;\n /** Price breakdown for this line item. */\n pricesBreakdown?: LineItemPricesData;\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.\n *\n * Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\n *\n * For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\n * or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).\n */\n options?: Record<string, any> | null;\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 MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\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 * Product dimensions (length, width, height of the physical product).\n * @internal\n */\n productDimensions?: Dimensions;\n /**\n * Package dimensions (length, width, height of the shipping package).\n * @internal\n */\n packageDimensions?: Dimensions;\n}\n\nexport interface Dimensions {\n /**\n * Length. Measurement unit is handled at the system level (metric/imperial).\n * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n */\n length?: string | null;\n /**\n * Width. Measurement unit is handled at the system level (metric/imperial).\n * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n */\n width?: string | null;\n /**\n * Height. Measurement unit is handled at the system level (metric/imperial).\n * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n */\n height?: string | null;\n /** Unit of measurement for dimensions (length, width, height). */\n unit?: DimensionsUnit;\n}\n\nexport enum DimensionsUnit {\n UNKNOWN_DIMENSIONS_UNIT = 'UNKNOWN_DIMENSIONS_UNIT',\n /** Millimeters. */\n MM = 'MM',\n /** Centimeters. */\n CM = 'CM',\n /** Meters. */\n M = 'M',\n /** Inches. */\n IN = 'IN',\n /** Feet. */\n FT = 'FT',\n /** Yards. */\n YD = 'YD',\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n /** Preset item type. */\n preset?: ItemTypePreset;\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?: ItemTypePreset;\n /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n custom?: string;\n}\n\nexport enum ItemTypePreset {\n UNRECOGNISED = 'UNRECOGNISED',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n GIFT_CARD = 'GIFT_CARD',\n SERVICE = 'SERVICE',\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 * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.\n * @internal\n */\n startDate?: Date | null;\n /**\n * Billing configuration for recurring charges.\n * @internal\n */\n billingSettings?: BillingSettings;\n /**\n * Whether the product/service/subscription access period is aligned with the billing period.\n * @internal\n */\n productPeriodAlignment?: ProductPeriodAlignment;\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 * Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.\n * @min 1\n * @max 999\n */\n interval?: number;\n}\n\nexport interface BillingSettings {\n /**\n * Day of month (1-28) to anchor recurring billing to. When set, billing recurs on this day each cycle. Does not apply to weekly subscriptions.\n * @min 1\n * @max 28\n */\n anchorDay?: number | null;\n}\n\nexport enum ProductPeriodAlignment {\n /** Billing period equals the product/service/subscription access period. */\n ALIGNED_WITH_BILLING_PERIOD = 'ALIGNED_WITH_BILLING_PERIOD',\n /** Billing period is independent of the product/service/subscription access period. */\n NOT_ALIGNED_WITH_BILLING_PERIOD = 'NOT_ALIGNED_WITH_BILLING_PERIOD',\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 LineItemPricesData {\n /** Total price after discounts and after tax. */\n totalPriceAfterTax?: MultiCurrencyPrice;\n /** Total price after discounts, and before tax. */\n totalPriceBeforeTax?: MultiCurrencyPrice;\n /** Tax details. */\n taxDetails?: ItemTaxFullDetails;\n /** Total discount applied for the line item. */\n totalDiscount?: MultiCurrencyPrice;\n /** Catalog price **after** catalog-defined discount and automatic discounts. */\n price?: MultiCurrencyPrice;\n /** Item price **before** automatic discounts, coupons, and global discounts, **after** catalog-defined discount. Defaults to `price` when not provided. */\n priceBeforeDiscounts?: MultiCurrencyPrice;\n /** Total price **after** catalog-defined discount and automatic discounts, taking line item's quantity into account. */\n lineItemPrice?: MultiCurrencyPrice;\n /** Item price **before** all discounts. Defaults to `price` when not provided. */\n fullPrice?: MultiCurrencyPrice;\n}\n\nexport interface ItemTaxFullDetails {\n /** The portion of the total amount of this estimate that was taxable. */\n taxableAmount?: MultiCurrencyPrice;\n /** Calculated tax, based on `taxable_amount`. */\n totalTax?: MultiCurrencyPrice;\n /** Indicates whether the price already includes tax. */\n isTaxIncluded?: boolean | null;\n /**\n * A detailed description of all the tax authorities applied on this item.\n * @maxSize 1000\n */\n taxBreakdown?: TaxBreakdown[];\n}\n\nexport interface TaxBreakdown {\n /**\n * The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\".\n * @maxLength 200\n */\n jurisdiction?: string | null;\n /** The amount of this line item price that was considered nontaxable. (Decimal value) */\n nonTaxableAmount?: MultiCurrencyPrice;\n /**\n * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)\n * @decimalValue options { maxScale:6 }\n */\n rate?: string | null;\n /** The amount of tax estimated for this line item. (Decimal value) */\n taxAmount?: MultiCurrencyPrice;\n /** The taxable amount of this line item. */\n taxableAmount?: MultiCurrencyPrice;\n /**\n * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc.\n * @maxLength 200\n */\n taxType?: string | null;\n /**\n * The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\n * This name should be explicit enough to allow the merchant to understand what tax was calculated.\n * @maxLength 200\n */\n taxName?: string | null;\n /** The type of the jurisdiction in which this tax detail applies. */\n jurisdictionType?: JurisdictionType;\n}\n\n/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\nexport enum JurisdictionType {\n /** Undefined jurisdiction type. */\n UNDEFINED = 'UNDEFINED',\n /** Country jurisdiction. */\n COUNTRY = 'COUNTRY',\n /** State jurisdiction. */\n STATE = 'STATE',\n /** County jurisdiction. */\n COUNTY = 'COUNTY',\n /** City jurisdiction. */\n CITY = 'CITY',\n /** Special jurisdiction. */\n SPECIAL = 'SPECIAL',\n}\n\nexport interface GiftCard {\n /**\n * Gift card ID.\n * @deprecated\n */\n _id?: string;\n /** Gift card obfuscated code. */\n obfuscatedCode?: string;\n /** Gift card value. */\n amount?: MultiCurrencyPrice;\n /**\n * App ID of the gift card provider.\n * @format GUID\n */\n appId?: string;\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\nexport interface PriceSummary {\n /** Subtotal of all line items, before discounts and before tax. */\n subtotal?: MultiCurrencyPrice;\n /** Total shipping price, before discounts and before tax. */\n shipping?: MultiCurrencyPrice;\n /** Total tax. */\n tax?: MultiCurrencyPrice;\n /** Total calculated discount value. */\n discount?: MultiCurrencyPrice;\n /** Total price **after** discounts, gift cards, and tax. */\n total?: MultiCurrencyPrice;\n /** Total additional fees price **before** tax. */\n additionalFees?: MultiCurrencyPrice;\n}\n\n/** Billing Info and shipping details */\nexport interface AddressWithContact {\n /** Address. */\n address?: Address;\n /** Contact details. */\n contactDetails?: FullAddressContactDetails;\n}\n\n/** Physical address */\nexport interface Address {\n /**\n * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n * @maxLength 50\n */\n subdivision?: string | null;\n /**\n * City name.\n * @maxLength 50\n */\n city?: string | null;\n /**\n * Postal or zip code.\n * @maxLength 50\n */\n postalCode?: string | null;\n /** Street address. */\n streetAddress?: StreetAddress;\n /**\n * Main address line (usually street name and number).\n * @maxLength 150\n */\n addressLine1?: string | null;\n /**\n * Free text providing more detailed address info. Usually contains apt, suite, floor.\n * @maxLength 100\n */\n addressLine2?: string | null;\n /** Geocode object containing latitude and longitude coordinates. */\n location?: AddressLocation;\n /**\n * Country's full name.\n * @readonly\n */\n countryFullname?: string | null;\n /**\n * Subdivision full-name.\n * @readonly\n */\n subdivisionFullname?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n /**\n * Apartment number.\n * @internal\n */\n apt?: string;\n /**\n * Optional address line 1\n * @internal\n */\n formattedAddressLine?: string | null;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /**\n * First name.\n * @maxLength 100\n */\n firstName?: string | null;\n /**\n * Last name.\n * @maxLength 100\n */\n lastName?: string | null;\n /**\n * Phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatType;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\nexport interface ShippingInfo {\n /** Selected option out of the options allowed for the `region`. */\n selectedCarrierServiceOption?: SelectedCarrierServiceOption;\n}\n\nexport interface SelectedCarrierServiceOption {\n /**\n * Unique identifier of selected option. For example, `usps_std_overnight`.\n * @maxLength 100\n */\n code?: string;\n /**\n * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).\n * For example, \"Standard\" or \"First-Class Package International\".\n * @maxLength 250\n */\n title?: string;\n /** Shipping costs. */\n cost?: SelectedCarrierServiceOptionPrices;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @maxSize 300\n */\n deliveryAllocations?: DeliveryAllocation[];\n /** If the delivery solution is a partial and doesn't apply to all items. */\n partial?: boolean | null;\n /** Expected delivery time slot. */\n deliveryTimeSlot?: DeliveryTimeSlot;\n}\n\nexport interface SelectedCarrierServiceOptionPrices {\n /** Total shipping price, after discount and after tax. */\n totalPriceAfterTax?: MultiCurrencyPrice;\n /** Total price of shipping after discounts (when relevant), and before tax. */\n totalPriceBeforeTax?: MultiCurrencyPrice;\n /** Tax details. */\n taxDetails?: ItemTaxFullDetails;\n /** Shipping discount before tax. */\n totalDiscount?: MultiCurrencyPrice;\n /** Shipping price before discount and before tax. */\n price?: MultiCurrencyPrice;\n}\n\nexport interface DeliveryAllocation {\n /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */\n deliveryCarrier?: Carrier;\n /** The delivery region that are relevant for this delivery solution. */\n deliveryRegion?: Region;\n /** Populated if the delivery solution is a partially supplied by this carrier. */\n applicableLineItems?: ApplicableLineItems;\n}\n\nexport interface Carrier {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface Region {\n /**\n * The delivery region id.\n * @format GUID\n */\n _id?: string | null;\n /**\n * The delivery region name.\n * @maxLength 100\n */\n name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n /**\n * Line items that the delivery solution is for.\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface DeliveryTimeSlot {\n /** starting time of the delivery time slot */\n from?: Date | null;\n /** ending time of the delivery time slot */\n to?: Date | null;\n}\n\nexport interface CustomFields {\n /**\n * List of custom fields\n * @maxSize 50\n */\n fields?: CustomField[];\n}\n\nexport interface CustomField {\n /** Custom field value. */\n value?: any;\n /**\n * Custom field title.\n * @minLength 1\n * @maxLength 500\n */\n title?: string;\n /**\n * Translated custom field title.\n * @minLength 1\n * @maxLength 500\n */\n translatedTitle?: string | null;\n}\n\nexport interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {\n /** Coupon details. */\n coupon?: Coupon;\n /** Merchant discount. */\n merchantDiscount?: MerchantDiscount;\n /** Discount rule. */\n discountRule?: DiscountRule;\n /** Discount type. */\n discountType?: DiscountType;\n /**\n * IDs of the line items the discount applies to.\n * @format GUID\n */\n lineItemIds?: string[];\n}\n\n/** @oneof */\nexport interface AppliedDiscountDiscountSourceOneOf {\n /** Coupon details. */\n coupon?: Coupon;\n /** Merchant discount. */\n merchantDiscount?: MerchantDiscount;\n /** Discount rule. */\n discountRule?: DiscountRule;\n}\n\nexport enum DiscountType {\n /** Global discount. */\n GLOBAL = 'GLOBAL',\n /** Discount for specific items. */\n SPECIFIC_ITEMS = 'SPECIFIC_ITEMS',\n /** Shipping discount. */\n SHIPPING = 'SHIPPING',\n}\n\n/** Coupon */\nexport interface Coupon {\n /** Coupon ID. */\n _id?: string;\n /** Coupon code. */\n code?: string;\n /** Coupon name. */\n name?: string;\n /** @decimalValue options { gte:0, lte:1000000000000000 } */\n amount?: string;\n}\n\nexport interface MerchantDiscount {\n /** @decimalValue options { gte:0, lte:1000000000000000 } */\n amount?: string;\n}\n\nexport interface DiscountRule {\n /**\n * Discount rule ID.\n * @format GUID\n */\n _id?: string;\n /** Discount rule name. */\n name?: DiscountRuleName;\n /** @decimalValue options { gte:0, lte:1000000000000000 } */\n amount?: string;\n}\n\nexport interface DiscountRuleName {\n /**\n * Original discount rule name (in site's default language).\n * @minLength 1\n * @maxLength 256\n */\n original?: string;\n /**\n * Translated discount rule name according to buyer language. Defaults to `original` when not provided.\n * @minLength 1\n * @maxLength 500\n */\n translated?: string | null;\n}\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetValidationViolationsResponse {\n /** List of validation violations. */\n violations?: Violation[];\n}\n\nexport interface Violation {\n /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */\n severity?: Severity;\n /** Target location on a checkout or cart page where the violation will be displayed. */\n target?: Target;\n /**\n * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href=\"https://www.wix.com\">Click me</a>`.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\nexport enum Severity {\n /** The user is allowed to move forward in the flow. */\n WARNING = 'WARNING',\n /**\n * The user is blocked from moving forward in the flow.\n * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.\n */\n ERROR = 'ERROR',\n}\n\nexport interface Target extends TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: TargetLineItem;\n}\n\n/** @oneof */\nexport interface TargetTargetTypeOneOf {\n /** General (other) violation. */\n other?: Other;\n /** Specific line item violation. */\n lineItem?: TargetLineItem;\n}\n\n/** Available locations on the webpage */\nexport enum NameInOther {\n /** Default location, in case no specific location is specified. */\n OTHER_DEFAULT = 'OTHER_DEFAULT',\n}\n\n/** Available locations on the line item */\nexport enum NameInLineItem {\n /** Default location, in case no specific location is specified. */\n LINE_ITEM_DEFAULT = 'LINE_ITEM_DEFAULT',\n}\n\nexport enum SuggestedFix {\n /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */\n UNKNOWN_SUGGESTED_FIX = 'UNKNOWN_SUGGESTED_FIX',\n /** The line item should be removed from the cart or checkout to resolve the violation. */\n REMOVE_LINE_ITEM = 'REMOVE_LINE_ITEM',\n}\n\n/** General (other) violation. */\nexport interface Other {\n /** Location on a checkout or a cart page where a general (other) violation will be displayed. */\n name?: NameInOther;\n}\n\n/** Specific line item violation. */\nexport interface TargetLineItem {\n /** Location on a checkout or a cart page where the specific line item violation will be displayed. */\n name?: NameInLineItem;\n /** ID of the line item containing the violation. */\n _id?: string | null;\n /**\n * Suggested fix for resolving the line item violation.\n * @internal\n */\n suggestedFix?: SuggestedFix;\n}\n\nexport interface ValidationsSPIConfig {\n /** Whether to validate the cart page in addition to the checkout page. Default: `false` */\n validateInCart?: boolean;\n /**\n * Required. Base URI where the endpoints are called. Wix appends the endpoint path to the base URI.\n * For example, to call the Get Validation Violations endpoint at `https://my-validations.com/v1/get-violations`, the base URI you provide here is `https://my-validations.com`.\n * @minLength 1\n */\n deploymentUri?: string;\n /**\n * Optional WQL filter to apply to the validation info.\n * When provided, only validation info requests that match the filter will be sent to the implementer.\n * @internal\n */\n filter?: Record<string, any> | 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 * Extension ID in Dev Center.\n * @internal\n * @maxLength 256\n */\n appExtensionId?: string | null;\n /**\n * Extension type in Dev Center.\n * @internal\n * @maxLength 256\n */\n appExtensionType?: string | null;\n /**\n * Invoked function.\n * @internal\n * @maxLength 256\n */\n functionName?: 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 GetValidationViolationsRequest,\n GetValidationViolationsResponse,\n} from './service-plugins-types.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } 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 GetValidationViolationsEnvelope {\n request: GetValidationViolationsRequest;\n metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n /**\n *\n * This method retrieves validation violations from your app.\n *\n * Wix calls this method when certain actions are performed on a visitor's cart and checkout. For example, when an item is added to the cart, or when a coupon is added to a checkout.\n * This method validates a visitor's cart and checkout, and returns any validation violations (using the structure provided by Wix eCommerce). Site visitors can see the validation violations in their cart and checkout pages. If there aren't any validation violations, the method returns an object containing an empty list.\n *\n * > __Notes:__\n * > + Do not call the Estimate Cart Totals, Estimate Current Cart Totals or Get Checkout methods from your implementation code for Get Validation Violations. Doing so will result in an error.\n * > + By default, this method only retrieves validation violations from a visitor's checkout. If you want to also retrieve validation violations from a visitor's cart, set the `validateInCart` parameter to `true` in the Ecom Validations Integration's config file. */\n getValidationViolations(\n payload: GetValidationViolationsEnvelope\n ): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;\n}>('ECOM_VALIDATIONS', [\n {\n name: 'getValidationViolations',\n primaryHttpMappingPath: '/v1/get-violations',\n transformations: {\n toREST: (payload: any) => {\n const toRestResponse = payload;\n\n return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n },\n fromREST: (payload: any) => {\n const fromRestRequest = transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'request.validationInfo.lineItems.physicalProperties.weight',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n {\n path: 'request.validationInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n },\n {\n path: 'request.validationInfo.shippingInfo.selectedCarrierServiceOption.deliveryTimeSlot.from',\n },\n {\n path: 'request.validationInfo.shippingInfo.selectedCarrierServiceOption.deliveryTimeSlot.to',\n },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'request.validationInfo.billingInfo.address' },\n { path: 'request.validationInfo.shippingAddress.address' },\n ],\n },\n ]);\n\n return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n },\n },\n },\n]);\n","import './interfaces-ecommerce-v1-validations-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-validations-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n typeof publicProvideHandlers\n> &\n typeof publicProvideHandlers = createServicePluginModule(\n publicProvideHandlers\n);\n"],"mappings":"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","names":["Source","DimensionsUnit","ItemTypePreset","SubscriptionFrequency","ProductPeriodAlignment","JurisdictionType","WeightUnit","VatType","DiscountType","Severity","NameInOther","NameInLineItem","SuggestedFix","IdentityType","provideHandlers"]}
@@ -1,5 +1,5 @@
1
- import { al as GetValidationViolationsEnvelope, a6 as GetValidationViolationsResponse } from './interfaces-ecommerce-v1-validations-provider.public-DV4oEkPS.mjs';
2
- export { u as Address, w as AddressLocation, A as AddressWithContact, Q as ApplicableLineItems, Z as AppliedDiscount, _ as AppliedDiscountDiscountSourceOneOf, l as BillingSettings, B as BuyerDetails, O as Carrier, d as CatalogReference, C as CheckoutStage, ah as Context, a0 as Coupon, Y as CustomField, X as CustomFields, N as DeliveryAllocation, U as DeliveryTimeSlot, n as Description, D as Dimensions, f as DimensionsUnit, a2 as DiscountRule, a3 as DiscountRuleName, $ as DiscountType, a5 as ExtendedFields, a4 as ExternalReference, F as FreeTrialPeriod, x as FullAddressContactDetails, G as GetValidationViolationsRequest, s as GiftCard, aj as IdentificationData, ak as IdentificationDataIdOneOf, ai as IdentityType, q as ItemTaxFullDetails, I as ItemType, g as ItemTypeItemTypeDataOneOf, h as ItemTypePreset, J as JurisdictionType, L as LineItem, o as LineItemPricesData, a1 as MerchantDiscount, M as MultiCurrencyPrice, ac as NameInLineItem, ab as NameInOther, ae as Other, e as PhysicalProperties, t as PriceSummary, P as ProductName, m as ProductPeriodAlignment, R as Region, H as SelectedCarrierServiceOption, K as SelectedCarrierServiceOptionPrices, a8 as Severity, E as ShippingInfo, a as Source, S as SourceInfo, b as Stage, c as StageStagesOneOf, v as StreetAddress, k as SubscriptionFrequency, i as SubscriptionOptionInfo, j as SubscriptionSettings, ad as SuggestedFix, a9 as Target, af as TargetLineItem, aa as TargetTargetTypeOneOf, r as TaxBreakdown, T as Title, V as ValidationInfo, ag as ValidationsSPIConfig, y as VatId, z as VatType, a7 as Violation, W as WeightUnit } from './interfaces-ecommerce-v1-validations-provider.public-DV4oEkPS.mjs';
1
+ import { ai as GetValidationViolationsEnvelope, a3 as GetValidationViolationsResponse } from './interfaces-ecommerce-v1-validations-provider.public-Ce7Pc-Pf.mjs';
2
+ export { r as Address, t as AddressLocation, A as AddressWithContact, K as ApplicableLineItems, U as AppliedDiscount, X as AppliedDiscountDiscountSourceOneOf, i as BillingSettings, B as BuyerDetails, H as Carrier, C as CatalogReference, ae as Context, Z as Coupon, Q as CustomField, O as CustomFields, E as DeliveryAllocation, N as DeliveryTimeSlot, k as Description, D as Dimensions, c as DimensionsUnit, $ as DiscountRule, a0 as DiscountRuleName, Y as DiscountType, a2 as ExtendedFields, a1 as ExternalReference, F as FreeTrialPeriod, u as FullAddressContactDetails, G as GetValidationViolationsRequest, o as GiftCard, ag as IdentificationData, ah as IdentificationDataIdOneOf, af as IdentityType, m as ItemTaxFullDetails, I as ItemType, d as ItemTypeItemTypeDataOneOf, e as ItemTypePreset, J as JurisdictionType, L as LineItem, l as LineItemPricesData, _ as MerchantDiscount, M as MultiCurrencyPrice, a9 as NameInLineItem, a8 as NameInOther, ab as Other, b as PhysicalProperties, q as PriceSummary, P as ProductName, j as ProductPeriodAlignment, R as Region, y as SelectedCarrierServiceOption, z as SelectedCarrierServiceOptionPrices, a5 as Severity, x as ShippingInfo, a as Source, S as SourceInfo, s as StreetAddress, h as SubscriptionFrequency, f as SubscriptionOptionInfo, g as SubscriptionSettings, aa as SuggestedFix, a6 as Target, ac as TargetLineItem, a7 as TargetTargetTypeOneOf, n as TaxBreakdown, T as Title, V as ValidationInfo, ad as ValidationsSPIConfig, v as VatId, w as VatType, a4 as Violation, W as WeightUnit } from './interfaces-ecommerce-v1-validations-provider.public-Ce7Pc-Pf.mjs';
3
3
  import '@wix/sdk-types';
4
4
 
5
5
  /**
@@ -5,12 +5,6 @@ var Source = /* @__PURE__ */ ((Source2) => {
5
5
  Source2["CHECKOUT"] = "CHECKOUT";
6
6
  return Source2;
7
7
  })(Source || {});
8
- var CheckoutStage = /* @__PURE__ */ ((CheckoutStage2) => {
9
- CheckoutStage2["INITIALIZATION"] = "INITIALIZATION";
10
- CheckoutStage2["IN_PROGRESS"] = "IN_PROGRESS";
11
- CheckoutStage2["ORDER_CREATION"] = "ORDER_CREATION";
12
- return CheckoutStage2;
13
- })(CheckoutStage || {});
14
8
  var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
15
9
  DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
16
10
  DimensionsUnit2["MM"] = "MM";
@@ -96,7 +90,6 @@ var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
96
90
  return IdentityType2;
97
91
  })(IdentityType || {});
98
92
  export {
99
- CheckoutStage,
100
93
  DimensionsUnit,
101
94
  DiscountType,
102
95
  IdentityType,