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