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