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