@wix/auto_sdk_ecom_draft-orders 1.0.0

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