@wix/auto_sdk_ecom_totals-calculator 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/build/{cjs/src/ecom-v1-totals-calculation-totals-calculator.types.d.ts → ecom-v1-totals-calculation-totals-calculator.universal-DlfvX0-S.d.mts} +204 -111
  2. package/build/{internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.d.ts → ecom-v1-totals-calculation-totals-calculator.universal-DlfvX0-S.d.ts} +204 -111
  3. package/build/index.d.mts +15 -0
  4. package/build/index.d.ts +15 -0
  5. package/build/index.js +425 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +386 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/{es/src/ecom-v1-totals-calculation-totals-calculator.types.d.ts → internal/ecom-v1-totals-calculation-totals-calculator.universal-Lyk5fAp5.d.mts} +272 -111
  10. package/build/internal/{es/src/ecom-v1-totals-calculation-totals-calculator.types.d.ts → ecom-v1-totals-calculation-totals-calculator.universal-Lyk5fAp5.d.ts} +272 -111
  11. package/build/internal/index.d.mts +15 -0
  12. package/build/internal/index.d.ts +15 -0
  13. package/build/internal/index.js +425 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +386 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +1200 -0
  18. package/build/internal/meta.d.ts +1200 -0
  19. package/build/internal/meta.js +190 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +163 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +1200 -0
  24. package/build/meta.d.ts +1200 -0
  25. package/build/meta.js +190 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +163 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.d.ts +0 -5
  40. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.js +0 -23
  41. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.js.map +0 -1
  42. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.d.ts +0 -3
  43. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.js +0 -144
  44. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.js.map +0 -1
  45. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.d.ts +0 -13
  46. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.js +0 -47
  47. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.js.map +0 -1
  48. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.d.ts +0 -13
  49. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.js +0 -28
  50. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.js.map +0 -1
  51. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.js +0 -144
  52. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.js.map +0 -1
  53. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.d.ts +0 -1568
  54. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.js +0 -275
  55. package/build/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.context.d.ts +0 -5
  67. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.context.js +0 -5
  68. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.context.js.map +0 -1
  69. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.http.d.ts +0 -3
  70. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.http.js +0 -140
  71. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.http.js.map +0 -1
  72. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.meta.d.ts +0 -13
  73. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.meta.js +0 -20
  74. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.meta.js.map +0 -1
  75. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.public.d.ts +0 -13
  76. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.public.js +0 -9
  77. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.public.js.map +0 -1
  78. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.types.js +0 -141
  79. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.types.js.map +0 -1
  80. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.universal.d.ts +0 -1568
  81. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.universal.js +0 -248
  82. package/build/es/src/ecom-v1-totals-calculation-totals-calculator.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.d.ts +0 -5
  93. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.js +0 -23
  94. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.context.js.map +0 -1
  95. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.d.ts +0 -3
  96. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.js +0 -144
  97. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.http.js.map +0 -1
  98. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.d.ts +0 -13
  99. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.js +0 -47
  100. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.meta.js.map +0 -1
  101. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.d.ts +0 -13
  102. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.js +0 -28
  103. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.public.js.map +0 -1
  104. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.js +0 -144
  105. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.types.js.map +0 -1
  106. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.d.ts +0 -1643
  107. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.js +0 -275
  108. package/build/internal/cjs/src/ecom-v1-totals-calculation-totals-calculator.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.context.d.ts +0 -5
  119. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.context.js +0 -5
  120. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.context.js.map +0 -1
  121. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.http.d.ts +0 -3
  122. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.http.js +0 -140
  123. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.http.js.map +0 -1
  124. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.meta.d.ts +0 -13
  125. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.meta.js +0 -20
  126. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.meta.js.map +0 -1
  127. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.public.d.ts +0 -13
  128. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.public.js +0 -9
  129. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.public.js.map +0 -1
  130. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.types.js +0 -141
  131. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.types.js.map +0 -1
  132. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.universal.d.ts +0 -1643
  133. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.universal.js +0 -248
  134. package/build/internal/es/src/ecom-v1-totals-calculation-totals-calculator.universal.js.map +0 -1
@@ -1,6 +1,6 @@
1
- export interface TotalsCalculationEntity {
1
+ interface TotalsCalculationEntity {
2
2
  }
3
- export interface CalculateTotalsRequest extends CalculateTotalsRequestCouponOneOf, CalculateTotalsRequestGiftCardOneOf {
3
+ interface CalculateTotalsRequest extends CalculateTotalsRequestCouponOneOf, CalculateTotalsRequestGiftCardOneOf {
4
4
  /** Coupon ID. */
5
5
  couponId?: string | null;
6
6
  /** Coupon code. */
@@ -61,16 +61,22 @@ export interface CalculateTotalsRequest extends CalculateTotalsRequestCouponOneO
61
61
  * @format GUID
62
62
  */
63
63
  purchaseFlowId?: string | null;
64
+ /**
65
+ * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
66
+ * For example, a Wix Pay Link ID.
67
+ * @maxSize 20
68
+ */
69
+ externalReferences?: ExternalReference[];
64
70
  }
65
71
  /** @oneof */
66
- export interface CalculateTotalsRequestCouponOneOf {
72
+ interface CalculateTotalsRequestCouponOneOf {
67
73
  /** Coupon ID. */
68
74
  couponId?: string | null;
69
75
  /** Coupon code. */
70
76
  couponCode?: string | null;
71
77
  }
72
78
  /** @oneof */
73
- export interface CalculateTotalsRequestGiftCardOneOf {
79
+ interface CalculateTotalsRequestGiftCardOneOf {
74
80
  /**
75
81
  * Gift card ID.
76
82
  * @format GUID
@@ -79,13 +85,13 @@ export interface CalculateTotalsRequestGiftCardOneOf {
79
85
  /** Gift card code. */
80
86
  giftCardCode?: string | null;
81
87
  }
82
- export interface LineItem {
88
+ interface LineItem {
83
89
  /**
84
90
  * Line item ID.
85
91
  * @minLength 1
86
92
  * @maxLength 100
87
93
  */
88
- id?: string;
94
+ _id?: string;
89
95
  /**
90
96
  * Quantity.
91
97
  * @max 100000
@@ -149,7 +155,7 @@ export interface LineItem {
149
155
  itemType?: ItemType;
150
156
  }
151
157
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
152
- export interface CatalogReference {
158
+ interface CatalogReference {
153
159
  /**
154
160
  * ID of the item within the catalog it belongs to.
155
161
  * @minLength 1
@@ -175,7 +181,7 @@ export interface CatalogReference {
175
181
  */
176
182
  options?: Record<string, any> | null;
177
183
  }
178
- export interface PhysicalProperties {
184
+ interface PhysicalProperties {
179
185
  /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
180
186
  weight?: number | null;
181
187
  /**
@@ -186,24 +192,24 @@ export interface PhysicalProperties {
186
192
  /** Whether this line item is shippable. */
187
193
  shippable?: boolean;
188
194
  }
189
- export interface Scope {
195
+ interface Scope {
190
196
  /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
191
197
  namespace?: string;
192
198
  /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
193
199
  group?: Group;
194
200
  }
195
- export interface Group {
201
+ interface Group {
196
202
  /** 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). */
197
203
  name?: string;
198
204
  /** Item ID (when the coupon scope is limited to just one item). */
199
205
  entityId?: string | null;
200
206
  }
201
- export interface SubscriptionSettings {
207
+ interface SubscriptionSettings {
202
208
  /** Frequency of recurring payment. Every day/week/month/year. */
203
209
  frequency?: SubscriptionFrequency;
204
210
  }
205
211
  /** Frequency unit of recurring payment */
206
- export declare enum SubscriptionFrequency {
212
+ declare enum SubscriptionFrequency {
207
213
  UNDEFINED = "UNDEFINED",
208
214
  DAY = "DAY",
209
215
  WEEK = "WEEK",
@@ -211,7 +217,7 @@ export declare enum SubscriptionFrequency {
211
217
  YEAR = "YEAR"
212
218
  }
213
219
  /** Type of selected payment option for catalog item */
214
- export declare enum PaymentOptionType {
220
+ declare enum PaymentOptionType {
215
221
  /** The entire payment for this item happens as part of the checkout. */
216
222
  FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
217
223
  /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
@@ -223,7 +229,7 @@ export declare enum PaymentOptionType {
223
229
  /** 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`. */
224
230
  MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
225
231
  }
226
- export interface ServiceProperties {
232
+ interface ServiceProperties {
227
233
  /**
228
234
  * 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.
229
235
  * For example, the start time of a class.
@@ -236,42 +242,42 @@ export interface ServiceProperties {
236
242
  */
237
243
  numberOfParticipants?: number | null;
238
244
  }
239
- export interface ItemType extends ItemTypeItemTypeDataOneOf {
245
+ interface ItemType extends ItemTypeItemTypeDataOneOf {
240
246
  /** Preset item type. */
241
247
  preset?: ItemTypeItemType;
242
248
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
243
249
  custom?: string;
244
250
  }
245
251
  /** @oneof */
246
- export interface ItemTypeItemTypeDataOneOf {
252
+ interface ItemTypeItemTypeDataOneOf {
247
253
  /** Preset item type. */
248
254
  preset?: ItemTypeItemType;
249
255
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
250
256
  custom?: string;
251
257
  }
252
- export declare enum ItemTypeItemType {
258
+ declare enum ItemTypeItemType {
253
259
  UNRECOGNISED = "UNRECOGNISED",
254
260
  PHYSICAL = "PHYSICAL",
255
261
  DIGITAL = "DIGITAL",
256
262
  GIFT_CARD = "GIFT_CARD",
257
263
  SERVICE = "SERVICE"
258
264
  }
259
- export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
265
+ interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
260
266
  /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
261
267
  addressType?: TaxableAddressType;
262
268
  }
263
269
  /** @oneof */
264
- export interface TaxableAddressTaxableAddressDataOneOf {
270
+ interface TaxableAddressTaxableAddressDataOneOf {
265
271
  /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
266
272
  addressType?: TaxableAddressType;
267
273
  }
268
- export declare enum TaxableAddressType {
274
+ declare enum TaxableAddressType {
269
275
  UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
270
276
  BUSINESS = "BUSINESS",
271
277
  BILLING = "BILLING",
272
278
  SHIPPING = "SHIPPING"
273
279
  }
274
- export interface ApiV1AdditionalFee {
280
+ interface ApiV1AdditionalFee {
275
281
  /**
276
282
  * Additional fee's unique code or ID.
277
283
  * @minLength 1
@@ -299,7 +305,7 @@ export interface ApiV1AdditionalFee {
299
305
  taxDetails?: V1TaxDetails;
300
306
  }
301
307
  /** Tax details. */
302
- export interface V1TaxDetails {
308
+ interface V1TaxDetails {
303
309
  /** Whether additional fee is taxable. */
304
310
  taxable?: boolean;
305
311
  /**
@@ -308,13 +314,13 @@ export interface V1TaxDetails {
308
314
  */
309
315
  taxGroupId?: string | null;
310
316
  }
311
- export interface ModifierGroup {
317
+ interface ModifierGroup {
312
318
  /**
313
319
  * Modifier group id.
314
320
  * @minLength 1
315
321
  * @maxLength 36
316
322
  */
317
- id?: string;
323
+ _id?: string;
318
324
  /** Modifier group name. */
319
325
  name?: TranslatableString;
320
326
  /**
@@ -324,7 +330,7 @@ export interface ModifierGroup {
324
330
  */
325
331
  modifiers?: ItemModifier[];
326
332
  }
327
- export interface TranslatableString {
333
+ interface TranslatableString {
328
334
  /**
329
335
  * __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).
330
336
  *
@@ -345,13 +351,13 @@ export interface TranslatableString {
345
351
  */
346
352
  translated?: string | null;
347
353
  }
348
- export interface ItemModifier {
354
+ interface ItemModifier {
349
355
  /**
350
356
  * Modifier ID.
351
357
  * @minLength 1
352
358
  * @maxLength 36
353
359
  */
354
- id?: string;
360
+ _id?: string;
355
361
  /**
356
362
  * The quantity of this modifier.
357
363
  * @min 1
@@ -369,7 +375,7 @@ export interface ItemModifier {
369
375
  price?: string | null;
370
376
  }
371
377
  /** Physical address */
372
- export interface Address {
378
+ interface Address {
373
379
  /**
374
380
  * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
375
381
  * @format COUNTRY
@@ -396,7 +402,7 @@ export interface Address {
396
402
  * Main address line (usually street name and number).
397
403
  * @maxLength 150
398
404
  */
399
- addressLine?: string | null;
405
+ addressLine1?: string | null;
400
406
  /**
401
407
  * Free text providing more detailed address info. Usually contains apt, suite, floor.
402
408
  * @maxLength 100
@@ -413,19 +419,19 @@ export interface Address {
413
419
  */
414
420
  subdivisionFullname?: string | null;
415
421
  }
416
- export interface StreetAddress {
422
+ interface StreetAddress {
417
423
  /** Street number. */
418
424
  number?: string;
419
425
  /** Street name. */
420
426
  name?: string;
421
427
  }
422
- export interface AddressLocation {
428
+ interface AddressLocation {
423
429
  /** Address latitude. */
424
430
  latitude?: number | null;
425
431
  /** Address longitude. */
426
432
  longitude?: number | null;
427
433
  }
428
- export interface SelectedShippingOption {
434
+ interface SelectedShippingOption {
429
435
  /**
430
436
  * Carrier ID.
431
437
  * @format GUID
@@ -438,7 +444,7 @@ export interface SelectedShippingOption {
438
444
  */
439
445
  code?: string;
440
446
  }
441
- export interface MerchantDiscountInput {
447
+ interface MerchantDiscountInput {
442
448
  /**
443
449
  * Discount amount.
444
450
  * @decimalValue options { gte:0 }
@@ -451,20 +457,20 @@ export interface MerchantDiscountInput {
451
457
  */
452
458
  lineItemIds?: string[];
453
459
  }
454
- export interface SelectedMemberships {
460
+ interface SelectedMemberships {
455
461
  /**
456
462
  * Selected memberships.
457
463
  * @maxSize 300
458
464
  */
459
465
  memberships?: SelectedMembership[];
460
466
  }
461
- export interface SelectedMembership {
467
+ interface SelectedMembership {
462
468
  /**
463
469
  * Membership ID.
464
470
  * @minLength 1
465
471
  * @maxLength 100
466
472
  */
467
- id?: string;
473
+ _id?: string;
468
474
  /**
469
475
  * ID of the app providing this payment option.
470
476
  * @format GUID
@@ -479,7 +485,7 @@ export interface SelectedMembership {
479
485
  */
480
486
  lineItemIds?: string[];
481
487
  }
482
- export interface CarrierShippingOption {
488
+ interface CarrierShippingOption {
483
489
  /**
484
490
  * This carrier's unique ID
485
491
  * @format GUID
@@ -488,7 +494,7 @@ export interface CarrierShippingOption {
488
494
  /** Shipping service options offered by this carrier for this request */
489
495
  shippingOptions?: ShippingOption;
490
496
  }
491
- export interface ShippingOption {
497
+ interface ShippingOption {
492
498
  /**
493
499
  * Unique code of provided shipping option like "usps_std_overnight".
494
500
  * For legacy calculators this would be the UUID of the option.
@@ -513,7 +519,7 @@ export interface ShippingOption {
513
519
  /** If the delivery solution is a partial and doesn't apply to all items. */
514
520
  partial?: boolean | null;
515
521
  }
516
- export interface DeliveryLogistics {
522
+ interface DeliveryLogistics {
517
523
  /**
518
524
  * Expected delivery time, in free text. For example, "3-5 business days".
519
525
  * @maxLength 500
@@ -527,7 +533,7 @@ export interface DeliveryLogistics {
527
533
  /** Pickup details. */
528
534
  pickupDetails?: PickupDetails;
529
535
  }
530
- export interface PickupDetails {
536
+ interface PickupDetails {
531
537
  /** Pickup address. */
532
538
  address?: Address;
533
539
  /**
@@ -538,24 +544,24 @@ export interface PickupDetails {
538
544
  /** Pickup method */
539
545
  pickupMethod?: PickupMethod;
540
546
  }
541
- export declare enum PickupMethod {
547
+ declare enum PickupMethod {
542
548
  UNKNOWN_METHOD = "UNKNOWN_METHOD",
543
549
  STORE_PICKUP = "STORE_PICKUP",
544
550
  PICKUP_POINT = "PICKUP_POINT"
545
551
  }
546
- export interface DeliveryTimeSlot {
552
+ interface DeliveryTimeSlot {
547
553
  /** starting time of the delivery time slot */
548
554
  from?: Date | null;
549
555
  /** ending time of the delivery time slot */
550
556
  to?: Date | null;
551
557
  }
552
- export interface ShippingPrice {
558
+ interface ShippingPrice {
553
559
  /** Shipping price. */
554
560
  price?: MultiCurrencyPrice;
555
561
  /** Other costs such as insurance, handling & packaging for fragile items, etc. */
556
562
  otherCharges?: OtherCharge[];
557
563
  }
558
- export interface MultiCurrencyPrice {
564
+ interface MultiCurrencyPrice {
559
565
  /**
560
566
  * Amount.
561
567
  * @decimalValue options { gte:0, lte:1000000000000000 }
@@ -578,17 +584,17 @@ export interface MultiCurrencyPrice {
578
584
  */
579
585
  formattedConvertedAmount?: string;
580
586
  }
581
- export interface OtherCharge {
587
+ interface OtherCharge {
582
588
  /** Type of additional cost. */
583
589
  type?: ChargeType;
584
590
  /** Price of added cost. */
585
591
  price?: MultiCurrencyPrice;
586
592
  }
587
- export declare enum ChargeType {
593
+ declare enum ChargeType {
588
594
  HANDLING_FEE = "HANDLING_FEE",
589
595
  INSURANCE = "INSURANCE"
590
596
  }
591
- export interface DeliveryAllocation {
597
+ interface DeliveryAllocation {
592
598
  /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
593
599
  deliveryCarrier?: Carrier;
594
600
  /** The delivery region that are relevant for this delivery solution. */
@@ -596,7 +602,7 @@ export interface DeliveryAllocation {
596
602
  /** Populated if the delivery solution is a partially supplied by this carrier. */
597
603
  applicableLineItems?: ApplicableLineItems;
598
604
  }
599
- export interface Carrier {
605
+ interface Carrier {
600
606
  /**
601
607
  * The carrier app id
602
608
  * @format GUID
@@ -608,19 +614,19 @@ export interface Carrier {
608
614
  */
609
615
  code?: string;
610
616
  }
611
- export interface Region {
617
+ interface Region {
612
618
  /**
613
619
  * The delivery region id.
614
620
  * @format GUID
615
621
  */
616
- id?: string | null;
622
+ _id?: string | null;
617
623
  /**
618
624
  * The delivery region name.
619
625
  * @maxLength 100
620
626
  */
621
627
  name?: string | null;
622
628
  }
623
- export interface ApplicableLineItems {
629
+ interface ApplicableLineItems {
624
630
  /**
625
631
  * Line items that the delivery solution is for.
626
632
  * @maxSize 300
@@ -629,7 +635,7 @@ export interface ApplicableLineItems {
629
635
  */
630
636
  lineItemIds?: string[];
631
637
  }
632
- export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
638
+ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
633
639
  /** Coupon details. */
634
640
  coupon?: Coupon;
635
641
  /** Merchant discount. */
@@ -648,7 +654,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
648
654
  lineItemIds?: string[];
649
655
  }
650
656
  /** @oneof */
651
- export interface AppliedDiscountDiscountSourceOneOf {
657
+ interface AppliedDiscountDiscountSourceOneOf {
652
658
  /** Coupon details. */
653
659
  coupon?: Coupon;
654
660
  /** Merchant discount. */
@@ -656,15 +662,15 @@ export interface AppliedDiscountDiscountSourceOneOf {
656
662
  /** Discount rule */
657
663
  discountRule?: DiscountRule;
658
664
  }
659
- export declare enum DiscountType {
665
+ declare enum DiscountType {
660
666
  GLOBAL = "GLOBAL",
661
667
  SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
662
668
  SHIPPING = "SHIPPING"
663
669
  }
664
670
  /** Coupon */
665
- export interface Coupon {
671
+ interface Coupon {
666
672
  /** Coupon ID. */
667
- id?: string;
673
+ _id?: string;
668
674
  /** Coupon code. */
669
675
  code?: string;
670
676
  /** Coupon value. */
@@ -672,7 +678,7 @@ export interface Coupon {
672
678
  /** Coupon name. */
673
679
  name?: string;
674
680
  }
675
- export interface MerchantDiscount {
681
+ interface MerchantDiscount {
676
682
  /** Discount value. */
677
683
  amount?: MultiCurrencyPrice;
678
684
  /**
@@ -682,18 +688,18 @@ export interface MerchantDiscount {
682
688
  */
683
689
  percentage?: number | null;
684
690
  }
685
- export interface DiscountRule {
691
+ interface DiscountRule {
686
692
  /**
687
693
  * Discount rule ID
688
694
  * @format GUID
689
695
  */
690
- id?: string;
696
+ _id?: string;
691
697
  /** Discount rule name */
692
698
  name?: DiscountRuleName;
693
699
  /** Discount value. */
694
700
  amount?: MultiCurrencyPrice;
695
701
  }
696
- export interface DiscountRuleName {
702
+ interface DiscountRuleName {
697
703
  /**
698
704
  * Original discount rule name (in site's default language).
699
705
  * @minLength 1
@@ -707,16 +713,16 @@ export interface DiscountRuleName {
707
713
  */
708
714
  translated?: string | null;
709
715
  }
710
- export interface LineItemDiscount {
716
+ interface LineItemDiscount {
711
717
  /**
712
718
  * ID of line item the discount applies to.
713
719
  * @format GUID
714
720
  */
715
- id?: string;
721
+ _id?: string;
716
722
  /** Discount value. */
717
723
  totalDiscountAmount?: MultiCurrencyPrice;
718
724
  }
719
- export interface AdditionalFee {
725
+ interface AdditionalFee {
720
726
  /**
721
727
  * Additional fee's unique code (or ID) for future processing
722
728
  * @minLength 1
@@ -755,7 +761,7 @@ export interface AdditionalFee {
755
761
  lineItemIds?: string[];
756
762
  }
757
763
  /** Tax Details. */
758
- export interface TaxDetails {
764
+ interface TaxDetails {
759
765
  /** Indication if additional fee is taxable or not */
760
766
  taxable?: boolean;
761
767
  /**
@@ -764,13 +770,13 @@ export interface TaxDetails {
764
770
  */
765
771
  taxGroupId?: string | null;
766
772
  }
767
- export declare enum DataFetchType {
773
+ declare enum DataFetchType {
768
774
  SHIPPING = "SHIPPING",
769
775
  DISCOUNT = "DISCOUNT",
770
776
  ADDITIONAL_FEES = "ADDITIONAL_FEES",
771
777
  ORDER_VALIDATION = "ORDER_VALIDATION"
772
778
  }
773
- export interface ExternalReference {
779
+ interface ExternalReference {
774
780
  /**
775
781
  * ID of the app associated with the purchase flow.
776
782
  * For example, the Wix Pay Links app ID.
@@ -787,7 +793,7 @@ export interface ExternalReference {
787
793
  */
788
794
  resourceId?: string | null;
789
795
  }
790
- export interface CalculateTotalsResponse {
796
+ interface CalculateTotalsResponse {
791
797
  /** Calculate line items. */
792
798
  calculatedLineItems?: CalculatedLineItem[];
793
799
  /** Price summary. */
@@ -860,7 +866,7 @@ export interface CalculateTotalsResponse {
860
866
  */
861
867
  totalAfterGiftCard?: MultiCurrencyPrice;
862
868
  }
863
- export interface CalculatedLineItem {
869
+ interface CalculatedLineItem {
864
870
  /** Line item ID. */
865
871
  lineItemId?: string;
866
872
  /** Price breakdown for this line item. */
@@ -874,7 +880,7 @@ export interface CalculatedLineItem {
874
880
  */
875
881
  paymentOption?: PaymentOptionType;
876
882
  }
877
- export interface LineItemPricesData {
883
+ interface LineItemPricesData {
878
884
  /** Total price after discounts, tax, and modifiers. */
879
885
  totalPriceAfterTax?: MultiCurrencyPrice;
880
886
  /** Total price after discounts and modifiers, and before tax. */
@@ -900,7 +906,7 @@ export interface LineItemPricesData {
900
906
  /** Total price of all item modifiers. */
901
907
  modifiers?: MultiCurrencyPrice;
902
908
  }
903
- export interface ItemTaxFullDetails {
909
+ interface ItemTaxFullDetails {
904
910
  /** Amount for which tax is calculated. */
905
911
  taxableAmount?: MultiCurrencyPrice;
906
912
  /**
@@ -917,7 +923,7 @@ export interface ItemTaxFullDetails {
917
923
  */
918
924
  rateBreakdown?: TaxRateBreakdown[];
919
925
  }
920
- export interface TaxRateBreakdown {
926
+ interface TaxRateBreakdown {
921
927
  /**
922
928
  * Name of tax against which the calculation was performed.
923
929
  * @maxLength 100
@@ -935,7 +941,7 @@ export interface TaxRateBreakdown {
935
941
  * TaxBreakdown represents tax information for a line item.
936
942
  * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
937
943
  */
938
- export interface TaxBreakdown {
944
+ interface TaxBreakdown {
939
945
  /**
940
946
  * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
941
947
  * @maxLength 200
@@ -967,7 +973,7 @@ export interface TaxBreakdown {
967
973
  jurisdictionType?: JurisdictionType;
968
974
  }
969
975
  /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
970
- export declare enum JurisdictionType {
976
+ declare enum JurisdictionType {
971
977
  UNDEFINED = "UNDEFINED",
972
978
  COUNTRY = "COUNTRY",
973
979
  STATE = "STATE",
@@ -975,7 +981,7 @@ export declare enum JurisdictionType {
975
981
  CITY = "CITY",
976
982
  SPECIAL = "SPECIAL"
977
983
  }
978
- export interface PriceSummary {
984
+ interface PriceSummary {
979
985
  /** Subtotal of all line items, before discounts and before tax. */
980
986
  subtotal?: MultiCurrencyPrice;
981
987
  /** Total shipping price, before discounts and before tax. */
@@ -989,12 +995,12 @@ export interface PriceSummary {
989
995
  /** Total additional fees price before tax. */
990
996
  additionalFees?: MultiCurrencyPrice;
991
997
  }
992
- export interface GiftCard {
998
+ interface GiftCard {
993
999
  /**
994
1000
  * Gift Card ID.
995
1001
  * @deprecated
996
1002
  */
997
- id?: string;
1003
+ _id?: string;
998
1004
  /** Gift card obfuscated code. */
999
1005
  obfuscatedCode?: string;
1000
1006
  /** Gift card value. */
@@ -1012,7 +1018,7 @@ export interface GiftCard {
1012
1018
  */
1013
1019
  externalId?: string | null;
1014
1020
  }
1015
- export interface TaxSummary {
1021
+ interface TaxSummary {
1016
1022
  /**
1017
1023
  * Amount for which tax is calculated, added from line items.
1018
1024
  * @readonly
@@ -1029,7 +1035,7 @@ export interface TaxSummary {
1029
1035
  */
1030
1036
  calculationDetails?: TaxCalculationDetails;
1031
1037
  }
1032
- export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
1038
+ interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
1033
1039
  /** Reason the manual calculation was used. */
1034
1040
  manualRateReason?: ManualCalculationReason;
1035
1041
  /** Details of the fallback rate calculation. */
@@ -1038,13 +1044,13 @@ export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationD
1038
1044
  rateType?: RateType;
1039
1045
  }
1040
1046
  /** @oneof */
1041
- export interface TaxCalculationDetailsCalculationDetailsOneOf {
1047
+ interface TaxCalculationDetailsCalculationDetailsOneOf {
1042
1048
  /** Reason the manual calculation was used. */
1043
1049
  manualRateReason?: ManualCalculationReason;
1044
1050
  /** Details of the fallback rate calculation. */
1045
1051
  autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1046
1052
  }
1047
- export declare enum RateType {
1053
+ declare enum RateType {
1048
1054
  /** no tax being collected for this request due to location of purchase */
1049
1055
  NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
1050
1056
  /** manual rate used for calculation */
@@ -1054,25 +1060,25 @@ export declare enum RateType {
1054
1060
  /** fallback rate used for calculation */
1055
1061
  FALLBACK_RATE = "FALLBACK_RATE"
1056
1062
  }
1057
- export declare enum ManualCalculationReason {
1063
+ declare enum ManualCalculationReason {
1058
1064
  /** user set calculator in Business Manager to be Manual */
1059
1065
  GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
1060
1066
  /** specific region is on manual even though Global setting is Auto-tax */
1061
1067
  REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
1062
1068
  }
1063
- export interface AutoTaxFallbackCalculationDetails {
1069
+ interface AutoTaxFallbackCalculationDetails {
1064
1070
  /** reason for fallback */
1065
1071
  fallbackReason?: FallbackReason;
1066
1072
  /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
1067
1073
  error?: ApplicationError;
1068
1074
  }
1069
- export declare enum FallbackReason {
1075
+ declare enum FallbackReason {
1070
1076
  /** auto-tax failed to be calculated */
1071
1077
  AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
1072
1078
  /** auto-tax was temporarily deactivated on a system-level */
1073
1079
  AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
1074
1080
  }
1075
- export interface ApplicationError {
1081
+ interface ApplicationError {
1076
1082
  /** Error code. */
1077
1083
  code?: string;
1078
1084
  /** Description of the error. */
@@ -1084,7 +1090,7 @@ export interface ApplicationError {
1084
1090
  * 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.
1085
1091
  * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
1086
1092
  */
1087
- export interface AggregatedTaxBreakdown {
1093
+ interface AggregatedTaxBreakdown {
1088
1094
  /**
1089
1095
  * The name of the tax against which this tax amount was calculated.
1090
1096
  * @maxLength 200
@@ -1110,7 +1116,7 @@ export interface AggregatedTaxBreakdown {
1110
1116
  /** The sum of all the tax from line items that calculated by the tax identifiers. */
1111
1117
  aggregatedTaxAmount?: MultiCurrencyPrice;
1112
1118
  }
1113
- export interface ShippingInformation {
1119
+ interface ShippingInformation {
1114
1120
  /** Shipping region. */
1115
1121
  region?: ShippingRegion;
1116
1122
  /** Selected shipping option. */
@@ -1118,20 +1124,20 @@ export interface ShippingInformation {
1118
1124
  /** All shipping options. */
1119
1125
  carrierServiceOptions?: CarrierServiceOption[];
1120
1126
  }
1121
- export interface ShippingRegion {
1127
+ interface ShippingRegion {
1122
1128
  /**
1123
1129
  * Shipping region ID.
1124
1130
  * @format GUID
1125
1131
  * @readonly
1126
1132
  */
1127
- id?: string;
1133
+ _id?: string;
1128
1134
  /**
1129
1135
  * Shipping region name.
1130
1136
  * @maxLength 100
1131
1137
  */
1132
1138
  name?: string;
1133
1139
  }
1134
- export interface SelectedCarrierServiceOption {
1140
+ interface SelectedCarrierServiceOption {
1135
1141
  /**
1136
1142
  * Unique identifier of selected option. For example, "usps_std_overnight".
1137
1143
  * @maxLength 100
@@ -1174,7 +1180,7 @@ export interface SelectedCarrierServiceOption {
1174
1180
  /** If the delivery solution is a partial and doesn't apply to all items. */
1175
1181
  partial?: boolean | null;
1176
1182
  }
1177
- export interface SelectedCarrierServiceOptionPrices {
1183
+ interface SelectedCarrierServiceOptionPrices {
1178
1184
  /** Total shipping price, after discount and after tax. */
1179
1185
  totalPriceAfterTax?: MultiCurrencyPrice;
1180
1186
  /** Total price of shipping after discounts (when relevant), and before tax. */
@@ -1186,7 +1192,7 @@ export interface SelectedCarrierServiceOptionPrices {
1186
1192
  /** Shipping price before discount and before tax. */
1187
1193
  price?: MultiCurrencyPrice;
1188
1194
  }
1189
- export interface SelectedCarrierServiceOptionOtherCharge {
1195
+ interface SelectedCarrierServiceOptionOtherCharge {
1190
1196
  /** Type of additional cost. */
1191
1197
  type?: ChargeType;
1192
1198
  /**
@@ -1197,7 +1203,7 @@ export interface SelectedCarrierServiceOptionOtherCharge {
1197
1203
  /** Price of added charge. */
1198
1204
  cost?: SelectedCarrierServiceOptionPrices;
1199
1205
  }
1200
- export interface CarrierServiceOption {
1206
+ interface CarrierServiceOption {
1201
1207
  /**
1202
1208
  * Carrier ID.
1203
1209
  * @format GUID
@@ -1206,7 +1212,7 @@ export interface CarrierServiceOption {
1206
1212
  /** Shipping options offered by this carrier for this request. */
1207
1213
  shippingOptions?: ShippingOption[];
1208
1214
  }
1209
- export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1215
+ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1210
1216
  /** General shipping calculation error. */
1211
1217
  generalShippingCalculationError?: Details;
1212
1218
  /** Carrier errors. */
@@ -1228,13 +1234,13 @@ export interface CalculationErrors extends CalculationErrorsShippingCalculationE
1228
1234
  discountsCalculationError?: Details;
1229
1235
  }
1230
1236
  /** @oneof */
1231
- export interface CalculationErrorsShippingCalculationErrorOneOf {
1237
+ interface CalculationErrorsShippingCalculationErrorOneOf {
1232
1238
  /** General shipping calculation error. */
1233
1239
  generalShippingCalculationError?: Details;
1234
1240
  /** Carrier errors. */
1235
1241
  carrierErrors?: CarrierErrors;
1236
1242
  }
1237
- export interface Details extends DetailsKindOneOf {
1243
+ interface Details extends DetailsKindOneOf {
1238
1244
  applicationError?: ApplicationError;
1239
1245
  validationError?: ValidationError;
1240
1246
  systemError?: SystemError;
@@ -1245,7 +1251,7 @@ export interface Details extends DetailsKindOneOf {
1245
1251
  tracing?: Record<string, string>;
1246
1252
  }
1247
1253
  /** @oneof */
1248
- export interface DetailsKindOneOf {
1254
+ interface DetailsKindOneOf {
1249
1255
  applicationError?: ApplicationError;
1250
1256
  validationError?: ValidationError;
1251
1257
  systemError?: SystemError;
@@ -1282,10 +1288,10 @@ export interface DetailsKindOneOf {
1282
1288
  * ]
1283
1289
  * }
1284
1290
  */
1285
- export interface ValidationError {
1291
+ interface ValidationError {
1286
1292
  fieldViolations?: FieldViolation[];
1287
1293
  }
1288
- export declare enum RuleType {
1294
+ declare enum RuleType {
1289
1295
  VALIDATION = "VALIDATION",
1290
1296
  OTHER = "OTHER",
1291
1297
  MAX = "MAX",
@@ -1308,7 +1314,7 @@ export declare enum RuleType {
1308
1314
  EXACT_SIZE = "EXACT_SIZE",
1309
1315
  REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1310
1316
  }
1311
- export interface FieldViolation {
1317
+ interface FieldViolation {
1312
1318
  field?: string;
1313
1319
  description?: string;
1314
1320
  violatedRule?: RuleType;
@@ -1316,21 +1322,21 @@ export interface FieldViolation {
1316
1322
  ruleName?: string | null;
1317
1323
  data?: Record<string, any> | null;
1318
1324
  }
1319
- export interface SystemError {
1325
+ interface SystemError {
1320
1326
  /** Error code. */
1321
1327
  errorCode?: string | null;
1322
1328
  }
1323
- export interface CarrierErrors {
1329
+ interface CarrierErrors {
1324
1330
  /** Carrier errors. */
1325
1331
  errors?: CarrierError[];
1326
1332
  }
1327
- export interface CarrierError {
1333
+ interface CarrierError {
1328
1334
  /** Carrier ID. */
1329
1335
  carrierId?: string;
1330
1336
  /** Error details. */
1331
1337
  error?: Details;
1332
1338
  }
1333
- export declare enum WeightUnit {
1339
+ declare enum WeightUnit {
1334
1340
  /** Weight unit can't be classified due to an error. */
1335
1341
  UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
1336
1342
  /** Kilograms. */
@@ -1338,7 +1344,7 @@ export declare enum WeightUnit {
1338
1344
  /** Pounds. */
1339
1345
  LB = "LB"
1340
1346
  }
1341
- export interface MembershipOptions {
1347
+ interface MembershipOptions {
1342
1348
  /**
1343
1349
  * List of payment options that can be used.
1344
1350
  * @maxSize 300
@@ -1355,13 +1361,13 @@ export interface MembershipOptions {
1355
1361
  */
1356
1362
  selectedMemberships?: SelectedMembership[];
1357
1363
  }
1358
- export interface Membership {
1364
+ interface Membership {
1359
1365
  /**
1360
1366
  * Membership ID.
1361
1367
  * @minLength 1
1362
1368
  * @maxLength 100
1363
1369
  */
1364
- id?: string;
1370
+ _id?: string;
1365
1371
  /**
1366
1372
  * ID of the application providing this payment option.
1367
1373
  * @format GUID
@@ -1384,7 +1390,7 @@ export interface Membership {
1384
1390
  /** Additional data about this membership. */
1385
1391
  additionalData?: Record<string, any> | null;
1386
1392
  }
1387
- export interface MembershipName {
1393
+ interface MembershipName {
1388
1394
  /**
1389
1395
  * Membership name.
1390
1396
  * @maxLength 100
@@ -1396,7 +1402,7 @@ export interface MembershipName {
1396
1402
  */
1397
1403
  translated?: string | null;
1398
1404
  }
1399
- export interface MembershipPaymentCredits {
1405
+ interface MembershipPaymentCredits {
1400
1406
  /**
1401
1407
  * Membership's total amount of credits.
1402
1408
  * @min 1
@@ -1405,7 +1411,7 @@ export interface MembershipPaymentCredits {
1405
1411
  /** Membership's remaining amount of credits. */
1406
1412
  remaining?: number;
1407
1413
  }
1408
- export interface InvalidMembership {
1414
+ interface InvalidMembership {
1409
1415
  /** Membership details. */
1410
1416
  membership?: Membership;
1411
1417
  /**
@@ -1415,7 +1421,7 @@ export interface InvalidMembership {
1415
1421
  */
1416
1422
  reason?: string;
1417
1423
  }
1418
- export interface V1AdditionalFee {
1424
+ interface V1AdditionalFee {
1419
1425
  /**
1420
1426
  * Additional fee's unique code (or ID) for future processing.
1421
1427
  * @minLength 1
@@ -1451,7 +1457,7 @@ export interface V1AdditionalFee {
1451
1457
  /** the source the additional fee was added from */
1452
1458
  source?: AdditionalFeeSource;
1453
1459
  }
1454
- export declare enum AdditionalFeeSource {
1460
+ declare enum AdditionalFeeSource {
1455
1461
  UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
1456
1462
  /** The additional fee was added by an additional fee service plugin */
1457
1463
  SERVICE_PLUGIN = "SERVICE_PLUGIN",
@@ -1460,3 +1466,90 @@ export declare enum AdditionalFeeSource {
1460
1466
  /** The additional fee was added manually on the request */
1461
1467
  MANUAL = "MANUAL"
1462
1468
  }
1469
+ interface CalculateTotalsOptions extends CalculateTotalsOptionsCouponOneOf, CalculateTotalsOptionsGiftCardOneOf {
1470
+ /**
1471
+ * Calculation ID. An identifier of the entity that you are calculating totals for, for example, cart ID or checkout ID.
1472
+ * This value will be used in order to optimise calculations by caching.
1473
+ * If not passed, calculation might be slower in some cases.
1474
+ * @minLength 1
1475
+ * @maxLength 100
1476
+ */
1477
+ calculationId?: string | null;
1478
+ /**
1479
+ * Line items for calculation.
1480
+ * @maxSize 300
1481
+ */
1482
+ lineItems?: LineItem[];
1483
+ /** Shipping address for tax and shipping calculation (if applicable). */
1484
+ shippingAddress?: Address;
1485
+ /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
1486
+ billingAddress?: Address;
1487
+ /** Details about selected shipping option. */
1488
+ selectedShippingOption?: SelectedShippingOption;
1489
+ /** Coupon ID. */
1490
+ couponId?: string | null;
1491
+ /** Coupon code. */
1492
+ couponCode?: string | null;
1493
+ /**
1494
+ * Gift card ID.
1495
+ * @format GUID
1496
+ */
1497
+ giftCardId?: string | null;
1498
+ /** Gift card code. */
1499
+ giftCardCode?: string | null;
1500
+ /**
1501
+ * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart/checkout.
1502
+ * @maxSize 100
1503
+ * @deprecated
1504
+ */
1505
+ merchantDiscounts?: MerchantDiscountInput[];
1506
+ /**
1507
+ * Buyer email. Used to enforce coupon [single-use per customer](https://support.wix.com/en/article/wix-stores-limiting-coupon-usage). If not passed, single coupon usage per customer will not be enforced.
1508
+ * @format EMAIL
1509
+ */
1510
+ buyerEmail?: string | null;
1511
+ /**
1512
+ * Member id to use for this calculation
1513
+ * When not provided, given that the caller is a member, its member id will be used
1514
+ * Providing this require elevated permissions - ECOM.ADMIN_CALCULATE_TOTALS
1515
+ */
1516
+ memberId?: string | null;
1517
+ /**
1518
+ * The selected memberships and which line items they apply to
1519
+ * When not provided, default selection will be returned
1520
+ * You can also set it to empty selection
1521
+ */
1522
+ selectedMemberships?: SelectedMemberships;
1523
+ /** Buyer phone number. Used to get shipping rates. */
1524
+ buyerPhone?: string | null;
1525
+ /**
1526
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
1527
+ * @format GUID
1528
+ */
1529
+ purchaseFlowId?: string | null;
1530
+ /**
1531
+ * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
1532
+ * For example, a Wix Pay Link ID.
1533
+ * @maxSize 20
1534
+ */
1535
+ externalReferences?: ExternalReference[];
1536
+ }
1537
+ /** @oneof */
1538
+ interface CalculateTotalsOptionsCouponOneOf {
1539
+ /** Coupon ID. */
1540
+ couponId?: string | null;
1541
+ /** Coupon code. */
1542
+ couponCode?: string | null;
1543
+ }
1544
+ /** @oneof */
1545
+ interface CalculateTotalsOptionsGiftCardOneOf {
1546
+ /**
1547
+ * Gift card ID.
1548
+ * @format GUID
1549
+ */
1550
+ giftCardId?: string | null;
1551
+ /** Gift card code. */
1552
+ giftCardCode?: string | null;
1553
+ }
1554
+
1555
+ export { type Carrier as $, AdditionalFeeSource as A, type MerchantDiscountInput as B, type CalculateTotalsOptions as C, DiscountType as D, type SelectedMemberships as E, FallbackReason as F, type Group as G, type SelectedMembership as H, ItemTypeItemType as I, JurisdictionType as J, type CarrierShippingOption as K, type LineItem as L, ManualCalculationReason as M, type ShippingOption as N, type DeliveryLogistics as O, PaymentOptionType as P, type PickupDetails as Q, RateType as R, SubscriptionFrequency as S, TaxableAddressType as T, type DeliveryTimeSlot as U, type V1TaxDetails as V, WeightUnit as W, type ShippingPrice as X, type MultiCurrencyPrice as Y, type OtherCharge as Z, type DeliveryAllocation as _, type CalculateTotalsResponse as a, type Region as a0, type ApplicableLineItems as a1, type AppliedDiscount as a2, type AppliedDiscountDiscountSourceOneOf as a3, type Coupon as a4, type MerchantDiscount as a5, type DiscountRule as a6, type DiscountRuleName as a7, type LineItemDiscount as a8, type AdditionalFee as a9, type FieldViolation as aA, type SystemError as aB, type CarrierErrors as aC, type CarrierError as aD, type MembershipOptions as aE, type Membership as aF, type MembershipName as aG, type MembershipPaymentCredits as aH, type InvalidMembership as aI, type V1AdditionalFee as aJ, type CalculateTotalsOptionsCouponOneOf as aK, type CalculateTotalsOptionsGiftCardOneOf as aL, type TaxDetails as aa, type ExternalReference as ab, type CalculatedLineItem as ac, type LineItemPricesData as ad, type ItemTaxFullDetails as ae, type TaxRateBreakdown as af, type TaxBreakdown as ag, type PriceSummary as ah, type GiftCard as ai, type TaxSummary as aj, type TaxCalculationDetails as ak, type TaxCalculationDetailsCalculationDetailsOneOf as al, type AutoTaxFallbackCalculationDetails as am, type ApplicationError as an, type AggregatedTaxBreakdown as ao, type ShippingInformation as ap, type ShippingRegion as aq, type SelectedCarrierServiceOption as ar, type SelectedCarrierServiceOptionPrices as as, type SelectedCarrierServiceOptionOtherCharge as at, type CarrierServiceOption as au, type CalculationErrors as av, type CalculationErrorsShippingCalculationErrorOneOf as aw, type Details as ax, type DetailsKindOneOf as ay, type ValidationError as az, PickupMethod as b, ChargeType as c, DataFetchType as d, RuleType as e, type TotalsCalculationEntity as f, type CalculateTotalsRequest as g, type CalculateTotalsRequestCouponOneOf as h, type CalculateTotalsRequestGiftCardOneOf as i, type CatalogReference as j, type PhysicalProperties as k, type Scope as l, type SubscriptionSettings as m, type ServiceProperties as n, type ItemType as o, type ItemTypeItemTypeDataOneOf as p, type TaxableAddress as q, type TaxableAddressTaxableAddressDataOneOf as r, type ApiV1AdditionalFee as s, type ModifierGroup as t, type TranslatableString as u, type ItemModifier as v, type Address as w, type StreetAddress as x, type AddressLocation as y, type SelectedShippingOption as z };