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