@wix/auto_sdk_ecom_cart 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-v1-cart-cart.context.d.ts +30 -0
  11. package/build/cjs/src/ecom-v1-cart-cart.context.js +58 -0
  12. package/build/cjs/src/ecom-v1-cart-cart.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-cart-cart.http.d.ts +92 -0
  14. package/build/cjs/src/ecom-v1-cart-cart.http.js +844 -0
  15. package/build/cjs/src/ecom-v1-cart-cart.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-cart-cart.meta.d.ts +46 -0
  17. package/build/cjs/src/ecom-v1-cart-cart.meta.js +256 -0
  18. package/build/cjs/src/ecom-v1-cart-cart.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-cart-cart.public.d.ts +152 -0
  20. package/build/cjs/src/ecom-v1-cart-cart.public.js +228 -0
  21. package/build/cjs/src/ecom-v1-cart-cart.public.js.map +1 -0
  22. package/build/cjs/src/ecom-v1-cart-cart.types.d.ts +2506 -0
  23. package/build/cjs/src/ecom-v1-cart-cart.types.js +255 -0
  24. package/build/cjs/src/ecom-v1-cart-cart.types.js.map +1 -0
  25. package/build/cjs/src/ecom-v1-cart-cart.universal.d.ts +2996 -0
  26. package/build/cjs/src/ecom-v1-cart-cart.universal.js +1169 -0
  27. package/build/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/ecom-v1-cart-cart.context.d.ts +30 -0
  39. package/build/es/src/ecom-v1-cart-cart.context.js +30 -0
  40. package/build/es/src/ecom-v1-cart-cart.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-cart-cart.http.d.ts +92 -0
  42. package/build/es/src/ecom-v1-cart-cart.http.js +829 -0
  43. package/build/es/src/ecom-v1-cart-cart.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-cart-cart.meta.d.ts +46 -0
  45. package/build/es/src/ecom-v1-cart-cart.meta.js +218 -0
  46. package/build/es/src/ecom-v1-cart-cart.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-cart-cart.public.d.ts +152 -0
  48. package/build/es/src/ecom-v1-cart-cart.public.js +188 -0
  49. package/build/es/src/ecom-v1-cart-cart.public.js.map +1 -0
  50. package/build/es/src/ecom-v1-cart-cart.types.d.ts +2506 -0
  51. package/build/es/src/ecom-v1-cart-cart.types.js +252 -0
  52. package/build/es/src/ecom-v1-cart-cart.types.js.map +1 -0
  53. package/build/es/src/ecom-v1-cart-cart.universal.d.ts +2996 -0
  54. package/build/es/src/ecom-v1-cart-cart.universal.js +1131 -0
  55. package/build/es/src/ecom-v1-cart-cart.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/ecom-v1-cart-cart.context.d.ts +30 -0
  66. package/build/internal/cjs/src/ecom-v1-cart-cart.context.js +58 -0
  67. package/build/internal/cjs/src/ecom-v1-cart-cart.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-cart-cart.http.d.ts +92 -0
  69. package/build/internal/cjs/src/ecom-v1-cart-cart.http.js +844 -0
  70. package/build/internal/cjs/src/ecom-v1-cart-cart.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-cart-cart.meta.d.ts +46 -0
  72. package/build/internal/cjs/src/ecom-v1-cart-cart.meta.js +256 -0
  73. package/build/internal/cjs/src/ecom-v1-cart-cart.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-cart-cart.public.d.ts +170 -0
  75. package/build/internal/cjs/src/ecom-v1-cart-cart.public.js +228 -0
  76. package/build/internal/cjs/src/ecom-v1-cart-cart.public.js.map +1 -0
  77. package/build/internal/cjs/src/ecom-v1-cart-cart.types.d.ts +2565 -0
  78. package/build/internal/cjs/src/ecom-v1-cart-cart.types.js +255 -0
  79. package/build/internal/cjs/src/ecom-v1-cart-cart.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.d.ts +3261 -0
  81. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js +1169 -0
  82. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/ecom-v1-cart-cart.context.d.ts +30 -0
  93. package/build/internal/es/src/ecom-v1-cart-cart.context.js +30 -0
  94. package/build/internal/es/src/ecom-v1-cart-cart.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-cart-cart.http.d.ts +92 -0
  96. package/build/internal/es/src/ecom-v1-cart-cart.http.js +829 -0
  97. package/build/internal/es/src/ecom-v1-cart-cart.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-cart-cart.meta.d.ts +46 -0
  99. package/build/internal/es/src/ecom-v1-cart-cart.meta.js +218 -0
  100. package/build/internal/es/src/ecom-v1-cart-cart.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-cart-cart.public.d.ts +170 -0
  102. package/build/internal/es/src/ecom-v1-cart-cart.public.js +188 -0
  103. package/build/internal/es/src/ecom-v1-cart-cart.public.js.map +1 -0
  104. package/build/internal/es/src/ecom-v1-cart-cart.types.d.ts +2565 -0
  105. package/build/internal/es/src/ecom-v1-cart-cart.types.js +252 -0
  106. package/build/internal/es/src/ecom-v1-cart-cart.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-cart-cart.universal.d.ts +3261 -0
  108. package/build/internal/es/src/ecom-v1-cart-cart.universal.js +1131 -0
  109. package/build/internal/es/src/ecom-v1-cart-cart.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,2996 @@
1
+ export interface Cart {
2
+ /** Cart ID. */
3
+ _id?: string | null;
4
+ /**
5
+ * Line items.
6
+ * @readonly
7
+ */
8
+ lineItems?: LineItem[];
9
+ /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */
10
+ buyerNote?: string | null;
11
+ /** Buyer information. */
12
+ buyerInfo?: BuyerInfo;
13
+ /**
14
+ * Currency used for pricing.
15
+ * @readonly
16
+ */
17
+ currency?: string;
18
+ /**
19
+ * Currency code used for all the converted prices that are returned.
20
+ * For a site that supports multiple currencies, this is the currency the buyer selected.
21
+ * @readonly
22
+ */
23
+ conversionCurrency?: string;
24
+ /**
25
+ * Language for communication with the buyer. Defaults to the site language.
26
+ * For a site that supports multiple languages, this is the language the buyer selected.
27
+ * @readonly
28
+ */
29
+ buyerLanguage?: string | null;
30
+ /**
31
+ * Site language in which original values are displayed.
32
+ * @readonly
33
+ */
34
+ siteLanguage?: string | null;
35
+ /**
36
+ * Whether tax is included in line item prices.
37
+ * @readonly
38
+ */
39
+ taxIncludedInPrices?: boolean | null;
40
+ /**
41
+ * Weight measurement unit - defaults to site's weight unit.
42
+ * @readonly
43
+ */
44
+ weightUnit?: WeightUnit;
45
+ /**
46
+ * ID of the checkout that originated from this cart.
47
+ * @readonly
48
+ */
49
+ checkoutId?: string | null;
50
+ /**
51
+ * Cart discounts.
52
+ * @readonly
53
+ */
54
+ appliedDiscounts?: CartDiscount[];
55
+ /**
56
+ * Date and time the cart was created.
57
+ * @readonly
58
+ */
59
+ _createdDate?: Date | null;
60
+ /**
61
+ * Date and time the cart was updated.
62
+ * @readonly
63
+ */
64
+ _updatedDate?: Date | null;
65
+ /** Contact info. */
66
+ contactInfo?: AddressWithContact;
67
+ /**
68
+ * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
69
+ *
70
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
71
+ */
72
+ overrideCheckoutUrl?: string | null;
73
+ /**
74
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
75
+ * @readonly
76
+ */
77
+ purchaseFlowId?: string | null;
78
+ /** Selected shipping option. */
79
+ selectedShippingOption?: SelectedShippingOption;
80
+ }
81
+ export interface LineItem {
82
+ /**
83
+ * Line item ID.
84
+ * @readonly
85
+ */
86
+ _id?: string | null;
87
+ /** Item quantity. */
88
+ quantity?: number;
89
+ /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
90
+ catalogReference?: CatalogReference;
91
+ /**
92
+ * Item name.
93
+ * + Stores - `product.name`
94
+ * + Bookings - `service.info.name`
95
+ * + Events - `ticket.name`
96
+ * @readonly
97
+ */
98
+ productName?: ProductName;
99
+ /**
100
+ * URL to the item's page on the site.
101
+ * @readonly
102
+ */
103
+ url?: string;
104
+ /**
105
+ * Item price **after** catalog-defined discount and line item discounts.
106
+ * @readonly
107
+ */
108
+ price?: MultiCurrencyPrice;
109
+ /**
110
+ * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
111
+ * @readonly
112
+ */
113
+ fullPrice?: MultiCurrencyPrice;
114
+ /**
115
+ * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided.
116
+ * @readonly
117
+ */
118
+ priceBeforeDiscounts?: MultiCurrencyPrice;
119
+ /**
120
+ * Line item description lines. Used for displaying the cart, checkout and order.
121
+ * @readonly
122
+ */
123
+ descriptionLines?: DescriptionLine[];
124
+ /**
125
+ * Line item image details.
126
+ * @readonly
127
+ */
128
+ image?: string;
129
+ /**
130
+ * Item availability details.
131
+ * @readonly
132
+ */
133
+ availability?: ItemAvailabilityInfo;
134
+ /**
135
+ * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability.
136
+ * @readonly
137
+ */
138
+ physicalProperties?: PhysicalProperties;
139
+ /**
140
+ * Item type. Either a preset type or custom.
141
+ * @readonly
142
+ */
143
+ itemType?: ItemType;
144
+ /**
145
+ * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`.
146
+ * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout.
147
+ * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
148
+ * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0.
149
+ * @readonly
150
+ */
151
+ paymentOption?: PaymentOptionType;
152
+ /**
153
+ * Service properties. When relevant, this contains information such as date and number of participants.
154
+ * @readonly
155
+ */
156
+ serviceProperties?: ServiceProperties;
157
+ /**
158
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
159
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
160
+ * + in most cases, this field is the same as `catalogReference.catalogItemId`.
161
+ * + Used in membership validation.
162
+ * @readonly
163
+ */
164
+ rootCatalogItemId?: string | null;
165
+ /**
166
+ * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
167
+ * @readonly
168
+ */
169
+ priceDescription?: PriceDescription;
170
+ /**
171
+ * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
172
+ * @readonly
173
+ */
174
+ depositAmount?: MultiCurrencyPrice;
175
+ /** Selected membership to be used as payment for this item. Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`. This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`. */
176
+ selectedMembership?: SelectedMembership;
177
+ /**
178
+ * Tax group ID for this line item.
179
+ * @readonly
180
+ */
181
+ taxGroupId?: string | null;
182
+ /**
183
+ * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin.
184
+ * @readonly
185
+ */
186
+ customLineItem?: boolean;
187
+ /**
188
+ * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
189
+ * @readonly
190
+ */
191
+ consentRequiredPaymentPolicy?: string | null;
192
+ /**
193
+ * Overriding values for catalog item properties.
194
+ *
195
+ * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
196
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
197
+ */
198
+ catalogOverrideFields?: CatalogOverrideFields;
199
+ /**
200
+ * Whether to save the payment method on the order.
201
+ *
202
+ * Default: `false`
203
+ * @readonly
204
+ */
205
+ savePaymentMethod?: boolean;
206
+ }
207
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
208
+ export interface CatalogReference {
209
+ /** ID of the item within the catalog it belongs to. */
210
+ catalogItemId?: string;
211
+ /**
212
+ * ID of the app providing the catalog.
213
+ *
214
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
215
+ *
216
+ * For items from Wix catalogs, the following values always apply:
217
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
218
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
219
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
220
+ */
221
+ appId?: string;
222
+ /**
223
+ * Additional item details in key:value pairs.
224
+ *
225
+ * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
226
+ *
227
+ * For products and variants from your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration).
228
+ */
229
+ options?: Record<string, any> | null;
230
+ }
231
+ export interface ProductName {
232
+ /** **Required** - Original product name (in site's default language). */
233
+ original?: string;
234
+ /** Description product name translated into buyer's language. Defaults to `original` when not defined. */
235
+ translated?: string | null;
236
+ }
237
+ export interface MultiCurrencyPrice {
238
+ /** Amount. */
239
+ amount?: string;
240
+ /**
241
+ * Converted amount.
242
+ * @readonly
243
+ */
244
+ convertedAmount?: string;
245
+ /**
246
+ * Amount formatted with currency symbol.
247
+ * @readonly
248
+ */
249
+ formattedAmount?: string;
250
+ /**
251
+ * Converted amount formatted with currency symbol.
252
+ * @readonly
253
+ */
254
+ formattedConvertedAmount?: string;
255
+ }
256
+ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
257
+ /** Description line plain text value. */
258
+ plainText?: PlainTextValue;
259
+ /** Description line color value. */
260
+ colorInfo?: Color;
261
+ /** Description line name. */
262
+ name?: DescriptionLineName;
263
+ }
264
+ /** @oneof */
265
+ export interface DescriptionLineValueOneOf {
266
+ /** Description line plain text value. */
267
+ plainText?: PlainTextValue;
268
+ /** Description line color value. */
269
+ colorInfo?: Color;
270
+ }
271
+ /** @oneof */
272
+ export interface DescriptionLineDescriptionLineValueOneOf {
273
+ }
274
+ export interface DescriptionLineName {
275
+ /** Description line name in site's default language. */
276
+ original?: string;
277
+ /** Description line name translated into buyer's language. Defaults to `original` when not defined. */
278
+ translated?: string | null;
279
+ }
280
+ export interface PlainTextValue {
281
+ /** Description line plain text value in site's default language. */
282
+ original?: string;
283
+ /** Description line plain text value translated into buyer's language. Defaults to `original` when not defined. */
284
+ translated?: string | null;
285
+ }
286
+ export interface Color {
287
+ /** Description line color name in site's default language. */
288
+ original?: string;
289
+ /** Description line color name translated into buyer's language. Defaults to `original` when not defined. */
290
+ translated?: string | null;
291
+ /**
292
+ * HEX or RGB color code for display.
293
+ *
294
+ */
295
+ code?: string | null;
296
+ }
297
+ export declare enum DescriptionLineType {
298
+ /** Unrecognized type. */
299
+ UNRECOGNISED = "UNRECOGNISED",
300
+ /** Plain text type. */
301
+ PLAIN_TEXT = "PLAIN_TEXT",
302
+ /** Color type. */
303
+ COLOR = "COLOR"
304
+ }
305
+ export interface FocalPoint {
306
+ /** X-coordinate of the focal point. */
307
+ x?: number;
308
+ /** Y-coordinate of the focal point. */
309
+ y?: number;
310
+ /** crop by height */
311
+ height?: number | null;
312
+ /** crop by width */
313
+ width?: number | null;
314
+ }
315
+ export interface ItemAvailabilityInfo {
316
+ /**
317
+ * Item availability status.
318
+ *
319
+ * NOT_FOUND - Item does not exist.
320
+ * NOT_AVAILABLE - Not in stock.
321
+ * PARTIALLY_AVAILABLE - Available quantity is less than requested.
322
+ */
323
+ status?: ItemAvailabilityStatus;
324
+ /** Quantity available. */
325
+ quantityAvailable?: number | null;
326
+ }
327
+ export declare enum ItemAvailabilityStatus {
328
+ AVAILABLE = "AVAILABLE",
329
+ /** Item does not exist */
330
+ NOT_FOUND = "NOT_FOUND",
331
+ /** Item not in stock */
332
+ NOT_AVAILABLE = "NOT_AVAILABLE",
333
+ /** Available quantity is less than requested */
334
+ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE"
335
+ }
336
+ export interface PhysicalProperties {
337
+ /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
338
+ weight?: number | null;
339
+ /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
340
+ sku?: string | null;
341
+ /** Whether this line item is shippable. */
342
+ shippable?: boolean;
343
+ }
344
+ export interface Scope {
345
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
346
+ namespace?: string;
347
+ /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
348
+ group?: Group;
349
+ }
350
+ export interface Group {
351
+ /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
352
+ name?: string;
353
+ /** Item ID (when the coupon scope is limited to just one item). */
354
+ entityId?: string | null;
355
+ }
356
+ export interface ItemType extends ItemTypeItemTypeDataOneOf {
357
+ /** Preset item type. */
358
+ preset?: ItemTypeItemType;
359
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
360
+ custom?: string;
361
+ }
362
+ /** @oneof */
363
+ export interface ItemTypeItemTypeDataOneOf {
364
+ /** Preset item type. */
365
+ preset?: ItemTypeItemType;
366
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
367
+ custom?: string;
368
+ }
369
+ export declare enum ItemTypeItemType {
370
+ UNRECOGNISED = "UNRECOGNISED",
371
+ PHYSICAL = "PHYSICAL",
372
+ DIGITAL = "DIGITAL",
373
+ GIFT_CARD = "GIFT_CARD",
374
+ SERVICE = "SERVICE"
375
+ }
376
+ export interface SubscriptionOptionInfo {
377
+ /** Subscription option settings. */
378
+ subscriptionSettings?: SubscriptionSettings;
379
+ /** Subscription option title. */
380
+ title?: Title;
381
+ /** Subscription option description. */
382
+ description?: Description;
383
+ }
384
+ export interface SubscriptionSettings {
385
+ /** Frequency of recurring payment. */
386
+ frequency?: SubscriptionFrequency;
387
+ /**
388
+ * Interval of recurring payment.
389
+ *
390
+ * Default: `1`.
391
+ * If SubscriptionFrequency is Day the minimum interval is 7
392
+ */
393
+ interval?: number | null;
394
+ /** Whether subscription is renewed automatically at the end of each period. */
395
+ autoRenewal?: boolean;
396
+ /** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */
397
+ billingCycles?: number | null;
398
+ }
399
+ /** Frequency unit of recurring payment */
400
+ export declare enum SubscriptionFrequency {
401
+ UNDEFINED = "UNDEFINED",
402
+ DAY = "DAY",
403
+ WEEK = "WEEK",
404
+ MONTH = "MONTH",
405
+ YEAR = "YEAR"
406
+ }
407
+ export interface FreeTrialPeriod {
408
+ /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
409
+ frequency?: SubscriptionFrequency;
410
+ /** interval of period */
411
+ interval?: number;
412
+ }
413
+ export interface Title {
414
+ /** 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). */
415
+ original?: string;
416
+ /**
417
+ * Subscription option name translated into the buyer's language.
418
+ *
419
+ * Default: Same as `original`.
420
+ */
421
+ translated?: string | null;
422
+ }
423
+ export interface Description {
424
+ /** Subscription option description. */
425
+ original?: string;
426
+ /** Translated subscription option description. */
427
+ translated?: string | null;
428
+ }
429
+ export interface SecuredMedia {
430
+ /** Media ID in Wix Media Manager. */
431
+ _id?: string;
432
+ /** Original filename. */
433
+ fileName?: string;
434
+ /** File type. */
435
+ fileType?: FileType;
436
+ }
437
+ export declare enum FileType {
438
+ UNSPECIFIED = "UNSPECIFIED",
439
+ SECURE_PICTURE = "SECURE_PICTURE",
440
+ SECURE_VIDEO = "SECURE_VIDEO",
441
+ SECURE_DOCUMENT = "SECURE_DOCUMENT",
442
+ SECURE_MUSIC = "SECURE_MUSIC",
443
+ SECURE_ARCHIVE = "SECURE_ARCHIVE"
444
+ }
445
+ /** Type of selected payment option for catalog item */
446
+ export declare enum PaymentOptionType {
447
+ /** The entire payment for this item happens as part of the checkout. */
448
+ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
449
+ /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
450
+ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
451
+ /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
452
+ MEMBERSHIP = "MEMBERSHIP",
453
+ /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
454
+ DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
455
+ /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */
456
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
457
+ }
458
+ export interface ServiceProperties {
459
+ /** The date and time for which the service is supposed to be provided. For example, the time of the class. */
460
+ scheduledDate?: Date | null;
461
+ /** The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */
462
+ numberOfParticipants?: number | null;
463
+ }
464
+ export interface PriceDescription {
465
+ /**
466
+ * **Required** - Original price description (in site's default language).
467
+ *
468
+ */
469
+ original?: string;
470
+ /** Product name translated into buyer's language. Defaults to `original` when not defined. */
471
+ translated?: string | null;
472
+ }
473
+ /** Selected Membership */
474
+ export interface SelectedMembership {
475
+ /** Membership ID. */
476
+ _id?: string;
477
+ /** ID of the app providing this payment option. */
478
+ appId?: string;
479
+ }
480
+ export interface CatalogOverrideFields {
481
+ /** Item name. */
482
+ productName?: ProductName;
483
+ /** Item price **after** discounts. */
484
+ price?: string | null;
485
+ /** Item price **before** discounts. */
486
+ fullPrice?: string | null;
487
+ /** Item description lines. Used when displaying the line item to customers. */
488
+ descriptionLines?: DescriptionLine[];
489
+ /** Physical properties of the item. */
490
+ physicalProperties?: PhysicalProperties;
491
+ /** Item image. */
492
+ image?: string;
493
+ /** Payment method selected for the item. */
494
+ paymentOption?: PaymentOption;
495
+ /** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */
496
+ depositAmount?: string | null;
497
+ /**
498
+ * Whether to save the payment method on the order.
499
+ *
500
+ * Default: `false`
501
+ */
502
+ savePaymentMethod?: boolean | null;
503
+ }
504
+ export interface PaymentOption {
505
+ /**
506
+ * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout.
507
+ * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
508
+ * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`.
509
+ * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`.
510
+ * + `MEMBERSHIP_OFFLINE`: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`.
511
+ */
512
+ value?: PaymentOptionType;
513
+ }
514
+ export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
515
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
516
+ addressType?: TaxableAddressType;
517
+ }
518
+ /** @oneof */
519
+ export interface TaxableAddressTaxableAddressDataOneOf {
520
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
521
+ addressType?: TaxableAddressType;
522
+ }
523
+ export declare enum TaxableAddressType {
524
+ UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
525
+ BUSINESS = "BUSINESS",
526
+ BILLING = "BILLING",
527
+ SHIPPING = "SHIPPING"
528
+ }
529
+ export interface ExtendedFields {
530
+ /**
531
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
532
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
533
+ *
534
+ * You can only access fields for which you have the appropriate permissions.
535
+ *
536
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
537
+ */
538
+ namespaces?: Record<string, Record<string, any>>;
539
+ }
540
+ export interface Policy {
541
+ /** Policy title - should be translated */
542
+ title?: string | null;
543
+ /** Policy content - should be translated */
544
+ content?: string;
545
+ }
546
+ /** Buyer Info */
547
+ export interface BuyerInfo extends BuyerInfoIdOneOf {
548
+ /**
549
+ * Visitor ID - if the buyer is **not** a site member.
550
+ * @readonly
551
+ */
552
+ visitorId?: string;
553
+ /**
554
+ * Member ID - if the buyer is a site member.
555
+ * @readonly
556
+ */
557
+ memberId?: string;
558
+ /**
559
+ * User ID - if the cart owner is a Wix user.
560
+ * @readonly
561
+ */
562
+ userId?: string;
563
+ /** Contact ID. For more information, see the Contacts API. */
564
+ contactId?: string | null;
565
+ /** Buyer email address. */
566
+ email?: string | null;
567
+ }
568
+ /** @oneof */
569
+ export interface BuyerInfoIdOneOf {
570
+ /**
571
+ * Visitor ID - if the buyer is **not** a site member.
572
+ * @readonly
573
+ */
574
+ visitorId?: string;
575
+ /**
576
+ * Member ID - if the buyer is a site member.
577
+ * @readonly
578
+ */
579
+ memberId?: string;
580
+ /**
581
+ * User ID - if the cart owner is a Wix user.
582
+ * @readonly
583
+ */
584
+ userId?: string;
585
+ }
586
+ export declare enum WeightUnit {
587
+ /** Weight unit can't be classified, due to an error */
588
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
589
+ /** Kilograms */
590
+ KG = "KG",
591
+ /** Pounds */
592
+ LB = "LB"
593
+ }
594
+ export interface CartDiscount extends CartDiscountDiscountSourceOneOf {
595
+ /** Coupon details. */
596
+ coupon?: Coupon;
597
+ /** Merchant discount. */
598
+ merchantDiscount?: MerchantDiscount;
599
+ }
600
+ /** @oneof */
601
+ export interface CartDiscountDiscountSourceOneOf {
602
+ /** Coupon details. */
603
+ coupon?: Coupon;
604
+ /** Merchant discount. */
605
+ merchantDiscount?: MerchantDiscount;
606
+ }
607
+ export interface Coupon {
608
+ /** Coupon ID. */
609
+ _id?: string;
610
+ /** Coupon code. */
611
+ code?: string;
612
+ }
613
+ export interface MerchantDiscount {
614
+ /** Discount value. */
615
+ amount?: MultiCurrencyPrice;
616
+ }
617
+ export interface DiscountRule {
618
+ /** Discount rule ID */
619
+ _id?: string;
620
+ /** Discount rule name */
621
+ name?: DiscountRuleName;
622
+ /** Discount value. */
623
+ amount?: MultiCurrencyPrice;
624
+ }
625
+ export interface DiscountRuleName {
626
+ /** Original discount rule name (in site's default language). */
627
+ original?: string;
628
+ /** Discount rule name translated into buyer's language. Defaults to `original` when not defined. */
629
+ translated?: string | null;
630
+ }
631
+ export declare enum DiscountType {
632
+ /** "GLOBAL" - discount applies to entire order. */
633
+ GLOBAL = "GLOBAL",
634
+ /** "SPECIFIC-ITEMS" - discount applies to specific items. */
635
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
636
+ /** "SHIPPING" - discount applies to shipping. For example, free shipping. */
637
+ SHIPPING = "SHIPPING"
638
+ }
639
+ /** Billing Info and shipping details */
640
+ export interface AddressWithContact {
641
+ /** Address. */
642
+ address?: Address;
643
+ /** Contact details. */
644
+ contactDetails?: FullAddressContactDetails;
645
+ }
646
+ /** Physical address */
647
+ export interface Address {
648
+ /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
649
+ country?: string | null;
650
+ /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
651
+ subdivision?: string | null;
652
+ /** City name. */
653
+ city?: string | null;
654
+ /** Postal or zip code. */
655
+ postalCode?: string | null;
656
+ /** Street address. */
657
+ streetAddress?: StreetAddress;
658
+ /** Main address line (usually street name and number). */
659
+ addressLine1?: string | null;
660
+ /** Free text providing more detailed address info. Usually contains apt, suite, floor. */
661
+ addressLine2?: string | null;
662
+ /**
663
+ * Country's full name.
664
+ * @readonly
665
+ */
666
+ countryFullname?: string | null;
667
+ /**
668
+ * Subdivision full-name.
669
+ * @readonly
670
+ */
671
+ subdivisionFullname?: string | null;
672
+ }
673
+ export interface StreetAddress {
674
+ /** Street number. */
675
+ number?: string;
676
+ /** Street name. */
677
+ name?: string;
678
+ }
679
+ export interface AddressLocation {
680
+ /** Address latitude. */
681
+ latitude?: number | null;
682
+ /** Address longitude. */
683
+ longitude?: number | null;
684
+ }
685
+ /** Full contact details for an address */
686
+ export interface FullAddressContactDetails {
687
+ /** First name. */
688
+ firstName?: string | null;
689
+ /** Last name. */
690
+ lastName?: string | null;
691
+ /** Phone number. */
692
+ phone?: string | null;
693
+ /** Company name. */
694
+ company?: string | null;
695
+ /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
696
+ vatId?: VatId;
697
+ }
698
+ export interface VatId {
699
+ /** Customer's tax ID. */
700
+ _id?: string;
701
+ /**
702
+ * Tax type.
703
+ *
704
+ * Supported values:
705
+ * + `CPF`: for individual tax payers
706
+ * + `CNPJ`: for corporations
707
+ */
708
+ type?: VatType;
709
+ }
710
+ /** tax info types */
711
+ export declare enum VatType {
712
+ UNSPECIFIED = "UNSPECIFIED",
713
+ /** CPF - for individual tax payers. */
714
+ CPF = "CPF",
715
+ /** CNPJ - for corporations */
716
+ CNPJ = "CNPJ"
717
+ }
718
+ export interface SelectedShippingOption {
719
+ /** Carrier ID. */
720
+ carrierId?: string | null;
721
+ /** Selected shipping option code. For example, "usps_std_overnight". */
722
+ code?: string;
723
+ }
724
+ export interface GetCurrentCartRequest {
725
+ }
726
+ export interface GetCurrentCartResponse {
727
+ /** Current session's active cart. */
728
+ cart?: Cart;
729
+ }
730
+ export interface UpdateCartRequest {
731
+ /** Cart info. */
732
+ cartInfo?: Cart;
733
+ /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
734
+ couponCode?: string | null;
735
+ /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */
736
+ merchantDiscounts?: MerchantDiscountInput[];
737
+ /** Catalog line items. */
738
+ lineItems?: LineItem[];
739
+ /**
740
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
741
+ *
742
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
743
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
744
+ */
745
+ customLineItems?: CustomLineItem[];
746
+ }
747
+ export interface MerchantDiscountInput {
748
+ /** Discount amount. */
749
+ amount?: string;
750
+ /** IDs of the line items the discount applies to. */
751
+ lineItemIds?: string[];
752
+ }
753
+ export interface CustomLineItem {
754
+ /**
755
+ * Custom line item quantity.
756
+ *
757
+ * Min: `1`
758
+ * Max: `100000`
759
+ */
760
+ quantity?: number;
761
+ /**
762
+ * Custom line item price.
763
+ *
764
+ * Must be a number or a decimal without symbols.
765
+ */
766
+ price?: string;
767
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
768
+ priceDescription?: PriceDescription;
769
+ /** Custom line item description lines. Used for displaying the cart, checkout and order. */
770
+ descriptionLines?: DescriptionLine[];
771
+ /**
772
+ * Custom line item media. Supported formats:
773
+ * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`.
774
+ * + An image from the web - `"http(s)://<image url>"`.
775
+ */
776
+ media?: string;
777
+ /**
778
+ * Custom line item ID. If passed, `id` must be unique.
779
+ *
780
+ * Default: auto-generated ID
781
+ */
782
+ _id?: string | null;
783
+ /** Tax group ID for this custom line item. */
784
+ taxGroupId?: string | null;
785
+ /** Name of the item or product. */
786
+ productName?: ProductName;
787
+ /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
788
+ url?: string;
789
+ /** Item type. Either a preset type or custom. */
790
+ itemType?: ItemType;
791
+ /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
792
+ fullPrice?: string | null;
793
+ /**
794
+ * Item quantity available for purchase. Only return this if inventory is managed.
795
+ * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
796
+ */
797
+ quantityAvailable?: number | null;
798
+ /** Physical properties of the item. */
799
+ physicalProperties?: PhysicalProperties;
800
+ /**
801
+ * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
802
+ *
803
+ * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
804
+ * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
805
+ * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
806
+ * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.
807
+ */
808
+ paymentOption?: PaymentOptionType;
809
+ /**
810
+ * Service properties. When relevant, this contains information such as date and number of participants.
811
+ * Used, among other things, when checking for valid memberships.
812
+ */
813
+ serviceProperties?: ServiceProperties;
814
+ /**
815
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
816
+ *
817
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
818
+ * + In most cases, this field is the same as `catalogReference.catalogItemId`.
819
+ * + Used in membership validation.
820
+ */
821
+ rootCatalogItemId?: string | null;
822
+ /**
823
+ * Partial payment for the given item to be paid upfront during the checkout.
824
+ *
825
+ * Eligible for catalog items with type `DEPOSIT_ONLINE`.
826
+ * When omitted, the item's price will not be split and is expected to be paid in a single installment.
827
+ */
828
+ depositAmount?: string | null;
829
+ /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
830
+ catalogReference?: CatalogReference;
831
+ /**
832
+ * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
833
+ * @readonly
834
+ */
835
+ consentRequiredPaymentPolicy?: string | null;
836
+ /**
837
+ * Whether to save the payment method on the order.
838
+ *
839
+ * Default: `false`
840
+ * @readonly
841
+ */
842
+ savePaymentMethod?: boolean;
843
+ }
844
+ export interface UpdateCartResponse {
845
+ /** Updated Cart. */
846
+ cart?: Cart;
847
+ }
848
+ export interface AddToCurrentCartRequest {
849
+ /** Catalog line items. */
850
+ lineItems?: LineItem[];
851
+ /**
852
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
853
+ *
854
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
855
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
856
+ */
857
+ customLineItems?: CustomLineItem[];
858
+ }
859
+ export interface AddToCartResponse {
860
+ /** Updated cart. */
861
+ cart?: Cart;
862
+ }
863
+ export interface AddToCurrentCartAndEstimateTotalsRequest {
864
+ /** Catalog line items. */
865
+ lineItems?: LineItem[];
866
+ /**
867
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
868
+ *
869
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
870
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
871
+ */
872
+ customLineItems?: CustomLineItem[];
873
+ /** Selected shipping option. */
874
+ selectedShippingOption?: SelectedShippingOption;
875
+ /** Shipping address. Used for calculating tax and shipping (when applicable). */
876
+ shippingAddress?: Address;
877
+ /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
878
+ billingAddress?: Address;
879
+ /** The selected membership payment options and which line items they apply to. */
880
+ selectedMemberships?: SelectedMemberships;
881
+ /**
882
+ * Whether to calculate tax in the calculation request.
883
+ *
884
+ * Default: `true`
885
+ */
886
+ calculateTax?: boolean | null;
887
+ /**
888
+ * Whether to calculate shipping in the calculation request.
889
+ *
890
+ * Default: `true`
891
+ */
892
+ calculateShipping?: boolean | null;
893
+ }
894
+ export interface SelectedMemberships {
895
+ /** Selected memberships. */
896
+ memberships?: HostSelectedMembership[];
897
+ }
898
+ export interface HostSelectedMembership {
899
+ /** Membership ID. */
900
+ _id?: string;
901
+ /** ID of the app providing this payment option. */
902
+ appId?: string;
903
+ /** IDs of the line items this membership applies to. */
904
+ lineItemIds?: string[];
905
+ }
906
+ export interface EstimateTotalsResponse {
907
+ /** Cart. */
908
+ cart?: Cart;
909
+ /** Calculated line items. */
910
+ calculatedLineItems?: CalculatedLineItem[];
911
+ /** Price summary. */
912
+ priceSummary?: PriceSummary;
913
+ /** Applied gift card. */
914
+ giftCard?: GiftCard;
915
+ /** Tax summary. */
916
+ taxSummary?: TaxSummary;
917
+ /** Shipping information. */
918
+ shippingInfo?: ShippingInformation;
919
+ /** Applied discounts. */
920
+ appliedDiscounts?: AppliedDiscount[];
921
+ /** Calculation errors. */
922
+ calculationErrors?: CalculationErrors;
923
+ /** Weight measurement unit - defaults to site's weight unit. */
924
+ weightUnit?: WeightUnit;
925
+ /** Currency used for pricing in this store. */
926
+ currency?: string;
927
+ /**
928
+ * Minimal amount to pay in order to place the order.
929
+ * @readonly
930
+ */
931
+ payNow?: PriceSummary;
932
+ /**
933
+ * Remaining amount for the order to be fully paid.
934
+ * @readonly
935
+ */
936
+ payLater?: PriceSummary;
937
+ /** Information about valid and invalid memberships, and which ones are selected for usage. */
938
+ membershipOptions?: MembershipOptions;
939
+ /** Additional fees */
940
+ additionalFees?: AdditionalFee[];
941
+ /**
942
+ * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
943
+ * @readonly
944
+ */
945
+ violations?: Violation[];
946
+ }
947
+ export interface CalculatedLineItem {
948
+ /** Line item ID. */
949
+ lineItemId?: string;
950
+ /** Price breakdown for this line item. */
951
+ pricesBreakdown?: LineItemPricesData;
952
+ /**
953
+ * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`.
954
+ * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout.
955
+ * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
956
+ * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0.
957
+ */
958
+ paymentOption?: PaymentOptionType;
959
+ }
960
+ export interface LineItemPricesData {
961
+ /** Total price after discounts and after tax. */
962
+ totalPriceAfterTax?: MultiCurrencyPrice;
963
+ /** Total price after discounts, and before tax. */
964
+ totalPriceBeforeTax?: MultiCurrencyPrice;
965
+ /** Tax details. */
966
+ taxDetails?: ItemTaxFullDetails;
967
+ /** Total discount for all line items. */
968
+ totalDiscount?: MultiCurrencyPrice;
969
+ /** Catalog price after catalog discount and automatic discounts. */
970
+ price?: MultiCurrencyPrice;
971
+ /** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */
972
+ priceBeforeDiscounts?: MultiCurrencyPrice;
973
+ /** Total price **after** catalog-defined discount and line item discounts. */
974
+ lineItemPrice?: MultiCurrencyPrice;
975
+ /** Item price **before** line item discounts and **before** catalog-defined discount. Defaults to `price` when not provided. */
976
+ fullPrice?: MultiCurrencyPrice;
977
+ }
978
+ export interface ItemTaxFullDetails {
979
+ /** Amount for which tax is calculated. */
980
+ taxableAmount?: MultiCurrencyPrice;
981
+ /** Tax rate %, as a decimal point between 0 and 1. */
982
+ taxRate?: string;
983
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
984
+ totalTax?: MultiCurrencyPrice;
985
+ /**
986
+ * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
987
+ * @readonly
988
+ * @deprecated
989
+ */
990
+ rateBreakdown?: TaxRateBreakdown[];
991
+ }
992
+ export interface TaxRateBreakdown {
993
+ /** Name of tax against which the calculation was performed. */
994
+ name?: string;
995
+ /** Rate at which this tax detail was calculated. */
996
+ rate?: string;
997
+ /** Amount of tax for this tax detail. */
998
+ tax?: MultiCurrencyPrice;
999
+ }
1000
+ /**
1001
+ * TaxBreakdown represents tax information for a line item.
1002
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
1003
+ */
1004
+ export interface TaxBreakdown {
1005
+ /** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */
1006
+ jurisdiction?: string | null;
1007
+ /** The amount of this line item price that was considered nontaxable. (Decimal value) */
1008
+ nonTaxableAmount?: MultiCurrencyPrice;
1009
+ /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */
1010
+ rate?: string | null;
1011
+ /** The amount of tax estimated for this line item. (Decimal value) */
1012
+ taxAmount?: MultiCurrencyPrice;
1013
+ /** The taxable amount of this line item. */
1014
+ taxableAmount?: MultiCurrencyPrice;
1015
+ /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */
1016
+ taxType?: string | null;
1017
+ /**
1018
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
1019
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
1020
+ */
1021
+ taxName?: string | null;
1022
+ /** The type of the jurisdiction in which this tax detail applies. */
1023
+ jurisdictionType?: JurisdictionType;
1024
+ }
1025
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
1026
+ export declare enum JurisdictionType {
1027
+ UNDEFINED = "UNDEFINED",
1028
+ COUNTRY = "COUNTRY",
1029
+ STATE = "STATE",
1030
+ COUNTY = "COUNTY",
1031
+ CITY = "CITY",
1032
+ SPECIAL = "SPECIAL"
1033
+ }
1034
+ export interface PriceSummary {
1035
+ /** Subtotal of all line items, before discounts and before tax. */
1036
+ subtotal?: MultiCurrencyPrice;
1037
+ /** Total shipping price, before discounts and before tax. */
1038
+ shipping?: MultiCurrencyPrice;
1039
+ /** Total tax. */
1040
+ tax?: MultiCurrencyPrice;
1041
+ /** Total calculated discount value. */
1042
+ discount?: MultiCurrencyPrice;
1043
+ /** Total price after discounts, gift cards, and tax. */
1044
+ total?: MultiCurrencyPrice;
1045
+ /** Total additional fees price before tax. */
1046
+ additionalFees?: MultiCurrencyPrice;
1047
+ }
1048
+ export interface GiftCard {
1049
+ /**
1050
+ * Gift Card ID.
1051
+ * @deprecated
1052
+ */
1053
+ _id?: string;
1054
+ /** Gift card obfuscated code. */
1055
+ obfuscatedCode?: string;
1056
+ /** Gift card value. */
1057
+ amount?: MultiCurrencyPrice;
1058
+ /** App ID of the gift card provider. */
1059
+ appId?: string;
1060
+ /**
1061
+ * External ID in the gift card provider's system.
1062
+ * Used for integration and tracking across different platforms.
1063
+ */
1064
+ externalId?: string | null;
1065
+ }
1066
+ export interface TaxSummary {
1067
+ /**
1068
+ * Amount for which tax is calculated, added from line items.
1069
+ * @readonly
1070
+ */
1071
+ taxableAmount?: MultiCurrencyPrice;
1072
+ /**
1073
+ * Calculated tax, added from line items.
1074
+ * @readonly
1075
+ */
1076
+ totalTax?: MultiCurrencyPrice;
1077
+ /**
1078
+ * Tax calculator that was active when the order was created.
1079
+ * @deprecated
1080
+ */
1081
+ calculationDetails?: TaxCalculationDetails;
1082
+ }
1083
+ export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
1084
+ /** Reason the manual calculation was used. */
1085
+ manualRateReason?: ManualCalculationReason;
1086
+ /** Error details and reason for tax rate fallback. */
1087
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1088
+ /**
1089
+ * Rate calculation type. Supported values:
1090
+ * + `"AUTO_RATE"`
1091
+ * + `"FALLBACK_RATE"`
1092
+ * + `"MANUAL_RATE"`
1093
+ * + `"NO_TAX_COLLECTED"`
1094
+ */
1095
+ rateType?: RateType;
1096
+ }
1097
+ /** @oneof */
1098
+ export interface TaxCalculationDetailsCalculationDetailsOneOf {
1099
+ /** Reason the manual calculation was used. */
1100
+ manualRateReason?: ManualCalculationReason;
1101
+ /** Details of the fallback rate calculation. */
1102
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1103
+ }
1104
+ export declare enum RateType {
1105
+ /** no tax being collected for this request due to location of purchase */
1106
+ NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
1107
+ /** manual rate used for calculation */
1108
+ MANUAL_RATE = "MANUAL_RATE",
1109
+ /** autotax rate used for calculation */
1110
+ AUTO_RATE = "AUTO_RATE",
1111
+ /** fallback rate used for calculation */
1112
+ FALLBACK_RATE = "FALLBACK_RATE"
1113
+ }
1114
+ export declare enum ManualCalculationReason {
1115
+ /** user set calculator in Business Manager to be Manual */
1116
+ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
1117
+ /** specific region is on manual even though Global setting is Auto-tax */
1118
+ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
1119
+ }
1120
+ export interface AutoTaxFallbackCalculationDetails {
1121
+ /**
1122
+ * Reason for fallback. Supported values:
1123
+ * + `"AUTO_TAX_FAILED"`
1124
+ * + `"AUTO_TAX_DEACTIVATED"`
1125
+ */
1126
+ fallbackReason?: FallbackReason;
1127
+ /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
1128
+ error?: ApplicationError;
1129
+ }
1130
+ export declare enum FallbackReason {
1131
+ /** auto-tax failed to be calculated */
1132
+ AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
1133
+ /** auto-tax was temporarily deactivated on a system-level */
1134
+ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
1135
+ }
1136
+ export interface ApplicationError {
1137
+ /** Error code. */
1138
+ code?: string;
1139
+ /** Description of the error. */
1140
+ description?: string;
1141
+ /** Data related to the error. */
1142
+ data?: Record<string, any> | null;
1143
+ }
1144
+ /**
1145
+ * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate.
1146
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
1147
+ */
1148
+ export interface AggregatedTaxBreakdown {
1149
+ /** The name of the tax against which this tax amount was calculated. */
1150
+ taxName?: string;
1151
+ /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */
1152
+ taxType?: string;
1153
+ /** The name of the jurisdiction in which this tax detail applies. */
1154
+ jurisdiction?: string;
1155
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
1156
+ jurisdictionTypeEnum?: JurisdictionType;
1157
+ /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */
1158
+ rate?: string;
1159
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
1160
+ aggregatedTaxAmount?: MultiCurrencyPrice;
1161
+ }
1162
+ export interface ShippingInformation {
1163
+ /** Shipping region. */
1164
+ region?: ShippingRegion;
1165
+ /** Selected shipping option. */
1166
+ selectedCarrierServiceOption?: SelectedCarrierServiceOption;
1167
+ /** All shipping options. */
1168
+ carrierServiceOptions?: CarrierServiceOption[];
1169
+ }
1170
+ export interface ShippingRegion {
1171
+ /**
1172
+ * Shipping region ID.
1173
+ * @readonly
1174
+ */
1175
+ _id?: string;
1176
+ /** Shipping region name. */
1177
+ name?: string;
1178
+ }
1179
+ export interface SelectedCarrierServiceOption {
1180
+ /** Unique identifier of selected option. For example, "usps_std_overnight". */
1181
+ code?: string;
1182
+ /**
1183
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1184
+ * For example, "Standard" or "First-Class Package International".
1185
+ * @readonly
1186
+ */
1187
+ title?: string;
1188
+ /**
1189
+ * Delivery logistics.
1190
+ * @readonly
1191
+ */
1192
+ logistics?: DeliveryLogistics;
1193
+ /**
1194
+ * Shipping costs.
1195
+ * @readonly
1196
+ */
1197
+ cost?: SelectedCarrierServiceOptionPrices;
1198
+ /**
1199
+ * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
1200
+ * @readonly
1201
+ */
1202
+ requestedShippingOption?: boolean;
1203
+ /** Other charges */
1204
+ otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
1205
+ /** This carrier's unique ID */
1206
+ carrierId?: string | null;
1207
+ /** Delivery solution allocations to different delivery carriers and delivery regions */
1208
+ deliveryAllocations?: DeliveryAllocation[];
1209
+ /** If the delivery solution is a partial and doesn't apply to all items. */
1210
+ partial?: boolean | null;
1211
+ }
1212
+ export interface DeliveryLogistics {
1213
+ /** Expected delivery time, in free text. For example, "3-5 business days". */
1214
+ deliveryTime?: string | null;
1215
+ /** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */
1216
+ instructions?: string | null;
1217
+ /** Pickup details. */
1218
+ pickupDetails?: PickupDetails;
1219
+ }
1220
+ export interface PickupDetails {
1221
+ /** Pickup address. */
1222
+ address?: Address;
1223
+ /**
1224
+ * Whether the pickup address is that of a business - this may effect tax calculation.
1225
+ * @deprecated
1226
+ */
1227
+ businessLocation?: boolean;
1228
+ /** Pickup method */
1229
+ pickupMethod?: PickupMethod;
1230
+ }
1231
+ export declare enum PickupMethod {
1232
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
1233
+ STORE_PICKUP = "STORE_PICKUP",
1234
+ PICKUP_POINT = "PICKUP_POINT"
1235
+ }
1236
+ export interface DeliveryTimeSlot {
1237
+ /** starting time of the delivery time slot */
1238
+ from?: Date | null;
1239
+ /** ending time of the delivery time slot */
1240
+ to?: Date | null;
1241
+ }
1242
+ export interface SelectedCarrierServiceOptionPrices {
1243
+ /** Total shipping price, after discount and after tax. */
1244
+ totalPriceAfterTax?: MultiCurrencyPrice;
1245
+ /** Total price of shipping after discounts (when relevant), and before tax. */
1246
+ totalPriceBeforeTax?: MultiCurrencyPrice;
1247
+ /** Tax details. */
1248
+ taxDetails?: ItemTaxFullDetails;
1249
+ /** Shipping discount before tax. */
1250
+ totalDiscount?: MultiCurrencyPrice;
1251
+ /** Shipping price before discount and before tax. */
1252
+ price?: MultiCurrencyPrice;
1253
+ }
1254
+ export interface SelectedCarrierServiceOptionOtherCharge {
1255
+ /** Type of additional cost. */
1256
+ type?: ChargeType;
1257
+ /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */
1258
+ details?: string | null;
1259
+ /** Price of added charge. */
1260
+ cost?: SelectedCarrierServiceOptionPrices;
1261
+ }
1262
+ export declare enum ChargeType {
1263
+ HANDLING_FEE = "HANDLING_FEE",
1264
+ INSURANCE = "INSURANCE"
1265
+ }
1266
+ export interface DeliveryAllocation {
1267
+ /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
1268
+ deliveryCarrier?: Carrier;
1269
+ /** The delivery region that are relevant for this delivery solution. */
1270
+ deliveryRegion?: Region;
1271
+ /** Populated if the delivery solution is a partially supplied by this carrier. */
1272
+ applicableLineItems?: ApplicableLineItems;
1273
+ }
1274
+ export interface Carrier {
1275
+ /** The carrier app id */
1276
+ appId?: string | null;
1277
+ /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */
1278
+ code?: string;
1279
+ }
1280
+ export interface Region {
1281
+ /** The delivery region id. */
1282
+ _id?: string | null;
1283
+ /** The delivery region name. */
1284
+ name?: string | null;
1285
+ }
1286
+ export interface ApplicableLineItems {
1287
+ /** Line items that the delivery solution is for. */
1288
+ lineItemIds?: string[];
1289
+ }
1290
+ export interface CarrierServiceOption {
1291
+ /** Carrier ID. */
1292
+ carrierId?: string;
1293
+ /** Shipping options offered by this carrier for this request. */
1294
+ shippingOptions?: ShippingOption[];
1295
+ }
1296
+ export interface ShippingOption {
1297
+ /**
1298
+ * Unique code of provided shipping option like "usps_std_overnight".
1299
+ * For legacy calculators this would be the UUID of the option.
1300
+ */
1301
+ code?: string;
1302
+ /**
1303
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1304
+ * For example, "Standard" or "First-Class Package International".
1305
+ */
1306
+ title?: string;
1307
+ /** Delivery logistics. */
1308
+ logistics?: DeliveryLogistics;
1309
+ /** Sipping price information. */
1310
+ cost?: ShippingPrice;
1311
+ /** Delivery solution allocations to different delivery carriers and delivery regions */
1312
+ deliveryAllocations?: DeliveryAllocation[];
1313
+ /** If the delivery solution is a partial and doesn't apply to all items. */
1314
+ partial?: boolean | null;
1315
+ }
1316
+ export interface ShippingPrice {
1317
+ /** Shipping price. */
1318
+ price?: MultiCurrencyPrice;
1319
+ /** Other costs such as insurance, handling & packaging for fragile items, etc. */
1320
+ otherCharges?: OtherCharge[];
1321
+ }
1322
+ export interface OtherCharge {
1323
+ /** Type of additional cost. */
1324
+ type?: ChargeType;
1325
+ /** Price of added cost. */
1326
+ price?: MultiCurrencyPrice;
1327
+ }
1328
+ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1329
+ /** Coupon details. */
1330
+ coupon?: V1Coupon;
1331
+ /** Merchant discount. */
1332
+ merchantDiscount?: V1MerchantDiscount;
1333
+ /** Discount rule */
1334
+ discountRule?: V1DiscountRule;
1335
+ /** Discount type. */
1336
+ discountType?: AppliedDiscountDiscountType;
1337
+ /**
1338
+ * IDs of the line items the discount applies to.
1339
+ * @deprecated IDs of line items the discount applies to.
1340
+ * @replacedBy line_items_discounts
1341
+ * @targetRemovalDate 2024-06-01
1342
+ */
1343
+ lineItemIds?: string[];
1344
+ }
1345
+ /** @oneof */
1346
+ export interface AppliedDiscountDiscountSourceOneOf {
1347
+ /** Coupon details. */
1348
+ coupon?: V1Coupon;
1349
+ /** Merchant discount. */
1350
+ merchantDiscount?: V1MerchantDiscount;
1351
+ /** Discount rule */
1352
+ discountRule?: V1DiscountRule;
1353
+ }
1354
+ export declare enum AppliedDiscountDiscountType {
1355
+ GLOBAL = "GLOBAL",
1356
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
1357
+ SHIPPING = "SHIPPING"
1358
+ }
1359
+ /** Coupon */
1360
+ export interface V1Coupon {
1361
+ /** Coupon ID. */
1362
+ _id?: string;
1363
+ /** Coupon code. */
1364
+ code?: string;
1365
+ /** Coupon value. */
1366
+ amount?: MultiCurrencyPrice;
1367
+ /** Coupon name. */
1368
+ name?: string;
1369
+ }
1370
+ export interface V1MerchantDiscount {
1371
+ /** Discount value. */
1372
+ amount?: MultiCurrencyPrice;
1373
+ /** Discount Percentage. Will be calculated from items price before other discounts. */
1374
+ percentage?: number | null;
1375
+ }
1376
+ export interface V1DiscountRule {
1377
+ /** Discount rule ID */
1378
+ _id?: string;
1379
+ /** Discount rule name */
1380
+ name?: V1DiscountRuleName;
1381
+ /** Discount value. */
1382
+ amount?: MultiCurrencyPrice;
1383
+ }
1384
+ export interface V1DiscountRuleName {
1385
+ /** Original discount rule name (in site's default language). */
1386
+ original?: string;
1387
+ /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
1388
+ translated?: string | null;
1389
+ }
1390
+ export interface LineItemDiscount {
1391
+ /** ID of line item the discount applies to. */
1392
+ _id?: string;
1393
+ /** Discount value. */
1394
+ totalDiscountAmount?: MultiCurrencyPrice;
1395
+ }
1396
+ export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1397
+ /** General shipping calculation error. */
1398
+ generalShippingCalculationError?: Details;
1399
+ /** Carrier errors. */
1400
+ carrierErrors?: CarrierErrors;
1401
+ /** Tax calculation error. */
1402
+ taxCalculationError?: Details;
1403
+ /** Coupon calculation error. */
1404
+ couponCalculationError?: Details;
1405
+ /** Gift card calculation error. */
1406
+ giftCardCalculationError?: Details;
1407
+ /** Order validation errors. */
1408
+ orderValidationErrors?: ApplicationError[];
1409
+ /**
1410
+ * Membership payment methods calculation errors
1411
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
1412
+ */
1413
+ membershipError?: Details;
1414
+ /** Discount Rule calculation error. */
1415
+ discountsCalculationError?: Details;
1416
+ }
1417
+ /** @oneof */
1418
+ export interface CalculationErrorsShippingCalculationErrorOneOf {
1419
+ /** General shipping calculation error. */
1420
+ generalShippingCalculationError?: Details;
1421
+ /** Carrier errors. */
1422
+ carrierErrors?: CarrierErrors;
1423
+ }
1424
+ export interface Details extends DetailsKindOneOf {
1425
+ applicationError?: ApplicationError;
1426
+ validationError?: ValidationError;
1427
+ systemError?: SystemError;
1428
+ /**
1429
+ * Deprecated in APIs. Used to enable migration from rendering arbitrary tracing to rest response.
1430
+ * @deprecated
1431
+ */
1432
+ tracing?: Record<string, string>;
1433
+ }
1434
+ /** @oneof */
1435
+ export interface DetailsKindOneOf {
1436
+ applicationError?: ApplicationError;
1437
+ validationError?: ValidationError;
1438
+ systemError?: SystemError;
1439
+ }
1440
+ /**
1441
+ * example result:
1442
+ * {
1443
+ * "fieldViolations": [
1444
+ * {
1445
+ * "field": "fieldA",
1446
+ * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
1447
+ * "violatedRule": "OTHER",
1448
+ * "ruleName": "INVALID_NOTE",
1449
+ * "data": {
1450
+ * "value": "FI"
1451
+ * }
1452
+ * },
1453
+ * {
1454
+ * "field": "fieldB",
1455
+ * "description": "field value out of range. supported range: [0-20]",
1456
+ * "violatedRule": "MAX",
1457
+ * "data": {
1458
+ * "threshold": 20
1459
+ * }
1460
+ * },
1461
+ * {
1462
+ * "field": "fieldC",
1463
+ * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
1464
+ * "violatedRule": "FORMAT",
1465
+ * "data": {
1466
+ * "type": "PHONE"
1467
+ * }
1468
+ * }
1469
+ * ]
1470
+ * }
1471
+ */
1472
+ export interface ValidationError {
1473
+ fieldViolations?: FieldViolation[];
1474
+ }
1475
+ export declare enum RuleType {
1476
+ VALIDATION = "VALIDATION",
1477
+ OTHER = "OTHER",
1478
+ MAX = "MAX",
1479
+ MIN = "MIN",
1480
+ MAX_LENGTH = "MAX_LENGTH",
1481
+ MIN_LENGTH = "MIN_LENGTH",
1482
+ MAX_SIZE = "MAX_SIZE",
1483
+ MIN_SIZE = "MIN_SIZE",
1484
+ FORMAT = "FORMAT",
1485
+ DECIMAL_LTE = "DECIMAL_LTE",
1486
+ DECIMAL_GTE = "DECIMAL_GTE",
1487
+ DECIMAL_LT = "DECIMAL_LT",
1488
+ DECIMAL_GT = "DECIMAL_GT",
1489
+ DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
1490
+ INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
1491
+ REQUIRED_FIELD = "REQUIRED_FIELD",
1492
+ FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
1493
+ ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
1494
+ EXACT_LENGTH = "EXACT_LENGTH",
1495
+ EXACT_SIZE = "EXACT_SIZE",
1496
+ REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1497
+ }
1498
+ export interface FieldViolation {
1499
+ field?: string;
1500
+ description?: string;
1501
+ violatedRule?: RuleType;
1502
+ /** applicable when violated_rule=OTHER */
1503
+ ruleName?: string | null;
1504
+ data?: Record<string, any> | null;
1505
+ }
1506
+ export interface SystemError {
1507
+ /** Error code. */
1508
+ errorCode?: string | null;
1509
+ }
1510
+ export interface CarrierErrors {
1511
+ /** Carrier errors. */
1512
+ errors?: CarrierError[];
1513
+ }
1514
+ export interface CarrierError {
1515
+ /** Carrier ID. */
1516
+ carrierId?: string;
1517
+ /** Error details. */
1518
+ error?: Details;
1519
+ }
1520
+ export interface MembershipOptions {
1521
+ /** List of payment options that can be used. */
1522
+ eligibleMemberships?: Membership[];
1523
+ /** List of payment options that are owned by the member, but cannot be used due to reason provided. */
1524
+ invalidMemberships?: InvalidMembership[];
1525
+ /** The selected membership payment options and which line items they apply to. */
1526
+ selectedMemberships?: HostSelectedMembership[];
1527
+ }
1528
+ export interface Membership {
1529
+ /** Membership ID. */
1530
+ _id?: string;
1531
+ /** ID of the application providing this payment option. */
1532
+ appId?: string;
1533
+ /** The name of this membership. */
1534
+ name?: MembershipName;
1535
+ /** Line item IDs which are "paid" for by this membership. */
1536
+ lineItemIds?: string[];
1537
+ /** Optional - For a membership that has limited credits, information about credit usage. */
1538
+ credits?: MembershipPaymentCredits;
1539
+ /** Optional - TMembership expiry date. */
1540
+ expirationDate?: Date | null;
1541
+ /** Additional data about this membership. */
1542
+ additionalData?: Record<string, any> | null;
1543
+ }
1544
+ export interface MembershipName {
1545
+ /** Membership name. */
1546
+ original?: string;
1547
+ /** Membership name translated into buyer's language. Defaults to `original` when not defined. */
1548
+ translated?: string | null;
1549
+ }
1550
+ export interface MembershipPaymentCredits {
1551
+ /** Membership's total amount of credits. */
1552
+ total?: number;
1553
+ /** Membership's remaining amount of credits. */
1554
+ remaining?: number;
1555
+ }
1556
+ export interface InvalidMembership {
1557
+ /** Membership details. */
1558
+ membership?: Membership;
1559
+ /** Reason why this membership is invalid and cannot be used. */
1560
+ reason?: string;
1561
+ }
1562
+ export interface AdditionalFee {
1563
+ /** Additional fee's unique code (or ID) for future processing. */
1564
+ code?: string | null;
1565
+ /** Translated additional fee's name. */
1566
+ name?: string;
1567
+ /** Additional fee's price. */
1568
+ price?: MultiCurrencyPrice;
1569
+ /** Tax details. */
1570
+ taxDetails?: ItemTaxFullDetails;
1571
+ /** Provider's app id. */
1572
+ providerAppId?: string | null;
1573
+ /** Additional fee's price before tax. */
1574
+ priceBeforeTax?: MultiCurrencyPrice;
1575
+ /** Additional fee's price after tax. */
1576
+ priceAfterTax?: MultiCurrencyPrice;
1577
+ /**
1578
+ * Optional - Line items associated with this additional fee.
1579
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
1580
+ */
1581
+ lineItemIds?: string[];
1582
+ /** the source the additional fee was added from */
1583
+ source?: AdditionalFeeSource;
1584
+ }
1585
+ export declare enum AdditionalFeeSource {
1586
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
1587
+ /** The additional fee was added by an additional fee service plugin */
1588
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
1589
+ /** The additional fee was added on the item either via the catalog or on custom line item */
1590
+ ITEM = "ITEM",
1591
+ /** The additional fee was added manually on the request */
1592
+ MANUAL = "MANUAL"
1593
+ }
1594
+ export interface Violation {
1595
+ /** 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. */
1596
+ severity?: Severity;
1597
+ /** Target location on a checkout or cart page where the violation will be displayed. */
1598
+ target?: Target;
1599
+ /** 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>`. */
1600
+ description?: string | null;
1601
+ }
1602
+ export declare enum Severity {
1603
+ /** The user is allowed to move forward in the flow. */
1604
+ WARNING = "WARNING",
1605
+ /**
1606
+ * The user is blocked from moving forward in the flow.
1607
+ * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
1608
+ */
1609
+ ERROR = "ERROR"
1610
+ }
1611
+ export interface Target extends TargetTargetTypeOneOf {
1612
+ /** General (other) violation. */
1613
+ other?: Other;
1614
+ /** Specific line item violation. */
1615
+ lineItem?: TargetLineItem;
1616
+ }
1617
+ /** @oneof */
1618
+ export interface TargetTargetTypeOneOf {
1619
+ /** General (other) violation. */
1620
+ other?: Other;
1621
+ /** Specific line item violation. */
1622
+ lineItem?: TargetLineItem;
1623
+ }
1624
+ /** Available locations on the webpage */
1625
+ export declare enum NameInOther {
1626
+ /** Default location, in case no specific location is specified. */
1627
+ OTHER_DEFAULT = "OTHER_DEFAULT"
1628
+ }
1629
+ /** Available locations on the line item */
1630
+ export declare enum NameInLineItem {
1631
+ /** Default location, in case no specific location is specified. */
1632
+ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
1633
+ }
1634
+ export declare enum SuggestedFix {
1635
+ /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
1636
+ UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
1637
+ /** The line item should be removed from the cart or checkout to resolve the violation. */
1638
+ REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
1639
+ }
1640
+ /** General (other) violation. */
1641
+ export interface Other {
1642
+ /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
1643
+ name?: NameInOther;
1644
+ }
1645
+ /** Specific line item violation. */
1646
+ export interface TargetLineItem {
1647
+ /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
1648
+ name?: NameInLineItem;
1649
+ /** ID of the line item containing the violation. */
1650
+ _id?: string | null;
1651
+ }
1652
+ export interface RemoveLineItemsFromCurrentCartRequest {
1653
+ /** IDs of the line items to remove from the cart. */
1654
+ lineItemIds?: string[];
1655
+ }
1656
+ export interface RemoveLineItemsResponse {
1657
+ /** Updated cart. */
1658
+ cart?: Cart;
1659
+ }
1660
+ export interface CreateCheckoutFromCurrentCartRequest {
1661
+ /** **Required**. Sales channel type. */
1662
+ channelType?: ChannelType;
1663
+ /** Shipping address. Used for calculating tax and shipping (when applicable). */
1664
+ shippingAddress?: Address;
1665
+ /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
1666
+ billingAddress?: Address;
1667
+ /** Selected shipping option. */
1668
+ selectedShippingOption?: SelectedShippingOption;
1669
+ /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */
1670
+ email?: string | null;
1671
+ }
1672
+ export declare enum ChannelType {
1673
+ /** Unspecified sales channel. This value is not supported. */
1674
+ UNSPECIFIED = "UNSPECIFIED",
1675
+ /** A web client. */
1676
+ WEB = "WEB",
1677
+ /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
1678
+ POS = "POS",
1679
+ /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
1680
+ EBAY = "EBAY",
1681
+ /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
1682
+ AMAZON = "AMAZON",
1683
+ /** Other sales platform. */
1684
+ OTHER_PLATFORM = "OTHER_PLATFORM",
1685
+ /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
1686
+ WIX_APP_STORE = "WIX_APP_STORE",
1687
+ /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */
1688
+ WIX_INVOICES = "WIX_INVOICES",
1689
+ /** Wix merchant backoffice. */
1690
+ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
1691
+ /** Wish sales channel. */
1692
+ WISH = "WISH",
1693
+ /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
1694
+ CLASS_PASS = "CLASS_PASS",
1695
+ /** Global-E sales channel. */
1696
+ GLOBAL_E = "GLOBAL_E",
1697
+ /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
1698
+ FACEBOOK = "FACEBOOK",
1699
+ /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
1700
+ ETSY = "ETSY",
1701
+ /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
1702
+ TIKTOK = "TIKTOK",
1703
+ /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
1704
+ FAIRE_COM = "FAIRE_COM"
1705
+ }
1706
+ export interface CreateCheckoutResponse {
1707
+ /** The newly created checkout's ID. */
1708
+ checkoutId?: string;
1709
+ }
1710
+ export interface RemoveCouponFromCurrentCartRequest {
1711
+ }
1712
+ export interface RemoveCouponResponse {
1713
+ /** Updated cart. */
1714
+ cart?: Cart;
1715
+ }
1716
+ export interface UpdateCurrentCartLineItemQuantityRequest {
1717
+ /** Line item IDs and their new quantity. */
1718
+ lineItems?: LineItemQuantityUpdate[];
1719
+ }
1720
+ export interface LineItemQuantityUpdate {
1721
+ /** Line item ID. Required. */
1722
+ _id?: string;
1723
+ /** New quantity. Number must be 1 or higher. Required. */
1724
+ quantity?: number;
1725
+ }
1726
+ export interface UpdateLineItemsQuantityResponse {
1727
+ /** Updated cart. */
1728
+ cart?: Cart;
1729
+ }
1730
+ export interface EstimateCurrentCartTotalsRequest {
1731
+ /** Selected shipping option. */
1732
+ selectedShippingOption?: SelectedShippingOption;
1733
+ /** Shipping address. Used for calculating tax and shipping (when applicable). */
1734
+ shippingAddress?: Address;
1735
+ /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
1736
+ billingAddress?: Address;
1737
+ /** The selected membership payment options and which line items they apply to. */
1738
+ selectedMemberships?: SelectedMemberships;
1739
+ /**
1740
+ * Whether to calculate tax in the calculation request.
1741
+ *
1742
+ * Default: `true`
1743
+ */
1744
+ calculateTax?: boolean | null;
1745
+ /**
1746
+ * Whether to calculate shipping in the calculation request.
1747
+ *
1748
+ * Default: `true`
1749
+ */
1750
+ calculateShipping?: boolean | null;
1751
+ }
1752
+ export interface DeleteCurrentCartRequest {
1753
+ }
1754
+ export interface DeleteCartResponse {
1755
+ }
1756
+ export interface DomainEvent extends DomainEventBodyOneOf {
1757
+ createdEvent?: EntityCreatedEvent;
1758
+ updatedEvent?: EntityUpdatedEvent;
1759
+ deletedEvent?: EntityDeletedEvent;
1760
+ actionEvent?: ActionEvent;
1761
+ /**
1762
+ * Unique event ID.
1763
+ * Allows clients to ignore duplicate webhooks.
1764
+ */
1765
+ _id?: string;
1766
+ /**
1767
+ * Assumes actions are also always typed to an entity_type
1768
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1769
+ */
1770
+ entityFqdn?: string;
1771
+ /**
1772
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1773
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1774
+ * Example: created/updated/deleted/started/completed/email_opened
1775
+ */
1776
+ slug?: string;
1777
+ /** ID of the entity associated with the event. */
1778
+ entityId?: string;
1779
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1780
+ eventTime?: Date | null;
1781
+ /**
1782
+ * Whether the event was triggered as a result of a privacy regulation application
1783
+ * (for example, GDPR).
1784
+ */
1785
+ triggeredByAnonymizeRequest?: boolean | null;
1786
+ /** If present, indicates the action that triggered the event. */
1787
+ originatedFrom?: string | null;
1788
+ /**
1789
+ * A sequence number defining the order of updates to the underlying entity.
1790
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1791
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1792
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1793
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1794
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1795
+ */
1796
+ entityEventSequence?: string | null;
1797
+ }
1798
+ /** @oneof */
1799
+ export interface DomainEventBodyOneOf {
1800
+ createdEvent?: EntityCreatedEvent;
1801
+ updatedEvent?: EntityUpdatedEvent;
1802
+ deletedEvent?: EntityDeletedEvent;
1803
+ actionEvent?: ActionEvent;
1804
+ }
1805
+ export interface EntityCreatedEvent {
1806
+ entity?: string;
1807
+ }
1808
+ export interface RestoreInfo {
1809
+ deletedDate?: Date | null;
1810
+ }
1811
+ export interface EntityUpdatedEvent {
1812
+ /**
1813
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1814
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1815
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1816
+ */
1817
+ currentEntity?: string;
1818
+ }
1819
+ export interface EntityDeletedEvent {
1820
+ /** Entity that was deleted */
1821
+ deletedEntity?: string | null;
1822
+ }
1823
+ export interface ActionEvent {
1824
+ body?: string;
1825
+ }
1826
+ export interface MessageEnvelope {
1827
+ /** App instance ID. */
1828
+ instanceId?: string | null;
1829
+ /** Event type. */
1830
+ eventType?: string;
1831
+ /** The identification type and identity data. */
1832
+ identity?: IdentificationData;
1833
+ /** Stringify payload. */
1834
+ data?: string;
1835
+ }
1836
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1837
+ /** ID of a site visitor that has not logged in to the site. */
1838
+ anonymousVisitorId?: string;
1839
+ /** ID of a site visitor that has logged in to the site. */
1840
+ memberId?: string;
1841
+ /** ID of a Wix user (site owner, contributor, etc.). */
1842
+ wixUserId?: string;
1843
+ /** ID of an app. */
1844
+ appId?: string;
1845
+ /** @readonly */
1846
+ identityType?: WebhookIdentityType;
1847
+ }
1848
+ /** @oneof */
1849
+ export interface IdentificationDataIdOneOf {
1850
+ /** ID of a site visitor that has not logged in to the site. */
1851
+ anonymousVisitorId?: string;
1852
+ /** ID of a site visitor that has logged in to the site. */
1853
+ memberId?: string;
1854
+ /** ID of a Wix user (site owner, contributor, etc.). */
1855
+ wixUserId?: string;
1856
+ /** ID of an app. */
1857
+ appId?: string;
1858
+ }
1859
+ export declare enum WebhookIdentityType {
1860
+ UNKNOWN = "UNKNOWN",
1861
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1862
+ MEMBER = "MEMBER",
1863
+ WIX_USER = "WIX_USER",
1864
+ APP = "APP"
1865
+ }
1866
+ export interface CreateCartRequest {
1867
+ /** Cart info. */
1868
+ cartInfo?: Cart;
1869
+ /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
1870
+ couponCode?: string | null;
1871
+ /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */
1872
+ merchantDiscounts?: MerchantDiscountInput[];
1873
+ /** Catalog line items. */
1874
+ lineItems?: LineItem[];
1875
+ /**
1876
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
1877
+ *
1878
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
1879
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
1880
+ */
1881
+ customLineItems?: CustomLineItem[];
1882
+ }
1883
+ export interface CreateCartResponse {
1884
+ /** Cart. */
1885
+ cart?: Cart;
1886
+ }
1887
+ export interface GetCartRequest {
1888
+ /** ID of the cart to retrieve. */
1889
+ _id: string;
1890
+ }
1891
+ export interface GetCartResponse {
1892
+ /** The requested cart. */
1893
+ cart?: Cart;
1894
+ }
1895
+ export interface GetCartByCheckoutIdRequest {
1896
+ /** Checkout ID. */
1897
+ _id: string;
1898
+ }
1899
+ export interface GetCartByCheckoutIdResponse {
1900
+ /** The requested cart. */
1901
+ cart?: Cart;
1902
+ }
1903
+ export interface AddToCartRequest {
1904
+ /** Cart ID. */
1905
+ _id: string;
1906
+ /** Catalog line items. */
1907
+ lineItems?: LineItem[];
1908
+ /**
1909
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
1910
+ *
1911
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
1912
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
1913
+ */
1914
+ customLineItems?: CustomLineItem[];
1915
+ }
1916
+ export interface RemoveLineItemsRequest {
1917
+ /** Cart ID. */
1918
+ _id: string;
1919
+ /** IDs of the line items to remove from the cart. */
1920
+ lineItemIds: string[];
1921
+ }
1922
+ export interface CreateCheckoutRequest {
1923
+ /** Cart ID. */
1924
+ _id: string;
1925
+ /** **Required**. Sales channel type. */
1926
+ channelType?: ChannelType;
1927
+ /** Shipping address. Used for calculating tax and shipping (when applicable). */
1928
+ shippingAddress?: Address;
1929
+ /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
1930
+ billingAddress?: Address;
1931
+ /** Selected shipping option. */
1932
+ selectedShippingOption?: SelectedShippingOption;
1933
+ /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */
1934
+ email?: string | null;
1935
+ }
1936
+ export interface RemoveCouponRequest {
1937
+ /** Cart ID. */
1938
+ _id: string;
1939
+ }
1940
+ export interface UpdateLineItemsQuantityRequest {
1941
+ /** Cart ID. */
1942
+ _id: string;
1943
+ /** Line item IDs and their new quantity. */
1944
+ lineItems: LineItemQuantityUpdate[];
1945
+ }
1946
+ export interface EstimateTotalsRequest {
1947
+ /** Cart ID. */
1948
+ _id: string;
1949
+ /** Selected shipping option. */
1950
+ selectedShippingOption?: SelectedShippingOption;
1951
+ /** Shipping address. Used for calculating tax and shipping (when applicable). */
1952
+ shippingAddress?: Address;
1953
+ /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
1954
+ billingAddress?: Address;
1955
+ /** The selected membership payment options and which line items they apply to. */
1956
+ selectedMemberships?: SelectedMemberships;
1957
+ /**
1958
+ * Whether to calculate tax in the calculation request.
1959
+ *
1960
+ * Default: `true`
1961
+ */
1962
+ calculateTax?: boolean | null;
1963
+ /**
1964
+ * Whether to calculate shipping in the calculation request.
1965
+ *
1966
+ * Default: `true`
1967
+ */
1968
+ calculateShipping?: boolean | null;
1969
+ }
1970
+ export interface DeleteCartRequest {
1971
+ /** ID of the cart to delete. */
1972
+ _id: string;
1973
+ }
1974
+ export interface Empty {
1975
+ }
1976
+ export interface RemoveBusinessLocationRequest {
1977
+ /** Cart ID. */
1978
+ _id: string;
1979
+ }
1980
+ export interface RemoveBusinessLocationResponse {
1981
+ /** Updated cart. */
1982
+ cart?: Cart;
1983
+ }
1984
+ interface CatalogReferenceNonNullableFields {
1985
+ catalogItemId: string;
1986
+ appId: string;
1987
+ }
1988
+ interface ProductNameNonNullableFields {
1989
+ original: string;
1990
+ }
1991
+ interface MultiCurrencyPriceNonNullableFields {
1992
+ amount: string;
1993
+ convertedAmount: string;
1994
+ formattedAmount: string;
1995
+ formattedConvertedAmount: string;
1996
+ }
1997
+ interface PlainTextValueNonNullableFields {
1998
+ original: string;
1999
+ }
2000
+ interface ColorNonNullableFields {
2001
+ original: string;
2002
+ }
2003
+ interface DescriptionLineNameNonNullableFields {
2004
+ original: string;
2005
+ }
2006
+ interface DescriptionLineNonNullableFields {
2007
+ plainText?: PlainTextValueNonNullableFields;
2008
+ colorInfo?: ColorNonNullableFields;
2009
+ plainTextValue?: PlainTextValueNonNullableFields;
2010
+ color: string;
2011
+ name?: DescriptionLineNameNonNullableFields;
2012
+ lineType: DescriptionLineType;
2013
+ }
2014
+ interface ItemAvailabilityInfoNonNullableFields {
2015
+ status: ItemAvailabilityStatus;
2016
+ }
2017
+ interface PhysicalPropertiesNonNullableFields {
2018
+ shippable: boolean;
2019
+ }
2020
+ interface ItemTypeNonNullableFields {
2021
+ preset: ItemTypeItemType;
2022
+ custom: string;
2023
+ }
2024
+ interface SubscriptionSettingsNonNullableFields {
2025
+ frequency: SubscriptionFrequency;
2026
+ autoRenewal: boolean;
2027
+ }
2028
+ interface TitleNonNullableFields {
2029
+ original: string;
2030
+ }
2031
+ interface DescriptionNonNullableFields {
2032
+ original: string;
2033
+ }
2034
+ interface SubscriptionOptionInfoNonNullableFields {
2035
+ subscriptionSettings?: SubscriptionSettingsNonNullableFields;
2036
+ title?: TitleNonNullableFields;
2037
+ description?: DescriptionNonNullableFields;
2038
+ }
2039
+ interface SecuredMediaNonNullableFields {
2040
+ _id: string;
2041
+ fileName: string;
2042
+ fileType: FileType;
2043
+ }
2044
+ interface PriceDescriptionNonNullableFields {
2045
+ original: string;
2046
+ }
2047
+ interface SelectedMembershipNonNullableFields {
2048
+ _id: string;
2049
+ appId: string;
2050
+ }
2051
+ interface PaymentOptionNonNullableFields {
2052
+ value: PaymentOptionType;
2053
+ }
2054
+ interface CatalogOverrideFieldsNonNullableFields {
2055
+ productName?: ProductNameNonNullableFields;
2056
+ descriptionLines: DescriptionLineNonNullableFields[];
2057
+ physicalProperties?: PhysicalPropertiesNonNullableFields;
2058
+ image: string;
2059
+ paymentOption?: PaymentOptionNonNullableFields;
2060
+ }
2061
+ interface LineItemNonNullableFields {
2062
+ quantity: number;
2063
+ catalogReference?: CatalogReferenceNonNullableFields;
2064
+ productName?: ProductNameNonNullableFields;
2065
+ url: string;
2066
+ price?: MultiCurrencyPriceNonNullableFields;
2067
+ fullPrice?: MultiCurrencyPriceNonNullableFields;
2068
+ priceBeforeDiscounts?: MultiCurrencyPriceNonNullableFields;
2069
+ descriptionLines: DescriptionLineNonNullableFields[];
2070
+ image: string;
2071
+ availability?: ItemAvailabilityInfoNonNullableFields;
2072
+ physicalProperties?: PhysicalPropertiesNonNullableFields;
2073
+ itemType?: ItemTypeNonNullableFields;
2074
+ subscriptionOptionInfo?: SubscriptionOptionInfoNonNullableFields;
2075
+ digitalFile?: SecuredMediaNonNullableFields;
2076
+ paymentOption: PaymentOptionType;
2077
+ priceDescription?: PriceDescriptionNonNullableFields;
2078
+ depositAmount?: MultiCurrencyPriceNonNullableFields;
2079
+ selectedMembership?: SelectedMembershipNonNullableFields;
2080
+ customLineItem: boolean;
2081
+ catalogOverrideFields?: CatalogOverrideFieldsNonNullableFields;
2082
+ savePaymentMethod: boolean;
2083
+ }
2084
+ interface BuyerInfoNonNullableFields {
2085
+ visitorId: string;
2086
+ memberId: string;
2087
+ userId: string;
2088
+ }
2089
+ interface CouponNonNullableFields {
2090
+ _id: string;
2091
+ code: string;
2092
+ }
2093
+ interface MerchantDiscountNonNullableFields {
2094
+ amount?: MultiCurrencyPriceNonNullableFields;
2095
+ }
2096
+ interface CartDiscountNonNullableFields {
2097
+ coupon?: CouponNonNullableFields;
2098
+ merchantDiscount?: MerchantDiscountNonNullableFields;
2099
+ }
2100
+ interface StreetAddressNonNullableFields {
2101
+ number: string;
2102
+ name: string;
2103
+ apt: string;
2104
+ }
2105
+ interface AddressNonNullableFields {
2106
+ streetAddress?: StreetAddressNonNullableFields;
2107
+ }
2108
+ interface VatIdNonNullableFields {
2109
+ _id: string;
2110
+ type: VatType;
2111
+ }
2112
+ interface FullAddressContactDetailsNonNullableFields {
2113
+ vatId?: VatIdNonNullableFields;
2114
+ }
2115
+ interface AddressWithContactNonNullableFields {
2116
+ address?: AddressNonNullableFields;
2117
+ contactDetails?: FullAddressContactDetailsNonNullableFields;
2118
+ }
2119
+ interface SelectedShippingOptionNonNullableFields {
2120
+ code: string;
2121
+ }
2122
+ export interface CartNonNullableFields {
2123
+ lineItems: LineItemNonNullableFields[];
2124
+ buyerInfo?: BuyerInfoNonNullableFields;
2125
+ currency: string;
2126
+ conversionCurrency: string;
2127
+ weightUnit: WeightUnit;
2128
+ subtotal?: MultiCurrencyPriceNonNullableFields;
2129
+ appliedDiscounts: CartDiscountNonNullableFields[];
2130
+ contactInfo?: AddressWithContactNonNullableFields;
2131
+ selectedShippingOption?: SelectedShippingOptionNonNullableFields;
2132
+ }
2133
+ export interface CreateCartResponseNonNullableFields {
2134
+ cart?: CartNonNullableFields;
2135
+ }
2136
+ export interface UpdateCartResponseNonNullableFields {
2137
+ cart?: CartNonNullableFields;
2138
+ }
2139
+ export interface GetCartResponseNonNullableFields {
2140
+ cart?: CartNonNullableFields;
2141
+ }
2142
+ export interface GetCartByCheckoutIdResponseNonNullableFields {
2143
+ cart?: CartNonNullableFields;
2144
+ }
2145
+ export interface AddToCartResponseNonNullableFields {
2146
+ cart?: CartNonNullableFields;
2147
+ }
2148
+ export interface RemoveLineItemsResponseNonNullableFields {
2149
+ cart?: CartNonNullableFields;
2150
+ }
2151
+ export interface CreateCheckoutResponseNonNullableFields {
2152
+ checkoutId: string;
2153
+ }
2154
+ export interface RemoveCouponResponseNonNullableFields {
2155
+ cart?: CartNonNullableFields;
2156
+ }
2157
+ export interface UpdateLineItemsQuantityResponseNonNullableFields {
2158
+ cart?: CartNonNullableFields;
2159
+ }
2160
+ interface TaxRateBreakdownNonNullableFields {
2161
+ name: string;
2162
+ rate: string;
2163
+ tax?: MultiCurrencyPriceNonNullableFields;
2164
+ exemptAmount?: MultiCurrencyPriceNonNullableFields;
2165
+ exemptionIds: number[];
2166
+ taxableAmount?: MultiCurrencyPriceNonNullableFields;
2167
+ }
2168
+ interface TaxBreakdownNonNullableFields {
2169
+ nonTaxableAmount?: MultiCurrencyPriceNonNullableFields;
2170
+ taxAmount?: MultiCurrencyPriceNonNullableFields;
2171
+ taxableAmount?: MultiCurrencyPriceNonNullableFields;
2172
+ jurisdictionType: JurisdictionType;
2173
+ }
2174
+ interface ItemTaxFullDetailsNonNullableFields {
2175
+ taxableAmount?: MultiCurrencyPriceNonNullableFields;
2176
+ taxRate: string;
2177
+ totalTax?: MultiCurrencyPriceNonNullableFields;
2178
+ rateBreakdown: TaxRateBreakdownNonNullableFields[];
2179
+ exemptAmount?: MultiCurrencyPriceNonNullableFields;
2180
+ taxBreakdown: TaxBreakdownNonNullableFields[];
2181
+ }
2182
+ interface LineItemPricesDataNonNullableFields {
2183
+ totalPriceAfterTax?: MultiCurrencyPriceNonNullableFields;
2184
+ totalPriceBeforeTax?: MultiCurrencyPriceNonNullableFields;
2185
+ taxDetails?: ItemTaxFullDetailsNonNullableFields;
2186
+ totalDiscount?: MultiCurrencyPriceNonNullableFields;
2187
+ price?: MultiCurrencyPriceNonNullableFields;
2188
+ priceBeforeDiscounts?: MultiCurrencyPriceNonNullableFields;
2189
+ lineItemPrice?: MultiCurrencyPriceNonNullableFields;
2190
+ fullPrice?: MultiCurrencyPriceNonNullableFields;
2191
+ }
2192
+ interface CalculatedLineItemNonNullableFields {
2193
+ lineItemId: string;
2194
+ pricesBreakdown?: LineItemPricesDataNonNullableFields;
2195
+ paymentOption: PaymentOptionType;
2196
+ }
2197
+ interface PriceSummaryNonNullableFields {
2198
+ subtotal?: MultiCurrencyPriceNonNullableFields;
2199
+ shipping?: MultiCurrencyPriceNonNullableFields;
2200
+ tax?: MultiCurrencyPriceNonNullableFields;
2201
+ discount?: MultiCurrencyPriceNonNullableFields;
2202
+ total?: MultiCurrencyPriceNonNullableFields;
2203
+ additionalFees?: MultiCurrencyPriceNonNullableFields;
2204
+ }
2205
+ interface GiftCardNonNullableFields {
2206
+ _id: string;
2207
+ obfuscatedCode: string;
2208
+ amount?: MultiCurrencyPriceNonNullableFields;
2209
+ appId: string;
2210
+ }
2211
+ interface ApplicationErrorNonNullableFields {
2212
+ code: string;
2213
+ description: string;
2214
+ }
2215
+ interface AutoTaxFallbackCalculationDetailsNonNullableFields {
2216
+ fallbackReason: FallbackReason;
2217
+ error?: ApplicationErrorNonNullableFields;
2218
+ }
2219
+ interface TaxCalculationDetailsNonNullableFields {
2220
+ manualRateReason: ManualCalculationReason;
2221
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetailsNonNullableFields;
2222
+ rateType: RateType;
2223
+ }
2224
+ interface AggregatedTaxBreakdownNonNullableFields {
2225
+ taxName: string;
2226
+ taxType: string;
2227
+ jurisdiction: string;
2228
+ jurisdictionTypeEnum: JurisdictionType;
2229
+ rate: string;
2230
+ aggregatedTaxAmount?: MultiCurrencyPriceNonNullableFields;
2231
+ aggregatedTaxableAmount?: MultiCurrencyPriceNonNullableFields;
2232
+ }
2233
+ interface TaxSummaryNonNullableFields {
2234
+ taxableAmount?: MultiCurrencyPriceNonNullableFields;
2235
+ totalTax?: MultiCurrencyPriceNonNullableFields;
2236
+ manualTaxRate: string;
2237
+ calculationDetails?: TaxCalculationDetailsNonNullableFields;
2238
+ totalExempt?: MultiCurrencyPriceNonNullableFields;
2239
+ aggregatedTaxBreakdown: AggregatedTaxBreakdownNonNullableFields[];
2240
+ }
2241
+ interface ShippingRegionNonNullableFields {
2242
+ _id: string;
2243
+ name: string;
2244
+ }
2245
+ interface PickupDetailsNonNullableFields {
2246
+ address?: AddressNonNullableFields;
2247
+ businessLocation: boolean;
2248
+ pickupMethod: PickupMethod;
2249
+ }
2250
+ interface DeliveryLogisticsNonNullableFields {
2251
+ pickupDetails?: PickupDetailsNonNullableFields;
2252
+ }
2253
+ interface SelectedCarrierServiceOptionPricesNonNullableFields {
2254
+ totalPriceAfterTax?: MultiCurrencyPriceNonNullableFields;
2255
+ totalPriceBeforeTax?: MultiCurrencyPriceNonNullableFields;
2256
+ taxDetails?: ItemTaxFullDetailsNonNullableFields;
2257
+ totalDiscount?: MultiCurrencyPriceNonNullableFields;
2258
+ price?: MultiCurrencyPriceNonNullableFields;
2259
+ }
2260
+ interface SelectedCarrierServiceOptionOtherChargeNonNullableFields {
2261
+ type: ChargeType;
2262
+ cost?: SelectedCarrierServiceOptionPricesNonNullableFields;
2263
+ }
2264
+ interface CarrierNonNullableFields {
2265
+ code: string;
2266
+ }
2267
+ interface ApplicableLineItemsNonNullableFields {
2268
+ lineItemIds: string[];
2269
+ }
2270
+ interface DeliveryAllocationNonNullableFields {
2271
+ deliveryCarrier?: CarrierNonNullableFields;
2272
+ applicableLineItems?: ApplicableLineItemsNonNullableFields;
2273
+ }
2274
+ interface SelectedCarrierServiceOptionNonNullableFields {
2275
+ code: string;
2276
+ title: string;
2277
+ logistics?: DeliveryLogisticsNonNullableFields;
2278
+ cost?: SelectedCarrierServiceOptionPricesNonNullableFields;
2279
+ requestedShippingOption: boolean;
2280
+ otherCharges: SelectedCarrierServiceOptionOtherChargeNonNullableFields[];
2281
+ deliveryAllocations: DeliveryAllocationNonNullableFields[];
2282
+ }
2283
+ interface OtherChargeNonNullableFields {
2284
+ type: ChargeType;
2285
+ price?: MultiCurrencyPriceNonNullableFields;
2286
+ }
2287
+ interface ShippingPriceNonNullableFields {
2288
+ price?: MultiCurrencyPriceNonNullableFields;
2289
+ otherCharges: OtherChargeNonNullableFields[];
2290
+ }
2291
+ interface ShippingOptionNonNullableFields {
2292
+ code: string;
2293
+ title: string;
2294
+ logistics?: DeliveryLogisticsNonNullableFields;
2295
+ cost?: ShippingPriceNonNullableFields;
2296
+ deliveryAllocations: DeliveryAllocationNonNullableFields[];
2297
+ }
2298
+ interface CarrierServiceOptionNonNullableFields {
2299
+ carrierId: string;
2300
+ shippingOptions: ShippingOptionNonNullableFields[];
2301
+ }
2302
+ interface ShippingInformationNonNullableFields {
2303
+ region?: ShippingRegionNonNullableFields;
2304
+ selectedCarrierServiceOption?: SelectedCarrierServiceOptionNonNullableFields;
2305
+ carrierServiceOptions: CarrierServiceOptionNonNullableFields[];
2306
+ }
2307
+ interface V1CouponNonNullableFields {
2308
+ _id: string;
2309
+ code: string;
2310
+ amount?: MultiCurrencyPriceNonNullableFields;
2311
+ name: string;
2312
+ couponType: string;
2313
+ }
2314
+ interface V1MerchantDiscountNonNullableFields {
2315
+ amount?: MultiCurrencyPriceNonNullableFields;
2316
+ }
2317
+ interface V1DiscountRuleNameNonNullableFields {
2318
+ original: string;
2319
+ }
2320
+ interface V1DiscountRuleNonNullableFields {
2321
+ _id: string;
2322
+ name?: V1DiscountRuleNameNonNullableFields;
2323
+ amount?: MultiCurrencyPriceNonNullableFields;
2324
+ }
2325
+ interface LineItemDiscountNonNullableFields {
2326
+ _id: string;
2327
+ totalDiscountAmount?: MultiCurrencyPriceNonNullableFields;
2328
+ }
2329
+ interface AppliedDiscountNonNullableFields {
2330
+ coupon?: V1CouponNonNullableFields;
2331
+ merchantDiscount?: V1MerchantDiscountNonNullableFields;
2332
+ discountRule?: V1DiscountRuleNonNullableFields;
2333
+ discountType: AppliedDiscountDiscountType;
2334
+ lineItemIds: string[];
2335
+ lineItemDiscounts: LineItemDiscountNonNullableFields[];
2336
+ }
2337
+ interface FieldViolationNonNullableFields {
2338
+ field: string;
2339
+ description: string;
2340
+ violatedRule: RuleType;
2341
+ }
2342
+ interface ValidationErrorNonNullableFields {
2343
+ fieldViolations: FieldViolationNonNullableFields[];
2344
+ }
2345
+ interface DetailsNonNullableFields {
2346
+ applicationError?: ApplicationErrorNonNullableFields;
2347
+ validationError?: ValidationErrorNonNullableFields;
2348
+ }
2349
+ interface CarrierErrorNonNullableFields {
2350
+ carrierId: string;
2351
+ error?: DetailsNonNullableFields;
2352
+ }
2353
+ interface CarrierErrorsNonNullableFields {
2354
+ errors: CarrierErrorNonNullableFields[];
2355
+ }
2356
+ interface CalculationErrorsNonNullableFields {
2357
+ generalShippingCalculationError?: DetailsNonNullableFields;
2358
+ carrierErrors?: CarrierErrorsNonNullableFields;
2359
+ taxCalculationError?: DetailsNonNullableFields;
2360
+ couponCalculationError?: DetailsNonNullableFields;
2361
+ giftCardCalculationError?: DetailsNonNullableFields;
2362
+ orderValidationErrors: ApplicationErrorNonNullableFields[];
2363
+ membershipError?: DetailsNonNullableFields;
2364
+ discountsCalculationError?: DetailsNonNullableFields;
2365
+ }
2366
+ interface MembershipNameNonNullableFields {
2367
+ original: string;
2368
+ }
2369
+ interface MembershipPaymentCreditsNonNullableFields {
2370
+ total: number;
2371
+ remaining: number;
2372
+ }
2373
+ interface MembershipNonNullableFields {
2374
+ _id: string;
2375
+ appId: string;
2376
+ name?: MembershipNameNonNullableFields;
2377
+ lineItemIds: string[];
2378
+ credits?: MembershipPaymentCreditsNonNullableFields;
2379
+ }
2380
+ interface InvalidMembershipNonNullableFields {
2381
+ membership?: MembershipNonNullableFields;
2382
+ reason: string;
2383
+ }
2384
+ interface HostSelectedMembershipNonNullableFields {
2385
+ _id: string;
2386
+ appId: string;
2387
+ lineItemIds: string[];
2388
+ }
2389
+ interface MembershipOptionsNonNullableFields {
2390
+ eligibleMemberships: MembershipNonNullableFields[];
2391
+ invalidMemberships: InvalidMembershipNonNullableFields[];
2392
+ selectedMemberships: HostSelectedMembershipNonNullableFields[];
2393
+ }
2394
+ interface AdditionalFeeNonNullableFields {
2395
+ name: string;
2396
+ price?: MultiCurrencyPriceNonNullableFields;
2397
+ taxDetails?: ItemTaxFullDetailsNonNullableFields;
2398
+ priceBeforeTax?: MultiCurrencyPriceNonNullableFields;
2399
+ priceAfterTax?: MultiCurrencyPriceNonNullableFields;
2400
+ lineItemIds: string[];
2401
+ source: AdditionalFeeSource;
2402
+ }
2403
+ interface OtherNonNullableFields {
2404
+ name: NameInOther;
2405
+ }
2406
+ interface TargetLineItemNonNullableFields {
2407
+ name: NameInLineItem;
2408
+ }
2409
+ interface TargetNonNullableFields {
2410
+ other?: OtherNonNullableFields;
2411
+ lineItem?: TargetLineItemNonNullableFields;
2412
+ }
2413
+ interface ViolationNonNullableFields {
2414
+ severity: Severity;
2415
+ target?: TargetNonNullableFields;
2416
+ }
2417
+ export interface EstimateTotalsResponseNonNullableFields {
2418
+ cart?: CartNonNullableFields;
2419
+ calculatedLineItems: CalculatedLineItemNonNullableFields[];
2420
+ priceSummary?: PriceSummaryNonNullableFields;
2421
+ giftCard?: GiftCardNonNullableFields;
2422
+ taxSummary?: TaxSummaryNonNullableFields;
2423
+ shippingInfo?: ShippingInformationNonNullableFields;
2424
+ appliedDiscounts: AppliedDiscountNonNullableFields[];
2425
+ calculationErrors?: CalculationErrorsNonNullableFields;
2426
+ weightUnit: WeightUnit;
2427
+ currency: string;
2428
+ payNow?: PriceSummaryNonNullableFields;
2429
+ payLater?: PriceSummaryNonNullableFields;
2430
+ membershipOptions?: MembershipOptionsNonNullableFields;
2431
+ additionalFees: AdditionalFeeNonNullableFields[];
2432
+ violations: ViolationNonNullableFields[];
2433
+ }
2434
+ export interface RemoveBusinessLocationResponseNonNullableFields {
2435
+ cart?: CartNonNullableFields;
2436
+ }
2437
+ export interface BaseEventMetadata {
2438
+ /** App instance ID. */
2439
+ instanceId?: string | null;
2440
+ /** Event type. */
2441
+ eventType?: string;
2442
+ /** The identification type and identity data. */
2443
+ identity?: IdentificationData;
2444
+ }
2445
+ export interface EventMetadata extends BaseEventMetadata {
2446
+ /**
2447
+ * Unique event ID.
2448
+ * Allows clients to ignore duplicate webhooks.
2449
+ */
2450
+ _id?: string;
2451
+ /**
2452
+ * Assumes actions are also always typed to an entity_type
2453
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2454
+ */
2455
+ entityFqdn?: string;
2456
+ /**
2457
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2458
+ * This is although the created/updated/deleted notion is duplication of the oneof types
2459
+ * Example: created/updated/deleted/started/completed/email_opened
2460
+ */
2461
+ slug?: string;
2462
+ /** ID of the entity associated with the event. */
2463
+ entityId?: string;
2464
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
2465
+ eventTime?: Date | null;
2466
+ /**
2467
+ * Whether the event was triggered as a result of a privacy regulation application
2468
+ * (for example, GDPR).
2469
+ */
2470
+ triggeredByAnonymizeRequest?: boolean | null;
2471
+ /** If present, indicates the action that triggered the event. */
2472
+ originatedFrom?: string | null;
2473
+ /**
2474
+ * A sequence number defining the order of updates to the underlying entity.
2475
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
2476
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2477
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2478
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
2479
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2480
+ */
2481
+ entityEventSequence?: string | null;
2482
+ }
2483
+ export interface CartDeletedEnvelope {
2484
+ metadata: EventMetadata;
2485
+ }
2486
+ /**
2487
+ * Triggered when a cart is deleted.
2488
+ * @permissionScope Manage Stores - all permissions
2489
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2490
+ * @permissionScope Read eCommerce - all read permissions
2491
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
2492
+ * @permissionScope Read Orders
2493
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
2494
+ * @permissionScope Read Stores - all read permissions
2495
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
2496
+ * @permissionScope Manage Restaurants - all permissions
2497
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2498
+ * @permissionScope Manage eCommerce - all permissions
2499
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2500
+ * @permissionScope Manage Orders
2501
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2502
+ * @permissionId ECOM.READ_CARTS
2503
+ * @webhook
2504
+ * @eventType wix.ecom.v1.cart_deleted
2505
+ */
2506
+ export declare function onCartDeleted(handler: (event: CartDeletedEnvelope) => void | Promise<void>): void;
2507
+ export interface CartUpdatedEnvelope {
2508
+ entity: Cart;
2509
+ metadata: EventMetadata;
2510
+ }
2511
+ /** @permissionScope Manage Stores - all permissions
2512
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2513
+ * @permissionScope Read eCommerce - all read permissions
2514
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
2515
+ * @permissionScope Read Orders
2516
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
2517
+ * @permissionScope Read Stores - all read permissions
2518
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
2519
+ * @permissionScope Manage Restaurants - all permissions
2520
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2521
+ * @permissionScope Manage eCommerce - all permissions
2522
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2523
+ * @permissionScope Manage Orders
2524
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2525
+ * @permissionId ECOM.READ_CARTS
2526
+ * @webhook
2527
+ * @eventType wix.ecom.v1.cart_updated
2528
+ */
2529
+ export declare function onCartUpdated(handler: (event: CartUpdatedEnvelope) => void | Promise<void>): void;
2530
+ export interface CartCreatedEnvelope {
2531
+ entity: Cart;
2532
+ metadata: EventMetadata;
2533
+ }
2534
+ /**
2535
+ * Triggered when a cart is created.
2536
+ * @permissionScope Manage Stores - all permissions
2537
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2538
+ * @permissionScope Read eCommerce - all read permissions
2539
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
2540
+ * @permissionScope Read Orders
2541
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
2542
+ * @permissionScope Read Stores - all read permissions
2543
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
2544
+ * @permissionScope Manage Restaurants - all permissions
2545
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2546
+ * @permissionScope Manage eCommerce - all permissions
2547
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2548
+ * @permissionScope Manage Orders
2549
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2550
+ * @permissionId ECOM.READ_CARTS
2551
+ * @webhook
2552
+ * @eventType wix.ecom.v1.cart_created
2553
+ */
2554
+ export declare function onCartCreated(handler: (event: CartCreatedEnvelope) => void | Promise<void>): void;
2555
+ /**
2556
+ * Creates a new cart.
2557
+ *
2558
+ *
2559
+ * The `createCart()` function returns a Promise that resolves to the new cart when it's created.
2560
+ *
2561
+ * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
2562
+ * @public
2563
+ * @requiredField options.customLineItems.descriptionLines
2564
+ * @requiredField options.customLineItems.descriptionLines.name
2565
+ * @requiredField options.customLineItems.itemType
2566
+ * @requiredField options.customLineItems.price
2567
+ * @requiredField options.customLineItems.productName
2568
+ * @requiredField options.customLineItems.quantity
2569
+ * @requiredField options.lineItems.catalogReference
2570
+ * @requiredField options.lineItems.quantity
2571
+ * @requiredField options.lineItems.selectedMembership._id
2572
+ * @requiredField options.lineItems.selectedMembership.appId
2573
+ * @param options - Cart creation options.
2574
+ * @permissionId ECOM.MODIFY_CARTS
2575
+ * @permissionId ECOM.ADMIN_MODIFY_CARTS
2576
+ * @permissionScope Manage Stores - all permissions
2577
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2578
+ * @permissionScope Manage eCommerce - all permissions
2579
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2580
+ * @permissionScope Manage Stores - all permissions
2581
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2582
+ * @permissionScope Manage eCommerce - Admin Permissions
2583
+ * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
2584
+ * @permissionScope Manage eCommerce - all permissions
2585
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2586
+ * @applicableIdentity APP
2587
+ * @applicableIdentity VISITOR
2588
+ * @returns Fulfilled - Cart.
2589
+ * @fqn com.wix.ecom.cart.api.v1.CartService.CreateCart
2590
+ */
2591
+ export declare function createCart(options?: CreateCartOptions): Promise<Cart & CartNonNullableFields>;
2592
+ export interface CreateCartOptions {
2593
+ /** Cart info. */
2594
+ cartInfo?: Cart;
2595
+ /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2596
+ couponCode?: string | null;
2597
+ /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */
2598
+ merchantDiscounts?: MerchantDiscountInput[];
2599
+ /** Catalog line items. */
2600
+ lineItems?: LineItem[];
2601
+ /**
2602
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
2603
+ *
2604
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2605
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2606
+ */
2607
+ customLineItems?: CustomLineItem[];
2608
+ }
2609
+ /**
2610
+ * Updates a specified cart's properties.
2611
+ *
2612
+ *
2613
+ * The `updateCart()` function returns a Promise that resolves when the specified cart's properties are updated.
2614
+ *
2615
+ * > **Note:** When updating catalog items, `options.lineItems.catalogReference` is required.
2616
+ * @public
2617
+ * @requiredField _id
2618
+ * @requiredField options.customLineItems.descriptionLines
2619
+ * @requiredField options.customLineItems.descriptionLines.name
2620
+ * @requiredField options.customLineItems.itemType
2621
+ * @requiredField options.customLineItems.productName
2622
+ * @requiredField options.lineItems.catalogReference
2623
+ * @param options - Available options to use when updating a cart.
2624
+ * @param _id - ID of the cart to be updated.
2625
+ * @permissionId ECOM.MODIFY_CARTS
2626
+ * @permissionId ECOM.ADMIN_MODIFY_CARTS
2627
+ * @permissionScope Manage Stores - all permissions
2628
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2629
+ * @permissionScope Manage eCommerce - all permissions
2630
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2631
+ * @permissionScope Manage Stores - all permissions
2632
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2633
+ * @permissionScope Manage eCommerce - Admin Permissions
2634
+ * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
2635
+ * @permissionScope Manage eCommerce - all permissions
2636
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2637
+ * @applicableIdentity APP
2638
+ * @applicableIdentity VISITOR
2639
+ * @returns Fulfilled - Updated cart.
2640
+ * @fqn com.wix.ecom.cart.api.v1.CartService.UpdateCart
2641
+ */
2642
+ export declare function updateCart(_id: string | null, options?: UpdateCartOptions): Promise<Cart & CartNonNullableFields>;
2643
+ export interface UpdateCartOptions {
2644
+ /** The information for the cart being updated. */
2645
+ cartInfo: {
2646
+ /** ID of the cart to be updated. */
2647
+ _id?: string | null;
2648
+ /**
2649
+ * Line items.
2650
+ * @readonly
2651
+ */
2652
+ lineItems?: LineItem[];
2653
+ /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */
2654
+ buyerNote?: string | null;
2655
+ /** Buyer information. */
2656
+ buyerInfo?: BuyerInfo;
2657
+ /**
2658
+ * Currency used for pricing.
2659
+ * @readonly
2660
+ */
2661
+ currency?: string;
2662
+ /**
2663
+ * Currency code used for all the converted prices that are returned.
2664
+ * For a site that supports multiple currencies, this is the currency the buyer selected.
2665
+ * @readonly
2666
+ */
2667
+ conversionCurrency?: string;
2668
+ /**
2669
+ * Language for communication with the buyer. Defaults to the site language.
2670
+ * For a site that supports multiple languages, this is the language the buyer selected.
2671
+ * @readonly
2672
+ */
2673
+ buyerLanguage?: string | null;
2674
+ /**
2675
+ * Site language in which original values are displayed.
2676
+ * @readonly
2677
+ */
2678
+ siteLanguage?: string | null;
2679
+ /**
2680
+ * Whether tax is included in line item prices.
2681
+ * @readonly
2682
+ */
2683
+ taxIncludedInPrices?: boolean | null;
2684
+ /**
2685
+ * Weight measurement unit - defaults to site's weight unit.
2686
+ * @readonly
2687
+ */
2688
+ weightUnit?: WeightUnit;
2689
+ /**
2690
+ * ID of the checkout that originated from this cart.
2691
+ * @readonly
2692
+ */
2693
+ checkoutId?: string | null;
2694
+ /**
2695
+ * Cart discounts.
2696
+ * @readonly
2697
+ */
2698
+ appliedDiscounts?: CartDiscount[];
2699
+ /**
2700
+ * Date and time the cart was created.
2701
+ * @readonly
2702
+ */
2703
+ _createdDate?: Date | null;
2704
+ /**
2705
+ * Date and time the cart was updated.
2706
+ * @readonly
2707
+ */
2708
+ _updatedDate?: Date | null;
2709
+ /** Contact info. */
2710
+ contactInfo?: AddressWithContact;
2711
+ /**
2712
+ * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2713
+ *
2714
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2715
+ */
2716
+ overrideCheckoutUrl?: string | null;
2717
+ /**
2718
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
2719
+ * @readonly
2720
+ */
2721
+ purchaseFlowId?: string | null;
2722
+ /** Selected shipping option. */
2723
+ selectedShippingOption?: SelectedShippingOption;
2724
+ };
2725
+ /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2726
+ couponCode?: string | null;
2727
+ /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */
2728
+ merchantDiscounts?: MerchantDiscountInput[];
2729
+ /** Catalog line items. */
2730
+ lineItems?: LineItem[];
2731
+ /**
2732
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
2733
+ *
2734
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2735
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2736
+ */
2737
+ customLineItems?: CustomLineItem[];
2738
+ }
2739
+ /**
2740
+ * Retrieves a cart.
2741
+ *
2742
+ *
2743
+ * The `getCart()` function returns a Promise that resolves when the specified cart is retrieved.
2744
+ * @param _id - ID of the cart to retrieve.
2745
+ * @public
2746
+ * @requiredField _id
2747
+ * @permissionId ECOM.READ_CARTS
2748
+ * @permissionScope Manage Stores - all permissions
2749
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2750
+ * @permissionScope Read eCommerce - all read permissions
2751
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
2752
+ * @permissionScope Read Orders
2753
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
2754
+ * @permissionScope Read Stores - all read permissions
2755
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
2756
+ * @permissionScope Manage Restaurants - all permissions
2757
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2758
+ * @permissionScope Manage eCommerce - all permissions
2759
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2760
+ * @permissionScope Manage Orders
2761
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2762
+ * @applicableIdentity APP
2763
+ * @applicableIdentity VISITOR
2764
+ * @returns Fulfilled - The specified cart.
2765
+ * @fqn com.wix.ecom.cart.api.v1.CartService.GetCart
2766
+ */
2767
+ export declare function getCart(_id: string): Promise<Cart & CartNonNullableFields>;
2768
+ /**
2769
+ * Adds catalog line items to a cart.
2770
+ *
2771
+ *
2772
+ * The `addToCart()` function returns a Promise that resolves to the updated cart when the specified items have been added.
2773
+ *
2774
+ * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
2775
+ * @param _id - Cart ID.
2776
+ * @public
2777
+ * @requiredField _id
2778
+ * @requiredField options.customLineItems.descriptionLines
2779
+ * @requiredField options.customLineItems.descriptionLines.name
2780
+ * @requiredField options.customLineItems.itemType
2781
+ * @requiredField options.customLineItems.price
2782
+ * @requiredField options.customLineItems.productName
2783
+ * @requiredField options.customLineItems.quantity
2784
+ * @requiredField options.lineItems.catalogReference
2785
+ * @requiredField options.lineItems.selectedMembership._id
2786
+ * @requiredField options.lineItems.selectedMembership.appId
2787
+ * @param options - Items to be added to cart.
2788
+ * @permissionId ECOM.MODIFY_CARTS
2789
+ * @permissionId ECOM.ADMIN_MODIFY_CARTS
2790
+ * @permissionScope Manage Stores - all permissions
2791
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2792
+ * @permissionScope Manage eCommerce - all permissions
2793
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2794
+ * @permissionScope Manage Stores - all permissions
2795
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2796
+ * @permissionScope Manage eCommerce - Admin Permissions
2797
+ * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
2798
+ * @permissionScope Manage eCommerce - all permissions
2799
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2800
+ * @applicableIdentity APP
2801
+ * @applicableIdentity VISITOR
2802
+ * @returns Fulfilled - Cart.
2803
+ * @fqn com.wix.ecom.cart.api.v1.CartService.AddToCart
2804
+ */
2805
+ export declare function addToCart(_id: string, options?: AddToCartOptions): Promise<AddToCartResponse & AddToCartResponseNonNullableFields>;
2806
+ export interface AddToCartOptions {
2807
+ /** Catalog line items. */
2808
+ lineItems?: LineItem[];
2809
+ /**
2810
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
2811
+ *
2812
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2813
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2814
+ */
2815
+ customLineItems?: CustomLineItem[];
2816
+ }
2817
+ /**
2818
+ * Removes line items from the specified cart.
2819
+ *
2820
+ *
2821
+ * The `removeLineItems()` function returns a Promise that resolves to the updated cart when the line items are removed from the specified cart.
2822
+ * @public
2823
+ * @requiredField _id
2824
+ * @requiredField lineItemIds
2825
+ * @param lineItemIds - IDs of the line items to remove from the cart.
2826
+ * @param _id - ID of the cart to remove line items from.
2827
+ * @permissionId ECOM.MODIFY_CARTS
2828
+ * @permissionScope Manage Stores - all permissions
2829
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2830
+ * @permissionScope Manage eCommerce - all permissions
2831
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2832
+ * @applicableIdentity APP
2833
+ * @applicableIdentity VISITOR
2834
+ * @returns Fulfilled - Updated cart.
2835
+ * @fqn com.wix.ecom.cart.api.v1.CartService.RemoveLineItems
2836
+ */
2837
+ export declare function removeLineItems(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse & RemoveLineItemsResponseNonNullableFields>;
2838
+ /**
2839
+ * Creates a checkout from a cart.
2840
+ *
2841
+ *
2842
+ * The `createCheckout()` function returns a Promise that resolves to the new checkout's ID when it's created.
2843
+ *
2844
+ * If a checkout was already created from the specified cart, that checkout will be
2845
+ * updated with any new information from the cart.
2846
+ *
2847
+ * > **Note:** `options.channelType` is a required field.
2848
+ * @param _id - Cart ID.
2849
+ * @public
2850
+ * @requiredField _id
2851
+ * @param options - Checkout creation options.
2852
+ * @permissionId ECOM.CREATE_CHECKOUT_FROM_CART
2853
+ * @permissionScope Manage Stores - all permissions
2854
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2855
+ * @permissionScope Manage Restaurants - all permissions
2856
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2857
+ * @permissionScope Manage eCommerce - all permissions
2858
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2859
+ * @permissionScope Manage Orders
2860
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2861
+ * @applicableIdentity APP
2862
+ * @applicableIdentity VISITOR
2863
+ * @returns Fulfilled - ID of the newly created checkout.
2864
+ * @fqn com.wix.ecom.cart.api.v1.CartService.CreateCheckout
2865
+ */
2866
+ export declare function createCheckout(_id: string, options?: CreateCheckoutOptions): Promise<CreateCheckoutResponse & CreateCheckoutResponseNonNullableFields>;
2867
+ export interface CreateCheckoutOptions {
2868
+ /** **Required**. Sales channel type. */
2869
+ channelType?: ChannelType;
2870
+ /** Shipping address. Used for calculating tax and shipping (when applicable). */
2871
+ shippingAddress?: Address;
2872
+ /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
2873
+ billingAddress?: Address;
2874
+ /** Selected shipping option. */
2875
+ selectedShippingOption?: SelectedShippingOption;
2876
+ /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */
2877
+ email?: string | null;
2878
+ }
2879
+ /**
2880
+ * Removes the coupon from a specified cart.
2881
+ *
2882
+ *
2883
+ * The `removeCoupon()` function returns a Promise that resolves to the updated cart when the coupon is removed from the specified cart.
2884
+ * @param _id - Cart ID.
2885
+ * @public
2886
+ * @requiredField _id
2887
+ * @permissionId ECOM.MODIFY_CARTS
2888
+ * @permissionScope Manage Stores - all permissions
2889
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2890
+ * @permissionScope Manage eCommerce - all permissions
2891
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2892
+ * @applicableIdentity APP
2893
+ * @applicableIdentity VISITOR
2894
+ * @returns Fulfilled - Updated cart.
2895
+ * @fqn com.wix.ecom.cart.api.v1.CartService.RemoveCoupon
2896
+ */
2897
+ export declare function removeCoupon(_id: string): Promise<RemoveCouponResponse & RemoveCouponResponseNonNullableFields>;
2898
+ /**
2899
+ * Updates the quantity of one or more line items in a specified cart.
2900
+ *
2901
+ *
2902
+ * The `updateLineItemsQuantity()` function returns a Promise that resolves when the quantities of the specified cart's line items are updated.
2903
+ *
2904
+ * This endpoint is only for updating the quantity of line items. To entirely remove a line item from the cart, use [`removeLineItems()`](#removelineitems). To add a new line item to the cart, use [`addToCart()`](#addtocart).
2905
+ *
2906
+ * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock.
2907
+ * @param _id - Cart ID.
2908
+ * @param lineItems - Line item IDs and their new quantity.
2909
+ * @public
2910
+ * @requiredField _id
2911
+ * @requiredField lineItems
2912
+ * @permissionId ECOM.MODIFY_CARTS
2913
+ * @permissionScope Manage Stores - all permissions
2914
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2915
+ * @permissionScope Manage eCommerce - all permissions
2916
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2917
+ * @applicableIdentity APP
2918
+ * @applicableIdentity VISITOR
2919
+ * @returns Fulfilled - Updated cart.
2920
+ * @fqn com.wix.ecom.cart.api.v1.CartService.UpdateLineItemsQuantity
2921
+ */
2922
+ export declare function updateLineItemsQuantity(_id: string, lineItems: LineItemQuantityUpdate[]): Promise<UpdateLineItemsQuantityResponse & UpdateLineItemsQuantityResponseNonNullableFields>;
2923
+ /**
2924
+ * Estimates the subtotal and total for current site visitor’s cart. Totals include tax and are based on the selected carrier service, shipping address, and billing information.
2925
+ *
2926
+ *
2927
+ * The `estimateTotals()` function returns a Promise that resolves when the estimated totals are generated.
2928
+ *
2929
+ * > **Note:** Not passing any `options` properties will only estimate the cart items price totals.
2930
+ * @param _id - Cart ID.
2931
+ * @public
2932
+ * @requiredField _id
2933
+ * @param options - Total estimation options.
2934
+ * @permissionId ECOM.READ_CARTS
2935
+ * @permissionScope Manage Stores - all permissions
2936
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2937
+ * @permissionScope Read eCommerce - all read permissions
2938
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
2939
+ * @permissionScope Read Orders
2940
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
2941
+ * @permissionScope Read Stores - all read permissions
2942
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
2943
+ * @permissionScope Manage Restaurants - all permissions
2944
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2945
+ * @permissionScope Manage eCommerce - all permissions
2946
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2947
+ * @permissionScope Manage Orders
2948
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2949
+ * @applicableIdentity APP
2950
+ * @applicableIdentity VISITOR
2951
+ * @returns Fulfilled - Cart's estimated totals.
2952
+ * @fqn com.wix.ecom.cart.api.v1.CartService.EstimateTotals
2953
+ */
2954
+ export declare function estimateTotals(_id: string, options?: EstimateTotalsOptions): Promise<EstimateTotalsResponse & EstimateTotalsResponseNonNullableFields>;
2955
+ export interface EstimateTotalsOptions {
2956
+ /** Selected shipping option. */
2957
+ selectedShippingOption?: SelectedShippingOption;
2958
+ /** Shipping address. Used for calculating tax and shipping (when applicable). */
2959
+ shippingAddress?: Address;
2960
+ /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
2961
+ billingAddress?: Address;
2962
+ /** The selected membership payment options and which line items they apply to. */
2963
+ selectedMemberships?: SelectedMemberships;
2964
+ /**
2965
+ * Whether to calculate tax in the calculation request.
2966
+ *
2967
+ * Default: `true`
2968
+ */
2969
+ calculateTax?: boolean | null;
2970
+ /**
2971
+ * Whether to calculate shipping in the calculation request.
2972
+ *
2973
+ * Default: `true`
2974
+ */
2975
+ calculateShipping?: boolean | null;
2976
+ }
2977
+ /**
2978
+ * Deletes a cart.
2979
+ *
2980
+ *
2981
+ * The `deleteCart()` function returns a Promise that resolves when the specified cart is deleted.
2982
+ * @public
2983
+ * @requiredField _id
2984
+ * @param _id - ID of the cart to delete.
2985
+ * @permissionId ECOM.MODIFY_CARTS
2986
+ * @permissionScope Manage Stores - all permissions
2987
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2988
+ * @permissionScope Manage eCommerce - all permissions
2989
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2990
+ * @applicableIdentity APP
2991
+ * @applicableIdentity VISITOR
2992
+ * @returns Fulfilled - When the cart is deleted. Rejected - Error message.
2993
+ * @fqn com.wix.ecom.cart.api.v1.CartService.DeleteCart
2994
+ */
2995
+ export declare function deleteCart(_id: string): Promise<void>;
2996
+ export {};