@wix/auto_sdk_ecom_current-cart-v-2 1.0.39 → 1.0.41

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.
@@ -1,3965 +1,137 @@
1
- interface Cart {
2
- /**
3
- * Cart ID.
4
- * @format GUID
5
- * @readonly
6
- */
7
- _id?: string;
8
- /**
9
- * Date and time the Cart was created.
10
- * @readonly
11
- */
12
- _createdDate?: Date | null;
13
- /**
14
- * Date and time the Cart was last updated.
15
- * @readonly
16
- */
17
- _updatedDate?: Date | null;
18
- /**
19
- * Revision number, which increments by 1 each time the Cart is updated.
20
- * @readonly
21
- */
22
- revision?: string;
23
- /**
24
- * Line items added to the Cart by the customer.
25
- * This list may include items in stock and invalid out out stock.
26
- * @maxSize 300
27
- * @readonly
28
- */
29
- lineItems?: V2LineItem[];
30
- /**
31
- * The sum of all line item final prices.
32
- * @readonly
33
- */
34
- subtotal?: ConvertedMoney;
35
- /**
36
- * Optional message left by the customer.
37
- * Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.
38
- * @maxLength 1000
39
- */
40
- note?: string | null;
41
- /**
42
- * List of coupons added to the Cart.
43
- * Currently, only one coupon code is supported.
44
- * @maxSize 1
45
- * @readonly
46
- */
47
- coupons?: V2Coupon[];
48
- /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
49
- source?: CartSource;
50
- /** Information about the site from which the Cart's line items were added. */
51
- businessInfo?: BusinessInfo;
52
- /** Information about the customer that owns the Cart. */
53
- customerInfo?: CustomerInfo;
54
- /** Delivery-related information associated with the Cart. */
55
- deliveryInfo?: DeliveryInfo;
56
- /** Tax-related information associated with the Cart. */
57
- taxInfo?: TaxInfo;
58
- /** Payment-related information associated with the Cart. */
59
- paymentInfo?: PaymentInfo;
60
- /**
61
- * Whether the Cart has been placed as an Order.
62
- * Defaults to `false`.
63
- * @readonly
64
- */
65
- orderPlaced?: boolean;
66
- /**
67
- * The ID of the Order created from the Cart.
68
- * This field is empty until the checkout process is completed.
69
- * @format GUID
70
- * @readonly
71
- */
72
- orderId?: string | null;
73
- /**
74
- * Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).
75
- * @format GUID
76
- * @readonly
77
- */
78
- purchaseFlowId?: string | null;
79
- /**
80
- * Additional Cart settings.
81
- *
82
- * > **Notes:**
83
- * > * Custom settings can only be set when creating a Cart.
84
- * > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
85
- * @immutable
86
- */
87
- settings?: CartSettings;
88
- /**
89
- * Custom checkout URL to redirect the customer to a checkout page.
90
- * By default, customers are redirected to the standard Wix checkout page.
91
- * Clients can override this behavior by providing their own URL here.
92
- * If the URL contains the placeholder `{checkout_id}`, it will be replaced with the actual Cart ID.
93
- * @maxLength 2048
94
- */
95
- customCheckoutUrl?: string | null;
96
- /**
97
- * Custom fields.
98
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
99
- */
100
- extendedFields?: ExtendedFields;
101
- /**
102
- * Indicates whether this is the current cart of the customer.
103
- * The current cart can be accessed using the identity context (e.g., visitor ID from session cookies), without requiring an explicit cart ID.
104
- * @readonly
105
- */
106
- currentCart?: boolean;
107
- }
108
- interface V2LineItem {
109
- /**
110
- * A unique identifier of the line item within the Cart.
111
- * @format GUID
112
- */
113
- _id?: string;
114
- /** The name of the line item. */
115
- name?: TranslatableString;
116
- /** Quantity-related information about the line item. */
117
- quantityInfo?: ItemQuantityInfo;
118
- /** Pricing-related information about the line item. */
119
- pricing?: ItemPricingInfo;
120
- /** Information about the origin of the line item. */
121
- source?: ItemSource;
122
- /** Details about the item for display purposes. */
123
- attributes?: ItemAttributes;
124
- /** Delivery-related information about the line item. */
125
- deliveryConfig?: ItemDeliveryConfig;
126
- /** Tax-related information about the line item. */
127
- taxConfig?: ItemTaxConfig;
128
- /** Payment-related information about the line item. */
129
- paymentConfig?: ItemPaymentConfig;
130
- /** The availability status of the line item according to the inventory. */
131
- status?: ItemStatusWithLiterals;
132
- /**
133
- * Custom extended fields for the line item object.
134
- *
135
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls.
136
- */
137
- extendedFields?: ExtendedFields;
138
- /**
139
- * Additional Fees to be added to this item calculation.
140
- * @maxSize 5
141
- */
142
- additionalFees?: V1AdditionalFee[];
143
- /**
144
- * Modifier groups that were added to the item.
145
- * @maxSize 25
146
- */
147
- modifierGroups?: ModifierGroup[];
148
- /**
149
- * List of discounts applied to this line item.
150
- * @maxSize 100
151
- */
152
- discounts?: ItemDiscount[];
153
- /**
154
- * Whether the line item is a custom line item.
155
- * Custom line items don't trigger the Catalog service plugin.
156
- */
157
- customLineItem?: boolean;
158
- }
159
- interface TranslatableString {
160
- /**
161
- * __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).
162
- *
163
- * Min: 1 character.
164
- * Max: 200 characters.
165
- * @minLength 1
166
- * @maxLength 200
167
- */
168
- original?: string;
169
- /**
170
- * String translated into the buyer's language.
171
- *
172
- * Min: 1 character.
173
- * Max: 400 characters.
174
- * Default: Same as `original`.
175
- * @minLength 1
176
- * @maxLength 400
177
- */
178
- translated?: string | null;
179
- }
180
- interface ItemQuantityInfo {
181
- /**
182
- * The final confirmed quantity of items to be purchased.
183
- * This value is the minimum between the requested quantity and the available quantity.
184
- * @min 1
185
- * @max 100000
186
- */
187
- confirmedQuantity?: number;
188
- /**
189
- * The amount of items originally requested by the customer.
190
- * @min 1
191
- * @max 100000
192
- */
193
- requestedQuantity?: number;
194
- /** The maximum quantity of items available for purchase. */
195
- availableQuantity?: number | null;
196
- /**
197
- * Whether the line item quantity is fixed and cannot be changed.
198
- * Default: `false`.
199
- */
200
- fixedQuantity?: boolean;
201
- }
202
- interface ItemPricingInfo {
203
- /**
204
- * Final unit price after applying automatic discounts.
205
- * Includes tax if `tax_info.prices_include_tax` is true.
206
- */
207
- unitPrice?: ConvertedMoney;
208
- /**
209
- * Final total price for this item (unit price × quantity).
210
- * Includes tax if `tax_info.prices_include_tax` is true.
211
- */
212
- totalPrice?: ConvertedMoney;
213
- /**
214
- * Additional description for the price.
215
- * For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
216
- */
217
- priceDescription?: PriceDescription;
218
- /** Indicates whether the price is not yet defined, and will be updated after the order is created. */
219
- priceUndetermined?: boolean;
220
- /** Detailed breakdown of price components. */
221
- breakdown?: ItemPriceBreakdown;
222
- }
223
- interface ConvertedMoney {
224
- /**
225
- * Monetary amount in the original currency, as specified in `business_info.currency_code`.
226
- * @format DECIMAL_VALUE
227
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
228
- */
229
- amount?: string;
230
- /**
231
- * Monetary amount in the converted currency, as specified in `customer_info.currency_code`.
232
- *
233
- * Default: `amount`.
234
- * @format DECIMAL_VALUE
235
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
236
- * @readonly
237
- */
238
- convertedAmount?: string;
239
- }
240
- interface PriceDescription {
241
- /**
242
- * __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).
243
- * @minLength 1
244
- * @maxLength 100
245
- */
246
- original?: string;
247
- /**
248
- * Price description translated into the buyer's language.
249
- *
250
- * Default: Same as `original`.
251
- * @minLength 1
252
- * @maxLength 100
253
- */
254
- translated?: string | null;
255
- }
256
- interface ItemPriceBreakdown {
257
- /**
258
- * Full catalog price of a single item before any discounts, including modifiers.
259
- * Includes tax if `tax_info.prices_include_tax` is true.
260
- */
261
- fullPrice?: ConvertedMoney;
262
- /**
263
- * Catalog sale price of a single item, including modifiers.
264
- * Includes tax if `tax_info.prices_include_tax` is true.
265
- */
266
- salePrice?: ConvertedMoney;
267
- /**
268
- * Total price of all item modifiers for the entire quantity of this item.
269
- * Includes tax if `tax_info.prices_include_tax` is true.
270
- */
271
- totalModifiersPrice?: ConvertedMoney;
272
- }
273
- interface ItemSource {
274
- /**
275
- * Catalog and item reference.
276
- * Holds IDs for the item and the catalog it came from, as well as further optional info.
277
- * Optional for custom line items, which don't trigger the Catalog service plugin.
278
- */
279
- catalogReference?: CatalogReference;
280
- /**
281
- * Overriding values for catalog item properties.
282
- * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
283
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
284
- */
285
- catalogOverrideFields?: CatalogOverrideFields;
286
- /**
287
- * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
288
- * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
289
- * + in most cases, this field is the same as `catalogReference.catalogItemId`.
290
- * + Used in membership validation.
291
- * @minLength 1
292
- * @maxLength 36
293
- */
294
- rootCatalogItemId?: string | null;
295
- /**
296
- * ID of the app managing the inventory.
297
- * @format GUID
298
- */
299
- inventoryAppId?: string | null;
300
- }
301
- /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
302
- interface CatalogReference {
303
- /**
304
- * ID of the item within the catalog it belongs to.
305
- * @minLength 1
306
- * @maxLength 36
307
- */
308
- catalogItemId?: string;
309
- /**
310
- * ID of the app providing the catalog.
311
- *
312
- * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
313
- *
314
- * For items from Wix catalogs, the following values always apply:
315
- * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
316
- * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
317
- * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
318
- * @minLength 1
319
- */
320
- appId?: string;
321
- /**
322
- * 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.
323
- *
324
- * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).
325
- */
326
- options?: Record<string, any> | null;
327
- }
328
- interface CatalogOverrideFields {
329
- /** The name of the line item. */
330
- name?: TranslatableString;
331
- /**
332
- * The sale price of a single item after modifiers but before automatic discount.
333
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
334
- */
335
- salePrice?: string | null;
336
- /**
337
- * The full price of a single item after modifiers but before automatic discount.
338
- * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
339
- */
340
- fullPrice?: string | null;
341
- /**
342
- * Item description lines.
343
- * Used when displaying the line item to buyers.
344
- * @maxSize 20
345
- */
346
- descriptionLines?: DescriptionLine[];
347
- /** Physical properties of the item. */
348
- physicalProperties?: PhysicalProperties;
349
- /** Item image. */
350
- image?: string;
351
- /** Payment method selected for the item. */
352
- paymentOption?: PaymentOption;
353
- /**
354
- * Partial payment to be paid upfront during the checkout.
355
- * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.
356
- * @format DECIMAL_VALUE
357
- * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
358
- */
359
- depositAmount?: string | null;
360
- /**
361
- * Whether to save the payment method on the order.
362
- *
363
- * Default: `false`
364
- */
365
- savePaymentMethod?: boolean | null;
366
- }
367
- interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
368
- /** Description line plain text value. */
369
- plainText?: PlainTextValue;
370
- /** Description line color value. */
371
- colorInfo?: Color;
372
- /** Description line name. */
373
- name?: DescriptionLineName;
374
- }
375
- /** @oneof */
376
- interface DescriptionLineValueOneOf {
377
- /** Description line plain text value. */
378
- plainText?: PlainTextValue;
379
- /** Description line color value. */
380
- colorInfo?: Color;
381
- }
382
- /** @oneof */
383
- interface DescriptionLineDescriptionLineValueOneOf {
384
- }
385
- interface DescriptionLineName {
386
- /**
387
- * 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).
388
- * @maxLength 100
389
- */
390
- original?: string;
391
- /**
392
- * Description line name translated into the buyer's language.
393
- *
394
- * Default: Same as `original`.
395
- * @maxLength 200
396
- */
397
- translated?: string | null;
398
- }
399
- interface PlainTextValue {
400
- /**
401
- * 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).
402
- * @maxLength 600
403
- */
404
- original?: string;
405
- /**
406
- * Description line plain text value translated into the buyer's language.
407
- *
408
- * Default: Same as `original`.
409
- * @maxLength 600
410
- */
411
- translated?: string | null;
412
- }
413
- interface Color {
414
- /**
415
- * 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).
416
- * @maxLength 500
417
- */
418
- original?: string;
419
- /**
420
- * Description line color name translated into the buyer's language.
421
- *
422
- * Default: Same as `original`.
423
- * @maxLength 500
424
- */
425
- translated?: string | null;
426
- /** HEX or RGB color code for display. */
427
- code?: string | null;
428
- }
429
- declare enum DescriptionLineType {
430
- /** Unrecognized type. */
431
- UNRECOGNISED = "UNRECOGNISED",
432
- /** Plain text type. */
433
- PLAIN_TEXT = "PLAIN_TEXT",
434
- /** Color type. */
435
- COLOR = "COLOR"
436
- }
437
- /** @enumType */
438
- type DescriptionLineTypeWithLiterals = DescriptionLineType | 'UNRECOGNISED' | 'PLAIN_TEXT' | 'COLOR';
439
- interface PhysicalProperties {
440
- /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
441
- weight?: number | null;
442
- /**
443
- * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
444
- * @maxLength 40
445
- */
446
- sku?: string | null;
447
- /** Whether this line item is shippable. */
448
- shippable?: boolean;
449
- }
450
- interface PaymentOption {
451
- /**
452
- * Type of selected payment option for current item.
453
- *
454
- * Default: `FULL_PAYMENT_ONLINE`
455
- */
456
- value?: PaymentOptionTypeWithLiterals;
457
- }
458
- /** Type of selected payment option for catalog item */
459
- declare enum PaymentOptionType {
460
- /** The entire payment for this item happens as part of the checkout. */
461
- FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
462
- /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
463
- FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
464
- /** Payment for this item is done by charging a membership. Any remaining amount not covered by the membership, such as item modifiers, is paid online. */
465
- MEMBERSHIP = "MEMBERSHIP",
466
- /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
467
- DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
468
- /** 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`. */
469
- MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE",
470
- /**
471
- * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.
472
- * @documentationMaturity preview
473
- */
474
- MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"
475
- }
476
- /** @enumType */
477
- type PaymentOptionTypeWithLiterals = PaymentOptionType | 'FULL_PAYMENT_ONLINE' | 'FULL_PAYMENT_OFFLINE' | 'MEMBERSHIP' | 'DEPOSIT_ONLINE' | 'MEMBERSHIP_OFFLINE' | 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER';
478
- interface ItemAttributes {
479
- /**
480
- * Description lines of the item.
481
- * @maxSize 100
482
- */
483
- descriptionLines?: DescriptionLine[];
484
- /** The image of the item. */
485
- image?: string;
486
- /** URL to the item's page on the site. */
487
- url?: string;
488
- /**
489
- * Policies to be displayed to the buyer on the checkout page.
490
- * @maxSize 5
491
- */
492
- policies?: Policy[];
493
- /** Item type. Either a preset type or custom. */
494
- itemType?: ItemType;
495
- /**
496
- * Physical properties of the item.
497
- * When relevant, contains information such as SKU, item weight, and shippability.
498
- */
499
- physicalProperties?: PhysicalProperties;
500
- /** Subscription option information. */
501
- subscriptionInfo?: SubscriptionOptionInfo;
502
- /** Service properties. When relevant, this contains information such as date and number of participants. */
503
- serviceProperties?: ServiceProperties;
504
- /**
505
- * Whether the item can only be purchased by site members.
506
- * Default: `false`
507
- */
508
- membersOnly?: boolean;
509
- }
510
- interface Policy {
511
- /**
512
- * Policy title - should be translated
513
- * @minLength 1
514
- * @maxLength 29
515
- */
516
- title?: string | null;
517
- /**
518
- * Policy content - should be translated
519
- * @minLength 1
520
- * @maxLength 3000
521
- */
522
- content?: string;
523
- }
524
- interface ItemType extends ItemTypeItemTypeDataOneOf {
525
- /** Preset item type. */
526
- preset?: ItemTypePresetWithLiterals;
527
- /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
528
- custom?: string;
529
- }
530
- /** @oneof */
531
- interface ItemTypeItemTypeDataOneOf {
532
- /** Preset item type. */
533
- preset?: ItemTypePresetWithLiterals;
534
- /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
535
- custom?: string;
536
- }
537
- declare enum ItemTypePreset {
538
- UNRECOGNISED = "UNRECOGNISED",
539
- PHYSICAL = "PHYSICAL",
540
- DIGITAL = "DIGITAL",
541
- GIFT_CARD = "GIFT_CARD",
542
- SERVICE = "SERVICE"
543
- }
544
- /** @enumType */
545
- type ItemTypePresetWithLiterals = ItemTypePreset | 'UNRECOGNISED' | 'PHYSICAL' | 'DIGITAL' | 'GIFT_CARD' | 'SERVICE';
546
- interface SubscriptionOptionInfo {
547
- /** Subscription option settings. */
548
- subscriptionSettings?: SubscriptionSettings;
549
- /** Subscription option title. */
550
- title?: Title;
551
- /** Subscription option description. */
552
- description?: Description;
553
- }
554
- interface SubscriptionSettings {
555
- /** Frequency of recurring payment. */
556
- frequency?: SubscriptionFrequencyWithLiterals;
557
- /**
558
- * Interval of recurring payment.
559
- *
560
- * Default: `1`.
561
- * If SubscriptionFrequency is Day the minimum interval is 7
562
- * @min 1
563
- * @max 3650
564
- */
565
- interval?: number | null;
566
- /** Whether subscription is renewed automatically at the end of each period. */
567
- autoRenewal?: boolean;
568
- /**
569
- * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.
570
- * @min 1
571
- */
572
- billingCycles?: number | null;
573
- /** Whether to allow the customer to cancel the subscription.. */
574
- enableCustomerCancellation?: boolean;
575
- /**
576
- * Period until first cycle starts. If applied payNow will be 0
577
- * If None => no free trial
578
- */
579
- freeTrialPeriod?: FreeTrialPeriod;
580
- }
581
- /** Frequency unit of recurring payment */
582
- declare enum SubscriptionFrequency {
583
- UNDEFINED = "UNDEFINED",
584
- DAY = "DAY",
585
- WEEK = "WEEK",
586
- MONTH = "MONTH",
587
- YEAR = "YEAR"
588
- }
589
- /** @enumType */
590
- type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
591
- interface FreeTrialPeriod {
592
- /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
593
- frequency?: SubscriptionFrequencyWithLiterals;
594
- /**
595
- * interval of period
596
- * @min 1
597
- * @max 999
598
- */
599
- interval?: number;
600
- }
601
- interface Title {
602
- /**
603
- * 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).
604
- * @minLength 1
605
- * @maxLength 150
606
- */
607
- original?: string;
608
- /**
609
- * Subscription option name translated into the buyer's language.
610
- *
611
- * Default: Same as `original`.
612
- * @minLength 1
613
- * @maxLength 150
614
- */
615
- translated?: string | null;
616
- }
617
- interface Description {
618
- /**
619
- * Subscription option description.
620
- * @maxLength 500
621
- */
622
- original?: string;
623
- /**
624
- * Translated subscription option description.
625
- * @maxLength 500
626
- */
627
- translated?: string | null;
628
- }
629
- interface SecuredMedia {
630
- /**
631
- * Media ID in Wix Media Manager.
632
- * @minLength 1
633
- * @maxLength 100
634
- */
635
- _id?: string;
636
- /**
637
- * Original filename.
638
- * @minLength 1
639
- * @maxLength 1000
640
- */
641
- fileName?: string;
642
- /** File type. */
643
- fileType?: FileTypeWithLiterals;
644
- }
645
- declare enum FileType {
646
- UNSPECIFIED = "UNSPECIFIED",
647
- SECURE_PICTURE = "SECURE_PICTURE",
648
- SECURE_VIDEO = "SECURE_VIDEO",
649
- SECURE_DOCUMENT = "SECURE_DOCUMENT",
650
- SECURE_MUSIC = "SECURE_MUSIC",
651
- SECURE_ARCHIVE = "SECURE_ARCHIVE"
652
- }
653
- /** @enumType */
654
- type FileTypeWithLiterals = FileType | 'UNSPECIFIED' | 'SECURE_PICTURE' | 'SECURE_VIDEO' | 'SECURE_DOCUMENT' | 'SECURE_MUSIC' | 'SECURE_ARCHIVE';
655
- interface ServiceProperties {
656
- /**
657
- * 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.
658
- * For example, the start time of a class.
659
- */
660
- scheduledDate?: Date | null;
661
- /**
662
- * 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.
663
- * @min 1
664
- * @max 10000
665
- */
666
- numberOfParticipants?: number | null;
667
- }
668
- interface ItemDeliveryConfig {
669
- /**
670
- * Delivery profile ID.
671
- * @format GUID
672
- */
673
- deliveryProfileId?: string | null;
674
- /**
675
- * An optional custom fulfiller's ID.
676
- * @format GUID
677
- */
678
- fulfillerId?: string | null;
679
- }
680
- interface ItemTaxConfig {
681
- /** Address to use for tax calculation purposes. */
682
- taxableAddress?: TaxableAddress;
683
- /**
684
- * Tax group ID for this line item.
685
- * @maxLength 50
686
- */
687
- taxGroupId?: string | null;
688
- }
689
- interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
690
- /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
691
- addressType?: TaxableAddressTypeWithLiterals;
692
- }
693
- /** @oneof */
694
- interface TaxableAddressTaxableAddressDataOneOf {
695
- /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
696
- addressType?: TaxableAddressTypeWithLiterals;
697
- }
698
- declare enum TaxableAddressType {
699
- UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
700
- BUSINESS = "BUSINESS",
701
- BILLING = "BILLING",
702
- SHIPPING = "SHIPPING"
703
- }
704
- /** @enumType */
705
- type TaxableAddressTypeWithLiterals = TaxableAddressType | 'UNKNOWN_TAXABLE_ADDRESS' | 'BUSINESS' | 'BILLING' | 'SHIPPING';
706
- interface ItemPaymentConfig {
707
- /**
708
- * Whether to save the payment method on the order.
709
- * Default: `false`
710
- */
711
- savePaymentMethod?: boolean;
712
- /**
713
- * Item payment policy that requires buyer consent to complete purchase.
714
- * The payment policy will be displayed on the checkout page.
715
- * @minLength 1
716
- * @maxLength 2500
717
- */
718
- consentRequiredPaymentPolicy?: string | null;
719
- /**
720
- * Partial payment to be paid upfront during the checkout.
721
- * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
722
- */
723
- depositAmount?: ConvertedMoney;
724
- /**
725
- * Selected membership to be used as payment for this item.
726
- * Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.
727
- * This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`.
728
- */
729
- selectedMembership?: V2SelectedMembership;
730
- /**
731
- * Type of selected payment option for current item.
732
- *
733
- * Default: `FULL_PAYMENT_ONLINE`
734
- */
735
- paymentOption?: PaymentOptionTypeWithLiterals;
736
- }
737
- interface V2SelectedMembership {
738
- /**
739
- * Membership ID.
740
- * @minLength 1
741
- * @maxLength 100
742
- */
743
- _id?: string;
744
- /**
745
- * ID of the app providing this payment option.
746
- * @format GUID
747
- */
748
- appId?: string;
749
- /**
750
- * Name of the selected membership.
751
- * @readonly
752
- */
753
- name?: TranslatableString;
754
- }
755
- declare enum ItemStatus {
756
- UNKNOWN_ITEM_STATUS = "UNKNOWN_ITEM_STATUS",
757
- /** The item is available in the requested quantity. */
758
- IN_STOCK = "IN_STOCK",
759
- /** Only part of the requested quantity is available. */
760
- PARTIALLY_IN_STOCK = "PARTIALLY_IN_STOCK",
761
- /** The item is out of stock. */
762
- OUT_OF_STOCK = "OUT_OF_STOCK",
763
- /** The item is no longer exists in the catalog. */
764
- REMOVED_FROM_CATALOG = "REMOVED_FROM_CATALOG"
765
- }
766
- /** @enumType */
767
- type ItemStatusWithLiterals = ItemStatus | 'UNKNOWN_ITEM_STATUS' | 'IN_STOCK' | 'PARTIALLY_IN_STOCK' | 'OUT_OF_STOCK' | 'REMOVED_FROM_CATALOG';
768
- interface ExtendedFields {
769
- /**
770
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
771
- * The value of each key is structured according to the schema defined when the extended fields were configured.
772
- *
773
- * You can only access fields for which you have the appropriate permissions.
774
- *
775
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
776
- */
777
- namespaces?: Record<string, Record<string, any>>;
778
- }
779
- interface V1AdditionalFee {
780
- /**
781
- * Additional fee's unique code or ID.
782
- * @minLength 1
783
- * @maxLength 100
784
- */
785
- code?: string | null;
786
- /**
787
- * Additional fee's name.
788
- *
789
- * Max: 50 characters
790
- * @minLength 1
791
- * @maxLength 50
792
- */
793
- name?: string;
794
- /**
795
- * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.
796
- * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }
797
- */
798
- price?: string;
799
- /**
800
- * Tax details.
801
- *
802
- * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.
803
- */
804
- taxDetails?: TaxDetails;
805
- }
806
- /** Tax details. */
807
- interface TaxDetails {
808
- /** Whether additional fee is taxable. */
809
- taxable?: boolean;
810
- /**
811
- * Reserved for internal use.
812
- * @format GUID
813
- */
814
- taxGroupId?: string | null;
815
- }
816
- interface ModifierGroup {
817
- /**
818
- * Modifier group ID.
819
- * @minLength 1
820
- * @maxLength 36
821
- * @readonly
822
- */
823
- _id?: string;
824
- /** Modifier group name. */
825
- name?: TranslatableString;
826
- /**
827
- * List of modifiers in this group.
828
- * @minSize 1
829
- * @maxSize 25
830
- */
831
- modifiers?: ItemModifier[];
832
- }
833
- interface ItemModifier {
834
- /**
835
- * Modifier ID.
836
- * @minLength 1
837
- * @maxLength 36
838
- * @readonly
839
- */
840
- _id?: string;
841
- /**
842
- * The quantity of this modifier.
843
- * @min 1
844
- * @max 100000
845
- */
846
- quantity?: number;
847
- /** Primary display label for the modifier. */
848
- label?: TranslatableString;
849
- /** Additional details. */
850
- details?: TranslatableString;
851
- /** The price of the modifier. */
852
- price?: ConvertedMoney;
853
- }
854
- /**
855
- * Currently, only automatic discounts are applied to line items.
856
- * In the future, coupon discounts will be supported as well.
857
- */
858
- interface ItemDiscount {
859
- /** The display name of the discount. */
860
- name?: TranslatableString;
861
- /** The amount discounted from the item's sale price (per unit). */
862
- amountOff?: ConvertedMoney;
863
- }
864
- interface Scope {
865
- /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
866
- namespace?: string;
867
- /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
868
- group?: Group;
869
- }
870
- interface Group {
871
- /** 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). */
872
- name?: string;
873
- /** Item ID (when the coupon scope is limited to just one item). */
874
- entityId?: string | null;
875
- }
876
- interface V2Coupon {
877
- /**
878
- * ID of the coupon in the Cart.
879
- * @format GUID
880
- */
881
- _id?: string;
882
- /**
883
- * Coupon code.
884
- * @minLength 1
885
- * @maxLength 50
886
- */
887
- code?: string;
888
- }
889
- interface CartSource {
890
- /**
891
- * Sales channel that created the Cart.
892
- * @immutable
893
- */
894
- channelType?: ChannelTypeWithLiterals;
895
- /**
896
- * References to an external app and resource associated with this Cart.
897
- * Used for integration and tracking across different platforms.
898
- * @maxSize 10
899
- * @immutable
900
- */
901
- externalReferences?: ExternalReference[];
902
- /**
903
- * ID of the entity that created the Cart.
904
- * @readonly
905
- */
906
- createdBy?: CreatedBy;
907
- /**
908
- * Reference IDs for the app and component providing custom checkout page content.
909
- *
910
- * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
911
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
912
- */
913
- customContentReference?: CustomContentReference;
914
- }
915
- declare enum ChannelType {
916
- /** Unspecified sales channel. This value is not supported. */
917
- UNSPECIFIED = "UNSPECIFIED",
918
- /** A web client. */
919
- WEB = "WEB",
920
- /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
921
- POS = "POS",
922
- /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
923
- EBAY = "EBAY",
924
- /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
925
- AMAZON = "AMAZON",
926
- /** Other sales platform. */
927
- OTHER_PLATFORM = "OTHER_PLATFORM",
928
- /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
929
- WIX_APP_STORE = "WIX_APP_STORE",
930
- /** 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) */
931
- WIX_INVOICES = "WIX_INVOICES",
932
- /** Wix merchant backoffice. */
933
- BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
934
- /** Wish sales channel. */
935
- WISH = "WISH",
936
- /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
937
- CLASS_PASS = "CLASS_PASS",
938
- /** Global-E sales channel. */
939
- GLOBAL_E = "GLOBAL_E",
940
- /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
941
- FACEBOOK = "FACEBOOK",
942
- /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
943
- ETSY = "ETSY",
944
- /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
945
- TIKTOK = "TIKTOK",
946
- /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
947
- FAIRE_COM = "FAIRE_COM",
948
- /** PayPal Agentic Checkout sales channel. */
949
- PAYPAL_AGENTIC_CHECKOUT = "PAYPAL_AGENTIC_CHECKOUT"
950
- }
951
- /** @enumType */
952
- type ChannelTypeWithLiterals = ChannelType | 'UNSPECIFIED' | 'WEB' | 'POS' | 'EBAY' | 'AMAZON' | 'OTHER_PLATFORM' | 'WIX_APP_STORE' | 'WIX_INVOICES' | 'BACKOFFICE_MERCHANT' | 'WISH' | 'CLASS_PASS' | 'GLOBAL_E' | 'FACEBOOK' | 'ETSY' | 'TIKTOK' | 'FAIRE_COM' | 'PAYPAL_AGENTIC_CHECKOUT';
953
- interface ExternalReference {
954
- /**
955
- * ID of the app associated with the purchase flow.
956
- * For example, the Wix Pay Links app ID.
957
- * @format GUID
958
- * @immutable
959
- */
960
- appId?: string;
961
- /**
962
- * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
963
- * For example, a Wix Pay Link ID.
964
- * @minLength 1
965
- * @maxLength 100
966
- * @immutable
967
- */
968
- resourceId?: string | null;
969
- }
970
- interface CreatedBy extends CreatedByIdOneOf {
971
- /**
972
- * Site visitor ID (if site visitor is **not** a member).
973
- * @format GUID
974
- * @readonly
975
- */
976
- visitorId?: string;
977
- /**
978
- * Site member ID.
979
- * @format GUID
980
- * @readonly
981
- */
982
- memberId?: string;
983
- /**
984
- * Wix user ID - when the Cart was created by a Wix user on behalf of a buyer.
985
- * For example, via POS (point of service).
986
- * @format GUID
987
- */
988
- userId?: string;
989
- /**
990
- * App ID - when the Cart was created by an external application or Wix service.
991
- * @format GUID
992
- */
993
- appId?: string;
994
- }
995
- /** @oneof */
996
- interface CreatedByIdOneOf {
997
- /**
998
- * Site visitor ID (if site visitor is **not** a member).
999
- * @format GUID
1000
- * @readonly
1001
- */
1002
- visitorId?: string;
1003
- /**
1004
- * Site member ID.
1005
- * @format GUID
1006
- * @readonly
1007
- */
1008
- memberId?: string;
1009
- /**
1010
- * Wix user ID - when the Cart was created by a Wix user on behalf of a buyer.
1011
- * For example, via POS (point of service).
1012
- * @format GUID
1013
- */
1014
- userId?: string;
1015
- /**
1016
- * App ID - when the Cart was created by an external application or Wix service.
1017
- * @format GUID
1018
- */
1019
- appId?: string;
1020
- }
1021
- interface CustomContentReference {
1022
- /**
1023
- * ID of the app providing the content.
1024
- *
1025
- * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
1026
- * @format GUID
1027
- */
1028
- appId?: string;
1029
- /**
1030
- * ID of the component within the app it belongs to.
1031
- *
1032
- * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
1033
- * @format GUID
1034
- */
1035
- componentId?: string;
1036
- }
1037
- interface BusinessInfo {
1038
- /**
1039
- * The ID of the business location associated with the cart.
1040
- * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
1041
- * @format GUID
1042
- */
1043
- locationId?: string | null;
1044
- /**
1045
- * The business’s default language, represented as a two-letter ISO 639-1 code.
1046
- * @format LANGUAGE
1047
- * @readonly
1048
- */
1049
- languageCode?: string;
1050
- /**
1051
- * The business’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1052
- *
1053
- * This represents the base currency configured for the site and remains constant regardless of the [customer’s currency selection](https://support.wix.com/en/article/multicurrency-an-overview).
1054
- * @format CURRENCY
1055
- * @readonly
1056
- */
1057
- currencyCode?: string;
1058
- }
1059
- interface CustomerInfo extends CustomerInfoIdOneOf {
1060
- /**
1061
- * Site visitor ID (if site visitor is **not** a member).
1062
- * @format GUID
1063
- * @readonly
1064
- */
1065
- visitorId?: string;
1066
- /**
1067
- * Site member ID.
1068
- * @format GUID
1069
- * @readonly
1070
- */
1071
- memberId?: string;
1072
- /**
1073
- * Wix user ID - when the Cart was created by a Wix user on behalf of a customer.
1074
- * For example, via POS (point of service).
1075
- * @format GUID
1076
- * @readonly
1077
- */
1078
- userId?: string;
1079
- /**
1080
- * Customer's first name.
1081
- * @maxLength 100
1082
- */
1083
- firstName?: string | null;
1084
- /**
1085
- * Customer's last name.
1086
- * @maxLength 100
1087
- */
1088
- lastName?: string | null;
1089
- /**
1090
- * Customer's phone number.
1091
- * @format PHONE
1092
- */
1093
- phone?: string | null;
1094
- /**
1095
- * Company name.
1096
- * @maxLength 1000
1097
- */
1098
- company?: string | null;
1099
- /** Business VAT registration number. */
1100
- vatId?: VatId;
1101
- /**
1102
- * Customer's email address.
1103
- * @format EMAIL
1104
- */
1105
- email?: string | null;
1106
- /**
1107
- * The Contact ID of the customer.
1108
- * Created automatically if one does not yet exist.
1109
- * For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).
1110
- * @format GUID
1111
- * @readonly
1112
- */
1113
- contactId?: string | null;
1114
- /**
1115
- * Customer's language, represented as a two-letter ISO 639-1 code.
1116
- * Resolved automatically from the request metadata ('x-wix-linguist' header).
1117
- * @format LANGUAGE
1118
- * @readonly
1119
- */
1120
- languageCode?: string;
1121
- /**
1122
- * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview) during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1123
- *
1124
- * This reflects the customer’s preferred display currency and may differ from the site’s default currency.
1125
- * @format CURRENCY
1126
- * @readonly
1127
- */
1128
- currencyCode?: string;
1129
- }
1130
- /** @oneof */
1131
- interface CustomerInfoIdOneOf {
1132
- /**
1133
- * Site visitor ID (if site visitor is **not** a member).
1134
- * @format GUID
1135
- * @readonly
1136
- */
1137
- visitorId?: string;
1138
- /**
1139
- * Site member ID.
1140
- * @format GUID
1141
- * @readonly
1142
- */
1143
- memberId?: string;
1144
- /**
1145
- * Wix user ID - when the Cart was created by a Wix user on behalf of a customer.
1146
- * For example, via POS (point of service).
1147
- * @format GUID
1148
- * @readonly
1149
- */
1150
- userId?: string;
1151
- }
1152
- interface VatId {
1153
- /** Customer's tax ID. */
1154
- _id?: string;
1155
- /**
1156
- * Tax type.
1157
- *
1158
- * Supported values:
1159
- * + `CPF`: for individual tax payers
1160
- * + `CNPJ`: for corporations
1161
- */
1162
- type?: VatTypeWithLiterals;
1163
- }
1164
- /** tax info types */
1165
- declare enum VatType {
1166
- UNSPECIFIED = "UNSPECIFIED",
1167
- /** CPF - for individual tax payers. */
1168
- CPF = "CPF",
1169
- /** CNPJ - for corporations */
1170
- CNPJ = "CNPJ"
1171
- }
1172
- /** @enumType */
1173
- type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
1174
- interface DeliveryInfo {
1175
- /** The delivery address. */
1176
- address?: Address;
1177
- /**
1178
- * The selected delivery method by the customer.
1179
- * @readonly
1180
- */
1181
- method?: DeliveryMethod;
1182
- /**
1183
- * The unit of weight measurement when shipping items (e.g., KG, LB).
1184
- * @readonly
1185
- */
1186
- weightUnit?: WeightUnitWithLiterals;
1187
- }
1188
- /** Physical address */
1189
- interface Address {
1190
- /**
1191
- * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
1192
- * @format COUNTRY
1193
- */
1194
- country?: string | null;
1195
- /**
1196
- * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
1197
- * @maxLength 50
1198
- */
1199
- subdivision?: string | null;
1200
- /**
1201
- * City name.
1202
- * @maxLength 50
1203
- */
1204
- city?: string | null;
1205
- /**
1206
- * Postal or zip code.
1207
- * @maxLength 50
1208
- */
1209
- postalCode?: string | null;
1210
- /** Street address. */
1211
- streetAddress?: StreetAddress;
1212
- /**
1213
- * Main address line (usually street name and number).
1214
- * @maxLength 150
1215
- */
1216
- addressLine1?: string | null;
1217
- /**
1218
- * Free text providing more detailed address info. Usually contains apt, suite, floor.
1219
- * @maxLength 100
1220
- */
1221
- addressLine2?: string | null;
1222
- /** Geocode object containing latitude and longitude coordinates. */
1223
- location?: AddressLocation;
1224
- /**
1225
- * Country's full name.
1226
- * @readonly
1227
- */
1228
- countryFullname?: string | null;
1229
- /**
1230
- * Subdivision full-name.
1231
- * @readonly
1232
- */
1233
- subdivisionFullname?: string | null;
1234
- }
1235
- interface StreetAddress {
1236
- /** Street number. */
1237
- number?: string;
1238
- /** Street name. */
1239
- name?: string;
1240
- }
1241
- interface AddressLocation {
1242
- /** Address latitude. */
1243
- latitude?: number | null;
1244
- /** Address longitude. */
1245
- longitude?: number | null;
1246
- }
1247
- interface DeliveryMethod {
1248
- /**
1249
- * Unique code that acts as an ID for a shipping rate.
1250
- * For example, `"usps_std_overnight"`.
1251
- * @maxLength 100
1252
- */
1253
- code?: string;
1254
- /**
1255
- * The carrier app id
1256
- * @format GUID
1257
- */
1258
- appId?: string | null;
1259
- /**
1260
- * Delivery rate title.
1261
- * For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`.
1262
- */
1263
- title?: TranslatableString;
1264
- /** Whether the delivery method is a pickup option. */
1265
- pickup?: boolean;
1266
- }
1267
- declare enum WeightUnit {
1268
- /** Weight unit can't be classified due to an error. */
1269
- UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
1270
- /** Kilograms. */
1271
- KG = "KG",
1272
- /** Pounds. */
1273
- LB = "LB"
1274
- }
1275
- /** @enumType */
1276
- type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
1277
- interface TaxInfo {
1278
- /**
1279
- * Indicates whether tax is already included in prices (line items, delivery, additional fess).
1280
- * @readonly
1281
- */
1282
- pricesIncludeTax?: boolean;
1283
- /**
1284
- * Tax exempt group ID to use for tax exemptions.
1285
- * @format GUID
1286
- */
1287
- taxExemptGroupId?: string | null;
1288
- }
1289
- interface PaymentInfo {
1290
- /**
1291
- * A list of gift cards to pay with.
1292
- * Currently only one gift card is supported.
1293
- * @readonly
1294
- * @maxSize 1
1295
- */
1296
- giftCards?: V2GiftCard[];
1297
- /**
1298
- * The currency used for processing the payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1299
- *
1300
- * This is determined by the customer’s selected currency and the site’s supported payment currencies. If the customer’s selected currency is supported for payment, this matches the `customerInfo.currencyCode` property. If not supported, this falls back to the `businessInfo.currencyCode` property.
1301
- * @format CURRENCY
1302
- * @readonly
1303
- */
1304
- currencyCode?: string;
1305
- /** Billing address. */
1306
- billingAddress?: Address;
1307
- /** Full contact details for billing. */
1308
- billingContact?: FullAddressContactDetails;
1309
- }
1310
- interface V2GiftCard {
1311
- /**
1312
- * A unique identifier of the gift card within the Cart.
1313
- * @format GUID
1314
- */
1315
- _id?: string;
1316
- /**
1317
- * A partially hidden version of the actual gift card code
1318
- * @maxLength 50
1319
- */
1320
- obfuscatedCode?: string;
1321
- /**
1322
- * App ID of the gift card provider.
1323
- * @format GUID
1324
- */
1325
- appId?: string;
1326
- /**
1327
- * External ID in the gift card provider's system.
1328
- * Used for integration and tracking across different platforms.
1329
- * @minLength 1
1330
- * @maxLength 50
1331
- */
1332
- externalId?: string | null;
1333
- }
1334
- /** Full contact details for an address */
1335
- interface FullAddressContactDetails {
1336
- /**
1337
- * First name.
1338
- * @maxLength 100
1339
- */
1340
- firstName?: string | null;
1341
- /**
1342
- * Last name.
1343
- * @maxLength 100
1344
- */
1345
- lastName?: string | null;
1346
- /**
1347
- * Phone number.
1348
- * @format PHONE
1349
- */
1350
- phone?: string | null;
1351
- /**
1352
- * Company name.
1353
- * @maxLength 1000
1354
- */
1355
- company?: string | null;
1356
- /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
1357
- vatId?: VatId;
1358
- }
1359
- interface CartSettings {
1360
- /** Whether to restrict the option to add or remove a gift card on the checkout page. */
1361
- lockGiftCard?: boolean | null;
1362
- /** Whether to restrict the option to add or remove a coupon code on the checkout page. */
1363
- lockCouponCode?: boolean | null;
1364
- /** Whether to disable policy agreement checkout in the checkout page. */
1365
- policyAgreementCheckboxDisabled?: boolean | null;
1366
- /** Whether to disable manual payment option for this checkout. */
1367
- manualPaymentDisabled?: boolean | null;
1368
- }
1369
- interface LegacyFields {
1370
- }
1371
- interface Discount {
1372
- /** The display name of the discount. */
1373
- name?: TranslatableString;
1374
- /** The source of the discount, indicating how it was applied. */
1375
- source?: DiscountSource;
1376
- /** The component in the Cart that the discount applies to. */
1377
- scope?: DiscountScopeWithLiterals;
1378
- /**
1379
- * List of benefits provided by the discount.
1380
- * @minSize 1
1381
- * @maxSize 100
1382
- */
1383
- benefits?: DiscountBenefit[];
1384
- /**
1385
- * Number of subscription cycles this discount applies to.
1386
- * If unset, the discount applies to all billing cycles.
1387
- * @min 1
1388
- * @max 1000
1389
- */
1390
- subscriptionCycles?: number | null;
1391
- }
1392
- interface DiscountSource {
1393
- /** The type of the discount source. */
1394
- sourceType?: DiscountSourceTypeWithLiterals;
1395
- /**
1396
- * Coupon code that triggered the discount.
1397
- * Relevant for coupon discounts only.
1398
- * @maxLength 50
1399
- */
1400
- couponCode?: string | null;
1401
- }
1402
- declare enum DiscountSourceType {
1403
- UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
1404
- /** The discount was applied automatically by a rule. */
1405
- AUTOMATIC_RULE = "AUTOMATIC_RULE",
1406
- /** The discount was applied by a coupon code. */
1407
- COUPON = "COUPON"
1408
- }
1409
- /** @enumType */
1410
- type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
1411
- declare enum DiscountScope {
1412
- UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
1413
- /** The discount applies to the cart's subtotal. */
1414
- CART_SUBTOTAL = "CART_SUBTOTAL",
1415
- /** The discount applies to a specific line item. */
1416
- LINE_ITEM = "LINE_ITEM",
1417
- /** The discount applies to the delivery price. */
1418
- DELIVERY = "DELIVERY"
1419
- }
1420
- /** @enumType */
1421
- type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
1422
- interface DiscountBenefit extends DiscountBenefitValueOneOf {
1423
- /** A specific monetary value deducted from the total cost. */
1424
- amountOff?: ConvertedMoney;
1425
- /**
1426
- * The ID of line item that the discount applies to.
1427
- * Relevant for item-level discounts only.
1428
- * @format GUID
1429
- */
1430
- lineItemId?: string | null;
1431
- }
1432
- /** @oneof */
1433
- interface DiscountBenefitValueOneOf {
1434
- /** A specific monetary value deducted from the total cost. */
1435
- amountOff?: ConvertedMoney;
1436
- }
1437
- interface CustomField {
1438
- /** Custom field value. */
1439
- value?: any;
1440
- /**
1441
- * Custom field title.
1442
- * @minLength 1
1443
- * @maxLength 500
1444
- */
1445
- title?: string;
1446
- /**
1447
- * Translated custom field title.
1448
- * @minLength 1
1449
- * @maxLength 500
1450
- */
1451
- translatedTitle?: string | null;
1452
- }
1453
- interface CartSummary {
1454
- /**
1455
- * The Cart ID.
1456
- * @format GUID
1457
- */
1458
- cartId?: string;
1459
- /**
1460
- * A unique identifier for this specific cart calculation.
1461
- * @format GUID
1462
- */
1463
- calculationId?: string;
1464
- /**
1465
- * Summarized details for each line item in the cart.
1466
- * @maxSize 300
1467
- */
1468
- lineItems?: LineItemSummary[];
1469
- /**
1470
- * List of discounts applied to the cart.
1471
- * @maxSize 100
1472
- */
1473
- discounts?: Discount[];
1474
- /** Summary of the delivery costs. */
1475
- deliverySummary?: DeliverySummary;
1476
- /**
1477
- * List of additional fees applied to the cart.
1478
- * @maxSize 100
1479
- */
1480
- additionalFees?: V2AdditionalFee[];
1481
- /** Summary of tax calculations applied to the cart. */
1482
- taxSummary?: V2TaxSummary;
1483
- /** Summary of all calculated price components in the cart. */
1484
- priceSummary?: V2PriceSummary;
1485
- /** Payment details summarizing how the customer will pay for the order. */
1486
- paymentSummary?: PaymentSummary;
1487
- /**
1488
- * A token representing the Cart's calculated prices.
1489
- *
1490
- * The client can pass this token on place order to ensure that the
1491
- * prices the customer saw match the final prices at checkout.
1492
- *
1493
- * The server will validate the token if provided by recalculating the cart and comparing the
1494
- * resulting pricing token. If the validation fails, the checkout will be rejected.
1495
- *
1496
- * This mechanism protects against unexpected price changes or tampering between
1497
- * cart calculation and order placement.
1498
- *
1499
- * The token is opaque and should not be parsed or modified by clients.
1500
- * @maxLength 1024
1501
- */
1502
- priceVerificationToken?: string | null;
1503
- /**
1504
- * List of errors that occurred during the calculation process, returned by Totals Calculator.
1505
- * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1506
- */
1507
- calculationErrors?: V2CalculationErrors;
1508
- /**
1509
- * List of business 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)).
1510
- * TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
1511
- * @maxSize 100
1512
- */
1513
- spiViolations?: Violation[];
1514
- }
1515
- interface LineItemSummary {
1516
- /**
1517
- * Line item ID.
1518
- * @format GUID
1519
- */
1520
- lineItemId?: string;
1521
- /**
1522
- * The quantity of the line item.
1523
- * @min 1
1524
- * @max 100000
1525
- */
1526
- quantity?: number;
1527
- /**
1528
- * Final unit price after applying automatic discounts.
1529
- * Includes tax if `tax_summary.prices_include_tax` is true.
1530
- */
1531
- unitPrice?: ConvertedMoney;
1532
- /**
1533
- * Total price for the line item (unit price × quantity).
1534
- * Includes tax if `tax_summary.prices_include_tax` is true.
1535
- */
1536
- totalPrice?: ConvertedMoney;
1537
- }
1538
- interface DeliverySummary {
1539
- /** The calculated delivery method. */
1540
- method?: DeliveryMethod;
1541
- /**
1542
- * Delivery price after discount.
1543
- * Includes tax if `tax_summary.prices_include_tax` is true.
1544
- */
1545
- price?: ConvertedMoney;
1546
- }
1547
- interface V2AdditionalFee {
1548
- /**
1549
- * Additional fee's code.
1550
- * @minLength 1
1551
- * @maxLength 100
1552
- */
1553
- code?: string | null;
1554
- /** Additional fee's name. */
1555
- name?: TranslatableString;
1556
- /**
1557
- * Provider's app id.
1558
- * @minLength 1
1559
- * @maxLength 100
1560
- */
1561
- providerAppId?: string | null;
1562
- /**
1563
- * The line items associated with this fee.
1564
- * If the list is empty, the fee will be associated with the entire cart.
1565
- * @format GUID
1566
- * @maxSize 100
1567
- */
1568
- lineItemIds?: string[];
1569
- /**
1570
- * Additional fee's price.
1571
- * Includes tax if `tax_summary.prices_include_tax` is true.
1572
- */
1573
- price?: ConvertedMoney;
1574
- /**
1575
- * Number of subscription cycle this fee applies to.
1576
- * If None and discount is linked to subscription line item, it applies to all cycles.
1577
- * @min 1
1578
- * @max 999
1579
- */
1580
- subscriptionCycles?: number | null;
1581
- }
1582
- interface V2TaxSummary {
1583
- /**
1584
- * List of taxes applied to the cart.
1585
- * May contain multiple entries when advanced tax rates are configured by the merchant,
1586
- * or a single entry representing the total tax amount.
1587
- * For more details on advanced tax rates, read [this article](https://support.wix.com/en/article/setting-up-tax-calculation-using-the-manual-method#step-3-optional-customize-advanced-mode-settings).
1588
- * @maxSize 100
1589
- */
1590
- taxes?: Tax[];
1591
- /**
1592
- * Indicates whether tax is already included in prices (line items, discounts, delivery, additional fess).
1593
- * @readonly
1594
- */
1595
- pricesIncludeTax?: boolean;
1596
- /**
1597
- * Taxes applied to line items.
1598
- * @maxSize 300
1599
- */
1600
- lineItemTaxes?: LineItemTax[];
1601
- /** Tax applied to the delivery method. */
1602
- deliveryTax?: ConvertedMoney;
1603
- /**
1604
- * Taxes applied to additional fees.
1605
- * @maxSize 100
1606
- */
1607
- additionalFeeTaxes?: AdditionalFeeTax[];
1608
- }
1609
- interface Tax {
1610
- /** The name of the tax. */
1611
- name?: TranslatableString;
1612
- /** Amount for which tax is calculated. */
1613
- taxableAmount?: ConvertedMoney;
1614
- /** Amount that is exempt from tax. */
1615
- exemptAmount?: ConvertedMoney;
1616
- /**
1617
- * Tax rate %, as a decimal point between 0 and 1.
1618
- * @decimalValue options { gte:0, lte:1, maxScale:6 }
1619
- */
1620
- rate?: string | null;
1621
- /** Calculated tax, based on `taxable_amount` and `rate`. */
1622
- amount?: ConvertedMoney;
1623
- }
1624
- interface LineItemTax {
1625
- /**
1626
- * Line item ID.
1627
- * @format GUID
1628
- */
1629
- lineItemId?: string;
1630
- /** Tax amount applied to the additional fee. */
1631
- tax?: ConvertedMoney;
1632
- }
1633
- interface AdditionalFeeTax {
1634
- /**
1635
- * Additional fee's code.
1636
- * @minLength 1
1637
- * @maxLength 100
1638
- */
1639
- additionalFeeCode?: string;
1640
- /** Tax amount applied to the additional fee. */
1641
- tax?: ConvertedMoney;
1642
- }
1643
- interface V2PriceSummary {
1644
- /**
1645
- * Total price of all line items after applying item-level discounts.
1646
- * Includes tax if `tax_summary.prices_include_tax` is true.
1647
- */
1648
- subtotal?: ConvertedMoney;
1649
- /**
1650
- * Total cart-level discount applied to the subtotal.
1651
- * Line-item discounts are reflected in the subtotal and not included here.
1652
- * Currently supports only a single coupon.
1653
- */
1654
- discount?: ConvertedMoney;
1655
- /**
1656
- * Final delivery cost for the cart.
1657
- * Includes tax if `tax_summary.prices_include_tax` is true.
1658
- */
1659
- delivery?: ConvertedMoney;
1660
- /**
1661
- * Total additional fees associated with the cart.
1662
- * Includes tax if `tax_summary.prices_include_tax` is true.
1663
- */
1664
- additionalFees?: ConvertedMoney;
1665
- /** Total tax amount calculated across all applicable components (items, discounts, delivery, and fees). */
1666
- tax?: ConvertedMoney;
1667
- /** Total amount to be paid. */
1668
- total?: ConvertedMoney;
1669
- }
1670
- interface PaymentSummary {
1671
- /**
1672
- * The amount that will be deducted from each gift card added to the cart.
1673
- * Currently, only one gift card is supported.
1674
- * @maxSize 1
1675
- */
1676
- giftCards?: GiftCardSummary[];
1677
- /**
1678
- * A list of valid memberships that will be charged as part of the order.
1679
- * @maxSize 300
1680
- */
1681
- memberships?: V2Membership[];
1682
- /**
1683
- * Charges information for each subscription in the checkout.
1684
- * @maxSize 100
1685
- */
1686
- subscriptionCharges?: SubscriptionCharges[];
1687
- /** Indicates whether a remaining payment is required to create the order, after applying gift cards. */
1688
- requiresPaymentAfterGiftCard?: boolean;
1689
- /** The total amount due after applying all gift cards. */
1690
- totalAfterGiftCards?: ConvertedMoney;
1691
- /** The upfront amount to be charged immediately when placing the order (after applying gift cards). */
1692
- payNow?: ConvertedMoney;
1693
- /** The remaining amount to be collected later. */
1694
- payLater?: ConvertedMoney;
1695
- /** The amount to be charged after a free trial period (typically for subscription-based products). */
1696
- payAfterFreeTrial?: ConvertedMoney;
1697
- }
1698
- interface GiftCardSummary {
1699
- /**
1700
- * The ID of the gift card assigned by the Cart.
1701
- * @format GUID
1702
- */
1703
- giftCardId?: string;
1704
- /** The amount to be reduced from the gift card's balance. */
1705
- redeemAmount?: ConvertedMoney;
1706
- }
1707
- interface V2Membership {
1708
- /**
1709
- * Membership ID.
1710
- * @minLength 1
1711
- * @maxLength 100
1712
- */
1713
- _id?: string;
1714
- /**
1715
- * ID of the app providing this payment option.
1716
- * @format GUID
1717
- */
1718
- appId?: string;
1719
- /**
1720
- * IDs of the line items this membership applies to.
1721
- * @minSize 1
1722
- * @maxSize 300
1723
- * @minLength 1
1724
- * @maxLength 100
1725
- */
1726
- lineItemIds?: string[];
1727
- }
1728
- interface SubscriptionCharges {
1729
- /**
1730
- * ids of the items the subscription is defined on
1731
- * @format GUID
1732
- * @minSize 1
1733
- * @maxSize 300
1734
- */
1735
- lineItemIds?: string[];
1736
- /**
1737
- * Generated description explaining future charges amount and schedule.
1738
- * Translated to subscription order buyer language, or to site language if was not provided.
1739
- * @maxLength 1000
1740
- */
1741
- description?: string | null;
1742
- /**
1743
- * Charges for subscription.
1744
- * @maxSize 50
1745
- */
1746
- charges?: Charge[];
1747
- }
1748
- interface Charge {
1749
- /** The cycle number from which the charge starts. */
1750
- cycleFrom?: number;
1751
- /** The number of cycles for which the charge is applicable. */
1752
- cycleCount?: number | null;
1753
- /** Charge summary. */
1754
- priceSummary?: V2PriceSummary;
1755
- /** The billing date from which the charge starts. */
1756
- cycleBillingDate?: Date | null;
1757
- }
1758
- interface V2CalculationErrors extends V2CalculationErrorsShippingCalculationErrorOneOf {
1759
- /** General shipping calculation error. */
1760
- generalShippingCalculationError?: Details;
1761
- /** Carrier errors. */
1762
- carrierErrors?: V2CarrierErrors;
1763
- /** Tax calculation error. */
1764
- taxCalculationError?: Details;
1765
- /** Coupon calculation error. */
1766
- couponCalculationError?: Details;
1767
- /** Gift card calculation error. */
1768
- giftCardCalculationError?: Details;
1769
- /**
1770
- * Order validation errors.
1771
- * @maxSize 100
1772
- */
1773
- orderValidationErrors?: ApplicationError[];
1774
- /**
1775
- * Membership payment methods calculation errors
1776
- * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
1777
- */
1778
- membershipError?: Details;
1779
- /** Discount Rule calculation error. */
1780
- discountsCalculationError?: Details;
1781
- }
1782
- /** @oneof */
1783
- interface V2CalculationErrorsShippingCalculationErrorOneOf {
1784
- /** General shipping calculation error. */
1785
- generalShippingCalculationError?: Details;
1786
- /** Carrier errors. */
1787
- carrierErrors?: V2CarrierErrors;
1788
- }
1789
- interface Details extends DetailsKindOneOf {
1790
- applicationError?: ApplicationError;
1791
- validationError?: ValidationError;
1792
- systemError?: SystemError;
1793
- /**
1794
- * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
1795
- * @deprecated
1796
- */
1797
- tracing?: Record<string, string>;
1798
- }
1799
- /** @oneof */
1800
- interface DetailsKindOneOf {
1801
- applicationError?: ApplicationError;
1802
- validationError?: ValidationError;
1803
- systemError?: SystemError;
1804
- }
1805
- interface ApplicationError {
1806
- /** Error code. */
1807
- code?: string;
1808
- /** Description of the error. */
1809
- description?: string;
1810
- /** Data related to the error. */
1811
- data?: Record<string, any> | null;
1812
- }
1813
- /**
1814
- * example result:
1815
- * {
1816
- * "fieldViolations": [
1817
- * {
1818
- * "field": "fieldA",
1819
- * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
1820
- * "violatedRule": "OTHER",
1821
- * "ruleName": "INVALID_NOTE",
1822
- * "data": {
1823
- * "value": "FI"
1824
- * }
1825
- * },
1826
- * {
1827
- * "field": "fieldB",
1828
- * "description": "field value out of range. supported range: [0-20]",
1829
- * "violatedRule": "MAX",
1830
- * "data": {
1831
- * "threshold": 20
1832
- * }
1833
- * },
1834
- * {
1835
- * "field": "fieldC",
1836
- * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
1837
- * "violatedRule": "FORMAT",
1838
- * "data": {
1839
- * "type": "PHONE"
1840
- * }
1841
- * }
1842
- * ]
1843
- * }
1844
- */
1845
- interface ValidationError {
1846
- fieldViolations?: FieldViolation[];
1847
- }
1848
- declare enum RuleType {
1849
- VALIDATION = "VALIDATION",
1850
- OTHER = "OTHER",
1851
- MAX = "MAX",
1852
- MIN = "MIN",
1853
- MAX_LENGTH = "MAX_LENGTH",
1854
- MIN_LENGTH = "MIN_LENGTH",
1855
- MAX_SIZE = "MAX_SIZE",
1856
- MIN_SIZE = "MIN_SIZE",
1857
- FORMAT = "FORMAT",
1858
- DECIMAL_LTE = "DECIMAL_LTE",
1859
- DECIMAL_GTE = "DECIMAL_GTE",
1860
- DECIMAL_LT = "DECIMAL_LT",
1861
- DECIMAL_GT = "DECIMAL_GT",
1862
- DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
1863
- INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
1864
- REQUIRED_FIELD = "REQUIRED_FIELD",
1865
- FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
1866
- ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
1867
- EXACT_LENGTH = "EXACT_LENGTH",
1868
- EXACT_SIZE = "EXACT_SIZE",
1869
- REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1870
- }
1871
- /** @enumType */
1872
- type RuleTypeWithLiterals = RuleType | 'VALIDATION' | 'OTHER' | 'MAX' | 'MIN' | 'MAX_LENGTH' | 'MIN_LENGTH' | 'MAX_SIZE' | 'MIN_SIZE' | 'FORMAT' | 'DECIMAL_LTE' | 'DECIMAL_GTE' | 'DECIMAL_LT' | 'DECIMAL_GT' | 'DECIMAL_MAX_SCALE' | 'INVALID_ENUM_VALUE' | 'REQUIRED_FIELD' | 'FIELD_NOT_ALLOWED' | 'ONE_OF_ALIGNMENT' | 'EXACT_LENGTH' | 'EXACT_SIZE' | 'REQUIRED_ONE_OF_FIELD';
1873
- interface FieldViolation {
1874
- field?: string;
1875
- description?: string;
1876
- violatedRule?: RuleTypeWithLiterals;
1877
- /** applicable when violated_rule=OTHER */
1878
- ruleName?: string | null;
1879
- data?: Record<string, any> | null;
1880
- }
1881
- interface SystemError {
1882
- /** Error code. */
1883
- errorCode?: string | null;
1884
- }
1885
- interface V2CarrierErrors {
1886
- /**
1887
- * Carrier errors.
1888
- * @maxSize 100
1889
- */
1890
- errors?: V2CarrierError[];
1891
- }
1892
- interface V2CarrierError {
1893
- /**
1894
- * Carrier ID.
1895
- * @format GUID
1896
- */
1897
- carrierId?: string;
1898
- /** Error details. */
1899
- error?: Details;
1900
- }
1901
- interface Violation {
1902
- /** 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. */
1903
- severity?: SeverityWithLiterals;
1904
- /** Target location on a checkout or cart page where the violation will be displayed. */
1905
- target?: Target;
1906
- /**
1907
- * 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>`.
1908
- * @minLength 1
1909
- * @maxLength 1000
1910
- */
1911
- description?: string | null;
1912
- }
1913
- declare enum Severity {
1914
- /** The user is allowed to move forward in the flow. */
1915
- WARNING = "WARNING",
1916
- /**
1917
- * The user is blocked from moving forward in the flow.
1918
- * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
1919
- */
1920
- ERROR = "ERROR"
1921
- }
1922
- /** @enumType */
1923
- type SeverityWithLiterals = Severity | 'WARNING' | 'ERROR';
1924
- interface Target extends TargetTargetTypeOneOf {
1925
- /** General (other) violation. */
1926
- other?: Other;
1927
- /** Specific line item violation. */
1928
- lineItem?: LineItem;
1929
- }
1930
- /** @oneof */
1931
- interface TargetTargetTypeOneOf {
1932
- /** General (other) violation. */
1933
- other?: Other;
1934
- /** Specific line item violation. */
1935
- lineItem?: LineItem;
1936
- }
1937
- /** Available locations on the webpage */
1938
- declare enum NameInOther {
1939
- /** Default location, in case no specific location is specified. */
1940
- OTHER_DEFAULT = "OTHER_DEFAULT"
1941
- }
1942
- /** @enumType */
1943
- type NameInOtherWithLiterals = NameInOther | 'OTHER_DEFAULT';
1944
- /** Available locations on the line item */
1945
- declare enum NameInLineItem {
1946
- /** Default location, in case no specific location is specified. */
1947
- LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
1948
- }
1949
- /** @enumType */
1950
- type NameInLineItemWithLiterals = NameInLineItem | 'LINE_ITEM_DEFAULT';
1951
- declare enum SuggestedFix {
1952
- /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
1953
- UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
1954
- /** The line item should be removed from the cart or checkout to resolve the violation. */
1955
- REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
1956
- }
1957
- /** @enumType */
1958
- type SuggestedFixWithLiterals = SuggestedFix | 'UNKNOWN_SUGGESTED_FIX' | 'REMOVE_LINE_ITEM';
1959
- /** General (other) violation. */
1960
- interface Other {
1961
- /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
1962
- name?: NameInOtherWithLiterals;
1963
- }
1964
- /** Specific line item violation. */
1965
- interface LineItem {
1966
- /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
1967
- name?: NameInLineItemWithLiterals;
1968
- /** ID of the line item containing the violation. */
1969
- _id?: string | null;
1970
- }
1971
- interface CreateCurrentCartRequest {
1972
- /** Cart to be created. */
1973
- cart?: Cart;
1974
- /**
1975
- * A list of catalog items to add to the cart.
1976
- * @maxSize 300
1977
- */
1978
- catalogItems?: CatalogItemInput[];
1979
- /**
1980
- * A list of custom items to add to the cart.
1981
- * Custom line items don't trigger the Catalog service plugin.
1982
- *
1983
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
1984
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
1985
- * @maxSize 300
1986
- */
1987
- customItems?: CustomItemInput[];
1988
- /**
1989
- * Coupons to apply.
1990
- * Currently only one is supported.
1991
- * @maxSize 1
1992
- * @minLength 1
1993
- * @maxLength 50
1994
- */
1995
- couponCodes?: string[];
1996
- /** Delivery method to set. */
1997
- deliveryMethod?: DeliveryMethodInput;
1998
- /**
1999
- * Gift cards to add.
2000
- * Currently only one is support.
2001
- * @maxSize 1
2002
- * @minLength 8
2003
- * @maxLength 20
2004
- */
2005
- giftCardCodes?: string[];
2006
- }
2007
- interface CatalogItemInput {
2008
- /** A reference to the catalog item. */
2009
- catalogReference?: CatalogReference;
2010
- /**
2011
- * The amount of catalog items requested by the customer.
2012
- * @min 1
2013
- * @max 100000
2014
- */
2015
- quantity?: number;
2016
- /** Selected membership to be used as payment for this item. */
2017
- selectedMembership?: V2SelectedMembership;
2018
- /**
2019
- * Overriding values for catalog item properties.
2020
- * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2021
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2022
- */
2023
- catalogOverrideFields?: CatalogOverrideFields;
2024
- /**
2025
- * Custom extended fields for the line item object.
2026
- *
2027
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
2028
- */
2029
- extendedFields?: ExtendedFields;
2030
- /**
2031
- * ID of the app managing the inventory.
2032
- * @format GUID
2033
- */
2034
- inventoryAppId?: string | null;
2035
- }
2036
- interface CustomItemInput {
2037
- /** The name of the line item. */
2038
- name?: TranslatableString;
2039
- /** Quantity-related information about the line item. */
2040
- quantityInfo?: CustomItemQuantityInfo;
2041
- /** Pricing-related information about the line item. */
2042
- pricing?: CustomItemPricingInfo;
2043
- /** Information about the origin of the line item. */
2044
- source?: CustomItemSource;
2045
- /** Details about the item for display purposes. */
2046
- attributes?: CustomItemAttributes;
2047
- /** Delivery-related information about the line item. */
2048
- deliveryConfig?: CustomItemDeliveryConfig;
2049
- /** Tax-related information about the line item. */
2050
- taxConfig?: CustomItemTaxConfig;
2051
- /** Payment-related information about the line item. */
2052
- paymentConfig?: CustomItemPaymentConfig;
2053
- /**
2054
- * Modifier groups that were added to the item.
2055
- * @maxSize 25
2056
- */
2057
- modifierGroups?: ModifierGroup[];
2058
- }
2059
- interface CustomItemQuantityInfo {
2060
- /**
2061
- * The amount of items originally requested by the customer.
2062
- * @min 1
2063
- * @max 100000
2064
- */
2065
- requestedQuantity?: number;
2066
- /** The maximum quantity of items available for purchase. */
2067
- availableQuantity?: number | null;
2068
- /** Whether the line item quantity is fixed and cannot be changed. */
2069
- fixedQuantity?: boolean;
2070
- }
2071
- interface CustomItemPricingInfo {
2072
- /**
2073
- * Sale price of a single item, without modifiers.
2074
- * Includes tax if `tax_info.prices_include_tax` is true.
2075
- */
2076
- price?: ConvertedMoney;
2077
- /**
2078
- * Full price of a single item before any discounts, without modifiers.
2079
- * Defaults to `price` when not provided.
2080
- * Includes tax if `tax_info.prices_include_tax` is true.
2081
- */
2082
- fullPrice?: ConvertedMoney;
2083
- /**
2084
- * Additional description for the price.
2085
- * For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
2086
- */
2087
- priceDescription?: PriceDescription;
2088
- /** Indicates whether the price is not yet defined, and will be updated after the order is created. */
2089
- priceUndetermined?: boolean;
2090
- }
2091
- interface CustomItemSource {
2092
- /**
2093
- * Catalog and item reference.
2094
- * Holds IDs for the item and the catalog it came from, as well as further optional info.
2095
- * Optional for custom line items, which don't trigger the Catalog service plugin.
2096
- */
2097
- catalogReference?: CatalogReference;
2098
- /**
2099
- * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
2100
- * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
2101
- * + in most cases, this field is the same as `catalogReference.catalogItemId`.
2102
- * + Used in membership validation.
2103
- * @minLength 1
2104
- * @maxLength 36
2105
- */
2106
- rootCatalogItemId?: string | null;
2107
- /**
2108
- * ID of the app managing the inventory.
2109
- * @format GUID
2110
- */
2111
- inventoryAppId?: string | null;
2112
- }
2113
- interface CustomItemAttributes {
2114
- /**
2115
- * Description lines of the item.
2116
- * @maxSize 100
2117
- */
2118
- descriptionLines?: DescriptionLine[];
2119
- /** The image of the item. */
2120
- image?: string;
2121
- /** URL to the item's page on the site. */
2122
- url?: string;
2123
- /** Item type. Either a preset type or custom. */
2124
- itemType?: ItemType;
2125
- /**
2126
- * Physical properties of the item.
2127
- * When relevant, contains information such as SKU, item weight, and shippability.
2128
- */
2129
- physicalProperties?: PhysicalProperties;
2130
- /** Subscription option information. */
2131
- subscriptionInfo?: SubscriptionOptionInfo;
2132
- /** Service properties. When relevant, this contains information such as date and number of participants. */
2133
- serviceProperties?: ServiceProperties;
2134
- /**
2135
- * Whether the item can only be purchased by site members.
2136
- * Default: `false`
2137
- */
2138
- membersOnly?: boolean;
2139
- }
2140
- interface CustomItemDeliveryConfig {
2141
- /**
2142
- * Delivery profile ID.
2143
- * @format GUID
2144
- */
2145
- deliveryProfileId?: string | null;
2146
- }
2147
- interface CustomItemTaxConfig {
2148
- /** Address to use for tax calculation purposes. */
2149
- taxableAddress?: TaxableAddress;
2150
- /**
2151
- * Tax group ID for this line item.
2152
- * @maxLength 50
2153
- */
2154
- taxGroupId?: string | null;
2155
- }
2156
- interface CustomItemPaymentConfig {
2157
- /**
2158
- * Partial payment to be paid upfront during the checkout.
2159
- * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
2160
- */
2161
- depositAmount?: ConvertedMoney;
2162
- /**
2163
- * Type of selected payment option for current item.
2164
- *
2165
- * Default: `FULL_PAYMENT_ONLINE`
2166
- */
2167
- paymentOption?: PaymentOptionTypeWithLiterals;
2168
- }
2169
- interface DeliveryMethodInput {
2170
- /**
2171
- * Delivery method code.
2172
- * @maxLength 100
2173
- */
2174
- code?: string;
2175
- /**
2176
- * Carrier app id.
2177
- * @format GUID
2178
- */
2179
- appId?: string | null;
2180
- }
2181
- interface CreateCurrentCartResponse {
2182
- /** The created Cart. */
2183
- cart?: Cart;
2184
- }
2185
- interface GetCurrentCartRequest {
2186
- }
2187
- interface GetCurrentCartResponse {
2188
- /** The requested Cart. */
2189
- cart?: Cart;
2190
- }
2191
- interface UpdateCurrentCartRequest {
2192
- /** Cart to be updated, may be partial. */
2193
- cart: Cart;
2194
- }
2195
- interface UpdateCurrentCartResponse {
2196
- /** Updated Cart. */
2197
- cart?: Cart;
2198
- }
2199
- interface DeleteCurrentCartRequest {
2200
- }
2201
- interface DeleteCurrentCartResponse {
2202
- }
2203
- interface RefreshCurrentCartRequest {
2204
- }
2205
- interface RefreshCurrentCartResponse {
2206
- /** Synchronized Cart. */
2207
- cart?: Cart;
2208
- }
2209
- interface CalculateCurrentCartRequest {
2210
- /**
2211
- * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2212
- *
2213
- * Default: `false`
2214
- */
2215
- refreshCart?: boolean;
2216
- /**
2217
- * Specifies the level of **business validation** to perform during cart calculation,
2218
- * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2219
- */
2220
- validationsConfig?: ValidationsConfigWithLiterals;
2221
- /**
2222
- * Optional custom configuration for the calculation.
2223
- * If not provided, all price components are calculated by default.
2224
- */
2225
- customCalculationConfig?: CalculationConfig;
2226
- }
2227
- declare enum ValidationsConfig {
2228
- UNKNOWN_VALIDATIONS_CONFIG = "UNKNOWN_VALIDATIONS_CONFIG",
2229
- /** No business validations are performed. */
2230
- SKIP_VALIDATIONS = "SKIP_VALIDATIONS",
2231
- /** Perform cart-level business validations as defined by the service plugin implementer. */
2232
- PRE_CHECKOUT_VALIDATIONS = "PRE_CHECKOUT_VALIDATIONS",
2233
- /** Perform checkout-specific business validations as defined by the service plugin implementer. */
2234
- CHECKOUT_VALIDATIONS = "CHECKOUT_VALIDATIONS"
2235
- }
2236
- /** @enumType */
2237
- type ValidationsConfigWithLiterals = ValidationsConfig | 'UNKNOWN_VALIDATIONS_CONFIG' | 'SKIP_VALIDATIONS' | 'PRE_CHECKOUT_VALIDATIONS' | 'CHECKOUT_VALIDATIONS';
2238
- interface CalculationConfig {
2239
- /**
2240
- * Whether to calculate delivery costs.
2241
- * Default: false
2242
- */
2243
- calculateDelivery?: boolean;
2244
- /**
2245
- * Whether to calculate any additional fees.
2246
- * Default: false
2247
- */
2248
- calculateAdditionalFees?: boolean;
2249
- /**
2250
- * Whether to include tax calculation.
2251
- * Default: false
2252
- */
2253
- calculateTax?: boolean;
2254
- /**
2255
- * Whether to calculate the effect of gift card balances on the cart total.
2256
- * Gift cards are not redeemed - only reflected for estimation purposes.
2257
- * Default: false
2258
- */
2259
- calculateGiftCards?: boolean;
2260
- }
2261
- interface CalculateCurrentCartResponse {
2262
- /** The Cart that was calculated. */
2263
- cart?: Cart;
2264
- /** The calculation summary. */
2265
- summary?: CartSummary;
2266
- }
2267
- interface AddLineItemsToCurrentCartRequest {
2268
- /**
2269
- * A list of catalog items to add to the cart.
2270
- * @maxSize 300
2271
- */
2272
- catalogItems?: CatalogItemInput[];
2273
- /**
2274
- * A list of custom items to add to the cart.
2275
- * @maxSize 300
2276
- */
2277
- customItems?: CustomItemInput[];
2278
- }
2279
- interface AddLineItemsToCurrentCartResponse {
2280
- /** Updated Cart. */
2281
- cart?: Cart;
2282
- }
2283
- interface RemoveLineItemsFromCurrentCartRequest {
2284
- /**
2285
- * Line item IDs to remove from cart.
2286
- * @format GUID
2287
- * @minSize 1
2288
- * @maxSize 100
2289
- */
2290
- lineItemIds: string[];
2291
- }
2292
- interface RemoveLineItemsFromCurrentCartResponse {
2293
- /** Updated Cart. */
2294
- cart?: Cart;
2295
- }
2296
- interface UpdateLineItemsInCurrentCartRequest {
2297
- /**
2298
- * Line item updates to apply.
2299
- * @minSize 1
2300
- * @maxSize 100
2301
- */
2302
- lineItems?: LineItemUpdate[];
2303
- }
2304
- interface LineItemUpdate {
2305
- /**
2306
- * Line item ID to update.
2307
- * @format GUID
2308
- */
2309
- lineItemId?: string;
2310
- /** Quantity update (optional - if not provided, quantity is not updated) */
2311
- quantity?: QuantityUpdate;
2312
- /** Selected membership update (optional - if not provided, membership is not updated) */
2313
- selectedMembership?: SelectedMembershipUpdate;
2314
- }
2315
- interface QuantityUpdate {
2316
- /**
2317
- * The new quantity of the line item.
2318
- * @min 1
2319
- * @max 100000
2320
- */
2321
- newQuantity?: number;
2322
- }
2323
- interface SelectedMembershipUpdate {
2324
- /**
2325
- * The new selectedMembership of the item.
2326
- *
2327
- * To just remove current selected membership, and not replace with a new one, pass an empty value here.
2328
- */
2329
- newMembership?: V2SelectedMembership;
2330
- }
2331
- interface UpdateLineItemsInCurrentCartResponse {
2332
- /** Updated Cart. */
2333
- cart?: Cart;
2334
- }
2335
- interface AddCouponToCurrentCartRequest {
2336
- /**
2337
- * Coupon to apply.
2338
- *
2339
- * Currently only one is supported.
2340
- * @minLength 1
2341
- * @maxLength 50
2342
- */
2343
- couponCode: string;
2344
- }
2345
- interface AddCouponToCurrentCartResponse {
2346
- /** Updated Cart. */
2347
- cart?: Cart;
2348
- }
2349
- interface RemoveCouponFromCurrentCartRequest {
2350
- /**
2351
- * Coupon ID.
2352
- * @format GUID
2353
- */
2354
- couponId: string;
2355
- }
2356
- interface RemoveCouponFromCurrentCartResponse {
2357
- /** Updated Cart. */
2358
- cart?: Cart;
2359
- }
2360
- interface SetDeliveryMethodForCurrentCartRequest {
2361
- /** Delivery method. */
2362
- deliveryMethod: DeliveryMethodInput;
2363
- }
2364
- interface SetDeliveryMethodForCurrentCartResponse {
2365
- /** Updated Cart. */
2366
- cart?: Cart;
2367
- }
2368
- interface AddGiftCardToCurrentCartRequest {
2369
- /**
2370
- * Gift card code.
2371
- *
2372
- * Currently only one is supported.
2373
- * @maxLength 50
2374
- */
2375
- giftCardCode: string;
2376
- }
2377
- interface AddGiftCardToCurrentCartResponse {
2378
- /** Updated Cart. */
2379
- cart?: Cart;
2380
- }
2381
- interface RemoveGiftCardFromCurrentCartRequest {
2382
- /**
2383
- * Gift card ID.
2384
- * @format GUID
2385
- */
2386
- giftCardId: string;
2387
- }
2388
- interface RemoveGiftCardFromCurrentCartResponse {
2389
- /** Updated Cart. */
2390
- cart?: Cart;
2391
- }
2392
- interface UnmarkAsCurrentCartRequest {
2393
- }
2394
- interface UnmarkAsCurrentCartResponse {
2395
- /** Cart that was unmarked as current cart, if such existed. */
2396
- cart?: Cart;
2397
- }
2398
- interface DomainEvent extends DomainEventBodyOneOf {
2399
- createdEvent?: EntityCreatedEvent;
2400
- updatedEvent?: EntityUpdatedEvent;
2401
- deletedEvent?: EntityDeletedEvent;
2402
- actionEvent?: ActionEvent;
2403
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
2404
- _id?: string;
2405
- /**
2406
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
2407
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
2408
- */
2409
- entityFqdn?: string;
2410
- /**
2411
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
2412
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
2413
- */
2414
- slug?: string;
2415
- /** ID of the entity associated with the event. */
2416
- entityId?: string;
2417
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
2418
- eventTime?: Date | null;
2419
- /**
2420
- * Whether the event was triggered as a result of a privacy regulation application
2421
- * (for example, GDPR).
2422
- */
2423
- triggeredByAnonymizeRequest?: boolean | null;
2424
- /** If present, indicates the action that triggered the event. */
2425
- originatedFrom?: string | null;
2426
- /**
2427
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
2428
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
2429
- */
2430
- entityEventSequence?: string | null;
2431
- }
2432
- /** @oneof */
2433
- interface DomainEventBodyOneOf {
2434
- createdEvent?: EntityCreatedEvent;
2435
- updatedEvent?: EntityUpdatedEvent;
2436
- deletedEvent?: EntityDeletedEvent;
2437
- actionEvent?: ActionEvent;
2438
- }
2439
- interface EntityCreatedEvent {
2440
- entity?: string;
2441
- }
2442
- interface RestoreInfo {
2443
- deletedDate?: Date | null;
2444
- }
2445
- interface EntityUpdatedEvent {
2446
- /**
2447
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
2448
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
2449
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
2450
- */
2451
- currentEntity?: string;
2452
- }
2453
- interface EntityDeletedEvent {
2454
- /** Entity that was deleted. */
2455
- deletedEntity?: string | null;
2456
- }
2457
- interface ActionEvent {
2458
- body?: string;
2459
- }
2460
- interface MessageEnvelope {
2461
- /**
2462
- * App instance ID.
2463
- * @format GUID
2464
- */
2465
- instanceId?: string | null;
2466
- /**
2467
- * Event type.
2468
- * @maxLength 150
2469
- */
2470
- eventType?: string;
2471
- /** The identification type and identity data. */
2472
- identity?: IdentificationData;
2473
- /** Stringify payload. */
2474
- data?: string;
2475
- }
2476
- interface IdentificationData extends IdentificationDataIdOneOf {
2477
- /**
2478
- * ID of a site visitor that has not logged in to the site.
2479
- * @format GUID
2480
- */
2481
- anonymousVisitorId?: string;
2482
- /**
2483
- * ID of a site visitor that has logged in to the site.
2484
- * @format GUID
2485
- */
2486
- memberId?: string;
2487
- /**
2488
- * ID of a Wix user (site owner, contributor, etc.).
2489
- * @format GUID
2490
- */
2491
- wixUserId?: string;
2492
- /**
2493
- * ID of an app.
2494
- * @format GUID
2495
- */
2496
- appId?: string;
2497
- /** @readonly */
2498
- identityType?: WebhookIdentityTypeWithLiterals;
2499
- }
2500
- /** @oneof */
2501
- interface IdentificationDataIdOneOf {
2502
- /**
2503
- * ID of a site visitor that has not logged in to the site.
2504
- * @format GUID
2505
- */
2506
- anonymousVisitorId?: string;
2507
- /**
2508
- * ID of a site visitor that has logged in to the site.
2509
- * @format GUID
2510
- */
2511
- memberId?: string;
2512
- /**
2513
- * ID of a Wix user (site owner, contributor, etc.).
2514
- * @format GUID
2515
- */
2516
- wixUserId?: string;
2517
- /**
2518
- * ID of an app.
2519
- * @format GUID
2520
- */
2521
- appId?: string;
2522
- }
2523
- declare enum WebhookIdentityType {
2524
- UNKNOWN = "UNKNOWN",
2525
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2526
- MEMBER = "MEMBER",
2527
- WIX_USER = "WIX_USER",
2528
- APP = "APP"
2529
- }
2530
- /** @enumType */
2531
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
2532
- interface CreateCartRequest {
2533
- /** Cart to be created. */
2534
- cart?: Cart;
2535
- /**
2536
- * A list of catalog items to add to the cart.
2537
- * @maxSize 300
2538
- */
2539
- catalogItems?: CatalogItemInput[];
2540
- /**
2541
- * A list of custom items to add to the cart.
2542
- * Custom line items don't trigger the Catalog service plugin.
2543
- *
2544
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2545
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2546
- * @maxSize 300
2547
- */
2548
- customItems?: CustomItemInput[];
2549
- /**
2550
- * Coupons to apply.
2551
- * Currently only one is supported.
2552
- * @maxSize 1
2553
- * @minLength 1
2554
- * @maxLength 50
2555
- */
2556
- couponCodes?: string[];
2557
- /** Delivery method to set. */
2558
- deliveryMethod?: DeliveryMethodInput;
2559
- /**
2560
- * Gift cards to add.
2561
- * Currently only one is support.
2562
- * @maxSize 1
2563
- * @minLength 8
2564
- * @maxLength 20
2565
- */
2566
- giftCardCodes?: string[];
2567
- }
2568
- interface CreateCartResponse {
2569
- /** The created Cart. */
2570
- cart?: Cart;
2571
- }
2572
- interface GetCartRequest {
2573
- /**
2574
- * ID of the Cart to retrieve.
2575
- * @format GUID
2576
- */
2577
- cartId?: string;
2578
- }
2579
- interface GetCartResponse {
2580
- /** The requested Cart. */
2581
- cart?: Cart;
2582
- }
2583
- /** temp for client testing */
2584
- interface DummyErrorDataMethodLevel {
2585
- /** This is a dummy field. */
2586
- invalidItems?: LineItemIdentifier[];
2587
- /** The fresh cart after resolving the error. */
2588
- freshCart?: Cart;
2589
- /** dummy string */
2590
- dummyMethod?: string;
2591
- }
2592
- interface LineItemIdentifier extends LineItemIdentifierIdOneOf {
2593
- /**
2594
- * Line Item ID.
2595
- * @format GUID
2596
- */
2597
- lineItemId?: string;
2598
- /** Catalog reference. */
2599
- catalogReference?: CatalogReference;
2600
- }
2601
- /** @oneof */
2602
- interface LineItemIdentifierIdOneOf {
2603
- /**
2604
- * Line Item ID.
2605
- * @format GUID
2606
- */
2607
- lineItemId?: string;
2608
- /** Catalog reference. */
2609
- catalogReference?: CatalogReference;
2610
- }
2611
- interface UpdateCartRequest {
2612
- /** Cart to be updated, may be partial. */
2613
- cart?: Cart;
2614
- }
2615
- interface UpdateCartResponse {
2616
- /** Updated Cart. */
2617
- cart?: Cart;
2618
- }
2619
- interface DeleteCartRequest {
2620
- /**
2621
- * ID of the Cart to delete.
2622
- * @format GUID
2623
- */
2624
- cartId?: string;
2625
- }
2626
- interface DeleteCartResponse {
2627
- }
2628
- interface RefreshCartRequest {
2629
- /**
2630
- * ID of the Cart to refresh.
2631
- * @format GUID
2632
- */
2633
- cartId?: string;
2634
- }
2635
- interface RefreshCartResponse {
2636
- /** Synchronized Cart. */
2637
- cart?: Cart;
2638
- }
2639
- interface CalculateCartRequest {
2640
- /**
2641
- * ID of the Cart to calculate.
2642
- * @format GUID
2643
- */
2644
- cartId?: string;
2645
- /**
2646
- * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2647
- *
2648
- * Default: `false`
2649
- */
2650
- refreshCart?: boolean;
2651
- /**
2652
- * Specifies the level of **business validation** to perform during cart calculation,
2653
- * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2654
- */
2655
- validationsConfig?: ValidationsConfigWithLiterals;
2656
- /**
2657
- * Optional custom configuration for the calculation.
2658
- * If not provided, all price components are calculated by default.
2659
- */
2660
- customCalculationConfig?: CalculationConfig;
2661
- }
2662
- interface CalculateCartResponse {
2663
- /** The Cart that was calculated. */
2664
- cart?: Cart;
2665
- /** The calculation summary. */
2666
- summary?: CartSummary;
2667
- }
2668
- interface CalculateCartForV1Request {
2669
- /**
2670
- * ID of the Cart to calculate.
2671
- * @format GUID
2672
- */
2673
- cartId?: string;
2674
- /**
2675
- * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
2676
- *
2677
- * Default: `false`
2678
- */
2679
- refreshCart?: boolean;
2680
- /**
2681
- * Specifies the level of **business validation** to perform during cart calculation,
2682
- * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2683
- */
2684
- validationsConfig?: ValidationsConfigWithLiterals;
2685
- /**
2686
- * Optional custom configuration for the calculation.
2687
- * If not provided, all price components are calculated by default.
2688
- */
2689
- customCalculationConfig?: CalculationConfig;
2690
- /**
2691
- * The stage at which the checkout was called.
2692
- * This field is legacy and currently used by PayLinks and plan to be deprecated
2693
- */
2694
- checkoutStage?: Stage;
2695
- }
2696
- interface Stage extends StageStagesOneOf {
2697
- /** Supported values: */
2698
- checkoutStage?: CheckoutStageWithLiterals;
2699
- }
2700
- /** @oneof */
2701
- interface StageStagesOneOf {
2702
- /** Supported values: */
2703
- checkoutStage?: CheckoutStageWithLiterals;
2704
- }
2705
- declare enum CheckoutStage {
2706
- /** Not implemented. */
2707
- UNKNOWN_CHECKOUT_STAGE = "UNKNOWN_CHECKOUT_STAGE",
2708
- /**
2709
- * Deprecated.
2710
- * Used during the initialization of the checkout (Create Checkout).
2711
- */
2712
- INITIALIZATION = "INITIALIZATION",
2713
- /** Used during the checkout process, such as updating or retrieving the checkout. */
2714
- IN_PROGRESS = "IN_PROGRESS",
2715
- /** Used during the creation of an order from the checkout. */
2716
- ORDER_CREATION = "ORDER_CREATION"
2717
- }
2718
- /** @enumType */
2719
- type CheckoutStageWithLiterals = CheckoutStage | 'UNKNOWN_CHECKOUT_STAGE' | 'INITIALIZATION' | 'IN_PROGRESS' | 'ORDER_CREATION';
2720
- interface CalculateCartForV1Response {
2721
- /** The Cart that was calculated. */
2722
- cart?: Cart;
2723
- /** The calculation summary. */
2724
- summary?: CartSummary;
2725
- /**
2726
- * Totals payload used for backward compatibility with legacy clients.
2727
- * Used by the Cart and Checkout proxies.
2728
- */
2729
- totalsResponse?: CalculateTotalsResponse;
2730
- }
2731
- interface CalculateTotalsResponse {
2732
- /** Calculate line items. */
2733
- calculatedLineItems?: CalculatedLineItem[];
2734
- /** Price summary. */
2735
- priceSummary?: PriceSummary;
2736
- /** Details of applied gift card. */
2737
- giftCard?: GiftCard;
2738
- /** Tax summary. */
2739
- taxSummary?: TaxSummary;
2740
- /** Shipping information. */
2741
- shippingInfo?: ShippingInformation;
2742
- /**
2743
- * Applied discounts.
2744
- * @maxSize 320
2745
- */
2746
- appliedDiscounts?: AppliedDiscount[];
2747
- /** Calculation errors. */
2748
- calculationErrors?: CalculationErrors;
2749
- /** Weight unit. */
2750
- weightUnit?: WeightUnitWithLiterals;
2751
- /**
2752
- * The business’s default currency. Used for price calculations.
2753
- * This represents the base currency configured for the site and remains constant regardless of the [customer’s currency selection](https://support.wix.com/en/article/multicurrency-an-overview).
2754
- * @format CURRENCY
2755
- */
2756
- currency?: string;
2757
- /**
2758
- * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview). Used for converted price calculations.
2759
- * This reflects the customer’s preferred currency and may differ from the site’s default currency.
2760
- * @readonly
2761
- * @format CURRENCY
2762
- */
2763
- conversionCurrency?: string;
2764
- /** Whether tax is included in price. */
2765
- taxIncludedInPrice?: boolean;
2766
- /**
2767
- * Minimal amount to pay in order to place the order.
2768
- * @readonly
2769
- */
2770
- payNow?: PriceSummary;
2771
- /**
2772
- * Remaining amount for the order to be fully paid.
2773
- * @readonly
2774
- */
2775
- payLater?: PriceSummary;
2776
- /** Information about valid and invalid memberships, and which ones are selected for usage. */
2777
- membershipOptions?: MembershipOptions;
2778
- /**
2779
- * Additional Fees
2780
- * @maxSize 100
2781
- */
2782
- additionalFees?: AdditionalFee[];
2783
- /**
2784
- * The site currency.
2785
- * @readonly
2786
- * @format CURRENCY
2787
- * @deprecated The site currency.
2788
- * @replacedBy currency
2789
- * @targetRemovalDate 2026-01-30
2790
- */
2791
- siteCurrency?: string;
2792
- /**
2793
- * The rate used when converting from the site currency to the checkout currency.
2794
- * @readonly
2795
- * @decimalValue options { gt:0, lte:1000000000000000 }
2796
- */
2797
- checkoutConversionRate?: string | null;
2798
- /**
2799
- * The pay now total amount after the gift card is applied.
2800
- * @readonly
2801
- */
2802
- payNowTotalAfterGiftCard?: MultiCurrencyPrice;
2803
- /**
2804
- * The total amount after gift card is applied.
2805
- * @readonly
2806
- */
2807
- totalAfterGiftCard?: MultiCurrencyPrice;
2808
- /**
2809
- * Payment for subscriptions after free trial period.
2810
- * @readonly
2811
- */
2812
- payAfterFreeTrial?: PriceSummary;
2813
- }
2814
- interface CalculatedLineItem {
2815
- /** Line item ID. */
2816
- lineItemId?: string;
2817
- /** Price breakdown for this line item. */
2818
- pricesBreakdown?: LineItemPricesData;
2819
- /**
2820
- * Type of selected payment option for current item. Supported values:
2821
- * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout
2822
- * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout
2823
- * + `"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
2824
- * + `"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.
2825
- */
2826
- paymentOption?: PaymentOptionTypeWithLiterals;
2827
- /** tax calculation address. */
2828
- taxableAddress?: TaxableAddress;
2829
- }
2830
- interface LineItemPricesData {
2831
- /** Total price after discounts, tax, and modifiers. */
2832
- totalPriceAfterTax?: MultiCurrencyPrice;
2833
- /** Total price after discounts and modifiers, and before tax. */
2834
- totalPriceBeforeTax?: MultiCurrencyPrice;
2835
- /** Tax details. */
2836
- taxDetails?: ItemTaxFullDetails;
2837
- /** Total discount applied for the line item. */
2838
- totalDiscount?: MultiCurrencyPrice;
2839
- /** Catalog price after catalog-defined discount, automatic discounts, and modifiers. */
2840
- price?: MultiCurrencyPrice;
2841
- /**
2842
- * Item price before automatic discounts, coupons, and global discounts; after catalog-defined discounts and modifiers.
2843
- * Defaults to `price` when not provided.
2844
- */
2845
- priceBeforeDiscounts?: MultiCurrencyPrice;
2846
- /** Total line item price after catalog-defined discounts, automatic discounts, and modifiers. */
2847
- lineItemPrice?: MultiCurrencyPrice;
2848
- /**
2849
- * Item price before all discounts and modifiers.
2850
- * Defaults to `price` when not provided.
2851
- */
2852
- fullPrice?: MultiCurrencyPrice;
2853
- /**
2854
- * Partial payment to be paid upfront during the checkout.
2855
- * Applies to catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
2856
- */
2857
- depositAmount?: MultiCurrencyPrice;
2858
- }
2859
- interface MultiCurrencyPrice {
2860
- /**
2861
- * Amount.
2862
- * @decimalValue options { gte:0, lte:1000000000000000 }
2863
- */
2864
- amount?: string;
2865
- /**
2866
- * Converted amount.
2867
- * @readonly
2868
- * @decimalValue options { gte:0, lte:1000000000000000 }
2869
- */
2870
- convertedAmount?: string;
2871
- /**
2872
- * Amount formatted with currency symbol.
2873
- * @readonly
2874
- */
2875
- formattedAmount?: string;
2876
- /**
2877
- * Converted amount formatted with currency symbol.
2878
- * @readonly
2879
- */
2880
- formattedConvertedAmount?: string;
2881
- }
2882
- interface ItemTaxFullDetails {
2883
- /** Amount for which tax is calculated. */
2884
- taxableAmount?: MultiCurrencyPrice;
2885
- /**
2886
- * Tax rate %, as a decimal point between 0 and 1.
2887
- * @decimalValue options { gte:0, lte:1, maxScale:6 }
2888
- */
2889
- taxRate?: string;
2890
- /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
2891
- totalTax?: MultiCurrencyPrice;
2892
- /**
2893
- * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
2894
- * @readonly
2895
- * @deprecated
2896
- */
2897
- rateBreakdown?: TaxRateBreakdown[];
2898
- /**
2899
- * tax information for a line item.
2900
- * @maxSize 1000
2901
- * @readonly
2902
- */
2903
- taxBreakdown?: TaxBreakdown[];
2904
- }
2905
- interface TaxRateBreakdown {
2906
- /**
2907
- * Name of tax against which the calculation was performed.
2908
- * @maxLength 100
2909
- */
2910
- name?: string;
2911
- /**
2912
- * Rate at which this tax detail was calculated.
2913
- * @decimalValue options { gte:0, lte:1, maxScale:6 }
2914
- */
2915
- rate?: string;
2916
- /** Amount of tax for this tax detail. */
2917
- tax?: MultiCurrencyPrice;
2918
- }
2919
- /**
2920
- * TaxBreakdown represents tax information for a line item.
2921
- * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
2922
- */
2923
- interface TaxBreakdown {
2924
- /**
2925
- * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
2926
- * @maxLength 200
2927
- */
2928
- jurisdiction?: string | null;
2929
- /** The amount of this line item price that was considered nontaxable. (Decimal value) */
2930
- nonTaxableAmount?: MultiCurrencyPrice;
2931
- /**
2932
- * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
2933
- * @decimalValue options { gte:0, maxScale:6 }
2934
- */
2935
- rate?: string | null;
2936
- /** The amount of tax estimated for this line item. (Decimal value) */
2937
- taxAmount?: MultiCurrencyPrice;
2938
- /** The taxable amount of this line item. */
2939
- taxableAmount?: MultiCurrencyPrice;
2940
- /**
2941
- * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
2942
- * @maxLength 200
2943
- */
2944
- taxType?: string | null;
2945
- /**
2946
- * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
2947
- * This name should be explicit enough to allow the merchant to understand what tax was calculated.
2948
- * @maxLength 200
2949
- */
2950
- taxName?: string | null;
2951
- /** The type of the jurisdiction in which this tax detail applies. */
2952
- jurisdictionType?: JurisdictionTypeWithLiterals;
2953
- }
2954
- /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
2955
- declare enum JurisdictionType {
2956
- UNDEFINED = "UNDEFINED",
2957
- COUNTRY = "COUNTRY",
2958
- STATE = "STATE",
2959
- COUNTY = "COUNTY",
2960
- CITY = "CITY",
2961
- SPECIAL = "SPECIAL"
2962
- }
2963
- /** @enumType */
2964
- type JurisdictionTypeWithLiterals = JurisdictionType | 'UNDEFINED' | 'COUNTRY' | 'STATE' | 'COUNTY' | 'CITY' | 'SPECIAL';
2965
- interface CalculatedItemModifier {
2966
- /**
2967
- * Modifier ID.
2968
- * @minLength 1
2969
- * @maxLength 36
2970
- */
2971
- _id?: string;
2972
- /**
2973
- * ID of the group this modifier belongs to.
2974
- * @minLength 1
2975
- * @maxLength 36
2976
- */
2977
- groupId?: string;
2978
- /**
2979
- * Modifier price.
2980
- * @readonly
2981
- */
2982
- price?: MultiCurrencyPrice;
2983
- }
2984
- interface PriceSummary {
2985
- /** Subtotal of all line items, before discounts and before tax. */
2986
- subtotal?: MultiCurrencyPrice;
2987
- /** Total shipping price, before discounts and before tax. */
2988
- shipping?: MultiCurrencyPrice;
2989
- /** Total tax. */
2990
- tax?: MultiCurrencyPrice;
2991
- /** Total calculated discount value. */
2992
- discount?: MultiCurrencyPrice;
2993
- /** Total price after discounts, gift cards, and tax. */
2994
- total?: MultiCurrencyPrice;
2995
- /** Total additional fees price before tax. */
2996
- additionalFees?: MultiCurrencyPrice;
2997
- }
2998
- interface GiftCard {
2999
- /**
3000
- * Gift Card ID.
3001
- * @deprecated
3002
- */
3003
- _id?: string;
3004
- /** Gift card obfuscated code. */
3005
- obfuscatedCode?: string;
3006
- /** Actual amount to be redeemed from the gift card. */
3007
- amount?: MultiCurrencyPrice;
3008
- /**
3009
- * App ID of the gift card provider.
3010
- * @format GUID
3011
- */
3012
- appId?: string;
3013
- /**
3014
- * External ID in the gift card provider's system.
3015
- * Used for integration and tracking across different platforms.
3016
- * @minLength 1
3017
- * @maxLength 50
3018
- */
3019
- externalId?: string | null;
3020
- /** Requested amount to redeem from the gift card. */
3021
- requestedAmount?: MultiCurrencyPrice;
3022
- }
3023
- interface TaxSummary {
3024
- /**
3025
- * Amount for which tax is calculated, added from line items.
3026
- * @readonly
3027
- */
3028
- taxableAmount?: MultiCurrencyPrice;
3029
- /**
3030
- * Calculated tax, added from line items.
3031
- * @readonly
3032
- */
3033
- totalTax?: MultiCurrencyPrice;
3034
- /**
3035
- * Tax calculator that was active when the order was created.
3036
- * @deprecated
3037
- */
3038
- calculationDetails?: TaxCalculationDetails;
3039
- }
3040
- interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
3041
- /** Reason the manual calculation was used. */
3042
- manualRateReason?: ManualCalculationReasonWithLiterals;
3043
- /** Details of the fallback rate calculation. */
3044
- autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
3045
- /** Rate calculation type. */
3046
- rateType?: RateTypeWithLiterals;
3047
- }
3048
- /** @oneof */
3049
- interface TaxCalculationDetailsCalculationDetailsOneOf {
3050
- /** Reason the manual calculation was used. */
3051
- manualRateReason?: ManualCalculationReasonWithLiterals;
3052
- /** Details of the fallback rate calculation. */
3053
- autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
3054
- }
3055
- declare enum RateType {
3056
- /** no tax being collected for this request due to location of purchase */
3057
- NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
3058
- /** manual rate used for calculation */
3059
- MANUAL_RATE = "MANUAL_RATE",
3060
- /** autotax rate used for calculation */
3061
- AUTO_RATE = "AUTO_RATE",
3062
- /** fallback rate used for calculation */
3063
- FALLBACK_RATE = "FALLBACK_RATE"
3064
- }
3065
- /** @enumType */
3066
- type RateTypeWithLiterals = RateType | 'NO_TAX_COLLECTED' | 'MANUAL_RATE' | 'AUTO_RATE' | 'FALLBACK_RATE';
3067
- declare enum ManualCalculationReason {
3068
- /** user set calculator in Business Manager to be Manual */
3069
- GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
3070
- /** specific region is on manual even though Global setting is Auto-tax */
3071
- REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
3072
- }
3073
- /** @enumType */
3074
- type ManualCalculationReasonWithLiterals = ManualCalculationReason | 'GLOBAL_SETTING_TO_MANUAL' | 'REGION_SETTING_TO_MANUAL';
3075
- interface AutoTaxFallbackCalculationDetails {
3076
- /** reason for fallback */
3077
- fallbackReason?: FallbackReasonWithLiterals;
3078
- /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
3079
- error?: ApplicationError;
3080
- }
3081
- declare enum FallbackReason {
3082
- /** auto-tax failed to be calculated */
3083
- AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
3084
- /** auto-tax was temporarily deactivated on a system-level */
3085
- AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
3086
- }
3087
- /** @enumType */
3088
- type FallbackReasonWithLiterals = FallbackReason | 'AUTO_TAX_FAILED' | 'AUTO_TAX_DEACTIVATED';
3089
- /**
3090
- * 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.
3091
- * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
3092
- */
3093
- interface AggregatedTaxBreakdown {
3094
- /**
3095
- * The name of the tax against which this tax amount was calculated.
3096
- * @maxLength 200
3097
- */
3098
- taxName?: string;
3099
- /**
3100
- * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
3101
- * @maxLength 200
3102
- */
3103
- taxType?: string;
3104
- /**
3105
- * The name of the jurisdiction in which this tax detail applies.
3106
- * @maxLength 200
3107
- */
3108
- jurisdiction?: string;
3109
- /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
3110
- jurisdictionTypeEnum?: JurisdictionTypeWithLiterals;
3111
- /**
3112
- * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
3113
- * @decimalValue options { gte:0, maxScale:6 }
3114
- */
3115
- rate?: string;
3116
- /** The sum of all the tax from line items that calculated by the tax identifiers. */
3117
- aggregatedTaxAmount?: MultiCurrencyPrice;
3118
- /** The sum of all the taxable amount from line items for tax identifiers. */
3119
- aggregatedTaxableAmount?: MultiCurrencyPrice;
3120
- }
3121
- interface ShippingInformation {
3122
- /** Shipping region. */
3123
- region?: ShippingRegion;
3124
- /** Selected shipping option. */
3125
- selectedCarrierServiceOption?: SelectedCarrierServiceOption;
3126
- /** All shipping options. */
3127
- carrierServiceOptions?: CarrierServiceOption[];
3128
- }
3129
- interface ShippingRegion {
3130
- /**
3131
- * Shipping region ID.
3132
- * @format GUID
3133
- * @readonly
3134
- */
3135
- _id?: string;
3136
- /**
3137
- * Shipping region name.
3138
- * @maxLength 100
3139
- */
3140
- name?: string;
3141
- }
3142
- interface SelectedCarrierServiceOption {
3143
- /**
3144
- * Unique identifier of selected option. For example, "usps_std_overnight".
3145
- * @maxLength 100
3146
- */
3147
- code?: string;
3148
- /**
3149
- * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
3150
- * For example, "Standard" or "First-Class Package International".
3151
- * @maxLength 250
3152
- * @readonly
3153
- */
3154
- title?: string;
3155
- /**
3156
- * Delivery logistics.
3157
- * @readonly
3158
- */
3159
- logistics?: DeliveryLogistics;
3160
- /**
3161
- * Shipping costs.
3162
- * @readonly
3163
- */
3164
- cost?: SelectedCarrierServiceOptionPrices;
3165
- /**
3166
- * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
3167
- * @readonly
3168
- */
3169
- requestedShippingOption?: boolean;
3170
- /**
3171
- * Other charges
3172
- * @deprecated Other charges
3173
- * @replacedBy additional_fees
3174
- * @targetRemovalDate 2025-10-01
3175
- */
3176
- otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
3177
- /**
3178
- * This carrier's unique ID
3179
- * @format GUID
3180
- */
3181
- carrierId?: string | null;
3182
- /**
3183
- * Delivery solution allocations to different delivery carriers and delivery regions
3184
- * @maxSize 300
3185
- */
3186
- deliveryAllocations?: DeliveryAllocation[];
3187
- /** If the delivery solution is a partial and doesn't apply to all items. */
3188
- partial?: boolean | null;
3189
- }
3190
- interface DeliveryLogistics {
3191
- /**
3192
- * Expected delivery time, in free text. For example, "3-5 business days".
3193
- * @maxLength 500
3194
- */
3195
- deliveryTime?: string | null;
3196
- /**
3197
- * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
3198
- * @maxLength 1000
3199
- */
3200
- instructions?: string | null;
3201
- /** Pickup details. */
3202
- pickupDetails?: PickupDetails;
3203
- }
3204
- interface PickupDetails {
3205
- /** Pickup address. */
3206
- address?: Address;
3207
- /**
3208
- * Whether the pickup address is that of a business - this may effect tax calculation.
3209
- * @deprecated
3210
- */
3211
- businessLocation?: boolean;
3212
- /** Pickup method */
3213
- pickupMethod?: PickupMethodWithLiterals;
3214
- }
3215
- declare enum PickupMethod {
3216
- UNKNOWN_METHOD = "UNKNOWN_METHOD",
3217
- STORE_PICKUP = "STORE_PICKUP",
3218
- PICKUP_POINT = "PICKUP_POINT"
3219
- }
3220
- /** @enumType */
3221
- type PickupMethodWithLiterals = PickupMethod | 'UNKNOWN_METHOD' | 'STORE_PICKUP' | 'PICKUP_POINT';
3222
- interface DeliveryTimeSlot {
3223
- /** starting time of the delivery time slot */
3224
- from?: Date | null;
3225
- /** ending time of the delivery time slot */
3226
- to?: Date | null;
3227
- }
3228
- interface SelectedCarrierServiceOptionPrices {
3229
- /** Total shipping price, after discount and after tax. */
3230
- totalPriceAfterTax?: MultiCurrencyPrice;
3231
- /** Total price of shipping after discounts (when relevant), and before tax. */
3232
- totalPriceBeforeTax?: MultiCurrencyPrice;
3233
- /** Tax details. */
3234
- taxDetails?: ItemTaxFullDetails;
3235
- /** Shipping discount before tax. */
3236
- totalDiscount?: MultiCurrencyPrice;
3237
- /** Shipping price before discount and before tax. */
3238
- price?: MultiCurrencyPrice;
3239
- }
3240
- interface SelectedCarrierServiceOptionOtherCharge {
3241
- /** Type of additional cost. */
3242
- type?: ChargeTypeWithLiterals;
3243
- /**
3244
- * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
3245
- * @maxLength 200
3246
- */
3247
- details?: string | null;
3248
- /** Price of added charge. */
3249
- cost?: SelectedCarrierServiceOptionPrices;
3250
- }
3251
- declare enum ChargeType {
3252
- HANDLING_FEE = "HANDLING_FEE",
3253
- INSURANCE = "INSURANCE"
3254
- }
3255
- /** @enumType */
3256
- type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE' | 'INSURANCE';
3257
- interface DeliveryAllocation {
3258
- /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
3259
- deliveryCarrier?: Carrier;
3260
- /** The delivery region that are relevant for this delivery solution. */
3261
- deliveryRegion?: Region;
3262
- /** Populated if the delivery solution is a partially supplied by this carrier. */
3263
- applicableLineItems?: ApplicableLineItems;
3264
- }
3265
- interface Carrier {
3266
- /**
3267
- * The carrier app id
3268
- * @format GUID
3269
- */
3270
- appId?: string | null;
3271
- /**
3272
- * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
3273
- * @maxLength 250
3274
- */
3275
- code?: string;
3276
- }
3277
- interface Region {
3278
- /**
3279
- * The delivery region id.
3280
- * @format GUID
3281
- */
3282
- _id?: string | null;
3283
- /**
3284
- * The delivery region name.
3285
- * @maxLength 100
3286
- */
3287
- name?: string | null;
3288
- }
3289
- interface ApplicableLineItems {
3290
- /**
3291
- * Line items that the delivery solution is for.
3292
- * @maxSize 300
3293
- * @minLength 1
3294
- * @maxLength 100
3295
- */
3296
- lineItemIds?: string[];
3297
- }
3298
- interface CarrierServiceOption {
3299
- /**
3300
- * Carrier ID.
3301
- * @format GUID
3302
- */
3303
- carrierId?: string;
3304
- /** Shipping options offered by this carrier for this request. */
3305
- shippingOptions?: ShippingOption[];
3306
- }
3307
- interface ShippingOption {
3308
- /**
3309
- * Unique code of provided shipping option like "usps_std_overnight".
3310
- * For legacy calculators this would be the UUID of the option.
3311
- * @maxLength 100
3312
- */
3313
- code?: string;
3314
- /**
3315
- * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
3316
- * For example, "Standard" or "First-Class Package International".
3317
- * @maxLength 250
3318
- */
3319
- title?: string;
3320
- /** Delivery logistics. */
3321
- logistics?: DeliveryLogistics;
3322
- /** Sipping price information. */
3323
- cost?: ShippingPrice;
3324
- /**
3325
- * Delivery solution allocations to different delivery carriers and delivery regions
3326
- * @maxSize 300
3327
- */
3328
- deliveryAllocations?: DeliveryAllocation[];
3329
- /** If the delivery solution is a partial and doesn't apply to all items. */
3330
- partial?: boolean | null;
3331
- }
3332
- interface ShippingPrice {
3333
- /** Shipping price. */
3334
- price?: MultiCurrencyPrice;
3335
- /** Other costs such as insurance, handling & packaging for fragile items, etc. */
3336
- otherCharges?: OtherCharge[];
3337
- }
3338
- interface OtherCharge {
3339
- /** Type of additional cost. */
3340
- type?: ChargeTypeWithLiterals;
3341
- /** Price of added cost. */
3342
- price?: MultiCurrencyPrice;
3343
- /**
3344
- * Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
3345
- * @maxLength 250
3346
- */
3347
- details?: string | null;
3348
- }
3349
- interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
3350
- /** Coupon details. */
3351
- coupon?: Coupon;
3352
- /** Merchant discount. */
3353
- merchantDiscount?: MerchantDiscount;
3354
- /** Discount rule */
3355
- discountRule?: DiscountRule;
3356
- /** Discount type. */
3357
- discountType?: DiscountTypeWithLiterals;
3358
- /**
3359
- * IDs of line items the discount applies to.
3360
- * @format GUID
3361
- * @deprecated IDs of line items the discount applies to.
3362
- * @replacedBy line_items_discounts
3363
- * @targetRemovalDate 2025-12-31
3364
- */
3365
- lineItemIds?: string[];
3366
- }
3367
- /** @oneof */
3368
- interface AppliedDiscountDiscountSourceOneOf {
3369
- /** Coupon details. */
3370
- coupon?: Coupon;
3371
- /** Merchant discount. */
3372
- merchantDiscount?: MerchantDiscount;
3373
- /** Discount rule */
3374
- discountRule?: DiscountRule;
3375
- }
3376
- declare enum DiscountType {
3377
- GLOBAL = "GLOBAL",
3378
- SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
3379
- SHIPPING = "SHIPPING"
3380
- }
3381
- /** @enumType */
3382
- type DiscountTypeWithLiterals = DiscountType | 'GLOBAL' | 'SPECIFIC_ITEMS' | 'SHIPPING';
3383
- /** Coupon */
3384
- interface Coupon {
3385
- /** Coupon ID. */
3386
- _id?: string;
3387
- /** Coupon code. */
3388
- code?: string;
3389
- /** Coupon value. */
3390
- amount?: MultiCurrencyPrice;
3391
- /** Coupon name. */
3392
- name?: string;
3393
- }
3394
- interface MerchantDiscount {
3395
- /** Discount value. */
3396
- amount?: MultiCurrencyPrice;
3397
- /**
3398
- * Discount Percentage. Will be calculated from items price before other discounts.
3399
- * @min 1
3400
- * @max 100
3401
- */
3402
- percentage?: number | null;
3403
- }
3404
- interface DiscountRule {
3405
- /**
3406
- * Discount rule ID
3407
- * @format GUID
3408
- */
3409
- _id?: string;
3410
- /** Discount rule name */
3411
- name?: DiscountRuleName;
3412
- /** Discount value. */
3413
- amount?: MultiCurrencyPrice;
3414
- }
3415
- interface DiscountRuleName {
3416
- /**
3417
- * Original discount rule name (in site's default language).
3418
- * @minLength 1
3419
- * @maxLength 256
3420
- */
3421
- original?: string;
3422
- /**
3423
- * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
3424
- * @minLength 1
3425
- * @maxLength 500
3426
- */
3427
- translated?: string | null;
3428
- }
3429
- interface LineItemDiscount {
3430
- /**
3431
- * ID of line item the discount applies to.
3432
- * @format GUID
3433
- */
3434
- _id?: string;
3435
- /** Discount value. */
3436
- totalDiscountAmount?: MultiCurrencyPrice;
3437
- }
3438
- interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
3439
- /** General shipping calculation error. */
3440
- generalShippingCalculationError?: Details;
3441
- /** Carrier errors. */
3442
- carrierErrors?: CarrierErrors;
3443
- /** Tax calculation error. */
3444
- taxCalculationError?: Details;
3445
- /** Coupon calculation error. */
3446
- couponCalculationError?: Details;
3447
- /** Gift card calculation error. */
3448
- giftCardCalculationError?: Details;
3449
- /** Order validation errors. */
3450
- orderValidationErrors?: ApplicationError[];
3451
- /**
3452
- * Membership payment methods calculation errors
3453
- * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
3454
- */
3455
- membershipError?: Details;
3456
- /** Discount Rule calculation error. */
3457
- discountsCalculationError?: Details;
3458
- }
3459
- /** @oneof */
3460
- interface CalculationErrorsShippingCalculationErrorOneOf {
3461
- /** General shipping calculation error. */
3462
- generalShippingCalculationError?: Details;
3463
- /** Carrier errors. */
3464
- carrierErrors?: CarrierErrors;
3465
- }
3466
- interface CarrierErrors {
3467
- /** Carrier errors. */
3468
- errors?: CarrierError[];
3469
- }
3470
- interface CarrierError {
3471
- /** Carrier ID. */
3472
- carrierId?: string;
3473
- /** Error details. */
3474
- error?: Details;
3475
- }
3476
- interface MembershipOptions {
3477
- /**
3478
- * List of payment options that can be used.
3479
- * @maxSize 300
3480
- */
3481
- eligibleMemberships?: Membership[];
3482
- /**
3483
- * List of payment options that are owned by the member, but cannot be used due to reason provided.
3484
- * @maxSize 300
3485
- */
3486
- invalidMemberships?: InvalidMembership[];
3487
- /**
3488
- * The selected membership payment options and which line items they apply to.
3489
- * @maxSize 300
3490
- */
3491
- selectedMemberships?: SelectedMembership[];
3492
- }
3493
- interface Membership {
3494
- /**
3495
- * Membership ID.
3496
- * @minLength 1
3497
- * @maxLength 100
3498
- */
3499
- _id?: string;
3500
- /**
3501
- * ID of the application providing this payment option.
3502
- * @format GUID
3503
- */
3504
- appId?: string;
3505
- /** The name of this membership. */
3506
- name?: MembershipName;
3507
- /**
3508
- * Line item IDs which are "paid" for by this membership.
3509
- * @minSize 1
3510
- * @maxSize 300
3511
- * @minLength 1
3512
- * @maxLength 100
3513
- */
3514
- lineItemIds?: string[];
3515
- /** Optional - For a membership that has limited credits, information about credit usage. */
3516
- credits?: MembershipPaymentCredits;
3517
- /** Optional - TMembership expiry date. */
3518
- expirationDate?: Date | null;
3519
- /** Additional data about this membership. */
3520
- additionalData?: Record<string, any> | null;
3521
- }
3522
- interface MembershipName {
3523
- /**
3524
- * Membership name.
3525
- * @maxLength 100
3526
- */
3527
- original?: string;
3528
- /**
3529
- * Translated membership name. Defaults to `original` when not provided.
3530
- * @maxLength 100
3531
- */
3532
- translated?: string | null;
3533
- }
3534
- interface MembershipPaymentCredits {
3535
- /**
3536
- * Membership's total amount of credits.
3537
- * @min 1
3538
- */
3539
- total?: number;
3540
- /** Membership's remaining amount of credits. */
3541
- remaining?: number;
3542
- }
3543
- interface InvalidMembership {
3544
- /** Membership details. */
3545
- membership?: Membership;
3546
- /**
3547
- * Reason why this membership is invalid and cannot be used.
3548
- * @minLength 1
3549
- * @maxLength 100
3550
- */
3551
- reason?: string;
3552
- }
3553
- interface SelectedMembership {
3554
- /**
3555
- * Membership ID.
3556
- * @minLength 1
3557
- * @maxLength 100
3558
- */
3559
- _id?: string;
3560
- /**
3561
- * ID of the app providing this payment option.
3562
- * @format GUID
3563
- */
3564
- appId?: string;
3565
- /**
3566
- * IDs of the line items this membership applies to.
3567
- * @minSize 1
3568
- * @maxSize 300
3569
- * @minLength 1
3570
- * @maxLength 100
3571
- */
3572
- lineItemIds?: string[];
3573
- }
3574
- interface AdditionalFee {
3575
- /**
3576
- * Additional fee's unique code (or ID) for future processing.
3577
- * @minLength 1
3578
- * @maxLength 100
3579
- */
3580
- code?: string | null;
3581
- /**
3582
- * Translated additional fee's name.
3583
- * @minLength 1
3584
- * @maxLength 50
3585
- */
3586
- name?: string;
3587
- /** Additional fee's price. */
3588
- price?: MultiCurrencyPrice;
3589
- /** Tax details. */
3590
- taxDetails?: ItemTaxFullDetails;
3591
- /**
3592
- * Provider's app id.
3593
- * @minLength 1
3594
- * @maxLength 100
3595
- */
3596
- providerAppId?: string | null;
3597
- /** Additional fee's price before tax. */
3598
- priceBeforeTax?: MultiCurrencyPrice;
3599
- /** Additional fee's price after tax. */
3600
- priceAfterTax?: MultiCurrencyPrice;
3601
- /**
3602
- * Optional - Line items associated with this additional fee.
3603
- * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
3604
- * @format GUID
3605
- */
3606
- lineItemIds?: string[];
3607
- /** the source the additional fee was added from */
3608
- source?: AdditionalFeeSourceWithLiterals;
3609
- /**
3610
- * The translated name of the additional fee. The translation language is determined by the `languages` field 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).
3611
- * @minLength 1
3612
- * @maxLength 50
3613
- */
3614
- translatedName?: string | null;
3615
- }
3616
- declare enum AdditionalFeeSource {
3617
- UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
3618
- /** The additional fee was added by an additional fee service plugin */
3619
- SERVICE_PLUGIN = "SERVICE_PLUGIN",
3620
- /** The additional fee was added on the item either via the catalog or on custom line item */
3621
- ITEM = "ITEM",
3622
- /** The additional fee was added manually on the request */
3623
- MANUAL = "MANUAL",
3624
- /** The additional fee was added by the shipping provider */
3625
- SHIPPING = "SHIPPING"
3626
- }
3627
- /** @enumType */
3628
- type AdditionalFeeSourceWithLiterals = AdditionalFeeSource | 'UNKNOWN_ADDITIONAL_FEE_SOURCE' | 'SERVICE_PLUGIN' | 'ITEM' | 'MANUAL' | 'SHIPPING';
3629
- interface GetCheckoutURLRequest {
3630
- /**
3631
- * ID of the Cart to calculate.
3632
- * @format GUID
3633
- */
3634
- cartId?: string;
3635
- /**
3636
- * Checkout currency parameter to append as a query param
3637
- * @format CURRENCY
3638
- */
3639
- currencyCode?: string | null;
3640
- }
3641
- interface GetCheckoutURLResponse {
3642
- /**
3643
- * The checkout URL.
3644
- * @format WEB_URL
3645
- */
3646
- checkoutUrl?: string;
3647
- }
3648
- interface PlaceOrderRequest {
3649
- /**
3650
- * Cart ID.
3651
- * @format GUID
3652
- */
3653
- cartId?: string;
3654
- /**
3655
- * The price verification token received from `CalculateCart`'s response.
3656
- * Used to verify that the prices shown to the customer have not changed before completing checkout.
3657
- * @maxLength 3000
3658
- */
3659
- priceVerificationToken?: string | null;
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { CreateCurrentCartOptions, CreateCurrentCartResponse, GetCurrentCartResponse, Cart, UpdateCurrentCartResponse, RefreshCurrentCartResponse, CalculateCurrentCartOptions, CalculateCurrentCartResponse, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, RemoveLineItemsFromCurrentCartResponse, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, CouponInput, AddCouponToCurrentCartResponse, RemoveCouponFromCurrentCartResponse, DeliveryMethodInput, SetDeliveryMethodForCurrentCartResponse, GiftCardInput, AddGiftCardToCurrentCartResponse, RemoveGiftCardFromCurrentCartResponse } from './index.typings.js';
3
+ export { ActionEvent, AddCouponRequest, AddCouponResponse, AddCouponToCurrentCartRequest, AddGiftCardRequest, AddGiftCardResponse, AddGiftCardToCurrentCartRequest, AddLineItemsRequest, AddLineItemsResponse, AddLineItemsToCurrentCartRequest, AdditionalFee, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeTax, Address, AddressLocation, AggregatedTaxBreakdown, ApplicableLineItems, ApplicationError, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BusinessInfo, CalculateCartForV1Request, CalculateCartForV1Response, CalculateCartRequest, CalculateCartResponse, CalculateCurrentCartRequest, CalculateTotalsResponse, CalculatedItemModifier, CalculatedLineItem, CalculationConfig, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, CartSettings, CartSource, CartSummary, CatalogItemInput, CatalogOverrideFields, CatalogReference, ChannelType, ChannelTypeWithLiterals, Charge, ChargeType, ChargeTypeWithLiterals, CheckoutStage, CheckoutStageWithLiterals, Color, ConvertedMoney, Coupon, CreateCartRequest, CreateCartResponse, CreateCurrentCartRequest, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomItemAttributes, CustomItemDeliveryConfig, CustomItemInput, CustomItemPaymentConfig, CustomItemPricingInfo, CustomItemQuantityInfo, CustomItemSource, CustomItemTaxConfig, CustomerInfo, CustomerInfoIdOneOf, DeleteCartRequest, DeleteCartResponse, DeleteCurrentCartRequest, DeleteCurrentCartResponse, DeliveryAllocation, DeliveryInfo, DeliveryLogistics, DeliveryMethod, DeliverySummary, DeliveryTimeSlot, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Discount, DiscountBenefit, DiscountBenefitValueOneOf, DiscountRule, DiscountRuleName, DiscountScope, DiscountScopeWithLiterals, DiscountSource, DiscountSourceType, DiscountSourceTypeWithLiterals, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, DummyErrorDataMethodLevel, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, ExternalReference, FallbackReason, FallbackReasonWithLiterals, FieldViolation, FileType, FileTypeWithLiterals, FreeTrialPeriod, FullAddressContactDetails, GetCartRequest, GetCartResponse, GetCheckoutURLRequest, GetCheckoutURLResponse, GetCurrentCartRequest, GiftCard, GiftCardSummary, Group, HandleAsyncCheckoutCompletionRequest, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, InvalidMembership, ItemAttributes, ItemDeliveryConfig, ItemDiscount, ItemModifier, ItemPaymentConfig, ItemPriceBreakdown, ItemPricingInfo, ItemQuantityInfo, ItemSource, ItemStatus, ItemStatusWithLiterals, ItemTaxConfig, ItemTaxFullDetails, ItemType, ItemTypeItemTypeDataOneOf, ItemTypePreset, ItemTypePresetWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LegacyFields, LineItem, LineItemDiscount, LineItemIdentifier, LineItemIdentifierIdOneOf, LineItemPricesData, LineItemSummary, LineItemTax, LineItemUpdate, ManualCalculationReason, ManualCalculationReasonWithLiterals, MarkCartAsCompletedRequest, MarkCartAsCompletedResponse, Membership, MembershipName, MembershipOptions, MembershipPaymentCredits, MerchantDiscount, MessageEnvelope, ModifierGroup, MultiCurrencyPrice, NameInLineItem, NameInLineItemWithLiterals, NameInOther, NameInOtherWithLiterals, Other, OtherCharge, PaymentInfo, PaymentOption, PaymentOptionType, PaymentOptionTypeWithLiterals, PaymentSummary, PhysicalProperties, PickupDetails, PickupMethod, PickupMethodWithLiterals, PlaceOrderRequest, PlaceOrderResponse, PlainTextValue, Policy, PriceDescription, PriceSummary, QuantityUpdate, RateType, RateTypeWithLiterals, RawHttpResponse, RedirectUrls, RefreshCartRequest, RefreshCartResponse, RefreshCurrentCartRequest, Region, RemoveCouponFromCurrentCartRequest, RemoveCouponRequest, RemoveCouponResponse, RemoveGiftCardFromCurrentCartRequest, RemoveGiftCardRequest, RemoveGiftCardResponse, RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsRequest, RemoveLineItemsResponse, RestoreInfo, RuleType, RuleTypeWithLiterals, Scope, SecuredMedia, SelectedCarrierServiceOption, SelectedCarrierServiceOptionOtherCharge, SelectedCarrierServiceOptionPrices, SelectedMembership, SelectedMembershipUpdate, ServiceProperties, SetDeliveryMethodForCurrentCartRequest, SetDeliveryMethodRequest, SetDeliveryMethodResponse, Severity, SeverityWithLiterals, ShippingInformation, ShippingOption, ShippingPrice, ShippingRegion, Stage, StageStagesOneOf, StreetAddress, SubscriptionCharges, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionOptionInfo, SubscriptionSettings, SuggestedFix, SuggestedFixWithLiterals, SystemError, Target, TargetTargetTypeOneOf, Tax, TaxBreakdown, TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf, TaxDetails, TaxInfo, TaxRateBreakdown, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, Title, TranslatableString, UnmarkAsCurrentCartRequest, UnmarkAsCurrentCartResponse, UpdateCartRequest, UpdateCartResponse, UpdateCurrentCartRequest, UpdateLineItemsInCurrentCartRequest, UpdateLineItemsRequest, UpdateLineItemsResponse, V1AdditionalFee, V2AdditionalFee, V2CalculationErrors, V2CalculationErrorsShippingCalculationErrorOneOf, V2CarrierError, V2CarrierErrors, V2Coupon, V2GiftCard, V2LineItem, V2Membership, V2PriceSummary, V2SelectedMembership, V2TaxSummary, ValidationError, ValidationsConfig, ValidationsConfigWithLiterals, VatId, VatType, VatTypeWithLiterals, Violation, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.js';
4
+
5
+ declare function createCurrentCart$1(httpClient: HttpClient): CreateCurrentCartSignature;
6
+ interface CreateCurrentCartSignature {
3660
7
  /**
3661
- * Payment token.
3662
- * @maxLength 100
8
+ * Creates the Current Cart of the customer.
3663
9
  */
3664
- paymentToken?: string | null;
3665
- /** Urls to redirect to after payment is made. */
3666
- redirectUrls?: RedirectUrls;
3667
- /** Indicates the payment method should be saved on the order */
3668
- savePaymentMethod?: boolean;
3669
- /** Indicates whether to authorize the payment and delay the capture */
3670
- delayCapture?: boolean;
10
+ (options?: NonNullablePaths<CreateCurrentCartOptions, `catalogItems.${number}.catalogReference` | `catalogItems.${number}.quantity` | `catalogItems.${number}.selectedMembership._id` | `catalogItems.${number}.selectedMembership.appId` | `customItems.${number}.attributes.descriptionLines.${number}.name` | `customItems.${number}.attributes.itemType` | `customItems.${number}.name` | `customItems.${number}.pricing` | `customItems.${number}.pricing.price` | `customItems.${number}.quantityInfo` | `customItems.${number}.quantityInfo.requestedQuantity`, 7>): Promise<NonNullablePaths<CreateCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3671
11
  }
3672
- interface RedirectUrls {
3673
- /**
3674
- * URL to redirect to if payment is canceled (usually checkout url).
3675
- * @format WEB_URL
3676
- */
3677
- cancelUrl?: string;
12
+ declare function getCurrentCart$1(httpClient: HttpClient): GetCurrentCartSignature;
13
+ interface GetCurrentCartSignature {
3678
14
  /**
3679
- * URL to redirect to if an error occurred on payment (usually checkout url).
3680
- * @format WEB_URL
15
+ * Retrieves the Current Cart of the customer.
3681
16
  */
3682
- errorUrl?: string;
3683
- /**
3684
- * URL to redirect to after successful payment, excepts order place holder {orderId}.
3685
- * @maxLength 2000
3686
- */
3687
- successUrl?: string | null;
3688
- /**
3689
- * URL to redirect to if payment is pending, excepts order place holder {orderId}.
3690
- * @maxLength 2000
3691
- */
3692
- pendingUrl?: string | null;
17
+ (): Promise<NonNullablePaths<GetCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3693
18
  }
3694
- interface PlaceOrderResponse {
3695
- /**
3696
- * The order ID of the created order.
3697
- * @format GUID
3698
- */
3699
- orderId?: string;
3700
- /**
3701
- * Payment response token.
3702
- * @maxLength 1000
3703
- */
3704
- paymentResponseToken?: string | null;
19
+ declare function updateCurrentCart$1(httpClient: HttpClient): UpdateCurrentCartSignature;
20
+ interface UpdateCurrentCartSignature {
3705
21
  /**
3706
- * The payment gateway is Cashier.
3707
- * payment_gateway_order_id will be returned given that money was charged.
3708
- * In some cases, money will not be charged:
3709
- * If the total price is 0 - For example, could be a free item or a an item with 100% discount
3710
- * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card
3711
- * @maxLength 50
22
+ * Updates the Current Cart.
23
+ *
24
+ * Use this endpoint to set and replace fields such as buyer note and delivery method.
25
+ * To add or remove elements from lists (e.g., line items, discounts, gift cards), use their dedicated endpoints.
26
+ * @param - Cart to be updated, may be partial.
3712
27
  */
3713
- paymentGatewayOrderId?: string | null;
3714
- /** Whether an order was successfully created from this cart and the payment transaction was completed. */
3715
- completed?: boolean;
28
+ (cart: Cart): Promise<NonNullablePaths<UpdateCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3716
29
  }
3717
- interface AddLineItemsRequest {
3718
- /**
3719
- * Cart ID.
3720
- * @format GUID
3721
- */
3722
- cartId?: string;
3723
- /**
3724
- * A list of catalog items to add to the cart.
3725
- * @maxSize 300
3726
- */
3727
- catalogItems?: CatalogItemInput[];
30
+ declare function deleteCurrentCart$1(httpClient: HttpClient): DeleteCurrentCartSignature;
31
+ interface DeleteCurrentCartSignature {
3728
32
  /**
3729
- * A list of custom items to add to the cart.
3730
- * @maxSize 300
33
+ * Deletes the Current Cart of the customer.
3731
34
  */
3732
- customItems?: CustomItemInput[];
3733
- }
3734
- interface AddLineItemsResponse {
3735
- /** Updated Cart. */
3736
- cart?: Cart;
35
+ (): Promise<void>;
3737
36
  }
3738
- interface RemoveLineItemsRequest {
3739
- /**
3740
- * Cart ID.
3741
- * @format GUID
3742
- */
3743
- cartId?: string;
37
+ declare function refreshCurrentCart$1(httpClient: HttpClient): RefreshCurrentCartSignature;
38
+ interface RefreshCurrentCartSignature {
3744
39
  /**
3745
- * Line item IDs to remove from cart.
3746
- * @format GUID
3747
- * @minSize 1
3748
- * @maxSize 100
40
+ * Re-evaluates prices, inventory and discounts to ensure the Cart is up-to-date with the latest changes.
3749
41
  */
3750
- lineItemIds?: string[];
42
+ (): Promise<NonNullablePaths<RefreshCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3751
43
  }
3752
- interface RemoveLineItemsResponse {
3753
- /** Updated Cart. */
3754
- cart?: Cart;
3755
- }
3756
- interface UpdateLineItemsRequest {
3757
- /**
3758
- * Cart ID.
3759
- * @format GUID
3760
- */
3761
- cartId?: string;
44
+ declare function calculateCurrentCart$1(httpClient: HttpClient): CalculateCurrentCartSignature;
45
+ interface CalculateCurrentCartSignature {
3762
46
  /**
3763
- * Line item updates to apply.
3764
- * @minSize 1
3765
- * @maxSize 300
47
+ * Calculates the cart based on its current state (line items, discounts, delivery method, etc.)
48
+ * and returns a detailed summary including subtotal, delivery costs, taxes, fees and the total price.
3766
49
  */
3767
- lineItems?: LineItemUpdate[];
3768
- }
3769
- interface UpdateLineItemsResponse {
3770
- /** Updated Cart. */
3771
- cart?: Cart;
50
+ (options?: CalculateCurrentCartOptions): Promise<NonNullablePaths<CalculateCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart` | `summary.cartId` | `summary.calculationId` | `summary.lineItems` | `summary.lineItems.${number}.lineItemId` | `summary.lineItems.${number}.quantity` | `summary.lineItems.${number}.unitPrice.amount` | `summary.lineItems.${number}.unitPrice.convertedAmount` | `summary.discounts` | `summary.discounts.${number}.name.original` | `summary.discounts.${number}.source.sourceType` | `summary.discounts.${number}.scope` | `summary.deliverySummary.method.code` | `summary.deliverySummary.method.pickup` | `summary.additionalFees` | `summary.taxSummary.taxes` | `summary.taxSummary.pricesIncludeTax` | `summary.taxSummary.lineItemTaxes` | `summary.taxSummary.lineItemTaxes.${number}.lineItemId` | `summary.taxSummary.additionalFeeTaxes` | `summary.taxSummary.additionalFeeTaxes.${number}.additionalFeeCode` | `summary.paymentSummary.giftCards` | `summary.paymentSummary.giftCards.${number}.giftCardId` | `summary.paymentSummary.memberships` | `summary.paymentSummary.memberships.${number}._id` | `summary.paymentSummary.memberships.${number}.appId` | `summary.paymentSummary.subscriptionCharges` | `summary.paymentSummary.requiresPaymentAfterGiftCard` | `summary.calculationErrors.generalShippingCalculationError.applicationError.code` | `summary.calculationErrors.generalShippingCalculationError.applicationError.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `summary.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `summary.calculationErrors.carrierErrors.errors` | `summary.calculationErrors.carrierErrors.errors.${number}.carrierId` | `summary.calculationErrors.orderValidationErrors` | `summary.spiViolations` | `summary.spiViolations.${number}.severity` | `summary.spiViolations.${number}.target.other.name` | `summary.spiViolations.${number}.target.lineItem.name`, 8>>;
3772
51
  }
3773
- interface AddCouponRequest {
52
+ declare function addLineItemsToCurrentCart$1(httpClient: HttpClient): AddLineItemsToCurrentCartSignature;
53
+ interface AddLineItemsToCurrentCartSignature {
3774
54
  /**
3775
- * Cart ID.
3776
- * @format GUID
3777
- */
3778
- cartId?: string;
3779
- /**
3780
- * Coupon to apply.
3781
- *
3782
- * Currently only one is supported.
3783
- * @minLength 1
3784
- * @maxLength 50
55
+ * Adds line items to the Cart.
56
+ * If a Current Cart is not already existing, it will be created.
3785
57
  */
3786
- couponCode?: string;
58
+ (options?: NonNullablePaths<AddLineItemsToCurrentCartOptions, `catalogItems.${number}.catalogReference` | `catalogItems.${number}.quantity` | `catalogItems.${number}.selectedMembership._id` | `catalogItems.${number}.selectedMembership.appId` | `customItems.${number}.attributes.descriptionLines.${number}.name` | `customItems.${number}.attributes.itemType` | `customItems.${number}.name` | `customItems.${number}.pricing` | `customItems.${number}.pricing.price` | `customItems.${number}.quantityInfo` | `customItems.${number}.quantityInfo.requestedQuantity`, 7>): Promise<NonNullablePaths<AddLineItemsToCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3787
59
  }
3788
- interface AddCouponResponse {
3789
- /** Updated Cart. */
3790
- cart?: Cart;
3791
- }
3792
- interface RemoveCouponRequest {
3793
- /**
3794
- * Cart ID.
3795
- * @format GUID
3796
- */
3797
- cartId?: string;
60
+ declare function removeLineItemsFromCurrentCart$1(httpClient: HttpClient): RemoveLineItemsFromCurrentCartSignature;
61
+ interface RemoveLineItemsFromCurrentCartSignature {
3798
62
  /**
3799
- * Discount ID.
3800
- * @format GUID
63
+ * Removes line items from the Cart.
64
+ * @param - Line item IDs to remove from cart.
3801
65
  */
3802
- couponId?: string;
3803
- }
3804
- interface RemoveCouponResponse {
3805
- /** Updated Cart. */
3806
- cart?: Cart;
66
+ (lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsFromCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3807
67
  }
3808
- interface SetDeliveryMethodRequest {
68
+ declare function updateLineItemsInCurrentCart$1(httpClient: HttpClient): UpdateLineItemsInCurrentCartSignature;
69
+ interface UpdateLineItemsInCurrentCartSignature {
3809
70
  /**
3810
- * Cart ID.
3811
- * @format GUID
71
+ * Updates line items in the Cart.
72
+ * Use this endpoint to update line items properties such as quantity and selected membership.
3812
73
  */
3813
- cartId?: string;
3814
- /** Delivery method. */
3815
- deliveryMethod?: DeliveryMethodInput;
74
+ (options?: NonNullablePaths<UpdateLineItemsInCurrentCartOptions, `lineItems.${number}.lineItemId` | `lineItems.${number}.quantity.newQuantity`, 5>): Promise<NonNullablePaths<UpdateLineItemsInCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3816
75
  }
3817
- interface SetDeliveryMethodResponse {
3818
- /** Updated Cart. */
3819
- cart?: Cart;
3820
- }
3821
- interface AddGiftCardRequest {
3822
- /**
3823
- * Cart ID.
3824
- * @format GUID
3825
- */
3826
- cartId?: string;
76
+ declare function addCouponToCurrentCart$1(httpClient: HttpClient): AddCouponToCurrentCartSignature;
77
+ interface AddCouponToCurrentCartSignature {
3827
78
  /**
3828
- * Gift card code.
79
+ * Applies a coupon to the Cart.
80
+ * @param - Coupon to apply.
3829
81
  *
3830
82
  * Currently only one is supported.
3831
- * @minLength 8
3832
- * @maxLength 20
3833
- */
3834
- giftCardCode?: string;
3835
- }
3836
- interface AddGiftCardResponse {
3837
- /** Updated Cart. */
3838
- cart?: Cart;
3839
- }
3840
- interface RemoveGiftCardRequest {
3841
- /**
3842
- * Cart ID.
3843
- * @format GUID
3844
- */
3845
- cartId?: string;
3846
- /**
3847
- * Gift card ID.
3848
- * @format GUID
3849
83
  */
3850
- giftCardId?: string;
3851
- }
3852
- interface RemoveGiftCardResponse {
3853
- /** Updated Cart. */
3854
- cart?: Cart;
84
+ (coupon: NonNullablePaths<CouponInput, `code`, 2>): Promise<NonNullablePaths<AddCouponToCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3855
85
  }
3856
- interface MarkCartAsCompletedRequest {
3857
- /**
3858
- * Cart ID.
3859
- * @format GUID
3860
- */
3861
- cartId?: string;
86
+ declare function removeCouponFromCurrentCart$1(httpClient: HttpClient): RemoveCouponFromCurrentCartSignature;
87
+ interface RemoveCouponFromCurrentCartSignature {
3862
88
  /**
3863
- * Order ID.
3864
- * @format GUID
89
+ * Removes a coupon from the Cart.
90
+ * @param - Coupon ID.
3865
91
  */
3866
- orderId?: string | null;
92
+ (couponId: string): Promise<NonNullablePaths<RemoveCouponFromCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3867
93
  }
3868
- interface MarkCartAsCompletedResponse {
3869
- /** Updated Cart. */
3870
- cart?: Cart;
3871
- }
3872
- interface Empty {
3873
- }
3874
- interface HandleAsyncCheckoutCompletionRequest {
94
+ declare function setDeliveryMethodForCurrentCart$1(httpClient: HttpClient): SetDeliveryMethodForCurrentCartSignature;
95
+ interface SetDeliveryMethodForCurrentCartSignature {
3875
96
  /**
3876
- * Server-signed JWT token with required information to complete checkout
3877
- * @maxLength 4096
97
+ * Sets the delivery method for the Current Cart.
98
+ * @param - Delivery method.
3878
99
  */
3879
- token?: string;
3880
- }
3881
- interface RawHttpResponse {
3882
- body?: Uint8Array;
3883
- statusCode?: number | null;
3884
- headers?: HeadersEntry[];
3885
- }
3886
- interface HeadersEntry {
3887
- key?: string;
3888
- value?: string;
100
+ (deliveryMethod: NonNullablePaths<DeliveryMethodInput, `code`, 2>): Promise<NonNullablePaths<SetDeliveryMethodForCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3889
101
  }
3890
- interface CreateCurrentCartOptions {
3891
- /** Cart to be created. */
3892
- cart?: Cart;
102
+ declare function addGiftCardToCurrentCart$1(httpClient: HttpClient): AddGiftCardToCurrentCartSignature;
103
+ interface AddGiftCardToCurrentCartSignature {
3893
104
  /**
3894
- * A list of catalog items to add to the cart.
3895
- * @maxSize 300
3896
- */
3897
- catalogItems?: CatalogItemInput[];
3898
- /**
3899
- * A list of custom items to add to the cart.
3900
- * Custom line items don't trigger the Catalog service plugin.
105
+ * Adds a gift card to the Current Cart.
106
+ * Once added, the gift card’s balance will be used as a payment method during checkout, either partially or fully covering the cart total.
107
+ * @param - Gift card code.
3901
108
  *
3902
- * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
3903
- * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
3904
- * @maxSize 300
3905
- */
3906
- customItems?: CustomItemInput[];
3907
- /**
3908
- * Coupons to apply.
3909
109
  * Currently only one is supported.
3910
- * @maxSize 1
3911
- * @minLength 1
3912
- * @maxLength 50
3913
110
  */
3914
- couponCodes?: string[];
3915
- /** Delivery method to set. */
3916
- deliveryMethod?: DeliveryMethodInput;
3917
- /**
3918
- * Gift cards to add.
3919
- * Currently only one is support.
3920
- * @maxSize 1
3921
- * @minLength 8
3922
- * @maxLength 20
3923
- */
3924
- giftCardCodes?: string[];
3925
- }
3926
- interface CalculateCurrentCartOptions {
3927
- /**
3928
- * Whether to retrieve the latest item prices, discounts, and inventory data from the catalogs before calculating the cart.
3929
- *
3930
- * Default: `false`
3931
- */
3932
- refreshCart?: boolean;
3933
- /**
3934
- * Specifies the level of **business validation** to perform during cart calculation,
3935
- * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
3936
- */
3937
- validationsConfig?: ValidationsConfigWithLiterals;
3938
- /**
3939
- * Optional custom configuration for the calculation.
3940
- * If not provided, all price components are calculated by default.
3941
- */
3942
- customCalculationConfig?: CalculationConfig;
3943
- }
3944
- interface AddLineItemsToCurrentCartOptions {
3945
- /**
3946
- * A list of catalog items to add to the cart.
3947
- * @maxSize 300
3948
- */
3949
- catalogItems?: CatalogItemInput[];
3950
- /**
3951
- * A list of custom items to add to the cart.
3952
- * @maxSize 300
3953
- */
3954
- customItems?: CustomItemInput[];
111
+ (giftCard: NonNullablePaths<GiftCardInput, `code`, 2>): Promise<NonNullablePaths<AddGiftCardToCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3955
112
  }
3956
- interface UpdateLineItemsInCurrentCartOptions {
113
+ declare function removeGiftCardFromCurrentCart$1(httpClient: HttpClient): RemoveGiftCardFromCurrentCartSignature;
114
+ interface RemoveGiftCardFromCurrentCartSignature {
3957
115
  /**
3958
- * Line item updates to apply.
3959
- * @minSize 1
3960
- * @maxSize 100
116
+ * Removes a gift card from the Current Cart.
117
+ * @param - Gift card ID.
3961
118
  */
3962
- lineItems?: LineItemUpdate[];
119
+ (giftCardId: string): Promise<NonNullablePaths<RemoveGiftCardFromCurrentCartResponse, `cart._id` | `cart.revision` | `cart.lineItems` | `cart.lineItems.${number}._id` | `cart.lineItems.${number}.name.original` | `cart.lineItems.${number}.quantityInfo.confirmedQuantity` | `cart.lineItems.${number}.quantityInfo.requestedQuantity` | `cart.lineItems.${number}.quantityInfo.fixedQuantity` | `cart.lineItems.${number}.pricing.unitPrice.amount` | `cart.lineItems.${number}.pricing.unitPrice.convertedAmount` | `cart.lineItems.${number}.pricing.priceDescription.original` | `cart.lineItems.${number}.pricing.priceUndetermined` | `cart.lineItems.${number}.source.catalogReference.catalogItemId` | `cart.lineItems.${number}.source.catalogReference.appId` | `cart.lineItems.${number}.attributes.itemType.preset` | `cart.lineItems.${number}.attributes.itemType.custom` | `cart.lineItems.${number}.attributes.physicalProperties.shippable` | `cart.lineItems.${number}.attributes.membersOnly` | `cart.lineItems.${number}.taxConfig.taxableAddress.addressType` | `cart.lineItems.${number}.paymentConfig.savePaymentMethod` | `cart.lineItems.${number}.paymentConfig.selectedMembership._id` | `cart.lineItems.${number}.paymentConfig.selectedMembership.appId` | `cart.lineItems.${number}.paymentConfig.paymentOption` | `cart.lineItems.${number}.status` | `cart.lineItems.${number}.customLineItem` | `cart.coupons` | `cart.coupons.${number}._id` | `cart.coupons.${number}.code` | `cart.source.channelType` | `cart.source.externalReferences` | `cart.source.externalReferences.${number}.appId` | `cart.source.createdBy.visitorId` | `cart.source.createdBy.memberId` | `cart.source.createdBy.userId` | `cart.source.createdBy.appId` | `cart.source.customContentReference.appId` | `cart.source.customContentReference.componentId` | `cart.businessInfo.languageCode` | `cart.businessInfo.currencyCode` | `cart.customerInfo.visitorId` | `cart.customerInfo.memberId` | `cart.customerInfo.userId` | `cart.customerInfo.vatId._id` | `cart.customerInfo.vatId.type` | `cart.customerInfo.languageCode` | `cart.customerInfo.currencyCode` | `cart.deliveryInfo.address.streetAddress.number` | `cart.deliveryInfo.address.streetAddress.name` | `cart.deliveryInfo.method.code` | `cart.deliveryInfo.method.pickup` | `cart.deliveryInfo.weightUnit` | `cart.taxInfo.pricesIncludeTax` | `cart.paymentInfo.giftCards` | `cart.paymentInfo.giftCards.${number}._id` | `cart.paymentInfo.giftCards.${number}.obfuscatedCode` | `cart.paymentInfo.giftCards.${number}.appId` | `cart.paymentInfo.currencyCode` | `cart.orderPlaced` | `cart.currentCart`, 7>>;
3963
120
  }
3964
121
 
3965
- export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeTax, type Address, type AddressLocation, type AggregatedTaxBreakdown, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type AutoTaxFallbackCalculationDetails, type BusinessInfo, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculateTotalsResponse, type CalculatedItemModifier, type CalculatedLineItem, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, ChargeType, type ChargeTypeWithLiterals, CheckoutStage, type CheckoutStageWithLiterals, type Color, type ConvertedMoney, type Coupon, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryAllocation, type DeliveryInfo, type DeliveryLogistics, type DeliveryMethod, type DeliveryMethodInput, type DeliverySummary, type DeliveryTimeSlot, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, type DiscountRule, type DiscountRuleName, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DummyErrorDataMethodLevel, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type InvalidMembership, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemTaxFullDetails, type ItemType, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LegacyFields, type LineItem, type LineItemDiscount, type LineItemIdentifier, type LineItemIdentifierIdOneOf, type LineItemPricesData, type LineItemSummary, type LineItemTax, type LineItemUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type OtherCharge, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, RateType, type RateTypeWithLiterals, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, type RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, type Stage, type StageStagesOneOf, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxBreakdown, type TaxCalculationDetails, type TaxCalculationDetailsCalculationDetailsOneOf, type TaxDetails, type TaxInfo, type TaxRateBreakdown, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V1AdditionalFee, type V2AdditionalFee, type V2CalculationErrors, type V2CalculationErrorsShippingCalculationErrorOneOf, type V2CarrierError, type V2CarrierErrors, type V2Coupon, type V2GiftCard, type V2LineItem, type V2Membership, type V2PriceSummary, type V2SelectedMembership, type V2TaxSummary, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals };
122
+ declare const createCurrentCart: MaybeContext<BuildRESTFunction<typeof createCurrentCart$1> & typeof createCurrentCart$1>;
123
+ declare const getCurrentCart: MaybeContext<BuildRESTFunction<typeof getCurrentCart$1> & typeof getCurrentCart$1>;
124
+ declare const updateCurrentCart: MaybeContext<BuildRESTFunction<typeof updateCurrentCart$1> & typeof updateCurrentCart$1>;
125
+ declare const deleteCurrentCart: MaybeContext<BuildRESTFunction<typeof deleteCurrentCart$1> & typeof deleteCurrentCart$1>;
126
+ declare const refreshCurrentCart: MaybeContext<BuildRESTFunction<typeof refreshCurrentCart$1> & typeof refreshCurrentCart$1>;
127
+ declare const calculateCurrentCart: MaybeContext<BuildRESTFunction<typeof calculateCurrentCart$1> & typeof calculateCurrentCart$1>;
128
+ declare const addLineItemsToCurrentCart: MaybeContext<BuildRESTFunction<typeof addLineItemsToCurrentCart$1> & typeof addLineItemsToCurrentCart$1>;
129
+ declare const removeLineItemsFromCurrentCart: MaybeContext<BuildRESTFunction<typeof removeLineItemsFromCurrentCart$1> & typeof removeLineItemsFromCurrentCart$1>;
130
+ declare const updateLineItemsInCurrentCart: MaybeContext<BuildRESTFunction<typeof updateLineItemsInCurrentCart$1> & typeof updateLineItemsInCurrentCart$1>;
131
+ declare const addCouponToCurrentCart: MaybeContext<BuildRESTFunction<typeof addCouponToCurrentCart$1> & typeof addCouponToCurrentCart$1>;
132
+ declare const removeCouponFromCurrentCart: MaybeContext<BuildRESTFunction<typeof removeCouponFromCurrentCart$1> & typeof removeCouponFromCurrentCart$1>;
133
+ declare const setDeliveryMethodForCurrentCart: MaybeContext<BuildRESTFunction<typeof setDeliveryMethodForCurrentCart$1> & typeof setDeliveryMethodForCurrentCart$1>;
134
+ declare const addGiftCardToCurrentCart: MaybeContext<BuildRESTFunction<typeof addGiftCardToCurrentCart$1> & typeof addGiftCardToCurrentCart$1>;
135
+ declare const removeGiftCardFromCurrentCart: MaybeContext<BuildRESTFunction<typeof removeGiftCardFromCurrentCart$1> & typeof removeGiftCardFromCurrentCart$1>;
136
+
137
+ export { AddCouponToCurrentCartResponse, AddGiftCardToCurrentCartResponse, AddLineItemsToCurrentCartOptions, AddLineItemsToCurrentCartResponse, CalculateCurrentCartOptions, CalculateCurrentCartResponse, Cart, CouponInput, CreateCurrentCartOptions, CreateCurrentCartResponse, DeliveryMethodInput, GetCurrentCartResponse, GiftCardInput, RefreshCurrentCartResponse, RemoveCouponFromCurrentCartResponse, RemoveGiftCardFromCurrentCartResponse, RemoveLineItemsFromCurrentCartResponse, SetDeliveryMethodForCurrentCartResponse, UpdateCurrentCartResponse, UpdateLineItemsInCurrentCartOptions, UpdateLineItemsInCurrentCartResponse, addCouponToCurrentCart, addGiftCardToCurrentCart, addLineItemsToCurrentCart, calculateCurrentCart, createCurrentCart, deleteCurrentCart, getCurrentCart, refreshCurrentCart, removeCouponFromCurrentCart, removeGiftCardFromCurrentCart, removeLineItemsFromCurrentCart, setDeliveryMethodForCurrentCart, updateCurrentCart, updateLineItemsInCurrentCart };