@wix/auto_sdk_ecom_checkout 1.0.35 → 1.0.37

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