@wix/auto_sdk_ecom_draft-orders 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +26 -0
  11. package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js +57 -0
  12. package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +97 -0
  14. package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +2951 -0
  15. package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.d.ts +60 -0
  17. package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.js +446 -0
  18. package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +209 -0
  20. package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js +168 -0
  21. package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -0
  22. package/build/{ecom-v1-draft-order-draft-orders.universal-Ch0BEnrn.d.mts → cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts} +336 -429
  23. package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +360 -0
  24. package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -0
  25. package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +4055 -0
  26. package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +1899 -0
  27. package/build/cjs/src/ecom-v1-draft-order-draft-orders.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-draft-order-draft-orders.context.d.ts +26 -0
  39. package/build/es/src/ecom-v1-draft-order-draft-orders.context.js +26 -0
  40. package/build/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +97 -0
  42. package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +2926 -0
  43. package/build/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-draft-order-draft-orders.meta.d.ts +60 -0
  45. package/build/es/src/ecom-v1-draft-order-draft-orders.meta.js +398 -0
  46. package/build/es/src/ecom-v1-draft-order-draft-orders.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +209 -0
  48. package/build/es/src/ecom-v1-draft-order-draft-orders.public.js +114 -0
  49. package/build/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -0
  50. package/build/{ecom-v1-draft-order-draft-orders.universal-Ch0BEnrn.d.ts → es/src/ecom-v1-draft-order-draft-orders.types.d.ts} +336 -429
  51. package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +357 -0
  52. package/build/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -0
  53. package/build/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +4055 -0
  54. package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +1851 -0
  55. package/build/es/src/ecom-v1-draft-order-draft-orders.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-draft-order-draft-orders.context.d.ts +26 -0
  66. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js +57 -0
  67. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +97 -0
  69. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +2951 -0
  70. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.d.ts +60 -0
  72. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.js +446 -0
  73. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +209 -0
  75. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js +168 -0
  76. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -0
  77. package/build/internal/{ecom-v1-draft-order-draft-orders.universal-B5CD1SEk.d.mts → cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts} +336 -889
  78. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +360 -0
  79. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +4515 -0
  81. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +1899 -0
  82. package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.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-draft-order-draft-orders.context.d.ts +26 -0
  93. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js +26 -0
  94. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +97 -0
  96. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +2926 -0
  97. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.d.ts +60 -0
  99. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.js +398 -0
  100. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +209 -0
  102. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js +114 -0
  103. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -0
  104. package/build/internal/{ecom-v1-draft-order-draft-orders.universal-B5CD1SEk.d.ts → es/src/ecom-v1-draft-order-draft-orders.types.d.ts} +336 -889
  105. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +357 -0
  106. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +4515 -0
  108. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +1851 -0
  109. package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -232
  112. package/build/index.d.ts +0 -232
  113. package/build/index.js +0 -4593
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -4520
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -232
  118. package/build/internal/index.d.ts +0 -232
  119. package/build/internal/index.js +0 -4593
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -4520
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -2751
  124. package/build/internal/meta.d.ts +0 -2751
  125. package/build/internal/meta.js +0 -3323
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -3275
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -2751
  130. package/build/meta.d.ts +0 -2751
  131. package/build/meta.js +0 -3323
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -3275
  134. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,4515 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ /** DraftOrder is the main entity of DraftOrders service. It represents a single edit order. */
3
+ export interface DraftOrder {
4
+ /**
5
+ * Draft order ID.
6
+ * @format GUID
7
+ * @readonly
8
+ */
9
+ _id?: string | null;
10
+ /**
11
+ * ID of the order this draft commits to.
12
+ * @format GUID
13
+ */
14
+ orderId?: string | null;
15
+ /**
16
+ * Line items.
17
+ * Includes details about changes when relevant.
18
+ * @minSize 1
19
+ * @maxSize 300
20
+ */
21
+ lineItems?: ItemDetails[];
22
+ /**
23
+ * Shipping info.
24
+ * Includes details about changes when relevant.
25
+ */
26
+ shippingInfo?: ShippingDetails;
27
+ /**
28
+ * Buyer information.
29
+ * @deprecated Buyer information.
30
+ * @replacedBy buyer_info_details
31
+ * @targetRemovalDate 2024-08-30
32
+ */
33
+ buyerInfo?: BuyerInfo;
34
+ /**
35
+ * Billing address and contact details.
36
+ * @deprecated Billing address and contact details.
37
+ * @replacedBy billing_info_details
38
+ * @targetRemovalDate 2024-08-30
39
+ */
40
+ billingInfo?: AddressWithContact;
41
+ /**
42
+ * Additional fees.
43
+ * Includes details about the source, and whether the additional fee is applied to the order.
44
+ * @maxSize 100
45
+ */
46
+ additionalFees?: AdditionalFeeDetails[];
47
+ /**
48
+ * Discounts.
49
+ * Includes details about the source, and whether the discount is applied to the order.
50
+ * @maxSize 320
51
+ */
52
+ discounts?: DiscountDetails[];
53
+ /**
54
+ * Date and time the draft order was created.
55
+ * @readonly
56
+ */
57
+ _createdDate?: Date | null;
58
+ /**
59
+ * Date and time the draft order was updated.
60
+ * @readonly
61
+ */
62
+ _updatedDate?: Date | null;
63
+ /**
64
+ * Identity of the draft order's initiator.
65
+ * @readonly
66
+ */
67
+ createdBy?: CreatedBy;
68
+ /**
69
+ * Draft order status.
70
+ * @readonly
71
+ */
72
+ status?: EditingStatus;
73
+ /** Weight measurement unit. Defaults to the site's weight unit. */
74
+ weightUnit?: WeightUnit;
75
+ /**
76
+ * Currency used for pricing.
77
+ * @format CURRENCY
78
+ */
79
+ currency?: string | null;
80
+ /**
81
+ * Price summary.
82
+ * @readonly
83
+ */
84
+ priceSummary?: PriceSummary;
85
+ /**
86
+ * Deprecated. Use `taxInfo` instead.
87
+ * This field will be removed on September 30, 2024.
88
+ * Tax summary.
89
+ * @readonly
90
+ * @deprecated Deprecated. Use `taxInfo` instead.
91
+ * This field will be removed on September 30, 2024.
92
+ * Tax summary.
93
+ * @replacedBy tax_info
94
+ * @targetRemovalDate 2024-09-30
95
+ */
96
+ taxSummary?: TaxSummary;
97
+ /**
98
+ * Balance summary.
99
+ * @readonly
100
+ */
101
+ balanceSummary?: BalanceSummary;
102
+ /** Side effects to perform on commit. */
103
+ commitSettings?: DraftOrderCommitSettings;
104
+ /**
105
+ * Member ID (if order created by a member).
106
+ * @format GUID
107
+ */
108
+ memberId?: string | null;
109
+ /**
110
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
111
+ * @format GUID
112
+ */
113
+ purchaseFlowId?: string | null;
114
+ recipientInfo?: RecipientInfoDetails;
115
+ /**
116
+ * Custom field data for the draft order object.
117
+ * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.
118
+ */
119
+ extendedFields?: ExtendedFields;
120
+ /**
121
+ * Buyer information.
122
+ * Includes details about changes when relevant.
123
+ * @internal
124
+ */
125
+ buyerDetails?: BuyerDetails;
126
+ /**
127
+ * Billing address and contact details.
128
+ * Includes details about changes when relevant.
129
+ * @internal
130
+ */
131
+ billingDetails?: BillingDetails;
132
+ /**
133
+ * Order business location
134
+ * Includes details about changes when relevant.
135
+ */
136
+ businessLocationDetails?: BusinessLocationDetails;
137
+ }
138
+ export interface ItemDetails extends ItemDetailsChangeTypeOneOf {
139
+ /** Whether the line item was added as part of the draft. */
140
+ added?: boolean;
141
+ /** Line item fields before the change. */
142
+ changedDetails?: ItemChangedDetails;
143
+ /** Whether the line item was removed as part of the draft. */
144
+ removed?: boolean;
145
+ /** Line item details after applied changes. */
146
+ lineItem?: OrderLineItem;
147
+ }
148
+ /** @oneof */
149
+ export interface ItemDetailsChangeTypeOneOf {
150
+ /** Whether the line item was added as part of the draft. */
151
+ added?: boolean;
152
+ /** Line item fields before the change. */
153
+ changedDetails?: ItemChangedDetails;
154
+ /** Whether the line item was removed as part of the draft. */
155
+ removed?: boolean;
156
+ }
157
+ export interface Price {
158
+ /**
159
+ * Amount.
160
+ * @decimalValue options { gte:0, lte:1000000000000000 }
161
+ */
162
+ amount?: string;
163
+ /**
164
+ * Amount formatted with currency symbol.
165
+ * @readonly
166
+ */
167
+ formattedAmount?: string;
168
+ }
169
+ export interface PriceDescription {
170
+ /**
171
+ * __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).
172
+ * @minLength 1
173
+ * @maxLength 100
174
+ */
175
+ original?: string;
176
+ /**
177
+ * Price description translated into the buyer's language.
178
+ *
179
+ * Default: Same as `original`.
180
+ * @minLength 1
181
+ * @maxLength 100
182
+ */
183
+ translated?: string | null;
184
+ }
185
+ export interface OrderLineItem {
186
+ /**
187
+ * Line item ID.
188
+ * @immutable
189
+ */
190
+ _id?: string;
191
+ /**
192
+ * Item name.
193
+ * + Stores - `product.name`
194
+ * + Bookings - `service.info.name`
195
+ * + Events - `ticket.name`
196
+ */
197
+ productName?: ProductName;
198
+ /**
199
+ * References to the line item's origin catalog.
200
+ * This field may be empty in the case of a custom line item.
201
+ */
202
+ catalogReference?: CatalogReference;
203
+ /**
204
+ * Line item quantity.
205
+ * @min 1
206
+ * @max 100000
207
+ */
208
+ quantity?: number;
209
+ /**
210
+ * Total discount for this line item's entire quantity.
211
+ * @readonly
212
+ */
213
+ totalDiscount?: Price;
214
+ /**
215
+ * Line item description lines. Used for display purposes for the cart, checkout and order.
216
+ * @maxSize 20
217
+ */
218
+ descriptionLines?: DescriptionLine[];
219
+ /** Line item image. */
220
+ image?: string;
221
+ /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */
222
+ physicalProperties?: PhysicalProperties;
223
+ /** Item type. Either a preset type or custom. */
224
+ itemType?: ItemType;
225
+ /**
226
+ * Fulfiller ID. Field is empty when the line item is self-fulfilled.
227
+ * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order).
228
+ * @format GUID
229
+ */
230
+ fulfillerId?: string | null;
231
+ /**
232
+ * Number of items that were refunded.
233
+ * @max 100000
234
+ */
235
+ refundQuantity?: number | null;
236
+ /**
237
+ * Number of items restocked.
238
+ * @max 100000
239
+ */
240
+ restockQuantity?: number | null;
241
+ /** Line item price after line item discounts for display purposes. */
242
+ price?: Price;
243
+ /**
244
+ * Line item price before line item discounts for display purposes. Defaults to `price` when not provided.
245
+ * @readonly
246
+ */
247
+ priceBeforeDiscounts?: Price;
248
+ /**
249
+ * Total price after discounts, and before tax.
250
+ * @readonly
251
+ */
252
+ totalPriceBeforeTax?: Price;
253
+ /**
254
+ * Total price after all discounts and tax.
255
+ * @readonly
256
+ */
257
+ totalPriceAfterTax?: Price;
258
+ /**
259
+ * Type of selected payment option for current item.
260
+ *
261
+ * Default: `FULL_PAYMENT_ONLINE`
262
+ */
263
+ paymentOption?: PaymentOptionType;
264
+ /**
265
+ * Deprecated. Use `taxInfo` instead.
266
+ * This field will be removed on September 30, 2024.
267
+ * Tax details for this line item.
268
+ * @deprecated Deprecated. Use `taxInfo` instead.
269
+ * This field will be removed on September 30, 2024.
270
+ * Tax details for this line item.
271
+ * @replacedBy tax_info
272
+ * @targetRemovalDate 2024-09-30
273
+ */
274
+ taxDetails?: ItemTaxFullDetails;
275
+ /** Represents all the relevant tax details for a specific line item. */
276
+ taxInfo?: LineItemTaxInfo;
277
+ /** Digital file identifier, relevant only for items with type DIGITAL. */
278
+ digitalFile?: DigitalFile;
279
+ /** Subscription info. */
280
+ subscriptionInfo?: SubscriptionInfo;
281
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
282
+ priceDescription?: PriceDescription;
283
+ /**
284
+ * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`.
285
+ * @readonly
286
+ */
287
+ depositAmount?: Price;
288
+ /**
289
+ * Line item locations.
290
+ *
291
+ * The location's total quantity must not exceed the line item quantity.
292
+ * @maxSize 5
293
+ */
294
+ locations?: LocationAndQuantity[];
295
+ /**
296
+ * Address used for tax calculation.
297
+ * @internal
298
+ */
299
+ taxableAddress?: TaxableAddress;
300
+ /**
301
+ * ID of the app managing the inventory.
302
+ * @internal
303
+ * @format GUID
304
+ */
305
+ inventoryAppId?: string | null;
306
+ /**
307
+ * Custom extended fields for the line item object.
308
+ *
309
+ * [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.
310
+ */
311
+ extendedFields?: ExtendedFields;
312
+ }
313
+ export interface ProductName {
314
+ /**
315
+ * __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).
316
+ *
317
+ * Min: 1 character.
318
+ * Max: 200 characters.
319
+ * @minLength 1
320
+ * @maxLength 200
321
+ */
322
+ original?: string;
323
+ /**
324
+ * Item name translated into the buyer's language.
325
+ *
326
+ * Min: 1 character.
327
+ * Max: 400 characters.
328
+ * Default: Same as `original`.
329
+ * @minLength 1
330
+ * @maxLength 400
331
+ */
332
+ translated?: string | null;
333
+ }
334
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
335
+ export interface CatalogReference {
336
+ /**
337
+ * ID of the item within the catalog it belongs to.
338
+ * @minLength 1
339
+ * @maxLength 36
340
+ */
341
+ catalogItemId?: string;
342
+ /**
343
+ * ID of the app providing the catalog.
344
+ *
345
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
346
+ *
347
+ * For items from Wix catalogs, the following values always apply:
348
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
349
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
350
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
351
+ * @minLength 1
352
+ */
353
+ appId?: string;
354
+ /**
355
+ * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
356
+ *
357
+ * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
358
+ */
359
+ options?: Record<string, any> | null;
360
+ }
361
+ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
362
+ /** Description line plain text value. */
363
+ plainText?: PlainTextValue;
364
+ /** Description line color value. */
365
+ colorInfo?: Color;
366
+ /** Description line name. */
367
+ name?: DescriptionLineName;
368
+ }
369
+ /** @oneof */
370
+ export interface DescriptionLineValueOneOf {
371
+ /** Description line plain text value. */
372
+ plainText?: PlainTextValue;
373
+ /** Description line color value. */
374
+ colorInfo?: Color;
375
+ }
376
+ /** @oneof */
377
+ export interface DescriptionLineDescriptionLineValueOneOf {
378
+ }
379
+ export interface DescriptionLineName {
380
+ /**
381
+ * 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).
382
+ * @maxLength 100
383
+ */
384
+ original?: string;
385
+ /**
386
+ * Description line name translated into the buyer's language.
387
+ *
388
+ * Default: Same as `original`.
389
+ * @maxLength 200
390
+ */
391
+ translated?: string | null;
392
+ }
393
+ export interface PlainTextValue {
394
+ /**
395
+ * 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).
396
+ * @maxLength 600
397
+ */
398
+ original?: string;
399
+ /**
400
+ * Description line plain text value translated into the buyer's language.
401
+ *
402
+ * Default: Same as `original`.
403
+ * @maxLength 600
404
+ */
405
+ translated?: string | null;
406
+ }
407
+ export interface Color {
408
+ /**
409
+ * 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).
410
+ * @maxLength 500
411
+ */
412
+ original?: string;
413
+ /**
414
+ * Description line color name translated into the buyer's language.
415
+ *
416
+ * Default: Same as `original`.
417
+ * @maxLength 500
418
+ */
419
+ translated?: string | null;
420
+ /** HEX or RGB color code for display. */
421
+ code?: string | null;
422
+ }
423
+ export declare enum DescriptionLineType {
424
+ /** Unrecognized type. */
425
+ UNRECOGNISED = "UNRECOGNISED",
426
+ /** Plain text type. */
427
+ PLAIN_TEXT = "PLAIN_TEXT",
428
+ /** Color type. */
429
+ COLOR = "COLOR"
430
+ }
431
+ export interface FocalPoint {
432
+ /** X-coordinate of the focal point. */
433
+ x?: number;
434
+ /** Y-coordinate of the focal point. */
435
+ y?: number;
436
+ /** crop by height */
437
+ height?: number | null;
438
+ /** crop by width */
439
+ width?: number | null;
440
+ }
441
+ export interface PhysicalProperties {
442
+ /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
443
+ weight?: number | null;
444
+ /**
445
+ * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
446
+ * @maxLength 40
447
+ */
448
+ sku?: string | null;
449
+ /** Whether this line item is shippable. */
450
+ shippable?: boolean;
451
+ }
452
+ export interface ItemType extends ItemTypeItemTypeDataOneOf {
453
+ /** Preset item type. */
454
+ preset?: ItemTypeItemType;
455
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
456
+ custom?: string;
457
+ }
458
+ /** @oneof */
459
+ export interface ItemTypeItemTypeDataOneOf {
460
+ /** Preset item type. */
461
+ preset?: ItemTypeItemType;
462
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
463
+ custom?: string;
464
+ }
465
+ export declare enum ItemTypeItemType {
466
+ UNRECOGNISED = "UNRECOGNISED",
467
+ PHYSICAL = "PHYSICAL",
468
+ DIGITAL = "DIGITAL",
469
+ GIFT_CARD = "GIFT_CARD",
470
+ SERVICE = "SERVICE"
471
+ }
472
+ /** Type of selected payment option for catalog item */
473
+ export declare enum PaymentOptionType {
474
+ /** The entire payment for this item happens as part of the checkout. */
475
+ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
476
+ /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
477
+ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
478
+ /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
479
+ MEMBERSHIP = "MEMBERSHIP",
480
+ /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
481
+ DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
482
+ /** 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`. */
483
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
484
+ }
485
+ export interface ItemTaxFullDetails {
486
+ /** Taxable amount of this line item. */
487
+ taxableAmount?: Price;
488
+ /**
489
+ * Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`.
490
+ * @decimalValue options { gte:0, maxScale:6 }
491
+ */
492
+ taxRate?: string;
493
+ /** The calculated tax, based on the `taxableAmount` and `taxRate`. */
494
+ totalTax?: Price;
495
+ }
496
+ export interface LineItemTaxInfo {
497
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
498
+ taxAmount?: Price;
499
+ /** Amount for which tax is calculated. */
500
+ taxableAmount?: Price;
501
+ /**
502
+ * Tax rate %, as a decimal point.
503
+ * @format DECIMAL_VALUE
504
+ * @decimalValue options { gte:0, maxScale:6 }
505
+ */
506
+ taxRate?: string | null;
507
+ /**
508
+ * Tax group ID.
509
+ * @format GUID
510
+ */
511
+ taxGroupId?: string | null;
512
+ /** Indicates whether the price already includes tax. */
513
+ taxIncludedInPrice?: boolean;
514
+ /**
515
+ * Tax information for a line item.
516
+ * @maxSize 7
517
+ */
518
+ taxBreakdown?: LineItemTaxBreakdown[];
519
+ }
520
+ /**
521
+ * TaxBreakdown represents tax information for a line item.
522
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
523
+ */
524
+ export interface LineItemTaxBreakdown {
525
+ /**
526
+ * Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec".
527
+ * @maxLength 200
528
+ */
529
+ jurisdiction?: string | null;
530
+ /**
531
+ * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000.
532
+ * @format DECIMAL_VALUE
533
+ * @decimalValue options { gte:0, maxScale:6 }
534
+ */
535
+ rate?: string | null;
536
+ /** Amount of tax calculated for this line item. */
537
+ taxAmount?: Price;
538
+ /**
539
+ * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
540
+ * @maxLength 200
541
+ */
542
+ taxType?: string | null;
543
+ /**
544
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
545
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
546
+ * @maxLength 200
547
+ */
548
+ taxName?: string | null;
549
+ /** Type of jurisdiction that taxes were calculated for. */
550
+ jurisdictionType?: JurisdictionType;
551
+ /** Non-taxable amount of the line item price. */
552
+ nonTaxableAmount?: Price;
553
+ /** Taxable amount of the line item price. */
554
+ taxableAmount?: Price;
555
+ }
556
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
557
+ export declare enum JurisdictionType {
558
+ UNDEFINED = "UNDEFINED",
559
+ COUNTRY = "COUNTRY",
560
+ STATE = "STATE",
561
+ COUNTY = "COUNTY",
562
+ CITY = "CITY",
563
+ SPECIAL = "SPECIAL"
564
+ }
565
+ export interface DigitalFile {
566
+ /**
567
+ * ID of the secure file in media.
568
+ * @minLength 1
569
+ * @maxLength 100
570
+ */
571
+ fileId?: string;
572
+ /**
573
+ * Link will exist after the digital links have been generated on the order.
574
+ * @format WEB_URL
575
+ * @minLength 1
576
+ * @maxLength 2000
577
+ */
578
+ link?: string | null;
579
+ /**
580
+ * Link expiration time and date.
581
+ * @readonly
582
+ */
583
+ expirationDate?: Date | null;
584
+ }
585
+ export interface SubscriptionInfo {
586
+ /**
587
+ * Subscription ID.
588
+ * @format GUID
589
+ */
590
+ _id?: string | null;
591
+ /**
592
+ * Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`.
593
+ * @min 1
594
+ */
595
+ cycleNumber?: number;
596
+ /**
597
+ * Subscription option title. For example, `"Monthly coffee Subscription"`.
598
+ * @maxLength 20
599
+ * @deprecated Subscription option title. For example, `"Monthly coffee Subscription"`.
600
+ * @replacedBy title
601
+ * @targetRemovalDate 2025-10-01
602
+ */
603
+ subscriptionOptionTitle?: string;
604
+ /**
605
+ * Subscription title. For example, `"Monthly coffee Subscription"`.
606
+ * @internal
607
+ */
608
+ title?: SubscriptionTitle;
609
+ /**
610
+ * Subscription option description. For example, `"1kg of selected coffee, once a month"`.
611
+ * @maxLength 60
612
+ * @deprecated Subscription option description. For example, `"1kg of selected coffee, once a month"`.
613
+ * @replacedBy description
614
+ * @targetRemovalDate 2025-10-01
615
+ */
616
+ subscriptionOptionDescription?: string | null;
617
+ /**
618
+ * Subscription description. For example, `"1kg of selected coffee, once a month"`.
619
+ * @internal
620
+ */
621
+ description?: SubscriptionDescription;
622
+ /**
623
+ * Subscription detailed information.
624
+ * @immutable
625
+ */
626
+ subscriptionSettings?: SubscriptionSettings;
627
+ /**
628
+ * Description of the charges that will be applied for subscription.
629
+ * @internal
630
+ * @maxLength 1000
631
+ */
632
+ chargesDescription?: string | null;
633
+ /**
634
+ * Details of the billing adjustment applied to the current subscription cycle due to a shift in the subscription’s billing date.
635
+ * @internal
636
+ */
637
+ billingAdjustment?: BillingAdjustment;
638
+ }
639
+ export interface SubscriptionTitle {
640
+ /**
641
+ * 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).
642
+ * @minLength 1
643
+ * @maxLength 150
644
+ */
645
+ original?: string;
646
+ /**
647
+ * Subscription option name translated into the buyer's language.
648
+ *
649
+ * Default: Same as `original`.
650
+ * @minLength 1
651
+ * @maxLength 150
652
+ */
653
+ translated?: string | null;
654
+ }
655
+ export interface SubscriptionDescription {
656
+ /**
657
+ * Subscription option description.
658
+ * @maxLength 500
659
+ */
660
+ original?: string;
661
+ /**
662
+ * Translated subscription option description.
663
+ * @maxLength 500
664
+ */
665
+ translated?: string | null;
666
+ }
667
+ export interface SubscriptionSettings {
668
+ /** Frequency of recurring payment. */
669
+ frequency?: SubscriptionFrequency;
670
+ /**
671
+ * Interval of recurring payment.
672
+ * @min 1
673
+ * @max 50
674
+ */
675
+ interval?: number | null;
676
+ /** Whether subscription is renewed automatically at the end of each period. */
677
+ autoRenewal?: boolean;
678
+ /**
679
+ * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
680
+ * @min 1
681
+ */
682
+ billingCycles?: number | null;
683
+ /**
684
+ * Whether to allow the customer to cancel the subscription.
685
+ * @internal
686
+ */
687
+ enableCustomerCancellation?: boolean;
688
+ /**
689
+ * Period until first cycle starts. If None => no free trial
690
+ * @internal
691
+ */
692
+ freeTrialPeriod?: FreeTrialPeriod;
693
+ /**
694
+ * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.
695
+ * @internal
696
+ */
697
+ startDate?: Date | null;
698
+ }
699
+ /** Frequency unit of recurring payment */
700
+ export declare enum SubscriptionFrequency {
701
+ UNDEFINED = "UNDEFINED",
702
+ DAY = "DAY",
703
+ WEEK = "WEEK",
704
+ MONTH = "MONTH",
705
+ YEAR = "YEAR"
706
+ }
707
+ export interface FreeTrialPeriod {
708
+ /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
709
+ frequency?: SubscriptionFrequency;
710
+ /**
711
+ * interval of period
712
+ * @min 1
713
+ * @max 999
714
+ */
715
+ interval?: number;
716
+ }
717
+ export interface BillingAdjustment {
718
+ /** The type of adjustment. */
719
+ type?: AdjustmentType;
720
+ /** Summary of the prorated adjustment amount. */
721
+ priceSummary?: BillingAdjustmentPriceSummary;
722
+ }
723
+ export declare enum AdjustmentType {
724
+ UNKNOWN_ADJUSTMENT_TYPE = "UNKNOWN_ADJUSTMENT_TYPE",
725
+ /** Adjustment increases the total amount due to changes like covering extra billing days. Typically results in an additional fee. */
726
+ EXTRA_CHARGE = "EXTRA_CHARGE",
727
+ /** Adjustment reduces the total amount due to changes like covering fewer billing days. Typically results in a credit or discount. */
728
+ CREDIT = "CREDIT"
729
+ }
730
+ export interface BillingAdjustmentPriceSummary {
731
+ /** Subtotal of adjustment, before tax. */
732
+ subtotal?: Price;
733
+ /** Tax on adjustment. */
734
+ tax?: Price;
735
+ /** Total price after tax. */
736
+ total?: Price;
737
+ }
738
+ export interface LocationAndQuantity {
739
+ /**
740
+ * Location id in the associated owner app.
741
+ * @format GUID
742
+ */
743
+ _id?: string;
744
+ /**
745
+ * Location owner app, if not provided then the site business info locations will be used.
746
+ * @format GUID
747
+ * @deprecated Location owner app, if not provided then the site business info locations will be used.
748
+ * @targetRemovalDate 2025-03-01
749
+ */
750
+ appId?: string | null;
751
+ /**
752
+ * Quantity for specific location.
753
+ * @min 1
754
+ * @max 100000
755
+ */
756
+ quantity?: number;
757
+ /**
758
+ * Location name.
759
+ * @maxLength 500
760
+ * @readonly
761
+ */
762
+ name?: string | null;
763
+ }
764
+ export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
765
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
766
+ addressType?: TaxableAddressType;
767
+ }
768
+ /** @oneof */
769
+ export interface TaxableAddressTaxableAddressDataOneOf {
770
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
771
+ addressType?: TaxableAddressType;
772
+ }
773
+ export declare enum TaxableAddressType {
774
+ UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
775
+ BUSINESS = "BUSINESS",
776
+ BILLING = "BILLING",
777
+ SHIPPING = "SHIPPING"
778
+ }
779
+ export interface ExtendedFields {
780
+ /**
781
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
782
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
783
+ *
784
+ * You can only access fields for which you have the appropriate permissions.
785
+ *
786
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
787
+ */
788
+ namespaces?: Record<string, Record<string, any>>;
789
+ }
790
+ export interface ItemChangedDetails {
791
+ /**
792
+ * Line item quantity before change.
793
+ * @min 1
794
+ * @max 1000000
795
+ */
796
+ quantityBeforeChange?: number | null;
797
+ /** Line item price before change. */
798
+ priceBeforeChange?: Price;
799
+ /** Line item price description before change. */
800
+ priceDescriptionBeforeChange?: PriceDescription;
801
+ }
802
+ export interface ShippingDetails extends ShippingDetailsChangeTypeOneOf {
803
+ /** Whether shipping info was added as part of the draft. */
804
+ added?: boolean;
805
+ /** Shipping info before the change. */
806
+ changedDetails?: ShippingChangedDetails;
807
+ /** Whether shipping info was removed as part of the draft. */
808
+ removed?: boolean;
809
+ /** Selected Shipping details. */
810
+ shippingInfo?: V1ShippingInformation;
811
+ }
812
+ /** @oneof */
813
+ export interface ShippingDetailsChangeTypeOneOf {
814
+ /** Whether shipping info was added as part of the draft. */
815
+ added?: boolean;
816
+ /** Shipping info before the change. */
817
+ changedDetails?: ShippingChangedDetails;
818
+ /** Whether shipping info was removed as part of the draft. */
819
+ removed?: boolean;
820
+ }
821
+ export interface V1ShippingInformation {
822
+ /**
823
+ * App Def Id of external provider which was a source of shipping info
824
+ * @minLength 1
825
+ * @maxLength 100
826
+ */
827
+ carrierId?: string | null;
828
+ /**
829
+ * Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`.
830
+ * @minLength 1
831
+ * @maxLength 100
832
+ */
833
+ code?: string | null;
834
+ /**
835
+ * Shipping option title.
836
+ * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
837
+ * @maxLength 250
838
+ */
839
+ title?: string;
840
+ /** Shipping logistics. */
841
+ logistics?: V1DeliveryLogistics;
842
+ /** Shipping costs. */
843
+ cost?: V1ShippingPrice;
844
+ /** Shipping region. */
845
+ region?: ShippingRegion;
846
+ }
847
+ export interface V1DeliveryLogistics extends V1DeliveryLogisticsAddressOneOf {
848
+ /** Shipping address and contact details. */
849
+ shippingDestination?: AddressWithContact;
850
+ /** Pickup details. */
851
+ pickupDetails?: V1PickupDetails;
852
+ /**
853
+ * Expected delivery time in free text. For example, `"3-5 business days"`.
854
+ * @maxLength 500
855
+ */
856
+ deliveryTime?: string | null;
857
+ /**
858
+ * Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`.
859
+ * @maxLength 1000
860
+ */
861
+ instructions?: string | null;
862
+ /**
863
+ * Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
864
+ * @deprecated
865
+ */
866
+ deliverByDate?: Date | null;
867
+ /** Expected delivery time. */
868
+ deliveryTimeSlot?: V1DeliveryTimeSlot;
869
+ }
870
+ /** @oneof */
871
+ export interface V1DeliveryLogisticsAddressOneOf {
872
+ /** Shipping address and contact details. */
873
+ shippingDestination?: AddressWithContact;
874
+ /** Pickup details. */
875
+ pickupDetails?: V1PickupDetails;
876
+ }
877
+ /** Billing Info and shipping details */
878
+ export interface AddressWithContact {
879
+ /** Address. */
880
+ address?: Address;
881
+ /** Contact details. */
882
+ contactDetails?: FullAddressContactDetails;
883
+ }
884
+ /** Physical address */
885
+ export interface Address {
886
+ /**
887
+ * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
888
+ * @format COUNTRY
889
+ */
890
+ country?: string | null;
891
+ /**
892
+ * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
893
+ * @maxLength 50
894
+ */
895
+ subdivision?: string | null;
896
+ /**
897
+ * City name.
898
+ * @maxLength 50
899
+ */
900
+ city?: string | null;
901
+ /**
902
+ * Postal or zip code.
903
+ * @maxLength 50
904
+ */
905
+ postalCode?: string | null;
906
+ /** Street address. */
907
+ streetAddress?: StreetAddress;
908
+ /**
909
+ * Main address line (usually street name and number).
910
+ * @maxLength 150
911
+ */
912
+ addressLine1?: string | null;
913
+ /**
914
+ * Free text providing more detailed address info. Usually contains apt, suite, floor.
915
+ * @maxLength 100
916
+ */
917
+ addressLine2?: string | null;
918
+ /**
919
+ * Country's full name.
920
+ * @readonly
921
+ */
922
+ countryFullname?: string | null;
923
+ /**
924
+ * Subdivision full-name.
925
+ * @readonly
926
+ */
927
+ subdivisionFullname?: string | null;
928
+ }
929
+ export interface StreetAddress {
930
+ /** Street number. */
931
+ number?: string;
932
+ /** Street name. */
933
+ name?: string;
934
+ }
935
+ export interface AddressLocation {
936
+ /** Address latitude. */
937
+ latitude?: number | null;
938
+ /** Address longitude. */
939
+ longitude?: number | null;
940
+ }
941
+ /** Full contact details for an address */
942
+ export interface FullAddressContactDetails {
943
+ /**
944
+ * First name.
945
+ * @maxLength 100
946
+ */
947
+ firstName?: string | null;
948
+ /**
949
+ * Last name.
950
+ * @maxLength 100
951
+ */
952
+ lastName?: string | null;
953
+ /**
954
+ * Phone number.
955
+ * @format PHONE
956
+ */
957
+ phone?: string | null;
958
+ /**
959
+ * Company name.
960
+ * @maxLength 1000
961
+ */
962
+ company?: string | null;
963
+ /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
964
+ vatId?: VatId;
965
+ }
966
+ export interface VatId {
967
+ /** Customer's tax ID. */
968
+ _id?: string;
969
+ /**
970
+ * Tax type.
971
+ *
972
+ * Supported values:
973
+ * + `CPF`: for individual tax payers
974
+ * + `CNPJ`: for corporations
975
+ */
976
+ type?: VatType;
977
+ }
978
+ /** tax info types */
979
+ export declare enum VatType {
980
+ UNSPECIFIED = "UNSPECIFIED",
981
+ /** CPF - for individual tax payers. */
982
+ CPF = "CPF",
983
+ /** CNPJ - for corporations */
984
+ CNPJ = "CNPJ"
985
+ }
986
+ export interface V1PickupDetails {
987
+ /** Pickup address. */
988
+ address?: PickupAddress;
989
+ /** Pickup method */
990
+ pickupMethod?: PickupDetailsPickupMethod;
991
+ }
992
+ /** Physical address */
993
+ export interface PickupAddress {
994
+ /**
995
+ * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
996
+ * @format COUNTRY
997
+ */
998
+ country?: string | null;
999
+ /**
1000
+ * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
1001
+ * @maxLength 50
1002
+ */
1003
+ subdivision?: string | null;
1004
+ /**
1005
+ * City name.
1006
+ * @maxLength 1000
1007
+ */
1008
+ city?: string | null;
1009
+ /**
1010
+ * Postal or zip code.
1011
+ * @maxLength 1000
1012
+ */
1013
+ postalCode?: string | null;
1014
+ /** Street address object, with number, name, and apartment number in separate fields. */
1015
+ streetAddress?: StreetAddress;
1016
+ /**
1017
+ * Main address line (usually street name and number).
1018
+ * @maxLength 1000
1019
+ */
1020
+ addressLine1?: string | null;
1021
+ /**
1022
+ * Free text providing more detailed address info. Usually contains apt, suite, floor.
1023
+ * @maxLength 1000
1024
+ */
1025
+ addressLine2?: string | null;
1026
+ /**
1027
+ * Country's full name.
1028
+ * @readonly
1029
+ */
1030
+ countryFullname?: string | null;
1031
+ /**
1032
+ * Subdivision full-name.
1033
+ * @readonly
1034
+ */
1035
+ subdivisionFullname?: string | null;
1036
+ }
1037
+ export declare enum PickupDetailsPickupMethod {
1038
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
1039
+ STORE_PICKUP = "STORE_PICKUP",
1040
+ PICKUP_POINT = "PICKUP_POINT"
1041
+ }
1042
+ export interface V1DeliveryTimeSlot {
1043
+ /** Delivery slot starting time. */
1044
+ from?: Date | null;
1045
+ /** Delivery slot ending time. */
1046
+ to?: Date | null;
1047
+ }
1048
+ export interface V1ShippingPrice {
1049
+ /** Shipping price for display purposes. */
1050
+ price?: Price;
1051
+ /**
1052
+ * Total price of shipping after discounts (when relevant), and before tax.
1053
+ * @readonly
1054
+ */
1055
+ totalPriceBeforeTax?: Price;
1056
+ /**
1057
+ * Shipping price after all discounts (if any exist), and after tax.
1058
+ * @readonly
1059
+ */
1060
+ totalPriceAfterTax?: Price;
1061
+ /** Tax details. */
1062
+ taxDetails?: ItemTaxFullDetails;
1063
+ /**
1064
+ * Shipping discount before tax.
1065
+ * @readonly
1066
+ */
1067
+ discount?: Price;
1068
+ }
1069
+ export interface ShippingRegion {
1070
+ /**
1071
+ * Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
1072
+ * @maxLength 100
1073
+ */
1074
+ name?: string | null;
1075
+ }
1076
+ export interface ShippingChangedDetails {
1077
+ /** Shipping info before the change. */
1078
+ shippingInfoBeforeChange?: V1ShippingInformation;
1079
+ }
1080
+ /** Buyer Info */
1081
+ export interface BuyerInfo extends BuyerInfoIdOneOf {
1082
+ /**
1083
+ * Visitor ID (if site visitor is not a member).
1084
+ * @format GUID
1085
+ */
1086
+ visitorId?: string;
1087
+ /**
1088
+ * Member ID (if site visitor is a site member).
1089
+ * @format GUID
1090
+ */
1091
+ memberId?: string;
1092
+ /**
1093
+ * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).
1094
+ * @format GUID
1095
+ */
1096
+ contactId?: string | null;
1097
+ /**
1098
+ * Buyer email address.
1099
+ * @format EMAIL
1100
+ */
1101
+ email?: string | null;
1102
+ }
1103
+ /** @oneof */
1104
+ export interface BuyerInfoIdOneOf {
1105
+ /**
1106
+ * Visitor ID (if site visitor is not a member).
1107
+ * @format GUID
1108
+ */
1109
+ visitorId?: string;
1110
+ /**
1111
+ * Member ID (if site visitor is a site member).
1112
+ * @format GUID
1113
+ */
1114
+ memberId?: string;
1115
+ }
1116
+ export interface AdditionalFeeDetails {
1117
+ /** Additional fee. */
1118
+ additionalFee?: AdditionalFee;
1119
+ /** Tax details related to the additional fee. */
1120
+ taxDetails?: TaxDetails;
1121
+ /**
1122
+ * Source of the additional fee.
1123
+ *
1124
+ * Supported values:
1125
+ * + `ORIGINAL_ORDER`: This additional fee is part of the original order.
1126
+ * + `CUSTOM`: This additional fee was created by the [Create Custom Additional Fees](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/draft-orders/create-custom-additional-fees) API.
1127
+ */
1128
+ source?: SourceType;
1129
+ /** Whether this additional fee is applied to the order. */
1130
+ applied?: boolean;
1131
+ }
1132
+ export interface AdditionalFee {
1133
+ /**
1134
+ * Additional fee's unique code for future processing.
1135
+ * @minLength 1
1136
+ * @maxLength 100
1137
+ */
1138
+ code?: string | null;
1139
+ /**
1140
+ * Name of additional fee.
1141
+ * @minLength 1
1142
+ * @maxLength 50
1143
+ */
1144
+ name?: string;
1145
+ /** Additional fee's price. */
1146
+ price?: Price;
1147
+ /** Tax details. */
1148
+ taxDetails?: ItemTaxFullDetails;
1149
+ /**
1150
+ * SPI implementer's `appId`.
1151
+ * @format GUID
1152
+ */
1153
+ providerAppId?: string | null;
1154
+ /** Additional fee's price before tax. */
1155
+ priceBeforeTax?: Price;
1156
+ /** Additional fee's price after tax. */
1157
+ priceAfterTax?: Price;
1158
+ /**
1159
+ * Additional fee's id.
1160
+ * @format GUID
1161
+ * @immutable
1162
+ */
1163
+ _id?: string;
1164
+ /**
1165
+ * Optional - Line items associated with this additional fee.
1166
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
1167
+ * @format GUID
1168
+ */
1169
+ lineItemIds?: string[];
1170
+ /**
1171
+ * Number of subscription billing cycles the additional fee applies to.
1172
+ * If None and additional fee is linked to subscription line item, it applies to all cycles.
1173
+ * @internal
1174
+ * @min 1
1175
+ * @max 999
1176
+ */
1177
+ subscriptionCycles?: number | null;
1178
+ }
1179
+ export interface TaxDetails {
1180
+ /** Indication if additional fee is taxable or not */
1181
+ taxable?: boolean;
1182
+ /**
1183
+ * Optional tax group ID to use when calculating tax for this additional fee
1184
+ * @format GUID
1185
+ */
1186
+ taxGroupId?: string | null;
1187
+ }
1188
+ export declare enum SourceType {
1189
+ /** Part of the original order */
1190
+ ORIGINAL_ORDER = "ORIGINAL_ORDER",
1191
+ /** Added by estimate * */
1192
+ AUTOMATIC = "AUTOMATIC",
1193
+ /** Added manually to current draft order */
1194
+ CUSTOM = "CUSTOM"
1195
+ }
1196
+ export interface DiscountDetails {
1197
+ /** Discount details. */
1198
+ discount?: AppliedDiscount;
1199
+ /**
1200
+ * Source of the discount.
1201
+ *
1202
+ * Supported values:
1203
+ * + `ORIGINAL_ORDER`: This discount is part of the original order.
1204
+ * + `CUSTOM`: This discount was created by the [Create Custom Discounts](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/draft-orders/create-custom-discounts) API.
1205
+ */
1206
+ source?: SourceType;
1207
+ /** Whether this discount is applied to the order. */
1208
+ applied?: boolean;
1209
+ }
1210
+ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1211
+ /** Applied coupon info. */
1212
+ coupon?: Coupon;
1213
+ /** Merchant discount. */
1214
+ merchantDiscount?: MerchantDiscount;
1215
+ /** Automatic Discount */
1216
+ discountRule?: DiscountRule;
1217
+ /**
1218
+ * Discount type.
1219
+ * * `"GLOBAL"` - discount applies to entire order.
1220
+ * * `"SPECIFIC-ITEMS"` - discount applies to specific items.
1221
+ * * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
1222
+ */
1223
+ discountType?: AppliedDiscountDiscountType;
1224
+ /**
1225
+ * IDs of line items discount applies to.
1226
+ * Deprecated. Use `line_item_discounts` instead.
1227
+ * @format GUID
1228
+ * @maxSize 1
1229
+ * @deprecated IDs of line items discount applies to.
1230
+ * Deprecated. Use `line_item_discounts` instead.
1231
+ * @replacedBy line_item_discounts
1232
+ * @targetRemovalDate 2024-10-30
1233
+ */
1234
+ lineItemIds?: string[];
1235
+ /**
1236
+ * Discount id.
1237
+ * @format GUID
1238
+ * @immutable
1239
+ */
1240
+ _id?: string | null;
1241
+ /**
1242
+ * Number of subscription billing cycles the discount applies to.
1243
+ * If None and discount is linked to subscription line item, it applies to all cycles.
1244
+ * @internal
1245
+ * @min 1
1246
+ * @max 999
1247
+ */
1248
+ subscriptionCycles?: number | null;
1249
+ }
1250
+ /** @oneof */
1251
+ export interface AppliedDiscountDiscountSourceOneOf {
1252
+ /** Applied coupon info. */
1253
+ coupon?: Coupon;
1254
+ /** Merchant discount. */
1255
+ merchantDiscount?: MerchantDiscount;
1256
+ /** Automatic Discount */
1257
+ discountRule?: DiscountRule;
1258
+ }
1259
+ export declare enum AppliedDiscountDiscountType {
1260
+ GLOBAL = "GLOBAL",
1261
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
1262
+ SHIPPING = "SHIPPING"
1263
+ }
1264
+ /** Coupon */
1265
+ export interface Coupon {
1266
+ /** Coupon ID. */
1267
+ _id?: string;
1268
+ /** Coupon code. */
1269
+ code?: string;
1270
+ /** Coupon name. */
1271
+ name?: string;
1272
+ /** Coupon value. */
1273
+ amount?: Price;
1274
+ }
1275
+ export interface MerchantDiscount extends MerchantDiscountMerchantDiscountReasonOneOf {
1276
+ /**
1277
+ * Pre-defined discount reason (optional).
1278
+ * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
1279
+ */
1280
+ discountReason?: DiscountReason;
1281
+ /**
1282
+ * Discount description as free text (optional).
1283
+ * @maxLength 200
1284
+ */
1285
+ description?: string | null;
1286
+ /** Discount amount. */
1287
+ amount?: Price;
1288
+ /**
1289
+ * Discount percentage.
1290
+ * @internal
1291
+ * @format DECIMAL_VALUE
1292
+ * @decimalValue options { gte:0, lte:100, maxScale:2 }
1293
+ */
1294
+ percentage?: string | null;
1295
+ }
1296
+ /** @oneof */
1297
+ export interface MerchantDiscountMerchantDiscountReasonOneOf {
1298
+ /**
1299
+ * Pre-defined discount reason (optional).
1300
+ * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
1301
+ */
1302
+ discountReason?: DiscountReason;
1303
+ /**
1304
+ * Discount description as free text (optional).
1305
+ * @maxLength 200
1306
+ */
1307
+ description?: string | null;
1308
+ }
1309
+ export declare enum DiscountReason {
1310
+ UNSPECIFIED = "UNSPECIFIED",
1311
+ EXCHANGED_ITEMS = "EXCHANGED_ITEMS",
1312
+ BILLING_ADJUSTMENT = "BILLING_ADJUSTMENT"
1313
+ }
1314
+ export interface DiscountRule {
1315
+ /**
1316
+ * Discount rule ID
1317
+ * @format GUID
1318
+ */
1319
+ _id?: string;
1320
+ /** Discount rule name */
1321
+ name?: DiscountRuleName;
1322
+ /** Discount value. */
1323
+ amount?: Price;
1324
+ }
1325
+ export interface DiscountRuleName {
1326
+ /**
1327
+ * Original discount rule name (in site's default language).
1328
+ * @minLength 1
1329
+ * @maxLength 256
1330
+ */
1331
+ original?: string;
1332
+ /**
1333
+ * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
1334
+ * @minLength 1
1335
+ * @maxLength 500
1336
+ */
1337
+ translated?: string | null;
1338
+ }
1339
+ export interface LineItemDiscount {
1340
+ /**
1341
+ * ID of line item the discount applies to.
1342
+ * @format GUID
1343
+ */
1344
+ _id?: string;
1345
+ /** Total discount for this line item. */
1346
+ totalDiscount?: Price;
1347
+ }
1348
+ export interface CreatedBy extends CreatedByStringOneOf {
1349
+ /**
1350
+ * User ID. When the draft order was created by a Wix user.
1351
+ * @format GUID
1352
+ */
1353
+ userId?: string;
1354
+ /**
1355
+ * App ID. When the draft order was created by an app.
1356
+ * @format GUID
1357
+ */
1358
+ appId?: string;
1359
+ }
1360
+ /** @oneof */
1361
+ export interface CreatedByStringOneOf {
1362
+ /**
1363
+ * User ID. When the draft order was created by a Wix user.
1364
+ * @format GUID
1365
+ */
1366
+ userId?: string;
1367
+ /**
1368
+ * App ID. When the draft order was created by an app.
1369
+ * @format GUID
1370
+ */
1371
+ appId?: string;
1372
+ }
1373
+ export declare enum EditingStatus {
1374
+ /** DraftOrder is in draft state. */
1375
+ DRAFT = "DRAFT",
1376
+ /** DraftOrder is in committed state. */
1377
+ COMMITTED = "COMMITTED"
1378
+ }
1379
+ export declare enum WeightUnit {
1380
+ /** Weight unit can't be classified due to an error. */
1381
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
1382
+ /** Kilograms. */
1383
+ KG = "KG",
1384
+ /** Pounds. */
1385
+ LB = "LB"
1386
+ }
1387
+ export interface PriceSummary {
1388
+ /** Subtotal of all the line items, before discounts and before tax. */
1389
+ subtotal?: Price;
1390
+ /** Total shipping price, before discounts and before tax. */
1391
+ shipping?: Price;
1392
+ /** Total tax on this order. */
1393
+ tax?: Price;
1394
+ /** Total calculated discount value. */
1395
+ discount?: Price;
1396
+ /** Order’s total price after discounts and tax. */
1397
+ total?: Price;
1398
+ /** Total price of additional fees before tax. */
1399
+ totalAdditionalFees?: Price;
1400
+ }
1401
+ export interface TaxSummary {
1402
+ /**
1403
+ * Total tax.
1404
+ * @readonly
1405
+ */
1406
+ totalTax?: Price;
1407
+ }
1408
+ export interface BalanceSummary {
1409
+ /**
1410
+ * Amount left to pay for order to be considered paid.
1411
+ * @readonly
1412
+ */
1413
+ balance?: Balance;
1414
+ /**
1415
+ * Sum of all authorized payments.
1416
+ * @readonly
1417
+ */
1418
+ authorized?: Price;
1419
+ }
1420
+ /**
1421
+ * Order balance. Reflects amount left to be paid on order and is calculated dynamically. Can be negative per balance definition.
1422
+ * `amount` field depends on order payment status:
1423
+ * + UNSPECIFIED, NOT_PAID: price_summary.total_price
1424
+ * + PARTIALLY_PAID : price_summary.total_price - pay_now.total_price
1425
+ * + PENDING, REFUNDED, PARTIALLY_REFUNDED, PAID : 0
1426
+ */
1427
+ export interface Balance {
1428
+ /**
1429
+ * Balance amount.
1430
+ *
1431
+ * A negative `amount` represents the amount to be refunded. This can happen due to overcharging or the order being modified after a payment has been made.
1432
+ * @decimalValue options { }
1433
+ * @readonly
1434
+ */
1435
+ amount?: string;
1436
+ /**
1437
+ * Amount formatted with currency symbol.
1438
+ * @readonly
1439
+ */
1440
+ formattedAmount?: string;
1441
+ }
1442
+ /** Side-effects upon committing a draft order. */
1443
+ export interface DraftOrderCommitSettings {
1444
+ /**
1445
+ * Whether to send notifications to the buyer.
1446
+ *
1447
+ * Default: `true`
1448
+ */
1449
+ sendNotificationsToBuyer?: boolean | null;
1450
+ /**
1451
+ * Whether to send notifications to the business.
1452
+ *
1453
+ * Default: `true`
1454
+ */
1455
+ sendNotificationsToBusiness?: boolean | null;
1456
+ /**
1457
+ * Whether to add activities to the order.
1458
+ *
1459
+ * Default: `true`
1460
+ */
1461
+ addActivitiesToOrder?: boolean | null;
1462
+ /**
1463
+ * Whether to send email notifications to custom fulfillers when there is a change in the shippable items they fulfill.
1464
+ *
1465
+ * Default: `true`
1466
+ */
1467
+ sendNotificationsToCustomFulfillers?: boolean | null;
1468
+ /**
1469
+ * Line item IDs for which to perform an inventory change.
1470
+ * When not provided, inventory will not change.
1471
+ * @maxSize 300
1472
+ */
1473
+ updateInventory?: InventoryUpdate[];
1474
+ }
1475
+ export interface InventoryUpdate {
1476
+ /**
1477
+ * Line item ID.
1478
+ * @format GUID
1479
+ */
1480
+ lineItemId?: string;
1481
+ }
1482
+ export interface RecipientInfoDetails extends RecipientInfoDetailsChangeTypeOneOf {
1483
+ /** Indicates that recipient information was added during draft. */
1484
+ added?: boolean;
1485
+ /** Indicates that recipient information was changed. Contains recipient information before draft. */
1486
+ changedDetails?: RecipientInfoChangedDetails;
1487
+ /** Indicates that recipient information was removed during draft. */
1488
+ removed?: boolean;
1489
+ /** Order recipient address and contact details. */
1490
+ recipientInfo?: AddressWithContact;
1491
+ }
1492
+ /** @oneof */
1493
+ export interface RecipientInfoDetailsChangeTypeOneOf {
1494
+ /** Indicates that recipient information was added during draft. */
1495
+ added?: boolean;
1496
+ /** Indicates that recipient information was changed. Contains recipient information before draft. */
1497
+ changedDetails?: RecipientInfoChangedDetails;
1498
+ /** Indicates that recipient information was removed during draft. */
1499
+ removed?: boolean;
1500
+ }
1501
+ export interface RecipientInfoChangedDetails {
1502
+ /** Order recipient address and contact details before draft. */
1503
+ recipientInfoBeforeChange?: AddressWithContact;
1504
+ }
1505
+ export interface OrderTaxInfo {
1506
+ /** Calculated tax, added from line items. */
1507
+ totalTax?: Price;
1508
+ /**
1509
+ * 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.
1510
+ * @maxSize 50
1511
+ */
1512
+ taxBreakdown?: OrderTaxBreakdown[];
1513
+ /**
1514
+ * Whether the order is exempt from tax calculations.
1515
+ *
1516
+ * Default: `false`
1517
+ * @readonly
1518
+ */
1519
+ taxExempt?: boolean | null;
1520
+ }
1521
+ /**
1522
+ * 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.
1523
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
1524
+ */
1525
+ export interface OrderTaxBreakdown {
1526
+ /**
1527
+ * The name of the tax against which this tax amount was calculated.
1528
+ * @maxLength 200
1529
+ */
1530
+ taxName?: string;
1531
+ /**
1532
+ * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
1533
+ * @maxLength 200
1534
+ */
1535
+ taxType?: string;
1536
+ /**
1537
+ * The name of the jurisdiction in which this tax detail applies.
1538
+ * @maxLength 200
1539
+ */
1540
+ jurisdiction?: string;
1541
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
1542
+ jurisdictionType?: JurisdictionType;
1543
+ /**
1544
+ * The rate at which this tax detail was calculated.
1545
+ * @format DECIMAL_VALUE
1546
+ * @decimalValue options { gte:0, maxScale:6 }
1547
+ */
1548
+ rate?: string;
1549
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
1550
+ aggregatedTaxAmount?: Price;
1551
+ }
1552
+ export interface BuyerDetails extends BuyerDetailsChangeTypeOneOf {
1553
+ /**
1554
+ * Indicates that buyer information was added during draft.
1555
+ * @internal
1556
+ */
1557
+ added?: boolean;
1558
+ /**
1559
+ * Indicates that buyer information was changed. Contains billing information before draft.
1560
+ * @internal
1561
+ */
1562
+ changedDetails?: BuyerChangedDetails;
1563
+ /**
1564
+ * Indicates that buyer information was removed during draft.
1565
+ * @internal
1566
+ */
1567
+ removed?: boolean;
1568
+ /**
1569
+ * Buyer information.
1570
+ * @internal
1571
+ */
1572
+ buyerInfo?: BuyerInfo;
1573
+ }
1574
+ /** @oneof */
1575
+ export interface BuyerDetailsChangeTypeOneOf {
1576
+ /**
1577
+ * Indicates that buyer information was added during draft.
1578
+ * @internal
1579
+ */
1580
+ added?: boolean;
1581
+ /**
1582
+ * Indicates that buyer information was changed. Contains billing information before draft.
1583
+ * @internal
1584
+ */
1585
+ changedDetails?: BuyerChangedDetails;
1586
+ /**
1587
+ * Indicates that buyer information was removed during draft.
1588
+ * @internal
1589
+ */
1590
+ removed?: boolean;
1591
+ }
1592
+ export interface BuyerChangedDetails {
1593
+ /**
1594
+ * Buyer information before draft.
1595
+ * @internal
1596
+ */
1597
+ buyerInfoBeforeChange?: BuyerInfo;
1598
+ }
1599
+ export interface BillingDetails extends BillingDetailsChangeTypeOneOf {
1600
+ /**
1601
+ * Indicates that billing information was added during draft.
1602
+ * @internal
1603
+ */
1604
+ added?: boolean;
1605
+ /**
1606
+ * Indicates that billing information was changed. Contains billing information before draft.
1607
+ * @internal
1608
+ */
1609
+ changedDetails?: BillingChangedDetails;
1610
+ /**
1611
+ * Indicates that billing information was removed during draft.
1612
+ * @internal
1613
+ */
1614
+ removed?: boolean;
1615
+ /**
1616
+ * Billing address and contact details.
1617
+ * @internal
1618
+ */
1619
+ billingInfo?: AddressWithContact;
1620
+ }
1621
+ /** @oneof */
1622
+ export interface BillingDetailsChangeTypeOneOf {
1623
+ /**
1624
+ * Indicates that billing information was added during draft.
1625
+ * @internal
1626
+ */
1627
+ added?: boolean;
1628
+ /**
1629
+ * Indicates that billing information was changed. Contains billing information before draft.
1630
+ * @internal
1631
+ */
1632
+ changedDetails?: BillingChangedDetails;
1633
+ /**
1634
+ * Indicates that billing information was removed during draft.
1635
+ * @internal
1636
+ */
1637
+ removed?: boolean;
1638
+ }
1639
+ export interface BillingChangedDetails {
1640
+ /**
1641
+ * Billing address and contact details before draft.
1642
+ * @internal
1643
+ */
1644
+ billingInfoBeforeChange?: AddressWithContact;
1645
+ }
1646
+ export interface BusinessLocationDetails extends BusinessLocationDetailsChangeTypeOneOf {
1647
+ /** Indicates that business location was added during draft. */
1648
+ added?: boolean;
1649
+ /** Indicates that business location was changed. Contains business location before draft. */
1650
+ changedDetails?: BusinessLocationChangedDetails;
1651
+ /** Indicates that business location was removed during draft. */
1652
+ removed?: boolean;
1653
+ /** Business location. */
1654
+ businessLocation?: Location;
1655
+ }
1656
+ /** @oneof */
1657
+ export interface BusinessLocationDetailsChangeTypeOneOf {
1658
+ /** Indicates that business location was added during draft. */
1659
+ added?: boolean;
1660
+ /** Indicates that business location was changed. Contains business location before draft. */
1661
+ changedDetails?: BusinessLocationChangedDetails;
1662
+ /** Indicates that business location was removed during draft. */
1663
+ removed?: boolean;
1664
+ }
1665
+ export interface Location {
1666
+ /**
1667
+ * Location ID.
1668
+ * Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
1669
+ * @format GUID
1670
+ */
1671
+ _id?: string;
1672
+ /**
1673
+ * Location name.
1674
+ * @minLength 1
1675
+ * @maxLength 500
1676
+ * @readonly
1677
+ */
1678
+ name?: string;
1679
+ }
1680
+ export interface BusinessLocationChangedDetails {
1681
+ /** Business location before draft. */
1682
+ businessLocationBeforeChange?: Location;
1683
+ }
1684
+ export interface CreateDraftOrderRequest {
1685
+ /**
1686
+ * To create a draft from existing order, provide its id. Otherwise, an empty draft will be created.
1687
+ * @format GUID
1688
+ */
1689
+ orderId: string | null;
1690
+ }
1691
+ export interface CreateDraftOrderResponse {
1692
+ /** The draft order details calculated with latest content */
1693
+ calculatedDraftOrder?: CalculatedDraftOrder;
1694
+ /**
1695
+ * Whether the draft order already exists.
1696
+ * @internal
1697
+ */
1698
+ preexistingDraftOrder?: boolean | null;
1699
+ }
1700
+ export interface CalculatedDraftOrder {
1701
+ /**
1702
+ * The draft order full details with calculations based on it's content.
1703
+ * Discount and additional fee options are also included.
1704
+ */
1705
+ draftOrder?: DraftOrder;
1706
+ /** Shipping options for the order. */
1707
+ shippingOptions?: ShippingOption[];
1708
+ /** Errors that occurred during calculation. */
1709
+ calculationErrors?: CalculationErrors;
1710
+ }
1711
+ export interface ShippingOption {
1712
+ /**
1713
+ * This carrier's unique ID
1714
+ * @format GUID
1715
+ */
1716
+ carrierId?: string | null;
1717
+ /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */
1718
+ code?: string;
1719
+ /** Shipping rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. */
1720
+ title?: string;
1721
+ /** Shipping logistics. */
1722
+ logistics?: DeliveryLogistics;
1723
+ /** Shipping cost. */
1724
+ cost?: ShippingPrice;
1725
+ }
1726
+ export interface DeliveryLogistics {
1727
+ /** When the item is expected to be delivered in free text, e.g "3-5 business days" */
1728
+ deliveryTime?: string | null;
1729
+ /** Instructions for caller, e.g for pickup: "Ensure to come during Opening Hours, and please don't park in disabled-spot" */
1730
+ instructions?: string | null;
1731
+ /** Additional pickup details if it's a pickup */
1732
+ pickupDetails?: PickupDetails;
1733
+ /** Expected delivery time slot (from and to time stamps representation) */
1734
+ deliveryTimeSlot?: DeliveryTimeSlot;
1735
+ }
1736
+ export interface PickupDetails {
1737
+ /** Pickup address */
1738
+ address?: Address;
1739
+ /**
1740
+ * Pickup method.
1741
+ *
1742
+ * Supported values:
1743
+ * + `"STORE_PICKUP"`
1744
+ * + `"PICKUP_POINT"`
1745
+ */
1746
+ pickupMethod?: PickupMethod;
1747
+ }
1748
+ export declare enum PickupMethod {
1749
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
1750
+ STORE_PICKUP = "STORE_PICKUP",
1751
+ PICKUP_POINT = "PICKUP_POINT"
1752
+ }
1753
+ export interface DeliveryTimeSlot {
1754
+ /** starting time of the delivery time slot */
1755
+ from?: Date | null;
1756
+ /** ending time of the delivery time slot */
1757
+ to?: Date | null;
1758
+ }
1759
+ export interface ShippingPrice {
1760
+ /** The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
1761
+ price?: Price;
1762
+ /**
1763
+ * Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function.
1764
+ * @format CURRENCY
1765
+ */
1766
+ currency?: string;
1767
+ }
1768
+ export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1769
+ /** General shipping calculation error. */
1770
+ generalShippingCalculationError?: Details;
1771
+ /** Carrier errors. */
1772
+ carrierErrors?: CarrierErrors;
1773
+ /** Tax calculation error. */
1774
+ taxCalculationError?: Details;
1775
+ /** Order validation errors. */
1776
+ orderValidationErrors?: ApplicationError[];
1777
+ }
1778
+ /** @oneof */
1779
+ export interface CalculationErrorsShippingCalculationErrorOneOf {
1780
+ /** General shipping calculation error. */
1781
+ generalShippingCalculationError?: Details;
1782
+ /** Carrier errors. */
1783
+ carrierErrors?: CarrierErrors;
1784
+ }
1785
+ export interface Details extends DetailsKindOneOf {
1786
+ applicationError?: ApplicationError;
1787
+ validationError?: ValidationError;
1788
+ systemError?: SystemError;
1789
+ /**
1790
+ * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
1791
+ * @deprecated
1792
+ */
1793
+ tracing?: Record<string, string>;
1794
+ }
1795
+ /** @oneof */
1796
+ export interface DetailsKindOneOf {
1797
+ applicationError?: ApplicationError;
1798
+ validationError?: ValidationError;
1799
+ systemError?: SystemError;
1800
+ }
1801
+ export interface ApplicationError {
1802
+ /** Error code. */
1803
+ code?: string;
1804
+ /** Description of the error. */
1805
+ description?: string;
1806
+ /** Data related to the error. */
1807
+ data?: Record<string, any> | null;
1808
+ }
1809
+ /**
1810
+ * example result:
1811
+ * {
1812
+ * "fieldViolations": [
1813
+ * {
1814
+ * "field": "fieldA",
1815
+ * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
1816
+ * "violatedRule": "OTHER",
1817
+ * "ruleName": "INVALID_NOTE",
1818
+ * "data": {
1819
+ * "value": "FI"
1820
+ * }
1821
+ * },
1822
+ * {
1823
+ * "field": "fieldB",
1824
+ * "description": "field value out of range. supported range: [0-20]",
1825
+ * "violatedRule": "MAX",
1826
+ * "data": {
1827
+ * "threshold": 20
1828
+ * }
1829
+ * },
1830
+ * {
1831
+ * "field": "fieldC",
1832
+ * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
1833
+ * "violatedRule": "FORMAT",
1834
+ * "data": {
1835
+ * "type": "PHONE"
1836
+ * }
1837
+ * }
1838
+ * ]
1839
+ * }
1840
+ */
1841
+ export interface ValidationError {
1842
+ fieldViolations?: FieldViolation[];
1843
+ }
1844
+ export declare enum RuleType {
1845
+ VALIDATION = "VALIDATION",
1846
+ OTHER = "OTHER",
1847
+ MAX = "MAX",
1848
+ MIN = "MIN",
1849
+ MAX_LENGTH = "MAX_LENGTH",
1850
+ MIN_LENGTH = "MIN_LENGTH",
1851
+ MAX_SIZE = "MAX_SIZE",
1852
+ MIN_SIZE = "MIN_SIZE",
1853
+ FORMAT = "FORMAT",
1854
+ DECIMAL_LTE = "DECIMAL_LTE",
1855
+ DECIMAL_GTE = "DECIMAL_GTE",
1856
+ DECIMAL_LT = "DECIMAL_LT",
1857
+ DECIMAL_GT = "DECIMAL_GT",
1858
+ DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
1859
+ INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
1860
+ REQUIRED_FIELD = "REQUIRED_FIELD",
1861
+ FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
1862
+ ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
1863
+ EXACT_LENGTH = "EXACT_LENGTH",
1864
+ EXACT_SIZE = "EXACT_SIZE",
1865
+ REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1866
+ }
1867
+ export interface FieldViolation {
1868
+ field?: string;
1869
+ description?: string;
1870
+ violatedRule?: RuleType;
1871
+ /** applicable when violated_rule=OTHER */
1872
+ ruleName?: string | null;
1873
+ data?: Record<string, any> | null;
1874
+ }
1875
+ export interface SystemError {
1876
+ /** Error code. */
1877
+ errorCode?: string | null;
1878
+ }
1879
+ export interface CarrierErrors {
1880
+ /** Carrier errors. */
1881
+ errors?: CarrierError[];
1882
+ }
1883
+ export interface CarrierError {
1884
+ /** Carrier ID. */
1885
+ carrierId?: string;
1886
+ /** Error details. */
1887
+ error?: Details;
1888
+ }
1889
+ export interface CreateEmptyDraftOrderRequest {
1890
+ }
1891
+ export interface CreateEmptyDraftOrderResponse {
1892
+ /** The draft order details calculated with latest content */
1893
+ calculatedDraftOrder?: CalculatedDraftOrder;
1894
+ }
1895
+ export interface AddLineItemsToDraftOrderRequest {
1896
+ /**
1897
+ * The draft order id
1898
+ * @format GUID
1899
+ */
1900
+ draftOrderId: string;
1901
+ /**
1902
+ * Catalog line items to add to draft order.
1903
+ * @maxSize 300
1904
+ */
1905
+ catalogLineItems?: CatalogReferenceLineItem[];
1906
+ /**
1907
+ * Custom line items to add to draft order. Custom line items don't trigger the Catalog service plugin.
1908
+ * @maxSize 300
1909
+ */
1910
+ customLineItems?: CustomLineItem[];
1911
+ }
1912
+ export interface CatalogReferenceLineItem {
1913
+ /** 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. */
1914
+ catalogReference?: CatalogReference;
1915
+ /**
1916
+ * Item quantity.
1917
+ * @min 1
1918
+ * @max 100000
1919
+ */
1920
+ quantity?: number;
1921
+ /** Item price override. */
1922
+ price?: Price;
1923
+ /**
1924
+ * Line item locations.
1925
+ *
1926
+ * The location's total quantity must not exceed the line item quantity.
1927
+ * @maxSize 5
1928
+ */
1929
+ locations?: LocationAndQuantity[];
1930
+ }
1931
+ export interface CustomLineItem {
1932
+ /**
1933
+ * Line item ID.
1934
+ * @format GUID
1935
+ */
1936
+ _id?: string | null;
1937
+ /**
1938
+ * Item quantity.
1939
+ *
1940
+ * Min: `"1"`
1941
+ * Max: `"100000"`
1942
+ * @min 1
1943
+ * @max 100000
1944
+ */
1945
+ quantity?: number;
1946
+ /** 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. */
1947
+ catalogReference?: CatalogReference;
1948
+ /**
1949
+ * Item name.
1950
+ * + Stores - `product.name`
1951
+ * + Bookings - `service.info.name`
1952
+ * + Events - `ticket.name`
1953
+ */
1954
+ productName?: ProductName;
1955
+ /** URL to the item's page on the site. */
1956
+ url?: string;
1957
+ /** Item price **after** catalog-defined discount and line item discounts. */
1958
+ price?: Price;
1959
+ /** Total line item price **after** catalog-defined discount and line item discounts. */
1960
+ lineItemPrice?: Price;
1961
+ /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
1962
+ fullPrice?: Price;
1963
+ /** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */
1964
+ priceBeforeDiscounts?: Price;
1965
+ /** Line item description lines. Used for display purposes for order. */
1966
+ descriptionLines?: DescriptionLine[];
1967
+ /** Line item image details. */
1968
+ media?: string;
1969
+ /** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */
1970
+ physicalProperties?: PhysicalProperties;
1971
+ /** Item type. Either a preset type or custom. */
1972
+ itemType?: ItemType;
1973
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
1974
+ priceDescription?: PriceDescription;
1975
+ /**
1976
+ * Delivery Profile Id for the product
1977
+ * @format GUID
1978
+ */
1979
+ deliveryProfileId?: string | null;
1980
+ /**
1981
+ * Line item locations.
1982
+ *
1983
+ * The location's total quantity must not exceed the line item quantity.
1984
+ * @maxSize 5
1985
+ */
1986
+ locations?: LocationAndQuantity[];
1987
+ }
1988
+ export interface SecuredMedia {
1989
+ /**
1990
+ * Media ID in Wix Media Manager.
1991
+ * @minLength 1
1992
+ * @maxLength 100
1993
+ */
1994
+ _id?: string;
1995
+ /**
1996
+ * Original filename.
1997
+ * @minLength 1
1998
+ * @maxLength 1000
1999
+ */
2000
+ fileName?: string;
2001
+ /** File type. */
2002
+ fileType?: FileType;
2003
+ }
2004
+ export declare enum FileType {
2005
+ UNSPECIFIED = "UNSPECIFIED",
2006
+ SECURE_PICTURE = "SECURE_PICTURE",
2007
+ SECURE_VIDEO = "SECURE_VIDEO",
2008
+ SECURE_DOCUMENT = "SECURE_DOCUMENT",
2009
+ SECURE_MUSIC = "SECURE_MUSIC",
2010
+ SECURE_ARCHIVE = "SECURE_ARCHIVE"
2011
+ }
2012
+ export interface AddLineItemsToDraftOrderResponse {
2013
+ /** The draft order details calculated with latest content */
2014
+ calculatedDraftOrder?: CalculatedDraftOrder;
2015
+ }
2016
+ export interface UpdateLineItemsRequest {
2017
+ /**
2018
+ * The draft order id
2019
+ * @format GUID
2020
+ */
2021
+ draftOrderId: string;
2022
+ /**
2023
+ * Details of changes to apply per line item
2024
+ * @minSize 1
2025
+ * @maxSize 300
2026
+ */
2027
+ lineItemChanges?: LineItemChangeDetails[];
2028
+ }
2029
+ export interface LineItemChangeDetails {
2030
+ /**
2031
+ * The line item id to change
2032
+ * @format GUID
2033
+ */
2034
+ lineItemId?: string;
2035
+ /**
2036
+ * The new quantity for the line item. quantity zero means to remove the line item.
2037
+ * @max 1000000
2038
+ */
2039
+ newQuantity?: number | null;
2040
+ /**
2041
+ * The new price for 1 unit of the line item
2042
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2043
+ */
2044
+ newPrice?: string | null;
2045
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
2046
+ newPriceDescription?: PriceDescription;
2047
+ }
2048
+ export interface UpdateLineItemsResponse {
2049
+ /** The draft order details calculated with latest content */
2050
+ calculatedDraftOrder?: CalculatedDraftOrder;
2051
+ }
2052
+ export interface SetDiscountsRequest {
2053
+ /**
2054
+ * The draft order id
2055
+ * @format GUID
2056
+ */
2057
+ draftOrderId: string;
2058
+ /**
2059
+ * The discount ids to opt-in. all existing discounts not listed are to be opted-out.
2060
+ * @minSize 1
2061
+ */
2062
+ discounts: IdAndApplied[];
2063
+ }
2064
+ export interface IdAndApplied {
2065
+ /** Discount ID. */
2066
+ _id?: string;
2067
+ /** Whether to apply the discount to the draft order. */
2068
+ applied?: boolean;
2069
+ }
2070
+ export interface SetDiscountsResponse {
2071
+ /** The draft order details calculated with latest content */
2072
+ calculatedDraftOrder?: CalculatedDraftOrder;
2073
+ }
2074
+ export interface CreateCustomDiscountsRequest {
2075
+ /**
2076
+ * The draft order id
2077
+ * @format GUID
2078
+ */
2079
+ draftOrderId: string;
2080
+ /**
2081
+ * The discounts to add.
2082
+ * @minSize 1
2083
+ * @maxSize 100
2084
+ */
2085
+ discounts?: DiscountOption[];
2086
+ }
2087
+ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
2088
+ /**
2089
+ * Discount price amount.
2090
+ * @internal
2091
+ */
2092
+ priceAmount?: Price;
2093
+ /**
2094
+ * Discount percentage amount.
2095
+ * @internal
2096
+ * @format DECIMAL_VALUE
2097
+ * @decimalValue options { gte:0, lte:100, maxScale:2 }
2098
+ */
2099
+ percentage?: string | null;
2100
+ /**
2101
+ * Discount type.
2102
+ * * `"GLOBAL"` - discount applies to entire order.
2103
+ * * `"SPECIFIC-ITEMS"` - discount applies to a specific item.
2104
+ * * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
2105
+ */
2106
+ discountType?: DiscountType;
2107
+ /**
2108
+ * ID of line item discount applies to.
2109
+ * @format GUID
2110
+ * @deprecated ID of line item discount applies to.
2111
+ * @replacedBy line_item_discounts
2112
+ * @targetRemovalDate 2024-10-30
2113
+ */
2114
+ lineItemId?: string | null;
2115
+ /**
2116
+ * Discount amount.
2117
+ * @deprecated Discount amount.
2118
+ * @replacedBy price_amount and percentage
2119
+ * @targetRemovalDate 2024-08-30
2120
+ */
2121
+ amount?: Price;
2122
+ /**
2123
+ * Discount description as free text (optional).
2124
+ * @maxLength 200
2125
+ */
2126
+ description?: string | null;
2127
+ /**
2128
+ * Should opt-in the added discount. default = false.
2129
+ * if not set or false, then to opt-in them, please call SetDiscounts with the added discounts ids
2130
+ */
2131
+ applyToDraftOrder?: boolean | null;
2132
+ }
2133
+ /** @oneof */
2134
+ export interface DiscountOptionDiscountAmountOneOf {
2135
+ /**
2136
+ * Discount price amount.
2137
+ * @internal
2138
+ */
2139
+ priceAmount?: Price;
2140
+ /**
2141
+ * Discount percentage amount.
2142
+ * @internal
2143
+ * @format DECIMAL_VALUE
2144
+ * @decimalValue options { gte:0, lte:100, maxScale:2 }
2145
+ */
2146
+ percentage?: string | null;
2147
+ }
2148
+ export declare enum DiscountType {
2149
+ UNKNOWN_TYPE = "UNKNOWN_TYPE",
2150
+ GLOBAL = "GLOBAL",
2151
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
2152
+ SHIPPING = "SHIPPING"
2153
+ }
2154
+ export interface CreateCustomDiscountsResponse {
2155
+ /** The draft order details with the added discounts */
2156
+ calculatedDraftOrder?: CalculatedDraftOrder;
2157
+ }
2158
+ export interface DeleteCustomDiscountsRequest {
2159
+ /**
2160
+ * The draft order id
2161
+ * @format GUID
2162
+ */
2163
+ draftOrderId: string;
2164
+ /**
2165
+ * The discounts to remove
2166
+ * @format GUID
2167
+ * @minSize 1
2168
+ * @maxSize 100
2169
+ */
2170
+ discountIds: string[];
2171
+ }
2172
+ export interface DeleteCustomDiscountsResponse {
2173
+ /** The draft order details calculated with latest content */
2174
+ calculatedDraftOrder?: CalculatedDraftOrder;
2175
+ }
2176
+ export interface SetAdditionalFeesRequest {
2177
+ /**
2178
+ * The draft order id
2179
+ * @format GUID
2180
+ */
2181
+ draftOrderId: string;
2182
+ /**
2183
+ * The additional fees ids to opt-in. all existing additional fees not listed are to be opted-out
2184
+ * @minSize 1
2185
+ * @maxSize 100
2186
+ */
2187
+ additionalFees: IdAndApplied[];
2188
+ }
2189
+ export interface SetAdditionalFeesResponse {
2190
+ /** The draft order details calculated with modified additional fees */
2191
+ calculatedDraftOrder?: CalculatedDraftOrder;
2192
+ }
2193
+ export interface CreateCustomAdditionalFeesRequest {
2194
+ /**
2195
+ * The draft order id
2196
+ * @format GUID
2197
+ */
2198
+ draftOrderId: string;
2199
+ /**
2200
+ * The additional fees to add. added with opted-out setting
2201
+ * @minSize 1
2202
+ * @maxSize 100
2203
+ */
2204
+ customAdditionalFees?: AdditionalFeeOption[];
2205
+ }
2206
+ export interface AdditionalFeeOption {
2207
+ /**
2208
+ * Translated additional fee's name
2209
+ * @minLength 1
2210
+ * @maxLength 50
2211
+ */
2212
+ name?: string;
2213
+ /** Additional fee's price */
2214
+ price?: Price;
2215
+ /** Tax calculation details */
2216
+ taxDetails?: TaxDetails;
2217
+ /**
2218
+ * Should apply the additional fee. default = false.
2219
+ * if not set or false, then to apply them, please call ApplyAdditionalFees with the added additional fee ids
2220
+ */
2221
+ applyToDraftOrder?: boolean | null;
2222
+ /**
2223
+ * Additional fee's unique code (or ID) for future processing
2224
+ * @minLength 1
2225
+ * @maxLength 100
2226
+ */
2227
+ code?: string | null;
2228
+ }
2229
+ export interface CreateCustomAdditionalFeesResponse {
2230
+ /** The draft order details with added custom additional fees */
2231
+ calculatedDraftOrder?: CalculatedDraftOrder;
2232
+ }
2233
+ export interface DeleteCustomAdditionalFeesRequest {
2234
+ /**
2235
+ * The draft order id
2236
+ * @format GUID
2237
+ */
2238
+ draftOrderId: string;
2239
+ /**
2240
+ * The additional fees to remove
2241
+ * @format GUID
2242
+ * @minSize 1
2243
+ * @maxSize 100
2244
+ */
2245
+ customAdditionalFees: string[];
2246
+ }
2247
+ export interface DeleteCustomAdditionalFeesResponse {
2248
+ /** The draft order details calculated with latest content */
2249
+ calculatedDraftOrder?: CalculatedDraftOrder;
2250
+ }
2251
+ export interface SetShippingInfoRequest {
2252
+ /**
2253
+ * The draft order id
2254
+ * @internal
2255
+ * @format GUID
2256
+ */
2257
+ draftOrderId: string;
2258
+ /**
2259
+ * The shipping info to be set. If passed empty value - value will be reset
2260
+ * @internal
2261
+ */
2262
+ shippingInfo?: V1ShippingInformation;
2263
+ }
2264
+ export interface SetShippingInfoResponse {
2265
+ /**
2266
+ * The draft order details calculated with updated shipping info
2267
+ * @internal
2268
+ */
2269
+ calculatedDraftOrder?: CalculatedDraftOrder;
2270
+ }
2271
+ export interface SetBuyerInfoRequest {
2272
+ /**
2273
+ * The draft order id
2274
+ * @internal
2275
+ * @format GUID
2276
+ */
2277
+ draftOrderId: string;
2278
+ /**
2279
+ * Buyer information. If passed empty value - value will be reset
2280
+ * @internal
2281
+ */
2282
+ buyerInfo?: BuyerInfo;
2283
+ }
2284
+ export interface SetBuyerInfoResponse {
2285
+ /**
2286
+ * The draft order details calculated with updated buyer info
2287
+ * @internal
2288
+ */
2289
+ calculatedDraftOrder?: CalculatedDraftOrder;
2290
+ }
2291
+ export interface SetRecipientInfoRequest {
2292
+ /**
2293
+ * The draft order id
2294
+ * @internal
2295
+ * @format GUID
2296
+ */
2297
+ draftOrderId: string;
2298
+ /**
2299
+ * Order recipient address and contact details. If passed empty value - value will be reset
2300
+ * @internal
2301
+ */
2302
+ recipientInfo?: AddressWithContact;
2303
+ }
2304
+ export interface SetRecipientInfoResponse {
2305
+ /**
2306
+ * The draft order details calculated with updated recipient info
2307
+ * @internal
2308
+ */
2309
+ calculatedDraftOrder?: CalculatedDraftOrder;
2310
+ }
2311
+ export interface SetBillingInfoRequest {
2312
+ /**
2313
+ * The draft order id
2314
+ * @internal
2315
+ * @format GUID
2316
+ */
2317
+ draftOrderId: string;
2318
+ /**
2319
+ * Billing address and contact details. If passed empty value - value will be reset
2320
+ * @internal
2321
+ */
2322
+ billingInfo?: AddressWithContact;
2323
+ }
2324
+ export interface SetBillingInfoResponse {
2325
+ /**
2326
+ * The draft order details calculated with updated billing info
2327
+ * @internal
2328
+ */
2329
+ calculatedDraftOrder?: CalculatedDraftOrder;
2330
+ }
2331
+ export interface UpdateShippingInfoRequest {
2332
+ /**
2333
+ * The draft order id
2334
+ * @format GUID
2335
+ */
2336
+ draftOrderId?: string;
2337
+ /** update the shipping option on the order. if not set then the selected shipping is removed */
2338
+ shippingOption?: ShippingOption;
2339
+ }
2340
+ export interface UpdateShippingInfoResponse {
2341
+ /** The draft order details calculated with de/selected shipping info */
2342
+ calculatedDraftOrder?: CalculatedDraftOrder;
2343
+ }
2344
+ export interface GetDraftOrderRequest {
2345
+ /**
2346
+ * The draft order id
2347
+ * @format GUID
2348
+ */
2349
+ draftOrderId: string;
2350
+ }
2351
+ export interface GetDraftOrderResponse {
2352
+ /** The draft order details calculated with latest content */
2353
+ calculatedDraftOrder?: CalculatedDraftOrder;
2354
+ }
2355
+ export interface GetOrderDraftabilityStatusRequest {
2356
+ /**
2357
+ * Order ID.
2358
+ * @minLength 1
2359
+ * @maxLength 100
2360
+ */
2361
+ orderId: string;
2362
+ }
2363
+ export interface GetOrderDraftabilityStatusResponse {
2364
+ /**
2365
+ * Order ID.
2366
+ * @minLength 1
2367
+ * @maxLength 100
2368
+ */
2369
+ orderId?: string;
2370
+ /** Whether a draft can be created from this order */
2371
+ orderDraftable?: boolean;
2372
+ /**
2373
+ * Reasons why the order is not draftable
2374
+ * @maxSize 5
2375
+ */
2376
+ nonDraftableReasons?: NonDraftableReason[];
2377
+ }
2378
+ export declare enum NonDraftableReason {
2379
+ UNSPECIFIED = "UNSPECIFIED",
2380
+ PARTIALLY_OR_FULLY_REFUNDED = "PARTIALLY_OR_FULLY_REFUNDED",
2381
+ UNSUPPORTED_CHANNEL_TYPE = "UNSUPPORTED_CHANNEL_TYPE",
2382
+ ORDER_STATUS_IS_NOT_SUPPORTED = "ORDER_STATUS_IS_NOT_SUPPORTED",
2383
+ ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT = "ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT",
2384
+ ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT = "ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT",
2385
+ AMOUNTS_DO_NOT_ADD_UP = "AMOUNTS_DO_NOT_ADD_UP",
2386
+ /** remove - this is not a reason, it's an error */
2387
+ ORDER_NOT_FOUND = "ORDER_NOT_FOUND",
2388
+ SUBSCRIPTION_LINE_ITEM_EXISTS = "SUBSCRIPTION_LINE_ITEM_EXISTS",
2389
+ UNSUPPORTED_CATALOG_ITEM = "UNSUPPORTED_CATALOG_ITEM",
2390
+ TAXABLE_EXISTING_ADDITIONAL_FEE = "TAXABLE_EXISTING_ADDITIONAL_FEE"
2391
+ }
2392
+ export interface CommitDraftOrderRequest {
2393
+ /**
2394
+ * The draft order id
2395
+ * @format GUID
2396
+ */
2397
+ draftOrderId: string;
2398
+ /** Optional side effects to trigger */
2399
+ commitSettings?: DraftOrderCommitSettings;
2400
+ /**
2401
+ * Reason for edit, given by user (optional).
2402
+ * @maxLength 200
2403
+ */
2404
+ reason?: string | null;
2405
+ }
2406
+ export interface CommitDraftOrderResponse {
2407
+ /** The draft order after commit. */
2408
+ committedDraftOrder?: DraftOrder;
2409
+ /** The updated order after commit. */
2410
+ orderAfterCommit?: Order;
2411
+ }
2412
+ export interface Order {
2413
+ /**
2414
+ * Order ID.
2415
+ * @format GUID
2416
+ * @readonly
2417
+ */
2418
+ _id?: string | null;
2419
+ /**
2420
+ * Order number displayed in the site owner's dashboard (auto-generated).
2421
+ * @readonly
2422
+ */
2423
+ number?: string;
2424
+ /**
2425
+ * Date and time the order was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
2426
+ * @readonly
2427
+ * @immutable
2428
+ */
2429
+ _createdDate?: Date | null;
2430
+ /**
2431
+ * Date and time the order was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
2432
+ * @readonly
2433
+ */
2434
+ _updatedDate?: Date | null;
2435
+ /**
2436
+ * Order line items.
2437
+ * @minSize 1
2438
+ * @maxSize 300
2439
+ * @readonly
2440
+ */
2441
+ lineItems?: OrderLineItem[];
2442
+ /** Buyer information. */
2443
+ buyerInfo?: BuyerInfo;
2444
+ /** Order payment status. */
2445
+ paymentStatus?: PaymentStatus;
2446
+ /**
2447
+ * Order fulfillment status.
2448
+ * @readonly
2449
+ */
2450
+ fulfillmentStatus?: FulfillmentStatus;
2451
+ /**
2452
+ * Language for communication with the buyer. Defaults to the site language.
2453
+ * For a site that supports multiple languages, this is the language the buyer selected.
2454
+ */
2455
+ buyerLanguage?: string | null;
2456
+ /** Weight measurement unit - defaults to site's weight unit. */
2457
+ weightUnit?: WeightUnit;
2458
+ /**
2459
+ * Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
2460
+ * @format CURRENCY
2461
+ */
2462
+ currency?: string | null;
2463
+ /** Multi-currency information of the order. */
2464
+ currencyConversionDetails?: CurrencyConversionDetails;
2465
+ /**
2466
+ * Whether tax is included in line item prices.
2467
+ * @immutable
2468
+ */
2469
+ taxIncludedInPrices?: boolean;
2470
+ /**
2471
+ * Site language in which original values are shown.
2472
+ * @readonly
2473
+ * @immutable
2474
+ */
2475
+ siteLanguage?: string | null;
2476
+ /**
2477
+ * Order price summary.
2478
+ * @readonly
2479
+ */
2480
+ priceSummary?: PriceSummary;
2481
+ /** Billing address and contact details. */
2482
+ billingInfo?: AddressWithContact;
2483
+ /** Shipping info and selected shipping option details. */
2484
+ shippingInfo?: V1ShippingInformation;
2485
+ /**
2486
+ * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
2487
+ * @maxLength 1000
2488
+ */
2489
+ buyerNote?: string | null;
2490
+ /** Order status. */
2491
+ status?: OrderStatus;
2492
+ /** Whether order is archived. */
2493
+ archived?: boolean | null;
2494
+ /**
2495
+ * Tax summary.
2496
+ * Deprecated. Use `taxInfo` instead.
2497
+ * This field will be removed on September 30, 2024.
2498
+ * @deprecated Tax summary.
2499
+ * Deprecated. Use `taxInfo` instead.
2500
+ * This field will be removed on September 30, 2024.
2501
+ * @replacedBy tax_info
2502
+ * @targetRemovalDate 2024-09-30
2503
+ */
2504
+ taxSummary?: TaxSummary;
2505
+ /** Tax information. */
2506
+ taxInfo?: OrderTaxInfo;
2507
+ /**
2508
+ * Applied discounts.
2509
+ * @maxSize 320
2510
+ */
2511
+ appliedDiscounts?: AppliedDiscount[];
2512
+ /**
2513
+ * Order activities.
2514
+ * @readonly
2515
+ * @maxSize 1000
2516
+ */
2517
+ activities?: Activity[];
2518
+ /** Order attribution source. */
2519
+ attributionSource?: AttributionSource;
2520
+ /**
2521
+ * ID of the order's initiator.
2522
+ * @readonly
2523
+ */
2524
+ createdBy?: V1CreatedBy;
2525
+ /** Information about the sales channel that submitted this order. */
2526
+ channelInfo?: ChannelInfo;
2527
+ /** Whether a human has seen the order. Set when an order is clicked on in the dashboard. */
2528
+ seenByAHuman?: boolean | null;
2529
+ /**
2530
+ * Checkout ID.
2531
+ * @format GUID
2532
+ */
2533
+ checkoutId?: string | null;
2534
+ /** Custom fields. */
2535
+ customFields?: CustomField[];
2536
+ /**
2537
+ * Balance summary.
2538
+ * @readonly
2539
+ */
2540
+ balanceSummary?: V1BalanceSummary;
2541
+ /**
2542
+ * Additional fees applied to the order.
2543
+ * @maxSize 100
2544
+ */
2545
+ additionalFees?: AdditionalFee[];
2546
+ /**
2547
+ * Custom field data for the order object.
2548
+ *
2549
+ * [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.
2550
+ */
2551
+ extendedFields?: ExtendedFields;
2552
+ /**
2553
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
2554
+ * @format GUID
2555
+ */
2556
+ purchaseFlowId?: string | null;
2557
+ /**
2558
+ * Order recipient address and contact details.
2559
+ *
2560
+ * This field may differ from the address in `shippingInfo.logistics` when:
2561
+ * + The chosen shipping option is pickup point or store pickup.
2562
+ * + No shipping option is selected.
2563
+ */
2564
+ recipientInfo?: AddressWithContact;
2565
+ /**
2566
+ * Order tags.
2567
+ *
2568
+ * [Tags](https://dev.wix.com/docs/rest/business-management/tags/introduction) are labels attached to entities, allowing for flexible categorization and data management.
2569
+ */
2570
+ tags?: Tags;
2571
+ /**
2572
+ * Date and time the order was originally purchased in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
2573
+ * Used for migration from external systems.
2574
+ * @immutable
2575
+ */
2576
+ purchasedDate?: Date | null;
2577
+ /** Order Location */
2578
+ businessLocation?: Location;
2579
+ /**
2580
+ * Pay after free trial price summary. Price summary that should be paid for subscriptions after free trial period.
2581
+ * @internal
2582
+ * @readonly
2583
+ */
2584
+ payAfterFreeTrial?: PriceSummary;
2585
+ }
2586
+ export declare enum PaymentStatus {
2587
+ UNSPECIFIED = "UNSPECIFIED",
2588
+ /**
2589
+ * `NOT_PAID` can apply to an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`.
2590
+ * This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`.
2591
+ */
2592
+ NOT_PAID = "NOT_PAID",
2593
+ /** All required payments associated with this order are paid. */
2594
+ PAID = "PAID",
2595
+ /** Order partially refunded, but the refunded amount is less than the order's total price. See `order.balanceSummary` for more details. */
2596
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
2597
+ /** Order fully refunded. Refund amount equals total price. See `order.balanceSummary` for more details. */
2598
+ FULLY_REFUNDED = "FULLY_REFUNDED",
2599
+ /**
2600
+ * All payments pending.
2601
+ *
2602
+ * This can happen with two-step payments, when a payment requires manual review, or when a payment is in progress and will be concluded shortly.
2603
+ * Learn more about [pending orders](https://support.wix.com/en/article/pending-orders).
2604
+ */
2605
+ PENDING = "PENDING",
2606
+ /** At least one payment received and approved, but it covers less than the order's total price. See `order.balanceSummary` for more details. */
2607
+ PARTIALLY_PAID = "PARTIALLY_PAID",
2608
+ /**
2609
+ * Payment received, but not yet confirmed by the payment provider.
2610
+ *
2611
+ * In most cases, when a payment provider is holding payment it's because setup hasn't been successfully completed by the merchant/site owner.
2612
+ * To solve this, the merchant/site owner should log in to the payment provider's dashboard and make sure their account is set up correctly, or contact their support for further assistance.
2613
+ * @documentationMaturity preview
2614
+ */
2615
+ PENDING_MERCHANT = "PENDING_MERCHANT",
2616
+ /**
2617
+ * One or more payments canceled.
2618
+ * @documentationMaturity preview
2619
+ */
2620
+ CANCELED = "CANCELED",
2621
+ /**
2622
+ * One or more payments declined.
2623
+ * @documentationMaturity preview
2624
+ */
2625
+ DECLINED = "DECLINED"
2626
+ }
2627
+ export declare enum FulfillmentStatus {
2628
+ /** None of the order items are fulfilled or the order was manually marked as unfulfilled. */
2629
+ NOT_FULFILLED = "NOT_FULFILLED",
2630
+ /**
2631
+ * All of the order items are fulfilled or the order was manually marked as fulfilled.
2632
+ * Orders without shipping info are fulfilled automatically.
2633
+ */
2634
+ FULFILLED = "FULFILLED",
2635
+ /** Some, but not all, of the order items are fulfilled. */
2636
+ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED"
2637
+ }
2638
+ export interface CurrencyConversionDetails {
2639
+ /**
2640
+ * Original currency used to calculate the pricing before conversion to payment currency set on the order [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
2641
+ * @readonly
2642
+ * @immutable
2643
+ * @format CURRENCY
2644
+ */
2645
+ originalCurrency?: string | null;
2646
+ /**
2647
+ * The rate used when converting from the original currency to the payment currency.
2648
+ * @readonly
2649
+ * @immutable
2650
+ * @decimalValue options { gt:0, lte:1000000000000000 }
2651
+ */
2652
+ conversionRate?: string | null;
2653
+ }
2654
+ export declare enum OrderStatus {
2655
+ /** Order created, but not yet approved or canceled. */
2656
+ INITIALIZED = "INITIALIZED",
2657
+ /**
2658
+ * Order approved.
2659
+ *
2660
+ * This happens when either an online payment is received **or** when `order.priceSummary.total = 0` (a zero-total order).
2661
+ * Offline orders (cash payment) are automatically approved.
2662
+ */
2663
+ APPROVED = "APPROVED",
2664
+ /** Order canceled by the user. */
2665
+ CANCELED = "CANCELED",
2666
+ /**
2667
+ * Order pending.
2668
+ * @documentationMaturity preview
2669
+ */
2670
+ PENDING = "PENDING",
2671
+ /**
2672
+ * Order rejected.
2673
+ *
2674
+ * This happens when pending payments fail.
2675
+ * @documentationMaturity preview
2676
+ */
2677
+ REJECTED = "REJECTED"
2678
+ }
2679
+ export interface Activity extends ActivityContentOneOf {
2680
+ /** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */
2681
+ customActivity?: CustomActivity;
2682
+ /** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */
2683
+ merchantComment?: MerchantComment;
2684
+ /** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */
2685
+ orderRefunded?: OrderRefunded;
2686
+ /**
2687
+ * Details of an initiated refund process.
2688
+ *
2689
+ * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities.
2690
+ * > In these cases, the `refund_id` will be identical across the activities.
2691
+ * @internal
2692
+ */
2693
+ refundInitiated?: RefundInitiated;
2694
+ /**
2695
+ * Details of a refunded payment.
2696
+ *
2697
+ * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities.
2698
+ * > In these cases, the `refund_id` will be identical across the activities.
2699
+ * @internal
2700
+ */
2701
+ paymentRefunded?: PaymentRefunded;
2702
+ /**
2703
+ * Details of a failed payment refund.
2704
+ *
2705
+ * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities.
2706
+ * > In these cases, the `refund_id` will be identical across the activities.
2707
+ * @internal
2708
+ */
2709
+ paymentRefundFailed?: PaymentRefundFailed;
2710
+ /**
2711
+ * Details of refund to store credit.
2712
+ * @internal
2713
+ */
2714
+ refundedAsStoreCredit?: RefundedAsStoreCredit;
2715
+ /**
2716
+ * Details of a pending payment
2717
+ * @internal
2718
+ */
2719
+ paymentPending?: PaymentPending;
2720
+ /**
2721
+ * Details of a canceled payment
2722
+ * @internal
2723
+ */
2724
+ paymentCanceled?: PaymentCanceled;
2725
+ /**
2726
+ * Details of a declined payment
2727
+ * @internal
2728
+ */
2729
+ paymentDeclined?: PaymentDeclined;
2730
+ /**
2731
+ * Receipt was added for associated payment
2732
+ * @internal
2733
+ */
2734
+ receiptCreated?: ReceiptCreated;
2735
+ /**
2736
+ * Receipt sent to customer
2737
+ * @internal
2738
+ */
2739
+ receiptSent?: ReceiptSent;
2740
+ /**
2741
+ * Activity ID.
2742
+ * @format GUID
2743
+ * @readonly
2744
+ */
2745
+ _id?: string | null;
2746
+ /**
2747
+ * Activity author's email.
2748
+ * @format EMAIL
2749
+ * @readonly
2750
+ */
2751
+ authorEmail?: string | null;
2752
+ /**
2753
+ * Activity creation date and time.
2754
+ * @readonly
2755
+ */
2756
+ _createdDate?: Date | null;
2757
+ /** Activity type. */
2758
+ type?: ActivityType;
2759
+ }
2760
+ /** @oneof */
2761
+ export interface ActivityContentOneOf {
2762
+ /** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */
2763
+ customActivity?: CustomActivity;
2764
+ /** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */
2765
+ merchantComment?: MerchantComment;
2766
+ /** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */
2767
+ orderRefunded?: OrderRefunded;
2768
+ /**
2769
+ * Details of an initiated refund process.
2770
+ *
2771
+ * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities.
2772
+ * > In these cases, the `refund_id` will be identical across the activities.
2773
+ * @internal
2774
+ */
2775
+ refundInitiated?: RefundInitiated;
2776
+ /**
2777
+ * Details of a refunded payment.
2778
+ *
2779
+ * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities.
2780
+ * > In these cases, the `refund_id` will be identical across the activities.
2781
+ * @internal
2782
+ */
2783
+ paymentRefunded?: PaymentRefunded;
2784
+ /**
2785
+ * Details of a failed payment refund.
2786
+ *
2787
+ * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities.
2788
+ * > In these cases, the `refund_id` will be identical across the activities.
2789
+ * @internal
2790
+ */
2791
+ paymentRefundFailed?: PaymentRefundFailed;
2792
+ /**
2793
+ * Details of refund to store credit.
2794
+ * @internal
2795
+ */
2796
+ refundedAsStoreCredit?: RefundedAsStoreCredit;
2797
+ /**
2798
+ * Details of a pending payment
2799
+ * @internal
2800
+ */
2801
+ paymentPending?: PaymentPending;
2802
+ /**
2803
+ * Details of a canceled payment
2804
+ * @internal
2805
+ */
2806
+ paymentCanceled?: PaymentCanceled;
2807
+ /**
2808
+ * Details of a declined payment
2809
+ * @internal
2810
+ */
2811
+ paymentDeclined?: PaymentDeclined;
2812
+ /**
2813
+ * Receipt was added for associated payment
2814
+ * @internal
2815
+ */
2816
+ receiptCreated?: ReceiptCreated;
2817
+ /**
2818
+ * Receipt sent to customer
2819
+ * @internal
2820
+ */
2821
+ receiptSent?: ReceiptSent;
2822
+ }
2823
+ export interface CustomActivity {
2824
+ /**
2825
+ * ID of the app that created the custom activity.
2826
+ * @format GUID
2827
+ */
2828
+ appId?: string;
2829
+ /**
2830
+ * Custom activity type. For example, `"Ticket number set"`.
2831
+ * @maxLength 100
2832
+ */
2833
+ type?: string;
2834
+ /** Additional data in key-value form. For example, `{ "Ticket number": "123456" }`. */
2835
+ additionalData?: Record<string, string>;
2836
+ }
2837
+ /** Store owner added a comment */
2838
+ export interface MerchantComment {
2839
+ /**
2840
+ * Merchant comment message.
2841
+ * @minLength 1
2842
+ * @maxLength 5000
2843
+ */
2844
+ message?: string;
2845
+ }
2846
+ export interface OrderRefunded {
2847
+ /** Whether order was refunded manually. For example, via payment provider or using cash. */
2848
+ manual?: boolean;
2849
+ /** Refund amount. */
2850
+ amount?: Price;
2851
+ /**
2852
+ * Reason for refund.
2853
+ * @maxLength 200
2854
+ */
2855
+ reason?: string;
2856
+ }
2857
+ export interface OrderCreatedFromExchange {
2858
+ /**
2859
+ * ID of the original order for which the exchange happened.
2860
+ * @format GUID
2861
+ */
2862
+ originalOrderId?: string;
2863
+ }
2864
+ export interface NewExchangeOrderCreated {
2865
+ /**
2866
+ * ID of the new order created as a result of an exchange of items.
2867
+ * @format GUID
2868
+ */
2869
+ exchangeOrderId?: string;
2870
+ /**
2871
+ * IDs of the items that were exchanged.
2872
+ * @minSize 1
2873
+ * @maxSize 300
2874
+ */
2875
+ lineItems?: LineItemExchangeData[];
2876
+ }
2877
+ export interface LineItemExchangeData {
2878
+ /**
2879
+ * ID of the exchanged line item.
2880
+ * @format GUID
2881
+ */
2882
+ lineItemId?: string;
2883
+ /**
2884
+ * Line item quantity being exchanged.
2885
+ * @min 1
2886
+ * @max 100000
2887
+ */
2888
+ quantity?: number;
2889
+ }
2890
+ export interface DraftOrderChangesApplied {
2891
+ /** Draft order id. */
2892
+ draftOrderId?: string;
2893
+ /**
2894
+ * Reason for edit, given by user (optional).
2895
+ * @maxLength 200
2896
+ */
2897
+ reason?: string | null;
2898
+ /** Changes applied to order. */
2899
+ changes?: OrderChange[];
2900
+ }
2901
+ export interface OrderChange extends OrderChangeValueOneOf {
2902
+ lineItemChanged?: LineItemChanges;
2903
+ lineItemAdded?: ManagedLineItem;
2904
+ lineItemRemoved?: ManagedLineItem;
2905
+ discountAdded?: ManagedDiscount;
2906
+ discountRemoved?: ManagedDiscount;
2907
+ additionalFeeAdded?: ManagedAdditionalFee;
2908
+ additionalFeeRemoved?: ManagedAdditionalFee;
2909
+ totalPriceChanged?: TotalPriceChange;
2910
+ shippingInformationChanged?: ShippingInformationChange;
2911
+ }
2912
+ /** @oneof */
2913
+ export interface OrderChangeValueOneOf {
2914
+ lineItemChanged?: LineItemChanges;
2915
+ lineItemAdded?: ManagedLineItem;
2916
+ lineItemRemoved?: ManagedLineItem;
2917
+ discountAdded?: ManagedDiscount;
2918
+ discountRemoved?: ManagedDiscount;
2919
+ additionalFeeAdded?: ManagedAdditionalFee;
2920
+ additionalFeeRemoved?: ManagedAdditionalFee;
2921
+ totalPriceChanged?: TotalPriceChange;
2922
+ shippingInformationChanged?: ShippingInformationChange;
2923
+ }
2924
+ export interface LineItemChanges {
2925
+ /**
2926
+ * Line item ID.
2927
+ * @format GUID
2928
+ */
2929
+ _id?: string;
2930
+ /** Item name. */
2931
+ name?: ProductName;
2932
+ /** Item quantity change. */
2933
+ quantity?: LineItemQuantityChange;
2934
+ /** Item price change. */
2935
+ price?: LineItemPriceChange;
2936
+ }
2937
+ export interface LineItemQuantityChange {
2938
+ /**
2939
+ * Item quantity before update.
2940
+ * @max 1000000
2941
+ */
2942
+ originalQuantity?: number;
2943
+ /**
2944
+ * Item quantity after update.
2945
+ * @max 1000000
2946
+ */
2947
+ newQuantity?: number;
2948
+ /**
2949
+ * Difference between original and new quantity. Absolute value.
2950
+ * @min 1
2951
+ * @max 1000000
2952
+ */
2953
+ diff?: number;
2954
+ /** Type of quantity change: increase or decrease. */
2955
+ deltaType?: LineItemQuantityChangeType;
2956
+ }
2957
+ export declare enum LineItemQuantityChangeType {
2958
+ /** Quantity increased. */
2959
+ QUANTITY_INCREASED = "QUANTITY_INCREASED",
2960
+ /** Quantity decreased. */
2961
+ QUANTITY_DECREASED = "QUANTITY_DECREASED"
2962
+ }
2963
+ export interface LineItemPriceChange {
2964
+ /** Item price before update. */
2965
+ originalPrice?: Price;
2966
+ /** Item price after update. */
2967
+ newPrice?: Price;
2968
+ }
2969
+ export interface ManagedLineItem {
2970
+ /**
2971
+ * Line item ID.
2972
+ * @format GUID
2973
+ */
2974
+ _id?: string;
2975
+ /** Item name. */
2976
+ name?: ProductName;
2977
+ /**
2978
+ * Added or removed item quantity.
2979
+ * @min 1
2980
+ * @max 1000000
2981
+ */
2982
+ quantity?: number;
2983
+ }
2984
+ export interface ManagedDiscount {
2985
+ /**
2986
+ * Discount id.
2987
+ * @format GUID
2988
+ */
2989
+ _id?: string;
2990
+ /** Discount name: coupon name / discount rule name / merchant discount description. */
2991
+ name?: TranslatedValue;
2992
+ /** Line items discount applies to. */
2993
+ affectedLineItems?: LineItemAmount[];
2994
+ /** Discount amount. */
2995
+ totalAmount?: Price;
2996
+ }
2997
+ export interface TranslatedValue {
2998
+ /**
2999
+ * Value in site default language.
3000
+ * @minLength 1
3001
+ */
3002
+ original?: string;
3003
+ /**
3004
+ * Translated value.
3005
+ * @minLength 1
3006
+ */
3007
+ translated?: string | null;
3008
+ }
3009
+ export interface LineItemAmount {
3010
+ /**
3011
+ * Order line item id
3012
+ * @format GUID
3013
+ */
3014
+ _id?: string;
3015
+ /** Item name. */
3016
+ name?: ProductName;
3017
+ /** Amount associated with this item. (Discount amount for item / additional fee amount for item) */
3018
+ amount?: Price;
3019
+ }
3020
+ export interface ManagedAdditionalFee {
3021
+ /**
3022
+ * Additional fee id.
3023
+ * @format GUID
3024
+ */
3025
+ _id?: string;
3026
+ /** Additional fee name. */
3027
+ name?: TranslatedValue;
3028
+ /** Line items additional fee applies to. */
3029
+ affectedLineItems?: LineItemAmount[];
3030
+ /** Additional fee amount. */
3031
+ totalAmount?: Price;
3032
+ }
3033
+ export interface TotalPriceChange {
3034
+ /** Order’s total price after discounts and tax. Before update */
3035
+ originalTotal?: Price;
3036
+ /** Order’s total price after discounts and tax. After update */
3037
+ newTotal?: Price;
3038
+ }
3039
+ export interface ShippingInformationChange {
3040
+ /** Order’s Shipping Information. Before update */
3041
+ originalShippingInfo?: ShippingInformation;
3042
+ /** Order’s Shipping Information. After update */
3043
+ newShippingInfo?: ShippingInformation;
3044
+ }
3045
+ export interface ShippingInformation {
3046
+ /** Order’s shipping price. */
3047
+ total?: Price;
3048
+ /**
3049
+ * Order’s shipping title.
3050
+ * @maxLength 250
3051
+ */
3052
+ shippingTitle?: string;
3053
+ }
3054
+ /** Payment method is saved for order */
3055
+ export interface SavedPaymentMethod {
3056
+ /**
3057
+ * Payment method name
3058
+ * @minLength 1
3059
+ * @maxLength 100
3060
+ */
3061
+ name?: string;
3062
+ /**
3063
+ * Payment method description
3064
+ * @minLength 1
3065
+ * @maxLength 100
3066
+ */
3067
+ description?: string | null;
3068
+ }
3069
+ export interface AuthorizedPaymentCreated {
3070
+ /**
3071
+ * Payment ID of payment associated with this activity
3072
+ * @format GUID
3073
+ */
3074
+ paymentId?: string;
3075
+ /** Payment amount */
3076
+ amount?: Price;
3077
+ /**
3078
+ * The last 4 digits of the card number.
3079
+ * @maxLength 4
3080
+ */
3081
+ lastFourDigits?: string | null;
3082
+ /**
3083
+ * Card issuer's brand.
3084
+ * @maxLength 100
3085
+ */
3086
+ brand?: string | null;
3087
+ }
3088
+ export interface AuthorizedPaymentCaptured {
3089
+ /**
3090
+ * Payment ID of payment associated with this activity
3091
+ * @format GUID
3092
+ */
3093
+ paymentId?: string;
3094
+ /** Payment amount */
3095
+ amount?: Price;
3096
+ /**
3097
+ * The last 4 digits of the card number.
3098
+ * @maxLength 4
3099
+ */
3100
+ lastFourDigits?: string | null;
3101
+ /**
3102
+ * Card issuer's brand.
3103
+ * @maxLength 100
3104
+ */
3105
+ brand?: string | null;
3106
+ }
3107
+ export interface AuthorizedPaymentVoided {
3108
+ /**
3109
+ * Payment ID of payment associated with this activity
3110
+ * @format GUID
3111
+ */
3112
+ paymentId?: string;
3113
+ /** Payment amount */
3114
+ amount?: Price;
3115
+ /**
3116
+ * The last 4 digits of the card number.
3117
+ * @maxLength 4
3118
+ */
3119
+ lastFourDigits?: string | null;
3120
+ /**
3121
+ * Card issuer's brand.
3122
+ * @maxLength 100
3123
+ */
3124
+ brand?: string | null;
3125
+ }
3126
+ export interface RefundInitiated {
3127
+ /**
3128
+ * Refund ID.
3129
+ * @format GUID
3130
+ */
3131
+ refundId?: string;
3132
+ /** Refund amount. */
3133
+ amount?: Price;
3134
+ /**
3135
+ * Details about the payments being refunded.
3136
+ * @minSize 1
3137
+ * @maxSize 50
3138
+ */
3139
+ payments?: RefundedPayment[];
3140
+ /**
3141
+ * Reason for refund.
3142
+ * @maxLength 100
3143
+ */
3144
+ reason?: string | null;
3145
+ }
3146
+ export interface RefundedPayment extends RefundedPaymentKindOneOf {
3147
+ /** Regular payment refund. */
3148
+ regular?: RegularPaymentRefund;
3149
+ /** Gift card payment refund. */
3150
+ giftCard?: GiftCardPaymentRefund;
3151
+ /** Membership payment refund. */
3152
+ membership?: MembershipPaymentRefund;
3153
+ /**
3154
+ * Payment ID.
3155
+ * @format GUID
3156
+ */
3157
+ paymentId?: string;
3158
+ /** Whether refund was made externally and manually on the payment provider's side. */
3159
+ externalRefund?: boolean;
3160
+ }
3161
+ /** @oneof */
3162
+ export interface RefundedPaymentKindOneOf {
3163
+ /** Regular payment refund. */
3164
+ regular?: RegularPaymentRefund;
3165
+ /** Gift card payment refund. */
3166
+ giftCard?: GiftCardPaymentRefund;
3167
+ /** Membership payment refund. */
3168
+ membership?: MembershipPaymentRefund;
3169
+ }
3170
+ export interface RegularPaymentRefund {
3171
+ /** Refund amount */
3172
+ amount?: Price;
3173
+ /**
3174
+ * The last 4 digits of the card number.
3175
+ * @maxLength 4
3176
+ */
3177
+ lastFourDigits?: string | null;
3178
+ /**
3179
+ * Card issuer's brand.
3180
+ * @maxLength 100
3181
+ */
3182
+ brand?: string | null;
3183
+ }
3184
+ export interface GiftCardPaymentRefund {
3185
+ /**
3186
+ * Gift card payment ID
3187
+ * @minLength 1
3188
+ * @maxLength 100
3189
+ */
3190
+ giftCardPaymentId?: string | null;
3191
+ /** Refund amount */
3192
+ amount?: Price;
3193
+ }
3194
+ export interface MembershipPaymentRefund {
3195
+ /**
3196
+ * Membership ID
3197
+ * @minLength 1
3198
+ * @maxLength 100
3199
+ */
3200
+ membershipId?: string | null;
3201
+ }
3202
+ export interface PaymentRefunded {
3203
+ /**
3204
+ * Refund ID.
3205
+ * @format GUID
3206
+ */
3207
+ refundId?: string;
3208
+ /** Details about the refunded payment. */
3209
+ payment?: RefundedPayment;
3210
+ }
3211
+ export interface PaymentRefundFailed {
3212
+ /**
3213
+ * Refund ID.
3214
+ * @format GUID
3215
+ */
3216
+ refundId?: string;
3217
+ /** Details about the failed payment refund. */
3218
+ payment?: RefundedPayment;
3219
+ }
3220
+ export interface RefundedAsStoreCredit {
3221
+ /** Refund amount */
3222
+ amount?: Price;
3223
+ /**
3224
+ * Reason for refund
3225
+ * @maxLength 100
3226
+ */
3227
+ reason?: string | null;
3228
+ }
3229
+ export interface PaymentPending extends PaymentPendingPaymentDetailsOneOf {
3230
+ /** Regular payment. */
3231
+ regular?: RegularPayment;
3232
+ /**
3233
+ * Payment ID of payment associated with this activity
3234
+ * @format GUID
3235
+ */
3236
+ paymentId?: string;
3237
+ }
3238
+ /** @oneof */
3239
+ export interface PaymentPendingPaymentDetailsOneOf {
3240
+ /** Regular payment. */
3241
+ regular?: RegularPayment;
3242
+ }
3243
+ export interface RegularPayment extends RegularPaymentPaymentMethodDetailsOneOf {
3244
+ /** Whether regular card used */
3245
+ creditCardDetails?: CreditCardDetails;
3246
+ /** Payment amount */
3247
+ amount?: Price;
3248
+ }
3249
+ /** @oneof */
3250
+ export interface RegularPaymentPaymentMethodDetailsOneOf {
3251
+ /** Whether regular card used */
3252
+ creditCardDetails?: CreditCardDetails;
3253
+ }
3254
+ export interface CreditCardDetails {
3255
+ /**
3256
+ * The last 4 digits of the card number.
3257
+ * @maxLength 4
3258
+ */
3259
+ lastFourDigits?: string | null;
3260
+ /**
3261
+ * Card issuer's brand.
3262
+ * @maxLength 100
3263
+ */
3264
+ brand?: string | null;
3265
+ }
3266
+ export interface PaymentCanceled extends PaymentCanceledPaymentDetailsOneOf {
3267
+ /** Regular payment. */
3268
+ regular?: RegularPayment;
3269
+ /**
3270
+ * Payment ID of payment associated with this activity
3271
+ * @format GUID
3272
+ */
3273
+ paymentId?: string;
3274
+ }
3275
+ /** @oneof */
3276
+ export interface PaymentCanceledPaymentDetailsOneOf {
3277
+ /** Regular payment. */
3278
+ regular?: RegularPayment;
3279
+ }
3280
+ export interface PaymentDeclined extends PaymentDeclinedPaymentDetailsOneOf {
3281
+ /** Regular payment. */
3282
+ regular?: RegularPayment;
3283
+ /**
3284
+ * Payment ID of payment associated with this activity
3285
+ * @format GUID
3286
+ */
3287
+ paymentId?: string;
3288
+ }
3289
+ /** @oneof */
3290
+ export interface PaymentDeclinedPaymentDetailsOneOf {
3291
+ /** Regular payment. */
3292
+ regular?: RegularPayment;
3293
+ }
3294
+ export interface ReceiptCreated extends ReceiptCreatedReceiptInfoOneOf {
3295
+ /** Receipt created by Wix */
3296
+ wixReceipt?: WixReceipt;
3297
+ /** Receipt created by an external system. */
3298
+ externalReceipt?: ExternalReceipt;
3299
+ /**
3300
+ * Payment ID of payment associated with this activity
3301
+ * @format GUID
3302
+ */
3303
+ paymentId?: string;
3304
+ }
3305
+ /** @oneof */
3306
+ export interface ReceiptCreatedReceiptInfoOneOf {
3307
+ /** Receipt created by Wix */
3308
+ wixReceipt?: WixReceipt;
3309
+ /** Receipt created by an external system. */
3310
+ externalReceipt?: ExternalReceipt;
3311
+ }
3312
+ export interface WixReceipt {
3313
+ /**
3314
+ * Receipt ID
3315
+ * @format GUID
3316
+ */
3317
+ receiptId?: string;
3318
+ /**
3319
+ * Display number of receipt
3320
+ * @minLength 1
3321
+ * @maxLength 40
3322
+ */
3323
+ displayNumber?: string | null;
3324
+ }
3325
+ export interface ExternalReceipt {
3326
+ /**
3327
+ * Receipt ID
3328
+ * @maxLength 100
3329
+ */
3330
+ receiptId?: string | null;
3331
+ /**
3332
+ * Display number of receipt
3333
+ * @minLength 1
3334
+ * @maxLength 40
3335
+ */
3336
+ displayNumber?: string | null;
3337
+ }
3338
+ export interface ReceiptSent extends ReceiptSentReceiptInfoOneOf {
3339
+ /** Receipt created by Wix */
3340
+ wixReceipt?: WixReceipt;
3341
+ /** Receipt created by an external system. */
3342
+ externalReceipt?: ExternalReceipt;
3343
+ /**
3344
+ * Payment ID of payment associated with this activity
3345
+ * @format GUID
3346
+ */
3347
+ paymentId?: string;
3348
+ }
3349
+ /** @oneof */
3350
+ export interface ReceiptSentReceiptInfoOneOf {
3351
+ /** Receipt created by Wix */
3352
+ wixReceipt?: WixReceipt;
3353
+ /** Receipt created by an external system. */
3354
+ externalReceipt?: ExternalReceipt;
3355
+ }
3356
+ export declare enum ActivityType {
3357
+ ORDER_REFUNDED = "ORDER_REFUNDED",
3358
+ ORDER_PLACED = "ORDER_PLACED",
3359
+ ORDER_PAID = "ORDER_PAID",
3360
+ ORDER_FULFILLED = "ORDER_FULFILLED",
3361
+ ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED",
3362
+ ORDER_CANCELED = "ORDER_CANCELED",
3363
+ DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT",
3364
+ TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED",
3365
+ TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED",
3366
+ TRACKING_LINK_ADDED = "TRACKING_LINK_ADDED",
3367
+ SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT",
3368
+ INVOICE_ADDED = "INVOICE_ADDED",
3369
+ INVOICE_REMOVED = "INVOICE_REMOVED",
3370
+ INVOICE_SENT = "INVOICE_SENT",
3371
+ FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT",
3372
+ SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED",
3373
+ EMAIL_EDITED = "EMAIL_EDITED",
3374
+ PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT",
3375
+ CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY",
3376
+ MERCHANT_COMMENT = "MERCHANT_COMMENT",
3377
+ ORDER_CREATED_FROM_EXCHANGE = "ORDER_CREATED_FROM_EXCHANGE",
3378
+ NEW_EXCHANGE_ORDER_CREATED = "NEW_EXCHANGE_ORDER_CREATED",
3379
+ ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID",
3380
+ DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED",
3381
+ SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD",
3382
+ /** @documentationMaturity preview */
3383
+ PAYMENT_PENDING = "PAYMENT_PENDING",
3384
+ /** @documentationMaturity preview */
3385
+ PAYMENT_CANCELED = "PAYMENT_CANCELED",
3386
+ /** @documentationMaturity preview */
3387
+ PAYMENT_DECLINED = "PAYMENT_DECLINED",
3388
+ /** @documentationMaturity preview */
3389
+ ORDER_PENDING = "ORDER_PENDING",
3390
+ /** @documentationMaturity preview */
3391
+ ORDER_REJECTED = "ORDER_REJECTED"
3392
+ }
3393
+ export declare enum AttributionSource {
3394
+ UNSPECIFIED = "UNSPECIFIED",
3395
+ FACEBOOK_ADS = "FACEBOOK_ADS"
3396
+ }
3397
+ export interface V1CreatedBy extends V1CreatedByStringOneOf {
3398
+ /**
3399
+ * User ID - when the order was created by a Wix user on behalf of a buyer.
3400
+ * For example, via POS (point of service).
3401
+ * @format GUID
3402
+ */
3403
+ userId?: string;
3404
+ /**
3405
+ * Member ID - when the order was created by a **logged in** site visitor.
3406
+ * @format GUID
3407
+ */
3408
+ memberId?: string;
3409
+ /**
3410
+ * Visitor ID - when the order was created by a site visitor that was **not** logged in.
3411
+ * @format GUID
3412
+ */
3413
+ visitorId?: string;
3414
+ /**
3415
+ * App ID - when the order was created by an external application.
3416
+ * @format GUID
3417
+ */
3418
+ appId?: string;
3419
+ }
3420
+ /** @oneof */
3421
+ export interface V1CreatedByStringOneOf {
3422
+ /**
3423
+ * User ID - when the order was created by a Wix user on behalf of a buyer.
3424
+ * For example, via POS (point of service).
3425
+ * @format GUID
3426
+ */
3427
+ userId?: string;
3428
+ /**
3429
+ * Member ID - when the order was created by a **logged in** site visitor.
3430
+ * @format GUID
3431
+ */
3432
+ memberId?: string;
3433
+ /**
3434
+ * Visitor ID - when the order was created by a site visitor that was **not** logged in.
3435
+ * @format GUID
3436
+ */
3437
+ visitorId?: string;
3438
+ /**
3439
+ * App ID - when the order was created by an external application.
3440
+ * @format GUID
3441
+ */
3442
+ appId?: string;
3443
+ }
3444
+ export interface ChannelInfo {
3445
+ /** Sales channel that submitted the order. */
3446
+ type?: ChannelType;
3447
+ /**
3448
+ * Reference to an order ID from an external system.
3449
+ * @maxLength 100
3450
+ */
3451
+ externalOrderId?: string | null;
3452
+ /**
3453
+ * URL to the order in the external system.
3454
+ * @maxLength 300
3455
+ */
3456
+ externalOrderUrl?: string | null;
3457
+ }
3458
+ export declare enum ChannelType {
3459
+ /** Unspecified sales channel. This value is not supported. */
3460
+ UNSPECIFIED = "UNSPECIFIED",
3461
+ /** A web client. */
3462
+ WEB = "WEB",
3463
+ /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
3464
+ POS = "POS",
3465
+ /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
3466
+ EBAY = "EBAY",
3467
+ /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
3468
+ AMAZON = "AMAZON",
3469
+ /** Other sales platform. */
3470
+ OTHER_PLATFORM = "OTHER_PLATFORM",
3471
+ /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
3472
+ WIX_APP_STORE = "WIX_APP_STORE",
3473
+ /** 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) */
3474
+ WIX_INVOICES = "WIX_INVOICES",
3475
+ /** Wix merchant backoffice. */
3476
+ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
3477
+ /** Wish sales channel. */
3478
+ WISH = "WISH",
3479
+ /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
3480
+ CLASS_PASS = "CLASS_PASS",
3481
+ /** Global-E sales channel. */
3482
+ GLOBAL_E = "GLOBAL_E",
3483
+ /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
3484
+ FACEBOOK = "FACEBOOK",
3485
+ /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
3486
+ ETSY = "ETSY",
3487
+ /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
3488
+ TIKTOK = "TIKTOK",
3489
+ /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
3490
+ FAIRE_COM = "FAIRE_COM"
3491
+ }
3492
+ export interface CustomField {
3493
+ /** Custom field value. */
3494
+ value?: any;
3495
+ /**
3496
+ * Custom field title.
3497
+ * @minLength 1
3498
+ * @maxLength 500
3499
+ */
3500
+ title?: string;
3501
+ /**
3502
+ * Translated custom field title.
3503
+ * @minLength 1
3504
+ * @maxLength 500
3505
+ */
3506
+ translatedTitle?: string | null;
3507
+ }
3508
+ export interface V1BalanceSummary {
3509
+ /**
3510
+ * Current amount left to pay.
3511
+ * @readonly
3512
+ */
3513
+ balance?: Balance;
3514
+ /**
3515
+ * Sum of all approved and successful payments.
3516
+ *
3517
+ * The value includes payments that have subsequently been fully or partially refunded.
3518
+ * @readonly
3519
+ */
3520
+ paid?: Price;
3521
+ /**
3522
+ * Sum of all successfully refunded payments.
3523
+ * @readonly
3524
+ */
3525
+ refunded?: Price;
3526
+ /**
3527
+ * Sum of all authorized payments.
3528
+ * @readonly
3529
+ */
3530
+ authorized?: Price;
3531
+ /**
3532
+ * Sum of all pending refund transactions.
3533
+ * @internal
3534
+ * @readonly
3535
+ */
3536
+ pendingRefund?: Price;
3537
+ /**
3538
+ * Sum of all pending transactions.
3539
+ * @readonly
3540
+ */
3541
+ pending?: Price;
3542
+ }
3543
+ export interface FulfillmentStatusesAggregate {
3544
+ /** Unique string values based on Fulfillment entities statuses */
3545
+ statuses?: string[] | null;
3546
+ }
3547
+ /**
3548
+ * Common object for tags.
3549
+ * Should be use as in this example:
3550
+ * message Foo {
3551
+ * string id = 1;
3552
+ * ...
3553
+ * Tags tags = 5
3554
+ * }
3555
+ *
3556
+ * example of taggable entity
3557
+ * {
3558
+ * id: "123"
3559
+ * tags: {
3560
+ * tags: {
3561
+ * tag_ids:["11","22"]
3562
+ * },
3563
+ * private_tags: {
3564
+ * tag_ids: ["33", "44"]
3565
+ * }
3566
+ * }
3567
+ * }
3568
+ */
3569
+ export interface Tags {
3570
+ /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
3571
+ privateTags?: TagList;
3572
+ /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
3573
+ tags?: TagList;
3574
+ }
3575
+ export interface TagList {
3576
+ /**
3577
+ * List of tag IDs
3578
+ * @maxSize 100
3579
+ * @maxLength 5
3580
+ */
3581
+ tagIds?: string[];
3582
+ }
3583
+ export interface CreateOrderFromDraftRequest {
3584
+ /**
3585
+ * The draft order id
3586
+ * @internal
3587
+ * @format GUID
3588
+ */
3589
+ draftOrderId: string;
3590
+ /**
3591
+ * Optional side effects to trigger
3592
+ * @internal
3593
+ */
3594
+ createSettings?: OrderCreateSettings;
3595
+ /**
3596
+ * Reason for order creation, given by user (optional).
3597
+ * @internal
3598
+ * @maxLength 200
3599
+ */
3600
+ reason?: string | null;
3601
+ /**
3602
+ * Information about the sales channel that submitted this order
3603
+ * @internal
3604
+ */
3605
+ channelInfo?: ChannelInfo;
3606
+ }
3607
+ export interface OrderCreateSettings {
3608
+ /**
3609
+ * Notification settings to be applied on order creation
3610
+ * @internal
3611
+ */
3612
+ notifications?: OrderCreateNotifications;
3613
+ }
3614
+ export interface OrderCreateNotifications {
3615
+ /**
3616
+ * Whether to send notification to the buyer.
3617
+ *
3618
+ * Default: `true`
3619
+ * @internal
3620
+ */
3621
+ sendNotificationToBuyer?: boolean | null;
3622
+ /**
3623
+ * Whether to send notifications to the business.
3624
+ *
3625
+ * Default: `true`
3626
+ * @internal
3627
+ */
3628
+ sendNotificationsToBusiness?: boolean | null;
3629
+ }
3630
+ export interface CreateOrderFromDraftResponse {
3631
+ /**
3632
+ * The draft order after commit.
3633
+ * @internal
3634
+ */
3635
+ committedDraftOrder?: DraftOrder;
3636
+ /**
3637
+ * Created order
3638
+ * @internal
3639
+ */
3640
+ createdOrder?: Order;
3641
+ }
3642
+ export interface DeleteDraftOrderRequest {
3643
+ /**
3644
+ * The draft order id
3645
+ * @format GUID
3646
+ */
3647
+ draftOrderId: string;
3648
+ }
3649
+ export interface DeleteDraftOrderResponse {
3650
+ }
3651
+ export interface QueryDraftOrdersRequest {
3652
+ /** WQL expression */
3653
+ query?: CursorQuery;
3654
+ }
3655
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
3656
+ /**
3657
+ * Cursor paging options.
3658
+ *
3659
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
3660
+ */
3661
+ cursorPaging?: CursorPaging;
3662
+ /**
3663
+ * Filter object.
3664
+ *
3665
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
3666
+ */
3667
+ filter?: Record<string, any> | null;
3668
+ /**
3669
+ * Sort object.
3670
+ *
3671
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
3672
+ * @maxSize 5
3673
+ */
3674
+ sort?: Sorting[];
3675
+ }
3676
+ /** @oneof */
3677
+ export interface CursorQueryPagingMethodOneOf {
3678
+ /**
3679
+ * Cursor paging options.
3680
+ *
3681
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
3682
+ */
3683
+ cursorPaging?: CursorPaging;
3684
+ }
3685
+ export interface Sorting {
3686
+ /**
3687
+ * Name of the field to sort by.
3688
+ * @maxLength 512
3689
+ */
3690
+ fieldName?: string;
3691
+ /** Sort order. */
3692
+ order?: SortOrder;
3693
+ }
3694
+ export declare enum SortOrder {
3695
+ ASC = "ASC",
3696
+ DESC = "DESC"
3697
+ }
3698
+ export interface CursorPaging {
3699
+ /**
3700
+ * Maximum number of items to return in the results.
3701
+ * @max 100
3702
+ */
3703
+ limit?: number | null;
3704
+ /**
3705
+ * Pointer to the next or previous page in the list of results.
3706
+ *
3707
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
3708
+ * Not relevant for the first request.
3709
+ * @maxLength 16000
3710
+ */
3711
+ cursor?: string | null;
3712
+ }
3713
+ export interface QueryDraftOrdersResponse {
3714
+ /** list of edits per order */
3715
+ draftOrders?: DraftOrder[];
3716
+ /** Paging metadata. */
3717
+ pagingMetadata?: CursorPagingMetadata;
3718
+ }
3719
+ export interface CursorPagingMetadata {
3720
+ /** Number of items returned in current page. */
3721
+ count?: number | null;
3722
+ /** Cursor strings that point to the next page, previous page, or both. */
3723
+ cursors?: Cursors;
3724
+ /**
3725
+ * Whether there are more pages to retrieve following the current page.
3726
+ *
3727
+ * + `true`: Another page of results can be retrieved.
3728
+ * + `false`: This is the last page.
3729
+ */
3730
+ hasNext?: boolean | null;
3731
+ }
3732
+ export interface Cursors {
3733
+ /**
3734
+ * Cursor string pointing to the next page in the list of results.
3735
+ * @maxLength 16000
3736
+ */
3737
+ next?: string | null;
3738
+ /**
3739
+ * Cursor pointing to the previous page in the list of results.
3740
+ * @maxLength 16000
3741
+ */
3742
+ prev?: string | null;
3743
+ }
3744
+ export interface UpdateExtendedFieldsRequest {
3745
+ /** ID of the entity to update. */
3746
+ _id?: string;
3747
+ /** Identifier for the app whose extended fields are being updated. */
3748
+ namespace?: string;
3749
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
3750
+ namespaceData?: Record<string, any> | null;
3751
+ }
3752
+ export interface UpdateExtendedFieldsResponse {
3753
+ /** Updated DraftOrder */
3754
+ draftOrder?: DraftOrder;
3755
+ }
3756
+ export interface SetTaxExemptionRequest {
3757
+ /**
3758
+ * Draft order ID.
3759
+ * @internal
3760
+ * @format GUID
3761
+ */
3762
+ draftOrderId: string;
3763
+ /**
3764
+ * Whether the draft order is exempt from tax calculations.
3765
+ *
3766
+ * Default: `false`
3767
+ * @internal
3768
+ */
3769
+ taxExempt: boolean | null;
3770
+ }
3771
+ export interface SetTaxExemptionResponse {
3772
+ /**
3773
+ * The draft order details calculated with updated tax exemption.
3774
+ * @internal
3775
+ */
3776
+ calculatedDraftOrder?: CalculatedDraftOrder;
3777
+ }
3778
+ export interface GetDraftEditabilityStatusRequest {
3779
+ /**
3780
+ * Draft order ID.
3781
+ * @format GUID
3782
+ */
3783
+ draftOrderId?: string | null;
3784
+ }
3785
+ export interface GetDraftEditabilityStatusResponse {
3786
+ /**
3787
+ * Draft order ID.
3788
+ * @format GUID
3789
+ */
3790
+ draftOrderId?: string | null;
3791
+ /**
3792
+ * Draft order status.
3793
+ * @readonly
3794
+ */
3795
+ status?: EditingStatus;
3796
+ }
3797
+ export interface SetBusinessLocationRequest {
3798
+ /**
3799
+ * Draft order ID.
3800
+ * @internal
3801
+ * @format GUID
3802
+ */
3803
+ draftOrderId: string;
3804
+ /**
3805
+ * Business location.
3806
+ * @internal
3807
+ */
3808
+ businessLocation?: Location;
3809
+ }
3810
+ export interface SetBusinessLocationResponse {
3811
+ /**
3812
+ * The draft order details calculated with updated business location.
3813
+ * @internal
3814
+ */
3815
+ calculatedDraftOrder?: CalculatedDraftOrder;
3816
+ }
3817
+ export interface DomainEvent extends DomainEventBodyOneOf {
3818
+ createdEvent?: EntityCreatedEvent;
3819
+ updatedEvent?: EntityUpdatedEvent;
3820
+ deletedEvent?: EntityDeletedEvent;
3821
+ actionEvent?: ActionEvent;
3822
+ /**
3823
+ * Unique event ID.
3824
+ * Allows clients to ignore duplicate webhooks.
3825
+ */
3826
+ _id?: string;
3827
+ /**
3828
+ * Assumes actions are also always typed to an entity_type
3829
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3830
+ */
3831
+ entityFqdn?: string;
3832
+ /**
3833
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3834
+ * This is although the created/updated/deleted notion is duplication of the oneof types
3835
+ * Example: created/updated/deleted/started/completed/email_opened
3836
+ */
3837
+ slug?: string;
3838
+ /** ID of the entity associated with the event. */
3839
+ entityId?: string;
3840
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3841
+ eventTime?: Date | null;
3842
+ /**
3843
+ * Whether the event was triggered as a result of a privacy regulation application
3844
+ * (for example, GDPR).
3845
+ */
3846
+ triggeredByAnonymizeRequest?: boolean | null;
3847
+ /** If present, indicates the action that triggered the event. */
3848
+ originatedFrom?: string | null;
3849
+ /**
3850
+ * A sequence number defining the order of updates to the underlying entity.
3851
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
3852
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3853
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3854
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
3855
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3856
+ */
3857
+ entityEventSequence?: string | null;
3858
+ }
3859
+ /** @oneof */
3860
+ export interface DomainEventBodyOneOf {
3861
+ createdEvent?: EntityCreatedEvent;
3862
+ updatedEvent?: EntityUpdatedEvent;
3863
+ deletedEvent?: EntityDeletedEvent;
3864
+ actionEvent?: ActionEvent;
3865
+ }
3866
+ export interface EntityCreatedEvent {
3867
+ entity?: string;
3868
+ }
3869
+ export interface RestoreInfo {
3870
+ deletedDate?: Date | null;
3871
+ }
3872
+ export interface EntityUpdatedEvent {
3873
+ /**
3874
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3875
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3876
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3877
+ */
3878
+ currentEntity?: string;
3879
+ }
3880
+ export interface EntityDeletedEvent {
3881
+ /** Entity that was deleted */
3882
+ deletedEntity?: string | null;
3883
+ }
3884
+ export interface ActionEvent {
3885
+ body?: string;
3886
+ }
3887
+ export interface MessageEnvelope {
3888
+ /**
3889
+ * App instance ID.
3890
+ * @format GUID
3891
+ */
3892
+ instanceId?: string | null;
3893
+ /**
3894
+ * Event type.
3895
+ * @maxLength 150
3896
+ */
3897
+ eventType?: string;
3898
+ /** The identification type and identity data. */
3899
+ identity?: IdentificationData;
3900
+ /** Stringify payload. */
3901
+ data?: string;
3902
+ }
3903
+ export interface IdentificationData extends IdentificationDataIdOneOf {
3904
+ /**
3905
+ * ID of a site visitor that has not logged in to the site.
3906
+ * @format GUID
3907
+ */
3908
+ anonymousVisitorId?: string;
3909
+ /**
3910
+ * ID of a site visitor that has logged in to the site.
3911
+ * @format GUID
3912
+ */
3913
+ memberId?: string;
3914
+ /**
3915
+ * ID of a Wix user (site owner, contributor, etc.).
3916
+ * @format GUID
3917
+ */
3918
+ wixUserId?: string;
3919
+ /**
3920
+ * ID of an app.
3921
+ * @format GUID
3922
+ */
3923
+ appId?: string;
3924
+ /** @readonly */
3925
+ identityType?: WebhookIdentityType;
3926
+ }
3927
+ /** @oneof */
3928
+ export interface IdentificationDataIdOneOf {
3929
+ /**
3930
+ * ID of a site visitor that has not logged in to the site.
3931
+ * @format GUID
3932
+ */
3933
+ anonymousVisitorId?: string;
3934
+ /**
3935
+ * ID of a site visitor that has logged in to the site.
3936
+ * @format GUID
3937
+ */
3938
+ memberId?: string;
3939
+ /**
3940
+ * ID of a Wix user (site owner, contributor, etc.).
3941
+ * @format GUID
3942
+ */
3943
+ wixUserId?: string;
3944
+ /**
3945
+ * ID of an app.
3946
+ * @format GUID
3947
+ */
3948
+ appId?: string;
3949
+ }
3950
+ export declare enum WebhookIdentityType {
3951
+ UNKNOWN = "UNKNOWN",
3952
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3953
+ MEMBER = "MEMBER",
3954
+ WIX_USER = "WIX_USER",
3955
+ APP = "APP"
3956
+ }
3957
+ type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `lineItems.${number}.changedDetails.priceBeforeChange.amount` | `lineItems.${number}.changedDetails.priceBeforeChange.formattedAmount` | `lineItems.${number}.changedDetails.priceDescriptionBeforeChange.original` | `lineItems.${number}.removed` | `lineItems.${number}.lineItem._id` | `lineItems.${number}.lineItem.productName.original` | `lineItems.${number}.lineItem.catalogReference.catalogItemId` | `lineItems.${number}.lineItem.catalogReference.appId` | `lineItems.${number}.lineItem.quantity` | `lineItems.${number}.lineItem.physicalProperties.shippable` | `lineItems.${number}.lineItem.itemType.preset` | `lineItems.${number}.lineItem.itemType.custom` | `lineItems.${number}.lineItem.paymentOption` | `lineItems.${number}.lineItem.taxDetails.taxRate` | `lineItems.${number}.lineItem.taxInfo.taxIncludedInPrice` | `lineItems.${number}.lineItem.digitalFile.fileId` | `lineItems.${number}.lineItem.subscriptionInfo.cycleNumber` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionOptionTitle` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionSettings.autoRenewal` | `shippingInfo.added` | `shippingInfo.changedDetails.shippingInfoBeforeChange.title` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.number` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.name` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId._id` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId.type` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.pickupMethod` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.price.amount` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.price.formattedAmount` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.taxDetails.taxRate` | `shippingInfo.removed` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `additionalFees` | `additionalFees.${number}.additionalFee.name` | `additionalFees.${number}.additionalFee.price.amount` | `additionalFees.${number}.additionalFee.price.formattedAmount` | `additionalFees.${number}.additionalFee.taxDetails.taxRate` | `additionalFees.${number}.additionalFee._id` | `additionalFees.${number}.taxDetails.taxable` | `additionalFees.${number}.source` | `additionalFees.${number}.applied` | `discounts` | `discounts.${number}.discount.coupon._id` | `discounts.${number}.discount.coupon.code` | `discounts.${number}.discount.coupon.name` | `discounts.${number}.discount.coupon.amount.amount` | `discounts.${number}.discount.coupon.amount.formattedAmount` | `discounts.${number}.discount.merchantDiscount.discountReason` | `discounts.${number}.discount.discountRule._id` | `discounts.${number}.discount.discountRule.name.original` | `discounts.${number}.discount.discountType` | `discounts.${number}.source` | `discounts.${number}.applied` | `createdBy.userId` | `createdBy.appId` | `status` | `weightUnit` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.formattedAmount` | `taxSummary.totalTax.amount` | `taxSummary.totalTax.formattedAmount` | `balanceSummary.balance.amount` | `balanceSummary.balance.formattedAmount` | `balanceSummary.authorized.amount` | `balanceSummary.authorized.formattedAmount` | `commitSettings.updateInventory` | `commitSettings.updateInventory.${number}.lineItemId` | `recipientInfo.added` | `recipientInfo.changedDetails.recipientInfoBeforeChange.address.streetAddress.number` | `recipientInfo.changedDetails.recipientInfoBeforeChange.address.streetAddress.name` | `recipientInfo.changedDetails.recipientInfoBeforeChange.contactDetails.vatId._id` | `recipientInfo.changedDetails.recipientInfoBeforeChange.contactDetails.vatId.type` | `recipientInfo.removed` | `businessLocationDetails.added` | `businessLocationDetails.changedDetails.businessLocationBeforeChange._id` | `businessLocationDetails.changedDetails.businessLocationBeforeChange.name` | `businessLocationDetails.removed`;
3958
+ /**
3959
+ * Creates or gets a draft order.
3960
+ *
3961
+ * When passing the ID of an order that is already in draft, the existing draft order will be returned.
3962
+ * To complete a draft and update the order, call [Commit Draft Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/draft-orders/commit-draft-order).
3963
+ * @param orderId - To create a draft from existing order, provide its id. Otherwise, an empty draft will be created.
3964
+ * @public
3965
+ * @documentationMaturity preview
3966
+ * @requiredField orderId
3967
+ * @permissionId ECOM.DRAFT_ORDERS_CREATE
3968
+ * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
3969
+ * @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
3970
+ * @permissionScope Manage Stores - all permissions
3971
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3972
+ * @permissionScope Manage Restaurants - all permissions
3973
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3974
+ * @permissionScope Manage eCommerce - all permissions
3975
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3976
+ * @applicableIdentity APP
3977
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateDraftOrder
3978
+ */
3979
+ export declare function createDraftOrder(orderId: string): Promise<NonNullablePaths<CreateDraftOrderResponse, {
3980
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
3981
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
3982
+ /**
3983
+ * Creates an empty draft order.
3984
+ * @public
3985
+ * @documentationMaturity preview
3986
+ * @permissionId ECOM.DRAFT_ORDERS_CREATE
3987
+ * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
3988
+ * @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
3989
+ * @permissionScope Manage Stores - all permissions
3990
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3991
+ * @permissionScope Manage Restaurants - all permissions
3992
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3993
+ * @permissionScope Manage eCommerce - all permissions
3994
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3995
+ * @applicableIdentity APP
3996
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateEmptyDraftOrder
3997
+ */
3998
+ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<CreateEmptyDraftOrderResponse, {
3999
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4000
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4001
+ /**
4002
+ * Adds line items to a draft order.
4003
+ * @param draftOrderId - The draft order id
4004
+ * @public
4005
+ * @documentationMaturity preview
4006
+ * @requiredField draftOrderId
4007
+ * @requiredField options.catalogLineItems.catalogReference
4008
+ * @permissionId ECOM.DRAFT_ORDERS_ADD_LINE_ITEMS
4009
+ * @permissionScope Manage Stores - all permissions
4010
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4011
+ * @permissionScope Manage Restaurants - all permissions
4012
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4013
+ * @permissionScope Manage eCommerce - all permissions
4014
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4015
+ * @applicableIdentity APP
4016
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.AddLineItemsToDraftOrder
4017
+ */
4018
+ export declare function addLineItemsToDraftOrder(draftOrderId: string, options?: NonNullablePaths<AddLineItemsToDraftOrderOptions, `catalogLineItems.${number}.catalogReference`>): Promise<NonNullablePaths<AddLineItemsToDraftOrderResponse, {
4019
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4020
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4021
+ export interface AddLineItemsToDraftOrderOptions {
4022
+ /**
4023
+ * Catalog line items to add to draft order.
4024
+ * @maxSize 300
4025
+ */
4026
+ catalogLineItems?: CatalogReferenceLineItem[];
4027
+ /**
4028
+ * Custom line items to add to draft order. Custom line items don't trigger the Catalog service plugin.
4029
+ * @maxSize 300
4030
+ */
4031
+ customLineItems?: CustomLineItem[];
4032
+ }
4033
+ /**
4034
+ * Updates a draft order's line items.
4035
+ *
4036
+ * Using this API, you can update a line item's quantity, price, and description.
4037
+ * > **Notes:**
4038
+ * > + Passing a quantity of `0` will remove the line item.
4039
+ * > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
4040
+ * > + Quantity cannot be decreased fulfilled line items. To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order).
4041
+ * @param draftOrderId - The draft order id
4042
+ * @public
4043
+ * @documentationMaturity preview
4044
+ * @requiredField draftOrderId
4045
+ * @permissionId ECOM.DRAFT_ORDERS_MODIFY_ITEMS
4046
+ * @permissionScope Manage Stores - all permissions
4047
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4048
+ * @permissionScope Manage Restaurants - all permissions
4049
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4050
+ * @permissionScope Manage eCommerce - all permissions
4051
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4052
+ * @applicableIdentity APP
4053
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.UpdateLineItems
4054
+ */
4055
+ export declare function updateLineItems(draftOrderId: string, options?: UpdateLineItemsOptions): Promise<NonNullablePaths<UpdateLineItemsResponse, {
4056
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4057
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4058
+ export interface UpdateLineItemsOptions {
4059
+ /**
4060
+ * Details of changes to apply per line item
4061
+ * @minSize 1
4062
+ * @maxSize 300
4063
+ */
4064
+ lineItemChanges?: LineItemChangeDetails[];
4065
+ }
4066
+ /**
4067
+ * Sets and enables or disables discounts on a draft order.
4068
+ *
4069
+ * Any discounts not passed will not change.
4070
+ * @param draftOrderId - The draft order id
4071
+ * @param discounts - The discount ids to opt-in. all existing discounts not listed are to be opted-out.
4072
+ * @public
4073
+ * @documentationMaturity preview
4074
+ * @requiredField discounts
4075
+ * @requiredField draftOrderId
4076
+ * @permissionId ECOM.DRAFT_ORDERS_SET_DISCOUNTS
4077
+ * @permissionScope Manage Stores - all permissions
4078
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4079
+ * @permissionScope Manage Restaurants - all permissions
4080
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4081
+ * @permissionScope Manage eCommerce - all permissions
4082
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4083
+ * @applicableIdentity APP
4084
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetDiscounts
4085
+ */
4086
+ export declare function setDiscounts(draftOrderId: string, discounts: IdAndApplied[]): Promise<NonNullablePaths<SetDiscountsResponse, {
4087
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4088
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4089
+ /**
4090
+ * Adds merchant discounts to the order.
4091
+ * @param draftOrderId - The draft order id
4092
+ * @public
4093
+ * @documentationMaturity preview
4094
+ * @requiredField draftOrderId
4095
+ * @requiredField options.discounts.amount
4096
+ * @requiredField options.discounts.amount.amount
4097
+ * @requiredField options.discounts.discountType
4098
+ * @permissionId ECOM.DRAFT_ORDERS_ADD_DISCOUNTS
4099
+ * @permissionScope Manage Stores - all permissions
4100
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4101
+ * @permissionScope Manage Restaurants - all permissions
4102
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4103
+ * @permissionScope Manage eCommerce - all permissions
4104
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4105
+ * @applicableIdentity APP
4106
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateCustomDiscounts
4107
+ */
4108
+ export declare function createCustomDiscounts(draftOrderId: string, options?: NonNullablePaths<CreateCustomDiscountsOptions, `discounts.${number}.amount` | `discounts.${number}.amount.amount` | `discounts.${number}.discountType`>): Promise<NonNullablePaths<CreateCustomDiscountsResponse, {
4109
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4110
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4111
+ export interface CreateCustomDiscountsOptions {
4112
+ /**
4113
+ * The discounts to add.
4114
+ * @minSize 1
4115
+ * @maxSize 100
4116
+ */
4117
+ discounts?: DiscountOption[];
4118
+ }
4119
+ /**
4120
+ * Remove custom discounts from the order.
4121
+ * @param draftOrderId - The draft order id
4122
+ * @param discountIds - The discounts to remove
4123
+ * @public
4124
+ * @documentationMaturity preview
4125
+ * @requiredField discountIds
4126
+ * @requiredField draftOrderId
4127
+ * @permissionId ECOM.DRAFT_ORDERS_DELETE_DISCOUNTS
4128
+ * @permissionScope Manage Stores - all permissions
4129
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4130
+ * @permissionScope Manage Restaurants - all permissions
4131
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4132
+ * @permissionScope Manage eCommerce - all permissions
4133
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4134
+ * @applicableIdentity APP
4135
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.DeleteCustomDiscounts
4136
+ */
4137
+ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds: string[]): Promise<NonNullablePaths<DeleteCustomDiscountsResponse, {
4138
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4139
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4140
+ /**
4141
+ * Set which additional fees existing on the draft order are to be opt-in.
4142
+ * All existing additional fees not provided on the call are opted-out.
4143
+ * @param draftOrderId - The draft order id
4144
+ * @param additionalFees - The additional fees ids to opt-in. all existing additional fees not listed are to be opted-out
4145
+ * @public
4146
+ * @documentationMaturity preview
4147
+ * @requiredField additionalFees
4148
+ * @requiredField draftOrderId
4149
+ * @permissionId ECOM.DRAFT_ORDERS_SET_ADDITIONAL_FEES
4150
+ * @permissionScope Manage Stores - all permissions
4151
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4152
+ * @permissionScope Manage Restaurants - all permissions
4153
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4154
+ * @permissionScope Manage eCommerce - all permissions
4155
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4156
+ * @applicableIdentity APP
4157
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetAdditionalFees
4158
+ */
4159
+ export declare function setAdditionalFees(draftOrderId: string, additionalFees: IdAndApplied[]): Promise<NonNullablePaths<SetAdditionalFeesResponse, {
4160
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4161
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4162
+ /**
4163
+ * Create custom additional fees to the order.
4164
+ * added additional fees are by default opted-out.
4165
+ * To opt-in them, please call SetAdditionalFees with the added additional fee ids.
4166
+ * @param draftOrderId - The draft order id
4167
+ * @public
4168
+ * @documentationMaturity preview
4169
+ * @requiredField draftOrderId
4170
+ * @requiredField options.customAdditionalFees.name
4171
+ * @requiredField options.customAdditionalFees.price
4172
+ * @requiredField options.customAdditionalFees.price.amount
4173
+ * @permissionId ECOM.DRAFT_ORDERS_CREATE_ADDITIONAL_FEES
4174
+ * @permissionScope Manage Stores - all permissions
4175
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4176
+ * @permissionScope Manage Restaurants - all permissions
4177
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4178
+ * @permissionScope Manage eCommerce - all permissions
4179
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4180
+ * @applicableIdentity APP
4181
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateCustomAdditionalFees
4182
+ */
4183
+ export declare function createCustomAdditionalFees(draftOrderId: string, options?: NonNullablePaths<CreateCustomAdditionalFeesOptions, `customAdditionalFees.${number}.name` | `customAdditionalFees.${number}.price` | `customAdditionalFees.${number}.price.amount`>): Promise<NonNullablePaths<CreateCustomAdditionalFeesResponse, {
4184
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4185
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4186
+ export interface CreateCustomAdditionalFeesOptions {
4187
+ /**
4188
+ * The additional fees to add. added with opted-out setting
4189
+ * @minSize 1
4190
+ * @maxSize 100
4191
+ */
4192
+ customAdditionalFees?: AdditionalFeeOption[];
4193
+ }
4194
+ /**
4195
+ * Remove custom additional fees from the order.
4196
+ * @param draftOrderId - The draft order id
4197
+ * @param customAdditionalFees - The additional fees to remove
4198
+ * @public
4199
+ * @documentationMaturity preview
4200
+ * @requiredField customAdditionalFees
4201
+ * @requiredField draftOrderId
4202
+ * @permissionId ECOM.DRAFT_ORDERS_DELETE_ADDITIONAL_FEES
4203
+ * @permissionScope Manage Stores - all permissions
4204
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4205
+ * @permissionScope Manage Restaurants - all permissions
4206
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4207
+ * @permissionScope Manage eCommerce - all permissions
4208
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4209
+ * @applicableIdentity APP
4210
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.DeleteCustomAdditionalFees
4211
+ */
4212
+ export declare function deleteCustomAdditionalFees(draftOrderId: string, customAdditionalFees: string[]): Promise<NonNullablePaths<DeleteCustomAdditionalFeesResponse, {
4213
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4214
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4215
+ /**
4216
+ * Sets shipping info to a draft order.
4217
+ * @public
4218
+ * @documentationMaturity preview
4219
+ * @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING_INFO
4220
+ * @permissionScope Manage Stores - all permissions
4221
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4222
+ * @permissionScope Manage Restaurants - all permissions
4223
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4224
+ * @permissionScope Manage eCommerce - all permissions
4225
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4226
+ * @applicableIdentity APP
4227
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetShippingInfo
4228
+ */
4229
+ export declare function setShippingInfo(): Promise<void>;
4230
+ /**
4231
+ * Sets buyer info to a draft order.
4232
+ * @public
4233
+ * @documentationMaturity preview
4234
+ * @permissionId ECOM.DRAFT_ORDER_SET_BUYER_INFO
4235
+ * @permissionScope Manage Stores - all permissions
4236
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4237
+ * @permissionScope Manage Restaurants - all permissions
4238
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4239
+ * @permissionScope Manage eCommerce - all permissions
4240
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4241
+ * @applicableIdentity APP
4242
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBuyerInfo
4243
+ */
4244
+ export declare function setBuyerInfo(): Promise<void>;
4245
+ /**
4246
+ * Sets recipient info to a draft order.
4247
+ * @public
4248
+ * @documentationMaturity preview
4249
+ * @permissionId ECOM.DRAFT_ORDER_SET_RECIPIENT_INFO
4250
+ * @permissionScope Manage Stores - all permissions
4251
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4252
+ * @permissionScope Manage Restaurants - all permissions
4253
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4254
+ * @permissionScope Manage eCommerce - all permissions
4255
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4256
+ * @applicableIdentity APP
4257
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetRecipientInfo
4258
+ */
4259
+ export declare function setRecipientInfo(): Promise<void>;
4260
+ /**
4261
+ * Sets billing info to a draft order.
4262
+ * @public
4263
+ * @documentationMaturity preview
4264
+ * @permissionId ECOM.DRAFT_ORDER_SET_BILLING_INFO
4265
+ * @permissionScope Manage Stores - all permissions
4266
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4267
+ * @permissionScope Manage Restaurants - all permissions
4268
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4269
+ * @permissionScope Manage eCommerce - all permissions
4270
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4271
+ * @applicableIdentity APP
4272
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBillingInfo
4273
+ */
4274
+ export declare function setBillingInfo(): Promise<void>;
4275
+ /**
4276
+ * Get an order.
4277
+ * When order is in draft status, it's re-estimated and return with latest tax and totals
4278
+ * Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
4279
+ * Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
4280
+ * When order is in committed status, it's returned with it's calculation at the moment it was committed.
4281
+ * @param draftOrderId - The draft order id
4282
+ * @public
4283
+ * @documentationMaturity preview
4284
+ * @requiredField draftOrderId
4285
+ * @permissionId ECOM.DRAFT_ORDERS_READ
4286
+ * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
4287
+ * @permissionScope Manage Stores - all permissions
4288
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4289
+ * @permissionScope Manage Restaurants - all permissions
4290
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4291
+ * @permissionScope Manage eCommerce - all permissions
4292
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4293
+ * @applicableIdentity APP
4294
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.GetDraftOrder
4295
+ */
4296
+ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullablePaths<GetDraftOrderResponse, {
4297
+ [P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
4298
+ }[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
4299
+ /**
4300
+ * Checks whether a draft can be created for this order
4301
+ * @param orderId - Order ID.
4302
+ * @public
4303
+ * @documentationMaturity preview
4304
+ * @requiredField orderId
4305
+ * @permissionId ECOM.DRAFT_ORDERS_READ
4306
+ * @permissionScope Manage Stores - all permissions
4307
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4308
+ * @permissionScope Manage Restaurants - all permissions
4309
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4310
+ * @permissionScope Manage eCommerce - all permissions
4311
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4312
+ * @applicableIdentity APP
4313
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.GetOrderDraftabilityStatus
4314
+ */
4315
+ export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
4316
+ /**
4317
+ * Commit latest changes to the baseline order and control what side-effects will be applied.
4318
+ * Commit cannot be undone or reverted.
4319
+ * Order-edit become closed for editing, however it's kept for reference and can be retrieved.
4320
+ * @param draftOrderId - The draft order id
4321
+ * @public
4322
+ * @documentationMaturity preview
4323
+ * @requiredField draftOrderId
4324
+ * @permissionId ECOM.DRAFT_ORDERS_COMMIT
4325
+ * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
4326
+ * @permissionScope Manage Stores - all permissions
4327
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4328
+ * @permissionScope Manage Restaurants - all permissions
4329
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4330
+ * @permissionScope Manage eCommerce - all permissions
4331
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4332
+ * @applicableIdentity APP
4333
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CommitDraftOrder
4334
+ */
4335
+ export declare function commitDraftOrder(draftOrderId: string, options?: CommitDraftOrderOptions): Promise<NonNullablePaths<CommitDraftOrderResponse, {
4336
+ [P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
4337
+ }[DraftOrderNonNullablePaths] | `orderAfterCommit.number` | `orderAfterCommit.lineItems` | `orderAfterCommit.lineItems.${number}._id` | `orderAfterCommit.lineItems.${number}.productName.original` | `orderAfterCommit.lineItems.${number}.catalogReference.catalogItemId` | `orderAfterCommit.lineItems.${number}.catalogReference.appId` | `orderAfterCommit.lineItems.${number}.quantity` | `orderAfterCommit.lineItems.${number}.totalDiscount.amount` | `orderAfterCommit.lineItems.${number}.totalDiscount.formattedAmount` | `orderAfterCommit.lineItems.${number}.physicalProperties.shippable` | `orderAfterCommit.lineItems.${number}.itemType.preset` | `orderAfterCommit.lineItems.${number}.itemType.custom` | `orderAfterCommit.lineItems.${number}.paymentOption` | `orderAfterCommit.lineItems.${number}.taxDetails.taxRate` | `orderAfterCommit.lineItems.${number}.taxInfo.taxIncludedInPrice` | `orderAfterCommit.lineItems.${number}.digitalFile.fileId` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.cycleNumber` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `orderAfterCommit.lineItems.${number}.priceDescription.original` | `orderAfterCommit.buyerInfo.visitorId` | `orderAfterCommit.buyerInfo.memberId` | `orderAfterCommit.paymentStatus` | `orderAfterCommit.fulfillmentStatus` | `orderAfterCommit.weightUnit` | `orderAfterCommit.taxIncludedInPrices` | `orderAfterCommit.billingInfo.address.streetAddress.number` | `orderAfterCommit.billingInfo.address.streetAddress.name` | `orderAfterCommit.billingInfo.contactDetails.vatId._id` | `orderAfterCommit.billingInfo.contactDetails.vatId.type` | `orderAfterCommit.shippingInfo.title` | `orderAfterCommit.shippingInfo.logistics.pickupDetails.pickupMethod` | `orderAfterCommit.status` | `orderAfterCommit.taxInfo.taxBreakdown` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxName` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdiction` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdictionType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.rate` | `orderAfterCommit.appliedDiscounts` | `orderAfterCommit.appliedDiscounts.${number}.coupon._id` | `orderAfterCommit.appliedDiscounts.${number}.coupon.code` | `orderAfterCommit.appliedDiscounts.${number}.coupon.name` | `orderAfterCommit.appliedDiscounts.${number}.merchantDiscount.discountReason` | `orderAfterCommit.appliedDiscounts.${number}.discountRule._id` | `orderAfterCommit.appliedDiscounts.${number}.discountRule.name.original` | `orderAfterCommit.appliedDiscounts.${number}.discountType` | `orderAfterCommit.activities` | `orderAfterCommit.activities.${number}.customActivity.appId` | `orderAfterCommit.activities.${number}.customActivity.type` | `orderAfterCommit.activities.${number}.merchantComment.message` | `orderAfterCommit.activities.${number}.orderRefunded.manual` | `orderAfterCommit.activities.${number}.orderRefunded.reason` | `orderAfterCommit.activities.${number}.type` | `orderAfterCommit.attributionSource` | `orderAfterCommit.createdBy.userId` | `orderAfterCommit.createdBy.memberId` | `orderAfterCommit.createdBy.visitorId` | `orderAfterCommit.createdBy.appId` | `orderAfterCommit.channelInfo.type` | `orderAfterCommit.customFields` | `orderAfterCommit.customFields.${number}.title` | `orderAfterCommit.balanceSummary.balance.amount` | `orderAfterCommit.balanceSummary.balance.formattedAmount` | `orderAfterCommit.additionalFees` | `orderAfterCommit.additionalFees.${number}.name` | `orderAfterCommit.additionalFees.${number}._id` | `orderAfterCommit.tags.privateTags.tagIds` | `orderAfterCommit.businessLocation._id` | `orderAfterCommit.businessLocation.name`>>;
4338
+ export interface CommitDraftOrderOptions {
4339
+ /** Optional side effects to trigger */
4340
+ commitSettings?: DraftOrderCommitSettings;
4341
+ /**
4342
+ * Reason for edit, given by user (optional).
4343
+ * @maxLength 200
4344
+ */
4345
+ reason?: string | null;
4346
+ }
4347
+ /**
4348
+ * Create new order and control what side-effects will be applied
4349
+ * Commit cannot be undone or reverted.
4350
+ * Order-edit become closed for editing, however it's kept for reference and can be retrieved.
4351
+ * @public
4352
+ * @documentationMaturity preview
4353
+ * @permissionId ECOM.DRAFT_ORDER_CREATE_ORDER_FROM_DRAFT
4354
+ * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
4355
+ * @permissionScope Manage Stores - all permissions
4356
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4357
+ * @permissionScope Manage Restaurants - all permissions
4358
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4359
+ * @permissionScope Manage eCommerce - all permissions
4360
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4361
+ * @applicableIdentity APP
4362
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateOrderFromDraft
4363
+ */
4364
+ export declare function createOrderFromDraft(): Promise<void>;
4365
+ /**
4366
+ * Delete order-edit entity with all pending changes.
4367
+ * Order-edit in status 'COMMITTED' cannot be deleted.
4368
+ * @param draftOrderId - The draft order id
4369
+ * @public
4370
+ * @documentationMaturity preview
4371
+ * @requiredField draftOrderId
4372
+ * @permissionId ECOM.DRAFT_ORDERS_DELETE
4373
+ * @permissionId ECOM.DRAFT_ORDERS_ADMIN_DELETE
4374
+ * @permissionScope Manage Stores - all permissions
4375
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4376
+ * @permissionScope Manage Restaurants - all permissions
4377
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4378
+ * @permissionScope Manage eCommerce - all permissions
4379
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4380
+ * @applicableIdentity APP
4381
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.DeleteDraftOrder
4382
+ */
4383
+ export declare function deleteDraftOrder(draftOrderId: string): Promise<void>;
4384
+ /**
4385
+ * Retrieves a list of draft orders given the provided paging, filtering, and sorting. Up to 100 draft orders can be returned per request.
4386
+ *
4387
+ * Refer to the table below for supported fields, filters, and sorting:
4388
+ * | **Property** | **Supported Filters & Sorting** | **Sortable** |
4389
+ * |----------------|---------------------------------------------------------------------------------|--------------|
4390
+ * | `_createdDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
4391
+ * | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
4392
+ * | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
4393
+ * | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
4394
+ * To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
4395
+ * @public
4396
+ * @documentationMaturity preview
4397
+ * @permissionScope Manage Stores - all permissions
4398
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4399
+ * @permissionScope Manage Restaurants - all permissions
4400
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4401
+ * @permissionScope Manage eCommerce - all permissions
4402
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4403
+ * @permissionId ECOM.DRAFT_ORDERS_READ
4404
+ * @applicableIdentity APP
4405
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.QueryDraftOrders
4406
+ */
4407
+ export declare function queryDraftOrders(): DraftOrdersQueryBuilder;
4408
+ interface QueryCursorResult {
4409
+ cursors: Cursors;
4410
+ hasNext: () => boolean;
4411
+ hasPrev: () => boolean;
4412
+ length: number;
4413
+ pageSize: number;
4414
+ }
4415
+ export interface DraftOrdersQueryResult extends QueryCursorResult {
4416
+ items: DraftOrder[];
4417
+ query: DraftOrdersQueryBuilder;
4418
+ next: () => Promise<DraftOrdersQueryResult>;
4419
+ prev: () => Promise<DraftOrdersQueryResult>;
4420
+ }
4421
+ export interface DraftOrdersQueryBuilder {
4422
+ /** @param propertyName - Property whose value is compared with `value`.
4423
+ * @param value - Value to compare against.
4424
+ * @documentationMaturity preview
4425
+ */
4426
+ eq: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: any) => DraftOrdersQueryBuilder;
4427
+ /** @param propertyName - Property whose value is compared with `value`.
4428
+ * @param value - Value to compare against.
4429
+ * @documentationMaturity preview
4430
+ */
4431
+ ne: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: any) => DraftOrdersQueryBuilder;
4432
+ /** @param propertyName - Property whose value is compared with `value`.
4433
+ * @param value - Value to compare against.
4434
+ * @documentationMaturity preview
4435
+ */
4436
+ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => DraftOrdersQueryBuilder;
4437
+ /** @param propertyName - Property whose value is compared with `value`.
4438
+ * @param value - Value to compare against.
4439
+ * @documentationMaturity preview
4440
+ */
4441
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => DraftOrdersQueryBuilder;
4442
+ /** @param propertyName - Property whose value is compared with `value`.
4443
+ * @param value - Value to compare against.
4444
+ * @documentationMaturity preview
4445
+ */
4446
+ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => DraftOrdersQueryBuilder;
4447
+ /** @param propertyName - Property whose value is compared with `value`.
4448
+ * @param value - Value to compare against.
4449
+ * @documentationMaturity preview
4450
+ */
4451
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => DraftOrdersQueryBuilder;
4452
+ /** @param propertyName - Property whose value is compared with `string`.
4453
+ * @param string - String to compare against. Case-insensitive.
4454
+ * @documentationMaturity preview
4455
+ */
4456
+ startsWith: (propertyName: 'orderId', value: string) => DraftOrdersQueryBuilder;
4457
+ /** @param propertyName - Property whose value is compared with `values`.
4458
+ * @param values - List of values to compare against.
4459
+ * @documentationMaturity preview
4460
+ */
4461
+ hasSome: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: any[]) => DraftOrdersQueryBuilder;
4462
+ /** @documentationMaturity preview */
4463
+ in: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: any) => DraftOrdersQueryBuilder;
4464
+ /** @documentationMaturity preview */
4465
+ exists: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: boolean) => DraftOrdersQueryBuilder;
4466
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
4467
+ * @documentationMaturity preview
4468
+ */
4469
+ ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'status'>) => DraftOrdersQueryBuilder;
4470
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
4471
+ * @documentationMaturity preview
4472
+ */
4473
+ descending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'status'>) => DraftOrdersQueryBuilder;
4474
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
4475
+ * @documentationMaturity preview
4476
+ */
4477
+ limit: (limit: number) => DraftOrdersQueryBuilder;
4478
+ /** @param cursor - A pointer to specific record
4479
+ * @documentationMaturity preview
4480
+ */
4481
+ skipTo: (cursor: string) => DraftOrdersQueryBuilder;
4482
+ /** @documentationMaturity preview */
4483
+ find: () => Promise<DraftOrdersQueryResult>;
4484
+ }
4485
+ /**
4486
+ * Sets tax exemption to a draft order.
4487
+ * @public
4488
+ * @documentationMaturity preview
4489
+ * @permissionId ECOM.DRAFT_ORDER_SET_TAX_EXEMPTION
4490
+ * @permissionScope Manage Stores - all permissions
4491
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4492
+ * @permissionScope Manage Restaurants - all permissions
4493
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4494
+ * @permissionScope Manage eCommerce - all permissions
4495
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4496
+ * @applicableIdentity APP
4497
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetTaxExemption
4498
+ */
4499
+ export declare function setTaxExemption(): Promise<void>;
4500
+ /**
4501
+ * Sets business location to a draft order.
4502
+ * @public
4503
+ * @documentationMaturity preview
4504
+ * @permissionId ECOM.DRAFT_ORDER_SET_BUSINESS_LOCATION
4505
+ * @permissionScope Manage Stores - all permissions
4506
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
4507
+ * @permissionScope Manage Restaurants - all permissions
4508
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
4509
+ * @permissionScope Manage eCommerce - all permissions
4510
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
4511
+ * @applicableIdentity APP
4512
+ * @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBusinessLocation
4513
+ */
4514
+ export declare function setBusinessLocation(): Promise<void>;
4515
+ export {};