@wix/auto_sdk_ecom_cart 1.0.13 → 1.0.14

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