@wix/auto_sdk_ecom_draft-orders 1.0.18 → 1.0.19

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