@wix/auto_sdk_ecom_checkout 1.0.16 → 1.0.18

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/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -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 +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-v1-checkout-checkout.context.d.ts +34 -0
  11. package/build/cjs/src/ecom-v1-checkout-checkout.context.js +77 -0
  12. package/build/cjs/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
  14. package/build/cjs/src/ecom-v1-checkout-checkout.http.js +1338 -0
  15. package/build/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
  17. package/build/cjs/src/ecom-v1-checkout-checkout.meta.js +351 -0
  18. package/build/cjs/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-checkout-checkout.public.d.ts +186 -0
  20. package/build/cjs/src/ecom-v1-checkout-checkout.public.js +358 -0
  21. package/build/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -0
  22. package/build/{ecom-v1-checkout-checkout.universal-C4Y04uL3.d.mts → cjs/src/ecom-v1-checkout-checkout.types.d.ts} +382 -658
  23. package/build/cjs/src/ecom-v1-checkout-checkout.types.js +301 -0
  24. package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -0
  25. package/build/{internal/ecom-v1-checkout-checkout.universal-ClmAJ_ss.d.mts → cjs/src/ecom-v1-checkout-checkout.universal.d.ts} +743 -449
  26. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +1559 -0
  27. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/ecom-v1-checkout-checkout.context.d.ts +34 -0
  39. package/build/es/src/ecom-v1-checkout-checkout.context.js +42 -0
  40. package/build/es/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
  42. package/build/es/src/ecom-v1-checkout-checkout.http.js +1318 -0
  43. package/build/es/src/ecom-v1-checkout-checkout.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
  45. package/build/es/src/ecom-v1-checkout-checkout.meta.js +308 -0
  46. package/build/es/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-checkout-checkout.public.d.ts +186 -0
  48. package/build/es/src/ecom-v1-checkout-checkout.public.js +306 -0
  49. package/build/es/src/ecom-v1-checkout-checkout.public.js.map +1 -0
  50. package/build/{ecom-v1-checkout-checkout.universal-C4Y04uL3.d.ts → es/src/ecom-v1-checkout-checkout.types.d.ts} +382 -658
  51. package/build/es/src/ecom-v1-checkout-checkout.types.js +298 -0
  52. package/build/es/src/ecom-v1-checkout-checkout.types.js.map +1 -0
  53. package/build/{internal/ecom-v1-checkout-checkout.universal-ClmAJ_ss.d.ts → es/src/ecom-v1-checkout-checkout.universal.d.ts} +743 -449
  54. package/build/es/src/ecom-v1-checkout-checkout.universal.js +1516 -0
  55. package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.d.ts +42 -0
  66. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js +77 -0
  67. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
  69. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js +1338 -0
  70. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
  72. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js +351 -0
  73. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.d.ts +219 -0
  75. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js +358 -0
  76. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -0
  77. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.d.ts +3406 -0
  78. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js +301 -0
  79. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +4468 -0
  81. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +1559 -0
  82. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/ecom-v1-checkout-checkout.context.d.ts +42 -0
  93. package/build/internal/es/src/ecom-v1-checkout-checkout.context.js +42 -0
  94. package/build/internal/es/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
  96. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js +1318 -0
  97. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
  99. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js +308 -0
  100. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-checkout-checkout.public.d.ts +219 -0
  102. package/build/internal/es/src/ecom-v1-checkout-checkout.public.js +306 -0
  103. package/build/internal/es/src/ecom-v1-checkout-checkout.public.js.map +1 -0
  104. package/build/internal/es/src/ecom-v1-checkout-checkout.types.d.ts +3406 -0
  105. package/build/internal/es/src/ecom-v1-checkout-checkout.types.js +298 -0
  106. package/build/internal/es/src/ecom-v1-checkout-checkout.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.d.ts +4468 -0
  108. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +1516 -0
  109. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -211
  112. package/build/index.d.ts +0 -211
  113. package/build/index.js +0 -2781
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -2707
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -252
  118. package/build/internal/index.d.ts +0 -252
  119. package/build/internal/index.js +0 -2781
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -2707
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -2322
  124. package/build/internal/meta.d.ts +0 -2322
  125. package/build/internal/meta.js +0 -1587
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -1544
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -2322
  130. package/build/meta.d.ts +0 -2322
  131. package/build/meta.js +0 -1587
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -1544
  134. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,4468 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface Checkout {
3
+ /**
4
+ * Checkout ID.
5
+ * @format GUID
6
+ * @readonly
7
+ */
8
+ _id?: string | null;
9
+ /**
10
+ * Line items.
11
+ *
12
+ * Max: 300 items
13
+ * @minSize 1
14
+ * @maxSize 300
15
+ * @readonly
16
+ */
17
+ lineItems?: LineItem[];
18
+ /** Billing information. */
19
+ billingInfo?: AddressWithContact;
20
+ /** Shipping information. */
21
+ shippingInfo?: ShippingInfo;
22
+ /**
23
+ * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
24
+ * @maxLength 1000
25
+ */
26
+ buyerNote?: string | null;
27
+ /** Buyer information. */
28
+ buyerInfo?: BuyerInfo;
29
+ /**
30
+ * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
31
+ * @readonly
32
+ * @format CURRENCY
33
+ */
34
+ conversionCurrency?: string;
35
+ /**
36
+ * Calculated price summary for the checkout.
37
+ * @readonly
38
+ */
39
+ priceSummary?: PriceSummary;
40
+ /**
41
+ * Errors when calculating totals.
42
+ * @readonly
43
+ */
44
+ calculationErrors?: CalculationErrors;
45
+ /**
46
+ * Applied gift card details.
47
+ *
48
+ * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
49
+ * @readonly
50
+ */
51
+ giftCard?: GiftCard;
52
+ /**
53
+ * Applied discounts.
54
+ * @readonly
55
+ */
56
+ appliedDiscounts?: AppliedDiscount[];
57
+ /** Custom fields. */
58
+ customFields?: CustomField[];
59
+ /**
60
+ * Weight measurement unit. Defaults to a site's weight unit.
61
+ * @readonly
62
+ */
63
+ weightUnit?: WeightUnit;
64
+ /**
65
+ * Tax summary.
66
+ * @readonly
67
+ */
68
+ taxSummary?: TaxSummary;
69
+ /**
70
+ * The currency used when submitting the order.
71
+ * @format CURRENCY
72
+ * @readonly
73
+ */
74
+ currency?: string;
75
+ /**
76
+ * Sales channel that submitted the order.
77
+ * @readonly
78
+ */
79
+ channelType?: ChannelType;
80
+ /**
81
+ * Site language in which original values are shown.
82
+ * @readonly
83
+ */
84
+ siteLanguage?: string;
85
+ /**
86
+ * Language for communication with the buyer. Defaults to the site language.
87
+ * For a site that supports multiple languages, this is the language the buyer selected.
88
+ * @readonly
89
+ */
90
+ buyerLanguage?: string;
91
+ /**
92
+ * Whether an order was successfully created from this checkout.
93
+ * For an order to be successful, it must be successfully paid for (unless the total is 0).
94
+ * @readonly
95
+ */
96
+ completed?: boolean;
97
+ /**
98
+ * Whether tax is included in line item prices.
99
+ * @readonly
100
+ */
101
+ taxIncludedInPrice?: boolean;
102
+ /**
103
+ * ID of the checkout's initiator.
104
+ * @readonly
105
+ */
106
+ createdBy?: CreatedBy;
107
+ /**
108
+ * Date and time the checkout was created.
109
+ * @readonly
110
+ */
111
+ _createdDate?: Date | null;
112
+ /**
113
+ * Date and time the checkout was updated.
114
+ * @readonly
115
+ */
116
+ _updatedDate?: Date | null;
117
+ /**
118
+ * Minimal amount to pay in order to place the order.
119
+ * @readonly
120
+ */
121
+ payNow?: PriceSummary;
122
+ /**
123
+ * Remaining amount for the order to be fully paid.
124
+ * @readonly
125
+ */
126
+ payLater?: PriceSummary;
127
+ /** Memberships to apply when creating the order. */
128
+ membershipOptions?: MembershipOptions;
129
+ /**
130
+ * Additional Fees.
131
+ * @maxSize 100
132
+ */
133
+ additionalFees?: AdditionalFee[];
134
+ /**
135
+ * Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart.
136
+ * @format GUID
137
+ */
138
+ cartId?: string | null;
139
+ /**
140
+ * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
141
+ * @readonly
142
+ */
143
+ violations?: Violation[];
144
+ /**
145
+ * Custom field data for the checkout object.
146
+ *
147
+ * [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.
148
+ */
149
+ extendedFields?: ExtendedFields;
150
+ /**
151
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
152
+ * @format GUID
153
+ * @readonly
154
+ */
155
+ purchaseFlowId?: string | null;
156
+ /**
157
+ * Additional settings for customization of the checkout process.
158
+ *
159
+ * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).
160
+ * @immutable
161
+ */
162
+ customSettings?: CustomSettings;
163
+ /**
164
+ * Reference IDs for the app and component providing custom checkout page content.
165
+ *
166
+ * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
167
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
168
+ */
169
+ customContentReference?: CustomContentReference;
170
+ /**
171
+ * References to an external app and resource associated with this checkout.
172
+ * Used for integration and tracking across different platforms.
173
+ * @immutable
174
+ */
175
+ externalReference?: ExternalReference;
176
+ /**
177
+ * Order ID.
178
+ *
179
+ * This field is empty until the checkout completes and becomes an order.
180
+ * @internal
181
+ * @format GUID
182
+ * @readonly
183
+ */
184
+ orderId?: string | null;
185
+ /**
186
+ * Payment for subscriptions after free trial period.
187
+ * @internal
188
+ * @readonly
189
+ */
190
+ payAfterFreeTrial?: PriceSummary;
191
+ /**
192
+ * The business location ID associated with the checkout.
193
+ *
194
+ * To learn more, see the Locations API.
195
+ * @format GUID
196
+ */
197
+ businessLocationId?: string | null;
198
+ /**
199
+ * Whether payment is required to create an order.
200
+ *
201
+ * Payment is required if any of the following conditions are met:
202
+ * 1. At least one item requires a payment method. This can be because the item has the `savePaymentMethod` field set to `true`, or the item is a subscription with a price greater than zero.
203
+ * 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
204
+ * @internal
205
+ * @readonly
206
+ */
207
+ paymentRequired?: boolean;
208
+ /**
209
+ * Charges information for each subscription in the checkout.
210
+ * @internal
211
+ * @readonly
212
+ * @maxSize 100
213
+ */
214
+ subscriptionCharges?: SubscriptionCharges[];
215
+ }
216
+ export interface LineItem {
217
+ /**
218
+ * Line item ID.
219
+ * @format GUID
220
+ * @readonly
221
+ */
222
+ _id?: string | null;
223
+ /**
224
+ * Item quantity.
225
+ *
226
+ * Min: `"1"`
227
+ * Max: `"100000"`
228
+ * @min 1
229
+ * @max 100000
230
+ */
231
+ quantity?: number;
232
+ /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
233
+ catalogReference?: CatalogReference;
234
+ /**
235
+ * Item name.
236
+ * + Stores - `product.name`
237
+ * + Bookings - `service.info.name`
238
+ * + Events - `ticket.name`
239
+ * @readonly
240
+ */
241
+ productName?: ProductName;
242
+ /**
243
+ * URL to the item's page on the site.
244
+ * @readonly
245
+ */
246
+ url?: string;
247
+ /**
248
+ * Item price **after** catalog-defined discount and line item discounts.
249
+ * @readonly
250
+ */
251
+ price?: MultiCurrencyPrice;
252
+ /**
253
+ * Total line item price **after** catalog-defined discount and line item discounts.
254
+ * @readonly
255
+ */
256
+ lineItemPrice?: MultiCurrencyPrice;
257
+ /**
258
+ * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
259
+ * @readonly
260
+ */
261
+ fullPrice?: MultiCurrencyPrice;
262
+ /**
263
+ * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided.
264
+ * @readonly
265
+ */
266
+ priceBeforeDiscounts?: MultiCurrencyPrice;
267
+ /**
268
+ * Total price after all discounts and tax.
269
+ * @readonly
270
+ */
271
+ totalPriceAfterTax?: MultiCurrencyPrice;
272
+ /**
273
+ * Total price after discounts, and before tax.
274
+ * @readonly
275
+ */
276
+ totalPriceBeforeTax?: MultiCurrencyPrice;
277
+ /**
278
+ * Tax details for this line item.
279
+ * @readonly
280
+ */
281
+ taxDetails?: ItemTaxFullDetails;
282
+ /**
283
+ * Discount for this line item's entire quantity.
284
+ * @readonly
285
+ */
286
+ discount?: MultiCurrencyPrice;
287
+ /**
288
+ * Line item description lines. Used for displaying the cart, checkout and order.
289
+ * @readonly
290
+ */
291
+ descriptionLines?: DescriptionLine[];
292
+ /**
293
+ * Line item image details.
294
+ * @readonly
295
+ */
296
+ media?: string;
297
+ /**
298
+ * Item availability details.
299
+ * @readonly
300
+ */
301
+ availability?: ItemAvailabilityInfo;
302
+ /**
303
+ * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability.
304
+ * @readonly
305
+ */
306
+ physicalProperties?: PhysicalProperties;
307
+ /**
308
+ * Item type. Either a preset type or custom.
309
+ * @readonly
310
+ */
311
+ itemType?: ItemType;
312
+ /**
313
+ * Subscription option information.
314
+ * @readonly
315
+ */
316
+ subscriptionOptionInfo?: SubscriptionOptionInfo;
317
+ /**
318
+ * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`.
319
+ * + `"FULL_PAYMENT_ONLINE"`: The entire payment for this item happens as part of the checkout.
320
+ * + `"FULL_PAYMENT_OFFLINE"`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
321
+ * + `"MEMBERSHIP"`: Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
322
+ * + `"DEPOSIT_ONLINE"`: Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.
323
+ * @readonly
324
+ */
325
+ paymentOption?: PaymentOptionType;
326
+ /**
327
+ * Service properties. When relevant, this contains information such as date and number of participants.
328
+ * @readonly
329
+ */
330
+ serviceProperties?: ServiceProperties;
331
+ /**
332
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
333
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
334
+ * + In most cases, this field has the same value as `catalogReference.catalogItemId`.
335
+ * + Used in membership validation.
336
+ * @minLength 1
337
+ * @maxLength 36
338
+ * @readonly
339
+ */
340
+ rootCatalogItemId?: string | null;
341
+ /**
342
+ * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
343
+ * @readonly
344
+ */
345
+ priceDescription?: PriceDescription;
346
+ /**
347
+ * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
348
+ * @readonly
349
+ */
350
+ depositAmount?: MultiCurrencyPrice;
351
+ /**
352
+ * Delivery profile ID.
353
+ * @format GUID
354
+ * @readonly
355
+ */
356
+ deliveryProfileId?: string | null;
357
+ /**
358
+ * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin.
359
+ * @readonly
360
+ */
361
+ customLineItem?: boolean;
362
+ /**
363
+ * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
364
+ * @minLength 1
365
+ * @maxLength 2500
366
+ * @readonly
367
+ */
368
+ consentRequiredPaymentPolicy?: string | null;
369
+ /**
370
+ * Overriding values for catalog item properties.
371
+ *
372
+ * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
373
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
374
+ */
375
+ catalogOverrideFields?: CatalogOverrideFields;
376
+ /**
377
+ * Whether the price is not yet defined, and will be updated after the order is created.
378
+ * @internal
379
+ * @readonly
380
+ */
381
+ priceUndetermined?: boolean;
382
+ /**
383
+ * Whether the line item quantity is fixed and cannot be changed.
384
+ * @internal
385
+ * @readonly
386
+ */
387
+ fixedQuantity?: boolean;
388
+ /**
389
+ * Whether to save the payment method on the order.
390
+ *
391
+ * Default: `false`
392
+ * @readonly
393
+ */
394
+ savePaymentMethod?: boolean;
395
+ /**
396
+ * Address to use for tax calculation purposes.
397
+ * @internal
398
+ */
399
+ taxableAddress?: TaxableAddress;
400
+ /**
401
+ * Custom extended fields for the line item object.
402
+ *
403
+ * [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.
404
+ * @internal
405
+ */
406
+ extendedFields?: ExtendedFields;
407
+ /**
408
+ * Policies to be displayed to the customer on the checkout page.
409
+ * @internal
410
+ * @readonly
411
+ * @maxSize 5
412
+ */
413
+ policies?: Policy[];
414
+ /**
415
+ * ID of the app managing the inventory.
416
+ * @internal
417
+ * @format GUID
418
+ */
419
+ inventoryAppId?: string | null;
420
+ /**
421
+ * Whether the item can only be purchased by site members.
422
+ *
423
+ * Default: `false`
424
+ * @internal
425
+ * @readonly
426
+ */
427
+ membersOnly?: boolean;
428
+ /**
429
+ * Modifier groups that were added to the item.
430
+ * @internal
431
+ * @readonly
432
+ * @maxSize 10
433
+ */
434
+ modifierGroups?: ModifierGroup[];
435
+ /**
436
+ * Total price of all item modifiers. Included in the item price.
437
+ * @internal
438
+ * @readonly
439
+ */
440
+ modifiersTotalPrice?: MultiCurrencyPrice;
441
+ }
442
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
443
+ export interface CatalogReference {
444
+ /**
445
+ * ID of the item within the catalog it belongs to.
446
+ * @minLength 1
447
+ * @maxLength 36
448
+ */
449
+ catalogItemId?: string;
450
+ /**
451
+ * ID of the app providing the catalog.
452
+ *
453
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
454
+ *
455
+ * For items from Wix catalogs, the following values always apply:
456
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
457
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
458
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
459
+ * @minLength 1
460
+ */
461
+ appId?: string;
462
+ /**
463
+ * Additional item details in key:value pairs.
464
+ *
465
+ * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
466
+ *
467
+ * For products and variants from your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration).
468
+ */
469
+ options?: Record<string, any> | null;
470
+ }
471
+ export interface ProductName {
472
+ /**
473
+ * __Required.__ Item 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).
474
+ *
475
+ * Min: 1 character.
476
+ * Max: 200 characters.
477
+ * @minLength 1
478
+ * @maxLength 200
479
+ */
480
+ original?: string;
481
+ /**
482
+ * Item name translated into the buyer's language.
483
+ *
484
+ * Min: 1 character.
485
+ * Max: 400 characters.
486
+ * Default: Same as `original`.
487
+ * @minLength 1
488
+ * @maxLength 400
489
+ */
490
+ translated?: string | null;
491
+ }
492
+ export interface MultiCurrencyPrice {
493
+ /**
494
+ * Amount.
495
+ * @decimalValue options { gte:0, lte:1000000000000000 }
496
+ */
497
+ amount?: string;
498
+ /**
499
+ * Converted amount.
500
+ * @readonly
501
+ * @decimalValue options { gte:0, lte:1000000000000000 }
502
+ */
503
+ convertedAmount?: string;
504
+ /**
505
+ * Amount formatted with currency symbol.
506
+ * @readonly
507
+ */
508
+ formattedAmount?: string;
509
+ /**
510
+ * Converted amount formatted with currency symbol.
511
+ * @readonly
512
+ */
513
+ formattedConvertedAmount?: string;
514
+ }
515
+ export interface ItemTaxFullDetails {
516
+ /** Amount for which tax is calculated. */
517
+ taxableAmount?: MultiCurrencyPrice;
518
+ /**
519
+ * Tax rate %, as a decimal point between 0 and 1.
520
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
521
+ */
522
+ taxRate?: string;
523
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
524
+ totalTax?: MultiCurrencyPrice;
525
+ /**
526
+ * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
527
+ * @readonly
528
+ * @deprecated
529
+ */
530
+ rateBreakdown?: TaxRateBreakdown[];
531
+ }
532
+ export interface TaxRateBreakdown {
533
+ /**
534
+ * Name of tax against which the calculation was performed.
535
+ * @maxLength 100
536
+ */
537
+ name?: string;
538
+ /**
539
+ * Rate at which this tax detail was calculated.
540
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
541
+ */
542
+ rate?: string;
543
+ /** Amount of tax for this tax detail. */
544
+ tax?: MultiCurrencyPrice;
545
+ }
546
+ /**
547
+ * TaxBreakdown represents tax information for a line item.
548
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
549
+ */
550
+ export interface TaxBreakdown {
551
+ /**
552
+ * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
553
+ * @maxLength 200
554
+ */
555
+ jurisdiction?: string | null;
556
+ /** The amount of this line item price that was considered nontaxable. (Decimal value) */
557
+ nonTaxableAmount?: MultiCurrencyPrice;
558
+ /**
559
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
560
+ * @decimalValue options { gte:0, maxScale:6 }
561
+ */
562
+ rate?: string | null;
563
+ /** The amount of tax estimated for this line item. (Decimal value) */
564
+ taxAmount?: MultiCurrencyPrice;
565
+ /** The taxable amount of this line item. */
566
+ taxableAmount?: MultiCurrencyPrice;
567
+ /**
568
+ * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
569
+ * @maxLength 200
570
+ */
571
+ taxType?: string | null;
572
+ /**
573
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
574
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
575
+ * @maxLength 200
576
+ */
577
+ taxName?: string | null;
578
+ /** The type of the jurisdiction in which this tax detail applies. */
579
+ jurisdictionType?: JurisdictionType;
580
+ }
581
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
582
+ export declare enum JurisdictionType {
583
+ UNDEFINED = "UNDEFINED",
584
+ COUNTRY = "COUNTRY",
585
+ STATE = "STATE",
586
+ COUNTY = "COUNTY",
587
+ CITY = "CITY",
588
+ SPECIAL = "SPECIAL"
589
+ }
590
+ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
591
+ /** Description line plain text value. */
592
+ plainText?: PlainTextValue;
593
+ /** Description line color value. */
594
+ colorInfo?: Color;
595
+ /** Description line name. */
596
+ name?: DescriptionLineName;
597
+ }
598
+ /** @oneof */
599
+ export interface DescriptionLineValueOneOf {
600
+ /** Description line plain text value. */
601
+ plainText?: PlainTextValue;
602
+ /** Description line color value. */
603
+ colorInfo?: Color;
604
+ }
605
+ /** @oneof */
606
+ export interface DescriptionLineDescriptionLineValueOneOf {
607
+ }
608
+ export interface DescriptionLineName {
609
+ /**
610
+ * 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).
611
+ * @maxLength 100
612
+ */
613
+ original?: string;
614
+ /**
615
+ * Description line name translated into the buyer's language.
616
+ *
617
+ * Default: Same as `original`.
618
+ * @maxLength 200
619
+ */
620
+ translated?: string | null;
621
+ }
622
+ export interface PlainTextValue {
623
+ /**
624
+ * 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).
625
+ * @maxLength 600
626
+ */
627
+ original?: string;
628
+ /**
629
+ * Description line plain text value translated into the buyer's language.
630
+ *
631
+ * Default: Same as `original`.
632
+ * @maxLength 600
633
+ */
634
+ translated?: string | null;
635
+ }
636
+ export interface Color {
637
+ /**
638
+ * 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).
639
+ * @maxLength 500
640
+ */
641
+ original?: string;
642
+ /**
643
+ * Description line color name translated into the buyer's language.
644
+ *
645
+ * Default: Same as `original`.
646
+ * @maxLength 500
647
+ */
648
+ translated?: string | null;
649
+ /** HEX or RGB color code for display. */
650
+ code?: string | null;
651
+ }
652
+ export declare enum DescriptionLineType {
653
+ /** Unrecognized type. */
654
+ UNRECOGNISED = "UNRECOGNISED",
655
+ /** Plain text type. */
656
+ PLAIN_TEXT = "PLAIN_TEXT",
657
+ /** Color type. */
658
+ COLOR = "COLOR"
659
+ }
660
+ export interface FocalPoint {
661
+ /** X-coordinate of the focal point. */
662
+ x?: number;
663
+ /** Y-coordinate of the focal point. */
664
+ y?: number;
665
+ /** crop by height */
666
+ height?: number | null;
667
+ /** crop by width */
668
+ width?: number | null;
669
+ }
670
+ export interface ItemAvailabilityInfo {
671
+ /** Item availability status. */
672
+ status?: ItemAvailabilityStatus;
673
+ /** Quantity available. */
674
+ quantityAvailable?: number | null;
675
+ }
676
+ export declare enum ItemAvailabilityStatus {
677
+ AVAILABLE = "AVAILABLE",
678
+ /** Item does not exist. */
679
+ NOT_FOUND = "NOT_FOUND",
680
+ /** Item is not in stock. */
681
+ NOT_AVAILABLE = "NOT_AVAILABLE",
682
+ /** Available quantity is less than requested. */
683
+ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE"
684
+ }
685
+ export interface PhysicalProperties {
686
+ /** Line item weight. Measurement unit (`"KG"` or `"LB"`) is taken from `order.weightUnit`. */
687
+ weight?: number | null;
688
+ /**
689
+ * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
690
+ * @maxLength 40
691
+ */
692
+ sku?: string | null;
693
+ /** Whether this line item is shippable. */
694
+ shippable?: boolean;
695
+ }
696
+ export interface Scope {
697
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
698
+ namespace?: string;
699
+ /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
700
+ group?: Group;
701
+ }
702
+ export interface Group {
703
+ /** 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). */
704
+ name?: string;
705
+ /** Item ID (when the coupon scope is limited to just one item). */
706
+ entityId?: string | null;
707
+ }
708
+ export interface ItemType extends ItemTypeItemTypeDataOneOf {
709
+ /** Preset item type. */
710
+ preset?: ItemTypeItemType;
711
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
712
+ custom?: string;
713
+ }
714
+ /** @oneof */
715
+ export interface ItemTypeItemTypeDataOneOf {
716
+ /** Preset item type. */
717
+ preset?: ItemTypeItemType;
718
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
719
+ custom?: string;
720
+ }
721
+ export declare enum ItemTypeItemType {
722
+ UNRECOGNISED = "UNRECOGNISED",
723
+ PHYSICAL = "PHYSICAL",
724
+ DIGITAL = "DIGITAL",
725
+ GIFT_CARD = "GIFT_CARD",
726
+ SERVICE = "SERVICE"
727
+ }
728
+ export interface SubscriptionOptionInfo {
729
+ /** Subscription option settings. */
730
+ subscriptionSettings?: SubscriptionSettings;
731
+ /** Subscription option title. */
732
+ title?: Title;
733
+ /** Subscription option description. */
734
+ description?: Description;
735
+ }
736
+ export interface SubscriptionSettings {
737
+ /** Frequency of recurring payment. */
738
+ frequency?: SubscriptionFrequency;
739
+ /**
740
+ * Interval of recurring payment.
741
+ *
742
+ * Default: `1`.
743
+ * If SubscriptionFrequency is Day the minimum interval is 7
744
+ * @min 1
745
+ * @max 50
746
+ */
747
+ interval?: number | null;
748
+ /** Whether subscription is renewed automatically at the end of each period. */
749
+ autoRenewal?: boolean;
750
+ /**
751
+ * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.
752
+ * @min 1
753
+ */
754
+ billingCycles?: number | null;
755
+ /**
756
+ * Whether to allow the customer to cancel the subscription..
757
+ * @internal
758
+ */
759
+ enableCustomerCancellation?: boolean;
760
+ /**
761
+ * Period until first cycle starts. If applied payNow will be 0
762
+ * If None => no free trial
763
+ * @internal
764
+ */
765
+ freeTrialPeriod?: FreeTrialPeriod;
766
+ /**
767
+ * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.
768
+ * @internal
769
+ */
770
+ startDate?: Date | null;
771
+ }
772
+ /** Frequency unit of recurring payment */
773
+ export declare enum SubscriptionFrequency {
774
+ UNDEFINED = "UNDEFINED",
775
+ DAY = "DAY",
776
+ WEEK = "WEEK",
777
+ MONTH = "MONTH",
778
+ YEAR = "YEAR"
779
+ }
780
+ export interface FreeTrialPeriod {
781
+ /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
782
+ frequency?: SubscriptionFrequency;
783
+ /**
784
+ * interval of period
785
+ * @min 1
786
+ * @max 999
787
+ */
788
+ interval?: number;
789
+ }
790
+ export interface Title {
791
+ /**
792
+ * 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).
793
+ * @minLength 1
794
+ * @maxLength 150
795
+ */
796
+ original?: string;
797
+ /**
798
+ * Subscription option name translated into the buyer's language.
799
+ *
800
+ * Default: Same as `original`.
801
+ * @minLength 1
802
+ * @maxLength 150
803
+ */
804
+ translated?: string | null;
805
+ }
806
+ export interface Description {
807
+ /**
808
+ * Subscription option description.
809
+ * @maxLength 500
810
+ */
811
+ original?: string;
812
+ /**
813
+ * Translated subscription option description.
814
+ * @maxLength 500
815
+ */
816
+ translated?: string | null;
817
+ }
818
+ export interface SecuredMedia {
819
+ /**
820
+ * Media ID in Wix Media Manager.
821
+ * @minLength 1
822
+ * @maxLength 100
823
+ */
824
+ _id?: string;
825
+ /**
826
+ * Original filename.
827
+ * @minLength 1
828
+ * @maxLength 1000
829
+ */
830
+ fileName?: string;
831
+ /** File type. */
832
+ fileType?: FileType;
833
+ }
834
+ export declare enum FileType {
835
+ UNSPECIFIED = "UNSPECIFIED",
836
+ SECURE_PICTURE = "SECURE_PICTURE",
837
+ SECURE_VIDEO = "SECURE_VIDEO",
838
+ SECURE_DOCUMENT = "SECURE_DOCUMENT",
839
+ SECURE_MUSIC = "SECURE_MUSIC",
840
+ SECURE_ARCHIVE = "SECURE_ARCHIVE"
841
+ }
842
+ /** Type of selected payment option for catalog item */
843
+ export declare enum PaymentOptionType {
844
+ /** The entire payment for this item happens as part of the checkout. */
845
+ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
846
+ /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
847
+ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
848
+ /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
849
+ MEMBERSHIP = "MEMBERSHIP",
850
+ /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
851
+ DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
852
+ /** 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`. */
853
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
854
+ }
855
+ export interface ServiceProperties {
856
+ /**
857
+ * 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.
858
+ * For example, the start time of a class.
859
+ */
860
+ scheduledDate?: Date | null;
861
+ /**
862
+ * 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.
863
+ * @min 1
864
+ * @max 10000
865
+ */
866
+ numberOfParticipants?: number | null;
867
+ }
868
+ export interface PriceDescription {
869
+ /**
870
+ * __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).
871
+ * @minLength 1
872
+ * @maxLength 100
873
+ */
874
+ original?: string;
875
+ /**
876
+ * Price description translated into the buyer's language.
877
+ *
878
+ * Default: Same as `original`.
879
+ * @minLength 1
880
+ * @maxLength 100
881
+ */
882
+ translated?: string | null;
883
+ }
884
+ export interface CatalogOverrideFields {
885
+ /** Item name. */
886
+ productName?: ProductName;
887
+ /**
888
+ * Item price **after** discounts.
889
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
890
+ */
891
+ price?: string | null;
892
+ /**
893
+ * Item price **before** discounts.
894
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
895
+ */
896
+ fullPrice?: string | null;
897
+ /**
898
+ * Item description lines. Used when displaying the line item to customers.
899
+ * @maxSize 20
900
+ */
901
+ descriptionLines?: DescriptionLine[];
902
+ /** Physical properties of the item. */
903
+ physicalProperties?: PhysicalProperties;
904
+ /** Item image. */
905
+ image?: string;
906
+ /** Payment method selected for the item. */
907
+ paymentOption?: PaymentOption;
908
+ /**
909
+ * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.
910
+ * @format DECIMAL_VALUE
911
+ * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
912
+ */
913
+ depositAmount?: string | null;
914
+ /**
915
+ * Whether to save the payment method on the order.
916
+ *
917
+ * Default: `false`
918
+ */
919
+ savePaymentMethod?: boolean | null;
920
+ }
921
+ export interface PaymentOption {
922
+ /**
923
+ * Type of selected payment option for current item.
924
+ *
925
+ * Default: `FULL_PAYMENT_ONLINE`
926
+ */
927
+ value?: PaymentOptionType;
928
+ }
929
+ export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
930
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
931
+ addressType?: TaxableAddressType;
932
+ }
933
+ /** @oneof */
934
+ export interface TaxableAddressTaxableAddressDataOneOf {
935
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
936
+ addressType?: TaxableAddressType;
937
+ }
938
+ export declare enum TaxableAddressType {
939
+ UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
940
+ BUSINESS = "BUSINESS",
941
+ BILLING = "BILLING",
942
+ SHIPPING = "SHIPPING"
943
+ }
944
+ export interface ExtendedFields {
945
+ /**
946
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
947
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
948
+ *
949
+ * You can only access fields for which you have the appropriate permissions.
950
+ *
951
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
952
+ */
953
+ namespaces?: Record<string, Record<string, any>>;
954
+ }
955
+ export interface Policy {
956
+ /**
957
+ * Policy title - should be translated
958
+ * @minLength 1
959
+ * @maxLength 29
960
+ */
961
+ title?: string | null;
962
+ /**
963
+ * Policy content - should be translated
964
+ * @minLength 1
965
+ * @maxLength 3000
966
+ */
967
+ content?: string;
968
+ }
969
+ export interface ModifierGroup {
970
+ /**
971
+ * Modifier group id.
972
+ * @minLength 1
973
+ * @maxLength 36
974
+ */
975
+ _id?: string;
976
+ /** Modifier group name. */
977
+ name?: TranslatableString;
978
+ /**
979
+ * List of modifiers in this group.
980
+ * @minSize 1
981
+ * @maxSize 10
982
+ */
983
+ modifiers?: ItemModifier[];
984
+ }
985
+ export interface TranslatableString {
986
+ /**
987
+ * __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).
988
+ *
989
+ * Min: 1 character.
990
+ * Max: 200 characters.
991
+ * @minLength 1
992
+ * @maxLength 200
993
+ */
994
+ original?: string;
995
+ /**
996
+ * String translated into the buyer's language.
997
+ *
998
+ * Min: 1 character.
999
+ * Max: 400 characters.
1000
+ * Default: Same as `original`.
1001
+ * @minLength 1
1002
+ * @maxLength 400
1003
+ */
1004
+ translated?: string | null;
1005
+ }
1006
+ export interface ItemModifier {
1007
+ /**
1008
+ * Modifier ID.
1009
+ * @minLength 1
1010
+ * @maxLength 36
1011
+ */
1012
+ _id?: string;
1013
+ /**
1014
+ * The quantity of this modifier.
1015
+ * @min 1
1016
+ * @max 100000
1017
+ */
1018
+ quantity?: number | null;
1019
+ /** Primary display label for the modifier. */
1020
+ label?: TranslatableString;
1021
+ /** Optional additional details or clarification for the modifier. */
1022
+ details?: TranslatableString;
1023
+ /** The price of the modifier. */
1024
+ price?: MultiCurrencyPrice;
1025
+ }
1026
+ /** Billing Info and shipping details */
1027
+ export interface AddressWithContact {
1028
+ /** Address. */
1029
+ address?: ApiAddress;
1030
+ /** Contact details. */
1031
+ contactDetails?: FullAddressContactDetails;
1032
+ }
1033
+ /** Physical address */
1034
+ export interface ApiAddress {
1035
+ /**
1036
+ * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
1037
+ * @format COUNTRY
1038
+ */
1039
+ country?: string | null;
1040
+ /**
1041
+ * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
1042
+ * @maxLength 50
1043
+ */
1044
+ subdivision?: string | null;
1045
+ /**
1046
+ * City name.
1047
+ * @maxLength 50
1048
+ */
1049
+ city?: string | null;
1050
+ /**
1051
+ * Postal or zip code.
1052
+ * @maxLength 50
1053
+ */
1054
+ postalCode?: string | null;
1055
+ /** Street address. */
1056
+ streetAddress?: StreetAddress;
1057
+ /**
1058
+ * Main address line (usually street name and number).
1059
+ * @maxLength 150
1060
+ */
1061
+ addressLine1?: string | null;
1062
+ /**
1063
+ * Free text providing more detailed address info. Usually contains apt, suite, floor.
1064
+ * @maxLength 100
1065
+ */
1066
+ addressLine2?: string | null;
1067
+ /**
1068
+ * Country's full name.
1069
+ * @readonly
1070
+ */
1071
+ countryFullname?: string | null;
1072
+ /**
1073
+ * Subdivision full-name.
1074
+ * @readonly
1075
+ */
1076
+ subdivisionFullname?: string | null;
1077
+ }
1078
+ export interface StreetAddress {
1079
+ /** Street number. */
1080
+ number?: string;
1081
+ /** Street name. */
1082
+ name?: string;
1083
+ }
1084
+ export interface AddressLocation {
1085
+ /** Address latitude. */
1086
+ latitude?: number | null;
1087
+ /** Address longitude. */
1088
+ longitude?: number | null;
1089
+ }
1090
+ /** Full contact details for an address */
1091
+ export interface FullAddressContactDetails {
1092
+ /**
1093
+ * First name.
1094
+ * @maxLength 100
1095
+ */
1096
+ firstName?: string | null;
1097
+ /**
1098
+ * Last name.
1099
+ * @maxLength 100
1100
+ */
1101
+ lastName?: string | null;
1102
+ /**
1103
+ * Phone number.
1104
+ * @format PHONE
1105
+ */
1106
+ phone?: string | null;
1107
+ /**
1108
+ * Company name.
1109
+ * @maxLength 1000
1110
+ */
1111
+ company?: string | null;
1112
+ /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
1113
+ vatId?: CommonVatId;
1114
+ }
1115
+ export interface CommonVatId {
1116
+ /** Customer's tax ID. */
1117
+ _id?: string;
1118
+ /**
1119
+ * Tax type.
1120
+ *
1121
+ * Supported values:
1122
+ * + `CPF`: for individual tax payers
1123
+ * + `CNPJ`: for corporations
1124
+ */
1125
+ type?: CommonVatType;
1126
+ }
1127
+ /** tax info types */
1128
+ export declare enum CommonVatType {
1129
+ UNSPECIFIED = "UNSPECIFIED",
1130
+ /** CPF - for individual tax payers. */
1131
+ CPF = "CPF",
1132
+ /** CNPJ - for corporations */
1133
+ CNPJ = "CNPJ"
1134
+ }
1135
+ export interface ShippingInfo {
1136
+ /** Shipping address and contact details. */
1137
+ shippingDestination?: AddressWithContact;
1138
+ /** Selected option out of the options allowed for the `region`. */
1139
+ selectedCarrierServiceOption?: SelectedCarrierServiceOption;
1140
+ /**
1141
+ * Shipping region. Based on the address provided.
1142
+ * @readonly
1143
+ */
1144
+ region?: ShippingRegion;
1145
+ /**
1146
+ * All carrier options for this shipping rule.
1147
+ * @readonly
1148
+ */
1149
+ carrierServiceOptions?: CarrierServiceOption[];
1150
+ }
1151
+ export interface SelectedCarrierServiceOption {
1152
+ /**
1153
+ * Unique identifier of selected option. For example, "usps_std_overnight".
1154
+ * @maxLength 100
1155
+ */
1156
+ code?: string;
1157
+ /**
1158
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1159
+ * For example, "Standard" or "First-Class Package International".
1160
+ * @maxLength 250
1161
+ * @readonly
1162
+ */
1163
+ title?: string;
1164
+ /**
1165
+ * Delivery logistics.
1166
+ * @readonly
1167
+ */
1168
+ logistics?: DeliveryLogistics;
1169
+ /**
1170
+ * Shipping costs.
1171
+ * @readonly
1172
+ */
1173
+ cost?: SelectedCarrierServiceOptionPrices;
1174
+ /**
1175
+ * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
1176
+ * @readonly
1177
+ */
1178
+ requestedShippingOption?: boolean;
1179
+ /** Other charges */
1180
+ otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
1181
+ /**
1182
+ * This carrier's unique ID
1183
+ * @format GUID
1184
+ */
1185
+ carrierId?: string | null;
1186
+ /**
1187
+ * Delivery solution allocations to different delivery carriers and delivery regions
1188
+ * @maxSize 300
1189
+ */
1190
+ deliveryAllocations?: DeliveryAllocation[];
1191
+ /** If the delivery solution is a partial and doesn't apply to all items. */
1192
+ partial?: boolean | null;
1193
+ }
1194
+ export interface DeliveryLogistics {
1195
+ /**
1196
+ * Expected delivery time, in free text. For example, "3-5 business days".
1197
+ * @maxLength 500
1198
+ */
1199
+ deliveryTime?: string | null;
1200
+ /**
1201
+ * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
1202
+ * @maxLength 1000
1203
+ */
1204
+ instructions?: string | null;
1205
+ /** Pickup details. */
1206
+ pickupDetails?: PickupDetails;
1207
+ }
1208
+ export interface PickupDetails {
1209
+ /** Pickup address. */
1210
+ address?: ApiAddress;
1211
+ /**
1212
+ * Whether the pickup address is that of a business - this may effect tax calculation.
1213
+ * @deprecated
1214
+ */
1215
+ businessLocation?: boolean;
1216
+ /** Pickup method */
1217
+ pickupMethod?: PickupMethod;
1218
+ }
1219
+ export declare enum PickupMethod {
1220
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
1221
+ STORE_PICKUP = "STORE_PICKUP",
1222
+ PICKUP_POINT = "PICKUP_POINT"
1223
+ }
1224
+ export interface DeliveryTimeSlot {
1225
+ /** starting time of the delivery time slot */
1226
+ from?: Date | null;
1227
+ /** ending time of the delivery time slot */
1228
+ to?: Date | null;
1229
+ }
1230
+ export interface SelectedCarrierServiceOptionPrices {
1231
+ /** Total shipping price, after discount and after tax. */
1232
+ totalPriceAfterTax?: MultiCurrencyPrice;
1233
+ /** Total price of shipping after discounts (when relevant), and before tax. */
1234
+ totalPriceBeforeTax?: MultiCurrencyPrice;
1235
+ /** Tax details. */
1236
+ taxDetails?: ItemTaxFullDetails;
1237
+ /** Shipping discount before tax. */
1238
+ totalDiscount?: MultiCurrencyPrice;
1239
+ /** Shipping price before discount and before tax. */
1240
+ price?: MultiCurrencyPrice;
1241
+ }
1242
+ export interface SelectedCarrierServiceOptionOtherCharge {
1243
+ /** Type of additional cost. */
1244
+ type?: ChargeType;
1245
+ /**
1246
+ * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
1247
+ * @maxLength 200
1248
+ */
1249
+ details?: string | null;
1250
+ /** Price of added charge. */
1251
+ cost?: SelectedCarrierServiceOptionPrices;
1252
+ }
1253
+ export declare enum ChargeType {
1254
+ HANDLING_FEE = "HANDLING_FEE",
1255
+ INSURANCE = "INSURANCE"
1256
+ }
1257
+ export interface DeliveryAllocation {
1258
+ /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
1259
+ deliveryCarrier?: Carrier;
1260
+ /** The delivery region that are relevant for this delivery solution. */
1261
+ deliveryRegion?: Region;
1262
+ /** Populated if the delivery solution is a partially supplied by this carrier. */
1263
+ applicableLineItems?: ApplicableLineItems;
1264
+ }
1265
+ export interface Carrier {
1266
+ /**
1267
+ * The carrier app id
1268
+ * @format GUID
1269
+ */
1270
+ appId?: string | null;
1271
+ /**
1272
+ * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
1273
+ * @maxLength 250
1274
+ */
1275
+ code?: string;
1276
+ }
1277
+ export interface Region {
1278
+ /**
1279
+ * The delivery region id.
1280
+ * @format GUID
1281
+ */
1282
+ _id?: string | null;
1283
+ /**
1284
+ * The delivery region name.
1285
+ * @maxLength 100
1286
+ */
1287
+ name?: string | null;
1288
+ }
1289
+ export interface ApplicableLineItems {
1290
+ /**
1291
+ * Line items that the delivery solution is for.
1292
+ * @maxSize 300
1293
+ * @minLength 1
1294
+ * @maxLength 100
1295
+ */
1296
+ lineItemIds?: string[];
1297
+ }
1298
+ export interface ShippingRegion {
1299
+ /**
1300
+ * Shipping region ID.
1301
+ * @format GUID
1302
+ * @readonly
1303
+ */
1304
+ _id?: string;
1305
+ /**
1306
+ * Shipping region name.
1307
+ * @maxLength 100
1308
+ */
1309
+ name?: string;
1310
+ }
1311
+ export interface CarrierServiceOption {
1312
+ /**
1313
+ * Carrier ID.
1314
+ * @format GUID
1315
+ */
1316
+ carrierId?: string;
1317
+ /** Shipping options offered by this carrier for this request. */
1318
+ shippingOptions?: ShippingOption[];
1319
+ }
1320
+ export interface ShippingOption {
1321
+ /**
1322
+ * Unique code of provided shipping option like "usps_std_overnight".
1323
+ * For legacy calculators this would be the UUID of the option.
1324
+ * @maxLength 100
1325
+ */
1326
+ code?: string;
1327
+ /**
1328
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1329
+ * For example, "Standard" or "First-Class Package International".
1330
+ * @maxLength 250
1331
+ */
1332
+ title?: string;
1333
+ /** Delivery logistics. */
1334
+ logistics?: DeliveryLogistics;
1335
+ /** Sipping price information. */
1336
+ cost?: ShippingPrice;
1337
+ /**
1338
+ * Delivery solution allocations to different delivery carriers and delivery regions
1339
+ * @maxSize 300
1340
+ */
1341
+ deliveryAllocations?: DeliveryAllocation[];
1342
+ /** If the delivery solution is a partial and doesn't apply to all items. */
1343
+ partial?: boolean | null;
1344
+ }
1345
+ export interface ShippingPrice {
1346
+ /** Shipping price. */
1347
+ price?: MultiCurrencyPrice;
1348
+ /** Other costs such as insurance, handling & packaging for fragile items, etc. */
1349
+ otherCharges?: OtherCharge[];
1350
+ }
1351
+ export interface OtherCharge {
1352
+ /** Type of additional cost. */
1353
+ type?: ChargeType;
1354
+ /** Price of added cost. */
1355
+ price?: MultiCurrencyPrice;
1356
+ }
1357
+ export interface BuyerInfo extends BuyerInfoIdOneOf {
1358
+ /**
1359
+ * Visitor ID - if the buyer is **not** a site member.
1360
+ * @format GUID
1361
+ * @readonly
1362
+ */
1363
+ visitorId?: string;
1364
+ /**
1365
+ * Member ID - If the buyer is a site member.
1366
+ * @format GUID
1367
+ * @readonly
1368
+ */
1369
+ memberId?: string;
1370
+ /**
1371
+ * Contact ID. For more information, see the Contacts API.
1372
+ * @format GUID
1373
+ * @readonly
1374
+ */
1375
+ contactId?: string | null;
1376
+ /**
1377
+ * Buyer email address.
1378
+ * @format EMAIL
1379
+ */
1380
+ email?: string | null;
1381
+ }
1382
+ /** @oneof */
1383
+ export interface BuyerInfoIdOneOf {
1384
+ /**
1385
+ * Visitor ID - if the buyer is **not** a site member.
1386
+ * @format GUID
1387
+ * @readonly
1388
+ */
1389
+ visitorId?: string;
1390
+ /**
1391
+ * Member ID - If the buyer is a site member.
1392
+ * @format GUID
1393
+ * @readonly
1394
+ */
1395
+ memberId?: string;
1396
+ }
1397
+ export interface PriceSummary {
1398
+ /** Subtotal of all line items, before discounts and before tax. */
1399
+ subtotal?: MultiCurrencyPrice;
1400
+ /** Total shipping price, before discounts and before tax. */
1401
+ shipping?: MultiCurrencyPrice;
1402
+ /** Total tax. */
1403
+ tax?: MultiCurrencyPrice;
1404
+ /** Total calculated discount value. */
1405
+ discount?: MultiCurrencyPrice;
1406
+ /** Total price after discounts, gift cards, and tax. */
1407
+ total?: MultiCurrencyPrice;
1408
+ /** Total additional fees price before tax. */
1409
+ additionalFees?: MultiCurrencyPrice;
1410
+ }
1411
+ export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1412
+ /** General shipping calculation error. */
1413
+ generalShippingCalculationError?: Details;
1414
+ /** Carrier errors. */
1415
+ carrierErrors?: CarrierErrors;
1416
+ /** Tax calculation error. */
1417
+ taxCalculationError?: Details;
1418
+ /** Coupon calculation error. */
1419
+ couponCalculationError?: Details;
1420
+ /** Gift card calculation error. */
1421
+ giftCardCalculationError?: Details;
1422
+ /** Order validation errors. */
1423
+ orderValidationErrors?: ApplicationError[];
1424
+ /**
1425
+ * Membership payment methods calculation errors
1426
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
1427
+ */
1428
+ membershipError?: Details;
1429
+ /** Discount Rule calculation error. */
1430
+ discountsCalculationError?: Details;
1431
+ }
1432
+ /** @oneof */
1433
+ export interface CalculationErrorsShippingCalculationErrorOneOf {
1434
+ /** General shipping calculation error. */
1435
+ generalShippingCalculationError?: Details;
1436
+ /** Carrier errors. */
1437
+ carrierErrors?: CarrierErrors;
1438
+ }
1439
+ export interface Details extends DetailsKindOneOf {
1440
+ applicationError?: ApplicationError;
1441
+ validationError?: ValidationError;
1442
+ systemError?: SystemError;
1443
+ /**
1444
+ * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
1445
+ * @deprecated
1446
+ */
1447
+ tracing?: Record<string, string>;
1448
+ }
1449
+ /** @oneof */
1450
+ export interface DetailsKindOneOf {
1451
+ applicationError?: ApplicationError;
1452
+ validationError?: ValidationError;
1453
+ systemError?: SystemError;
1454
+ }
1455
+ export interface ApplicationError {
1456
+ /** Error code. */
1457
+ code?: string;
1458
+ /** Description of the error. */
1459
+ description?: string;
1460
+ /** Data related to the error. */
1461
+ data?: Record<string, any> | null;
1462
+ }
1463
+ /**
1464
+ * example result:
1465
+ * {
1466
+ * "fieldViolations": [
1467
+ * {
1468
+ * "field": "fieldA",
1469
+ * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
1470
+ * "violatedRule": "OTHER",
1471
+ * "ruleName": "INVALID_NOTE",
1472
+ * "data": {
1473
+ * "value": "FI"
1474
+ * }
1475
+ * },
1476
+ * {
1477
+ * "field": "fieldB",
1478
+ * "description": "field value out of range. supported range: [0-20]",
1479
+ * "violatedRule": "MAX",
1480
+ * "data": {
1481
+ * "threshold": 20
1482
+ * }
1483
+ * },
1484
+ * {
1485
+ * "field": "fieldC",
1486
+ * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
1487
+ * "violatedRule": "FORMAT",
1488
+ * "data": {
1489
+ * "type": "PHONE"
1490
+ * }
1491
+ * }
1492
+ * ]
1493
+ * }
1494
+ */
1495
+ export interface ValidationError {
1496
+ fieldViolations?: FieldViolation[];
1497
+ }
1498
+ export declare enum RuleType {
1499
+ VALIDATION = "VALIDATION",
1500
+ OTHER = "OTHER",
1501
+ MAX = "MAX",
1502
+ MIN = "MIN",
1503
+ MAX_LENGTH = "MAX_LENGTH",
1504
+ MIN_LENGTH = "MIN_LENGTH",
1505
+ MAX_SIZE = "MAX_SIZE",
1506
+ MIN_SIZE = "MIN_SIZE",
1507
+ FORMAT = "FORMAT",
1508
+ DECIMAL_LTE = "DECIMAL_LTE",
1509
+ DECIMAL_GTE = "DECIMAL_GTE",
1510
+ DECIMAL_LT = "DECIMAL_LT",
1511
+ DECIMAL_GT = "DECIMAL_GT",
1512
+ DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
1513
+ INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
1514
+ REQUIRED_FIELD = "REQUIRED_FIELD",
1515
+ FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
1516
+ ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
1517
+ EXACT_LENGTH = "EXACT_LENGTH",
1518
+ EXACT_SIZE = "EXACT_SIZE",
1519
+ REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1520
+ }
1521
+ export interface FieldViolation {
1522
+ field?: string;
1523
+ description?: string;
1524
+ violatedRule?: RuleType;
1525
+ /** applicable when violated_rule=OTHER */
1526
+ ruleName?: string | null;
1527
+ data?: Record<string, any> | null;
1528
+ }
1529
+ export interface SystemError {
1530
+ /** Error code. */
1531
+ errorCode?: string | null;
1532
+ }
1533
+ export interface CarrierErrors {
1534
+ /** Carrier errors. */
1535
+ errors?: CarrierError[];
1536
+ }
1537
+ export interface CarrierError {
1538
+ /** Carrier ID. */
1539
+ carrierId?: string;
1540
+ /** Error details. */
1541
+ error?: Details;
1542
+ }
1543
+ export interface GiftCard {
1544
+ /**
1545
+ * Gift Card ID.
1546
+ * @deprecated
1547
+ */
1548
+ _id?: string;
1549
+ /** Gift card obfuscated code. */
1550
+ obfuscatedCode?: string;
1551
+ /** Gift card value. */
1552
+ amount?: MultiCurrencyPrice;
1553
+ /**
1554
+ * App ID of the gift card provider.
1555
+ * @format GUID
1556
+ */
1557
+ appId?: string;
1558
+ /**
1559
+ * External ID in the gift card provider's system.
1560
+ * Used for integration and tracking across different platforms.
1561
+ * @minLength 1
1562
+ * @maxLength 50
1563
+ */
1564
+ externalId?: string | null;
1565
+ }
1566
+ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1567
+ /** Coupon details. */
1568
+ coupon?: Coupon;
1569
+ /** Merchant discount. */
1570
+ merchantDiscount?: MerchantDiscount;
1571
+ /** Discount rule */
1572
+ discountRule?: DiscountRule;
1573
+ /** Discount type. */
1574
+ discountType?: DiscountType;
1575
+ /**
1576
+ * IDs of the line items the discount applies to.
1577
+ * @format GUID
1578
+ * @deprecated IDs of line items the discount applies to.
1579
+ * @replacedBy line_items_discounts
1580
+ * @targetRemovalDate 2024-06-01
1581
+ */
1582
+ lineItemIds?: string[];
1583
+ /**
1584
+ * Number of subscription cycle this discount applies to
1585
+ * default None - all billing cycle
1586
+ * @internal
1587
+ * @min 1
1588
+ * @max 999
1589
+ */
1590
+ subscriptionCycles?: number | null;
1591
+ }
1592
+ /** @oneof */
1593
+ export interface AppliedDiscountDiscountSourceOneOf {
1594
+ /** Coupon details. */
1595
+ coupon?: Coupon;
1596
+ /** Merchant discount. */
1597
+ merchantDiscount?: MerchantDiscount;
1598
+ /** Discount rule */
1599
+ discountRule?: DiscountRule;
1600
+ }
1601
+ export declare enum DiscountType {
1602
+ GLOBAL = "GLOBAL",
1603
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
1604
+ SHIPPING = "SHIPPING"
1605
+ }
1606
+ /** Coupon */
1607
+ export interface Coupon {
1608
+ /** Coupon ID. */
1609
+ _id?: string;
1610
+ /** Coupon code. */
1611
+ code?: string;
1612
+ /** Coupon value. */
1613
+ amount?: MultiCurrencyPrice;
1614
+ /** Coupon name. */
1615
+ name?: string;
1616
+ }
1617
+ export interface MerchantDiscount {
1618
+ /** Discount value. */
1619
+ amount?: MultiCurrencyPrice;
1620
+ /**
1621
+ * Discount Percentage. Will be calculated from items price before other discounts.
1622
+ * @min 1
1623
+ * @max 100
1624
+ */
1625
+ percentage?: number | null;
1626
+ }
1627
+ export interface DiscountRule {
1628
+ /**
1629
+ * Discount rule ID
1630
+ * @format GUID
1631
+ */
1632
+ _id?: string;
1633
+ /** Discount rule name */
1634
+ name?: DiscountRuleName;
1635
+ /** Discount value. */
1636
+ amount?: MultiCurrencyPrice;
1637
+ }
1638
+ export interface DiscountRuleName {
1639
+ /**
1640
+ * Original discount rule name (in site's default language).
1641
+ * @minLength 1
1642
+ * @maxLength 256
1643
+ */
1644
+ original?: string;
1645
+ /**
1646
+ * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
1647
+ * @minLength 1
1648
+ * @maxLength 500
1649
+ */
1650
+ translated?: string | null;
1651
+ }
1652
+ export interface LineItemDiscount {
1653
+ /**
1654
+ * ID of line item the discount applies to.
1655
+ * @format GUID
1656
+ */
1657
+ _id?: string;
1658
+ /** Discount value. */
1659
+ totalDiscountAmount?: MultiCurrencyPrice;
1660
+ }
1661
+ export interface CustomField {
1662
+ /** Custom field value. */
1663
+ value?: any;
1664
+ /**
1665
+ * Custom field title.
1666
+ * @minLength 1
1667
+ * @maxLength 500
1668
+ */
1669
+ title?: string;
1670
+ /**
1671
+ * Translated custom field title.
1672
+ * @minLength 1
1673
+ * @maxLength 500
1674
+ */
1675
+ translatedTitle?: string | null;
1676
+ }
1677
+ export declare enum WeightUnit {
1678
+ /** Weight unit can't be classified due to an error. */
1679
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
1680
+ /** Kilograms. */
1681
+ KG = "KG",
1682
+ /** Pounds. */
1683
+ LB = "LB"
1684
+ }
1685
+ export interface TaxSummary {
1686
+ /**
1687
+ * Amount for which tax is calculated, added from line items.
1688
+ * @readonly
1689
+ */
1690
+ taxableAmount?: MultiCurrencyPrice;
1691
+ /**
1692
+ * Calculated tax, added from line items.
1693
+ * @readonly
1694
+ */
1695
+ totalTax?: MultiCurrencyPrice;
1696
+ /**
1697
+ * Tax calculator that was active when the order was created.
1698
+ * @deprecated
1699
+ */
1700
+ calculationDetails?: TaxCalculationDetails;
1701
+ }
1702
+ export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
1703
+ /** Reason the manual calculation was used. */
1704
+ manualRateReason?: ManualCalculationReason;
1705
+ /** Details of the fallback rate calculation. */
1706
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1707
+ /** Rate calculation type. */
1708
+ rateType?: RateType;
1709
+ }
1710
+ /** @oneof */
1711
+ export interface TaxCalculationDetailsCalculationDetailsOneOf {
1712
+ /** Reason the manual calculation was used. */
1713
+ manualRateReason?: ManualCalculationReason;
1714
+ /** Details of the fallback rate calculation. */
1715
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1716
+ }
1717
+ export declare enum RateType {
1718
+ /** no tax being collected for this request due to location of purchase */
1719
+ NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
1720
+ /** manual rate used for calculation */
1721
+ MANUAL_RATE = "MANUAL_RATE",
1722
+ /** autotax rate used for calculation */
1723
+ AUTO_RATE = "AUTO_RATE",
1724
+ /** fallback rate used for calculation */
1725
+ FALLBACK_RATE = "FALLBACK_RATE"
1726
+ }
1727
+ export declare enum ManualCalculationReason {
1728
+ /** user set calculator in Business Manager to be Manual */
1729
+ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
1730
+ /** specific region is on manual even though Global setting is Auto-tax */
1731
+ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
1732
+ }
1733
+ export interface AutoTaxFallbackCalculationDetails {
1734
+ /** reason for fallback */
1735
+ fallbackReason?: FallbackReason;
1736
+ /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
1737
+ error?: ApplicationError;
1738
+ }
1739
+ export declare enum FallbackReason {
1740
+ /** auto-tax failed to be calculated */
1741
+ AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
1742
+ /** auto-tax was temporarily deactivated on a system-level */
1743
+ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
1744
+ }
1745
+ /**
1746
+ * 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.
1747
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
1748
+ */
1749
+ export interface AggregatedTaxBreakdown {
1750
+ /**
1751
+ * The name of the tax against which this tax amount was calculated.
1752
+ * @maxLength 200
1753
+ */
1754
+ taxName?: string;
1755
+ /**
1756
+ * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
1757
+ * @maxLength 200
1758
+ */
1759
+ taxType?: string;
1760
+ /**
1761
+ * The name of the jurisdiction in which this tax detail applies.
1762
+ * @maxLength 200
1763
+ */
1764
+ jurisdiction?: string;
1765
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
1766
+ jurisdictionTypeEnum?: JurisdictionType;
1767
+ /**
1768
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
1769
+ * @decimalValue options { gte:0, maxScale:6 }
1770
+ */
1771
+ rate?: string;
1772
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
1773
+ aggregatedTaxAmount?: MultiCurrencyPrice;
1774
+ }
1775
+ export declare enum ChannelType {
1776
+ /** Unspecified sales channel. This value is not supported. */
1777
+ UNSPECIFIED = "UNSPECIFIED",
1778
+ /** A web client. */
1779
+ WEB = "WEB",
1780
+ /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
1781
+ POS = "POS",
1782
+ /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
1783
+ EBAY = "EBAY",
1784
+ /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
1785
+ AMAZON = "AMAZON",
1786
+ /** Other sales platform. */
1787
+ OTHER_PLATFORM = "OTHER_PLATFORM",
1788
+ /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
1789
+ WIX_APP_STORE = "WIX_APP_STORE",
1790
+ /** 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) */
1791
+ WIX_INVOICES = "WIX_INVOICES",
1792
+ /** Wix merchant backoffice. */
1793
+ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
1794
+ /** Wish sales channel. */
1795
+ WISH = "WISH",
1796
+ /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
1797
+ CLASS_PASS = "CLASS_PASS",
1798
+ /** Global-E sales channel. */
1799
+ GLOBAL_E = "GLOBAL_E",
1800
+ /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
1801
+ FACEBOOK = "FACEBOOK",
1802
+ /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
1803
+ ETSY = "ETSY",
1804
+ /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
1805
+ TIKTOK = "TIKTOK",
1806
+ /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
1807
+ FAIRE_COM = "FAIRE_COM"
1808
+ }
1809
+ export interface CreatedBy extends CreatedByIdOneOf {
1810
+ /**
1811
+ * User ID. When the order was created by a Wix user on behalf of a buyer.
1812
+ * For example, via POS (point of service).
1813
+ * @format GUID
1814
+ */
1815
+ userId?: string;
1816
+ /**
1817
+ * Member ID. When the order was created by a **logged in** site visitor.
1818
+ * @format GUID
1819
+ */
1820
+ memberId?: string;
1821
+ /**
1822
+ * Visitor ID. When the order was created by a site visitor that was **not** logged in.
1823
+ * @format GUID
1824
+ */
1825
+ visitorId?: string;
1826
+ /**
1827
+ * App ID. When the order was created by an external application or Wix service.
1828
+ * @format GUID
1829
+ */
1830
+ appId?: string;
1831
+ }
1832
+ /** @oneof */
1833
+ export interface CreatedByIdOneOf {
1834
+ /**
1835
+ * User ID. When the order was created by a Wix user on behalf of a buyer.
1836
+ * For example, via POS (point of service).
1837
+ * @format GUID
1838
+ */
1839
+ userId?: string;
1840
+ /**
1841
+ * Member ID. When the order was created by a **logged in** site visitor.
1842
+ * @format GUID
1843
+ */
1844
+ memberId?: string;
1845
+ /**
1846
+ * Visitor ID. When the order was created by a site visitor that was **not** logged in.
1847
+ * @format GUID
1848
+ */
1849
+ visitorId?: string;
1850
+ /**
1851
+ * App ID. When the order was created by an external application or Wix service.
1852
+ * @format GUID
1853
+ */
1854
+ appId?: string;
1855
+ }
1856
+ /** Reserved for internal use. */
1857
+ export interface MembershipOptions {
1858
+ /**
1859
+ * Reserved for internal use.
1860
+ * @readonly
1861
+ * @maxSize 300
1862
+ */
1863
+ eligibleMemberships?: Membership[];
1864
+ /**
1865
+ * Reserved for internal use.
1866
+ * @readonly
1867
+ * @maxSize 300
1868
+ */
1869
+ invalidMemberships?: InvalidMembership[];
1870
+ /** Selected membership to apply to this checkout. */
1871
+ selectedMemberships?: SelectedMemberships;
1872
+ }
1873
+ export interface Membership {
1874
+ /**
1875
+ * Membership ID.
1876
+ * @minLength 1
1877
+ * @maxLength 100
1878
+ */
1879
+ _id?: string;
1880
+ /**
1881
+ * ID of the application providing this payment option.
1882
+ * @format GUID
1883
+ */
1884
+ appId?: string;
1885
+ /** The name of this membership. */
1886
+ name?: MembershipName;
1887
+ /**
1888
+ * Line item IDs which are "paid for" by this membership.
1889
+ * @minSize 1
1890
+ * @maxSize 300
1891
+ * @minLength 1
1892
+ * @maxLength 100
1893
+ */
1894
+ lineItemIds?: string[];
1895
+ /** Optional - For a membership that has limited credits, information about credit usage. */
1896
+ credits?: MembershipPaymentCredits;
1897
+ /** Optional - TMembership expiry date. */
1898
+ expirationDate?: Date | null;
1899
+ /** Additional data about this membership. */
1900
+ additionalData?: Record<string, any> | null;
1901
+ }
1902
+ export interface MembershipName {
1903
+ /**
1904
+ * Membership name.
1905
+ * @maxLength 100
1906
+ */
1907
+ original?: string;
1908
+ /**
1909
+ * Translated membership name. Defaults to `original` when not provided.
1910
+ * @maxLength 100
1911
+ */
1912
+ translated?: string | null;
1913
+ }
1914
+ export interface MembershipPaymentCredits {
1915
+ /**
1916
+ * Membership's total amount of credits.
1917
+ * @min 1
1918
+ */
1919
+ total?: number;
1920
+ /** Membership's remaining amount of credits. */
1921
+ remaining?: number;
1922
+ }
1923
+ export interface InvalidMembership {
1924
+ /** Membership details. */
1925
+ membership?: Membership;
1926
+ /**
1927
+ * Reason why this membership is invalid and cannot be used.
1928
+ * @minLength 1
1929
+ * @maxLength 100
1930
+ */
1931
+ reason?: string;
1932
+ }
1933
+ export interface SelectedMemberships {
1934
+ /**
1935
+ * Selected memberships.
1936
+ * @maxSize 300
1937
+ */
1938
+ memberships?: SelectedMembership[];
1939
+ }
1940
+ export interface SelectedMembership {
1941
+ /**
1942
+ * Membership ID.
1943
+ * @minLength 1
1944
+ * @maxLength 100
1945
+ */
1946
+ _id?: string;
1947
+ /**
1948
+ * ID of the app providing this payment option.
1949
+ * @format GUID
1950
+ */
1951
+ appId?: string;
1952
+ /**
1953
+ * IDs of the line items this membership applies to.
1954
+ * @minSize 1
1955
+ * @maxSize 300
1956
+ * @minLength 1
1957
+ * @maxLength 100
1958
+ */
1959
+ lineItemIds?: string[];
1960
+ }
1961
+ export interface AdditionalFee {
1962
+ /**
1963
+ * Additional fee's unique code (or ID) for future processing.
1964
+ * @minLength 1
1965
+ * @maxLength 100
1966
+ */
1967
+ code?: string | null;
1968
+ /**
1969
+ * Translated additional fee's name.
1970
+ * @minLength 1
1971
+ * @maxLength 50
1972
+ */
1973
+ name?: string;
1974
+ /** Additional fee's price. */
1975
+ price?: MultiCurrencyPrice;
1976
+ /** Tax details. */
1977
+ taxDetails?: ItemTaxFullDetails;
1978
+ /**
1979
+ * Provider's app id.
1980
+ * @minLength 1
1981
+ * @maxLength 100
1982
+ */
1983
+ providerAppId?: string | null;
1984
+ /** Additional fee's price before tax. */
1985
+ priceBeforeTax?: MultiCurrencyPrice;
1986
+ /** Additional fee's price after tax. */
1987
+ priceAfterTax?: MultiCurrencyPrice;
1988
+ /**
1989
+ * Optional - Line items associated with this additional fee.
1990
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
1991
+ * @format GUID
1992
+ */
1993
+ lineItemIds?: string[];
1994
+ /**
1995
+ * Number of subscription cycle this fee applies to
1996
+ * default None - all billing cycle
1997
+ * @internal
1998
+ * @min 1
1999
+ * @max 999
2000
+ */
2001
+ subscriptionCycles?: number | null;
2002
+ /** the source the additional fee was added from */
2003
+ source?: AdditionalFeeSource;
2004
+ }
2005
+ export declare enum AdditionalFeeSource {
2006
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
2007
+ /** The additional fee was added by an additional fee service plugin */
2008
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
2009
+ /** The additional fee was added on the item either via the catalog or on custom line item */
2010
+ ITEM = "ITEM",
2011
+ /** The additional fee was added manually on the request */
2012
+ MANUAL = "MANUAL"
2013
+ }
2014
+ export interface ConversionInfo {
2015
+ /**
2016
+ * The site currency.
2017
+ * @readonly
2018
+ * @format CURRENCY
2019
+ */
2020
+ siteCurrency?: string;
2021
+ /**
2022
+ * The rate used when converting from the site currency to the checkout currency.
2023
+ * @readonly
2024
+ * @decimalValue options { gt:0, lte:1000000000000000 }
2025
+ */
2026
+ conversionRate?: string;
2027
+ }
2028
+ export interface Violation {
2029
+ /** 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. */
2030
+ severity?: Severity;
2031
+ /** Target location on a checkout or cart page where the violation will be displayed. */
2032
+ target?: Target;
2033
+ /**
2034
+ * 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>`.
2035
+ * @minLength 1
2036
+ * @maxLength 1000
2037
+ */
2038
+ description?: string | null;
2039
+ }
2040
+ export declare enum Severity {
2041
+ /** The user is allowed to move forward in the flow. */
2042
+ WARNING = "WARNING",
2043
+ /**
2044
+ * The user is blocked from moving forward in the flow.
2045
+ * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
2046
+ */
2047
+ ERROR = "ERROR"
2048
+ }
2049
+ export interface Target extends TargetTargetTypeOneOf {
2050
+ /** General (other) violation. */
2051
+ other?: Other;
2052
+ /** Specific line item violation. */
2053
+ lineItem?: TargetLineItem;
2054
+ }
2055
+ /** @oneof */
2056
+ export interface TargetTargetTypeOneOf {
2057
+ /** General (other) violation. */
2058
+ other?: Other;
2059
+ /** Specific line item violation. */
2060
+ lineItem?: TargetLineItem;
2061
+ }
2062
+ /** Available locations on the webpage */
2063
+ export declare enum NameInOther {
2064
+ /** Default location, in case no specific location is specified. */
2065
+ OTHER_DEFAULT = "OTHER_DEFAULT"
2066
+ }
2067
+ /** Available locations on the line item */
2068
+ export declare enum NameInLineItem {
2069
+ /** Default location, in case no specific location is specified. */
2070
+ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
2071
+ }
2072
+ export declare enum SuggestedFix {
2073
+ /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
2074
+ UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
2075
+ /** The line item should be removed from the cart or checkout to resolve the violation. */
2076
+ REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
2077
+ }
2078
+ /** General (other) violation. */
2079
+ export interface Other {
2080
+ /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
2081
+ name?: NameInOther;
2082
+ }
2083
+ /** Specific line item violation. */
2084
+ export interface TargetLineItem {
2085
+ /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
2086
+ name?: NameInLineItem;
2087
+ /** ID of the line item containing the violation. */
2088
+ _id?: string | null;
2089
+ /**
2090
+ * Suggested fix for resolving the line item violation.
2091
+ * @internal
2092
+ */
2093
+ suggestedFix?: SuggestedFix;
2094
+ }
2095
+ export interface CustomSettings {
2096
+ /**
2097
+ * Whether to restrict the option to add or remove a gift card on the checkout page.
2098
+ *
2099
+ * Default: `false`
2100
+ */
2101
+ lockGiftCard?: boolean;
2102
+ /**
2103
+ * Whether to restrict the option to add or remove a coupon code on the checkout page.
2104
+ *
2105
+ * Default: `false`
2106
+ */
2107
+ lockCouponCode?: boolean;
2108
+ /**
2109
+ * Whether to disable policy agreement checkout in the checkout page
2110
+ *
2111
+ * Default: `false`
2112
+ */
2113
+ disabledPolicyAgreementCheckbox?: boolean;
2114
+ /**
2115
+ * Whether to disable manual payment option for this checkout.
2116
+ *
2117
+ * Default: `false`
2118
+ */
2119
+ disabledManualPayment?: boolean;
2120
+ }
2121
+ export interface CustomContentReference {
2122
+ /**
2123
+ * ID of the app providing the content.
2124
+ *
2125
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
2126
+ * @format GUID
2127
+ */
2128
+ appId?: string;
2129
+ /**
2130
+ * ID of the component within the app it belongs to.
2131
+ *
2132
+ * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
2133
+ * @format GUID
2134
+ */
2135
+ componentId?: string;
2136
+ }
2137
+ export interface ExternalReference {
2138
+ /**
2139
+ * ID of the app associated with the purchase flow.
2140
+ * For example, the Wix Pay Links app ID.
2141
+ * @format GUID
2142
+ * @immutable
2143
+ */
2144
+ appId?: string;
2145
+ /**
2146
+ * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
2147
+ * For example, a Wix Pay Link ID.
2148
+ * @minLength 1
2149
+ * @maxLength 100
2150
+ * @immutable
2151
+ */
2152
+ resourceId?: string | null;
2153
+ }
2154
+ export interface SubscriptionCharges {
2155
+ /**
2156
+ * ids of the items the subscription is defined on
2157
+ * @format GUID
2158
+ * @minSize 1
2159
+ * @maxSize 300
2160
+ */
2161
+ lineItemIds?: string[];
2162
+ /**
2163
+ * Generated description explaining future charges amount and schedule.
2164
+ * Translated to subscription order buyer language, or to site language if was not provided.
2165
+ * @maxLength 1000
2166
+ */
2167
+ description?: string | null;
2168
+ /**
2169
+ * Charges for subscription.
2170
+ * @maxSize 50
2171
+ */
2172
+ charges?: Charge[];
2173
+ }
2174
+ export interface Charge {
2175
+ /** The cycle number from which the charge starts. */
2176
+ cycleFrom?: number;
2177
+ /** The number of cycles for which the charge is applicable. */
2178
+ cycleCount?: number | null;
2179
+ /** Charge summary. */
2180
+ priceSummary?: PriceSummary;
2181
+ /** The billing date from which the charge starts. */
2182
+ cycleBillingDate?: Date | null;
2183
+ }
2184
+ export interface UpdatedCheckoutMessage {
2185
+ /** Previous checkout. */
2186
+ oldCheckout?: Checkout;
2187
+ /** Updated checkout. */
2188
+ updatedCheckout?: Checkout;
2189
+ }
2190
+ export interface CreateCheckoutRequest {
2191
+ /** Checkout information. */
2192
+ checkoutInfo?: Checkout;
2193
+ /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2194
+ couponCode?: string | null;
2195
+ /**
2196
+ * Catalog line items to add to the checkout.
2197
+ * @maxSize 300
2198
+ */
2199
+ lineItems?: LineItem[];
2200
+ /**
2201
+ * Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin.
2202
+ *
2203
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2204
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2205
+ * @maxSize 300
2206
+ */
2207
+ customLineItems?: CustomLineItem[];
2208
+ /** Sales channel that submitted the order. */
2209
+ channelType: ChannelType;
2210
+ /**
2211
+ * Gift card code.
2212
+ *
2213
+ * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`.
2214
+ *
2215
+ * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
2216
+ */
2217
+ giftCardCode?: string | null;
2218
+ /**
2219
+ * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2220
+ *
2221
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2222
+ * @maxLength 1000
2223
+ */
2224
+ overrideCheckoutUrl?: string | null;
2225
+ }
2226
+ export interface CustomLineItem {
2227
+ /**
2228
+ * Custom line item quantity.
2229
+ *
2230
+ * Min: `1`
2231
+ * Max: `100000`
2232
+ * @min 1
2233
+ * @max 100000
2234
+ */
2235
+ quantity?: number;
2236
+ /**
2237
+ * Custom line item price. For security reasons, the `price` field should come from backend Velo code, and not be passed from the frontend.
2238
+ * @format DECIMAL_VALUE
2239
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2240
+ */
2241
+ price?: string;
2242
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
2243
+ priceDescription?: PriceDescription;
2244
+ /**
2245
+ * Custom line item description lines. Used for displaying the cart, checkout and order.
2246
+ * @maxSize 10
2247
+ */
2248
+ descriptionLines?: DescriptionLine[];
2249
+ /**
2250
+ * Custom line item media.
2251
+ * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`.
2252
+ * + An image from the web - `"http(s)://<image url>"`.
2253
+ */
2254
+ media?: string;
2255
+ /**
2256
+ * Custom line item ID. If passed, `id` must be unique.
2257
+ *
2258
+ * Default: auto-generated ID
2259
+ * @format GUID
2260
+ */
2261
+ _id?: string | null;
2262
+ /**
2263
+ * Tax group ID for this custom line item.
2264
+ * @format GUID
2265
+ */
2266
+ taxGroupId?: string | null;
2267
+ /** Name of the item or product. */
2268
+ productName?: ProductName;
2269
+ /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
2270
+ url?: string;
2271
+ /** Item type. Either a preset type or custom. */
2272
+ itemType?: ItemType;
2273
+ /**
2274
+ * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
2275
+ * @format DECIMAL_VALUE
2276
+ */
2277
+ fullPrice?: string | null;
2278
+ /**
2279
+ * Item quantity available for purchase. Only return this if inventory is managed.
2280
+ * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
2281
+ * @max 100000
2282
+ */
2283
+ quantityAvailable?: number | null;
2284
+ /** Physical properties of the item. */
2285
+ physicalProperties?: PhysicalProperties;
2286
+ /**
2287
+ * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
2288
+ *
2289
+ * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
2290
+ * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
2291
+ * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
2292
+ * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.
2293
+ */
2294
+ paymentOption?: PaymentOptionType;
2295
+ /**
2296
+ * Service properties. When relevant, this contains information such as date and number of participants.
2297
+ * Used, among other things, when checking for valid memberships.
2298
+ */
2299
+ serviceProperties?: ServiceProperties;
2300
+ /**
2301
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
2302
+ *
2303
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
2304
+ * + In most cases, this field is the same as `catalogReference.catalogItemId`.
2305
+ * + Used in membership validation.
2306
+ * @minLength 1
2307
+ * @maxLength 36
2308
+ */
2309
+ rootCatalogItemId?: string | null;
2310
+ /**
2311
+ * Partial payment for the given item to be paid upfront during the checkout.
2312
+ *
2313
+ * Eligible for catalog items with type `DEPOSIT_ONLINE`.
2314
+ * When omitted, the item's price will not be split and is expected to be paid in a single installment.
2315
+ * @format DECIMAL_VALUE
2316
+ */
2317
+ depositAmount?: string | null;
2318
+ /**
2319
+ * Delivery profile ID.
2320
+ * @format GUID
2321
+ */
2322
+ deliveryProfileId?: string | null;
2323
+ /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
2324
+ catalogReference?: CatalogReference;
2325
+ /**
2326
+ * Whether the price is not yet defined, and will be updated after the order is created.
2327
+ *
2328
+ * Default: `false`
2329
+ * @internal
2330
+ */
2331
+ priceUndetermined?: boolean;
2332
+ /**
2333
+ * Whether the line item quantity is fixed and cannot be changed.
2334
+ *
2335
+ * Default: `false`
2336
+ * @internal
2337
+ */
2338
+ fixedQuantity?: boolean;
2339
+ /**
2340
+ * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
2341
+ * @minLength 1
2342
+ * @maxLength 1000
2343
+ * @readonly
2344
+ */
2345
+ consentRequiredPaymentPolicy?: string | null;
2346
+ /**
2347
+ * Whether to save the payment method on the order.
2348
+ *
2349
+ * Default: `false`
2350
+ * @readonly
2351
+ */
2352
+ savePaymentMethod?: boolean;
2353
+ /**
2354
+ * Policies to be displayed to the customer on the checkout page.
2355
+ * @internal
2356
+ * @maxSize 5
2357
+ */
2358
+ policies?: Policy[];
2359
+ /**
2360
+ * ID of the app managing the inventory.
2361
+ * @internal
2362
+ * @format GUID
2363
+ */
2364
+ inventoryAppId?: string | null;
2365
+ /**
2366
+ * Whether the item can only be purchased by site members.
2367
+ *
2368
+ * Default: `false`
2369
+ * @internal
2370
+ */
2371
+ membersOnly?: boolean;
2372
+ /**
2373
+ * Address to use for tax calculation purposes.
2374
+ * @internal
2375
+ */
2376
+ taxableAddress?: TaxableAddress;
2377
+ }
2378
+ export interface MerchantDiscountInput {
2379
+ /**
2380
+ * Discount amount.
2381
+ * @decimalValue options { gte:0 }
2382
+ */
2383
+ amount?: string;
2384
+ /**
2385
+ * IDs of the line items the discount applies to.
2386
+ * @format GUID
2387
+ * @maxSize 300
2388
+ */
2389
+ lineItemIds?: string[];
2390
+ }
2391
+ export interface CreateCheckoutResponse {
2392
+ /** Newly created checkout. */
2393
+ checkout?: Checkout;
2394
+ }
2395
+ export interface ShippingCalculationErrorData extends ShippingCalculationErrorDataShippingCalculationErrorOneOf {
2396
+ generalShippingCalculationError?: Details;
2397
+ carrierErrors?: CarrierErrors;
2398
+ }
2399
+ /** @oneof */
2400
+ export interface ShippingCalculationErrorDataShippingCalculationErrorOneOf {
2401
+ generalShippingCalculationError?: Details;
2402
+ carrierErrors?: CarrierErrors;
2403
+ }
2404
+ export interface GetCheckoutRequest {
2405
+ /**
2406
+ * Checkout ID.
2407
+ * @format GUID
2408
+ */
2409
+ _id: string;
2410
+ }
2411
+ export interface GetCheckoutResponse {
2412
+ /** Retrieved checkout. */
2413
+ checkout?: Checkout;
2414
+ }
2415
+ export interface GetCheckoutWithAllExtendedFieldsRequest {
2416
+ /**
2417
+ * Checkout ID.
2418
+ * @format GUID
2419
+ */
2420
+ _id?: string;
2421
+ }
2422
+ export interface GetCheckoutWithAllExtendedFieldsResponse {
2423
+ /** Retrieved checkout. */
2424
+ checkout?: Checkout;
2425
+ }
2426
+ export interface GetCheckoutByCartIdRequest {
2427
+ /**
2428
+ * Cart ID.
2429
+ * @format GUID
2430
+ */
2431
+ _id: string;
2432
+ }
2433
+ export interface GetCheckoutByCartIdResponse {
2434
+ /** Retrieved checkout. */
2435
+ checkout?: Checkout;
2436
+ }
2437
+ export interface GetWixCheckoutURLRequest {
2438
+ /**
2439
+ * Checkout ID.
2440
+ * @format GUID
2441
+ */
2442
+ _id: string;
2443
+ }
2444
+ export interface GetWixCheckoutURLResponse {
2445
+ /** Checkout URL. */
2446
+ checkoutUrl?: string;
2447
+ }
2448
+ export interface GetCheckoutURLRequest {
2449
+ /**
2450
+ * Checkout ID.
2451
+ * @format GUID
2452
+ */
2453
+ _id: string;
2454
+ }
2455
+ export interface GetCheckoutURLResponse {
2456
+ /** Checkout URL. */
2457
+ checkoutUrl?: string;
2458
+ }
2459
+ export interface UpdateCheckoutRequest {
2460
+ /** Checkout information. */
2461
+ checkout: Checkout;
2462
+ /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2463
+ couponCode?: string | null;
2464
+ /** Gift card code. */
2465
+ giftCardCode?: string | null;
2466
+ /**
2467
+ * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2468
+ *
2469
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2470
+ * @maxLength 1000
2471
+ */
2472
+ overrideCheckoutUrl?: string | null;
2473
+ /**
2474
+ * Catalog line items.
2475
+ * @maxSize 300
2476
+ */
2477
+ lineItems?: LineItem[];
2478
+ /**
2479
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
2480
+ *
2481
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2482
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2483
+ * @maxSize 300
2484
+ */
2485
+ customLineItems?: CustomLineItem[];
2486
+ }
2487
+ export interface UpdateCheckoutResponse {
2488
+ /** Updated checkout. */
2489
+ checkout?: Checkout;
2490
+ }
2491
+ export interface RemoveCouponRequest {
2492
+ /**
2493
+ * ID of the checkout to remove the coupon from.
2494
+ * @format GUID
2495
+ */
2496
+ _id: string;
2497
+ }
2498
+ export interface RemoveCouponResponse {
2499
+ /** Updated checkout after removal of coupon. */
2500
+ checkout?: Checkout;
2501
+ }
2502
+ export interface RemoveGiftCardRequest {
2503
+ /**
2504
+ * ID of the checkout to remove the gift card from.
2505
+ * @format GUID
2506
+ */
2507
+ _id: string;
2508
+ }
2509
+ export interface RemoveGiftCardResponse {
2510
+ /** Updated checkout after removal of gift card. */
2511
+ checkout?: Checkout;
2512
+ }
2513
+ export interface RemoveOverrideCheckoutUrlRequest {
2514
+ /**
2515
+ * ID of the checkout to remove the override checkout url from.
2516
+ * @format GUID
2517
+ */
2518
+ _id: string;
2519
+ }
2520
+ export interface RemoveOverrideCheckoutUrlResponse {
2521
+ /** Updated checkout after removal of override checkout url. */
2522
+ checkout?: Checkout;
2523
+ }
2524
+ export interface AddToCheckoutRequest {
2525
+ /**
2526
+ * Checkout ID.
2527
+ * @format GUID
2528
+ */
2529
+ _id: string;
2530
+ /**
2531
+ * Catalog line items.
2532
+ * @maxSize 100
2533
+ */
2534
+ lineItems?: LineItem[];
2535
+ /**
2536
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
2537
+ *
2538
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2539
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2540
+ * @maxSize 100
2541
+ */
2542
+ customLineItems?: CustomLineItem[];
2543
+ }
2544
+ export interface AddToCheckoutResponse {
2545
+ /** Updated checkout. */
2546
+ checkout?: Checkout;
2547
+ }
2548
+ export interface RemoveLineItemsRequest {
2549
+ /**
2550
+ * ID of the checkout to remove line items from.
2551
+ * @format GUID
2552
+ */
2553
+ _id: string;
2554
+ /**
2555
+ * IDs of the line items to remove from the checkout.
2556
+ * @format GUID
2557
+ * @minSize 1
2558
+ * @maxSize 300
2559
+ */
2560
+ lineItemIds: string[];
2561
+ }
2562
+ export interface RemoveLineItemsResponse {
2563
+ /** Updated checkout after removal of line items. */
2564
+ checkout?: Checkout;
2565
+ }
2566
+ export interface CreateOrderRequest {
2567
+ /**
2568
+ * Checkout ID.
2569
+ * @format GUID
2570
+ */
2571
+ _id: string;
2572
+ /** Whether the payment method should be saved on the order. */
2573
+ savePaymentMethod?: boolean;
2574
+ /** Whether to authorize the payment and delay the capture. */
2575
+ delayCapture?: boolean;
2576
+ }
2577
+ export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
2578
+ /**
2579
+ * ID of the newly created order.
2580
+ * @format GUID
2581
+ */
2582
+ orderId?: string;
2583
+ /**
2584
+ * ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions).
2585
+ * @format GUID
2586
+ */
2587
+ subscriptionId?: string;
2588
+ /**
2589
+ * Payment gateway order ID.
2590
+ *
2591
+ * For online orders, pass this value as the `paymentId` parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function so your customer can pay for the order.
2592
+ *
2593
+ * This field will be returned if money needs to be charged. In some cases, money cannot be charged:
2594
+ * + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is 0. For example, in the case of a free item or an item with a 100% discount.
2595
+ * + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.
2596
+ */
2597
+ paymentGatewayOrderId?: string | null;
2598
+ }
2599
+ /** @oneof */
2600
+ export interface CreateOrderResponseIdOneOf {
2601
+ /**
2602
+ * ID of newly created order.
2603
+ * @format GUID
2604
+ */
2605
+ orderId?: string;
2606
+ /**
2607
+ * ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions).
2608
+ * @format GUID
2609
+ */
2610
+ subscriptionId?: string;
2611
+ }
2612
+ export interface PaymentErrorResponseData {
2613
+ paymentResponseToken?: string | null;
2614
+ transactionStatus?: string;
2615
+ failureDetails?: string | null;
2616
+ }
2617
+ export interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf {
2618
+ /** @format GUID */
2619
+ orderId?: string;
2620
+ /** @format GUID */
2621
+ subscriptionId?: string;
2622
+ }
2623
+ /** @oneof */
2624
+ export interface DoublePaymentErrorDataIdOneOf {
2625
+ /** @format GUID */
2626
+ orderId?: string;
2627
+ /** @format GUID */
2628
+ subscriptionId?: string;
2629
+ }
2630
+ export interface RedeemErrorData {
2631
+ reason?: string;
2632
+ }
2633
+ export interface ViolationsList {
2634
+ /** Violations risen by ValidationsSPI implementers. */
2635
+ violations?: Violation[];
2636
+ }
2637
+ export interface CreateOrderAndChargeRequest {
2638
+ /**
2639
+ * Checkout ID.
2640
+ * @format GUID
2641
+ */
2642
+ _id: string;
2643
+ /** Payment token. */
2644
+ paymentToken?: string | null;
2645
+ /** Whether the payment method should be saved on the order. */
2646
+ savePaymentMethod?: boolean;
2647
+ /** Whether to authorize the payment and delay the capture. */
2648
+ delayCapture?: boolean;
2649
+ }
2650
+ export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOneOf {
2651
+ /**
2652
+ * ID of newly created order.
2653
+ * @format GUID
2654
+ */
2655
+ orderId?: string;
2656
+ /**
2657
+ * ID of newly created subscription.
2658
+ * @format GUID
2659
+ */
2660
+ subscriptionId?: string;
2661
+ /** Payment response token. */
2662
+ paymentResponseToken?: string | null;
2663
+ /**
2664
+ * For online orders, send this value as a parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay/startpayment) function to enable your buyer to pay for the order.
2665
+ * `paymentGatewayOrderId` will be returned if money needs to be charged.
2666
+ *
2667
+ * In some cases, money should not be charged:
2668
+ * + If the total price is 0. For example, in the case of a free item or an item with 100% discount.
2669
+ * + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.
2670
+ */
2671
+ paymentGatewayOrderId?: string | null;
2672
+ /**
2673
+ * Whether an order was successfully created from this checkout and the payment transaction was completed
2674
+ * @internal
2675
+ * @readonly
2676
+ */
2677
+ checkoutCompleted?: boolean;
2678
+ }
2679
+ /** @oneof */
2680
+ export interface CreateOrderAndChargeResponseIdOneOf {
2681
+ /**
2682
+ * ID of newly created order.
2683
+ * @format GUID
2684
+ */
2685
+ orderId?: string;
2686
+ /**
2687
+ * ID of newly created subscription.
2688
+ * @format GUID
2689
+ */
2690
+ subscriptionId?: string;
2691
+ }
2692
+ export interface MarkCheckoutAsCompletedAndRedirectToUrlRequest {
2693
+ /**
2694
+ * Server-signed JWT token with required information to complete checkout
2695
+ * @maxLength 4096
2696
+ */
2697
+ token: string;
2698
+ }
2699
+ export interface RawHttpResponse {
2700
+ body?: Uint8Array;
2701
+ statusCode?: number | null;
2702
+ headers?: HeadersEntry[];
2703
+ }
2704
+ export interface HeadersEntry {
2705
+ key?: string;
2706
+ value?: string;
2707
+ }
2708
+ export interface MarkCheckoutAsCompletedRequest {
2709
+ /**
2710
+ * Checkout ID.
2711
+ * @format GUID
2712
+ */
2713
+ _id: string;
2714
+ /**
2715
+ * Order ID.
2716
+ * @internal
2717
+ * @format GUID
2718
+ */
2719
+ orderId?: string | null;
2720
+ }
2721
+ export interface MarkCheckoutAsCompletedResponse {
2722
+ }
2723
+ /** Triggered when an order created from this checkout is successfully paid for or when a checkout is marked as completed. */
2724
+ export interface CheckoutMarkedAsCompleted {
2725
+ checkout?: Checkout;
2726
+ }
2727
+ export interface UpdateLineItemsQuantityRequest {
2728
+ /**
2729
+ * Checkout ID.
2730
+ * @format GUID
2731
+ */
2732
+ _id: string;
2733
+ /**
2734
+ * Line item info to update.
2735
+ * @minSize 1
2736
+ * @maxSize 100
2737
+ */
2738
+ lineItems: LineItemQuantityUpdate[];
2739
+ }
2740
+ export interface LineItemQuantityUpdate {
2741
+ /**
2742
+ * ID of the line item to update.
2743
+ * @format GUID
2744
+ */
2745
+ _id?: string;
2746
+ /**
2747
+ * New total amount of the line item,
2748
+ * not the amount to add to the current `quantity`.
2749
+ *
2750
+ * Min: `1`
2751
+ *
2752
+ * Max: `100000`
2753
+ * @min 1
2754
+ * @max 100000
2755
+ */
2756
+ quantity?: number;
2757
+ }
2758
+ export interface UpdateLineItemsQuantityResponse {
2759
+ /** Updated checkout. */
2760
+ checkout?: Checkout;
2761
+ }
2762
+ export interface GetCheckoutPaymentSettingsRequest {
2763
+ /**
2764
+ * Checkout ID.
2765
+ * @format GUID
2766
+ */
2767
+ _id: string;
2768
+ }
2769
+ export interface GetCheckoutPaymentSettingsResponse {
2770
+ blockedPaymentOptions?: GetCheckoutPaymentSettingsResponsePaymentOption[];
2771
+ }
2772
+ export declare enum GetCheckoutPaymentSettingsResponsePaymentOption {
2773
+ UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION",
2774
+ MANUAL = "MANUAL"
2775
+ }
2776
+ export interface DeleteCheckoutRequest {
2777
+ /**
2778
+ * ID of the checkout to delete.
2779
+ * @format GUID
2780
+ */
2781
+ _id?: string;
2782
+ }
2783
+ export interface DeleteCheckoutResponse {
2784
+ }
2785
+ export interface SubscriptionCreated {
2786
+ subscription?: Subscription;
2787
+ }
2788
+ export interface Subscription {
2789
+ /**
2790
+ * Subscription id (auto-generated upon subscription creation)
2791
+ * @readonly
2792
+ */
2793
+ _id?: string;
2794
+ /**
2795
+ * id of subscription in external system
2796
+ * @format GUID
2797
+ */
2798
+ externalId?: string | null;
2799
+ /**
2800
+ * Subscription creation date
2801
+ * @readonly
2802
+ */
2803
+ dateCreated?: Date | null;
2804
+ /**
2805
+ * The id of the cart this order was created from
2806
+ * @format GUID
2807
+ */
2808
+ cartId?: string | null;
2809
+ /**
2810
+ * The id of the checkout this subscriptions was created from
2811
+ * @format GUID
2812
+ */
2813
+ checkoutId?: string | null;
2814
+ /** member or contact */
2815
+ buyerInfo?: V1BuyerInfo;
2816
+ /**
2817
+ * Line items ordered
2818
+ * @minSize 1
2819
+ * @maxSize 1
2820
+ */
2821
+ lineItems?: V1LineItem[];
2822
+ /** Totals for subscription's line items */
2823
+ totals?: Totals;
2824
+ /** site settings at the moment when subscription created */
2825
+ storeSettings?: StoreSettings;
2826
+ /** Full billing address */
2827
+ billingAddress?: Address;
2828
+ /** Delivery information */
2829
+ shippingInfo?: V1ShippingInfo;
2830
+ /** Coupon that was applied to subscription */
2831
+ appliedCoupon?: AppliedCoupon;
2832
+ /**
2833
+ * Message from the customer (e.g., customization request)
2834
+ * @maxLength 1000
2835
+ */
2836
+ buyerNote?: string | null;
2837
+ /** Custom field */
2838
+ customField?: V1CustomField;
2839
+ /** Information about subscription option from which subscription was created */
2840
+ subscriptionOptionInfo?: V1SubscriptionOptionInfo;
2841
+ /** Sales channel that submitted this subscription */
2842
+ channelInfo?: ChannelInfo;
2843
+ /** defines when subscriber will be charged: for frequency=MONTH, billingCycles=6, interval=2 payment will be done every 2 month during one year */
2844
+ subscriptionSettings?: V1SubscriptionSettings;
2845
+ /**
2846
+ * information about first subscription payment
2847
+ * @readonly
2848
+ */
2849
+ billingInfo?: BillingInfo;
2850
+ }
2851
+ /** Buyer Info */
2852
+ export interface V1BuyerInfo {
2853
+ /**
2854
+ * Wix customer ID
2855
+ * @format GUID
2856
+ */
2857
+ _id?: string;
2858
+ /** Customer type */
2859
+ identityType?: IdentityType;
2860
+ }
2861
+ export declare enum IdentityType {
2862
+ UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
2863
+ /** Site member */
2864
+ MEMBER = "MEMBER",
2865
+ /** Contact */
2866
+ CONTACT = "CONTACT"
2867
+ }
2868
+ export interface V1LineItem {
2869
+ /** Line item ID (auto-generated) */
2870
+ index?: number;
2871
+ /**
2872
+ * Line item quantity
2873
+ * @min 1
2874
+ * @max 100000
2875
+ */
2876
+ quantity?: number;
2877
+ /**
2878
+ * Line item variantId (from Stores Catalog)
2879
+ * @format GUID
2880
+ */
2881
+ variantId?: string | null;
2882
+ /**
2883
+ * Line item options ordered
2884
+ * @maxSize 6
2885
+ */
2886
+ options?: OptionSelection[];
2887
+ /**
2888
+ * Line item custom text field selections
2889
+ * @maxSize 20
2890
+ */
2891
+ customTextFields?: CustomTextFieldSelection[];
2892
+ /** Charges details */
2893
+ chargeDetails?: ChargeDetails;
2894
+ /** Product details */
2895
+ productDetails?: ProductDetails;
2896
+ }
2897
+ export interface OptionSelection {
2898
+ /**
2899
+ * Option name
2900
+ * @maxLength 200
2901
+ */
2902
+ option?: string;
2903
+ /**
2904
+ * Selected choice for this option
2905
+ * @maxLength 500
2906
+ */
2907
+ selection?: string;
2908
+ }
2909
+ export interface CustomTextFieldSelection {
2910
+ /**
2911
+ * Custom text field name
2912
+ * @maxLength 100
2913
+ */
2914
+ title?: string;
2915
+ /**
2916
+ * Custom text field value
2917
+ * @maxLength 500
2918
+ */
2919
+ value?: string;
2920
+ }
2921
+ export interface ChargeDetails {
2922
+ /**
2923
+ * price of line item (depends on subscription option)
2924
+ * @max 999999999.99
2925
+ */
2926
+ price?: number;
2927
+ /**
2928
+ * Total price charged to the customer (for this line items) after computation of quantity and discount
2929
+ * @max 999999999.99
2930
+ */
2931
+ totalPrice?: number | null;
2932
+ /**
2933
+ * Discount applied for this line item
2934
+ * @max 999999999.99
2935
+ */
2936
+ discount?: number | null;
2937
+ /**
2938
+ * Tax applied for this line item
2939
+ * @max 999999999.99
2940
+ */
2941
+ tax?: number | null;
2942
+ /** Is tax applied for this line item */
2943
+ taxIncludedInPrice?: boolean;
2944
+ /**
2945
+ * Tax rate %, as a decimal point >= 0
2946
+ * @decimalValue options { maxScale:6, gte:0 }
2947
+ */
2948
+ taxRate?: string | null;
2949
+ }
2950
+ export interface ProductDetails {
2951
+ /**
2952
+ * Line item product ID (optional for POS orders)
2953
+ * @minLength 1
2954
+ */
2955
+ productId?: string | null;
2956
+ /**
2957
+ * Line item name
2958
+ * @minLength 1
2959
+ * @maxLength 100
2960
+ */
2961
+ name?: string;
2962
+ /**
2963
+ * Line item name translated to buyer's language
2964
+ * @minLength 1
2965
+ * @maxLength 100
2966
+ */
2967
+ translatedName?: string | null;
2968
+ /** Line item type (may be extended) */
2969
+ lineItemType?: LineItemType;
2970
+ /** Line item primary media for preview */
2971
+ mediaItem?: MediaItem;
2972
+ /**
2973
+ * Line item SKU
2974
+ * @maxLength 40
2975
+ */
2976
+ sku?: string | null;
2977
+ /**
2978
+ * Line item weight
2979
+ * @max 999999999.99
2980
+ */
2981
+ weight?: number | null;
2982
+ /**
2983
+ * Line item notes
2984
+ * @maxLength 1000
2985
+ */
2986
+ notes?: string | null;
2987
+ /**
2988
+ * Line item fulfillerId from stores fulfillers. No value means self fulfilled
2989
+ * @format GUID
2990
+ */
2991
+ fulfillerId?: string | null;
2992
+ /**
2993
+ * Tax group id
2994
+ * @format GUID
2995
+ */
2996
+ taxGroupId?: string | null;
2997
+ /**
2998
+ * App id from the catalog reference
2999
+ * @format GUID
3000
+ */
3001
+ appId?: string | null;
3002
+ }
3003
+ export declare enum LineItemType {
3004
+ /** Line item type can't be classified, due to an error */
3005
+ UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE",
3006
+ /** Physical item type */
3007
+ PHYSICAL = "PHYSICAL",
3008
+ /** Digital item type */
3009
+ DIGITAL = "DIGITAL",
3010
+ /** Custom item price */
3011
+ CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM"
3012
+ }
3013
+ export interface MediaItem {
3014
+ /**
3015
+ * Media type
3016
+ * @readonly
3017
+ */
3018
+ mediaType?: MediaItemType;
3019
+ /**
3020
+ * Media URL
3021
+ * @format WEB_URL
3022
+ * @readonly
3023
+ */
3024
+ url?: string;
3025
+ /**
3026
+ * Media item width
3027
+ * @max 5000
3028
+ * @readonly
3029
+ */
3030
+ width?: number;
3031
+ /**
3032
+ * Media item height
3033
+ * @max 5000
3034
+ * @readonly
3035
+ */
3036
+ height?: number;
3037
+ /** Media ID (for media items previously saved in Wix Media) */
3038
+ _id?: string | null;
3039
+ /** Media external URL */
3040
+ externalImageUrl?: string | null;
3041
+ /**
3042
+ * Alternative text for presentation when media cannot be displayed
3043
+ * @maxLength 256
3044
+ */
3045
+ altText?: string | null;
3046
+ }
3047
+ export declare enum MediaItemType {
3048
+ /** Media item type can't be classified, due to an error */
3049
+ UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM",
3050
+ /** Image item type */
3051
+ IMAGE = "IMAGE"
3052
+ }
3053
+ export interface Totals {
3054
+ /**
3055
+ * Subtotal of all line items, before tax
3056
+ * @max 999999999.99
3057
+ */
3058
+ subtotal?: number;
3059
+ /**
3060
+ * Total shipping price, including tax
3061
+ * @max 999999999.99
3062
+ */
3063
+ shipping?: number;
3064
+ /**
3065
+ * Total tax
3066
+ * @max 999999999.99
3067
+ */
3068
+ tax?: number;
3069
+ /**
3070
+ * Total calculated discount value
3071
+ * @max 999999999.99
3072
+ */
3073
+ discount?: number;
3074
+ /**
3075
+ * Total price
3076
+ * @max 999999999.99
3077
+ */
3078
+ total?: number;
3079
+ /**
3080
+ * Total weight
3081
+ * @max 999999999.99
3082
+ */
3083
+ weight?: number | null;
3084
+ /**
3085
+ * Total line items quantity
3086
+ * @readonly
3087
+ */
3088
+ quantity?: number;
3089
+ }
3090
+ export interface StoreSettings {
3091
+ /**
3092
+ * Currency used for pricing in this store
3093
+ * @maxLength 3
3094
+ * @format CURRENCY
3095
+ */
3096
+ currency?: string | null;
3097
+ /** Weight unit used in this store */
3098
+ weightUnit?: WeightUnit;
3099
+ /**
3100
+ * The language to be used when communicating with the buyer
3101
+ * For a site that support multiple languages, this would be the language the buyer selected
3102
+ * Otherwise this would be the site language
3103
+ * @minLength 2
3104
+ * @maxLength 2
3105
+ */
3106
+ buyerLanguage?: string | null;
3107
+ }
3108
+ export interface Address extends AddressAddressLine1OptionsOneOf {
3109
+ /**
3110
+ * Address line 1 (free text)
3111
+ * @maxLength 1000
3112
+ */
3113
+ addressLine1?: string;
3114
+ /** Address line 1 (street) */
3115
+ street?: Street;
3116
+ /** Addressee name */
3117
+ fullName?: FullName;
3118
+ /**
3119
+ * Country code (2 letters)
3120
+ * @format COUNTRY
3121
+ */
3122
+ country?: string | null;
3123
+ /**
3124
+ * State or district
3125
+ * @maxLength 50
3126
+ */
3127
+ subdivision?: string | null;
3128
+ /**
3129
+ * City name
3130
+ * @maxLength 150
3131
+ */
3132
+ city?: string | null;
3133
+ /**
3134
+ * ZIP/postal code
3135
+ * @maxLength 200
3136
+ */
3137
+ zipCode?: string | null;
3138
+ /**
3139
+ * Phone number
3140
+ * @maxLength 200
3141
+ */
3142
+ phone?: string | null;
3143
+ /**
3144
+ * Company name
3145
+ * @maxLength 500
3146
+ */
3147
+ company?: string | null;
3148
+ /**
3149
+ * Email address
3150
+ * @maxLength 500
3151
+ */
3152
+ email?: string | null;
3153
+ /**
3154
+ * address line
3155
+ * @maxLength 250
3156
+ */
3157
+ addressLine2?: string | null;
3158
+ /** Tax information (for Brazil only) */
3159
+ vatId?: VatId;
3160
+ }
3161
+ /** @oneof */
3162
+ export interface AddressAddressLine1OptionsOneOf {
3163
+ /**
3164
+ * Address line 1 (free text)
3165
+ * @maxLength 1000
3166
+ */
3167
+ addressLine1?: string;
3168
+ /** Address line 1 (street) */
3169
+ street?: Street;
3170
+ }
3171
+ export interface FullName {
3172
+ /**
3173
+ * Customer's first name
3174
+ * @maxLength 1000
3175
+ */
3176
+ firstName?: string;
3177
+ /**
3178
+ * Customer's last name
3179
+ * @maxLength 1000
3180
+ */
3181
+ lastName?: string;
3182
+ }
3183
+ export interface Street {
3184
+ /**
3185
+ * Street number
3186
+ * @maxLength 500
3187
+ */
3188
+ number?: string;
3189
+ /**
3190
+ * Street name
3191
+ * @maxLength 1000
3192
+ */
3193
+ name?: string;
3194
+ }
3195
+ export interface VatId {
3196
+ /**
3197
+ * Customer's tax ID.
3198
+ * @maxLength 50
3199
+ */
3200
+ number?: string;
3201
+ /**
3202
+ * Tax type.
3203
+ * + `CPF`: For individual tax payers.
3204
+ * + `CNPJ`: For corporations.
3205
+ */
3206
+ type?: VatType;
3207
+ }
3208
+ /** Brazilian tax info types */
3209
+ export declare enum VatType {
3210
+ /** When the tax info type can't be classified, due to an error */
3211
+ UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE",
3212
+ /** CPF - for individual tax payers */
3213
+ CPF = "CPF",
3214
+ /** CNPJ - for corporations */
3215
+ CNPJ = "CNPJ"
3216
+ }
3217
+ export interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
3218
+ /** Shipment details (when this object describes shipment) */
3219
+ shipmentDetails?: ShipmentDetails;
3220
+ /** Pickup details (when this object describes pickup) */
3221
+ pickupDetails?: V1PickupDetails;
3222
+ /**
3223
+ * Delivery option name
3224
+ * @maxLength 250
3225
+ */
3226
+ deliveryOption?: string;
3227
+ /**
3228
+ * Delivery option delivery time
3229
+ * @maxLength 500
3230
+ */
3231
+ estimatedDeliveryTime?: string | null;
3232
+ }
3233
+ /** @oneof */
3234
+ export interface V1ShippingInfoDetailsOneOf {
3235
+ /** Shipment details (when this object describes shipment) */
3236
+ shipmentDetails?: ShipmentDetails;
3237
+ /** Pickup details (when this object describes pickup) */
3238
+ pickupDetails?: V1PickupDetails;
3239
+ }
3240
+ export interface ShipmentDetails {
3241
+ /** Shipping destination address */
3242
+ address?: Address;
3243
+ /**
3244
+ * Discount applied for shipping
3245
+ * @max 999999999.99
3246
+ */
3247
+ discount?: number | null;
3248
+ /**
3249
+ * Tax applied for shipping
3250
+ * @max 999999999.99
3251
+ */
3252
+ tax?: number | null;
3253
+ /** Whether tax is included in the price */
3254
+ taxIncludedInPrice?: boolean;
3255
+ /**
3256
+ * Tax rate % for shipping, as a decimal point >= 0
3257
+ * @decimalValue options { maxScale:6, gte:0 }
3258
+ */
3259
+ taxRate?: string | null;
3260
+ }
3261
+ export interface V1PickupDetails {
3262
+ /** Pickup address */
3263
+ address?: PickupAddress;
3264
+ /**
3265
+ * Store owner's pickup instructions
3266
+ * @maxLength 1000
3267
+ */
3268
+ pickupInstructions?: string | null;
3269
+ }
3270
+ export interface PickupAddress {
3271
+ /**
3272
+ * Country code (2 letters)
3273
+ * @format COUNTRY
3274
+ */
3275
+ country?: string;
3276
+ /**
3277
+ * State/District
3278
+ * @maxLength 50
3279
+ */
3280
+ subdivision?: string | null;
3281
+ /**
3282
+ * Address
3283
+ * @maxLength 200
3284
+ */
3285
+ addressLine?: string;
3286
+ /**
3287
+ * City
3288
+ * @maxLength 85
3289
+ */
3290
+ city?: string;
3291
+ /**
3292
+ * ZIP/postal code
3293
+ * @maxLength 50
3294
+ */
3295
+ zipCode?: string;
3296
+ }
3297
+ export interface AppliedCoupon {
3298
+ /** Coupon ID */
3299
+ couponId?: string;
3300
+ /**
3301
+ * Coupon name
3302
+ * @maxLength 100
3303
+ */
3304
+ name?: string;
3305
+ /**
3306
+ * Coupon code
3307
+ * @maxLength 100
3308
+ */
3309
+ code?: string;
3310
+ }
3311
+ /** Custom field */
3312
+ export interface V1CustomField {
3313
+ /**
3314
+ * Free text that the customer entered in the custom field during the checkout process
3315
+ * @maxLength 250
3316
+ */
3317
+ value?: string;
3318
+ /**
3319
+ * Title for the custom field
3320
+ * @maxLength 200
3321
+ */
3322
+ title?: string;
3323
+ /**
3324
+ * The title translated according to the buyer language
3325
+ * @maxLength 200
3326
+ */
3327
+ translatedTitle?: string;
3328
+ }
3329
+ export interface V1SubscriptionOptionInfo {
3330
+ /** @format GUID */
3331
+ _id?: string | null;
3332
+ /**
3333
+ * @minLength 1
3334
+ * @maxLength 20
3335
+ */
3336
+ title?: string;
3337
+ /** @maxLength 60 */
3338
+ description?: string | null;
3339
+ discount?: Discount;
3340
+ }
3341
+ export interface Discount {
3342
+ /** Discount type. */
3343
+ type?: DiscountDiscountType;
3344
+ /** Discount value. */
3345
+ value?: number;
3346
+ }
3347
+ export declare enum DiscountDiscountType {
3348
+ UNDEFINED = "UNDEFINED",
3349
+ /** No discount */
3350
+ AMOUNT = "AMOUNT",
3351
+ PERCENT = "PERCENT"
3352
+ }
3353
+ export interface ChannelInfo {
3354
+ /** Sales channel that submitted the subscription */
3355
+ type?: ChannelInfoChannelType;
3356
+ }
3357
+ export declare enum ChannelInfoChannelType {
3358
+ UNSPECIFIED = "UNSPECIFIED",
3359
+ WEB = "WEB",
3360
+ OTHER_PLATFORM = "OTHER_PLATFORM",
3361
+ WIX_APP_STORE = "WIX_APP_STORE"
3362
+ }
3363
+ export interface V1SubscriptionSettings {
3364
+ /** Frequency of recurring payment. */
3365
+ frequency?: SubscriptionFrequency;
3366
+ /** Whether subscription is renewed automatically at the end of each period. */
3367
+ autoRenewal?: boolean;
3368
+ /**
3369
+ * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
3370
+ * @min 2
3371
+ * @max 999
3372
+ */
3373
+ billingCycles?: number | null;
3374
+ }
3375
+ export interface BillingInfo {
3376
+ /**
3377
+ * Payment method used for this order
3378
+ * @maxLength 50
3379
+ */
3380
+ paymentMethod?: string | null;
3381
+ /**
3382
+ * Transaction ID from payment gateway (e.g., Wix Payments)
3383
+ * @maxLength 100
3384
+ */
3385
+ paymentGatewayTransactionId?: string | null;
3386
+ /**
3387
+ * Order ID from payment gateway (e.g., Wix Payments)
3388
+ * @maxLength 100
3389
+ */
3390
+ paymentGatewayOrderId?: string | null;
3391
+ }
3392
+ export interface Empty {
3393
+ }
3394
+ export interface DomainEvent extends DomainEventBodyOneOf {
3395
+ createdEvent?: EntityCreatedEvent;
3396
+ updatedEvent?: EntityUpdatedEvent;
3397
+ deletedEvent?: EntityDeletedEvent;
3398
+ actionEvent?: ActionEvent;
3399
+ /**
3400
+ * Unique event ID.
3401
+ * Allows clients to ignore duplicate webhooks.
3402
+ */
3403
+ _id?: string;
3404
+ /**
3405
+ * Assumes actions are also always typed to an entity_type
3406
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3407
+ */
3408
+ entityFqdn?: string;
3409
+ /**
3410
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3411
+ * This is although the created/updated/deleted notion is duplication of the oneof types
3412
+ * Example: created/updated/deleted/started/completed/email_opened
3413
+ */
3414
+ slug?: string;
3415
+ /** ID of the entity associated with the event. */
3416
+ entityId?: string;
3417
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3418
+ eventTime?: Date | null;
3419
+ /**
3420
+ * Whether the event was triggered as a result of a privacy regulation application
3421
+ * (for example, GDPR).
3422
+ */
3423
+ triggeredByAnonymizeRequest?: boolean | null;
3424
+ /** If present, indicates the action that triggered the event. */
3425
+ originatedFrom?: string | null;
3426
+ /**
3427
+ * A sequence number defining the order of updates to the underlying entity.
3428
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
3429
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3430
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3431
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
3432
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3433
+ */
3434
+ entityEventSequence?: string | null;
3435
+ }
3436
+ /** @oneof */
3437
+ export interface DomainEventBodyOneOf {
3438
+ createdEvent?: EntityCreatedEvent;
3439
+ updatedEvent?: EntityUpdatedEvent;
3440
+ deletedEvent?: EntityDeletedEvent;
3441
+ actionEvent?: ActionEvent;
3442
+ }
3443
+ export interface EntityCreatedEvent {
3444
+ entity?: string;
3445
+ }
3446
+ export interface RestoreInfo {
3447
+ deletedDate?: Date | null;
3448
+ }
3449
+ export interface EntityUpdatedEvent {
3450
+ /**
3451
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3452
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3453
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3454
+ */
3455
+ currentEntity?: string;
3456
+ }
3457
+ export interface EntityDeletedEvent {
3458
+ /** Entity that was deleted */
3459
+ deletedEntity?: string | null;
3460
+ }
3461
+ export interface ActionEvent {
3462
+ body?: string;
3463
+ }
3464
+ export interface MessageEnvelope {
3465
+ /**
3466
+ * App instance ID.
3467
+ * @format GUID
3468
+ */
3469
+ instanceId?: string | null;
3470
+ /**
3471
+ * Event type.
3472
+ * @maxLength 150
3473
+ */
3474
+ eventType?: string;
3475
+ /** The identification type and identity data. */
3476
+ identity?: IdentificationData;
3477
+ /** Stringify payload. */
3478
+ data?: string;
3479
+ }
3480
+ export interface IdentificationData extends IdentificationDataIdOneOf {
3481
+ /**
3482
+ * ID of a site visitor that has not logged in to the site.
3483
+ * @format GUID
3484
+ */
3485
+ anonymousVisitorId?: string;
3486
+ /**
3487
+ * ID of a site visitor that has logged in to the site.
3488
+ * @format GUID
3489
+ */
3490
+ memberId?: string;
3491
+ /**
3492
+ * ID of a Wix user (site owner, contributor, etc.).
3493
+ * @format GUID
3494
+ */
3495
+ wixUserId?: string;
3496
+ /**
3497
+ * ID of an app.
3498
+ * @format GUID
3499
+ */
3500
+ appId?: string;
3501
+ /** @readonly */
3502
+ identityType?: WebhookIdentityType;
3503
+ }
3504
+ /** @oneof */
3505
+ export interface IdentificationDataIdOneOf {
3506
+ /**
3507
+ * ID of a site visitor that has not logged in to the site.
3508
+ * @format GUID
3509
+ */
3510
+ anonymousVisitorId?: string;
3511
+ /**
3512
+ * ID of a site visitor that has logged in to the site.
3513
+ * @format GUID
3514
+ */
3515
+ memberId?: string;
3516
+ /**
3517
+ * ID of a Wix user (site owner, contributor, etc.).
3518
+ * @format GUID
3519
+ */
3520
+ wixUserId?: string;
3521
+ /**
3522
+ * ID of an app.
3523
+ * @format GUID
3524
+ */
3525
+ appId?: string;
3526
+ }
3527
+ export declare enum WebhookIdentityType {
3528
+ UNKNOWN = "UNKNOWN",
3529
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3530
+ MEMBER = "MEMBER",
3531
+ WIX_USER = "WIX_USER",
3532
+ APP = "APP"
3533
+ }
3534
+ export interface BaseEventMetadata {
3535
+ /**
3536
+ * App instance ID.
3537
+ * @format GUID
3538
+ */
3539
+ instanceId?: string | null;
3540
+ /**
3541
+ * Event type.
3542
+ * @maxLength 150
3543
+ */
3544
+ eventType?: string;
3545
+ /** The identification type and identity data. */
3546
+ identity?: IdentificationData;
3547
+ }
3548
+ export interface EventMetadata extends BaseEventMetadata {
3549
+ /**
3550
+ * Unique event ID.
3551
+ * Allows clients to ignore duplicate webhooks.
3552
+ */
3553
+ _id?: string;
3554
+ /**
3555
+ * Assumes actions are also always typed to an entity_type
3556
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3557
+ */
3558
+ entityFqdn?: string;
3559
+ /**
3560
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3561
+ * This is although the created/updated/deleted notion is duplication of the oneof types
3562
+ * Example: created/updated/deleted/started/completed/email_opened
3563
+ */
3564
+ slug?: string;
3565
+ /** ID of the entity associated with the event. */
3566
+ entityId?: string;
3567
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3568
+ eventTime?: Date | null;
3569
+ /**
3570
+ * Whether the event was triggered as a result of a privacy regulation application
3571
+ * (for example, GDPR).
3572
+ */
3573
+ triggeredByAnonymizeRequest?: boolean | null;
3574
+ /** If present, indicates the action that triggered the event. */
3575
+ originatedFrom?: string | null;
3576
+ /**
3577
+ * A sequence number defining the order of updates to the underlying entity.
3578
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
3579
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3580
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3581
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
3582
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3583
+ */
3584
+ entityEventSequence?: string | null;
3585
+ }
3586
+ export interface CheckoutCompletedEnvelope {
3587
+ data: CheckoutMarkedAsCompleted;
3588
+ metadata: EventMetadata;
3589
+ }
3590
+ /**
3591
+ * Triggered when an order created from this checkout is
3592
+ * successfully paid for or when a checkout is marked as completed.
3593
+ * @permissionScope Manage Stores - all permissions
3594
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3595
+ * @permissionScope Read eCommerce - all read permissions
3596
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3597
+ * @permissionScope Read Orders
3598
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3599
+ * @permissionScope Read Stores - all read permissions
3600
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3601
+ * @permissionScope Manage Restaurants - all permissions
3602
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3603
+ * @permissionScope Manage eCommerce - all permissions
3604
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3605
+ * @permissionScope Manage Orders
3606
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3607
+ * @permissionId ECOM.READ_CHECKOUTS
3608
+ * @webhook
3609
+ * @eventType wix.ecom.v1.checkout_completed
3610
+ * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3611
+ * @slug completed
3612
+ */
3613
+ export declare function onCheckoutCompleted(handler: (event: CheckoutCompletedEnvelope) => void | Promise<void>): void;
3614
+ export interface CheckoutCreatedEnvelope {
3615
+ entity: Checkout;
3616
+ metadata: EventMetadata;
3617
+ }
3618
+ /**
3619
+ * Triggered when a checkout is created.
3620
+ * @permissionScope Manage Stores - all permissions
3621
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3622
+ * @permissionScope Read eCommerce - all read permissions
3623
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3624
+ * @permissionScope Read Orders
3625
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3626
+ * @permissionScope Read Stores - all read permissions
3627
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3628
+ * @permissionScope Manage Restaurants - all permissions
3629
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3630
+ * @permissionScope Manage eCommerce - all permissions
3631
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3632
+ * @permissionScope Manage Orders
3633
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3634
+ * @permissionId ECOM.READ_CHECKOUTS
3635
+ * @webhook
3636
+ * @eventType wix.ecom.v1.checkout_created
3637
+ * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3638
+ * @slug created
3639
+ */
3640
+ export declare function onCheckoutCreated(handler: (event: CheckoutCreatedEnvelope) => void | Promise<void>): void;
3641
+ export interface CheckoutUpdatedEnvelope {
3642
+ entity: Checkout;
3643
+ metadata: EventMetadata;
3644
+ }
3645
+ /**
3646
+ * Triggered when a checkout is updated.
3647
+ * @permissionScope Manage Stores - all permissions
3648
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3649
+ * @permissionScope Read eCommerce - all read permissions
3650
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3651
+ * @permissionScope Read Orders
3652
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3653
+ * @permissionScope Read Stores - all read permissions
3654
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3655
+ * @permissionScope Manage Restaurants - all permissions
3656
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3657
+ * @permissionScope Manage eCommerce - all permissions
3658
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3659
+ * @permissionScope Manage Orders
3660
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3661
+ * @permissionId ECOM.READ_CHECKOUTS
3662
+ * @webhook
3663
+ * @eventType wix.ecom.v1.checkout_updated
3664
+ * @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
3665
+ * @slug updated
3666
+ */
3667
+ export declare function onCheckoutUpdated(handler: (event: CheckoutUpdatedEnvelope) => void | Promise<void>): void;
3668
+ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.productName.original` | `lineItems.${number}.price.amount` | `lineItems.${number}.price.convertedAmount` | `lineItems.${number}.price.formattedAmount` | `lineItems.${number}.price.formattedConvertedAmount` | `lineItems.${number}.taxDetails.taxRate` | `lineItems.${number}.taxDetails.rateBreakdown` | `lineItems.${number}.taxDetails.rateBreakdown.${number}.name` | `lineItems.${number}.taxDetails.rateBreakdown.${number}.rate` | `lineItems.${number}.descriptionLines` | `lineItems.${number}.descriptionLines.${number}.plainText.original` | `lineItems.${number}.descriptionLines.${number}.colorInfo.original` | `lineItems.${number}.descriptionLines.${number}.name.original` | `lineItems.${number}.availability.status` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionOptionInfo.title.original` | `lineItems.${number}.subscriptionOptionInfo.description.original` | `lineItems.${number}.paymentOption` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.customLineItem` | `lineItems.${number}.catalogOverrideFields.descriptionLines` | `lineItems.${number}.catalogOverrideFields.paymentOption.value` | `lineItems.${number}.savePaymentMethod` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `shippingInfo.shippingDestination.address.streetAddress.number` | `shippingInfo.shippingDestination.address.streetAddress.name` | `shippingInfo.shippingDestination.contactDetails.vatId._id` | `shippingInfo.shippingDestination.contactDetails.vatId.type` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.applicableLineItems.lineItemIds` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.code` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.title` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.cost.otherCharges` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.cost.otherCharges.${number}.type` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.deliveryAllocations` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `conversionCurrency` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `appliedDiscounts.${number}.lineItemIds` | `customFields` | `customFields.${number}.title` | `weightUnit` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `currency` | `channelType` | `siteLanguage` | `buyerLanguage` | `completed` | `taxIncludedInPrice` | `createdBy.userId` | `createdBy.memberId` | `createdBy.visitorId` | `createdBy.appId` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.lineItemIds` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships.memberships` | `membershipOptions.selectedMemberships.memberships.${number}._id` | `membershipOptions.selectedMemberships.memberships.${number}.appId` | `membershipOptions.selectedMemberships.memberships.${number}.lineItemIds` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.taxDetails.rateBreakdown` | `additionalFees.${number}.taxDetails.rateBreakdown.${number}.name` | `additionalFees.${number}.taxDetails.rateBreakdown.${number}.rate` | `additionalFees.${number}.lineItemIds` | `additionalFees.${number}.source` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name` | `customSettings.lockGiftCard` | `customSettings.lockCouponCode` | `customSettings.disabledPolicyAgreementCheckbox` | `customSettings.disabledManualPayment` | `customContentReference.appId` | `customContentReference.componentId` | `externalReference.appId`;
3669
+ /**
3670
+ * Creates a checkout.
3671
+ *
3672
+ *
3673
+ * The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.
3674
+ *
3675
+ * > **Notes:**
3676
+ * > + Checkout must include at least 1 item in the `options.lineItems` array.
3677
+ * > + `options.channelType` is required.
3678
+ * > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
3679
+ * > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.
3680
+ * @public
3681
+ * @requiredField options.channelType
3682
+ * @requiredField options.checkoutInfo.customFields.value
3683
+ * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships._id
3684
+ * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.appId
3685
+ * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.lineItemIds
3686
+ * @requiredField options.customLineItems.descriptionLines.name
3687
+ * @requiredField options.customLineItems.descriptionLines.value
3688
+ * @requiredField options.customLineItems.itemType
3689
+ * @requiredField options.customLineItems.price
3690
+ * @requiredField options.customLineItems.productName
3691
+ * @requiredField options.customLineItems.quantity
3692
+ * @requiredField options.lineItems.catalogReference
3693
+ * @requiredField options.lineItems.catalogReference.appId
3694
+ * @requiredField options.lineItems.catalogReference.catalogItemId
3695
+ * @requiredField options.lineItems.quantity
3696
+ * @param options - Checkout creation options.
3697
+ * @permissionId ECOM.MODIFY_CHECKOUTS
3698
+ * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
3699
+ * @permissionScope Manage Stores - all permissions
3700
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3701
+ * @permissionScope Manage Restaurants - all permissions
3702
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3703
+ * @permissionScope Manage eCommerce - all permissions
3704
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3705
+ * @permissionScope Manage Orders
3706
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3707
+ * @permissionScope Manage Stores - all permissions
3708
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3709
+ * @permissionScope Manage eCommerce - Admin Permissions
3710
+ * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
3711
+ * @permissionScope Manage Restaurants - all permissions
3712
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3713
+ * @permissionScope Manage eCommerce - all permissions
3714
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3715
+ * @applicableIdentity APP
3716
+ * @applicableIdentity VISITOR
3717
+ * @returns Fulfilled - the newly created checkout.
3718
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
3719
+ */
3720
+ export declare function createCheckout(options?: NonNullablePaths<CreateCheckoutOptions, `channelType` | `checkoutInfo.customFields.${number}.value` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}._id` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.appId` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.lineItemIds` | `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.price` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
3721
+ export interface CreateCheckoutOptions {
3722
+ /** Checkout information. */
3723
+ checkoutInfo?: Checkout;
3724
+ /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
3725
+ couponCode?: string | null;
3726
+ /**
3727
+ * Catalog line items to add to the checkout.
3728
+ * @maxSize 300
3729
+ */
3730
+ lineItems?: LineItem[];
3731
+ /**
3732
+ * Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin.
3733
+ *
3734
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
3735
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
3736
+ * @maxSize 300
3737
+ */
3738
+ customLineItems?: CustomLineItem[];
3739
+ /** Sales channel that submitted the order. */
3740
+ channelType: ChannelType;
3741
+ /**
3742
+ * Gift card code.
3743
+ *
3744
+ * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`.
3745
+ *
3746
+ * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
3747
+ */
3748
+ giftCardCode?: string | null;
3749
+ /**
3750
+ * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
3751
+ *
3752
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
3753
+ * @maxLength 1000
3754
+ */
3755
+ overrideCheckoutUrl?: string | null;
3756
+ }
3757
+ /**
3758
+ * Retrieves a checkout.
3759
+ *
3760
+ *
3761
+ * The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
3762
+ * @param _id - Checkout ID.
3763
+ * @public
3764
+ * @requiredField _id
3765
+ * @permissionId ECOM.READ_CHECKOUTS
3766
+ * @permissionScope Manage Stores - all permissions
3767
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3768
+ * @permissionScope Read eCommerce - all read permissions
3769
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3770
+ * @permissionScope Read Orders
3771
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3772
+ * @permissionScope Read Stores - all read permissions
3773
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3774
+ * @permissionScope Manage Restaurants - all permissions
3775
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3776
+ * @permissionScope Manage eCommerce - all permissions
3777
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3778
+ * @permissionScope Manage Orders
3779
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3780
+ * @applicableIdentity APP
3781
+ * @applicableIdentity VISITOR
3782
+ * @returns Fulfilled - the requested checkout.
3783
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
3784
+ */
3785
+ export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
3786
+ /**
3787
+ * Retrieves the checkout associated with a specified cart.
3788
+ * @param _id - Cart ID.
3789
+ * @public
3790
+ * @requiredField _id
3791
+ * @permissionId ECOM.READ_CHECKOUTS
3792
+ * @permissionScope Manage Stores - all permissions
3793
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3794
+ * @permissionScope Read eCommerce - all read permissions
3795
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3796
+ * @permissionScope Read Orders
3797
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3798
+ * @permissionScope Read Stores - all read permissions
3799
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3800
+ * @permissionScope Manage Restaurants - all permissions
3801
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3802
+ * @permissionScope Manage eCommerce - all permissions
3803
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3804
+ * @permissionScope Manage Orders
3805
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3806
+ * @applicableIdentity APP
3807
+ * @applicableIdentity VISITOR
3808
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutByCartId
3809
+ */
3810
+ export declare function getCheckoutByCartId(_id: string): Promise<NonNullablePaths<GetCheckoutByCartIdResponse, {
3811
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
3812
+ }[CheckoutNonNullablePaths]>>;
3813
+ /**
3814
+ * Deprecated and will be removed soon, use GetCheckoutURL
3815
+ * @param _id - Checkout ID.
3816
+ * @internal
3817
+ * @documentationMaturity preview
3818
+ * @requiredField _id
3819
+ * @permissionId ECOM.READ_CHECKOUTS
3820
+ * @permissionScope Manage Stores - all permissions
3821
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3822
+ * @permissionScope Read eCommerce - all read permissions
3823
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3824
+ * @permissionScope Read Orders
3825
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3826
+ * @permissionScope Read Stores - all read permissions
3827
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3828
+ * @permissionScope Manage Restaurants - all permissions
3829
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3830
+ * @permissionScope Manage eCommerce - all permissions
3831
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3832
+ * @permissionScope Manage Orders
3833
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3834
+ * @applicableIdentity APP
3835
+ * @applicableIdentity VISITOR
3836
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetWixCheckoutURL
3837
+ */
3838
+ export declare function getWixCheckoutUrl(_id: string): Promise<NonNullablePaths<GetWixCheckoutURLResponse, `checkoutUrl`>>;
3839
+ /**
3840
+ * Retrieves the checkout page URL of a specified checkout.
3841
+ *
3842
+ * By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.
3843
+ * However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
3844
+ * @param _id - Checkout ID.
3845
+ * @public
3846
+ * @requiredField _id
3847
+ * @permissionId ECOM.READ_CHECKOUTS
3848
+ * @permissionScope Manage Stores - all permissions
3849
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3850
+ * @permissionScope Read eCommerce - all read permissions
3851
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3852
+ * @permissionScope Read Orders
3853
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
3854
+ * @permissionScope Read Stores - all read permissions
3855
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
3856
+ * @permissionScope Manage Restaurants - all permissions
3857
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3858
+ * @permissionScope Manage eCommerce - all permissions
3859
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3860
+ * @permissionScope Manage Orders
3861
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3862
+ * @applicableIdentity APP
3863
+ * @applicableIdentity VISITOR
3864
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutURL
3865
+ */
3866
+ export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
3867
+ /**
3868
+ * Updates a checkout.
3869
+ *
3870
+ *
3871
+ * The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.
3872
+ *
3873
+ * >**Notes:**
3874
+ * > + If nothing is passed in the request, the call will fail.
3875
+ * > + The `checkout.buyerInfo.email` may not be removed once it is set.
3876
+ * @param _id - Checkout ID.
3877
+ * @public
3878
+ * @requiredField _id
3879
+ * @requiredField checkout
3880
+ * @requiredField checkout.customFields.value
3881
+ * @requiredField checkout.membershipOptions.selectedMemberships.memberships._id
3882
+ * @requiredField checkout.membershipOptions.selectedMemberships.memberships.appId
3883
+ * @requiredField checkout.membershipOptions.selectedMemberships.memberships.lineItemIds
3884
+ * @requiredField options.customLineItems.descriptionLines.name
3885
+ * @requiredField options.customLineItems.descriptionLines.value
3886
+ * @requiredField options.customLineItems.itemType
3887
+ * @requiredField options.customLineItems.productName
3888
+ * @requiredField options.customLineItems.quantity
3889
+ * @requiredField options.lineItems.catalogReference
3890
+ * @requiredField options.lineItems.catalogReference.appId
3891
+ * @requiredField options.lineItems.catalogReference.catalogItemId
3892
+ * @requiredField options.lineItems.quantity
3893
+ * @param options - Checkout update options.
3894
+ * @permissionId ECOM.MODIFY_CHECKOUTS
3895
+ * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
3896
+ * @permissionScope Manage Stores - all permissions
3897
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3898
+ * @permissionScope Manage Restaurants - all permissions
3899
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3900
+ * @permissionScope Manage eCommerce - all permissions
3901
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3902
+ * @permissionScope Manage Orders
3903
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3904
+ * @permissionScope Manage Stores - all permissions
3905
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3906
+ * @permissionScope Manage eCommerce - Admin Permissions
3907
+ * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
3908
+ * @permissionScope Manage Restaurants - all permissions
3909
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3910
+ * @permissionScope Manage eCommerce - all permissions
3911
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3912
+ * @applicableIdentity APP
3913
+ * @applicableIdentity VISITOR
3914
+ * @returns Updated checkout.
3915
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateCheckout
3916
+ */
3917
+ export declare function updateCheckout(_id: string, checkout: NonNullablePaths<UpdateCheckout, `customFields.${number}.value` | `membershipOptions.selectedMemberships.memberships.${number}._id` | `membershipOptions.selectedMemberships.memberships.${number}.appId` | `membershipOptions.selectedMemberships.memberships.${number}.lineItemIds`>, options?: NonNullablePaths<UpdateCheckoutOptions, `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
3918
+ export interface UpdateCheckout {
3919
+ /**
3920
+ * Checkout ID.
3921
+ * @format GUID
3922
+ * @readonly
3923
+ */
3924
+ _id?: string | null;
3925
+ /**
3926
+ * Line items.
3927
+ *
3928
+ * Max: 300 items
3929
+ * @minSize 1
3930
+ * @maxSize 300
3931
+ * @readonly
3932
+ */
3933
+ lineItems?: LineItem[];
3934
+ /** Billing information. */
3935
+ billingInfo?: AddressWithContact;
3936
+ /** Shipping information. */
3937
+ shippingInfo?: ShippingInfo;
3938
+ /**
3939
+ * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
3940
+ * @maxLength 1000
3941
+ */
3942
+ buyerNote?: string | null;
3943
+ /** Buyer information. */
3944
+ buyerInfo?: BuyerInfo;
3945
+ /**
3946
+ * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3947
+ * @readonly
3948
+ * @format CURRENCY
3949
+ */
3950
+ conversionCurrency?: string;
3951
+ /**
3952
+ * Calculated price summary for the checkout.
3953
+ * @readonly
3954
+ */
3955
+ priceSummary?: PriceSummary;
3956
+ /**
3957
+ * Errors when calculating totals.
3958
+ * @readonly
3959
+ */
3960
+ calculationErrors?: CalculationErrors;
3961
+ /**
3962
+ * Applied gift card details.
3963
+ *
3964
+ * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
3965
+ * @readonly
3966
+ */
3967
+ giftCard?: GiftCard;
3968
+ /**
3969
+ * Applied discounts.
3970
+ * @readonly
3971
+ */
3972
+ appliedDiscounts?: AppliedDiscount[];
3973
+ /** Custom fields. */
3974
+ customFields?: CustomField[];
3975
+ /**
3976
+ * Weight measurement unit. Defaults to a site's weight unit.
3977
+ * @readonly
3978
+ */
3979
+ weightUnit?: WeightUnit;
3980
+ /**
3981
+ * Tax summary.
3982
+ * @readonly
3983
+ */
3984
+ taxSummary?: TaxSummary;
3985
+ /**
3986
+ * The currency used when submitting the order.
3987
+ * @format CURRENCY
3988
+ * @readonly
3989
+ */
3990
+ currency?: string;
3991
+ /**
3992
+ * Sales channel that submitted the order.
3993
+ * @readonly
3994
+ */
3995
+ channelType?: ChannelType;
3996
+ /**
3997
+ * Site language in which original values are shown.
3998
+ * @readonly
3999
+ */
4000
+ siteLanguage?: string;
4001
+ /**
4002
+ * Language for communication with the buyer. Defaults to the site language.
4003
+ * For a site that supports multiple languages, this is the language the buyer selected.
4004
+ * @readonly
4005
+ */
4006
+ buyerLanguage?: string;
4007
+ /**
4008
+ * Whether an order was successfully created from this checkout.
4009
+ * For an order to be successful, it must be successfully paid for (unless the total is 0).
4010
+ * @readonly
4011
+ */
4012
+ completed?: boolean;
4013
+ /**
4014
+ * Whether tax is included in line item prices.
4015
+ * @readonly
4016
+ */
4017
+ taxIncludedInPrice?: boolean;
4018
+ /**
4019
+ * ID of the checkout's initiator.
4020
+ * @readonly
4021
+ */
4022
+ createdBy?: CreatedBy;
4023
+ /**
4024
+ * Date and time the checkout was created.
4025
+ * @readonly
4026
+ */
4027
+ _createdDate?: Date | null;
4028
+ /**
4029
+ * Date and time the checkout was updated.
4030
+ * @readonly
4031
+ */
4032
+ _updatedDate?: Date | null;
4033
+ /**
4034
+ * Minimal amount to pay in order to place the order.
4035
+ * @readonly
4036
+ */
4037
+ payNow?: PriceSummary;
4038
+ /**
4039
+ * Remaining amount for the order to be fully paid.
4040
+ * @readonly
4041
+ */
4042
+ payLater?: PriceSummary;
4043
+ /** Memberships to apply when creating the order. */
4044
+ membershipOptions?: MembershipOptions;
4045
+ /**
4046
+ * Additional Fees.
4047
+ * @maxSize 100
4048
+ */
4049
+ additionalFees?: AdditionalFee[];
4050
+ /**
4051
+ * Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart.
4052
+ * @format GUID
4053
+ */
4054
+ cartId?: string | null;
4055
+ /**
4056
+ * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
4057
+ * @readonly
4058
+ */
4059
+ violations?: Violation[];
4060
+ /**
4061
+ * Custom field data for the checkout object.
4062
+ *
4063
+ * [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.
4064
+ */
4065
+ extendedFields?: ExtendedFields;
4066
+ /**
4067
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
4068
+ * @format GUID
4069
+ * @readonly
4070
+ */
4071
+ purchaseFlowId?: string | null;
4072
+ /**
4073
+ * Additional settings for customization of the checkout process.
4074
+ *
4075
+ * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).
4076
+ * @immutable
4077
+ */
4078
+ customSettings?: CustomSettings;
4079
+ /**
4080
+ * Reference IDs for the app and component providing custom checkout page content.
4081
+ *
4082
+ * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4083
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4084
+ */
4085
+ customContentReference?: CustomContentReference;
4086
+ /**
4087
+ * References to an external app and resource associated with this checkout.
4088
+ * Used for integration and tracking across different platforms.
4089
+ * @immutable
4090
+ */
4091
+ externalReference?: ExternalReference;
4092
+ /**
4093
+ * Order ID.
4094
+ *
4095
+ * This field is empty until the checkout completes and becomes an order.
4096
+ * @internal
4097
+ * @format GUID
4098
+ * @readonly
4099
+ */
4100
+ orderId?: string | null;
4101
+ /**
4102
+ * Payment for subscriptions after free trial period.
4103
+ * @internal
4104
+ * @readonly
4105
+ */
4106
+ payAfterFreeTrial?: PriceSummary;
4107
+ /**
4108
+ * The business location ID associated with the checkout.
4109
+ *
4110
+ * To learn more, see the Locations API.
4111
+ * @format GUID
4112
+ */
4113
+ businessLocationId?: string | null;
4114
+ /**
4115
+ * Whether payment is required to create an order.
4116
+ *
4117
+ * Payment is required if any of the following conditions are met:
4118
+ * 1. At least one item requires a payment method. This can be because the item has the `savePaymentMethod` field set to `true`, or the item is a subscription with a price greater than zero.
4119
+ * 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
4120
+ * @internal
4121
+ * @readonly
4122
+ */
4123
+ paymentRequired?: boolean;
4124
+ /**
4125
+ * Charges information for each subscription in the checkout.
4126
+ * @internal
4127
+ * @readonly
4128
+ * @maxSize 100
4129
+ */
4130
+ subscriptionCharges?: SubscriptionCharges[];
4131
+ }
4132
+ export interface UpdateCheckoutOptions {
4133
+ /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
4134
+ couponCode?: string | null;
4135
+ /** Gift card code. */
4136
+ giftCardCode?: string | null;
4137
+ /**
4138
+ * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
4139
+ *
4140
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
4141
+ * @maxLength 1000
4142
+ */
4143
+ overrideCheckoutUrl?: string | null;
4144
+ /**
4145
+ * Catalog line items.
4146
+ * @maxSize 300
4147
+ */
4148
+ lineItems?: LineItem[];
4149
+ /**
4150
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
4151
+ *
4152
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4153
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4154
+ * @maxSize 300
4155
+ */
4156
+ customLineItems?: CustomLineItem[];
4157
+ }
4158
+ /**
4159
+ * Removes the coupon from a specified checkout.
4160
+ *
4161
+ *
4162
+ * The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
4163
+ *
4164
+ * >**Note:** A checkout can only hold 1 coupon.
4165
+ * @param _id - ID of the checkout to remove the coupon from.
4166
+ * @public
4167
+ * @requiredField _id
4168
+ * @permissionId ECOM.MODIFY_CHECKOUTS
4169
+ * @permissionScope Manage Stores - all permissions
4170
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4171
+ * @permissionScope Manage Restaurants - all permissions
4172
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4173
+ * @permissionScope Manage eCommerce - all permissions
4174
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4175
+ * @permissionScope Manage Orders
4176
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4177
+ * @applicableIdentity APP
4178
+ * @applicableIdentity VISITOR
4179
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveCoupon
4180
+ */
4181
+ export declare function removeCoupon(_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
4182
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4183
+ }[CheckoutNonNullablePaths]>>;
4184
+ /**
4185
+ * Removes the gift card from a specified checkout.
4186
+ *
4187
+ *
4188
+ * The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
4189
+ *
4190
+ * >**Note:** A checkout can only hold 1 gift card.
4191
+ * @param _id - ID of the checkout to remove the gift card from.
4192
+ * @public
4193
+ * @requiredField _id
4194
+ * @permissionId ECOM.MODIFY_CHECKOUTS
4195
+ * @permissionScope Manage Stores - all permissions
4196
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4197
+ * @permissionScope Manage Restaurants - all permissions
4198
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4199
+ * @permissionScope Manage eCommerce - all permissions
4200
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4201
+ * @permissionScope Manage Orders
4202
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4203
+ * @applicableIdentity APP
4204
+ * @applicableIdentity VISITOR
4205
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveGiftCard
4206
+ */
4207
+ export declare function removeGiftCard(_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
4208
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4209
+ }[CheckoutNonNullablePaths]>>;
4210
+ /**
4211
+ * Removes the `overrideCheckoutUrl` from a specified checkout.
4212
+ *
4213
+ * When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard
4214
+ * Wix checkout page URL.
4215
+ * @param _id - ID of the checkout to remove the override checkout url from.
4216
+ * @public
4217
+ * @requiredField _id
4218
+ * @permissionId ECOM.MODIFY_CHECKOUTS
4219
+ * @permissionScope Manage Stores - all permissions
4220
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4221
+ * @permissionScope Manage Restaurants - all permissions
4222
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4223
+ * @permissionScope Manage eCommerce - all permissions
4224
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4225
+ * @permissionScope Manage Orders
4226
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4227
+ * @applicableIdentity APP
4228
+ * @applicableIdentity VISITOR
4229
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveOverrideCheckoutUrl
4230
+ */
4231
+ export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
4232
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4233
+ }[CheckoutNonNullablePaths]>>;
4234
+ /**
4235
+ * Adds catalog line items and/or custom line items to a checkout.
4236
+ *
4237
+ *
4238
+ * The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.
4239
+ * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
4240
+ * @param _id - Checkout ID.
4241
+ * @public
4242
+ * @requiredField _id
4243
+ * @requiredField options.customLineItems.descriptionLines.name
4244
+ * @requiredField options.customLineItems.descriptionLines.value
4245
+ * @requiredField options.customLineItems.itemType
4246
+ * @requiredField options.customLineItems.productName
4247
+ * @requiredField options.customLineItems.quantity
4248
+ * @requiredField options.lineItems.catalogReference
4249
+ * @requiredField options.lineItems.catalogReference.appId
4250
+ * @requiredField options.lineItems.catalogReference.catalogItemId
4251
+ * @requiredField options.lineItems.quantity
4252
+ * @param options - Items to be added to checkout.
4253
+ * @permissionId ECOM.MODIFY_CHECKOUTS
4254
+ * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
4255
+ * @permissionScope Manage Stores - all permissions
4256
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4257
+ * @permissionScope Manage Restaurants - all permissions
4258
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4259
+ * @permissionScope Manage eCommerce - all permissions
4260
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4261
+ * @permissionScope Manage Orders
4262
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4263
+ * @permissionScope Manage Stores - all permissions
4264
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4265
+ * @permissionScope Manage eCommerce - Admin Permissions
4266
+ * @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
4267
+ * @permissionScope Manage Restaurants - all permissions
4268
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4269
+ * @permissionScope Manage eCommerce - all permissions
4270
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4271
+ * @applicableIdentity APP
4272
+ * @applicableIdentity VISITOR
4273
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.AddToCheckout
4274
+ */
4275
+ export declare function addToCheckout(_id: string, options?: NonNullablePaths<AddToCheckoutOptions, `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<AddToCheckoutResponse, {
4276
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4277
+ }[CheckoutNonNullablePaths]>>;
4278
+ export interface AddToCheckoutOptions {
4279
+ /**
4280
+ * Catalog line items.
4281
+ * @maxSize 100
4282
+ */
4283
+ lineItems?: LineItem[];
4284
+ /**
4285
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
4286
+ *
4287
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
4288
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
4289
+ * @maxSize 100
4290
+ */
4291
+ customLineItems?: CustomLineItem[];
4292
+ }
4293
+ /**
4294
+ * Removes line items from the specified checkout.
4295
+ *
4296
+ *
4297
+ * The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
4298
+ * @param _id - ID of the checkout to remove line items from.
4299
+ * @public
4300
+ * @requiredField _id
4301
+ * @requiredField lineItemIds
4302
+ * @param lineItemIds - IDs of the line items to be removed.
4303
+ * To find the IDs of the checkout line items you'd like to remove, pass the `checkout._id` to [getCheckout()](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and look for the IDs under `lineItems` and/or `customLineItems`.
4304
+ * @permissionId ECOM.MODIFY_CHECKOUTS
4305
+ * @permissionScope Manage Stores - all permissions
4306
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4307
+ * @permissionScope Manage Restaurants - all permissions
4308
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4309
+ * @permissionScope Manage eCommerce - all permissions
4310
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4311
+ * @permissionScope Manage Orders
4312
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4313
+ * @applicableIdentity APP
4314
+ * @applicableIdentity VISITOR
4315
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveLineItems
4316
+ */
4317
+ export declare function removeLineItems(_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
4318
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4319
+ }[CheckoutNonNullablePaths]>>;
4320
+ /**
4321
+ * Creates an order from a specified checkout.
4322
+ *
4323
+ * The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.
4324
+ * Pass the `paymentGatewayOrderId` as the `paymentId` param to the [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function to allow a customer to pay for their order.
4325
+ *
4326
+ * > **Note:** The following requirements must be met for an order to be created from a checkout.
4327
+ * > + A checkout cannot have calculation errors. Pass the `checkout._id` to [Get Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and take a look at the `calculationErrors` field.
4328
+ * > + A checkout must have at least 1 line item.
4329
+ * > + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
4330
+ * > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
4331
+ * > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
4332
+ * > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.
4333
+ * @param _id - Checkout ID.
4334
+ * @public
4335
+ * @requiredField _id
4336
+ * @param options - Further order creation options.
4337
+ * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
4338
+ * @permissionScope Manage Stores - all permissions
4339
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4340
+ * @permissionScope Manage Restaurants - all permissions
4341
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4342
+ * @permissionScope Manage eCommerce - all permissions
4343
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4344
+ * @permissionScope Manage Orders
4345
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4346
+ * @applicableIdentity APP
4347
+ * @applicableIdentity VISITOR
4348
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrder
4349
+ */
4350
+ export declare function createOrder(_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`>>;
4351
+ export interface CreateOrderOptions {
4352
+ /** Whether the payment method should be saved on the order. */
4353
+ savePaymentMethod?: boolean;
4354
+ /** Whether to authorize the payment and delay the capture. */
4355
+ delayCapture?: boolean;
4356
+ }
4357
+ /**
4358
+ * Deprecated (use createOrder instead)
4359
+ * @param _id - Checkout ID.
4360
+ * @internal
4361
+ * @documentationMaturity preview
4362
+ * @requiredField _id
4363
+ * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
4364
+ * @permissionScope Manage Stores - all permissions
4365
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4366
+ * @permissionScope Manage Restaurants - all permissions
4367
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4368
+ * @permissionScope Manage eCommerce - all permissions
4369
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4370
+ * @permissionScope Manage Orders
4371
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4372
+ * @applicableIdentity APP
4373
+ * @applicableIdentity VISITOR
4374
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrderAndCharge
4375
+ */
4376
+ export declare function createOrderAndCharge(_id: string, options?: CreateOrderAndChargeOptions): Promise<NonNullablePaths<CreateOrderAndChargeResponse, `orderId` | `subscriptionId`>>;
4377
+ export interface CreateOrderAndChargeOptions {
4378
+ /** Payment token. */
4379
+ paymentToken?: string | null;
4380
+ /** Whether the payment method should be saved on the order. */
4381
+ savePaymentMethod?: boolean;
4382
+ /** Whether to authorize the payment and delay the capture. */
4383
+ delayCapture?: boolean;
4384
+ }
4385
+ /**
4386
+ * Marks a checkout as completed and redirects to a specified URL.
4387
+ * @param token - Server-signed JWT token with required information to complete checkout
4388
+ * @internal
4389
+ * @documentationMaturity preview
4390
+ * @requiredField token
4391
+ * @permissionId ECOM.MODIFY_CHECKOUTS
4392
+ * @permissionScope Manage Stores - all permissions
4393
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4394
+ * @permissionScope Manage Restaurants - all permissions
4395
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4396
+ * @permissionScope Manage eCommerce - all permissions
4397
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4398
+ * @permissionScope Manage Orders
4399
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4400
+ * @applicableIdentity APP
4401
+ * @applicableIdentity VISITOR
4402
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompletedAndRedirectToUrl
4403
+ */
4404
+ export declare function markCheckoutAsCompletedAndRedirectToUrl(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
4405
+ /**
4406
+ * Marks a checkout as completed - `checkout.complete` boolean is set to `true`.
4407
+ *
4408
+ *
4409
+ * The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.
4410
+ * @param _id - Checkout ID.
4411
+ * @public
4412
+ * @requiredField _id
4413
+ * @permissionId ECOM.MODIFY_CHECKOUTS
4414
+ * @permissionScope Manage Stores - all permissions
4415
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4416
+ * @permissionScope Manage Restaurants - all permissions
4417
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4418
+ * @permissionScope Manage eCommerce - all permissions
4419
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4420
+ * @permissionScope Manage Orders
4421
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4422
+ * @applicableIdentity APP
4423
+ * @applicableIdentity VISITOR
4424
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompleted
4425
+ */
4426
+ export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
4427
+ /**
4428
+ * Updates the quantity of one or more line items in a checkout.
4429
+ *
4430
+ * This endpoint is only for updating the quantity of line items. To entirely remove a line item from
4431
+ * the checkout, use [`removeLineItems()`](#removelineitems).
4432
+ * To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).
4433
+ *
4434
+ * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`
4435
+ * is greater than the remaining stock, then the `quantity` returned in the response is the total amount
4436
+ * of remaining stock.
4437
+ * @param _id - Checkout ID.
4438
+ * @param lineItems - Line item info to update.
4439
+ * @public
4440
+ * @requiredField _id
4441
+ * @requiredField lineItems
4442
+ * @requiredField lineItems._id
4443
+ * @requiredField lineItems.quantity
4444
+ * @permissionId ECOM.MODIFY_CHECKOUTS
4445
+ * @permissionScope Manage Stores - all permissions
4446
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4447
+ * @permissionScope Manage Restaurants - all permissions
4448
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4449
+ * @permissionScope Manage eCommerce - all permissions
4450
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4451
+ * @permissionScope Manage Orders
4452
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
4453
+ * @applicableIdentity APP
4454
+ * @applicableIdentity VISITOR
4455
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateLineItemsQuantity
4456
+ */
4457
+ export declare function updateLineItemsQuantity(_id: string, lineItems: NonNullablePaths<LineItemQuantityUpdate, `_id` | `quantity`>[]): Promise<NonNullablePaths<UpdateLineItemsQuantityResponse, {
4458
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
4459
+ }[CheckoutNonNullablePaths]>>;
4460
+ /** @param _id - Checkout ID.
4461
+ * @internal
4462
+ * @documentationMaturity preview
4463
+ * @requiredField _id
4464
+ * @permissionId ECOM.READ_PAYMENT_SETTINGS
4465
+ * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutPaymentSettings
4466
+ */
4467
+ export declare function getCheckoutPaymentSettings(_id: string): Promise<NonNullablePaths<GetCheckoutPaymentSettingsResponse, `blockedPaymentOptions`>>;
4468
+ export {};