@wix/auto_sdk_ecom_cart 1.0.2 → 1.0.4
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.
- package/build/cjs/src/ecom-v1-cart-cart.context.d.ts +2 -1
- package/build/cjs/src/ecom-v1-cart-cart.context.js +0 -1
- package/build/cjs/src/ecom-v1-cart-cart.context.js.map +1 -1
- package/build/cjs/src/ecom-v1-cart-cart.http.d.ts +7 -12
- package/build/cjs/src/ecom-v1-cart-cart.http.js +13 -12
- package/build/cjs/src/ecom-v1-cart-cart.http.js.map +1 -1
- package/build/cjs/src/ecom-v1-cart-cart.public.d.ts +16 -13
- package/build/cjs/src/ecom-v1-cart-cart.public.js +0 -1
- package/build/cjs/src/ecom-v1-cart-cart.public.js.map +1 -1
- package/build/cjs/src/ecom-v1-cart-cart.types.d.ts +669 -144
- package/build/cjs/src/ecom-v1-cart-cart.types.js.map +1 -1
- package/build/cjs/src/ecom-v1-cart-cart.universal.d.ts +797 -168
- package/build/cjs/src/ecom-v1-cart-cart.universal.js +35 -16
- package/build/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -1
- package/build/es/src/ecom-v1-cart-cart.context.d.ts +2 -1
- package/build/es/src/ecom-v1-cart-cart.context.js +0 -1
- package/build/es/src/ecom-v1-cart-cart.context.js.map +1 -1
- package/build/es/src/ecom-v1-cart-cart.http.d.ts +7 -12
- package/build/es/src/ecom-v1-cart-cart.http.js +13 -12
- package/build/es/src/ecom-v1-cart-cart.http.js.map +1 -1
- package/build/es/src/ecom-v1-cart-cart.public.d.ts +16 -13
- package/build/es/src/ecom-v1-cart-cart.public.js +0 -1
- package/build/es/src/ecom-v1-cart-cart.public.js.map +1 -1
- package/build/es/src/ecom-v1-cart-cart.types.d.ts +669 -144
- package/build/es/src/ecom-v1-cart-cart.types.js.map +1 -1
- package/build/es/src/ecom-v1-cart-cart.universal.d.ts +797 -168
- package/build/es/src/ecom-v1-cart-cart.universal.js +35 -16
- package/build/es/src/ecom-v1-cart-cart.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.context.d.ts +0 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.context.js +0 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.context.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.d.ts +7 -12
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.js +13 -12
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.d.ts +7 -13
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.js +0 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.types.d.ts +669 -144
- package/build/internal/cjs/src/ecom-v1-cart-cart.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.universal.d.ts +770 -176
- package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js +35 -16
- package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -1
- package/build/internal/es/src/ecom-v1-cart-cart.context.d.ts +0 -1
- package/build/internal/es/src/ecom-v1-cart-cart.context.js +0 -1
- package/build/internal/es/src/ecom-v1-cart-cart.context.js.map +1 -1
- package/build/internal/es/src/ecom-v1-cart-cart.http.d.ts +7 -12
- package/build/internal/es/src/ecom-v1-cart-cart.http.js +13 -12
- package/build/internal/es/src/ecom-v1-cart-cart.http.js.map +1 -1
- package/build/internal/es/src/ecom-v1-cart-cart.public.d.ts +7 -13
- package/build/internal/es/src/ecom-v1-cart-cart.public.js +0 -1
- package/build/internal/es/src/ecom-v1-cart-cart.public.js.map +1 -1
- package/build/internal/es/src/ecom-v1-cart-cart.types.d.ts +669 -144
- package/build/internal/es/src/ecom-v1-cart-cart.types.js.map +1 -1
- package/build/internal/es/src/ecom-v1-cart-cart.universal.d.ts +770 -176
- package/build/internal/es/src/ecom-v1-cart-cart.universal.js +35 -16
- package/build/internal/es/src/ecom-v1-cart-cart.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
export interface Cart {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Cart ID.
|
|
4
|
+
* @format GUID
|
|
5
|
+
*/
|
|
3
6
|
_id?: string | null;
|
|
4
7
|
/**
|
|
5
8
|
* Line items.
|
|
9
|
+
* @minSize 1
|
|
10
|
+
* @maxSize 300
|
|
6
11
|
* @readonly
|
|
7
12
|
*/
|
|
8
13
|
lineItems?: LineItem[];
|
|
9
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
|
|
16
|
+
* @maxLength 1000
|
|
17
|
+
*/
|
|
10
18
|
buyerNote?: string | null;
|
|
11
19
|
/** Buyer information. */
|
|
12
20
|
buyerInfo?: BuyerInfo;
|
|
13
21
|
/**
|
|
14
22
|
* Currency used for pricing.
|
|
23
|
+
* @format CURRENCY
|
|
15
24
|
* @readonly
|
|
16
25
|
*/
|
|
17
26
|
currency?: string;
|
|
@@ -19,6 +28,7 @@ export interface Cart {
|
|
|
19
28
|
* Currency code used for all the converted prices that are returned.
|
|
20
29
|
* For a site that supports multiple currencies, this is the currency the buyer selected.
|
|
21
30
|
* @readonly
|
|
31
|
+
* @format CURRENCY
|
|
22
32
|
*/
|
|
23
33
|
conversionCurrency?: string;
|
|
24
34
|
/**
|
|
@@ -45,6 +55,7 @@ export interface Cart {
|
|
|
45
55
|
/**
|
|
46
56
|
* ID of the checkout that originated from this cart.
|
|
47
57
|
* @readonly
|
|
58
|
+
* @format GUID
|
|
48
59
|
*/
|
|
49
60
|
checkoutId?: string | null;
|
|
50
61
|
/**
|
|
@@ -68,23 +79,36 @@ export interface Cart {
|
|
|
68
79
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
69
80
|
*
|
|
70
81
|
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
82
|
+
* @maxLength 1000
|
|
71
83
|
*/
|
|
72
84
|
overrideCheckoutUrl?: string | null;
|
|
73
85
|
/**
|
|
74
86
|
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
87
|
+
* @format GUID
|
|
75
88
|
* @readonly
|
|
76
89
|
*/
|
|
77
90
|
purchaseFlowId?: string | null;
|
|
78
91
|
/** Selected shipping option. */
|
|
79
92
|
selectedShippingOption?: SelectedShippingOption;
|
|
93
|
+
/**
|
|
94
|
+
* The business location ID associated with the cart.
|
|
95
|
+
* Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
96
|
+
* @format GUID
|
|
97
|
+
*/
|
|
98
|
+
businessLocationId?: string | null;
|
|
80
99
|
}
|
|
81
100
|
export interface LineItem {
|
|
82
101
|
/**
|
|
83
102
|
* Line item ID.
|
|
103
|
+
* @format GUID
|
|
84
104
|
* @readonly
|
|
85
105
|
*/
|
|
86
106
|
_id?: string | null;
|
|
87
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Item quantity.
|
|
109
|
+
* @min 1
|
|
110
|
+
* @max 100000
|
|
111
|
+
*/
|
|
88
112
|
quantity?: number;
|
|
89
113
|
/** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
|
|
90
114
|
catalogReference?: CatalogReference;
|
|
@@ -159,6 +183,8 @@ export interface LineItem {
|
|
|
159
183
|
* + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
|
|
160
184
|
* + in most cases, this field is the same as `catalogReference.catalogItemId`.
|
|
161
185
|
* + Used in membership validation.
|
|
186
|
+
* @minLength 1
|
|
187
|
+
* @maxLength 36
|
|
162
188
|
* @readonly
|
|
163
189
|
*/
|
|
164
190
|
rootCatalogItemId?: string | null;
|
|
@@ -174,8 +200,15 @@ export interface LineItem {
|
|
|
174
200
|
depositAmount?: MultiCurrencyPrice;
|
|
175
201
|
/** Selected membership to be used as payment for this item. Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`. This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`. */
|
|
176
202
|
selectedMembership?: SelectedMembership;
|
|
203
|
+
/**
|
|
204
|
+
* Delivery profile ID.
|
|
205
|
+
* @format GUID
|
|
206
|
+
* @readonly
|
|
207
|
+
*/
|
|
208
|
+
deliveryProfileId?: string | null;
|
|
177
209
|
/**
|
|
178
210
|
* Tax group ID for this line item.
|
|
211
|
+
* @format GUID
|
|
179
212
|
* @readonly
|
|
180
213
|
*/
|
|
181
214
|
taxGroupId?: string | null;
|
|
@@ -186,6 +219,8 @@ export interface LineItem {
|
|
|
186
219
|
customLineItem?: boolean;
|
|
187
220
|
/**
|
|
188
221
|
* Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
|
|
222
|
+
* @minLength 1
|
|
223
|
+
* @maxLength 2500
|
|
189
224
|
* @readonly
|
|
190
225
|
*/
|
|
191
226
|
consentRequiredPaymentPolicy?: string | null;
|
|
@@ -206,7 +241,11 @@ export interface LineItem {
|
|
|
206
241
|
}
|
|
207
242
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
208
243
|
export interface CatalogReference {
|
|
209
|
-
/**
|
|
244
|
+
/**
|
|
245
|
+
* ID of the item within the catalog it belongs to.
|
|
246
|
+
* @minLength 1
|
|
247
|
+
* @maxLength 36
|
|
248
|
+
*/
|
|
210
249
|
catalogItemId?: string;
|
|
211
250
|
/**
|
|
212
251
|
* ID of the app providing the catalog.
|
|
@@ -217,6 +256,7 @@ export interface CatalogReference {
|
|
|
217
256
|
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
218
257
|
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
219
258
|
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
259
|
+
* @minLength 1
|
|
220
260
|
*/
|
|
221
261
|
appId?: string;
|
|
222
262
|
/**
|
|
@@ -229,17 +269,29 @@ export interface CatalogReference {
|
|
|
229
269
|
options?: Record<string, any> | null;
|
|
230
270
|
}
|
|
231
271
|
export interface ProductName {
|
|
232
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* **Required** - Original product name (in site's default language).
|
|
274
|
+
* @minLength 1
|
|
275
|
+
* @maxLength 200
|
|
276
|
+
*/
|
|
233
277
|
original?: string;
|
|
234
|
-
/**
|
|
278
|
+
/**
|
|
279
|
+
* Description product name translated into buyer's language. Defaults to `original` when not defined.
|
|
280
|
+
* @minLength 1
|
|
281
|
+
* @maxLength 400
|
|
282
|
+
*/
|
|
235
283
|
translated?: string | null;
|
|
236
284
|
}
|
|
237
285
|
export interface MultiCurrencyPrice {
|
|
238
|
-
/**
|
|
286
|
+
/**
|
|
287
|
+
* Amount.
|
|
288
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
289
|
+
*/
|
|
239
290
|
amount?: string;
|
|
240
291
|
/**
|
|
241
292
|
* Converted amount.
|
|
242
293
|
* @readonly
|
|
294
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
243
295
|
*/
|
|
244
296
|
convertedAmount?: string;
|
|
245
297
|
/**
|
|
@@ -272,21 +324,39 @@ export interface DescriptionLineValueOneOf {
|
|
|
272
324
|
export interface DescriptionLineDescriptionLineValueOneOf {
|
|
273
325
|
}
|
|
274
326
|
export interface DescriptionLineName {
|
|
275
|
-
/**
|
|
327
|
+
/**
|
|
328
|
+
* Description line name in site's default language.
|
|
329
|
+
* @maxLength 100
|
|
330
|
+
*/
|
|
276
331
|
original?: string;
|
|
277
|
-
/**
|
|
332
|
+
/**
|
|
333
|
+
* Description line name translated into buyer's language. Defaults to `original` when not defined.
|
|
334
|
+
* @maxLength 200
|
|
335
|
+
*/
|
|
278
336
|
translated?: string | null;
|
|
279
337
|
}
|
|
280
338
|
export interface PlainTextValue {
|
|
281
|
-
/**
|
|
339
|
+
/**
|
|
340
|
+
* Description line plain text value in site's default language.
|
|
341
|
+
* @maxLength 600
|
|
342
|
+
*/
|
|
282
343
|
original?: string;
|
|
283
|
-
/**
|
|
344
|
+
/**
|
|
345
|
+
* Description line plain text value translated into buyer's language. Defaults to `original` when not defined.
|
|
346
|
+
* @maxLength 600
|
|
347
|
+
*/
|
|
284
348
|
translated?: string | null;
|
|
285
349
|
}
|
|
286
350
|
export interface Color {
|
|
287
|
-
/**
|
|
351
|
+
/**
|
|
352
|
+
* Description line color name in site's default language.
|
|
353
|
+
* @maxLength 500
|
|
354
|
+
*/
|
|
288
355
|
original?: string;
|
|
289
|
-
/**
|
|
356
|
+
/**
|
|
357
|
+
* Description line color name translated into buyer's language. Defaults to `original` when not defined.
|
|
358
|
+
* @maxLength 500
|
|
359
|
+
*/
|
|
290
360
|
translated?: string | null;
|
|
291
361
|
/**
|
|
292
362
|
* HEX or RGB color code for display.
|
|
@@ -336,7 +406,10 @@ export declare enum ItemAvailabilityStatus {
|
|
|
336
406
|
export interface PhysicalProperties {
|
|
337
407
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
338
408
|
weight?: number | null;
|
|
339
|
-
/**
|
|
409
|
+
/**
|
|
410
|
+
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
411
|
+
* @maxLength 40
|
|
412
|
+
*/
|
|
340
413
|
sku?: string | null;
|
|
341
414
|
/** Whether this line item is shippable. */
|
|
342
415
|
shippable?: boolean;
|
|
@@ -389,11 +462,16 @@ export interface SubscriptionSettings {
|
|
|
389
462
|
*
|
|
390
463
|
* Default: `1`.
|
|
391
464
|
* If SubscriptionFrequency is Day the minimum interval is 7
|
|
465
|
+
* @min 1
|
|
466
|
+
* @max 50
|
|
392
467
|
*/
|
|
393
468
|
interval?: number | null;
|
|
394
469
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
395
470
|
autoRenewal?: boolean;
|
|
396
|
-
/**
|
|
471
|
+
/**
|
|
472
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.
|
|
473
|
+
* @min 1
|
|
474
|
+
*/
|
|
397
475
|
billingCycles?: number | null;
|
|
398
476
|
}
|
|
399
477
|
/** Frequency unit of recurring payment */
|
|
@@ -407,29 +485,53 @@ export declare enum SubscriptionFrequency {
|
|
|
407
485
|
export interface FreeTrialPeriod {
|
|
408
486
|
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
409
487
|
frequency?: SubscriptionFrequency;
|
|
410
|
-
/**
|
|
488
|
+
/**
|
|
489
|
+
* interval of period
|
|
490
|
+
* @min 1
|
|
491
|
+
* @max 50
|
|
492
|
+
*/
|
|
411
493
|
interval?: number;
|
|
412
494
|
}
|
|
413
495
|
export interface Title {
|
|
414
|
-
/**
|
|
496
|
+
/**
|
|
497
|
+
* 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).
|
|
498
|
+
* @minLength 1
|
|
499
|
+
* @maxLength 150
|
|
500
|
+
*/
|
|
415
501
|
original?: string;
|
|
416
502
|
/**
|
|
417
503
|
* Subscription option name translated into the buyer's language.
|
|
418
504
|
*
|
|
419
505
|
* Default: Same as `original`.
|
|
506
|
+
* @minLength 1
|
|
507
|
+
* @maxLength 150
|
|
420
508
|
*/
|
|
421
509
|
translated?: string | null;
|
|
422
510
|
}
|
|
423
511
|
export interface Description {
|
|
424
|
-
/**
|
|
512
|
+
/**
|
|
513
|
+
* Subscription option description.
|
|
514
|
+
* @maxLength 500
|
|
515
|
+
*/
|
|
425
516
|
original?: string;
|
|
426
|
-
/**
|
|
517
|
+
/**
|
|
518
|
+
* Translated subscription option description.
|
|
519
|
+
* @maxLength 500
|
|
520
|
+
*/
|
|
427
521
|
translated?: string | null;
|
|
428
522
|
}
|
|
429
523
|
export interface SecuredMedia {
|
|
430
|
-
/**
|
|
524
|
+
/**
|
|
525
|
+
* Media ID in Wix Media Manager.
|
|
526
|
+
* @minLength 1
|
|
527
|
+
* @maxLength 100
|
|
528
|
+
*/
|
|
431
529
|
_id?: string;
|
|
432
|
-
/**
|
|
530
|
+
/**
|
|
531
|
+
* Original filename.
|
|
532
|
+
* @minLength 1
|
|
533
|
+
* @maxLength 1000
|
|
534
|
+
*/
|
|
433
535
|
fileName?: string;
|
|
434
536
|
/** File type. */
|
|
435
537
|
fileType?: FileType;
|
|
@@ -458,33 +560,59 @@ export declare enum PaymentOptionType {
|
|
|
458
560
|
export interface ServiceProperties {
|
|
459
561
|
/** The date and time for which the service is supposed to be provided. For example, the time of the class. */
|
|
460
562
|
scheduledDate?: Date | null;
|
|
461
|
-
/**
|
|
563
|
+
/**
|
|
564
|
+
* The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room.
|
|
565
|
+
* @min 1
|
|
566
|
+
* @max 10000
|
|
567
|
+
*/
|
|
462
568
|
numberOfParticipants?: number | null;
|
|
463
569
|
}
|
|
464
570
|
export interface PriceDescription {
|
|
465
571
|
/**
|
|
466
572
|
* **Required** - Original price description (in site's default language).
|
|
467
573
|
*
|
|
574
|
+
* @minLength 1
|
|
575
|
+
* @maxLength 100
|
|
468
576
|
*/
|
|
469
577
|
original?: string;
|
|
470
|
-
/**
|
|
578
|
+
/**
|
|
579
|
+
* Product name translated into buyer's language. Defaults to `original` when not defined.
|
|
580
|
+
* @minLength 1
|
|
581
|
+
* @maxLength 100
|
|
582
|
+
*/
|
|
471
583
|
translated?: string | null;
|
|
472
584
|
}
|
|
473
585
|
/** Selected Membership */
|
|
474
586
|
export interface SelectedMembership {
|
|
475
|
-
/**
|
|
587
|
+
/**
|
|
588
|
+
* Membership ID.
|
|
589
|
+
* @minLength 1
|
|
590
|
+
* @maxLength 100
|
|
591
|
+
*/
|
|
476
592
|
_id?: string;
|
|
477
|
-
/**
|
|
593
|
+
/**
|
|
594
|
+
* ID of the app providing this payment option.
|
|
595
|
+
* @format GUID
|
|
596
|
+
*/
|
|
478
597
|
appId?: string;
|
|
479
598
|
}
|
|
480
599
|
export interface CatalogOverrideFields {
|
|
481
600
|
/** Item name. */
|
|
482
601
|
productName?: ProductName;
|
|
483
|
-
/**
|
|
602
|
+
/**
|
|
603
|
+
* Item price **after** discounts.
|
|
604
|
+
* @decimalValue options { gte:0, lte:999999999, maxScale:3 }
|
|
605
|
+
*/
|
|
484
606
|
price?: string | null;
|
|
485
|
-
/**
|
|
607
|
+
/**
|
|
608
|
+
* Item price **before** discounts.
|
|
609
|
+
* @decimalValue options { gte:0, lte:999999999, maxScale:3 }
|
|
610
|
+
*/
|
|
486
611
|
fullPrice?: string | null;
|
|
487
|
-
/**
|
|
612
|
+
/**
|
|
613
|
+
* Item description lines. Used when displaying the line item to customers.
|
|
614
|
+
* @maxSize 20
|
|
615
|
+
*/
|
|
488
616
|
descriptionLines?: DescriptionLine[];
|
|
489
617
|
/** Physical properties of the item. */
|
|
490
618
|
physicalProperties?: PhysicalProperties;
|
|
@@ -492,7 +620,11 @@ export interface CatalogOverrideFields {
|
|
|
492
620
|
image?: string;
|
|
493
621
|
/** Payment method selected for the item. */
|
|
494
622
|
paymentOption?: PaymentOption;
|
|
495
|
-
/**
|
|
623
|
+
/**
|
|
624
|
+
* Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.
|
|
625
|
+
* @format DECIMAL_VALUE
|
|
626
|
+
* @decimalValue options { gt:0, lte:999999999, maxScale:3 }
|
|
627
|
+
*/
|
|
496
628
|
depositAmount?: string | null;
|
|
497
629
|
/**
|
|
498
630
|
* Whether to save the payment method on the order.
|
|
@@ -503,11 +635,9 @@ export interface CatalogOverrideFields {
|
|
|
503
635
|
}
|
|
504
636
|
export interface PaymentOption {
|
|
505
637
|
/**
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
* + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`.
|
|
510
|
-
* + `MEMBERSHIP_OFFLINE`: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`.
|
|
638
|
+
* Type of selected payment option for current item.
|
|
639
|
+
*
|
|
640
|
+
* Default: `FULL_PAYMENT_ONLINE`
|
|
511
641
|
*/
|
|
512
642
|
value?: PaymentOptionType;
|
|
513
643
|
}
|
|
@@ -538,47 +668,67 @@ export interface ExtendedFields {
|
|
|
538
668
|
namespaces?: Record<string, Record<string, any>>;
|
|
539
669
|
}
|
|
540
670
|
export interface Policy {
|
|
541
|
-
/**
|
|
671
|
+
/**
|
|
672
|
+
* Policy title - should be translated
|
|
673
|
+
* @minLength 1
|
|
674
|
+
* @maxLength 29
|
|
675
|
+
*/
|
|
542
676
|
title?: string | null;
|
|
543
|
-
/**
|
|
677
|
+
/**
|
|
678
|
+
* Policy content - should be translated
|
|
679
|
+
* @minLength 1
|
|
680
|
+
* @maxLength 3000
|
|
681
|
+
*/
|
|
544
682
|
content?: string;
|
|
545
683
|
}
|
|
546
684
|
/** Buyer Info */
|
|
547
685
|
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
548
686
|
/**
|
|
549
687
|
* Visitor ID - if the buyer is **not** a site member.
|
|
688
|
+
* @format GUID
|
|
550
689
|
* @readonly
|
|
551
690
|
*/
|
|
552
691
|
visitorId?: string;
|
|
553
692
|
/**
|
|
554
693
|
* Member ID - if the buyer is a site member.
|
|
694
|
+
* @format GUID
|
|
555
695
|
* @readonly
|
|
556
696
|
*/
|
|
557
697
|
memberId?: string;
|
|
558
698
|
/**
|
|
559
699
|
* User ID - if the cart owner is a Wix user.
|
|
700
|
+
* @format GUID
|
|
560
701
|
* @readonly
|
|
561
702
|
*/
|
|
562
703
|
userId?: string;
|
|
563
|
-
/**
|
|
704
|
+
/**
|
|
705
|
+
* Contact ID. For more information, see the Contacts API.
|
|
706
|
+
* @format GUID
|
|
707
|
+
*/
|
|
564
708
|
contactId?: string | null;
|
|
565
|
-
/**
|
|
709
|
+
/**
|
|
710
|
+
* Buyer email address.
|
|
711
|
+
* @format EMAIL
|
|
712
|
+
*/
|
|
566
713
|
email?: string | null;
|
|
567
714
|
}
|
|
568
715
|
/** @oneof */
|
|
569
716
|
export interface BuyerInfoIdOneOf {
|
|
570
717
|
/**
|
|
571
718
|
* Visitor ID - if the buyer is **not** a site member.
|
|
719
|
+
* @format GUID
|
|
572
720
|
* @readonly
|
|
573
721
|
*/
|
|
574
722
|
visitorId?: string;
|
|
575
723
|
/**
|
|
576
724
|
* Member ID - if the buyer is a site member.
|
|
725
|
+
* @format GUID
|
|
577
726
|
* @readonly
|
|
578
727
|
*/
|
|
579
728
|
memberId?: string;
|
|
580
729
|
/**
|
|
581
730
|
* User ID - if the cart owner is a Wix user.
|
|
731
|
+
* @format GUID
|
|
582
732
|
* @readonly
|
|
583
733
|
*/
|
|
584
734
|
userId?: string;
|
|
@@ -615,7 +765,10 @@ export interface MerchantDiscount {
|
|
|
615
765
|
amount?: MultiCurrencyPrice;
|
|
616
766
|
}
|
|
617
767
|
export interface DiscountRule {
|
|
618
|
-
/**
|
|
768
|
+
/**
|
|
769
|
+
* Discount rule ID
|
|
770
|
+
* @format GUID
|
|
771
|
+
*/
|
|
619
772
|
_id?: string;
|
|
620
773
|
/** Discount rule name */
|
|
621
774
|
name?: DiscountRuleName;
|
|
@@ -623,9 +776,17 @@ export interface DiscountRule {
|
|
|
623
776
|
amount?: MultiCurrencyPrice;
|
|
624
777
|
}
|
|
625
778
|
export interface DiscountRuleName {
|
|
626
|
-
/**
|
|
779
|
+
/**
|
|
780
|
+
* Original discount rule name (in site's default language).
|
|
781
|
+
* @minLength 1
|
|
782
|
+
* @maxLength 256
|
|
783
|
+
*/
|
|
627
784
|
original?: string;
|
|
628
|
-
/**
|
|
785
|
+
/**
|
|
786
|
+
* Discount rule name translated into buyer's language. Defaults to `original` when not defined.
|
|
787
|
+
* @minLength 1
|
|
788
|
+
* @maxLength 500
|
|
789
|
+
*/
|
|
629
790
|
translated?: string | null;
|
|
630
791
|
}
|
|
631
792
|
export declare enum DiscountType {
|
|
@@ -645,19 +806,37 @@ export interface AddressWithContact {
|
|
|
645
806
|
}
|
|
646
807
|
/** Physical address */
|
|
647
808
|
export interface Address {
|
|
648
|
-
/**
|
|
809
|
+
/**
|
|
810
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
811
|
+
* @format COUNTRY
|
|
812
|
+
*/
|
|
649
813
|
country?: string | null;
|
|
650
|
-
/**
|
|
814
|
+
/**
|
|
815
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
816
|
+
* @maxLength 50
|
|
817
|
+
*/
|
|
651
818
|
subdivision?: string | null;
|
|
652
|
-
/**
|
|
819
|
+
/**
|
|
820
|
+
* City name.
|
|
821
|
+
* @maxLength 50
|
|
822
|
+
*/
|
|
653
823
|
city?: string | null;
|
|
654
|
-
/**
|
|
824
|
+
/**
|
|
825
|
+
* Postal or zip code.
|
|
826
|
+
* @maxLength 50
|
|
827
|
+
*/
|
|
655
828
|
postalCode?: string | null;
|
|
656
829
|
/** Street address. */
|
|
657
830
|
streetAddress?: StreetAddress;
|
|
658
|
-
/**
|
|
831
|
+
/**
|
|
832
|
+
* Main address line (usually street name and number).
|
|
833
|
+
* @maxLength 150
|
|
834
|
+
*/
|
|
659
835
|
addressLine1?: string | null;
|
|
660
|
-
/**
|
|
836
|
+
/**
|
|
837
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
838
|
+
* @maxLength 100
|
|
839
|
+
*/
|
|
661
840
|
addressLine2?: string | null;
|
|
662
841
|
/**
|
|
663
842
|
* Country's full name.
|
|
@@ -684,13 +863,25 @@ export interface AddressLocation {
|
|
|
684
863
|
}
|
|
685
864
|
/** Full contact details for an address */
|
|
686
865
|
export interface FullAddressContactDetails {
|
|
687
|
-
/**
|
|
866
|
+
/**
|
|
867
|
+
* First name.
|
|
868
|
+
* @maxLength 100
|
|
869
|
+
*/
|
|
688
870
|
firstName?: string | null;
|
|
689
|
-
/**
|
|
871
|
+
/**
|
|
872
|
+
* Last name.
|
|
873
|
+
* @maxLength 100
|
|
874
|
+
*/
|
|
690
875
|
lastName?: string | null;
|
|
691
|
-
/**
|
|
876
|
+
/**
|
|
877
|
+
* Phone number.
|
|
878
|
+
* @format PHONE
|
|
879
|
+
*/
|
|
692
880
|
phone?: string | null;
|
|
693
|
-
/**
|
|
881
|
+
/**
|
|
882
|
+
* Company name.
|
|
883
|
+
* @maxLength 1000
|
|
884
|
+
*/
|
|
694
885
|
company?: string | null;
|
|
695
886
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
696
887
|
vatId?: VatId;
|
|
@@ -716,9 +907,16 @@ export declare enum VatType {
|
|
|
716
907
|
CNPJ = "CNPJ"
|
|
717
908
|
}
|
|
718
909
|
export interface SelectedShippingOption {
|
|
719
|
-
/**
|
|
910
|
+
/**
|
|
911
|
+
* Carrier ID.
|
|
912
|
+
* @format GUID
|
|
913
|
+
*/
|
|
720
914
|
carrierId?: string | null;
|
|
721
|
-
/**
|
|
915
|
+
/**
|
|
916
|
+
* Selected shipping option code. For example, "usps_std_overnight".
|
|
917
|
+
* @minLength 1
|
|
918
|
+
* @maxLength 100
|
|
919
|
+
*/
|
|
722
920
|
code?: string;
|
|
723
921
|
}
|
|
724
922
|
export interface GetCurrentCartRequest {
|
|
@@ -732,22 +930,36 @@ export interface UpdateCartRequest {
|
|
|
732
930
|
cartInfo?: Cart;
|
|
733
931
|
/** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
734
932
|
couponCode?: string | null;
|
|
735
|
-
/**
|
|
933
|
+
/**
|
|
934
|
+
* Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart.
|
|
935
|
+
* @maxSize 100
|
|
936
|
+
*/
|
|
736
937
|
merchantDiscounts?: MerchantDiscountInput[];
|
|
737
|
-
/**
|
|
938
|
+
/**
|
|
939
|
+
* Catalog line items.
|
|
940
|
+
* @maxSize 300
|
|
941
|
+
*/
|
|
738
942
|
lineItems?: LineItem[];
|
|
739
943
|
/**
|
|
740
944
|
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
741
945
|
*
|
|
742
946
|
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
743
947
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
948
|
+
* @maxSize 300
|
|
744
949
|
*/
|
|
745
950
|
customLineItems?: CustomLineItem[];
|
|
746
951
|
}
|
|
747
952
|
export interface MerchantDiscountInput {
|
|
748
|
-
/**
|
|
953
|
+
/**
|
|
954
|
+
* Discount amount.
|
|
955
|
+
* @decimalValue options { gte:0 }
|
|
956
|
+
*/
|
|
749
957
|
amount?: string;
|
|
750
|
-
/**
|
|
958
|
+
/**
|
|
959
|
+
* IDs of the line items the discount applies to.
|
|
960
|
+
* @format GUID
|
|
961
|
+
* @maxSize 300
|
|
962
|
+
*/
|
|
751
963
|
lineItemIds?: string[];
|
|
752
964
|
}
|
|
753
965
|
export interface CustomLineItem {
|
|
@@ -756,17 +968,24 @@ export interface CustomLineItem {
|
|
|
756
968
|
*
|
|
757
969
|
* Min: `1`
|
|
758
970
|
* Max: `100000`
|
|
971
|
+
* @min 1
|
|
972
|
+
* @max 100000
|
|
759
973
|
*/
|
|
760
974
|
quantity?: number;
|
|
761
975
|
/**
|
|
762
976
|
* Custom line item price.
|
|
763
977
|
*
|
|
764
978
|
* Must be a number or a decimal without symbols.
|
|
979
|
+
* @format DECIMAL_VALUE
|
|
980
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
765
981
|
*/
|
|
766
982
|
price?: string;
|
|
767
983
|
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
768
984
|
priceDescription?: PriceDescription;
|
|
769
|
-
/**
|
|
985
|
+
/**
|
|
986
|
+
* Custom line item description lines. Used for displaying the cart, checkout and order.
|
|
987
|
+
* @maxSize 10
|
|
988
|
+
*/
|
|
770
989
|
descriptionLines?: DescriptionLine[];
|
|
771
990
|
/**
|
|
772
991
|
* Custom line item media. Supported formats:
|
|
@@ -778,9 +997,13 @@ export interface CustomLineItem {
|
|
|
778
997
|
* Custom line item ID. If passed, `id` must be unique.
|
|
779
998
|
*
|
|
780
999
|
* Default: auto-generated ID
|
|
1000
|
+
* @format GUID
|
|
781
1001
|
*/
|
|
782
1002
|
_id?: string | null;
|
|
783
|
-
/**
|
|
1003
|
+
/**
|
|
1004
|
+
* Tax group ID for this custom line item.
|
|
1005
|
+
* @format GUID
|
|
1006
|
+
*/
|
|
784
1007
|
taxGroupId?: string | null;
|
|
785
1008
|
/** Name of the item or product. */
|
|
786
1009
|
productName?: ProductName;
|
|
@@ -788,11 +1011,15 @@ export interface CustomLineItem {
|
|
|
788
1011
|
url?: string;
|
|
789
1012
|
/** Item type. Either a preset type or custom. */
|
|
790
1013
|
itemType?: ItemType;
|
|
791
|
-
/**
|
|
1014
|
+
/**
|
|
1015
|
+
* Item price **before** catalog-defined discount. Defaults to `price` when not provided.
|
|
1016
|
+
* @format DECIMAL_VALUE
|
|
1017
|
+
*/
|
|
792
1018
|
fullPrice?: string | null;
|
|
793
1019
|
/**
|
|
794
1020
|
* Item quantity available for purchase. Only return this if inventory is managed.
|
|
795
1021
|
* Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
|
|
1022
|
+
* @max 100000
|
|
796
1023
|
*/
|
|
797
1024
|
quantityAvailable?: number | null;
|
|
798
1025
|
/** Physical properties of the item. */
|
|
@@ -817,6 +1044,8 @@ export interface CustomLineItem {
|
|
|
817
1044
|
* + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
|
|
818
1045
|
* + In most cases, this field is the same as `catalogReference.catalogItemId`.
|
|
819
1046
|
* + Used in membership validation.
|
|
1047
|
+
* @minLength 1
|
|
1048
|
+
* @maxLength 36
|
|
820
1049
|
*/
|
|
821
1050
|
rootCatalogItemId?: string | null;
|
|
822
1051
|
/**
|
|
@@ -824,12 +1053,20 @@ export interface CustomLineItem {
|
|
|
824
1053
|
*
|
|
825
1054
|
* Eligible for catalog items with type `DEPOSIT_ONLINE`.
|
|
826
1055
|
* When omitted, the item's price will not be split and is expected to be paid in a single installment.
|
|
1056
|
+
* @format DECIMAL_VALUE
|
|
827
1057
|
*/
|
|
828
1058
|
depositAmount?: string | null;
|
|
1059
|
+
/**
|
|
1060
|
+
* Delivery profile ID.
|
|
1061
|
+
* @format GUID
|
|
1062
|
+
*/
|
|
1063
|
+
deliveryProfileId?: string | null;
|
|
829
1064
|
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
|
|
830
1065
|
catalogReference?: CatalogReference;
|
|
831
1066
|
/**
|
|
832
1067
|
* Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
|
|
1068
|
+
* @minLength 1
|
|
1069
|
+
* @maxLength 1000
|
|
833
1070
|
* @readonly
|
|
834
1071
|
*/
|
|
835
1072
|
consentRequiredPaymentPolicy?: string | null;
|
|
@@ -846,28 +1083,43 @@ export interface UpdateCartResponse {
|
|
|
846
1083
|
cart?: Cart;
|
|
847
1084
|
}
|
|
848
1085
|
export interface AddToCurrentCartRequest {
|
|
849
|
-
/**
|
|
1086
|
+
/**
|
|
1087
|
+
* Catalog line items.
|
|
1088
|
+
* @maxSize 100
|
|
1089
|
+
*/
|
|
850
1090
|
lineItems?: LineItem[];
|
|
851
1091
|
/**
|
|
852
1092
|
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
853
1093
|
*
|
|
854
1094
|
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
855
1095
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
1096
|
+
* @maxSize 100
|
|
856
1097
|
*/
|
|
857
1098
|
customLineItems?: CustomLineItem[];
|
|
1099
|
+
/**
|
|
1100
|
+
* Business location ID.
|
|
1101
|
+
* To update a cart's business location ID, use the UpdateCart method.
|
|
1102
|
+
* Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
1103
|
+
* @format GUID
|
|
1104
|
+
*/
|
|
1105
|
+
businessLocationId?: string | null;
|
|
858
1106
|
}
|
|
859
1107
|
export interface AddToCartResponse {
|
|
860
1108
|
/** Updated cart. */
|
|
861
1109
|
cart?: Cart;
|
|
862
1110
|
}
|
|
863
1111
|
export interface AddToCurrentCartAndEstimateTotalsRequest {
|
|
864
|
-
/**
|
|
1112
|
+
/**
|
|
1113
|
+
* Catalog line items.
|
|
1114
|
+
* @maxSize 100
|
|
1115
|
+
*/
|
|
865
1116
|
lineItems?: LineItem[];
|
|
866
1117
|
/**
|
|
867
1118
|
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
868
1119
|
*
|
|
869
1120
|
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
870
1121
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
1122
|
+
* @maxSize 100
|
|
871
1123
|
*/
|
|
872
1124
|
customLineItems?: CustomLineItem[];
|
|
873
1125
|
/** Selected shipping option. */
|
|
@@ -892,15 +1144,31 @@ export interface AddToCurrentCartAndEstimateTotalsRequest {
|
|
|
892
1144
|
calculateShipping?: boolean | null;
|
|
893
1145
|
}
|
|
894
1146
|
export interface SelectedMemberships {
|
|
895
|
-
/**
|
|
1147
|
+
/**
|
|
1148
|
+
* Selected memberships.
|
|
1149
|
+
* @maxSize 300
|
|
1150
|
+
*/
|
|
896
1151
|
memberships?: HostSelectedMembership[];
|
|
897
1152
|
}
|
|
898
1153
|
export interface HostSelectedMembership {
|
|
899
|
-
/**
|
|
1154
|
+
/**
|
|
1155
|
+
* Membership ID.
|
|
1156
|
+
* @minLength 1
|
|
1157
|
+
* @maxLength 100
|
|
1158
|
+
*/
|
|
900
1159
|
_id?: string;
|
|
901
|
-
/**
|
|
1160
|
+
/**
|
|
1161
|
+
* ID of the app providing this payment option.
|
|
1162
|
+
* @format GUID
|
|
1163
|
+
*/
|
|
902
1164
|
appId?: string;
|
|
903
|
-
/**
|
|
1165
|
+
/**
|
|
1166
|
+
* IDs of the line items this membership applies to.
|
|
1167
|
+
* @minSize 1
|
|
1168
|
+
* @maxSize 300
|
|
1169
|
+
* @minLength 1
|
|
1170
|
+
* @maxLength 100
|
|
1171
|
+
*/
|
|
904
1172
|
lineItemIds?: string[];
|
|
905
1173
|
}
|
|
906
1174
|
export interface EstimateTotalsResponse {
|
|
@@ -922,7 +1190,10 @@ export interface EstimateTotalsResponse {
|
|
|
922
1190
|
calculationErrors?: CalculationErrors;
|
|
923
1191
|
/** Weight measurement unit - defaults to site's weight unit. */
|
|
924
1192
|
weightUnit?: WeightUnit;
|
|
925
|
-
/**
|
|
1193
|
+
/**
|
|
1194
|
+
* Currency used for pricing in this store.
|
|
1195
|
+
* @format CURRENCY
|
|
1196
|
+
*/
|
|
926
1197
|
currency?: string;
|
|
927
1198
|
/**
|
|
928
1199
|
* Minimal amount to pay in order to place the order.
|
|
@@ -936,7 +1207,10 @@ export interface EstimateTotalsResponse {
|
|
|
936
1207
|
payLater?: PriceSummary;
|
|
937
1208
|
/** Information about valid and invalid memberships, and which ones are selected for usage. */
|
|
938
1209
|
membershipOptions?: MembershipOptions;
|
|
939
|
-
/**
|
|
1210
|
+
/**
|
|
1211
|
+
* Additional fees
|
|
1212
|
+
* @maxSize 100
|
|
1213
|
+
*/
|
|
940
1214
|
additionalFees?: AdditionalFee[];
|
|
941
1215
|
/**
|
|
942
1216
|
* List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
|
|
@@ -978,7 +1252,10 @@ export interface LineItemPricesData {
|
|
|
978
1252
|
export interface ItemTaxFullDetails {
|
|
979
1253
|
/** Amount for which tax is calculated. */
|
|
980
1254
|
taxableAmount?: MultiCurrencyPrice;
|
|
981
|
-
/**
|
|
1255
|
+
/**
|
|
1256
|
+
* Tax rate %, as a decimal point between 0 and 1.
|
|
1257
|
+
* @decimalValue options { gte:0, lte:1, maxScale:6 }
|
|
1258
|
+
*/
|
|
982
1259
|
taxRate?: string;
|
|
983
1260
|
/** Calculated tax, based on `taxable_amount` and `tax_rate`. */
|
|
984
1261
|
totalTax?: MultiCurrencyPrice;
|
|
@@ -990,9 +1267,15 @@ export interface ItemTaxFullDetails {
|
|
|
990
1267
|
rateBreakdown?: TaxRateBreakdown[];
|
|
991
1268
|
}
|
|
992
1269
|
export interface TaxRateBreakdown {
|
|
993
|
-
/**
|
|
1270
|
+
/**
|
|
1271
|
+
* Name of tax against which the calculation was performed.
|
|
1272
|
+
* @maxLength 100
|
|
1273
|
+
*/
|
|
994
1274
|
name?: string;
|
|
995
|
-
/**
|
|
1275
|
+
/**
|
|
1276
|
+
* Rate at which this tax detail was calculated.
|
|
1277
|
+
* @decimalValue options { gte:0, lte:1, maxScale:6 }
|
|
1278
|
+
*/
|
|
996
1279
|
rate?: string;
|
|
997
1280
|
/** Amount of tax for this tax detail. */
|
|
998
1281
|
tax?: MultiCurrencyPrice;
|
|
@@ -1002,21 +1285,31 @@ export interface TaxRateBreakdown {
|
|
|
1002
1285
|
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
1003
1286
|
*/
|
|
1004
1287
|
export interface TaxBreakdown {
|
|
1005
|
-
/**
|
|
1288
|
+
/**
|
|
1289
|
+
* The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
|
|
1290
|
+
* @maxLength 200
|
|
1291
|
+
*/
|
|
1006
1292
|
jurisdiction?: string | null;
|
|
1007
1293
|
/** The amount of this line item price that was considered nontaxable. (Decimal value) */
|
|
1008
1294
|
nonTaxableAmount?: MultiCurrencyPrice;
|
|
1009
|
-
/**
|
|
1295
|
+
/**
|
|
1296
|
+
* The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
|
|
1297
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1298
|
+
*/
|
|
1010
1299
|
rate?: string | null;
|
|
1011
1300
|
/** The amount of tax estimated for this line item. (Decimal value) */
|
|
1012
1301
|
taxAmount?: MultiCurrencyPrice;
|
|
1013
1302
|
/** The taxable amount of this line item. */
|
|
1014
1303
|
taxableAmount?: MultiCurrencyPrice;
|
|
1015
|
-
/**
|
|
1304
|
+
/**
|
|
1305
|
+
* The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
|
|
1306
|
+
* @maxLength 200
|
|
1307
|
+
*/
|
|
1016
1308
|
taxType?: string | null;
|
|
1017
1309
|
/**
|
|
1018
1310
|
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
1019
1311
|
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
1312
|
+
* @maxLength 200
|
|
1020
1313
|
*/
|
|
1021
1314
|
taxName?: string | null;
|
|
1022
1315
|
/** The type of the jurisdiction in which this tax detail applies. */
|
|
@@ -1055,11 +1348,16 @@ export interface GiftCard {
|
|
|
1055
1348
|
obfuscatedCode?: string;
|
|
1056
1349
|
/** Gift card value. */
|
|
1057
1350
|
amount?: MultiCurrencyPrice;
|
|
1058
|
-
/**
|
|
1351
|
+
/**
|
|
1352
|
+
* App ID of the gift card provider.
|
|
1353
|
+
* @format GUID
|
|
1354
|
+
*/
|
|
1059
1355
|
appId?: string;
|
|
1060
1356
|
/**
|
|
1061
1357
|
* External ID in the gift card provider's system.
|
|
1062
1358
|
* Used for integration and tracking across different platforms.
|
|
1359
|
+
* @minLength 1
|
|
1360
|
+
* @maxLength 50
|
|
1063
1361
|
*/
|
|
1064
1362
|
externalId?: string | null;
|
|
1065
1363
|
}
|
|
@@ -1146,15 +1444,27 @@ export interface ApplicationError {
|
|
|
1146
1444
|
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
1147
1445
|
*/
|
|
1148
1446
|
export interface AggregatedTaxBreakdown {
|
|
1149
|
-
/**
|
|
1447
|
+
/**
|
|
1448
|
+
* The name of the tax against which this tax amount was calculated.
|
|
1449
|
+
* @maxLength 200
|
|
1450
|
+
*/
|
|
1150
1451
|
taxName?: string;
|
|
1151
|
-
/**
|
|
1452
|
+
/**
|
|
1453
|
+
* The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
|
|
1454
|
+
* @maxLength 200
|
|
1455
|
+
*/
|
|
1152
1456
|
taxType?: string;
|
|
1153
|
-
/**
|
|
1457
|
+
/**
|
|
1458
|
+
* The name of the jurisdiction in which this tax detail applies.
|
|
1459
|
+
* @maxLength 200
|
|
1460
|
+
*/
|
|
1154
1461
|
jurisdiction?: string;
|
|
1155
1462
|
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
1156
1463
|
jurisdictionTypeEnum?: JurisdictionType;
|
|
1157
|
-
/**
|
|
1464
|
+
/**
|
|
1465
|
+
* The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
|
|
1466
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1467
|
+
*/
|
|
1158
1468
|
rate?: string;
|
|
1159
1469
|
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
1160
1470
|
aggregatedTaxAmount?: MultiCurrencyPrice;
|
|
@@ -1170,18 +1480,26 @@ export interface ShippingInformation {
|
|
|
1170
1480
|
export interface ShippingRegion {
|
|
1171
1481
|
/**
|
|
1172
1482
|
* Shipping region ID.
|
|
1483
|
+
* @format GUID
|
|
1173
1484
|
* @readonly
|
|
1174
1485
|
*/
|
|
1175
1486
|
_id?: string;
|
|
1176
|
-
/**
|
|
1487
|
+
/**
|
|
1488
|
+
* Shipping region name.
|
|
1489
|
+
* @maxLength 100
|
|
1490
|
+
*/
|
|
1177
1491
|
name?: string;
|
|
1178
1492
|
}
|
|
1179
1493
|
export interface SelectedCarrierServiceOption {
|
|
1180
|
-
/**
|
|
1494
|
+
/**
|
|
1495
|
+
* Unique identifier of selected option. For example, "usps_std_overnight".
|
|
1496
|
+
* @maxLength 100
|
|
1497
|
+
*/
|
|
1181
1498
|
code?: string;
|
|
1182
1499
|
/**
|
|
1183
1500
|
* Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
|
|
1184
1501
|
* For example, "Standard" or "First-Class Package International".
|
|
1502
|
+
* @maxLength 250
|
|
1185
1503
|
* @readonly
|
|
1186
1504
|
*/
|
|
1187
1505
|
title?: string;
|
|
@@ -1202,17 +1520,29 @@ export interface SelectedCarrierServiceOption {
|
|
|
1202
1520
|
requestedShippingOption?: boolean;
|
|
1203
1521
|
/** Other charges */
|
|
1204
1522
|
otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
|
|
1205
|
-
/**
|
|
1523
|
+
/**
|
|
1524
|
+
* This carrier's unique ID
|
|
1525
|
+
* @format GUID
|
|
1526
|
+
*/
|
|
1206
1527
|
carrierId?: string | null;
|
|
1207
|
-
/**
|
|
1528
|
+
/**
|
|
1529
|
+
* Delivery solution allocations to different delivery carriers and delivery regions
|
|
1530
|
+
* @maxSize 300
|
|
1531
|
+
*/
|
|
1208
1532
|
deliveryAllocations?: DeliveryAllocation[];
|
|
1209
1533
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1210
1534
|
partial?: boolean | null;
|
|
1211
1535
|
}
|
|
1212
1536
|
export interface DeliveryLogistics {
|
|
1213
|
-
/**
|
|
1537
|
+
/**
|
|
1538
|
+
* Expected delivery time, in free text. For example, "3-5 business days".
|
|
1539
|
+
* @maxLength 500
|
|
1540
|
+
*/
|
|
1214
1541
|
deliveryTime?: string | null;
|
|
1215
|
-
/**
|
|
1542
|
+
/**
|
|
1543
|
+
* Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
|
|
1544
|
+
* @maxLength 1000
|
|
1545
|
+
*/
|
|
1216
1546
|
instructions?: string | null;
|
|
1217
1547
|
/** Pickup details. */
|
|
1218
1548
|
pickupDetails?: PickupDetails;
|
|
@@ -1254,7 +1584,10 @@ export interface SelectedCarrierServiceOptionPrices {
|
|
|
1254
1584
|
export interface SelectedCarrierServiceOptionOtherCharge {
|
|
1255
1585
|
/** Type of additional cost. */
|
|
1256
1586
|
type?: ChargeType;
|
|
1257
|
-
/**
|
|
1587
|
+
/**
|
|
1588
|
+
* Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
|
|
1589
|
+
* @maxLength 200
|
|
1590
|
+
*/
|
|
1258
1591
|
details?: string | null;
|
|
1259
1592
|
/** Price of added charge. */
|
|
1260
1593
|
cost?: SelectedCarrierServiceOptionPrices;
|
|
@@ -1272,23 +1605,43 @@ export interface DeliveryAllocation {
|
|
|
1272
1605
|
applicableLineItems?: ApplicableLineItems;
|
|
1273
1606
|
}
|
|
1274
1607
|
export interface Carrier {
|
|
1275
|
-
/**
|
|
1608
|
+
/**
|
|
1609
|
+
* The carrier app id
|
|
1610
|
+
* @format GUID
|
|
1611
|
+
*/
|
|
1276
1612
|
appId?: string | null;
|
|
1277
|
-
/**
|
|
1613
|
+
/**
|
|
1614
|
+
* Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
|
|
1615
|
+
* @maxLength 250
|
|
1616
|
+
*/
|
|
1278
1617
|
code?: string;
|
|
1279
1618
|
}
|
|
1280
1619
|
export interface Region {
|
|
1281
|
-
/**
|
|
1620
|
+
/**
|
|
1621
|
+
* The delivery region id.
|
|
1622
|
+
* @format GUID
|
|
1623
|
+
*/
|
|
1282
1624
|
_id?: string | null;
|
|
1283
|
-
/**
|
|
1625
|
+
/**
|
|
1626
|
+
* The delivery region name.
|
|
1627
|
+
* @maxLength 100
|
|
1628
|
+
*/
|
|
1284
1629
|
name?: string | null;
|
|
1285
1630
|
}
|
|
1286
1631
|
export interface ApplicableLineItems {
|
|
1287
|
-
/**
|
|
1632
|
+
/**
|
|
1633
|
+
* Line items that the delivery solution is for.
|
|
1634
|
+
* @maxSize 300
|
|
1635
|
+
* @minLength 1
|
|
1636
|
+
* @maxLength 100
|
|
1637
|
+
*/
|
|
1288
1638
|
lineItemIds?: string[];
|
|
1289
1639
|
}
|
|
1290
1640
|
export interface CarrierServiceOption {
|
|
1291
|
-
/**
|
|
1641
|
+
/**
|
|
1642
|
+
* Carrier ID.
|
|
1643
|
+
* @format GUID
|
|
1644
|
+
*/
|
|
1292
1645
|
carrierId?: string;
|
|
1293
1646
|
/** Shipping options offered by this carrier for this request. */
|
|
1294
1647
|
shippingOptions?: ShippingOption[];
|
|
@@ -1297,18 +1650,23 @@ export interface ShippingOption {
|
|
|
1297
1650
|
/**
|
|
1298
1651
|
* Unique code of provided shipping option like "usps_std_overnight".
|
|
1299
1652
|
* For legacy calculators this would be the UUID of the option.
|
|
1653
|
+
* @maxLength 100
|
|
1300
1654
|
*/
|
|
1301
1655
|
code?: string;
|
|
1302
1656
|
/**
|
|
1303
1657
|
* Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
|
|
1304
1658
|
* For example, "Standard" or "First-Class Package International".
|
|
1659
|
+
* @maxLength 250
|
|
1305
1660
|
*/
|
|
1306
1661
|
title?: string;
|
|
1307
1662
|
/** Delivery logistics. */
|
|
1308
1663
|
logistics?: DeliveryLogistics;
|
|
1309
1664
|
/** Sipping price information. */
|
|
1310
1665
|
cost?: ShippingPrice;
|
|
1311
|
-
/**
|
|
1666
|
+
/**
|
|
1667
|
+
* Delivery solution allocations to different delivery carriers and delivery regions
|
|
1668
|
+
* @maxSize 300
|
|
1669
|
+
*/
|
|
1312
1670
|
deliveryAllocations?: DeliveryAllocation[];
|
|
1313
1671
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1314
1672
|
partial?: boolean | null;
|
|
@@ -1336,6 +1694,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
1336
1694
|
discountType?: AppliedDiscountDiscountType;
|
|
1337
1695
|
/**
|
|
1338
1696
|
* IDs of the line items the discount applies to.
|
|
1697
|
+
* @format GUID
|
|
1339
1698
|
* @deprecated IDs of line items the discount applies to.
|
|
1340
1699
|
* @replacedBy line_items_discounts
|
|
1341
1700
|
* @targetRemovalDate 2024-06-01
|
|
@@ -1370,11 +1729,18 @@ export interface V1Coupon {
|
|
|
1370
1729
|
export interface V1MerchantDiscount {
|
|
1371
1730
|
/** Discount value. */
|
|
1372
1731
|
amount?: MultiCurrencyPrice;
|
|
1373
|
-
/**
|
|
1732
|
+
/**
|
|
1733
|
+
* Discount Percentage. Will be calculated from items price before other discounts.
|
|
1734
|
+
* @min 1
|
|
1735
|
+
* @max 100
|
|
1736
|
+
*/
|
|
1374
1737
|
percentage?: number | null;
|
|
1375
1738
|
}
|
|
1376
1739
|
export interface V1DiscountRule {
|
|
1377
|
-
/**
|
|
1740
|
+
/**
|
|
1741
|
+
* Discount rule ID
|
|
1742
|
+
* @format GUID
|
|
1743
|
+
*/
|
|
1378
1744
|
_id?: string;
|
|
1379
1745
|
/** Discount rule name */
|
|
1380
1746
|
name?: V1DiscountRuleName;
|
|
@@ -1382,13 +1748,24 @@ export interface V1DiscountRule {
|
|
|
1382
1748
|
amount?: MultiCurrencyPrice;
|
|
1383
1749
|
}
|
|
1384
1750
|
export interface V1DiscountRuleName {
|
|
1385
|
-
/**
|
|
1751
|
+
/**
|
|
1752
|
+
* Original discount rule name (in site's default language).
|
|
1753
|
+
* @minLength 1
|
|
1754
|
+
* @maxLength 256
|
|
1755
|
+
*/
|
|
1386
1756
|
original?: string;
|
|
1387
|
-
/**
|
|
1757
|
+
/**
|
|
1758
|
+
* Translated discount rule name according to buyer language. Defaults to `original` when not provided.
|
|
1759
|
+
* @minLength 1
|
|
1760
|
+
* @maxLength 500
|
|
1761
|
+
*/
|
|
1388
1762
|
translated?: string | null;
|
|
1389
1763
|
}
|
|
1390
1764
|
export interface LineItemDiscount {
|
|
1391
|
-
/**
|
|
1765
|
+
/**
|
|
1766
|
+
* ID of line item the discount applies to.
|
|
1767
|
+
* @format GUID
|
|
1768
|
+
*/
|
|
1392
1769
|
_id?: string;
|
|
1393
1770
|
/** Discount value. */
|
|
1394
1771
|
totalDiscountAmount?: MultiCurrencyPrice;
|
|
@@ -1518,21 +1895,43 @@ export interface CarrierError {
|
|
|
1518
1895
|
error?: Details;
|
|
1519
1896
|
}
|
|
1520
1897
|
export interface MembershipOptions {
|
|
1521
|
-
/**
|
|
1898
|
+
/**
|
|
1899
|
+
* List of payment options that can be used.
|
|
1900
|
+
* @maxSize 300
|
|
1901
|
+
*/
|
|
1522
1902
|
eligibleMemberships?: Membership[];
|
|
1523
|
-
/**
|
|
1903
|
+
/**
|
|
1904
|
+
* List of payment options that are owned by the member, but cannot be used due to reason provided.
|
|
1905
|
+
* @maxSize 300
|
|
1906
|
+
*/
|
|
1524
1907
|
invalidMemberships?: InvalidMembership[];
|
|
1525
|
-
/**
|
|
1908
|
+
/**
|
|
1909
|
+
* The selected membership payment options and which line items they apply to.
|
|
1910
|
+
* @maxSize 300
|
|
1911
|
+
*/
|
|
1526
1912
|
selectedMemberships?: HostSelectedMembership[];
|
|
1527
1913
|
}
|
|
1528
1914
|
export interface Membership {
|
|
1529
|
-
/**
|
|
1915
|
+
/**
|
|
1916
|
+
* Membership ID.
|
|
1917
|
+
* @minLength 1
|
|
1918
|
+
* @maxLength 100
|
|
1919
|
+
*/
|
|
1530
1920
|
_id?: string;
|
|
1531
|
-
/**
|
|
1921
|
+
/**
|
|
1922
|
+
* ID of the application providing this payment option.
|
|
1923
|
+
* @format GUID
|
|
1924
|
+
*/
|
|
1532
1925
|
appId?: string;
|
|
1533
1926
|
/** The name of this membership. */
|
|
1534
1927
|
name?: MembershipName;
|
|
1535
|
-
/**
|
|
1928
|
+
/**
|
|
1929
|
+
* Line item IDs which are "paid" for by this membership.
|
|
1930
|
+
* @minSize 1
|
|
1931
|
+
* @maxSize 300
|
|
1932
|
+
* @minLength 1
|
|
1933
|
+
* @maxLength 100
|
|
1934
|
+
*/
|
|
1536
1935
|
lineItemIds?: string[];
|
|
1537
1936
|
/** Optional - For a membership that has limited credits, information about credit usage. */
|
|
1538
1937
|
credits?: MembershipPaymentCredits;
|
|
@@ -1542,13 +1941,22 @@ export interface Membership {
|
|
|
1542
1941
|
additionalData?: Record<string, any> | null;
|
|
1543
1942
|
}
|
|
1544
1943
|
export interface MembershipName {
|
|
1545
|
-
/**
|
|
1944
|
+
/**
|
|
1945
|
+
* Membership name.
|
|
1946
|
+
* @maxLength 100
|
|
1947
|
+
*/
|
|
1546
1948
|
original?: string;
|
|
1547
|
-
/**
|
|
1949
|
+
/**
|
|
1950
|
+
* Membership name translated into buyer's language. Defaults to `original` when not defined.
|
|
1951
|
+
* @maxLength 100
|
|
1952
|
+
*/
|
|
1548
1953
|
translated?: string | null;
|
|
1549
1954
|
}
|
|
1550
1955
|
export interface MembershipPaymentCredits {
|
|
1551
|
-
/**
|
|
1956
|
+
/**
|
|
1957
|
+
* Membership's total amount of credits.
|
|
1958
|
+
* @min 1
|
|
1959
|
+
*/
|
|
1552
1960
|
total?: number;
|
|
1553
1961
|
/** Membership's remaining amount of credits. */
|
|
1554
1962
|
remaining?: number;
|
|
@@ -1556,19 +1964,35 @@ export interface MembershipPaymentCredits {
|
|
|
1556
1964
|
export interface InvalidMembership {
|
|
1557
1965
|
/** Membership details. */
|
|
1558
1966
|
membership?: Membership;
|
|
1559
|
-
/**
|
|
1967
|
+
/**
|
|
1968
|
+
* Reason why this membership is invalid and cannot be used.
|
|
1969
|
+
* @minLength 1
|
|
1970
|
+
* @maxLength 100
|
|
1971
|
+
*/
|
|
1560
1972
|
reason?: string;
|
|
1561
1973
|
}
|
|
1562
1974
|
export interface AdditionalFee {
|
|
1563
|
-
/**
|
|
1975
|
+
/**
|
|
1976
|
+
* Additional fee's unique code (or ID) for future processing.
|
|
1977
|
+
* @minLength 1
|
|
1978
|
+
* @maxLength 100
|
|
1979
|
+
*/
|
|
1564
1980
|
code?: string | null;
|
|
1565
|
-
/**
|
|
1981
|
+
/**
|
|
1982
|
+
* Translated additional fee's name.
|
|
1983
|
+
* @minLength 1
|
|
1984
|
+
* @maxLength 50
|
|
1985
|
+
*/
|
|
1566
1986
|
name?: string;
|
|
1567
1987
|
/** Additional fee's price. */
|
|
1568
1988
|
price?: MultiCurrencyPrice;
|
|
1569
1989
|
/** Tax details. */
|
|
1570
1990
|
taxDetails?: ItemTaxFullDetails;
|
|
1571
|
-
/**
|
|
1991
|
+
/**
|
|
1992
|
+
* Provider's app id.
|
|
1993
|
+
* @minLength 1
|
|
1994
|
+
* @maxLength 100
|
|
1995
|
+
*/
|
|
1572
1996
|
providerAppId?: string | null;
|
|
1573
1997
|
/** Additional fee's price before tax. */
|
|
1574
1998
|
priceBeforeTax?: MultiCurrencyPrice;
|
|
@@ -1577,6 +2001,7 @@ export interface AdditionalFee {
|
|
|
1577
2001
|
/**
|
|
1578
2002
|
* Optional - Line items associated with this additional fee.
|
|
1579
2003
|
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
2004
|
+
* @format GUID
|
|
1580
2005
|
*/
|
|
1581
2006
|
lineItemIds?: string[];
|
|
1582
2007
|
/** the source the additional fee was added from */
|
|
@@ -1596,7 +2021,11 @@ export interface Violation {
|
|
|
1596
2021
|
severity?: Severity;
|
|
1597
2022
|
/** Target location on a checkout or cart page where the violation will be displayed. */
|
|
1598
2023
|
target?: Target;
|
|
1599
|
-
/**
|
|
2024
|
+
/**
|
|
2025
|
+
* 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>`.
|
|
2026
|
+
* @minLength 1
|
|
2027
|
+
* @maxLength 1000
|
|
2028
|
+
*/
|
|
1600
2029
|
description?: string | null;
|
|
1601
2030
|
}
|
|
1602
2031
|
export declare enum Severity {
|
|
@@ -1650,7 +2079,12 @@ export interface TargetLineItem {
|
|
|
1650
2079
|
_id?: string | null;
|
|
1651
2080
|
}
|
|
1652
2081
|
export interface RemoveLineItemsFromCurrentCartRequest {
|
|
1653
|
-
/**
|
|
2082
|
+
/**
|
|
2083
|
+
* IDs of the line items to remove from the cart.
|
|
2084
|
+
* @format GUID
|
|
2085
|
+
* @minSize 1
|
|
2086
|
+
* @maxSize 100
|
|
2087
|
+
*/
|
|
1654
2088
|
lineItemIds?: string[];
|
|
1655
2089
|
}
|
|
1656
2090
|
export interface RemoveLineItemsResponse {
|
|
@@ -1666,7 +2100,10 @@ export interface CreateCheckoutFromCurrentCartRequest {
|
|
|
1666
2100
|
billingAddress?: Address;
|
|
1667
2101
|
/** Selected shipping option. */
|
|
1668
2102
|
selectedShippingOption?: SelectedShippingOption;
|
|
1669
|
-
/**
|
|
2103
|
+
/**
|
|
2104
|
+
* Mandatory when setting a billing or shipping address if the site visitor isn't logged in.
|
|
2105
|
+
* @format EMAIL
|
|
2106
|
+
*/
|
|
1670
2107
|
email?: string | null;
|
|
1671
2108
|
}
|
|
1672
2109
|
export declare enum ChannelType {
|
|
@@ -1714,13 +2151,24 @@ export interface RemoveCouponResponse {
|
|
|
1714
2151
|
cart?: Cart;
|
|
1715
2152
|
}
|
|
1716
2153
|
export interface UpdateCurrentCartLineItemQuantityRequest {
|
|
1717
|
-
/**
|
|
2154
|
+
/**
|
|
2155
|
+
* Line item IDs and their new quantity.
|
|
2156
|
+
* @minSize 1
|
|
2157
|
+
* @maxSize 100
|
|
2158
|
+
*/
|
|
1718
2159
|
lineItems?: LineItemQuantityUpdate[];
|
|
1719
2160
|
}
|
|
1720
2161
|
export interface LineItemQuantityUpdate {
|
|
1721
|
-
/**
|
|
2162
|
+
/**
|
|
2163
|
+
* Line item ID. Required.
|
|
2164
|
+
* @format GUID
|
|
2165
|
+
*/
|
|
1722
2166
|
_id?: string;
|
|
1723
|
-
/**
|
|
2167
|
+
/**
|
|
2168
|
+
* New quantity. Number must be 1 or higher. Required.
|
|
2169
|
+
* @min 1
|
|
2170
|
+
* @max 100000
|
|
2171
|
+
*/
|
|
1724
2172
|
quantity?: number;
|
|
1725
2173
|
}
|
|
1726
2174
|
export interface UpdateLineItemsQuantityResponse {
|
|
@@ -1824,9 +2272,15 @@ export interface ActionEvent {
|
|
|
1824
2272
|
body?: string;
|
|
1825
2273
|
}
|
|
1826
2274
|
export interface MessageEnvelope {
|
|
1827
|
-
/**
|
|
2275
|
+
/**
|
|
2276
|
+
* App instance ID.
|
|
2277
|
+
* @format GUID
|
|
2278
|
+
*/
|
|
1828
2279
|
instanceId?: string | null;
|
|
1829
|
-
/**
|
|
2280
|
+
/**
|
|
2281
|
+
* Event type.
|
|
2282
|
+
* @maxLength 150
|
|
2283
|
+
*/
|
|
1830
2284
|
eventType?: string;
|
|
1831
2285
|
/** The identification type and identity data. */
|
|
1832
2286
|
identity?: IdentificationData;
|
|
@@ -1834,26 +2288,50 @@ export interface MessageEnvelope {
|
|
|
1834
2288
|
data?: string;
|
|
1835
2289
|
}
|
|
1836
2290
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1837
|
-
/**
|
|
2291
|
+
/**
|
|
2292
|
+
* ID of a site visitor that has not logged in to the site.
|
|
2293
|
+
* @format GUID
|
|
2294
|
+
*/
|
|
1838
2295
|
anonymousVisitorId?: string;
|
|
1839
|
-
/**
|
|
2296
|
+
/**
|
|
2297
|
+
* ID of a site visitor that has logged in to the site.
|
|
2298
|
+
* @format GUID
|
|
2299
|
+
*/
|
|
1840
2300
|
memberId?: string;
|
|
1841
|
-
/**
|
|
2301
|
+
/**
|
|
2302
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
2303
|
+
* @format GUID
|
|
2304
|
+
*/
|
|
1842
2305
|
wixUserId?: string;
|
|
1843
|
-
/**
|
|
2306
|
+
/**
|
|
2307
|
+
* ID of an app.
|
|
2308
|
+
* @format GUID
|
|
2309
|
+
*/
|
|
1844
2310
|
appId?: string;
|
|
1845
2311
|
/** @readonly */
|
|
1846
2312
|
identityType?: WebhookIdentityType;
|
|
1847
2313
|
}
|
|
1848
2314
|
/** @oneof */
|
|
1849
2315
|
export interface IdentificationDataIdOneOf {
|
|
1850
|
-
/**
|
|
2316
|
+
/**
|
|
2317
|
+
* ID of a site visitor that has not logged in to the site.
|
|
2318
|
+
* @format GUID
|
|
2319
|
+
*/
|
|
1851
2320
|
anonymousVisitorId?: string;
|
|
1852
|
-
/**
|
|
2321
|
+
/**
|
|
2322
|
+
* ID of a site visitor that has logged in to the site.
|
|
2323
|
+
* @format GUID
|
|
2324
|
+
*/
|
|
1853
2325
|
memberId?: string;
|
|
1854
|
-
/**
|
|
2326
|
+
/**
|
|
2327
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
2328
|
+
* @format GUID
|
|
2329
|
+
*/
|
|
1855
2330
|
wixUserId?: string;
|
|
1856
|
-
/**
|
|
2331
|
+
/**
|
|
2332
|
+
* ID of an app.
|
|
2333
|
+
* @format GUID
|
|
2334
|
+
*/
|
|
1857
2335
|
appId?: string;
|
|
1858
2336
|
}
|
|
1859
2337
|
export declare enum WebhookIdentityType {
|
|
@@ -1868,15 +2346,22 @@ export interface CreateCartRequest {
|
|
|
1868
2346
|
cartInfo?: Cart;
|
|
1869
2347
|
/** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
1870
2348
|
couponCode?: string | null;
|
|
1871
|
-
/**
|
|
2349
|
+
/**
|
|
2350
|
+
* Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart.
|
|
2351
|
+
* @maxSize 100
|
|
2352
|
+
*/
|
|
1872
2353
|
merchantDiscounts?: MerchantDiscountInput[];
|
|
1873
|
-
/**
|
|
2354
|
+
/**
|
|
2355
|
+
* Catalog line items.
|
|
2356
|
+
* @maxSize 300
|
|
2357
|
+
*/
|
|
1874
2358
|
lineItems?: LineItem[];
|
|
1875
2359
|
/**
|
|
1876
2360
|
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
1877
2361
|
*
|
|
1878
2362
|
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
1879
2363
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
2364
|
+
* @maxSize 300
|
|
1880
2365
|
*/
|
|
1881
2366
|
customLineItems?: CustomLineItem[];
|
|
1882
2367
|
}
|
|
@@ -1885,7 +2370,10 @@ export interface CreateCartResponse {
|
|
|
1885
2370
|
cart?: Cart;
|
|
1886
2371
|
}
|
|
1887
2372
|
export interface GetCartRequest {
|
|
1888
|
-
/**
|
|
2373
|
+
/**
|
|
2374
|
+
* ID of the cart to retrieve.
|
|
2375
|
+
* @format GUID
|
|
2376
|
+
*/
|
|
1889
2377
|
_id: string;
|
|
1890
2378
|
}
|
|
1891
2379
|
export interface GetCartResponse {
|
|
@@ -1893,7 +2381,10 @@ export interface GetCartResponse {
|
|
|
1893
2381
|
cart?: Cart;
|
|
1894
2382
|
}
|
|
1895
2383
|
export interface GetCartByCheckoutIdRequest {
|
|
1896
|
-
/**
|
|
2384
|
+
/**
|
|
2385
|
+
* Checkout ID.
|
|
2386
|
+
* @format GUID
|
|
2387
|
+
*/
|
|
1897
2388
|
_id: string;
|
|
1898
2389
|
}
|
|
1899
2390
|
export interface GetCartByCheckoutIdResponse {
|
|
@@ -1901,26 +2392,51 @@ export interface GetCartByCheckoutIdResponse {
|
|
|
1901
2392
|
cart?: Cart;
|
|
1902
2393
|
}
|
|
1903
2394
|
export interface AddToCartRequest {
|
|
1904
|
-
/**
|
|
2395
|
+
/**
|
|
2396
|
+
* Cart ID.
|
|
2397
|
+
* @format GUID
|
|
2398
|
+
*/
|
|
1905
2399
|
_id: string;
|
|
1906
|
-
/**
|
|
2400
|
+
/**
|
|
2401
|
+
* Catalog line items.
|
|
2402
|
+
* @maxSize 100
|
|
2403
|
+
*/
|
|
1907
2404
|
lineItems?: LineItem[];
|
|
1908
2405
|
/**
|
|
1909
2406
|
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
1910
2407
|
*
|
|
1911
2408
|
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
1912
2409
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
2410
|
+
* @maxSize 100
|
|
1913
2411
|
*/
|
|
1914
2412
|
customLineItems?: CustomLineItem[];
|
|
2413
|
+
/**
|
|
2414
|
+
* The business location ID associated with the cart.
|
|
2415
|
+
* The `businessLocationId` field cannot be passed if one already exists on the cart. To update a cart's business location ID, use the UpdateCart method.
|
|
2416
|
+
* Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
2417
|
+
* @format GUID
|
|
2418
|
+
*/
|
|
2419
|
+
businessLocationId?: string | null;
|
|
1915
2420
|
}
|
|
1916
2421
|
export interface RemoveLineItemsRequest {
|
|
1917
|
-
/**
|
|
2422
|
+
/**
|
|
2423
|
+
* Cart ID.
|
|
2424
|
+
* @format GUID
|
|
2425
|
+
*/
|
|
1918
2426
|
_id: string;
|
|
1919
|
-
/**
|
|
2427
|
+
/**
|
|
2428
|
+
* IDs of the line items to remove from the cart.
|
|
2429
|
+
* @format GUID
|
|
2430
|
+
* @minSize 1
|
|
2431
|
+
* @maxSize 100
|
|
2432
|
+
*/
|
|
1920
2433
|
lineItemIds: string[];
|
|
1921
2434
|
}
|
|
1922
2435
|
export interface CreateCheckoutRequest {
|
|
1923
|
-
/**
|
|
2436
|
+
/**
|
|
2437
|
+
* Cart ID.
|
|
2438
|
+
* @format GUID
|
|
2439
|
+
*/
|
|
1924
2440
|
_id: string;
|
|
1925
2441
|
/** **Required**. Sales channel type. */
|
|
1926
2442
|
channelType?: ChannelType;
|
|
@@ -1930,21 +2446,37 @@ export interface CreateCheckoutRequest {
|
|
|
1930
2446
|
billingAddress?: Address;
|
|
1931
2447
|
/** Selected shipping option. */
|
|
1932
2448
|
selectedShippingOption?: SelectedShippingOption;
|
|
1933
|
-
/**
|
|
2449
|
+
/**
|
|
2450
|
+
* Mandatory when setting a billing or shipping address if the site visitor isn't logged in.
|
|
2451
|
+
* @format EMAIL
|
|
2452
|
+
*/
|
|
1934
2453
|
email?: string | null;
|
|
1935
2454
|
}
|
|
1936
2455
|
export interface RemoveCouponRequest {
|
|
1937
|
-
/**
|
|
2456
|
+
/**
|
|
2457
|
+
* Cart ID.
|
|
2458
|
+
* @format GUID
|
|
2459
|
+
*/
|
|
1938
2460
|
_id: string;
|
|
1939
2461
|
}
|
|
1940
2462
|
export interface UpdateLineItemsQuantityRequest {
|
|
1941
|
-
/**
|
|
2463
|
+
/**
|
|
2464
|
+
* Cart ID.
|
|
2465
|
+
* @format GUID
|
|
2466
|
+
*/
|
|
1942
2467
|
_id: string;
|
|
1943
|
-
/**
|
|
2468
|
+
/**
|
|
2469
|
+
* Line item IDs and their new quantity.
|
|
2470
|
+
* @minSize 1
|
|
2471
|
+
* @maxSize 100
|
|
2472
|
+
*/
|
|
1944
2473
|
lineItems: LineItemQuantityUpdate[];
|
|
1945
2474
|
}
|
|
1946
2475
|
export interface EstimateTotalsRequest {
|
|
1947
|
-
/**
|
|
2476
|
+
/**
|
|
2477
|
+
* Cart ID.
|
|
2478
|
+
* @format GUID
|
|
2479
|
+
*/
|
|
1948
2480
|
_id: string;
|
|
1949
2481
|
/** Selected shipping option. */
|
|
1950
2482
|
selectedShippingOption?: SelectedShippingOption;
|
|
@@ -1968,13 +2500,19 @@ export interface EstimateTotalsRequest {
|
|
|
1968
2500
|
calculateShipping?: boolean | null;
|
|
1969
2501
|
}
|
|
1970
2502
|
export interface DeleteCartRequest {
|
|
1971
|
-
/**
|
|
2503
|
+
/**
|
|
2504
|
+
* ID of the cart to delete.
|
|
2505
|
+
* @format GUID
|
|
2506
|
+
*/
|
|
1972
2507
|
_id: string;
|
|
1973
2508
|
}
|
|
1974
2509
|
export interface Empty {
|
|
1975
2510
|
}
|
|
1976
2511
|
export interface RemoveBusinessLocationRequest {
|
|
1977
|
-
/**
|
|
2512
|
+
/**
|
|
2513
|
+
* Cart ID.
|
|
2514
|
+
* @format GUID
|
|
2515
|
+
*/
|
|
1978
2516
|
_id: string;
|
|
1979
2517
|
}
|
|
1980
2518
|
export interface RemoveBusinessLocationResponse {
|
|
@@ -2435,9 +2973,15 @@ export interface RemoveBusinessLocationResponseNonNullableFields {
|
|
|
2435
2973
|
cart?: CartNonNullableFields;
|
|
2436
2974
|
}
|
|
2437
2975
|
export interface BaseEventMetadata {
|
|
2438
|
-
/**
|
|
2976
|
+
/**
|
|
2977
|
+
* App instance ID.
|
|
2978
|
+
* @format GUID
|
|
2979
|
+
*/
|
|
2439
2980
|
instanceId?: string | null;
|
|
2440
|
-
/**
|
|
2981
|
+
/**
|
|
2982
|
+
* Event type.
|
|
2983
|
+
* @maxLength 150
|
|
2984
|
+
*/
|
|
2441
2985
|
eventType?: string;
|
|
2442
2986
|
/** The identification type and identity data. */
|
|
2443
2987
|
identity?: IdentificationData;
|
|
@@ -2502,6 +3046,8 @@ export interface CartDeletedEnvelope {
|
|
|
2502
3046
|
* @permissionId ECOM.READ_CARTS
|
|
2503
3047
|
* @webhook
|
|
2504
3048
|
* @eventType wix.ecom.v1.cart_deleted
|
|
3049
|
+
* @serviceIdentifier com.wix.ecom.cart.api.v1.CurrentCartService
|
|
3050
|
+
* @slug deleted
|
|
2505
3051
|
*/
|
|
2506
3052
|
export declare function onCartDeleted(handler: (event: CartDeletedEnvelope) => void | Promise<void>): void;
|
|
2507
3053
|
export interface CartUpdatedEnvelope {
|
|
@@ -2525,6 +3071,7 @@ export interface CartUpdatedEnvelope {
|
|
|
2525
3071
|
* @permissionId ECOM.READ_CARTS
|
|
2526
3072
|
* @webhook
|
|
2527
3073
|
* @eventType wix.ecom.v1.cart_updated
|
|
3074
|
+
* @slug updated
|
|
2528
3075
|
*/
|
|
2529
3076
|
export declare function onCartUpdated(handler: (event: CartUpdatedEnvelope) => void | Promise<void>): void;
|
|
2530
3077
|
export interface CartCreatedEnvelope {
|
|
@@ -2550,6 +3097,8 @@ export interface CartCreatedEnvelope {
|
|
|
2550
3097
|
* @permissionId ECOM.READ_CARTS
|
|
2551
3098
|
* @webhook
|
|
2552
3099
|
* @eventType wix.ecom.v1.cart_created
|
|
3100
|
+
* @serviceIdentifier com.wix.ecom.cart.api.v1.CartService
|
|
3101
|
+
* @slug created
|
|
2553
3102
|
*/
|
|
2554
3103
|
export declare function onCartCreated(handler: (event: CartCreatedEnvelope) => void | Promise<void>): void;
|
|
2555
3104
|
/**
|
|
@@ -2560,8 +3109,8 @@ export declare function onCartCreated(handler: (event: CartCreatedEnvelope) => v
|
|
|
2560
3109
|
*
|
|
2561
3110
|
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
2562
3111
|
* @public
|
|
2563
|
-
* @requiredField options.customLineItems.descriptionLines
|
|
2564
3112
|
* @requiredField options.customLineItems.descriptionLines.name
|
|
3113
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
2565
3114
|
* @requiredField options.customLineItems.itemType
|
|
2566
3115
|
* @requiredField options.customLineItems.price
|
|
2567
3116
|
* @requiredField options.customLineItems.productName
|
|
@@ -2575,12 +3124,16 @@ export declare function onCartCreated(handler: (event: CartCreatedEnvelope) => v
|
|
|
2575
3124
|
* @permissionId ECOM.ADMIN_MODIFY_CARTS
|
|
2576
3125
|
* @permissionScope Manage Stores - all permissions
|
|
2577
3126
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3127
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3128
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2578
3129
|
* @permissionScope Manage eCommerce - all permissions
|
|
2579
3130
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2580
3131
|
* @permissionScope Manage Stores - all permissions
|
|
2581
3132
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2582
3133
|
* @permissionScope Manage eCommerce - Admin Permissions
|
|
2583
3134
|
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
3135
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3136
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2584
3137
|
* @permissionScope Manage eCommerce - all permissions
|
|
2585
3138
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2586
3139
|
* @applicableIdentity APP
|
|
@@ -2594,29 +3147,35 @@ export interface CreateCartOptions {
|
|
|
2594
3147
|
cartInfo?: Cart;
|
|
2595
3148
|
/** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
2596
3149
|
couponCode?: string | null;
|
|
2597
|
-
/**
|
|
3150
|
+
/**
|
|
3151
|
+
* Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart.
|
|
3152
|
+
* @maxSize 100
|
|
3153
|
+
*/
|
|
2598
3154
|
merchantDiscounts?: MerchantDiscountInput[];
|
|
2599
|
-
/**
|
|
3155
|
+
/**
|
|
3156
|
+
* Catalog line items.
|
|
3157
|
+
* @maxSize 300
|
|
3158
|
+
*/
|
|
2600
3159
|
lineItems?: LineItem[];
|
|
2601
3160
|
/**
|
|
2602
3161
|
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
2603
3162
|
*
|
|
2604
3163
|
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
2605
3164
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
3165
|
+
* @maxSize 300
|
|
2606
3166
|
*/
|
|
2607
3167
|
customLineItems?: CustomLineItem[];
|
|
2608
3168
|
}
|
|
2609
3169
|
/**
|
|
2610
3170
|
* Updates a specified cart's properties.
|
|
2611
3171
|
*
|
|
2612
|
-
*
|
|
2613
|
-
* The `updateCart()` function returns a Promise that resolves when the specified cart's properties are updated.
|
|
3172
|
+
* After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
|
|
2614
3173
|
*
|
|
2615
3174
|
* > **Note:** When updating catalog items, `options.lineItems.catalogReference` is required.
|
|
2616
3175
|
* @public
|
|
2617
3176
|
* @requiredField _id
|
|
2618
|
-
* @requiredField options.customLineItems.descriptionLines
|
|
2619
3177
|
* @requiredField options.customLineItems.descriptionLines.name
|
|
3178
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
2620
3179
|
* @requiredField options.customLineItems.itemType
|
|
2621
3180
|
* @requiredField options.customLineItems.productName
|
|
2622
3181
|
* @requiredField options.lineItems.catalogReference
|
|
@@ -2626,12 +3185,16 @@ export interface CreateCartOptions {
|
|
|
2626
3185
|
* @permissionId ECOM.ADMIN_MODIFY_CARTS
|
|
2627
3186
|
* @permissionScope Manage Stores - all permissions
|
|
2628
3187
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3188
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3189
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2629
3190
|
* @permissionScope Manage eCommerce - all permissions
|
|
2630
3191
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2631
3192
|
* @permissionScope Manage Stores - all permissions
|
|
2632
3193
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2633
3194
|
* @permissionScope Manage eCommerce - Admin Permissions
|
|
2634
3195
|
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
3196
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3197
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2635
3198
|
* @permissionScope Manage eCommerce - all permissions
|
|
2636
3199
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2637
3200
|
* @applicableIdentity APP
|
|
@@ -2643,19 +3206,28 @@ export declare function updateCart(_id: string | null, options?: UpdateCartOptio
|
|
|
2643
3206
|
export interface UpdateCartOptions {
|
|
2644
3207
|
/** The information for the cart being updated. */
|
|
2645
3208
|
cartInfo: {
|
|
2646
|
-
/**
|
|
3209
|
+
/**
|
|
3210
|
+
* ID of the cart to be updated.
|
|
3211
|
+
* @format GUID
|
|
3212
|
+
*/
|
|
2647
3213
|
_id?: string | null;
|
|
2648
3214
|
/**
|
|
2649
3215
|
* Line items.
|
|
3216
|
+
* @minSize 1
|
|
3217
|
+
* @maxSize 300
|
|
2650
3218
|
* @readonly
|
|
2651
3219
|
*/
|
|
2652
3220
|
lineItems?: LineItem[];
|
|
2653
|
-
/**
|
|
3221
|
+
/**
|
|
3222
|
+
* [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
|
|
3223
|
+
* @maxLength 1000
|
|
3224
|
+
*/
|
|
2654
3225
|
buyerNote?: string | null;
|
|
2655
3226
|
/** Buyer information. */
|
|
2656
3227
|
buyerInfo?: BuyerInfo;
|
|
2657
3228
|
/**
|
|
2658
3229
|
* Currency used for pricing.
|
|
3230
|
+
* @format CURRENCY
|
|
2659
3231
|
* @readonly
|
|
2660
3232
|
*/
|
|
2661
3233
|
currency?: string;
|
|
@@ -2663,6 +3235,7 @@ export interface UpdateCartOptions {
|
|
|
2663
3235
|
* Currency code used for all the converted prices that are returned.
|
|
2664
3236
|
* For a site that supports multiple currencies, this is the currency the buyer selected.
|
|
2665
3237
|
* @readonly
|
|
3238
|
+
* @format CURRENCY
|
|
2666
3239
|
*/
|
|
2667
3240
|
conversionCurrency?: string;
|
|
2668
3241
|
/**
|
|
@@ -2689,6 +3262,7 @@ export interface UpdateCartOptions {
|
|
|
2689
3262
|
/**
|
|
2690
3263
|
* ID of the checkout that originated from this cart.
|
|
2691
3264
|
* @readonly
|
|
3265
|
+
* @format GUID
|
|
2692
3266
|
*/
|
|
2693
3267
|
checkoutId?: string | null;
|
|
2694
3268
|
/**
|
|
@@ -2712,27 +3286,42 @@ export interface UpdateCartOptions {
|
|
|
2712
3286
|
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
2713
3287
|
*
|
|
2714
3288
|
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
3289
|
+
* @maxLength 1000
|
|
2715
3290
|
*/
|
|
2716
3291
|
overrideCheckoutUrl?: string | null;
|
|
2717
3292
|
/**
|
|
2718
3293
|
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
3294
|
+
* @format GUID
|
|
2719
3295
|
* @readonly
|
|
2720
3296
|
*/
|
|
2721
3297
|
purchaseFlowId?: string | null;
|
|
2722
3298
|
/** Selected shipping option. */
|
|
2723
3299
|
selectedShippingOption?: SelectedShippingOption;
|
|
3300
|
+
/**
|
|
3301
|
+
* The business location ID associated with the cart.
|
|
3302
|
+
* Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
3303
|
+
* @format GUID
|
|
3304
|
+
*/
|
|
3305
|
+
businessLocationId?: string | null;
|
|
2724
3306
|
};
|
|
2725
3307
|
/** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
2726
3308
|
couponCode?: string | null;
|
|
2727
|
-
/**
|
|
3309
|
+
/**
|
|
3310
|
+
* Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart.
|
|
3311
|
+
* @maxSize 100
|
|
3312
|
+
*/
|
|
2728
3313
|
merchantDiscounts?: MerchantDiscountInput[];
|
|
2729
|
-
/**
|
|
3314
|
+
/**
|
|
3315
|
+
* Catalog line items.
|
|
3316
|
+
* @maxSize 300
|
|
3317
|
+
*/
|
|
2730
3318
|
lineItems?: LineItem[];
|
|
2731
3319
|
/**
|
|
2732
3320
|
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
2733
3321
|
*
|
|
2734
3322
|
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
2735
3323
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
3324
|
+
* @maxSize 300
|
|
2736
3325
|
*/
|
|
2737
3326
|
customLineItems?: CustomLineItem[];
|
|
2738
3327
|
}
|
|
@@ -2768,15 +3357,14 @@ export declare function getCart(_id: string): Promise<Cart & CartNonNullableFiel
|
|
|
2768
3357
|
/**
|
|
2769
3358
|
* Adds catalog line items to a cart.
|
|
2770
3359
|
*
|
|
2771
|
-
*
|
|
2772
|
-
* The `addToCart()` function returns a Promise that resolves to the updated cart when the specified items have been added.
|
|
3360
|
+
* After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
|
|
2773
3361
|
*
|
|
2774
3362
|
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
2775
3363
|
* @param _id - Cart ID.
|
|
2776
3364
|
* @public
|
|
2777
3365
|
* @requiredField _id
|
|
2778
|
-
* @requiredField options.customLineItems.descriptionLines
|
|
2779
3366
|
* @requiredField options.customLineItems.descriptionLines.name
|
|
3367
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
2780
3368
|
* @requiredField options.customLineItems.itemType
|
|
2781
3369
|
* @requiredField options.customLineItems.price
|
|
2782
3370
|
* @requiredField options.customLineItems.productName
|
|
@@ -2789,12 +3377,16 @@ export declare function getCart(_id: string): Promise<Cart & CartNonNullableFiel
|
|
|
2789
3377
|
* @permissionId ECOM.ADMIN_MODIFY_CARTS
|
|
2790
3378
|
* @permissionScope Manage Stores - all permissions
|
|
2791
3379
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3380
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3381
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2792
3382
|
* @permissionScope Manage eCommerce - all permissions
|
|
2793
3383
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2794
3384
|
* @permissionScope Manage Stores - all permissions
|
|
2795
3385
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2796
3386
|
* @permissionScope Manage eCommerce - Admin Permissions
|
|
2797
3387
|
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
3388
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3389
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2798
3390
|
* @permissionScope Manage eCommerce - all permissions
|
|
2799
3391
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2800
3392
|
* @applicableIdentity APP
|
|
@@ -2804,21 +3396,31 @@ export declare function getCart(_id: string): Promise<Cart & CartNonNullableFiel
|
|
|
2804
3396
|
*/
|
|
2805
3397
|
export declare function addToCart(_id: string, options?: AddToCartOptions): Promise<AddToCartResponse & AddToCartResponseNonNullableFields>;
|
|
2806
3398
|
export interface AddToCartOptions {
|
|
2807
|
-
/**
|
|
3399
|
+
/**
|
|
3400
|
+
* Catalog line items.
|
|
3401
|
+
* @maxSize 100
|
|
3402
|
+
*/
|
|
2808
3403
|
lineItems?: LineItem[];
|
|
2809
3404
|
/**
|
|
2810
3405
|
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
2811
3406
|
*
|
|
2812
3407
|
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
2813
3408
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
3409
|
+
* @maxSize 100
|
|
2814
3410
|
*/
|
|
2815
3411
|
customLineItems?: CustomLineItem[];
|
|
3412
|
+
/**
|
|
3413
|
+
* The business location ID associated with the cart.
|
|
3414
|
+
* The `businessLocationId` field cannot be passed if one already exists on the cart. To update a cart's business location ID, use the UpdateCart method.
|
|
3415
|
+
* Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
3416
|
+
* @format GUID
|
|
3417
|
+
*/
|
|
3418
|
+
businessLocationId?: string | null;
|
|
2816
3419
|
}
|
|
2817
3420
|
/**
|
|
2818
3421
|
* Removes line items from the specified cart.
|
|
2819
3422
|
*
|
|
2820
|
-
*
|
|
2821
|
-
* The `removeLineItems()` function returns a Promise that resolves to the updated cart when the line items are removed from the specified cart.
|
|
3423
|
+
* After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
|
|
2822
3424
|
* @public
|
|
2823
3425
|
* @requiredField _id
|
|
2824
3426
|
* @requiredField lineItemIds
|
|
@@ -2827,6 +3429,8 @@ export interface AddToCartOptions {
|
|
|
2827
3429
|
* @permissionId ECOM.MODIFY_CARTS
|
|
2828
3430
|
* @permissionScope Manage Stores - all permissions
|
|
2829
3431
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3432
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3433
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2830
3434
|
* @permissionScope Manage eCommerce - all permissions
|
|
2831
3435
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2832
3436
|
* @applicableIdentity APP
|
|
@@ -2873,20 +3477,24 @@ export interface CreateCheckoutOptions {
|
|
|
2873
3477
|
billingAddress?: Address;
|
|
2874
3478
|
/** Selected shipping option. */
|
|
2875
3479
|
selectedShippingOption?: SelectedShippingOption;
|
|
2876
|
-
/**
|
|
3480
|
+
/**
|
|
3481
|
+
* Mandatory when setting a billing or shipping address if the site visitor isn't logged in.
|
|
3482
|
+
* @format EMAIL
|
|
3483
|
+
*/
|
|
2877
3484
|
email?: string | null;
|
|
2878
3485
|
}
|
|
2879
3486
|
/**
|
|
2880
3487
|
* Removes the coupon from a specified cart.
|
|
2881
3488
|
*
|
|
2882
|
-
*
|
|
2883
|
-
* The `removeCoupon()` function returns a Promise that resolves to the updated cart when the coupon is removed from the specified cart.
|
|
3489
|
+
* After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
|
|
2884
3490
|
* @param _id - Cart ID.
|
|
2885
3491
|
* @public
|
|
2886
3492
|
* @requiredField _id
|
|
2887
3493
|
* @permissionId ECOM.MODIFY_CARTS
|
|
2888
3494
|
* @permissionScope Manage Stores - all permissions
|
|
2889
3495
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3496
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3497
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2890
3498
|
* @permissionScope Manage eCommerce - all permissions
|
|
2891
3499
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2892
3500
|
* @applicableIdentity APP
|
|
@@ -2898,12 +3506,11 @@ export declare function removeCoupon(_id: string): Promise<RemoveCouponResponse
|
|
|
2898
3506
|
/**
|
|
2899
3507
|
* Updates the quantity of one or more line items in a specified cart.
|
|
2900
3508
|
*
|
|
3509
|
+
* After a cart is updated, call `refreshCart()` to update the cart's UI elements and trigger the `onCartChange()` event.
|
|
2901
3510
|
*
|
|
2902
|
-
*
|
|
3511
|
+
* This method is only for updating the quantity of line items. To entirely remove a line item from the cart, use `removeLineItems()`. To add a new line item to the cart, use `addToCart()`.
|
|
2903
3512
|
*
|
|
2904
|
-
* This
|
|
2905
|
-
*
|
|
2906
|
-
* This endpoint checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock.
|
|
3513
|
+
* This method checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock.
|
|
2907
3514
|
* @param _id - Cart ID.
|
|
2908
3515
|
* @param lineItems - Line item IDs and their new quantity.
|
|
2909
3516
|
* @public
|
|
@@ -2912,6 +3519,8 @@ export declare function removeCoupon(_id: string): Promise<RemoveCouponResponse
|
|
|
2912
3519
|
* @permissionId ECOM.MODIFY_CARTS
|
|
2913
3520
|
* @permissionScope Manage Stores - all permissions
|
|
2914
3521
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3522
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3523
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2915
3524
|
* @permissionScope Manage eCommerce - all permissions
|
|
2916
3525
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2917
3526
|
* @applicableIdentity APP
|
|
@@ -2985,6 +3594,8 @@ export interface EstimateTotalsOptions {
|
|
|
2985
3594
|
* @permissionId ECOM.MODIFY_CARTS
|
|
2986
3595
|
* @permissionScope Manage Stores - all permissions
|
|
2987
3596
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3597
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3598
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2988
3599
|
* @permissionScope Manage eCommerce - all permissions
|
|
2989
3600
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2990
3601
|
* @applicableIdentity APP
|
|
@@ -2993,4 +3604,22 @@ export interface EstimateTotalsOptions {
|
|
|
2993
3604
|
* @fqn com.wix.ecom.cart.api.v1.CartService.DeleteCart
|
|
2994
3605
|
*/
|
|
2995
3606
|
export declare function deleteCart(_id: string): Promise<void>;
|
|
3607
|
+
/**
|
|
3608
|
+
* Removes the location associated with a cart.
|
|
3609
|
+
* @param _id - Cart ID.
|
|
3610
|
+
* @public
|
|
3611
|
+
* @documentationMaturity preview
|
|
3612
|
+
* @requiredField _id
|
|
3613
|
+
* @permissionId ECOM.MODIFY_CARTS
|
|
3614
|
+
* @permissionScope Manage Stores - all permissions
|
|
3615
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3616
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3617
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3618
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3619
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3620
|
+
* @applicableIdentity APP
|
|
3621
|
+
* @applicableIdentity VISITOR
|
|
3622
|
+
* @fqn com.wix.ecom.cart.api.v1.CartService.RemoveBusinessLocation
|
|
3623
|
+
*/
|
|
3624
|
+
export declare function removeBusinessLocation(_id: string): Promise<RemoveBusinessLocationResponse & RemoveBusinessLocationResponseNonNullableFields>;
|
|
2996
3625
|
export {};
|