@wix/auto_sdk_ecom_checkout 1.0.0

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