@wix/auto_sdk_ecom_draft-orders 1.0.0

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