@wix/auto_sdk_ecom_cart-v-2 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/build/cjs/index.d.ts +2950 -0
  2. package/build/cjs/index.js +2183 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +2030 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +2396 -0
  8. package/build/cjs/meta.js +1299 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +2950 -0
  11. package/build/es/index.mjs +2120 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1 -0
  14. package/build/es/index.typings.mjs +1967 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +2396 -0
  17. package/build/es/meta.mjs +1256 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +227 -0
  21. package/build/internal/cjs/index.js +2183 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +3207 -0
  24. package/build/internal/cjs/index.typings.js +2030 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +2397 -0
  27. package/build/internal/cjs/meta.js +1299 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +227 -0
  30. package/build/internal/es/index.mjs +2120 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +3207 -0
  33. package/build/internal/es/index.typings.mjs +1967 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +2397 -0
  36. package/build/internal/es/meta.mjs +1256 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,2397 @@
1
+ import { CreateCartRequest as CreateCartRequest$1, CreateCartResponse as CreateCartResponse$1, GetCartRequest as GetCartRequest$1, GetCartResponse as GetCartResponse$1, UpdateCartRequest as UpdateCartRequest$1, UpdateCartResponse as UpdateCartResponse$1, DeleteCartRequest as DeleteCartRequest$1, DeleteCartResponse as DeleteCartResponse$1, RefreshCartRequest as RefreshCartRequest$1, RefreshCartResponse as RefreshCartResponse$1, CalculateCartRequest as CalculateCartRequest$1, CalculateCartResponse as CalculateCartResponse$1, GetCheckoutURLRequest as GetCheckoutURLRequest$1, GetCheckoutURLResponse as GetCheckoutURLResponse$1, CompleteCheckoutRequest as CompleteCheckoutRequest$1, CompleteCheckoutResponse as CompleteCheckoutResponse$1, AddLineItemsRequest as AddLineItemsRequest$1, AddLineItemsResponse as AddLineItemsResponse$1, RemoveLineItemsRequest as RemoveLineItemsRequest$1, RemoveLineItemsResponse as RemoveLineItemsResponse$1, AddDiscountRequest as AddDiscountRequest$1, AddDiscountResponse as AddDiscountResponse$1, RemoveDiscountRequest as RemoveDiscountRequest$1, RemoveDiscountResponse as RemoveDiscountResponse$1, AddGiftCardRequest as AddGiftCardRequest$1, AddGiftCardResponse as AddGiftCardResponse$1, RemoveGiftCardRequest as RemoveGiftCardRequest$1, RemoveGiftCardResponse as RemoveGiftCardResponse$1, UpdateLineItemsRequest as UpdateLineItemsRequest$1, UpdateLineItemsResponse as UpdateLineItemsResponse$1, MarkCartAsCompletedRequest as MarkCartAsCompletedRequest$1, MarkCartAsCompletedResponse as MarkCartAsCompletedResponse$1, HandleAsyncCheckoutCompletionRequest as HandleAsyncCheckoutCompletionRequest$1, RawHttpResponse as RawHttpResponse$1 } from './index.typings.js';
2
+ import '@wix/sdk-types';
3
+
4
+ interface Cart {
5
+ /**
6
+ * Cart ID.
7
+ * @format GUID
8
+ * @readonly
9
+ */
10
+ id?: string;
11
+ /**
12
+ * Date and time the Cart was created.
13
+ * @readonly
14
+ */
15
+ createdDate?: Date | null;
16
+ /**
17
+ * Date and time the Cart was last updated.
18
+ * @readonly
19
+ */
20
+ updatedDate?: Date | null;
21
+ /**
22
+ * Revision number, which increments by 1 each time the Cart is updated.
23
+ * @readonly
24
+ */
25
+ revision?: string | null;
26
+ /**
27
+ * Custom fields.
28
+ * [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.
29
+ */
30
+ extendedFields?: ExtendedFields;
31
+ /**
32
+ * Line items added to the Cart by the customer.
33
+ * This list may include both valid items (in stock) and invalid ones (e.g., out of stock).
34
+ * When submitting an order, only valid items will be included in the order.
35
+ * @maxSize 300
36
+ * @readonly
37
+ */
38
+ lineItems?: V2LineItem[];
39
+ /**
40
+ * The discounts of the Cart.
41
+ * Automatic discounts are removed from the Cart entirely when they are no longer valid.
42
+ * Coupon discounts are not removed from the Cart, but are marked as invalid.
43
+ * @maxSize 100
44
+ * @readonly
45
+ */
46
+ discounts?: Discount[];
47
+ /** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
48
+ source?: CartSource;
49
+ /** Information about the site from which the Cart's line items were added. */
50
+ siteInfo?: SiteInfo;
51
+ /** Information about the customer that owns the Cart. */
52
+ customerInfo?: CustomerInfo;
53
+ /** Delivery-related information associated with the Cart. */
54
+ deliveryInfo?: DeliveryInfo;
55
+ /** Tax-related information associated with the Cart. */
56
+ taxInfo?: TaxInfo;
57
+ /** Payment-related information associated with the Cart. */
58
+ paymentInfo?: PaymentInfo;
59
+ /**
60
+ * The estimated costs that the customer will pay.
61
+ * @readonly
62
+ */
63
+ pricingInfo?: PricingInfo;
64
+ /**
65
+ * The current status of the Cart.
66
+ * @readonly
67
+ */
68
+ status?: CartStatusWithLiterals;
69
+ /**
70
+ * Additional Cart settings.
71
+ *
72
+ * > **Notes:**
73
+ * > * Custom settings can only be set when creating a Cart.
74
+ * > * 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).
75
+ * @immutable
76
+ */
77
+ customSettings?: CustomSettings;
78
+ /**
79
+ * Custom checkout URL to redirect the customer to a checkout page.
80
+ * By default, customers are redirected to the standard Wix checkout page.
81
+ * Clients can override this behavior by providing their own URL here.
82
+ * If the URL contains the placeholder `{checkout_id}`, it will be replaced with the actual Cart ID.
83
+ * @maxLength 2048
84
+ */
85
+ customCheckoutUrl?: string | null;
86
+ /**
87
+ * The ID of the Order created from the Cart.
88
+ * This field is empty until the checkout process is completed.
89
+ * @format GUID
90
+ * @readonly
91
+ */
92
+ orderId?: string | null;
93
+ /**
94
+ * Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).
95
+ * @format GUID
96
+ * @readonly
97
+ */
98
+ purchaseFlowId?: string | null;
99
+ }
100
+ interface ExtendedFields {
101
+ /**
102
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
103
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
104
+ *
105
+ * You can only access fields for which you have the appropriate permissions.
106
+ *
107
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
108
+ */
109
+ namespaces?: Record<string, Record<string, any>>;
110
+ }
111
+ interface V2LineItem {
112
+ /**
113
+ * A unique identifier of the line item within the Cart.
114
+ * @format GUID
115
+ */
116
+ id?: string;
117
+ /** The name of the line item. */
118
+ name?: TranslatableString;
119
+ /** Quantity-related information about the line item. */
120
+ quantityInfo?: ItemQuantityInfo;
121
+ /** Pricing-related information about the line item. */
122
+ pricing?: ItemPricingInfo;
123
+ /** Information about the origin of the line item. */
124
+ source?: ItemSource;
125
+ /** Details about the item for display purposes. */
126
+ attributes?: ItemAttributes;
127
+ /** Delivery-related information about the line item. */
128
+ deliveryConfig?: ItemDeliveryConfig;
129
+ /** Tax-related information about the line item. */
130
+ taxConfig?: ItemTaxConfig;
131
+ /** Payment-related information about the line item. */
132
+ paymentConfig?: ItemPaymentConfig;
133
+ /** The availability status of the line item according to the inventory. */
134
+ status?: ItemStatusWithLiterals;
135
+ /**
136
+ * Custom extended fields for the line item object.
137
+ *
138
+ * [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.
139
+ */
140
+ extendedFields?: ExtendedFields;
141
+ /**
142
+ * Additional Fees to be added to this item calculation.
143
+ * @maxSize 5
144
+ */
145
+ additionalFees?: AdditionalFee[];
146
+ /**
147
+ * Modifier groups that were added to the item.
148
+ * @maxSize 25
149
+ */
150
+ modifierGroups?: ModifierGroup[];
151
+ /**
152
+ * Whether the item can only be purchased by site members.
153
+ * Default: `false`
154
+ */
155
+ membersOnly?: boolean;
156
+ }
157
+ interface TranslatableString {
158
+ /**
159
+ * __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).
160
+ *
161
+ * Min: 1 character.
162
+ * Max: 200 characters.
163
+ * @minLength 1
164
+ * @maxLength 200
165
+ */
166
+ original?: string;
167
+ /**
168
+ * String translated into the buyer's language.
169
+ *
170
+ * Min: 1 character.
171
+ * Max: 400 characters.
172
+ * Default: Same as `original`.
173
+ * @minLength 1
174
+ * @maxLength 400
175
+ */
176
+ translated?: string | null;
177
+ }
178
+ interface ItemQuantityInfo {
179
+ /**
180
+ * The final confirmed quantity of items to be purchased.
181
+ * This value is the minimum between the requested quantity and the available quantity.
182
+ * @min 1
183
+ * @max 100000
184
+ */
185
+ confirmedQuantity?: number;
186
+ /**
187
+ * The amount of items originally requested by the customer.
188
+ * @min 1
189
+ * @max 100000
190
+ */
191
+ requestedQuantity?: number;
192
+ /** The maximum quantity of items available for purchase. */
193
+ availableQuantity?: number | null;
194
+ /** Whether the line item quantity is fixed and cannot be changed. */
195
+ fixedQuantity?: boolean;
196
+ }
197
+ interface ItemPricingInfo {
198
+ /**
199
+ * Final unit price after applying automatic discounts.
200
+ * Includes tax if `tax_info.prices_include_tax` is true.
201
+ */
202
+ unitPrice?: MultiCurrencyPrice;
203
+ /**
204
+ * Final total price for this item (unit price × quantity).
205
+ * Includes tax if `tax_info.prices_include_tax` is true.
206
+ */
207
+ totalPrice?: MultiCurrencyPrice;
208
+ /**
209
+ * Additional description for the price.
210
+ * For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
211
+ */
212
+ priceDescription?: PriceDescription;
213
+ /** Indicates whether the price is not yet defined, and will be updated after the order is created. */
214
+ priceUndetermined?: boolean;
215
+ /** Detailed breakdown of price components. */
216
+ breakdown?: ItemPriceBreakdown;
217
+ }
218
+ interface MultiCurrencyPrice {
219
+ /**
220
+ * Amount.
221
+ * @decimalValue options { gte:0, lte:1000000000000000 }
222
+ */
223
+ amount?: string;
224
+ /**
225
+ * Converted amount.
226
+ * @readonly
227
+ * @decimalValue options { gte:0, lte:1000000000000000 }
228
+ */
229
+ convertedAmount?: string;
230
+ /**
231
+ * Amount formatted with currency symbol.
232
+ * @readonly
233
+ */
234
+ formattedAmount?: string;
235
+ /**
236
+ * Converted amount formatted with currency symbol.
237
+ * @readonly
238
+ */
239
+ formattedConvertedAmount?: string;
240
+ }
241
+ interface PriceDescription {
242
+ /**
243
+ * __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).
244
+ * @minLength 1
245
+ * @maxLength 100
246
+ */
247
+ original?: string;
248
+ /**
249
+ * Price description translated into the buyer's language.
250
+ *
251
+ * Default: Same as `original`.
252
+ * @minLength 1
253
+ * @maxLength 100
254
+ */
255
+ translated?: string | null;
256
+ }
257
+ interface ItemPriceBreakdown {
258
+ /**
259
+ * Full catalog price of a single item before any discounts, including modifiers.
260
+ * Includes tax if `tax_info.prices_include_tax` is true.
261
+ */
262
+ fullPrice?: MultiCurrencyPrice;
263
+ /**
264
+ * Catalog sale price of a single item, including modifiers.
265
+ * Includes tax if `tax_info.prices_include_tax` is true.
266
+ */
267
+ salePrice?: MultiCurrencyPrice;
268
+ /**
269
+ * Total price of all item modifiers for the entire quantity of this item.
270
+ * Includes tax if `tax_info.prices_include_tax` is true.
271
+ */
272
+ totalModifiersPrice?: MultiCurrencyPrice;
273
+ /** Total automatic discount applied to the entire quantity of this item. */
274
+ totalDiscount?: MultiCurrencyPrice;
275
+ }
276
+ interface ItemSource {
277
+ /**
278
+ * Whether the line item is a custom line item.
279
+ * Custom line items don't trigger the Catalog service plugin.
280
+ */
281
+ customLineItem?: boolean;
282
+ /**
283
+ * Catalog and item reference.
284
+ * Holds IDs for the item and the catalog it came from, as well as further optional info.
285
+ * Optional for custom line items, which don't trigger the Catalog service plugin.
286
+ */
287
+ catalogReference?: CatalogReference;
288
+ /**
289
+ * Overriding values for catalog item properties.
290
+ * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
291
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
292
+ */
293
+ catalogOverrideFields?: CatalogOverrideFields;
294
+ /**
295
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
296
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
297
+ * + in most cases, this field is the same as `catalogReference.catalogItemId`.
298
+ * + Used in membership validation.
299
+ * @minLength 1
300
+ * @maxLength 36
301
+ */
302
+ rootCatalogItemId?: string | null;
303
+ /**
304
+ * ID of the app managing the inventory.
305
+ * @format GUID
306
+ */
307
+ inventoryAppId?: string | null;
308
+ }
309
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
310
+ interface CatalogReference {
311
+ /**
312
+ * ID of the item within the catalog it belongs to.
313
+ * @minLength 1
314
+ * @maxLength 36
315
+ */
316
+ catalogItemId?: string;
317
+ /**
318
+ * ID of the app providing the catalog.
319
+ *
320
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
321
+ *
322
+ * For items from Wix catalogs, the following values always apply:
323
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
324
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
325
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
326
+ * @minLength 1
327
+ */
328
+ appId?: string;
329
+ /**
330
+ * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
331
+ *
332
+ * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
333
+ */
334
+ options?: Record<string, any> | null;
335
+ }
336
+ interface CatalogOverrideFields {
337
+ /** The name of the line item. */
338
+ name?: TranslatableString;
339
+ /**
340
+ * The sale price of a single item after modifiers but before automatic discount.
341
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
342
+ */
343
+ salePrice?: string | null;
344
+ /**
345
+ * The full price of a single item after modifiers but before automatic discount.
346
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
347
+ */
348
+ fullPrice?: string | null;
349
+ /**
350
+ * Item description lines.
351
+ * Used when displaying the line item to buyers.
352
+ * @maxSize 20
353
+ */
354
+ descriptionLines?: DescriptionLine[];
355
+ /** Physical properties of the item. */
356
+ physicalProperties?: PhysicalProperties;
357
+ /** Item image. */
358
+ image?: Image;
359
+ /** Payment method selected for the item. */
360
+ paymentOption?: PaymentOption;
361
+ /**
362
+ * Partial payment to be paid upfront during the checkout.
363
+ * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.
364
+ * @format DECIMAL_VALUE
365
+ * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
366
+ */
367
+ depositAmount?: string | null;
368
+ /**
369
+ * Whether to save the payment method on the order.
370
+ *
371
+ * Default: `false`
372
+ */
373
+ savePaymentMethod?: boolean | null;
374
+ }
375
+ interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
376
+ /** Description line plain text value. */
377
+ plainText?: PlainTextValue;
378
+ /** Description line color value. */
379
+ colorInfo?: Color;
380
+ /** Description line name. */
381
+ name?: DescriptionLineName;
382
+ }
383
+ /** @oneof */
384
+ interface DescriptionLineValueOneOf {
385
+ /** Description line plain text value. */
386
+ plainText?: PlainTextValue;
387
+ /** Description line color value. */
388
+ colorInfo?: Color;
389
+ }
390
+ /** @oneof */
391
+ interface DescriptionLineDescriptionLineValueOneOf {
392
+ }
393
+ interface DescriptionLineName {
394
+ /**
395
+ * 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).
396
+ * @maxLength 100
397
+ */
398
+ original?: string;
399
+ /**
400
+ * Description line name translated into the buyer's language.
401
+ *
402
+ * Default: Same as `original`.
403
+ * @maxLength 200
404
+ */
405
+ translated?: string | null;
406
+ }
407
+ interface PlainTextValue {
408
+ /**
409
+ * 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).
410
+ * @maxLength 600
411
+ */
412
+ original?: string;
413
+ /**
414
+ * Description line plain text value translated into the buyer's language.
415
+ *
416
+ * Default: Same as `original`.
417
+ * @maxLength 600
418
+ */
419
+ translated?: string | null;
420
+ }
421
+ interface Color {
422
+ /**
423
+ * 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).
424
+ * @maxLength 500
425
+ */
426
+ original?: string;
427
+ /**
428
+ * Description line color name translated into the buyer's language.
429
+ *
430
+ * Default: Same as `original`.
431
+ * @maxLength 500
432
+ */
433
+ translated?: string | null;
434
+ /** HEX or RGB color code for display. */
435
+ code?: string | null;
436
+ }
437
+ interface PhysicalProperties {
438
+ /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
439
+ weight?: number | null;
440
+ /**
441
+ * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
442
+ * @maxLength 40
443
+ */
444
+ sku?: string | null;
445
+ /** Whether this line item is shippable. */
446
+ shippable?: boolean;
447
+ }
448
+ interface Image {
449
+ /**
450
+ * WixMedia image ID.
451
+ * @maxLength 400
452
+ */
453
+ id?: string;
454
+ /**
455
+ * Image URL.
456
+ * @format WEB_URL
457
+ */
458
+ url?: string;
459
+ /**
460
+ * Original image height.
461
+ * @readonly
462
+ */
463
+ height?: number;
464
+ /**
465
+ * Original image width.
466
+ * @readonly
467
+ */
468
+ width?: number;
469
+ /**
470
+ * Image alt text.
471
+ * @maxLength 200
472
+ */
473
+ altText?: string | null;
474
+ /**
475
+ * Image filename.
476
+ * @readonly
477
+ * @maxLength 200
478
+ */
479
+ filename?: string | null;
480
+ }
481
+ interface PaymentOption {
482
+ /**
483
+ * Type of selected payment option for current item.
484
+ *
485
+ * Default: `FULL_PAYMENT_ONLINE`
486
+ */
487
+ value?: PaymentOptionTypeWithLiterals;
488
+ }
489
+ /** Type of selected payment option for catalog item */
490
+ declare enum PaymentOptionType {
491
+ /** The entire payment for this item happens as part of the checkout. */
492
+ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
493
+ /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
494
+ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
495
+ /** 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. */
496
+ MEMBERSHIP = "MEMBERSHIP",
497
+ /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
498
+ DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
499
+ /** 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`. */
500
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE",
501
+ /**
502
+ * Item price is charged to online membership. Any remaining amount not covered by the membership, such as item modifiers, is paid offline.
503
+ * @documentationMaturity preview
504
+ */
505
+ MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"
506
+ }
507
+ /** @enumType */
508
+ type PaymentOptionTypeWithLiterals = PaymentOptionType | 'FULL_PAYMENT_ONLINE' | 'FULL_PAYMENT_OFFLINE' | 'MEMBERSHIP' | 'DEPOSIT_ONLINE' | 'MEMBERSHIP_OFFLINE' | 'MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER';
509
+ interface ItemAttributes {
510
+ /**
511
+ * Description lines of the item.
512
+ * @maxSize 100
513
+ */
514
+ descriptionLines?: DescriptionLine[];
515
+ /** The image of the item. */
516
+ image?: Image;
517
+ /** URL to the item's page on the site. */
518
+ url?: PageUrlV2;
519
+ /**
520
+ * Policies to be displayed to the buyer on the checkout page.
521
+ * @maxSize 5
522
+ */
523
+ policies?: Policy[];
524
+ /** Item type. Either a preset type or custom. */
525
+ itemType?: ItemType;
526
+ /**
527
+ * Physical properties of the item.
528
+ * When relevant, contains information such as SKU, item weight, and shippability.
529
+ */
530
+ physicalProperties?: PhysicalProperties;
531
+ /** Subscription option information. */
532
+ subscriptionInfo?: SubscriptionOptionInfo;
533
+ /** Service properties. When relevant, this contains information such as date and number of participants. */
534
+ serviceProperties?: ServiceProperties;
535
+ }
536
+ interface PageUrlV2 {
537
+ /**
538
+ * The relative path for the page within the site. For example, `/product-page/a-product`.
539
+ * @maxLength 200
540
+ */
541
+ relativePath?: string;
542
+ /**
543
+ * The page's full URL. For example, `https://mysite.com/product-page/a-product`.
544
+ * @format WEB_URL
545
+ */
546
+ url?: string | null;
547
+ }
548
+ interface Policy {
549
+ /**
550
+ * Policy title - should be translated
551
+ * @minLength 1
552
+ * @maxLength 29
553
+ */
554
+ title?: string | null;
555
+ /**
556
+ * Policy content - should be translated
557
+ * @minLength 1
558
+ * @maxLength 3000
559
+ */
560
+ content?: string;
561
+ }
562
+ interface ItemType extends ItemTypeItemTypeDataOneOf {
563
+ /** Preset item type. */
564
+ preset?: ItemTypeItemTypeWithLiterals;
565
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
566
+ custom?: string;
567
+ }
568
+ /** @oneof */
569
+ interface ItemTypeItemTypeDataOneOf {
570
+ /** Preset item type. */
571
+ preset?: ItemTypeItemTypeWithLiterals;
572
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
573
+ custom?: string;
574
+ }
575
+ declare enum ItemTypeItemType {
576
+ UNRECOGNISED = "UNRECOGNISED",
577
+ PHYSICAL = "PHYSICAL",
578
+ DIGITAL = "DIGITAL",
579
+ GIFT_CARD = "GIFT_CARD",
580
+ SERVICE = "SERVICE"
581
+ }
582
+ /** @enumType */
583
+ type ItemTypeItemTypeWithLiterals = ItemTypeItemType | 'UNRECOGNISED' | 'PHYSICAL' | 'DIGITAL' | 'GIFT_CARD' | 'SERVICE';
584
+ interface SubscriptionOptionInfo {
585
+ /** Subscription option settings. */
586
+ subscriptionSettings?: SubscriptionSettings;
587
+ /** Subscription option title. */
588
+ title?: Title;
589
+ /** Subscription option description. */
590
+ description?: Description;
591
+ }
592
+ interface SubscriptionSettings {
593
+ /** Frequency of recurring payment. */
594
+ frequency?: SubscriptionFrequencyWithLiterals;
595
+ /**
596
+ * Interval of recurring payment.
597
+ *
598
+ * Default: `1`.
599
+ * If SubscriptionFrequency is Day the minimum interval is 7
600
+ * @min 1
601
+ * @max 3650
602
+ */
603
+ interval?: number | null;
604
+ /** Whether subscription is renewed automatically at the end of each period. */
605
+ autoRenewal?: boolean;
606
+ /**
607
+ * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.
608
+ * @min 1
609
+ */
610
+ billingCycles?: number | null;
611
+ /** Whether to allow the customer to cancel the subscription.. */
612
+ enableCustomerCancellation?: boolean;
613
+ /**
614
+ * Period until first cycle starts. If applied payNow will be 0
615
+ * If None => no free trial
616
+ */
617
+ freeTrialPeriod?: FreeTrialPeriod;
618
+ }
619
+ /** Frequency unit of recurring payment */
620
+ declare enum SubscriptionFrequency {
621
+ UNDEFINED = "UNDEFINED",
622
+ DAY = "DAY",
623
+ WEEK = "WEEK",
624
+ MONTH = "MONTH",
625
+ YEAR = "YEAR"
626
+ }
627
+ /** @enumType */
628
+ type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
629
+ interface FreeTrialPeriod {
630
+ /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
631
+ frequency?: SubscriptionFrequencyWithLiterals;
632
+ /**
633
+ * interval of period
634
+ * @min 1
635
+ * @max 999
636
+ */
637
+ interval?: number;
638
+ }
639
+ interface Title {
640
+ /**
641
+ * 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).
642
+ * @minLength 1
643
+ * @maxLength 150
644
+ */
645
+ original?: string;
646
+ /**
647
+ * Subscription option name translated into the buyer's language.
648
+ *
649
+ * Default: Same as `original`.
650
+ * @minLength 1
651
+ * @maxLength 150
652
+ */
653
+ translated?: string | null;
654
+ }
655
+ interface Description {
656
+ /**
657
+ * Subscription option description.
658
+ * @maxLength 500
659
+ */
660
+ original?: string;
661
+ /**
662
+ * Translated subscription option description.
663
+ * @maxLength 500
664
+ */
665
+ translated?: string | null;
666
+ }
667
+ interface ServiceProperties {
668
+ /**
669
+ * 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.
670
+ * For example, the start time of a class.
671
+ */
672
+ scheduledDate?: Date | null;
673
+ /**
674
+ * 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.
675
+ * @min 1
676
+ * @max 10000
677
+ */
678
+ numberOfParticipants?: number | null;
679
+ }
680
+ interface ItemDeliveryConfig {
681
+ /**
682
+ * Delivery profile ID.
683
+ * @format GUID
684
+ */
685
+ deliveryProfileId?: string | null;
686
+ /**
687
+ * An optional custom fulfiller's ID.
688
+ * @format GUID
689
+ */
690
+ fulfillerId?: string | null;
691
+ }
692
+ interface ItemTaxConfig {
693
+ /** Address to use for tax calculation purposes. */
694
+ taxableAddress?: TaxableAddress;
695
+ /**
696
+ * Tax group ID for this line item.
697
+ * @maxLength 50
698
+ */
699
+ taxGroupId?: string | null;
700
+ }
701
+ interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
702
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
703
+ addressType?: TaxableAddressTypeWithLiterals;
704
+ }
705
+ /** @oneof */
706
+ interface TaxableAddressTaxableAddressDataOneOf {
707
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
708
+ addressType?: TaxableAddressTypeWithLiterals;
709
+ }
710
+ declare enum TaxableAddressType {
711
+ UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
712
+ BUSINESS = "BUSINESS",
713
+ BILLING = "BILLING",
714
+ SHIPPING = "SHIPPING"
715
+ }
716
+ /** @enumType */
717
+ type TaxableAddressTypeWithLiterals = TaxableAddressType | 'UNKNOWN_TAXABLE_ADDRESS' | 'BUSINESS' | 'BILLING' | 'SHIPPING';
718
+ interface ItemPaymentConfig {
719
+ /**
720
+ * Whether to save the payment method on the order.
721
+ * Default: `false`
722
+ */
723
+ savePaymentMethod?: boolean;
724
+ /**
725
+ * Item payment policy that requires buyer consent to complete purchase.
726
+ * The payment policy will be displayed on the checkout page.
727
+ * @minLength 1
728
+ * @maxLength 2500
729
+ */
730
+ consentRequiredPaymentPolicy?: string | null;
731
+ /**
732
+ * Partial payment to be paid upfront during the checkout.
733
+ * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
734
+ */
735
+ depositAmount?: MultiCurrencyPrice;
736
+ /**
737
+ * Selected membership to be used as payment for this item.
738
+ * Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.
739
+ * This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`.
740
+ */
741
+ selectedMembership?: V2SelectedMembership;
742
+ /**
743
+ * Type of selected payment option for current item.
744
+ *
745
+ * Default: `FULL_PAYMENT_ONLINE`
746
+ */
747
+ paymentOption?: PaymentOptionTypeWithLiterals;
748
+ }
749
+ interface V2SelectedMembership {
750
+ /**
751
+ * Membership ID.
752
+ * @minLength 1
753
+ * @maxLength 100
754
+ */
755
+ id?: string;
756
+ /**
757
+ * ID of the app providing this payment option.
758
+ * @format GUID
759
+ */
760
+ appId?: string;
761
+ }
762
+ declare enum ItemStatus {
763
+ UNKNOWN_ITEM_STATUS = "UNKNOWN_ITEM_STATUS",
764
+ /** The item is available in the requested quantity. */
765
+ AVAILABLE = "AVAILABLE",
766
+ /** Only part of the requested quantity is available. */
767
+ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE",
768
+ /** The item is out of stock. */
769
+ OUT_OF_STOCK = "OUT_OF_STOCK",
770
+ /** The item is no longer exists in the catalog. */
771
+ NOT_EXISTS = "NOT_EXISTS"
772
+ }
773
+ /** @enumType */
774
+ type ItemStatusWithLiterals = ItemStatus | 'UNKNOWN_ITEM_STATUS' | 'AVAILABLE' | 'PARTIALLY_AVAILABLE' | 'OUT_OF_STOCK' | 'NOT_EXISTS';
775
+ interface AdditionalFee {
776
+ /**
777
+ * Additional fee's unique code or ID.
778
+ * @minLength 1
779
+ * @maxLength 100
780
+ */
781
+ code?: string | null;
782
+ /**
783
+ * Additional fee's name.
784
+ *
785
+ * Max: 50 characters
786
+ * @minLength 1
787
+ * @maxLength 50
788
+ */
789
+ name?: string;
790
+ /**
791
+ * Total additional fees. This `price` does not include any taxes that may apply to these additional fees.
792
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:2 }
793
+ */
794
+ price?: string;
795
+ /**
796
+ * Tax details.
797
+ *
798
+ * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.
799
+ */
800
+ taxDetails?: TaxDetails;
801
+ }
802
+ /** Tax details. */
803
+ interface TaxDetails {
804
+ /** Whether additional fee is taxable. */
805
+ taxable?: boolean;
806
+ /**
807
+ * Reserved for internal use.
808
+ * @format GUID
809
+ */
810
+ taxGroupId?: string | null;
811
+ }
812
+ interface ModifierGroup {
813
+ /**
814
+ * Modifier group ID.
815
+ * @minLength 1
816
+ * @maxLength 36
817
+ * @readonly
818
+ */
819
+ id?: string;
820
+ /** Modifier group name. */
821
+ name?: TranslatableString;
822
+ /**
823
+ * List of modifiers in this group.
824
+ * @minSize 1
825
+ * @maxSize 25
826
+ */
827
+ modifiers?: ItemModifier[];
828
+ }
829
+ interface ItemModifier {
830
+ /**
831
+ * Modifier ID.
832
+ * @minLength 1
833
+ * @maxLength 36
834
+ * @readonly
835
+ */
836
+ id?: string;
837
+ /**
838
+ * The quantity of this modifier.
839
+ * @min 1
840
+ * @max 100000
841
+ */
842
+ quantity?: number;
843
+ /** Primary display label for the modifier. */
844
+ label?: TranslatableString;
845
+ /** Additional details. */
846
+ details?: TranslatableString;
847
+ /** The price of the modifier. */
848
+ price?: MultiCurrencyPrice;
849
+ }
850
+ interface Discount {
851
+ /**
852
+ * A unique identifier of the discount within the Cart.
853
+ * @format GUID
854
+ */
855
+ id?: string;
856
+ /** The display name of the discount. */
857
+ name?: TranslatableString;
858
+ /** The source of the discount, indicating how it was applied. */
859
+ source?: DiscountSource;
860
+ /** The component in the Cart that the discount applies to. */
861
+ scope?: DiscountScopeWithLiterals;
862
+ /**
863
+ * List of benefits provided by the discount.
864
+ * @minSize 1
865
+ * @maxSize 100
866
+ */
867
+ benefits?: DiscountBenefit[];
868
+ /**
869
+ * The current status of the discount.
870
+ * TODO: remodel.
871
+ */
872
+ status?: DiscountStatusWithLiterals;
873
+ /**
874
+ * Number of subscription cycles this discount applies to.
875
+ * If unset, the discount applies to all billing cycles.
876
+ * @min 1
877
+ * @max 1000
878
+ */
879
+ subscriptionCycles?: number | null;
880
+ }
881
+ interface DiscountSource {
882
+ /** The type of the discount source. */
883
+ sourceType?: DiscountSourceTypeWithLiterals;
884
+ /**
885
+ * Coupon code that triggered the discount.
886
+ * Relevant for coupon discounts only.
887
+ * @maxLength 50
888
+ */
889
+ couponCode?: string | null;
890
+ }
891
+ declare enum DiscountSourceType {
892
+ UNKNOWN_DISCOUNT_SOURCE_TYPE = "UNKNOWN_DISCOUNT_SOURCE_TYPE",
893
+ /** The discount was applied automatically by a rule. */
894
+ AUTOMATIC_RULE = "AUTOMATIC_RULE",
895
+ /** The discount was applied by a coupon code. */
896
+ COUPON = "COUPON"
897
+ }
898
+ /** @enumType */
899
+ type DiscountSourceTypeWithLiterals = DiscountSourceType | 'UNKNOWN_DISCOUNT_SOURCE_TYPE' | 'AUTOMATIC_RULE' | 'COUPON';
900
+ declare enum DiscountScope {
901
+ UNKNOWN_DISCOUNT_SCOPE = "UNKNOWN_DISCOUNT_SCOPE",
902
+ /** The discount applies to the cart's subtotal. */
903
+ CART_SUBTOTAL = "CART_SUBTOTAL",
904
+ /** The discount applies to a specific line item. */
905
+ LINE_ITEM = "LINE_ITEM",
906
+ /** The discount applies to the delivery price. */
907
+ DELIVERY = "DELIVERY"
908
+ }
909
+ /** @enumType */
910
+ type DiscountScopeWithLiterals = DiscountScope | 'UNKNOWN_DISCOUNT_SCOPE' | 'CART_SUBTOTAL' | 'LINE_ITEM' | 'DELIVERY';
911
+ interface DiscountBenefit extends DiscountBenefitValueOneOf {
912
+ /** A specific monetary value deducted from the total cost. */
913
+ amountOff?: MultiCurrencyPrice;
914
+ /**
915
+ * The ID of line item that the discount applies to.
916
+ * Relevant for item-level discounts only.
917
+ * @format GUID
918
+ */
919
+ lineItemId?: string | null;
920
+ }
921
+ /** @oneof */
922
+ interface DiscountBenefitValueOneOf {
923
+ /** A specific monetary value deducted from the total cost. */
924
+ amountOff?: MultiCurrencyPrice;
925
+ }
926
+ declare enum DiscountStatus {
927
+ UNKNOWN_DISCOUNT_STATUS = "UNKNOWN_DISCOUNT_STATUS",
928
+ /** The discount is active and valid. */
929
+ ACTIVE = "ACTIVE",
930
+ /** The discount has expired. */
931
+ EXPIRED = "EXPIRED",
932
+ /** The discount was deleted from the system. */
933
+ DELETED = "DELETED",
934
+ /** The discount reached the maximum number of uses. */
935
+ MAX_USAGE_REACHED = "MAX_USAGE_REACHED"
936
+ }
937
+ /** @enumType */
938
+ type DiscountStatusWithLiterals = DiscountStatus | 'UNKNOWN_DISCOUNT_STATUS' | 'ACTIVE' | 'EXPIRED' | 'DELETED' | 'MAX_USAGE_REACHED';
939
+ interface CartSource {
940
+ /**
941
+ * Sales channel that created the Cart.
942
+ * @immutable
943
+ */
944
+ channelType?: ChannelTypeWithLiterals;
945
+ /**
946
+ * References to an external app and resource associated with this Cart.
947
+ * Used for integration and tracking across different platforms.
948
+ * @maxSize 10
949
+ * @immutable
950
+ */
951
+ externalReferences?: ExternalReference[];
952
+ /**
953
+ * ID of the entity that created the Cart.
954
+ * @readonly
955
+ */
956
+ createdBy?: CreatedBy;
957
+ /**
958
+ * Reference IDs for the app and component providing custom checkout page content.
959
+ *
960
+ * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
961
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
962
+ */
963
+ customContentReference?: CustomContentReference;
964
+ }
965
+ declare enum ChannelType {
966
+ /** Unspecified sales channel. This value is not supported. */
967
+ UNSPECIFIED = "UNSPECIFIED",
968
+ /** A web client. */
969
+ WEB = "WEB",
970
+ /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
971
+ POS = "POS",
972
+ /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
973
+ EBAY = "EBAY",
974
+ /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
975
+ AMAZON = "AMAZON",
976
+ /** Other sales platform. */
977
+ OTHER_PLATFORM = "OTHER_PLATFORM",
978
+ /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
979
+ WIX_APP_STORE = "WIX_APP_STORE",
980
+ /** 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) */
981
+ WIX_INVOICES = "WIX_INVOICES",
982
+ /** Wix merchant backoffice. */
983
+ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
984
+ /** Wish sales channel. */
985
+ WISH = "WISH",
986
+ /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
987
+ CLASS_PASS = "CLASS_PASS",
988
+ /** Global-E sales channel. */
989
+ GLOBAL_E = "GLOBAL_E",
990
+ /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
991
+ FACEBOOK = "FACEBOOK",
992
+ /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
993
+ ETSY = "ETSY",
994
+ /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
995
+ TIKTOK = "TIKTOK",
996
+ /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
997
+ FAIRE_COM = "FAIRE_COM",
998
+ /** PayPal Agentic Checkout sales channel. */
999
+ PAYPAL_AGENTIC_CHECKOUT = "PAYPAL_AGENTIC_CHECKOUT"
1000
+ }
1001
+ /** @enumType */
1002
+ 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';
1003
+ interface ExternalReference {
1004
+ /**
1005
+ * ID of the app associated with the purchase flow.
1006
+ * For example, the Wix Pay Links app ID.
1007
+ * @format GUID
1008
+ * @immutable
1009
+ */
1010
+ appId?: string;
1011
+ /**
1012
+ * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
1013
+ * For example, a Wix Pay Link ID.
1014
+ * @minLength 1
1015
+ * @maxLength 100
1016
+ * @immutable
1017
+ */
1018
+ resourceId?: string | null;
1019
+ }
1020
+ interface CreatedBy extends CreatedByIdOneOf {
1021
+ /**
1022
+ * Site visitor ID (if site visitor is **not** a member).
1023
+ * @format GUID
1024
+ * @readonly
1025
+ */
1026
+ visitorId?: string;
1027
+ /**
1028
+ * Site member ID.
1029
+ * @format GUID
1030
+ * @readonly
1031
+ */
1032
+ memberId?: string;
1033
+ /**
1034
+ * Wix user ID - when the Cart was created by a Wix user on behalf of a buyer.
1035
+ * For example, via POS (point of service).
1036
+ * @format GUID
1037
+ */
1038
+ userId?: string;
1039
+ /**
1040
+ * App ID - when the Cart was created by an external application or Wix service.
1041
+ * @format GUID
1042
+ */
1043
+ appId?: string;
1044
+ }
1045
+ /** @oneof */
1046
+ interface CreatedByIdOneOf {
1047
+ /**
1048
+ * Site visitor ID (if site visitor is **not** a member).
1049
+ * @format GUID
1050
+ * @readonly
1051
+ */
1052
+ visitorId?: string;
1053
+ /**
1054
+ * Site member ID.
1055
+ * @format GUID
1056
+ * @readonly
1057
+ */
1058
+ memberId?: string;
1059
+ /**
1060
+ * Wix user ID - when the Cart was created by a Wix user on behalf of a buyer.
1061
+ * For example, via POS (point of service).
1062
+ * @format GUID
1063
+ */
1064
+ userId?: string;
1065
+ /**
1066
+ * App ID - when the Cart was created by an external application or Wix service.
1067
+ * @format GUID
1068
+ */
1069
+ appId?: string;
1070
+ }
1071
+ interface CustomContentReference {
1072
+ /**
1073
+ * ID of the app providing the content.
1074
+ *
1075
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
1076
+ * @format GUID
1077
+ */
1078
+ appId?: string;
1079
+ /**
1080
+ * ID of the component within the app it belongs to.
1081
+ *
1082
+ * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
1083
+ * @format GUID
1084
+ */
1085
+ componentId?: string;
1086
+ }
1087
+ interface SiteInfo {
1088
+ /**
1089
+ * The ID of the business location associated with the cart.
1090
+ * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
1091
+ * @format GUID
1092
+ */
1093
+ businessLocationId?: string | null;
1094
+ /**
1095
+ * The business’s unit of weight measurement (e.g., KG, LB).
1096
+ * @readonly
1097
+ */
1098
+ weightUnit?: WeightUnitWithLiterals;
1099
+ /**
1100
+ * The business’s default language, represented as a two-letter ISO 639-1 code.
1101
+ * @format LANGUAGE
1102
+ * @readonly
1103
+ */
1104
+ languageCode?: string;
1105
+ /**
1106
+ * The business’s default currency, represented as a three-letter ISO 4217 code.
1107
+ * @format CURRENCY
1108
+ * @readonly
1109
+ */
1110
+ currencyCode?: string;
1111
+ }
1112
+ declare enum WeightUnit {
1113
+ /** Weight unit can't be classified due to an error. */
1114
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
1115
+ /** Kilograms. */
1116
+ KG = "KG",
1117
+ /** Pounds. */
1118
+ LB = "LB"
1119
+ }
1120
+ /** @enumType */
1121
+ type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
1122
+ interface CustomerInfo extends CustomerInfoIdOneOf {
1123
+ /**
1124
+ * Site visitor ID (if site visitor is **not** a member).
1125
+ * @format GUID
1126
+ * @readonly
1127
+ */
1128
+ visitorId?: string;
1129
+ /**
1130
+ * Site member ID.
1131
+ * @format GUID
1132
+ * @readonly
1133
+ */
1134
+ memberId?: string;
1135
+ /**
1136
+ * Wix user ID - when the Cart was created by a Wix user on behalf of a customer.
1137
+ * For example, via POS (point of service).
1138
+ * @format GUID
1139
+ * @readonly
1140
+ */
1141
+ userId?: string;
1142
+ /**
1143
+ * The Contact ID of the customer.
1144
+ * Created automatically if one does not yet exist.
1145
+ * For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).
1146
+ * @format GUID
1147
+ * @readonly
1148
+ */
1149
+ contactId?: string | null;
1150
+ /**
1151
+ * The customer's email address.
1152
+ * @format EMAIL
1153
+ */
1154
+ email?: string | null;
1155
+ /**
1156
+ * The customer's language, represented as a two-letter ISO 639-1 code.
1157
+ * Resolved automatically from the request metadata ('x-wix-linguist' header).
1158
+ * @format LANGUAGE
1159
+ * @readonly
1160
+ */
1161
+ languageCode?: string;
1162
+ /**
1163
+ * The customer’s currency, represented as a three-letter ISO 4217 code.
1164
+ * Resolved automatically from the request metadata ('x-wix-currency' header).
1165
+ * @format CURRENCY
1166
+ * @readonly
1167
+ */
1168
+ currencyCode?: string;
1169
+ /**
1170
+ * The [buyer note](https://support.wix.com/en/article/wix-stores-viewing-customer-notes) left by the customer.
1171
+ * @maxLength 1000
1172
+ */
1173
+ buyerNote?: string | null;
1174
+ }
1175
+ /** @oneof */
1176
+ interface CustomerInfoIdOneOf {
1177
+ /**
1178
+ * Site visitor ID (if site visitor is **not** a member).
1179
+ * @format GUID
1180
+ * @readonly
1181
+ */
1182
+ visitorId?: string;
1183
+ /**
1184
+ * Site member ID.
1185
+ * @format GUID
1186
+ * @readonly
1187
+ */
1188
+ memberId?: string;
1189
+ /**
1190
+ * Wix user ID - when the Cart was created by a Wix user on behalf of a customer.
1191
+ * For example, via POS (point of service).
1192
+ * @format GUID
1193
+ * @readonly
1194
+ */
1195
+ userId?: string;
1196
+ }
1197
+ interface DeliveryInfo {
1198
+ /** The delivery address. */
1199
+ address?: Address;
1200
+ /** The delivery recipient. */
1201
+ recipient?: FullAddressContactDetails;
1202
+ /** The selected delivery method by the customer. */
1203
+ method?: DeliveryMethod;
1204
+ }
1205
+ /** Physical address */
1206
+ interface Address {
1207
+ /**
1208
+ * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
1209
+ * @format COUNTRY
1210
+ */
1211
+ country?: string | null;
1212
+ /**
1213
+ * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
1214
+ * @maxLength 50
1215
+ */
1216
+ subdivision?: string | null;
1217
+ /**
1218
+ * City name.
1219
+ * @maxLength 50
1220
+ */
1221
+ city?: string | null;
1222
+ /**
1223
+ * Postal or zip code.
1224
+ * @maxLength 50
1225
+ */
1226
+ postalCode?: string | null;
1227
+ /** Street address. */
1228
+ streetAddress?: StreetAddress;
1229
+ /**
1230
+ * Main address line (usually street name and number).
1231
+ * @maxLength 150
1232
+ */
1233
+ addressLine?: string | null;
1234
+ /**
1235
+ * Free text providing more detailed address info. Usually contains apt, suite, floor.
1236
+ * @maxLength 100
1237
+ */
1238
+ addressLine2?: string | null;
1239
+ /**
1240
+ * Country's full name.
1241
+ * @readonly
1242
+ */
1243
+ countryFullname?: string | null;
1244
+ /**
1245
+ * Subdivision full-name.
1246
+ * @readonly
1247
+ */
1248
+ subdivisionFullname?: string | null;
1249
+ }
1250
+ interface StreetAddress {
1251
+ /** Street number. */
1252
+ number?: string;
1253
+ /** Street name. */
1254
+ name?: string;
1255
+ }
1256
+ /** Full contact details for an address */
1257
+ interface FullAddressContactDetails {
1258
+ /**
1259
+ * First name.
1260
+ * @maxLength 100
1261
+ */
1262
+ firstName?: string | null;
1263
+ /**
1264
+ * Last name.
1265
+ * @maxLength 100
1266
+ */
1267
+ lastName?: string | null;
1268
+ /**
1269
+ * Phone number.
1270
+ * @format PHONE
1271
+ */
1272
+ phone?: string | null;
1273
+ /**
1274
+ * Company name.
1275
+ * @maxLength 1000
1276
+ */
1277
+ company?: string | null;
1278
+ /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
1279
+ vatId?: VatId;
1280
+ }
1281
+ interface VatId {
1282
+ /** Customer's tax ID. */
1283
+ id?: string;
1284
+ /**
1285
+ * Tax type.
1286
+ *
1287
+ * Supported values:
1288
+ * + `CPF`: for individual tax payers
1289
+ * + `CNPJ`: for corporations
1290
+ */
1291
+ type?: VatTypeWithLiterals;
1292
+ }
1293
+ /** tax info types */
1294
+ declare enum VatType {
1295
+ UNSPECIFIED = "UNSPECIFIED",
1296
+ /** CPF - for individual tax payers. */
1297
+ CPF = "CPF",
1298
+ /** CNPJ - for corporations */
1299
+ CNPJ = "CNPJ"
1300
+ }
1301
+ /** @enumType */
1302
+ type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
1303
+ interface DeliveryMethod {
1304
+ /**
1305
+ * The carrier app id
1306
+ * @format GUID
1307
+ */
1308
+ appId?: string;
1309
+ /**
1310
+ * Unique code that acts as an ID for a shipping rate.
1311
+ * For example, `"usps_std_overnight"`.
1312
+ * @maxLength 250
1313
+ */
1314
+ code?: string;
1315
+ /**
1316
+ * Delivery rate title.
1317
+ * For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`.
1318
+ * @readonly
1319
+ */
1320
+ title?: TranslatableString;
1321
+ /**
1322
+ * Whether the delivery method is a pickup option.
1323
+ * @readonly
1324
+ */
1325
+ pickup?: boolean;
1326
+ }
1327
+ interface TaxInfo {
1328
+ /**
1329
+ * Indicates whether tax is already included in prices (line items, discounts, delivery, additional fess).
1330
+ * @readonly
1331
+ */
1332
+ pricesIncludeTax?: boolean;
1333
+ }
1334
+ interface PaymentInfo {
1335
+ /**
1336
+ * A list of gift cards to pay with.
1337
+ * Currently only one gift card is supported.
1338
+ * @readonly
1339
+ * @maxSize 1
1340
+ */
1341
+ giftCards?: GiftCard[];
1342
+ /**
1343
+ * The currency to pay with, represented as a three-letter ISO 4217 code.
1344
+ * @format CURRENCY
1345
+ * @readonly
1346
+ */
1347
+ currencyCode?: string;
1348
+ /** Billing address. */
1349
+ billingAddress?: Address;
1350
+ /** Full contact details for billing. */
1351
+ billingContact?: FullAddressContactDetails;
1352
+ }
1353
+ interface GiftCard {
1354
+ /**
1355
+ * A unique identifier of the gift card within the Cart.
1356
+ * @format GUID
1357
+ * @readonly
1358
+ */
1359
+ id?: string;
1360
+ /**
1361
+ * A partially hidden version of the actual gift card code
1362
+ * @maxLength 50
1363
+ * @readonly
1364
+ */
1365
+ obfuscatedCode?: string;
1366
+ /**
1367
+ * App ID of the gift card provider.
1368
+ * @format GUID
1369
+ * @readonly
1370
+ */
1371
+ appId?: string;
1372
+ /**
1373
+ * External ID in the gift card provider's system.
1374
+ * Used for integration and tracking across different platforms.
1375
+ * @minLength 1
1376
+ * @maxLength 50
1377
+ */
1378
+ externalId?: string | null;
1379
+ }
1380
+ interface PricingInfo {
1381
+ /** The sum of all line items after applying automatic discounts. */
1382
+ subtotal?: MultiCurrencyPrice;
1383
+ /** The coupon discount amount. Automatic discounts are not included in this amount. */
1384
+ discount?: MultiCurrencyPrice;
1385
+ /** The sum of all line items after applying all discounts. */
1386
+ discountedSubtotal?: MultiCurrencyPrice;
1387
+ }
1388
+ declare enum CartStatus {
1389
+ /** A new Cart. */
1390
+ CREATED = "CREATED",
1391
+ /** The checkout process is completed. */
1392
+ CHECKOUT_COMPLETED = "CHECKOUT_COMPLETED"
1393
+ }
1394
+ /** @enumType */
1395
+ type CartStatusWithLiterals = CartStatus | 'CREATED' | 'CHECKOUT_COMPLETED';
1396
+ interface CustomSettings {
1397
+ /**
1398
+ * Whether to restrict the option to add or remove a gift card on the checkout page.
1399
+ * Default: `false`
1400
+ */
1401
+ lockGiftCard?: boolean;
1402
+ /**
1403
+ * Whether to restrict the option to add or remove a coupon code on the checkout page.
1404
+ * Default: `false`
1405
+ */
1406
+ lockCouponCode?: boolean;
1407
+ /**
1408
+ * Whether to disable policy agreement checkout in the checkout page.
1409
+ * Default: `false`
1410
+ */
1411
+ policyAgreementCheckboxDisabled?: boolean;
1412
+ /**
1413
+ * Whether to disable manual payment option for this checkout.
1414
+ * Default: `false`
1415
+ */
1416
+ manualPaymentDisabled?: boolean;
1417
+ }
1418
+ interface CartSummary {
1419
+ /**
1420
+ * The Cart ID.
1421
+ * @format GUID
1422
+ */
1423
+ cartId?: string;
1424
+ /**
1425
+ * Summarized details for each line item in the cart.
1426
+ * @maxSize 300
1427
+ */
1428
+ lineItems?: LineItemSummary[];
1429
+ /**
1430
+ * List of discounts applied to the cart.
1431
+ * @maxSize 100
1432
+ */
1433
+ discounts?: Discount[];
1434
+ /** Summary of the delivery costs. */
1435
+ deliverySummary?: DeliverySummary;
1436
+ /**
1437
+ * List of additional fees applied to the cart.
1438
+ * @maxSize 100
1439
+ */
1440
+ additionalFees?: V2AdditionalFee[];
1441
+ /** Summary of tax calculations applied to the cart. */
1442
+ taxSummary?: TaxSummary;
1443
+ /** Summary of all calculated price components in the cart. */
1444
+ priceSummary?: PriceSummary;
1445
+ /** Payment details summarizing how the customer will pay for the order. */
1446
+ paymentSummary?: PaymentSummary;
1447
+ /**
1448
+ * List of errors that occurred during the calculation process.
1449
+ * @maxSize 100
1450
+ */
1451
+ errors?: CalculationError[];
1452
+ /**
1453
+ * 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)).
1454
+ * @maxSize 100
1455
+ */
1456
+ violations?: Violation[];
1457
+ /**
1458
+ * A token representing the Cart's calculated prices.
1459
+ *
1460
+ * The client can pass this token when completing the checkout to ensure that the
1461
+ * prices the customer saw match the final prices at checkout.
1462
+ *
1463
+ * The server will validate the token if provided by recalculating the cart and comparing the
1464
+ * resulting pricing token. If the validation fails, the checkout will be rejected.
1465
+ *
1466
+ * This mechanism protects against unexpected price changes or tampering between
1467
+ * cart calculation and order placement.
1468
+ *
1469
+ * The token is opaque and should not be parsed or modified by clients.
1470
+ * @maxLength 1024
1471
+ */
1472
+ priceVerificationToken?: string | null;
1473
+ }
1474
+ interface LineItemSummary {
1475
+ /**
1476
+ * Line item ID.
1477
+ * @format GUID
1478
+ */
1479
+ lineItemId?: string;
1480
+ /**
1481
+ * The quantity of the line item.
1482
+ * @min 1
1483
+ * @max 100000
1484
+ */
1485
+ quantity?: number;
1486
+ /**
1487
+ * Final unit price after applying automatic discounts.
1488
+ * Includes tax if `tax_summary.prices_include_tax` is true.
1489
+ */
1490
+ unitPrice?: MultiCurrencyPrice;
1491
+ /**
1492
+ * Total price for the line item (unit price × quantity).
1493
+ * Includes tax if `tax_summary.prices_include_tax` is true.
1494
+ */
1495
+ totalPrice?: MultiCurrencyPrice;
1496
+ }
1497
+ interface DeliverySummary {
1498
+ /** The calculated delivery method. */
1499
+ method?: DeliveryMethod;
1500
+ /**
1501
+ * Delivery price after discount.
1502
+ * Includes tax if `tax_summary.prices_include_tax` is true.
1503
+ */
1504
+ price?: MultiCurrencyPrice;
1505
+ }
1506
+ interface V2AdditionalFee {
1507
+ /**
1508
+ * Additional fee's code.
1509
+ * @minLength 1
1510
+ * @maxLength 100
1511
+ */
1512
+ code?: string | null;
1513
+ /** Additional fee's name. */
1514
+ name?: TranslatableString;
1515
+ /**
1516
+ * Provider's app id.
1517
+ * @minLength 1
1518
+ * @maxLength 100
1519
+ */
1520
+ providerAppId?: string | null;
1521
+ /**
1522
+ * The line items associated with this fee.
1523
+ * If the list is empty, the fee will be associated with the entire cart.
1524
+ * @format GUID
1525
+ * @maxSize 100
1526
+ */
1527
+ lineItemIds?: string[];
1528
+ /**
1529
+ * Additional fee's price.
1530
+ * Includes tax if `tax_summary.prices_include_tax` is true.
1531
+ */
1532
+ price?: MultiCurrencyPrice;
1533
+ /**
1534
+ * Number of subscription cycle this fee applies to.
1535
+ * If None and discount is linked to subscription line item, it applies to all cycles.
1536
+ * @min 1
1537
+ * @max 999
1538
+ */
1539
+ subscriptionCycles?: number | null;
1540
+ }
1541
+ interface TaxSummary {
1542
+ /**
1543
+ * List of taxes applied to the cart.
1544
+ * @maxSize 100
1545
+ */
1546
+ taxes?: Tax[];
1547
+ /**
1548
+ * Indicates whether tax is already included in prices (line items, discounts, delivery, additional fess).
1549
+ * @readonly
1550
+ */
1551
+ pricesIncludeTax?: boolean;
1552
+ /**
1553
+ * Taxes applied to line items.
1554
+ * @maxSize 300
1555
+ */
1556
+ lineItemTaxes?: LineItemTax[];
1557
+ /** Tax applied to the delivery method. */
1558
+ deliveryTax?: MultiCurrencyPrice;
1559
+ /**
1560
+ * Taxes applied to additional fees.
1561
+ * @maxSize 100
1562
+ */
1563
+ additionalFeeTaxes?: AdditionalFeeTax[];
1564
+ }
1565
+ interface Tax {
1566
+ /** The name of the tax. */
1567
+ name?: TranslatableString;
1568
+ /** Amount for which tax is calculated. */
1569
+ taxableAmount?: MultiCurrencyPrice;
1570
+ /**
1571
+ * Tax rate %, as a decimal point between 0 and 1.
1572
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
1573
+ */
1574
+ rate?: string;
1575
+ /** Calculated tax, based on `taxable_amount` and `rate`. */
1576
+ totalTax?: MultiCurrencyPrice;
1577
+ }
1578
+ interface LineItemTax {
1579
+ /**
1580
+ * Line item ID.
1581
+ * @format GUID
1582
+ */
1583
+ lineItemId?: string;
1584
+ /** Tax amount applied to the additional fee. */
1585
+ tax?: MultiCurrencyPrice;
1586
+ }
1587
+ interface AdditionalFeeTax {
1588
+ /**
1589
+ * Additional fee's code.
1590
+ * @minLength 1
1591
+ * @maxLength 100
1592
+ */
1593
+ additionalFeeCode?: string;
1594
+ /** Tax amount applied to the additional fee. */
1595
+ tax?: MultiCurrencyPrice;
1596
+ }
1597
+ interface PriceSummary {
1598
+ /**
1599
+ * Total price of all line items after applying item-level discounts.
1600
+ * FIXME: Currently we don't know if the subtotal includes tax or not.
1601
+ */
1602
+ subtotal?: MultiCurrencyPrice;
1603
+ /**
1604
+ * Total cart-level discount applied to the subtotal.
1605
+ * Line-item discounts are reflected in the subtotal and not included here.
1606
+ * Currently supports only a single coupon.
1607
+ */
1608
+ discount?: MultiCurrencyPrice;
1609
+ /**
1610
+ * Final delivery cost for the cart.
1611
+ * FIXME: Currently we don't know if the subtotal includes tax or not.
1612
+ */
1613
+ delivery?: MultiCurrencyPrice;
1614
+ /**
1615
+ * Total additional fees associated with the cart.
1616
+ * FIXME: Currently we don't know if the subtotal includes tax or not.
1617
+ */
1618
+ additionalFees?: MultiCurrencyPrice;
1619
+ /** Total tax amount calculated across all applicable components (items, discounts, delivery, and fees). */
1620
+ tax?: MultiCurrencyPrice;
1621
+ /**
1622
+ * Total amount to be paid.
1623
+ * Curenntly, total = subtotal - discount + delivery + additional_fees + tax.
1624
+ */
1625
+ total?: MultiCurrencyPrice;
1626
+ }
1627
+ interface PaymentSummary {
1628
+ /**
1629
+ * The amount that will be deducted from each gift card added to the cart.
1630
+ * Currently, only one gift card is supported.
1631
+ * @maxSize 1
1632
+ */
1633
+ giftCards?: GiftCardSummary[];
1634
+ /**
1635
+ * A list of valid memberships that will be charged as part of the order.
1636
+ * @maxSize 300
1637
+ */
1638
+ memberships?: SelectedMembership[];
1639
+ /** Indicates whether a remaining payment is required to create the order, after applying gift cards. */
1640
+ requiresPaymentAfterGiftCard?: boolean;
1641
+ /** The total amount due after applying all gift cards. */
1642
+ totalAfterGiftCards?: MultiCurrencyPrice;
1643
+ /** The upfront amount to be charged immediately when placing the order (after applying gift cards). */
1644
+ payNow?: MultiCurrencyPrice;
1645
+ /** The remaining amount to be collected later. */
1646
+ payLater?: MultiCurrencyPrice;
1647
+ /** The amount to be charged after a free trial period (typically for subscription-based products). */
1648
+ payAfterFreeTrial?: MultiCurrencyPrice;
1649
+ }
1650
+ interface GiftCardSummary {
1651
+ /**
1652
+ * The ID of the gift card assigned by the Cart.
1653
+ * @format GUID
1654
+ */
1655
+ giftCardId?: string;
1656
+ /** The amount to be reduced from the gift card's balance. */
1657
+ redeemAmount?: MultiCurrencyPrice;
1658
+ }
1659
+ interface SelectedMembership {
1660
+ /**
1661
+ * Membership ID.
1662
+ * @minLength 1
1663
+ * @maxLength 100
1664
+ */
1665
+ id?: string;
1666
+ /**
1667
+ * ID of the app providing this payment option.
1668
+ * @format GUID
1669
+ */
1670
+ appId?: string;
1671
+ /**
1672
+ * IDs of the line items this membership applies to.
1673
+ * @minSize 1
1674
+ * @maxSize 300
1675
+ * @minLength 1
1676
+ * @maxLength 100
1677
+ */
1678
+ lineItemIds?: string[];
1679
+ }
1680
+ interface CalculationError {
1681
+ /** The calculation component that caused the error. */
1682
+ component?: CalculationComponentWithLiterals;
1683
+ /** Machine-readable error code. */
1684
+ code?: ErrorCodeWithLiterals;
1685
+ /**
1686
+ * Human-readable explanation.
1687
+ * @maxLength 100
1688
+ */
1689
+ description?: string | null;
1690
+ }
1691
+ declare enum CalculationComponent {
1692
+ UNKNOWN_CALCULATION_COMPONENT = "UNKNOWN_CALCULATION_COMPONENT",
1693
+ DISCOUNTS = "DISCOUNTS",
1694
+ DELIVERY = "DELIVERY",
1695
+ TAX = "TAX",
1696
+ MEMBERSHIPS = "MEMBERSHIPS",
1697
+ GIFT_CARDS = "GIFT_CARDS"
1698
+ }
1699
+ /** @enumType */
1700
+ type CalculationComponentWithLiterals = CalculationComponent | 'UNKNOWN_CALCULATION_COMPONENT' | 'DISCOUNTS' | 'DELIVERY' | 'TAX' | 'MEMBERSHIPS' | 'GIFT_CARDS';
1701
+ declare enum ErrorCode {
1702
+ UNKNOWN_ERROR_CODE = "UNKNOWN_ERROR_CODE"
1703
+ }
1704
+ /** @enumType */
1705
+ type ErrorCodeWithLiterals = ErrorCode | 'UNKNOWN_ERROR_CODE';
1706
+ interface Violation {
1707
+ /** 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. */
1708
+ severity?: SeverityWithLiterals;
1709
+ /** Target location on a checkout or cart page where the violation will be displayed. */
1710
+ target?: Target;
1711
+ /**
1712
+ * 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>`.
1713
+ * @minLength 1
1714
+ * @maxLength 1000
1715
+ */
1716
+ description?: string | null;
1717
+ }
1718
+ declare enum Severity {
1719
+ /** The user is allowed to move forward in the flow. */
1720
+ WARNING = "WARNING",
1721
+ /**
1722
+ * The user is blocked from moving forward in the flow.
1723
+ * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
1724
+ */
1725
+ ERROR = "ERROR"
1726
+ }
1727
+ /** @enumType */
1728
+ type SeverityWithLiterals = Severity | 'WARNING' | 'ERROR';
1729
+ interface Target extends TargetTargetTypeOneOf {
1730
+ /** General (other) violation. */
1731
+ other?: Other;
1732
+ /** Specific line item violation. */
1733
+ lineItem?: LineItem;
1734
+ }
1735
+ /** @oneof */
1736
+ interface TargetTargetTypeOneOf {
1737
+ /** General (other) violation. */
1738
+ other?: Other;
1739
+ /** Specific line item violation. */
1740
+ lineItem?: LineItem;
1741
+ }
1742
+ /** Available locations on the webpage */
1743
+ declare enum NameInOther {
1744
+ /** Default location, in case no specific location is specified. */
1745
+ OTHER_DEFAULT = "OTHER_DEFAULT"
1746
+ }
1747
+ /** @enumType */
1748
+ type NameInOtherWithLiterals = NameInOther | 'OTHER_DEFAULT';
1749
+ /** Available locations on the line item */
1750
+ declare enum NameInLineItem {
1751
+ /** Default location, in case no specific location is specified. */
1752
+ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
1753
+ }
1754
+ /** @enumType */
1755
+ type NameInLineItemWithLiterals = NameInLineItem | 'LINE_ITEM_DEFAULT';
1756
+ /** General (other) violation. */
1757
+ interface Other {
1758
+ /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
1759
+ name?: NameInOtherWithLiterals;
1760
+ }
1761
+ /** Specific line item violation. */
1762
+ interface LineItem {
1763
+ /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
1764
+ name?: NameInLineItemWithLiterals;
1765
+ /** ID of the line item containing the violation. */
1766
+ id?: string | null;
1767
+ }
1768
+ interface CatalogItemInput {
1769
+ /** A reference to the catalog item. */
1770
+ catalogReference?: CatalogReference;
1771
+ /**
1772
+ * The amount of catalog items requested by the customer.
1773
+ * @min 1
1774
+ * @max 100000
1775
+ */
1776
+ quantity?: number;
1777
+ /** Selected membership to be used as payment for this item. */
1778
+ selectedMembership?: V2SelectedMembership;
1779
+ /**
1780
+ * Overriding values for catalog item properties.
1781
+ * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
1782
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
1783
+ */
1784
+ catalogOverrideFields?: CatalogOverrideFields;
1785
+ /**
1786
+ * Custom extended fields for the line item object.
1787
+ *
1788
+ * [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.
1789
+ */
1790
+ extendedFields?: ExtendedFields;
1791
+ /**
1792
+ * ID of the app managing the inventory.
1793
+ * @format GUID
1794
+ */
1795
+ inventoryAppId?: string | null;
1796
+ }
1797
+ interface CustomItemInput {
1798
+ /** The name of the line item. */
1799
+ name?: TranslatableString;
1800
+ /** Quantity-related information about the line item. */
1801
+ quantityInfo?: CustomItemQuantityInfo;
1802
+ /** Pricing-related information about the line item. */
1803
+ pricing?: CustomItemPricingInfo;
1804
+ /** Information about the origin of the line item. */
1805
+ source?: CustomItemSource;
1806
+ /** Details about the item for display purposes. */
1807
+ attributes?: CustomItemAttributes;
1808
+ /** Delivery-related information about the line item. */
1809
+ deliveryConfig?: CustomItemDeliveryConfig;
1810
+ /** Tax-related information about the line item. */
1811
+ taxConfig?: CustomItemTaxConfig;
1812
+ /** Payment-related information about the line item. */
1813
+ paymentConfig?: CustomItemPaymentConfig;
1814
+ /**
1815
+ * Modifier groups that were added to the item.
1816
+ * @maxSize 25
1817
+ */
1818
+ modifierGroups?: ModifierGroup[];
1819
+ /**
1820
+ * Whether the item can only be purchased by site members.
1821
+ * Default: `false`
1822
+ */
1823
+ membersOnly?: boolean;
1824
+ }
1825
+ interface CustomItemQuantityInfo {
1826
+ /**
1827
+ * The amount of items originally requested by the customer.
1828
+ * @min 1
1829
+ * @max 100000
1830
+ */
1831
+ requestedQuantity?: number;
1832
+ /** The maximum quantity of items available for purchase. */
1833
+ availableQuantity?: number | null;
1834
+ /** Whether the line item quantity is fixed and cannot be changed. */
1835
+ fixedQuantity?: boolean;
1836
+ }
1837
+ interface CustomItemPricingInfo {
1838
+ /**
1839
+ * Sale price of a single item, without modifiers.
1840
+ * Includes tax if `tax_info.prices_include_tax` is true.
1841
+ * @format DECIMAL_VALUE
1842
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
1843
+ */
1844
+ price?: string;
1845
+ /**
1846
+ * Full price of a single item before any discounts, without modifiers.
1847
+ * Defaults to `price` when not provided.
1848
+ * Includes tax if `tax_info.prices_include_tax` is true.
1849
+ * @format DECIMAL_VALUE
1850
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:3 }
1851
+ */
1852
+ fullPrice?: string | null;
1853
+ /**
1854
+ * Additional description for the price.
1855
+ * For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
1856
+ */
1857
+ priceDescription?: PriceDescription;
1858
+ /** Indicates whether the price is not yet defined, and will be updated after the order is created. */
1859
+ priceUndetermined?: boolean;
1860
+ }
1861
+ interface CustomItemSource {
1862
+ /**
1863
+ * Catalog and item reference.
1864
+ * Holds IDs for the item and the catalog it came from, as well as further optional info.
1865
+ * Optional for custom line items, which don't trigger the Catalog service plugin.
1866
+ */
1867
+ catalogReference?: CatalogReference;
1868
+ /**
1869
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
1870
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
1871
+ * + in most cases, this field is the same as `catalogReference.catalogItemId`.
1872
+ * + Used in membership validation.
1873
+ * @minLength 1
1874
+ * @maxLength 36
1875
+ */
1876
+ rootCatalogItemId?: string | null;
1877
+ /**
1878
+ * ID of the app managing the inventory.
1879
+ * @format GUID
1880
+ */
1881
+ inventoryAppId?: string | null;
1882
+ }
1883
+ interface CustomItemAttributes {
1884
+ /**
1885
+ * Description lines of the item.
1886
+ * @maxSize 100
1887
+ */
1888
+ descriptionLines?: DescriptionLine[];
1889
+ /** The image of the item. */
1890
+ image?: Image;
1891
+ /** URL to the item's page on the site. */
1892
+ url?: PageUrlV2;
1893
+ /** Item type. Either a preset type or custom. */
1894
+ itemType?: ItemType;
1895
+ /**
1896
+ * Physical properties of the item.
1897
+ * When relevant, contains information such as SKU, item weight, and shippability.
1898
+ */
1899
+ physicalProperties?: PhysicalProperties;
1900
+ /** Subscription option information. */
1901
+ subscriptionInfo?: SubscriptionOptionInfo;
1902
+ /** Service properties. When relevant, this contains information such as date and number of participants. */
1903
+ serviceProperties?: ServiceProperties;
1904
+ }
1905
+ interface CustomItemDeliveryConfig {
1906
+ /**
1907
+ * Delivery profile ID.
1908
+ * @format GUID
1909
+ */
1910
+ deliveryProfileId?: string | null;
1911
+ }
1912
+ interface CustomItemTaxConfig {
1913
+ /** Address to use for tax calculation purposes. */
1914
+ taxableAddress?: TaxableAddress;
1915
+ /**
1916
+ * Tax group ID for this line item.
1917
+ * @maxLength 50
1918
+ */
1919
+ taxGroupId?: string | null;
1920
+ }
1921
+ interface CustomItemPaymentConfig {
1922
+ /**
1923
+ * Partial payment to be paid upfront during the checkout.
1924
+ * Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
1925
+ */
1926
+ depositAmount?: MultiCurrencyPrice;
1927
+ /**
1928
+ * Type of selected payment option for current item.
1929
+ *
1930
+ * Default: `FULL_PAYMENT_ONLINE`
1931
+ */
1932
+ paymentOption?: PaymentOptionTypeWithLiterals;
1933
+ }
1934
+ declare enum ValidationsConfig {
1935
+ UNKNOWN_VALIDATIONS_CONFIG = "UNKNOWN_VALIDATIONS_CONFIG",
1936
+ /** No business validations are performed. */
1937
+ SKIP_VALIDATIONS = "SKIP_VALIDATIONS",
1938
+ /** Perform cart-level business validations as defined by the service plugin implementer. */
1939
+ PRE_CHECKOUT_VALIDATIONS = "PRE_CHECKOUT_VALIDATIONS",
1940
+ /** Perform checkout-specific business validations as defined by the service plugin implementer. */
1941
+ CHECKOUT_VALIDATIONS = "CHECKOUT_VALIDATIONS"
1942
+ }
1943
+ /** @enumType */
1944
+ type ValidationsConfigWithLiterals = ValidationsConfig | 'UNKNOWN_VALIDATIONS_CONFIG' | 'SKIP_VALIDATIONS' | 'PRE_CHECKOUT_VALIDATIONS' | 'CHECKOUT_VALIDATIONS';
1945
+ interface CalculationConfig {
1946
+ /**
1947
+ * Whether to calculate delivery costs.
1948
+ * Default: false
1949
+ */
1950
+ calculateDelivery?: boolean;
1951
+ /**
1952
+ * Whether to calculate any additional fees.
1953
+ * Default: false
1954
+ */
1955
+ calculateAdditionalFees?: boolean;
1956
+ /**
1957
+ * Whether to include tax calculation.
1958
+ * Default: false
1959
+ */
1960
+ calculateTax?: boolean;
1961
+ /**
1962
+ * Whether to calculate the effect of gift card balances on the cart total.
1963
+ * Gift cards are not redeemed - only reflected for estimation purposes.
1964
+ * Default: false
1965
+ */
1966
+ calculateGiftCards?: boolean;
1967
+ }
1968
+ interface LineItemUpdate {
1969
+ /**
1970
+ * Line item ID to update.
1971
+ * @format GUID
1972
+ */
1973
+ lineItemId?: string;
1974
+ /** Quantity update (optional - if not provided, quantity is not updated) */
1975
+ quantityUpdate?: QuantityUpdate;
1976
+ /** Selected membership update (optional - if not provided, membership is not updated) */
1977
+ selectedMembershipUpdate?: SelectedMembershipUpdate;
1978
+ }
1979
+ interface QuantityUpdate {
1980
+ /**
1981
+ * The new quantity of the line item.
1982
+ * @min 1
1983
+ * @max 100000
1984
+ */
1985
+ quantity?: number;
1986
+ }
1987
+ interface SelectedMembershipUpdate {
1988
+ /**
1989
+ * The new selectedMembership of the item.
1990
+ *
1991
+ * To just remove current selected membership, and not replace with a new one, pass an empty value here.
1992
+ */
1993
+ membership?: V2SelectedMembership;
1994
+ }
1995
+ interface CreateCartRequest {
1996
+ /** Cart to be created. */
1997
+ cart?: Cart;
1998
+ /**
1999
+ * A list of catalog items to add to the cart.
2000
+ * @maxSize 300
2001
+ */
2002
+ catalogItems?: CatalogItemInput[];
2003
+ /**
2004
+ * A list of custom items to add to the cart.
2005
+ * Custom line items don't trigger the Catalog service plugin.
2006
+ *
2007
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2008
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2009
+ * @maxSize 300
2010
+ */
2011
+ customItems?: CustomItemInput[];
2012
+ /**
2013
+ * Coupons to apply.
2014
+ * Currently only one is supported.
2015
+ * If the coupon code is invalid, the cart will be created without it.
2016
+ * @maxSize 1
2017
+ * @minLength 1
2018
+ * @maxLength 50
2019
+ */
2020
+ couponCodes?: string[];
2021
+ /**
2022
+ * Gift cards to add.
2023
+ * Currently only one is support.
2024
+ * If the gift card code is invalid, the cart will be created without it.
2025
+ * @maxSize 1
2026
+ * @minLength 8
2027
+ * @maxLength 20
2028
+ */
2029
+ giftCardCodes?: string[];
2030
+ }
2031
+ interface CreateCartResponse {
2032
+ /** The created Cart. */
2033
+ cart?: Cart;
2034
+ }
2035
+ interface GetCartRequest {
2036
+ /**
2037
+ * ID of the Cart to retrieve.
2038
+ * @format GUID
2039
+ */
2040
+ cartId: string;
2041
+ }
2042
+ interface GetCartResponse {
2043
+ /** The requested Cart. */
2044
+ cart?: Cart;
2045
+ }
2046
+ interface UpdateCartRequest {
2047
+ /** Cart to be updated, may be partial. */
2048
+ cart: Cart;
2049
+ }
2050
+ interface UpdateCartResponse {
2051
+ /** Updated Cart. */
2052
+ cart?: Cart;
2053
+ }
2054
+ interface DeleteCartRequest {
2055
+ /**
2056
+ * ID of the Cart to delete.
2057
+ * @format GUID
2058
+ */
2059
+ cartId: string;
2060
+ }
2061
+ interface DeleteCartResponse {
2062
+ }
2063
+ interface RefreshCartRequest {
2064
+ /**
2065
+ * ID of the Cart to refresh.
2066
+ * @format GUID
2067
+ */
2068
+ cartId: string;
2069
+ }
2070
+ interface RefreshCartResponse {
2071
+ /** Synchronized Cart. */
2072
+ cart?: Cart;
2073
+ }
2074
+ interface CalculateCartRequest {
2075
+ /**
2076
+ * ID of the Cart to calculate.
2077
+ * @format GUID
2078
+ */
2079
+ cartId: string;
2080
+ /**
2081
+ * Specifies the level of **business validation** to perform during cart calculation,
2082
+ * by calling the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
2083
+ */
2084
+ validationsConfig?: ValidationsConfigWithLiterals;
2085
+ /**
2086
+ * Optional custom configuration for the calculation.
2087
+ * If not provided, all price components are calculated by default.
2088
+ */
2089
+ customCalculationConfig?: CalculationConfig;
2090
+ }
2091
+ interface CalculateCartResponse {
2092
+ /** The Cart that was calculated. */
2093
+ cart?: Cart;
2094
+ /** The calculation summary. */
2095
+ summary?: CartSummary;
2096
+ }
2097
+ interface GetCheckoutURLRequest {
2098
+ /**
2099
+ * ID of the Cart to calculate.
2100
+ * @format GUID
2101
+ */
2102
+ cartId: string;
2103
+ /**
2104
+ * Checkout currency parameter to append as a query param
2105
+ * @format CURRENCY
2106
+ */
2107
+ currencyCode?: string | null;
2108
+ }
2109
+ interface GetCheckoutURLResponse {
2110
+ /**
2111
+ * The checkout URL.
2112
+ * @format WEB_URL
2113
+ */
2114
+ checkoutUrl?: string;
2115
+ }
2116
+ interface CompleteCheckoutRequest {
2117
+ /**
2118
+ * Cart ID.
2119
+ * @format GUID
2120
+ */
2121
+ cartId: string;
2122
+ /**
2123
+ * The pricing token received from `CalculateCart`'s response.
2124
+ * Used to verify that the prices shown to the customer have not changed before completing checkout.
2125
+ * @maxLength 1024
2126
+ * @readonly
2127
+ */
2128
+ pricingToken?: string | null;
2129
+ /** Urls to redirect to after payment is made. */
2130
+ redirectUrls?: RedirectUrls;
2131
+ /** Indicates the payment method should be saved on the order */
2132
+ savePaymentMethod?: boolean;
2133
+ /** Indicates whether to authorize the payment and delay the capture */
2134
+ delayCapture?: boolean;
2135
+ }
2136
+ interface RedirectUrls {
2137
+ /**
2138
+ * URL to redirect to if payment is canceled (usually checkout url).
2139
+ * @format WEB_URL
2140
+ */
2141
+ cancelUrl?: string;
2142
+ /**
2143
+ * URL to redirect to if an error occurred on payment (usually checkout url).
2144
+ * @format WEB_URL
2145
+ */
2146
+ errorUrl?: string;
2147
+ /**
2148
+ * URL to redirect to after successful payment, excepts order place holder {orderId}.
2149
+ * @maxLength 2000
2150
+ */
2151
+ successUrl?: string | null;
2152
+ /**
2153
+ * URL to redirect to if payment is pending, excepts order place holder {orderId}.
2154
+ * @maxLength 2000
2155
+ */
2156
+ pendingUrl?: string | null;
2157
+ }
2158
+ interface CompleteCheckoutResponse {
2159
+ /**
2160
+ * The order ID of the created order.
2161
+ * @format GUID
2162
+ */
2163
+ orderId?: string;
2164
+ /**
2165
+ * Payment response token.
2166
+ * @maxLength 1000
2167
+ */
2168
+ paymentResponseToken?: string | null;
2169
+ /**
2170
+ * The payment gateway is Cashier.
2171
+ * payment_gateway_order_id will be returned given that money was charged.
2172
+ * In some cases, money will not be charged:
2173
+ * If the total price is 0 - For example, could be a free item or a an item with 100% discount
2174
+ * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card
2175
+ * @maxLength 50
2176
+ */
2177
+ paymentGatewayOrderId?: string | null;
2178
+ /** Whether an order was successfully created from this cart and the payment transaction was completed. */
2179
+ cartCompleted?: boolean;
2180
+ }
2181
+ interface AddLineItemsRequest {
2182
+ /**
2183
+ * Cart ID.
2184
+ * @format GUID
2185
+ */
2186
+ cartId: string;
2187
+ /**
2188
+ * A list of catalog items to add to the cart.
2189
+ * @maxSize 300
2190
+ */
2191
+ catalogItems?: CatalogItemInput[];
2192
+ /**
2193
+ * A list of custom items to add to the cart.
2194
+ * @maxSize 300
2195
+ */
2196
+ customItems?: CustomItemInput[];
2197
+ }
2198
+ interface AddLineItemsResponse {
2199
+ /** Updated Cart. */
2200
+ cart?: Cart;
2201
+ }
2202
+ interface RemoveLineItemsRequest {
2203
+ /**
2204
+ * Cart ID.
2205
+ * @format GUID
2206
+ */
2207
+ cartId: string;
2208
+ /**
2209
+ * Line item IDs to remove from cart.
2210
+ * @format GUID
2211
+ * @minSize 1
2212
+ * @maxSize 100
2213
+ */
2214
+ lineItemIds: string[];
2215
+ }
2216
+ interface RemoveLineItemsResponse {
2217
+ /** Updated Cart. */
2218
+ cart?: Cart;
2219
+ }
2220
+ interface AddDiscountRequest {
2221
+ /**
2222
+ * Cart ID.
2223
+ * @format GUID
2224
+ */
2225
+ cartId: string;
2226
+ /**
2227
+ * Coupon to apply.
2228
+ *
2229
+ * Currently only one is supported.
2230
+ * @minLength 1
2231
+ * @maxLength 50
2232
+ */
2233
+ couponCode: string;
2234
+ }
2235
+ interface AddDiscountResponse {
2236
+ /** Updated Cart. */
2237
+ cart?: Cart;
2238
+ }
2239
+ interface RemoveDiscountRequest {
2240
+ /**
2241
+ * Cart ID.
2242
+ * @format GUID
2243
+ */
2244
+ cartId: string;
2245
+ /**
2246
+ * Discount ID.
2247
+ * @format GUID
2248
+ */
2249
+ discountId: string;
2250
+ }
2251
+ interface RemoveDiscountResponse {
2252
+ /** Updated Cart. */
2253
+ cart?: Cart;
2254
+ }
2255
+ interface AddGiftCardRequest {
2256
+ /**
2257
+ * Cart ID.
2258
+ * @format GUID
2259
+ */
2260
+ cartId: string;
2261
+ /**
2262
+ * Gift card code.
2263
+ *
2264
+ * Currently only one is supported.
2265
+ * @maxLength 50
2266
+ */
2267
+ giftCardCode: string;
2268
+ }
2269
+ interface AddGiftCardResponse {
2270
+ /** Updated Cart. */
2271
+ cart?: Cart;
2272
+ }
2273
+ interface RemoveGiftCardRequest {
2274
+ /**
2275
+ * Cart ID.
2276
+ * @format GUID
2277
+ */
2278
+ cartId: string;
2279
+ /**
2280
+ * Gift card ID.
2281
+ * @format GUID
2282
+ */
2283
+ giftCardId: string;
2284
+ }
2285
+ interface RemoveGiftCardResponse {
2286
+ /** Updated Cart. */
2287
+ cart?: Cart;
2288
+ }
2289
+ interface UpdateLineItemsRequest {
2290
+ /**
2291
+ * Cart ID.
2292
+ * @format GUID
2293
+ */
2294
+ cartId: string;
2295
+ /**
2296
+ * Line item updates to apply.
2297
+ * @minSize 1
2298
+ * @maxSize 100
2299
+ */
2300
+ lineItemUpdates?: LineItemUpdate[];
2301
+ }
2302
+ interface UpdateLineItemsResponse {
2303
+ /** Updated Cart. */
2304
+ cart?: Cart;
2305
+ }
2306
+ interface MarkCartAsCompletedRequest {
2307
+ /**
2308
+ * Cart ID.
2309
+ * @format GUID
2310
+ */
2311
+ cartId: string;
2312
+ /**
2313
+ * Order ID.
2314
+ * @format GUID
2315
+ */
2316
+ orderId?: string | null;
2317
+ }
2318
+ interface MarkCartAsCompletedResponse {
2319
+ /** Updated Cart. */
2320
+ cart?: Cart;
2321
+ }
2322
+ interface HandleAsyncCheckoutCompletionRequest {
2323
+ /**
2324
+ * Server-signed JWT token with required information to complete checkout
2325
+ * @maxLength 4096
2326
+ */
2327
+ token: string;
2328
+ }
2329
+ interface RawHttpResponse {
2330
+ body?: Uint8Array;
2331
+ statusCode?: number | null;
2332
+ headers?: HeadersEntry[];
2333
+ }
2334
+ interface HeadersEntry {
2335
+ key?: string;
2336
+ value?: string;
2337
+ }
2338
+
2339
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
2340
+ getUrl: (context: any) => string;
2341
+ httpMethod: K;
2342
+ path: string;
2343
+ pathParams: M;
2344
+ __requestType: T;
2345
+ __originalRequestType: S;
2346
+ __responseType: Q;
2347
+ __originalResponseType: R;
2348
+ };
2349
+ declare function createCart(): __PublicMethodMetaInfo<'POST', {}, CreateCartRequest$1, CreateCartRequest, CreateCartResponse$1, CreateCartResponse>;
2350
+ declare function getCart(): __PublicMethodMetaInfo<'GET', {
2351
+ cartId: string;
2352
+ }, GetCartRequest$1, GetCartRequest, GetCartResponse$1, GetCartResponse>;
2353
+ declare function updateCart(): __PublicMethodMetaInfo<'PATCH', {
2354
+ cartId: string;
2355
+ }, UpdateCartRequest$1, UpdateCartRequest, UpdateCartResponse$1, UpdateCartResponse>;
2356
+ declare function deleteCart(): __PublicMethodMetaInfo<'DELETE', {
2357
+ cartId: string;
2358
+ }, DeleteCartRequest$1, DeleteCartRequest, DeleteCartResponse$1, DeleteCartResponse>;
2359
+ declare function refreshCart(): __PublicMethodMetaInfo<'POST', {
2360
+ cartId: string;
2361
+ }, RefreshCartRequest$1, RefreshCartRequest, RefreshCartResponse$1, RefreshCartResponse>;
2362
+ declare function calculateCart(): __PublicMethodMetaInfo<'POST', {
2363
+ cartId: string;
2364
+ }, CalculateCartRequest$1, CalculateCartRequest, CalculateCartResponse$1, CalculateCartResponse>;
2365
+ declare function getCheckoutUrl(): __PublicMethodMetaInfo<'POST', {
2366
+ cartId: string;
2367
+ }, GetCheckoutURLRequest$1, GetCheckoutURLRequest, GetCheckoutURLResponse$1, GetCheckoutURLResponse>;
2368
+ declare function completeCheckout(): __PublicMethodMetaInfo<'POST', {
2369
+ cartId: string;
2370
+ }, CompleteCheckoutRequest$1, CompleteCheckoutRequest, CompleteCheckoutResponse$1, CompleteCheckoutResponse>;
2371
+ declare function addLineItems(): __PublicMethodMetaInfo<'POST', {
2372
+ cartId: string;
2373
+ }, AddLineItemsRequest$1, AddLineItemsRequest, AddLineItemsResponse$1, AddLineItemsResponse>;
2374
+ declare function removeLineItems(): __PublicMethodMetaInfo<'POST', {
2375
+ cartId: string;
2376
+ }, RemoveLineItemsRequest$1, RemoveLineItemsRequest, RemoveLineItemsResponse$1, RemoveLineItemsResponse>;
2377
+ declare function addDiscount(): __PublicMethodMetaInfo<'POST', {
2378
+ cartId: string;
2379
+ }, AddDiscountRequest$1, AddDiscountRequest, AddDiscountResponse$1, AddDiscountResponse>;
2380
+ declare function removeDiscount(): __PublicMethodMetaInfo<'POST', {
2381
+ cartId: string;
2382
+ }, RemoveDiscountRequest$1, RemoveDiscountRequest, RemoveDiscountResponse$1, RemoveDiscountResponse>;
2383
+ declare function addGiftCard(): __PublicMethodMetaInfo<'POST', {
2384
+ cartId: string;
2385
+ }, AddGiftCardRequest$1, AddGiftCardRequest, AddGiftCardResponse$1, AddGiftCardResponse>;
2386
+ declare function removeGiftCard(): __PublicMethodMetaInfo<'POST', {
2387
+ cartId: string;
2388
+ }, RemoveGiftCardRequest$1, RemoveGiftCardRequest, RemoveGiftCardResponse$1, RemoveGiftCardResponse>;
2389
+ declare function updateLineItems(): __PublicMethodMetaInfo<'POST', {
2390
+ cartId: string;
2391
+ }, UpdateLineItemsRequest$1, UpdateLineItemsRequest, UpdateLineItemsResponse$1, UpdateLineItemsResponse>;
2392
+ declare function markCartAsCompleted(): __PublicMethodMetaInfo<'POST', {
2393
+ cartId: string;
2394
+ }, MarkCartAsCompletedRequest$1, MarkCartAsCompletedRequest, MarkCartAsCompletedResponse$1, MarkCartAsCompletedResponse>;
2395
+ declare function handleAsyncCheckoutCompletion(): __PublicMethodMetaInfo<'POST', {}, HandleAsyncCheckoutCompletionRequest$1, HandleAsyncCheckoutCompletionRequest, RawHttpResponse$1, RawHttpResponse>;
2396
+
2397
+ export { type __PublicMethodMetaInfo, addDiscount, addGiftCard, addLineItems, calculateCart, completeCheckout, createCart, deleteCart, getCart, getCheckoutUrl, handleAsyncCheckoutCompletion, markCartAsCompleted, refreshCart, removeDiscount, removeGiftCard, removeLineItems, updateCart, updateLineItems };