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