@wix/auto_sdk_ecom_draft-orders 1.0.34 → 1.0.35

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