@wix/auto_sdk_ecom_draft-orders 1.0.17 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{es/src/ecom-v1-draft-order-draft-orders.types.d.ts → ecom-v1-draft-order-draft-orders.universal-Ch0BEnrn.d.mts} +423 -831
- package/build/{cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts → ecom-v1-draft-order-draft-orders.universal-Ch0BEnrn.d.ts} +423 -831
- package/build/index.d.mts +232 -0
- package/build/index.d.ts +232 -0
- package/build/index.js +4593 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +4520 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts → ecom-v1-draft-order-draft-orders.universal-B5CD1SEk.d.mts} +885 -1096
- package/build/internal/{es/src/ecom-v1-draft-order-draft-orders.types.d.ts → ecom-v1-draft-order-draft-orders.universal-B5CD1SEk.d.ts} +885 -1096
- package/build/internal/index.d.mts +232 -0
- package/build/internal/index.d.ts +232 -0
- package/build/internal/index.js +4593 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +4520 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +2751 -0
- package/build/internal/meta.d.ts +2751 -0
- package/build/internal/meta.js +3323 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +3275 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +2751 -0
- package/build/meta.d.ts +2751 -0
- package/build/meta.js +3323 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +3275 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +0 -26
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js +0 -57
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +0 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +0 -97
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +0 -2951
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +0 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.d.ts +0 -60
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.js +0 -446
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +0 -209
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js +0 -168
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +0 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +0 -360
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +0 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +0 -4562
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +0 -1943
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +0 -26
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js +0 -26
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js.map +0 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +0 -97
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +0 -2926
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js.map +0 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.meta.d.ts +0 -60
- package/build/es/src/ecom-v1-draft-order-draft-orders.meta.js +0 -398
- package/build/es/src/ecom-v1-draft-order-draft-orders.meta.js.map +0 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +0 -209
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js +0 -114
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js.map +0 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +0 -357
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js.map +0 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +0 -4562
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +0 -1895
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +0 -26
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js +0 -57
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +0 -97
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +0 -2951
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.d.ts +0 -60
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.js +0 -446
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +0 -209
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js +0 -168
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +0 -360
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +0 -5285
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +0 -1943
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +0 -26
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js +0 -26
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js.map +0 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +0 -97
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +0 -2926
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js.map +0 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.d.ts +0 -60
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.js +0 -398
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +0 -209
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js +0 -114
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js.map +0 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +0 -357
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js.map +0 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +0 -5285
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +0 -1895
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +0 -1
package/build/meta.d.mts
ADDED
|
@@ -0,0 +1,2751 @@
|
|
|
1
|
+
import { bi as CreateDraftOrderRequest$1, C as CreateDraftOrderResponse$1, bz as CreateEmptyDraftOrderRequest$1, a as CreateEmptyDraftOrderResponse$1, bA as AddLineItemsToDraftOrderRequest$1, b as AddLineItemsToDraftOrderResponse$1, bE as UpdateLineItemsRequest$1, c as UpdateLineItemsResponse$1, bG as SetDiscountsRequest$1, S as SetDiscountsResponse$1, bH as CreateCustomDiscountsRequest$1, e as CreateCustomDiscountsResponse$1, bK as DeleteCustomDiscountsRequest$1, D as DeleteCustomDiscountsResponse$1, bL as SetAdditionalFeesRequest$1, f as SetAdditionalFeesResponse$1, bM as CreateCustomAdditionalFeesRequest$1, h as CreateCustomAdditionalFeesResponse$1, bO as DeleteCustomAdditionalFeesRequest$1, i as DeleteCustomAdditionalFeesResponse$1, bP as SetShippingInfoRequest$1, bQ as SetShippingInfoResponse$1, bR as SetBuyerInfoRequest$1, bS as SetBuyerInfoResponse$1, bT as SetRecipientInfoRequest$1, bU as SetRecipientInfoResponse$1, bV as SetBillingInfoRequest$1, bW as SetBillingInfoResponse$1, bZ as GetDraftOrderRequest$1, G as GetDraftOrderResponse$1, b_ as GetOrderDraftabilityStatusRequest$1, j as GetOrderDraftabilityStatusResponse$1, b$ as CommitDraftOrderRequest$1, l as CommitDraftOrderResponse$1, cY as CreateOrderFromDraftRequest$1, c$ as CreateOrderFromDraftResponse$1, d0 as DeleteDraftOrderRequest$1, d1 as DeleteDraftOrderResponse$1, d2 as QueryDraftOrdersRequest$1, d7 as QueryDraftOrdersResponse$1, dc as SetTaxExemptionRequest$1, dd as SetTaxExemptionResponse$1, dg as SetBusinessLocationRequest$1, dh as SetBusinessLocationResponse$1 } from './ecom-v1-draft-order-draft-orders.universal-Ch0BEnrn.mjs';
|
|
2
|
+
|
|
3
|
+
/** DraftOrder is the main entity of DraftOrders service. It represents a single edit order. */
|
|
4
|
+
interface DraftOrder {
|
|
5
|
+
/**
|
|
6
|
+
* Draft order ID.
|
|
7
|
+
* @format GUID
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
id?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* ID of the order this draft commits to.
|
|
13
|
+
* @format GUID
|
|
14
|
+
*/
|
|
15
|
+
orderId?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Line items.
|
|
18
|
+
* Includes details about changes when relevant.
|
|
19
|
+
* @minSize 1
|
|
20
|
+
* @maxSize 300
|
|
21
|
+
*/
|
|
22
|
+
lineItems?: ItemDetails[];
|
|
23
|
+
/**
|
|
24
|
+
* Shipping info.
|
|
25
|
+
* Includes details about changes when relevant.
|
|
26
|
+
*/
|
|
27
|
+
shippingInfo?: ShippingDetails;
|
|
28
|
+
/**
|
|
29
|
+
* Buyer information.
|
|
30
|
+
* @deprecated Buyer information.
|
|
31
|
+
* @replacedBy buyer_info_details
|
|
32
|
+
* @targetRemovalDate 2024-08-30
|
|
33
|
+
*/
|
|
34
|
+
buyerInfo?: BuyerInfo;
|
|
35
|
+
/**
|
|
36
|
+
* Billing address and contact details.
|
|
37
|
+
* @deprecated Billing address and contact details.
|
|
38
|
+
* @replacedBy billing_info_details
|
|
39
|
+
* @targetRemovalDate 2024-08-30
|
|
40
|
+
*/
|
|
41
|
+
billingInfo?: AddressWithContact;
|
|
42
|
+
/**
|
|
43
|
+
* Additional fees.
|
|
44
|
+
* Includes details about the source, and whether the additional fee is applied to the order.
|
|
45
|
+
* @maxSize 100
|
|
46
|
+
*/
|
|
47
|
+
additionalFees?: AdditionalFeeDetails[];
|
|
48
|
+
/**
|
|
49
|
+
* Discounts.
|
|
50
|
+
* Includes details about the source, and whether the discount is applied to the order.
|
|
51
|
+
* @maxSize 320
|
|
52
|
+
*/
|
|
53
|
+
discounts?: DiscountDetails[];
|
|
54
|
+
/**
|
|
55
|
+
* Date and time the draft order was created.
|
|
56
|
+
* @readonly
|
|
57
|
+
*/
|
|
58
|
+
createdDate?: Date | null;
|
|
59
|
+
/**
|
|
60
|
+
* Date and time the draft order was updated.
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
updatedDate?: Date | null;
|
|
64
|
+
/**
|
|
65
|
+
* Identity of the draft order's initiator.
|
|
66
|
+
* @readonly
|
|
67
|
+
*/
|
|
68
|
+
createdBy?: CreatedBy;
|
|
69
|
+
/**
|
|
70
|
+
* Draft order status.
|
|
71
|
+
* @readonly
|
|
72
|
+
*/
|
|
73
|
+
status?: EditingStatus;
|
|
74
|
+
/** Weight measurement unit. Defaults to the site's weight unit. */
|
|
75
|
+
weightUnit?: WeightUnit;
|
|
76
|
+
/**
|
|
77
|
+
* Currency used for pricing.
|
|
78
|
+
* @format CURRENCY
|
|
79
|
+
*/
|
|
80
|
+
currency?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* Price summary.
|
|
83
|
+
* @readonly
|
|
84
|
+
*/
|
|
85
|
+
priceSummary?: PriceSummary;
|
|
86
|
+
/**
|
|
87
|
+
* Deprecated. Use `taxInfo` instead.
|
|
88
|
+
* This field will be removed on September 30, 2024.
|
|
89
|
+
* Tax summary.
|
|
90
|
+
* @readonly
|
|
91
|
+
* @deprecated Deprecated. Use `taxInfo` instead.
|
|
92
|
+
* This field will be removed on September 30, 2024.
|
|
93
|
+
* Tax summary.
|
|
94
|
+
* @replacedBy tax_info
|
|
95
|
+
* @targetRemovalDate 2024-09-30
|
|
96
|
+
*/
|
|
97
|
+
taxSummary?: TaxSummary;
|
|
98
|
+
/**
|
|
99
|
+
* Balance summary.
|
|
100
|
+
* @readonly
|
|
101
|
+
*/
|
|
102
|
+
balanceSummary?: BalanceSummary;
|
|
103
|
+
/** Side effects to perform on commit. */
|
|
104
|
+
commitSettings?: DraftOrderCommitSettings;
|
|
105
|
+
/**
|
|
106
|
+
* Member ID (if order created by a member).
|
|
107
|
+
* @format GUID
|
|
108
|
+
*/
|
|
109
|
+
memberId?: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
112
|
+
* @format GUID
|
|
113
|
+
*/
|
|
114
|
+
purchaseFlowId?: string | null;
|
|
115
|
+
recipientInfo?: RecipientInfoDetails;
|
|
116
|
+
/**
|
|
117
|
+
* Custom field data for the draft order object.
|
|
118
|
+
* [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.
|
|
119
|
+
*/
|
|
120
|
+
extendedFields?: ExtendedFields;
|
|
121
|
+
/**
|
|
122
|
+
* Order business location
|
|
123
|
+
* Includes details about changes when relevant.
|
|
124
|
+
*/
|
|
125
|
+
businessLocationDetails?: BusinessLocationDetails;
|
|
126
|
+
}
|
|
127
|
+
interface ItemDetails extends ItemDetailsChangeTypeOneOf {
|
|
128
|
+
/** Whether the line item was added as part of the draft. */
|
|
129
|
+
added?: boolean;
|
|
130
|
+
/** Line item fields before the change. */
|
|
131
|
+
changedDetails?: ItemChangedDetails;
|
|
132
|
+
/** Whether the line item was removed as part of the draft. */
|
|
133
|
+
removed?: boolean;
|
|
134
|
+
/** Line item details after applied changes. */
|
|
135
|
+
lineItem?: OrderLineItem;
|
|
136
|
+
}
|
|
137
|
+
/** @oneof */
|
|
138
|
+
interface ItemDetailsChangeTypeOneOf {
|
|
139
|
+
/** Whether the line item was added as part of the draft. */
|
|
140
|
+
added?: boolean;
|
|
141
|
+
/** Line item fields before the change. */
|
|
142
|
+
changedDetails?: ItemChangedDetails;
|
|
143
|
+
/** Whether the line item was removed as part of the draft. */
|
|
144
|
+
removed?: boolean;
|
|
145
|
+
}
|
|
146
|
+
interface Price {
|
|
147
|
+
/**
|
|
148
|
+
* Amount.
|
|
149
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
150
|
+
*/
|
|
151
|
+
amount?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Amount formatted with currency symbol.
|
|
154
|
+
* @readonly
|
|
155
|
+
*/
|
|
156
|
+
formattedAmount?: string;
|
|
157
|
+
}
|
|
158
|
+
interface PriceDescription {
|
|
159
|
+
/**
|
|
160
|
+
* __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).
|
|
161
|
+
* @minLength 1
|
|
162
|
+
* @maxLength 100
|
|
163
|
+
*/
|
|
164
|
+
original?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Price description translated into the buyer's language.
|
|
167
|
+
*
|
|
168
|
+
* Default: Same as `original`.
|
|
169
|
+
* @minLength 1
|
|
170
|
+
* @maxLength 100
|
|
171
|
+
*/
|
|
172
|
+
translated?: string | null;
|
|
173
|
+
}
|
|
174
|
+
interface OrderLineItem {
|
|
175
|
+
/**
|
|
176
|
+
* Line item ID.
|
|
177
|
+
* @immutable
|
|
178
|
+
*/
|
|
179
|
+
id?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Item name.
|
|
182
|
+
* + Stores - `product.name`
|
|
183
|
+
* + Bookings - `service.info.name`
|
|
184
|
+
* + Events - `ticket.name`
|
|
185
|
+
*/
|
|
186
|
+
productName?: ProductName;
|
|
187
|
+
/**
|
|
188
|
+
* References to the line item's origin catalog.
|
|
189
|
+
* This field may be empty in the case of a custom line item.
|
|
190
|
+
*/
|
|
191
|
+
catalogReference?: CatalogReference;
|
|
192
|
+
/**
|
|
193
|
+
* Line item quantity.
|
|
194
|
+
* @min 1
|
|
195
|
+
* @max 100000
|
|
196
|
+
*/
|
|
197
|
+
quantity?: number;
|
|
198
|
+
/**
|
|
199
|
+
* Total discount for this line item's entire quantity.
|
|
200
|
+
* @readonly
|
|
201
|
+
*/
|
|
202
|
+
totalDiscount?: Price;
|
|
203
|
+
/**
|
|
204
|
+
* Line item description lines. Used for display purposes for the cart, checkout and order.
|
|
205
|
+
* @maxSize 20
|
|
206
|
+
*/
|
|
207
|
+
descriptionLines?: DescriptionLine[];
|
|
208
|
+
/** Line item image. */
|
|
209
|
+
image?: Image;
|
|
210
|
+
/** Physical properties of the item. When relevant, contains information such as SKU and item weight. */
|
|
211
|
+
physicalProperties?: PhysicalProperties;
|
|
212
|
+
/** Item type. Either a preset type or custom. */
|
|
213
|
+
itemType?: ItemType;
|
|
214
|
+
/**
|
|
215
|
+
* Fulfiller ID. Field is empty when the line item is self-fulfilled.
|
|
216
|
+
* 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).
|
|
217
|
+
* @format GUID
|
|
218
|
+
*/
|
|
219
|
+
fulfillerId?: string | null;
|
|
220
|
+
/**
|
|
221
|
+
* Number of items that were refunded.
|
|
222
|
+
* @max 100000
|
|
223
|
+
*/
|
|
224
|
+
refundQuantity?: number | null;
|
|
225
|
+
/**
|
|
226
|
+
* Number of items restocked.
|
|
227
|
+
* @max 100000
|
|
228
|
+
*/
|
|
229
|
+
restockQuantity?: number | null;
|
|
230
|
+
/** Line item price after line item discounts for display purposes. */
|
|
231
|
+
price?: Price;
|
|
232
|
+
/**
|
|
233
|
+
* Line item price before line item discounts for display purposes. Defaults to `price` when not provided.
|
|
234
|
+
* @readonly
|
|
235
|
+
*/
|
|
236
|
+
priceBeforeDiscounts?: Price;
|
|
237
|
+
/**
|
|
238
|
+
* Total price after discounts, and before tax.
|
|
239
|
+
* @readonly
|
|
240
|
+
*/
|
|
241
|
+
totalPriceBeforeTax?: Price;
|
|
242
|
+
/**
|
|
243
|
+
* Total price after all discounts and tax.
|
|
244
|
+
* @readonly
|
|
245
|
+
*/
|
|
246
|
+
totalPriceAfterTax?: Price;
|
|
247
|
+
/**
|
|
248
|
+
* Type of selected payment option for current item.
|
|
249
|
+
*
|
|
250
|
+
* Default: `FULL_PAYMENT_ONLINE`
|
|
251
|
+
*/
|
|
252
|
+
paymentOption?: PaymentOptionType;
|
|
253
|
+
/**
|
|
254
|
+
* Deprecated. Use `taxInfo` instead.
|
|
255
|
+
* This field will be removed on September 30, 2024.
|
|
256
|
+
* Tax details for this line item.
|
|
257
|
+
* @deprecated Deprecated. Use `taxInfo` instead.
|
|
258
|
+
* This field will be removed on September 30, 2024.
|
|
259
|
+
* Tax details for this line item.
|
|
260
|
+
* @replacedBy tax_info
|
|
261
|
+
* @targetRemovalDate 2024-09-30
|
|
262
|
+
*/
|
|
263
|
+
taxDetails?: ItemTaxFullDetails;
|
|
264
|
+
/** Represents all the relevant tax details for a specific line item. */
|
|
265
|
+
taxInfo?: LineItemTaxInfo;
|
|
266
|
+
/** Digital file identifier, relevant only for items with type DIGITAL. */
|
|
267
|
+
digitalFile?: DigitalFile;
|
|
268
|
+
/** Subscription info. */
|
|
269
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
270
|
+
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
271
|
+
priceDescription?: PriceDescription;
|
|
272
|
+
/**
|
|
273
|
+
* Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`.
|
|
274
|
+
* @readonly
|
|
275
|
+
*/
|
|
276
|
+
depositAmount?: Price;
|
|
277
|
+
/**
|
|
278
|
+
* Line item locations.
|
|
279
|
+
*
|
|
280
|
+
* The location's total quantity must not exceed the line item quantity.
|
|
281
|
+
* @maxSize 5
|
|
282
|
+
*/
|
|
283
|
+
locations?: LocationAndQuantity[];
|
|
284
|
+
/**
|
|
285
|
+
* Custom extended fields for the line item object.
|
|
286
|
+
*
|
|
287
|
+
* [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.
|
|
288
|
+
*/
|
|
289
|
+
extendedFields?: ExtendedFields;
|
|
290
|
+
}
|
|
291
|
+
interface ProductName {
|
|
292
|
+
/**
|
|
293
|
+
* __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).
|
|
294
|
+
*
|
|
295
|
+
* Min: 1 character.
|
|
296
|
+
* Max: 200 characters.
|
|
297
|
+
* @minLength 1
|
|
298
|
+
* @maxLength 200
|
|
299
|
+
*/
|
|
300
|
+
original?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Item name translated into the buyer's language.
|
|
303
|
+
*
|
|
304
|
+
* Min: 1 character.
|
|
305
|
+
* Max: 400 characters.
|
|
306
|
+
* Default: Same as `original`.
|
|
307
|
+
* @minLength 1
|
|
308
|
+
* @maxLength 400
|
|
309
|
+
*/
|
|
310
|
+
translated?: string | null;
|
|
311
|
+
}
|
|
312
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
313
|
+
interface CatalogReference {
|
|
314
|
+
/**
|
|
315
|
+
* ID of the item within the catalog it belongs to.
|
|
316
|
+
* @minLength 1
|
|
317
|
+
* @maxLength 36
|
|
318
|
+
*/
|
|
319
|
+
catalogItemId?: string;
|
|
320
|
+
/**
|
|
321
|
+
* ID of the app providing the catalog.
|
|
322
|
+
*
|
|
323
|
+
* You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
324
|
+
*
|
|
325
|
+
* For items from Wix catalogs, the following values always apply:
|
|
326
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
327
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
328
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
329
|
+
* @minLength 1
|
|
330
|
+
*/
|
|
331
|
+
appId?: string;
|
|
332
|
+
/**
|
|
333
|
+
* 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.
|
|
334
|
+
*
|
|
335
|
+
* For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
|
|
336
|
+
*/
|
|
337
|
+
options?: Record<string, any> | null;
|
|
338
|
+
}
|
|
339
|
+
interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
340
|
+
/** Description line plain text value. */
|
|
341
|
+
plainText?: PlainTextValue;
|
|
342
|
+
/** Description line color value. */
|
|
343
|
+
colorInfo?: Color;
|
|
344
|
+
/** Description line name. */
|
|
345
|
+
name?: DescriptionLineName;
|
|
346
|
+
}
|
|
347
|
+
/** @oneof */
|
|
348
|
+
interface DescriptionLineValueOneOf {
|
|
349
|
+
/** Description line plain text value. */
|
|
350
|
+
plainText?: PlainTextValue;
|
|
351
|
+
/** Description line color value. */
|
|
352
|
+
colorInfo?: Color;
|
|
353
|
+
}
|
|
354
|
+
/** @oneof */
|
|
355
|
+
interface DescriptionLineDescriptionLineValueOneOf {
|
|
356
|
+
}
|
|
357
|
+
interface DescriptionLineName {
|
|
358
|
+
/**
|
|
359
|
+
* 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).
|
|
360
|
+
* @maxLength 100
|
|
361
|
+
*/
|
|
362
|
+
original?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Description line name translated into the buyer's language.
|
|
365
|
+
*
|
|
366
|
+
* Default: Same as `original`.
|
|
367
|
+
* @maxLength 200
|
|
368
|
+
*/
|
|
369
|
+
translated?: string | null;
|
|
370
|
+
}
|
|
371
|
+
interface PlainTextValue {
|
|
372
|
+
/**
|
|
373
|
+
* 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).
|
|
374
|
+
* @maxLength 600
|
|
375
|
+
*/
|
|
376
|
+
original?: string;
|
|
377
|
+
/**
|
|
378
|
+
* Description line plain text value translated into the buyer's language.
|
|
379
|
+
*
|
|
380
|
+
* Default: Same as `original`.
|
|
381
|
+
* @maxLength 600
|
|
382
|
+
*/
|
|
383
|
+
translated?: string | null;
|
|
384
|
+
}
|
|
385
|
+
interface Color {
|
|
386
|
+
/**
|
|
387
|
+
* 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).
|
|
388
|
+
* @maxLength 500
|
|
389
|
+
*/
|
|
390
|
+
original?: string;
|
|
391
|
+
/**
|
|
392
|
+
* Description line color name translated into the buyer's language.
|
|
393
|
+
*
|
|
394
|
+
* Default: Same as `original`.
|
|
395
|
+
* @maxLength 500
|
|
396
|
+
*/
|
|
397
|
+
translated?: string | null;
|
|
398
|
+
/** HEX or RGB color code for display. */
|
|
399
|
+
code?: string | null;
|
|
400
|
+
}
|
|
401
|
+
interface Image {
|
|
402
|
+
/** WixMedia image ID. */
|
|
403
|
+
id?: string;
|
|
404
|
+
/** Image URL. */
|
|
405
|
+
url?: string;
|
|
406
|
+
/**
|
|
407
|
+
* Original image height.
|
|
408
|
+
* @readonly
|
|
409
|
+
*/
|
|
410
|
+
height?: number;
|
|
411
|
+
/**
|
|
412
|
+
* Original image width.
|
|
413
|
+
* @readonly
|
|
414
|
+
*/
|
|
415
|
+
width?: number;
|
|
416
|
+
/** Image alt text. */
|
|
417
|
+
altText?: string | null;
|
|
418
|
+
/**
|
|
419
|
+
* Image filename.
|
|
420
|
+
* @readonly
|
|
421
|
+
*/
|
|
422
|
+
filename?: string | null;
|
|
423
|
+
}
|
|
424
|
+
interface PhysicalProperties {
|
|
425
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
426
|
+
weight?: number | null;
|
|
427
|
+
/**
|
|
428
|
+
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
429
|
+
* @maxLength 40
|
|
430
|
+
*/
|
|
431
|
+
sku?: string | null;
|
|
432
|
+
/** Whether this line item is shippable. */
|
|
433
|
+
shippable?: boolean;
|
|
434
|
+
}
|
|
435
|
+
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
436
|
+
/** Preset item type. */
|
|
437
|
+
preset?: ItemTypeItemType;
|
|
438
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
439
|
+
custom?: string;
|
|
440
|
+
}
|
|
441
|
+
/** @oneof */
|
|
442
|
+
interface ItemTypeItemTypeDataOneOf {
|
|
443
|
+
/** Preset item type. */
|
|
444
|
+
preset?: ItemTypeItemType;
|
|
445
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
446
|
+
custom?: string;
|
|
447
|
+
}
|
|
448
|
+
declare enum ItemTypeItemType {
|
|
449
|
+
UNRECOGNISED = "UNRECOGNISED",
|
|
450
|
+
PHYSICAL = "PHYSICAL",
|
|
451
|
+
DIGITAL = "DIGITAL",
|
|
452
|
+
GIFT_CARD = "GIFT_CARD",
|
|
453
|
+
SERVICE = "SERVICE"
|
|
454
|
+
}
|
|
455
|
+
/** Type of selected payment option for catalog item */
|
|
456
|
+
declare enum PaymentOptionType {
|
|
457
|
+
/** The entire payment for this item happens as part of the checkout. */
|
|
458
|
+
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
459
|
+
/** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
|
|
460
|
+
FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
|
|
461
|
+
/** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
|
|
462
|
+
MEMBERSHIP = "MEMBERSHIP",
|
|
463
|
+
/** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
|
|
464
|
+
DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
|
|
465
|
+
/** 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`. */
|
|
466
|
+
MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
|
|
467
|
+
}
|
|
468
|
+
interface ItemTaxFullDetails {
|
|
469
|
+
/** Taxable amount of this line item. */
|
|
470
|
+
taxableAmount?: Price;
|
|
471
|
+
/**
|
|
472
|
+
* Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`.
|
|
473
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
474
|
+
*/
|
|
475
|
+
taxRate?: string;
|
|
476
|
+
/** The calculated tax, based on the `taxableAmount` and `taxRate`. */
|
|
477
|
+
totalTax?: Price;
|
|
478
|
+
}
|
|
479
|
+
interface LineItemTaxInfo {
|
|
480
|
+
/** Calculated tax, based on `taxable_amount` and `tax_rate`. */
|
|
481
|
+
taxAmount?: Price;
|
|
482
|
+
/** Amount for which tax is calculated. */
|
|
483
|
+
taxableAmount?: Price;
|
|
484
|
+
/**
|
|
485
|
+
* Tax rate %, as a decimal point.
|
|
486
|
+
* @format DECIMAL_VALUE
|
|
487
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
488
|
+
*/
|
|
489
|
+
taxRate?: string | null;
|
|
490
|
+
/**
|
|
491
|
+
* Tax group ID.
|
|
492
|
+
* @format GUID
|
|
493
|
+
*/
|
|
494
|
+
taxGroupId?: string | null;
|
|
495
|
+
/** Indicates whether the price already includes tax. */
|
|
496
|
+
taxIncludedInPrice?: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Tax information for a line item.
|
|
499
|
+
* @maxSize 7
|
|
500
|
+
*/
|
|
501
|
+
taxBreakdown?: LineItemTaxBreakdown[];
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* TaxBreakdown represents tax information for a line item.
|
|
505
|
+
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
506
|
+
*/
|
|
507
|
+
interface LineItemTaxBreakdown {
|
|
508
|
+
/**
|
|
509
|
+
* Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec".
|
|
510
|
+
* @maxLength 200
|
|
511
|
+
*/
|
|
512
|
+
jurisdiction?: string | null;
|
|
513
|
+
/**
|
|
514
|
+
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000.
|
|
515
|
+
* @format DECIMAL_VALUE
|
|
516
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
517
|
+
*/
|
|
518
|
+
rate?: string | null;
|
|
519
|
+
/** Amount of tax calculated for this line item. */
|
|
520
|
+
taxAmount?: Price;
|
|
521
|
+
/**
|
|
522
|
+
* The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
|
|
523
|
+
* @maxLength 200
|
|
524
|
+
*/
|
|
525
|
+
taxType?: string | null;
|
|
526
|
+
/**
|
|
527
|
+
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
528
|
+
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
529
|
+
* @maxLength 200
|
|
530
|
+
*/
|
|
531
|
+
taxName?: string | null;
|
|
532
|
+
/** Type of jurisdiction that taxes were calculated for. */
|
|
533
|
+
jurisdictionType?: JurisdictionType;
|
|
534
|
+
/** Non-taxable amount of the line item price. */
|
|
535
|
+
nonTaxableAmount?: Price;
|
|
536
|
+
/** Taxable amount of the line item price. */
|
|
537
|
+
taxableAmount?: Price;
|
|
538
|
+
}
|
|
539
|
+
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
540
|
+
declare enum JurisdictionType {
|
|
541
|
+
UNDEFINED = "UNDEFINED",
|
|
542
|
+
COUNTRY = "COUNTRY",
|
|
543
|
+
STATE = "STATE",
|
|
544
|
+
COUNTY = "COUNTY",
|
|
545
|
+
CITY = "CITY",
|
|
546
|
+
SPECIAL = "SPECIAL"
|
|
547
|
+
}
|
|
548
|
+
interface DigitalFile {
|
|
549
|
+
/**
|
|
550
|
+
* ID of the secure file in media.
|
|
551
|
+
* @minLength 1
|
|
552
|
+
* @maxLength 100
|
|
553
|
+
*/
|
|
554
|
+
fileId?: string;
|
|
555
|
+
/**
|
|
556
|
+
* Link will exist after the digital links have been generated on the order.
|
|
557
|
+
* @format WEB_URL
|
|
558
|
+
* @minLength 1
|
|
559
|
+
* @maxLength 2000
|
|
560
|
+
*/
|
|
561
|
+
link?: string | null;
|
|
562
|
+
/**
|
|
563
|
+
* Link expiration time and date.
|
|
564
|
+
* @readonly
|
|
565
|
+
*/
|
|
566
|
+
expirationDate?: Date | null;
|
|
567
|
+
}
|
|
568
|
+
interface SubscriptionInfo {
|
|
569
|
+
/**
|
|
570
|
+
* Subscription ID.
|
|
571
|
+
* @format GUID
|
|
572
|
+
*/
|
|
573
|
+
id?: string | null;
|
|
574
|
+
/**
|
|
575
|
+
* Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`.
|
|
576
|
+
* @min 1
|
|
577
|
+
*/
|
|
578
|
+
cycleNumber?: number;
|
|
579
|
+
/**
|
|
580
|
+
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
581
|
+
* @maxLength 20
|
|
582
|
+
* @deprecated Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
583
|
+
* @replacedBy title
|
|
584
|
+
* @targetRemovalDate 2025-10-01
|
|
585
|
+
*/
|
|
586
|
+
subscriptionOptionTitle?: string;
|
|
587
|
+
/**
|
|
588
|
+
* Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
589
|
+
* @maxLength 60
|
|
590
|
+
* @deprecated Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
591
|
+
* @replacedBy description
|
|
592
|
+
* @targetRemovalDate 2025-10-01
|
|
593
|
+
*/
|
|
594
|
+
subscriptionOptionDescription?: string | null;
|
|
595
|
+
/**
|
|
596
|
+
* Subscription detailed information.
|
|
597
|
+
* @immutable
|
|
598
|
+
*/
|
|
599
|
+
subscriptionSettings?: SubscriptionSettings;
|
|
600
|
+
}
|
|
601
|
+
interface SubscriptionSettings {
|
|
602
|
+
/** Frequency of recurring payment. */
|
|
603
|
+
frequency?: SubscriptionFrequency;
|
|
604
|
+
/**
|
|
605
|
+
* Interval of recurring payment.
|
|
606
|
+
* @min 1
|
|
607
|
+
* @max 50
|
|
608
|
+
*/
|
|
609
|
+
interval?: number | null;
|
|
610
|
+
/** Whether subscription is renewed automatically at the end of each period. */
|
|
611
|
+
autoRenewal?: boolean;
|
|
612
|
+
/**
|
|
613
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
|
|
614
|
+
* @min 1
|
|
615
|
+
*/
|
|
616
|
+
billingCycles?: number | null;
|
|
617
|
+
}
|
|
618
|
+
/** Frequency unit of recurring payment */
|
|
619
|
+
declare enum SubscriptionFrequency {
|
|
620
|
+
UNDEFINED = "UNDEFINED",
|
|
621
|
+
DAY = "DAY",
|
|
622
|
+
WEEK = "WEEK",
|
|
623
|
+
MONTH = "MONTH",
|
|
624
|
+
YEAR = "YEAR"
|
|
625
|
+
}
|
|
626
|
+
interface LocationAndQuantity {
|
|
627
|
+
/**
|
|
628
|
+
* Location id in the associated owner app.
|
|
629
|
+
* @format GUID
|
|
630
|
+
*/
|
|
631
|
+
id?: string;
|
|
632
|
+
/**
|
|
633
|
+
* Location owner app, if not provided then the site business info locations will be used.
|
|
634
|
+
* @format GUID
|
|
635
|
+
* @deprecated Location owner app, if not provided then the site business info locations will be used.
|
|
636
|
+
* @targetRemovalDate 2025-03-01
|
|
637
|
+
*/
|
|
638
|
+
appId?: string | null;
|
|
639
|
+
/**
|
|
640
|
+
* Quantity for specific location.
|
|
641
|
+
* @min 1
|
|
642
|
+
* @max 100000
|
|
643
|
+
*/
|
|
644
|
+
quantity?: number;
|
|
645
|
+
/**
|
|
646
|
+
* Location name.
|
|
647
|
+
* @maxLength 500
|
|
648
|
+
* @readonly
|
|
649
|
+
*/
|
|
650
|
+
name?: string | null;
|
|
651
|
+
}
|
|
652
|
+
interface ExtendedFields {
|
|
653
|
+
/**
|
|
654
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
655
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
656
|
+
*
|
|
657
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
658
|
+
*
|
|
659
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
660
|
+
*/
|
|
661
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
662
|
+
}
|
|
663
|
+
interface ItemChangedDetails {
|
|
664
|
+
/**
|
|
665
|
+
* Line item quantity before change.
|
|
666
|
+
* @min 1
|
|
667
|
+
* @max 1000000
|
|
668
|
+
*/
|
|
669
|
+
quantityBeforeChange?: number | null;
|
|
670
|
+
/** Line item price before change. */
|
|
671
|
+
priceBeforeChange?: Price;
|
|
672
|
+
/** Line item price description before change. */
|
|
673
|
+
priceDescriptionBeforeChange?: PriceDescription;
|
|
674
|
+
}
|
|
675
|
+
interface ShippingDetails extends ShippingDetailsChangeTypeOneOf {
|
|
676
|
+
/** Whether shipping info was added as part of the draft. */
|
|
677
|
+
added?: boolean;
|
|
678
|
+
/** Shipping info before the change. */
|
|
679
|
+
changedDetails?: ShippingChangedDetails;
|
|
680
|
+
/** Whether shipping info was removed as part of the draft. */
|
|
681
|
+
removed?: boolean;
|
|
682
|
+
/** Selected Shipping details. */
|
|
683
|
+
shippingInfo?: V1ShippingInformation;
|
|
684
|
+
}
|
|
685
|
+
/** @oneof */
|
|
686
|
+
interface ShippingDetailsChangeTypeOneOf {
|
|
687
|
+
/** Whether shipping info was added as part of the draft. */
|
|
688
|
+
added?: boolean;
|
|
689
|
+
/** Shipping info before the change. */
|
|
690
|
+
changedDetails?: ShippingChangedDetails;
|
|
691
|
+
/** Whether shipping info was removed as part of the draft. */
|
|
692
|
+
removed?: boolean;
|
|
693
|
+
}
|
|
694
|
+
interface V1ShippingInformation {
|
|
695
|
+
/**
|
|
696
|
+
* App Def Id of external provider which was a source of shipping info
|
|
697
|
+
* @minLength 1
|
|
698
|
+
* @maxLength 100
|
|
699
|
+
*/
|
|
700
|
+
carrierId?: string | null;
|
|
701
|
+
/**
|
|
702
|
+
* Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`.
|
|
703
|
+
* @minLength 1
|
|
704
|
+
* @maxLength 100
|
|
705
|
+
*/
|
|
706
|
+
code?: string | null;
|
|
707
|
+
/**
|
|
708
|
+
* Shipping option title.
|
|
709
|
+
* For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
|
|
710
|
+
* @maxLength 250
|
|
711
|
+
*/
|
|
712
|
+
title?: string;
|
|
713
|
+
/** Shipping logistics. */
|
|
714
|
+
logistics?: V1DeliveryLogistics;
|
|
715
|
+
/** Shipping costs. */
|
|
716
|
+
cost?: V1ShippingPrice;
|
|
717
|
+
/** Shipping region. */
|
|
718
|
+
region?: ShippingRegion;
|
|
719
|
+
}
|
|
720
|
+
interface V1DeliveryLogistics extends V1DeliveryLogisticsAddressOneOf {
|
|
721
|
+
/** Shipping address and contact details. */
|
|
722
|
+
shippingDestination?: AddressWithContact;
|
|
723
|
+
/** Pickup details. */
|
|
724
|
+
pickupDetails?: V1PickupDetails;
|
|
725
|
+
/**
|
|
726
|
+
* Expected delivery time in free text. For example, `"3-5 business days"`.
|
|
727
|
+
* @maxLength 500
|
|
728
|
+
*/
|
|
729
|
+
deliveryTime?: string | null;
|
|
730
|
+
/**
|
|
731
|
+
* Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`.
|
|
732
|
+
* @maxLength 1000
|
|
733
|
+
*/
|
|
734
|
+
instructions?: string | null;
|
|
735
|
+
/**
|
|
736
|
+
* Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
737
|
+
* @deprecated
|
|
738
|
+
*/
|
|
739
|
+
deliverByDate?: Date | null;
|
|
740
|
+
/** Expected delivery time. */
|
|
741
|
+
deliveryTimeSlot?: V1DeliveryTimeSlot;
|
|
742
|
+
}
|
|
743
|
+
/** @oneof */
|
|
744
|
+
interface V1DeliveryLogisticsAddressOneOf {
|
|
745
|
+
/** Shipping address and contact details. */
|
|
746
|
+
shippingDestination?: AddressWithContact;
|
|
747
|
+
/** Pickup details. */
|
|
748
|
+
pickupDetails?: V1PickupDetails;
|
|
749
|
+
}
|
|
750
|
+
/** Billing Info and shipping details */
|
|
751
|
+
interface AddressWithContact {
|
|
752
|
+
/** Address. */
|
|
753
|
+
address?: Address;
|
|
754
|
+
/** Contact details. */
|
|
755
|
+
contactDetails?: FullAddressContactDetails;
|
|
756
|
+
}
|
|
757
|
+
/** Physical address */
|
|
758
|
+
interface Address {
|
|
759
|
+
/**
|
|
760
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
761
|
+
* @format COUNTRY
|
|
762
|
+
*/
|
|
763
|
+
country?: string | null;
|
|
764
|
+
/**
|
|
765
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
766
|
+
* @maxLength 50
|
|
767
|
+
*/
|
|
768
|
+
subdivision?: string | null;
|
|
769
|
+
/**
|
|
770
|
+
* City name.
|
|
771
|
+
* @maxLength 50
|
|
772
|
+
*/
|
|
773
|
+
city?: string | null;
|
|
774
|
+
/**
|
|
775
|
+
* Postal or zip code.
|
|
776
|
+
* @maxLength 50
|
|
777
|
+
*/
|
|
778
|
+
postalCode?: string | null;
|
|
779
|
+
/** Street address. */
|
|
780
|
+
streetAddress?: StreetAddress;
|
|
781
|
+
/**
|
|
782
|
+
* Main address line (usually street name and number).
|
|
783
|
+
* @maxLength 150
|
|
784
|
+
*/
|
|
785
|
+
addressLine?: string | null;
|
|
786
|
+
/**
|
|
787
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
788
|
+
* @maxLength 100
|
|
789
|
+
*/
|
|
790
|
+
addressLine2?: string | null;
|
|
791
|
+
/**
|
|
792
|
+
* Country's full name.
|
|
793
|
+
* @readonly
|
|
794
|
+
*/
|
|
795
|
+
countryFullname?: string | null;
|
|
796
|
+
/**
|
|
797
|
+
* Subdivision full-name.
|
|
798
|
+
* @readonly
|
|
799
|
+
*/
|
|
800
|
+
subdivisionFullname?: string | null;
|
|
801
|
+
}
|
|
802
|
+
interface StreetAddress {
|
|
803
|
+
/** Street number. */
|
|
804
|
+
number?: string;
|
|
805
|
+
/** Street name. */
|
|
806
|
+
name?: string;
|
|
807
|
+
}
|
|
808
|
+
/** Full contact details for an address */
|
|
809
|
+
interface FullAddressContactDetails {
|
|
810
|
+
/**
|
|
811
|
+
* First name.
|
|
812
|
+
* @maxLength 100
|
|
813
|
+
*/
|
|
814
|
+
firstName?: string | null;
|
|
815
|
+
/**
|
|
816
|
+
* Last name.
|
|
817
|
+
* @maxLength 100
|
|
818
|
+
*/
|
|
819
|
+
lastName?: string | null;
|
|
820
|
+
/**
|
|
821
|
+
* Phone number.
|
|
822
|
+
* @format PHONE
|
|
823
|
+
*/
|
|
824
|
+
phone?: string | null;
|
|
825
|
+
/**
|
|
826
|
+
* Company name.
|
|
827
|
+
* @maxLength 1000
|
|
828
|
+
*/
|
|
829
|
+
company?: string | null;
|
|
830
|
+
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
831
|
+
vatId?: VatId;
|
|
832
|
+
}
|
|
833
|
+
interface VatId {
|
|
834
|
+
/** Customer's tax ID. */
|
|
835
|
+
id?: string;
|
|
836
|
+
/**
|
|
837
|
+
* Tax type.
|
|
838
|
+
*
|
|
839
|
+
* Supported values:
|
|
840
|
+
* + `CPF`: for individual tax payers
|
|
841
|
+
* + `CNPJ`: for corporations
|
|
842
|
+
*/
|
|
843
|
+
type?: VatType;
|
|
844
|
+
}
|
|
845
|
+
/** tax info types */
|
|
846
|
+
declare enum VatType {
|
|
847
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
848
|
+
/** CPF - for individual tax payers. */
|
|
849
|
+
CPF = "CPF",
|
|
850
|
+
/** CNPJ - for corporations */
|
|
851
|
+
CNPJ = "CNPJ"
|
|
852
|
+
}
|
|
853
|
+
interface V1PickupDetails {
|
|
854
|
+
/** Pickup address. */
|
|
855
|
+
address?: PickupAddress;
|
|
856
|
+
/** Pickup method */
|
|
857
|
+
pickupMethod?: PickupDetailsPickupMethod;
|
|
858
|
+
}
|
|
859
|
+
/** Physical address */
|
|
860
|
+
interface PickupAddress {
|
|
861
|
+
/**
|
|
862
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
863
|
+
* @format COUNTRY
|
|
864
|
+
*/
|
|
865
|
+
country?: string | null;
|
|
866
|
+
/**
|
|
867
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
868
|
+
* @maxLength 50
|
|
869
|
+
*/
|
|
870
|
+
subdivision?: string | null;
|
|
871
|
+
/**
|
|
872
|
+
* City name.
|
|
873
|
+
* @maxLength 1000
|
|
874
|
+
*/
|
|
875
|
+
city?: string | null;
|
|
876
|
+
/**
|
|
877
|
+
* Postal or zip code.
|
|
878
|
+
* @maxLength 1000
|
|
879
|
+
*/
|
|
880
|
+
postalCode?: string | null;
|
|
881
|
+
/** Street address object, with number, name, and apartment number in separate fields. */
|
|
882
|
+
streetAddress?: StreetAddress;
|
|
883
|
+
/**
|
|
884
|
+
* Main address line (usually street name and number).
|
|
885
|
+
* @maxLength 1000
|
|
886
|
+
*/
|
|
887
|
+
addressLine?: string | null;
|
|
888
|
+
/**
|
|
889
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
890
|
+
* @maxLength 1000
|
|
891
|
+
*/
|
|
892
|
+
addressLine2?: string | null;
|
|
893
|
+
/**
|
|
894
|
+
* Country's full name.
|
|
895
|
+
* @readonly
|
|
896
|
+
*/
|
|
897
|
+
countryFullname?: string | null;
|
|
898
|
+
/**
|
|
899
|
+
* Subdivision full-name.
|
|
900
|
+
* @readonly
|
|
901
|
+
*/
|
|
902
|
+
subdivisionFullname?: string | null;
|
|
903
|
+
}
|
|
904
|
+
declare enum PickupDetailsPickupMethod {
|
|
905
|
+
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
906
|
+
STORE_PICKUP = "STORE_PICKUP",
|
|
907
|
+
PICKUP_POINT = "PICKUP_POINT"
|
|
908
|
+
}
|
|
909
|
+
interface V1DeliveryTimeSlot {
|
|
910
|
+
/** Delivery slot starting time. */
|
|
911
|
+
from?: Date | null;
|
|
912
|
+
/** Delivery slot ending time. */
|
|
913
|
+
to?: Date | null;
|
|
914
|
+
}
|
|
915
|
+
interface V1ShippingPrice {
|
|
916
|
+
/** Shipping price for display purposes. */
|
|
917
|
+
price?: Price;
|
|
918
|
+
/**
|
|
919
|
+
* Total price of shipping after discounts (when relevant), and before tax.
|
|
920
|
+
* @readonly
|
|
921
|
+
*/
|
|
922
|
+
totalPriceBeforeTax?: Price;
|
|
923
|
+
/**
|
|
924
|
+
* Shipping price after all discounts (if any exist), and after tax.
|
|
925
|
+
* @readonly
|
|
926
|
+
*/
|
|
927
|
+
totalPriceAfterTax?: Price;
|
|
928
|
+
/** Tax details. */
|
|
929
|
+
taxDetails?: ItemTaxFullDetails;
|
|
930
|
+
/**
|
|
931
|
+
* Shipping discount before tax.
|
|
932
|
+
* @readonly
|
|
933
|
+
*/
|
|
934
|
+
discount?: Price;
|
|
935
|
+
}
|
|
936
|
+
interface ShippingRegion {
|
|
937
|
+
/**
|
|
938
|
+
* Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
|
|
939
|
+
* @maxLength 100
|
|
940
|
+
*/
|
|
941
|
+
name?: string | null;
|
|
942
|
+
}
|
|
943
|
+
interface ShippingChangedDetails {
|
|
944
|
+
/** Shipping info before the change. */
|
|
945
|
+
shippingInfoBeforeChange?: V1ShippingInformation;
|
|
946
|
+
}
|
|
947
|
+
/** Buyer Info */
|
|
948
|
+
interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
949
|
+
/**
|
|
950
|
+
* Visitor ID (if site visitor is not a member).
|
|
951
|
+
* @format GUID
|
|
952
|
+
*/
|
|
953
|
+
visitorId?: string;
|
|
954
|
+
/**
|
|
955
|
+
* Member ID (if site visitor is a site member).
|
|
956
|
+
* @format GUID
|
|
957
|
+
*/
|
|
958
|
+
memberId?: string;
|
|
959
|
+
/**
|
|
960
|
+
* 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).
|
|
961
|
+
* @format GUID
|
|
962
|
+
*/
|
|
963
|
+
contactId?: string | null;
|
|
964
|
+
/**
|
|
965
|
+
* Buyer email address.
|
|
966
|
+
* @format EMAIL
|
|
967
|
+
*/
|
|
968
|
+
email?: string | null;
|
|
969
|
+
}
|
|
970
|
+
/** @oneof */
|
|
971
|
+
interface BuyerInfoIdOneOf {
|
|
972
|
+
/**
|
|
973
|
+
* Visitor ID (if site visitor is not a member).
|
|
974
|
+
* @format GUID
|
|
975
|
+
*/
|
|
976
|
+
visitorId?: string;
|
|
977
|
+
/**
|
|
978
|
+
* Member ID (if site visitor is a site member).
|
|
979
|
+
* @format GUID
|
|
980
|
+
*/
|
|
981
|
+
memberId?: string;
|
|
982
|
+
}
|
|
983
|
+
interface AdditionalFeeDetails {
|
|
984
|
+
/** Additional fee. */
|
|
985
|
+
additionalFee?: AdditionalFee;
|
|
986
|
+
/** Tax details related to the additional fee. */
|
|
987
|
+
taxDetails?: TaxDetails;
|
|
988
|
+
/**
|
|
989
|
+
* Source of the additional fee.
|
|
990
|
+
*
|
|
991
|
+
* Supported values:
|
|
992
|
+
* + `ORIGINAL_ORDER`: This additional fee is part of the original order.
|
|
993
|
+
* + `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.
|
|
994
|
+
*/
|
|
995
|
+
source?: SourceType;
|
|
996
|
+
/** Whether this additional fee is applied to the order. */
|
|
997
|
+
applied?: boolean;
|
|
998
|
+
}
|
|
999
|
+
interface AdditionalFee {
|
|
1000
|
+
/**
|
|
1001
|
+
* Additional fee's unique code for future processing.
|
|
1002
|
+
* @minLength 1
|
|
1003
|
+
* @maxLength 100
|
|
1004
|
+
*/
|
|
1005
|
+
code?: string | null;
|
|
1006
|
+
/**
|
|
1007
|
+
* Name of additional fee.
|
|
1008
|
+
* @minLength 1
|
|
1009
|
+
* @maxLength 50
|
|
1010
|
+
*/
|
|
1011
|
+
name?: string;
|
|
1012
|
+
/** Additional fee's price. */
|
|
1013
|
+
price?: Price;
|
|
1014
|
+
/** Tax details. */
|
|
1015
|
+
taxDetails?: ItemTaxFullDetails;
|
|
1016
|
+
/**
|
|
1017
|
+
* SPI implementer's `appId`.
|
|
1018
|
+
* @format GUID
|
|
1019
|
+
*/
|
|
1020
|
+
providerAppId?: string | null;
|
|
1021
|
+
/** Additional fee's price before tax. */
|
|
1022
|
+
priceBeforeTax?: Price;
|
|
1023
|
+
/** Additional fee's price after tax. */
|
|
1024
|
+
priceAfterTax?: Price;
|
|
1025
|
+
/**
|
|
1026
|
+
* Additional fee's id.
|
|
1027
|
+
* @format GUID
|
|
1028
|
+
* @immutable
|
|
1029
|
+
*/
|
|
1030
|
+
id?: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* Optional - Line items associated with this additional fee.
|
|
1033
|
+
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
1034
|
+
* @format GUID
|
|
1035
|
+
*/
|
|
1036
|
+
lineItemIds?: string[];
|
|
1037
|
+
}
|
|
1038
|
+
interface TaxDetails {
|
|
1039
|
+
/** Indication if additional fee is taxable or not */
|
|
1040
|
+
taxable?: boolean;
|
|
1041
|
+
/**
|
|
1042
|
+
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1043
|
+
* @format GUID
|
|
1044
|
+
*/
|
|
1045
|
+
taxGroupId?: string | null;
|
|
1046
|
+
}
|
|
1047
|
+
declare enum SourceType {
|
|
1048
|
+
/** Part of the original order */
|
|
1049
|
+
ORIGINAL_ORDER = "ORIGINAL_ORDER",
|
|
1050
|
+
/** Added by estimate * */
|
|
1051
|
+
AUTOMATIC = "AUTOMATIC",
|
|
1052
|
+
/** Added manually to current draft order */
|
|
1053
|
+
CUSTOM = "CUSTOM"
|
|
1054
|
+
}
|
|
1055
|
+
interface DiscountDetails {
|
|
1056
|
+
/** Discount details. */
|
|
1057
|
+
discount?: AppliedDiscount;
|
|
1058
|
+
/**
|
|
1059
|
+
* Source of the discount.
|
|
1060
|
+
*
|
|
1061
|
+
* Supported values:
|
|
1062
|
+
* + `ORIGINAL_ORDER`: This discount is part of the original order.
|
|
1063
|
+
* + `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.
|
|
1064
|
+
*/
|
|
1065
|
+
source?: SourceType;
|
|
1066
|
+
/** Whether this discount is applied to the order. */
|
|
1067
|
+
applied?: boolean;
|
|
1068
|
+
}
|
|
1069
|
+
interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
1070
|
+
/** Applied coupon info. */
|
|
1071
|
+
coupon?: Coupon;
|
|
1072
|
+
/** Merchant discount. */
|
|
1073
|
+
merchantDiscount?: MerchantDiscount;
|
|
1074
|
+
/** Automatic Discount */
|
|
1075
|
+
discountRule?: DiscountRule;
|
|
1076
|
+
/**
|
|
1077
|
+
* Discount type.
|
|
1078
|
+
* * `"GLOBAL"` - discount applies to entire order.
|
|
1079
|
+
* * `"SPECIFIC-ITEMS"` - discount applies to specific items.
|
|
1080
|
+
* * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
|
|
1081
|
+
*/
|
|
1082
|
+
discountType?: AppliedDiscountDiscountType;
|
|
1083
|
+
/**
|
|
1084
|
+
* IDs of line items discount applies to.
|
|
1085
|
+
* Deprecated. Use `line_item_discounts` instead.
|
|
1086
|
+
* @format GUID
|
|
1087
|
+
* @maxSize 1
|
|
1088
|
+
* @deprecated IDs of line items discount applies to.
|
|
1089
|
+
* Deprecated. Use `line_item_discounts` instead.
|
|
1090
|
+
* @replacedBy line_item_discounts
|
|
1091
|
+
* @targetRemovalDate 2024-10-30
|
|
1092
|
+
*/
|
|
1093
|
+
lineItemIds?: string[];
|
|
1094
|
+
/**
|
|
1095
|
+
* Discount id.
|
|
1096
|
+
* @format GUID
|
|
1097
|
+
* @immutable
|
|
1098
|
+
*/
|
|
1099
|
+
id?: string | null;
|
|
1100
|
+
}
|
|
1101
|
+
/** @oneof */
|
|
1102
|
+
interface AppliedDiscountDiscountSourceOneOf {
|
|
1103
|
+
/** Applied coupon info. */
|
|
1104
|
+
coupon?: Coupon;
|
|
1105
|
+
/** Merchant discount. */
|
|
1106
|
+
merchantDiscount?: MerchantDiscount;
|
|
1107
|
+
/** Automatic Discount */
|
|
1108
|
+
discountRule?: DiscountRule;
|
|
1109
|
+
}
|
|
1110
|
+
declare enum AppliedDiscountDiscountType {
|
|
1111
|
+
GLOBAL = "GLOBAL",
|
|
1112
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
1113
|
+
SHIPPING = "SHIPPING"
|
|
1114
|
+
}
|
|
1115
|
+
/** Coupon */
|
|
1116
|
+
interface Coupon {
|
|
1117
|
+
/** Coupon ID. */
|
|
1118
|
+
id?: string;
|
|
1119
|
+
/** Coupon code. */
|
|
1120
|
+
code?: string;
|
|
1121
|
+
/** Coupon name. */
|
|
1122
|
+
name?: string;
|
|
1123
|
+
/** Coupon value. */
|
|
1124
|
+
amount?: Price;
|
|
1125
|
+
}
|
|
1126
|
+
interface MerchantDiscount extends MerchantDiscountMerchantDiscountReasonOneOf {
|
|
1127
|
+
/**
|
|
1128
|
+
* Pre-defined discount reason (optional).
|
|
1129
|
+
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
1130
|
+
*/
|
|
1131
|
+
discountReason?: DiscountReason;
|
|
1132
|
+
/**
|
|
1133
|
+
* Discount description as free text (optional).
|
|
1134
|
+
* @maxLength 200
|
|
1135
|
+
*/
|
|
1136
|
+
description?: string | null;
|
|
1137
|
+
/** Discount amount. */
|
|
1138
|
+
amount?: Price;
|
|
1139
|
+
}
|
|
1140
|
+
/** @oneof */
|
|
1141
|
+
interface MerchantDiscountMerchantDiscountReasonOneOf {
|
|
1142
|
+
/**
|
|
1143
|
+
* Pre-defined discount reason (optional).
|
|
1144
|
+
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
1145
|
+
*/
|
|
1146
|
+
discountReason?: DiscountReason;
|
|
1147
|
+
/**
|
|
1148
|
+
* Discount description as free text (optional).
|
|
1149
|
+
* @maxLength 200
|
|
1150
|
+
*/
|
|
1151
|
+
description?: string | null;
|
|
1152
|
+
}
|
|
1153
|
+
declare enum DiscountReason {
|
|
1154
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1155
|
+
EXCHANGED_ITEMS = "EXCHANGED_ITEMS",
|
|
1156
|
+
BILLING_ADJUSTMENT = "BILLING_ADJUSTMENT"
|
|
1157
|
+
}
|
|
1158
|
+
interface DiscountRule {
|
|
1159
|
+
/**
|
|
1160
|
+
* Discount rule ID
|
|
1161
|
+
* @format GUID
|
|
1162
|
+
*/
|
|
1163
|
+
id?: string;
|
|
1164
|
+
/** Discount rule name */
|
|
1165
|
+
name?: DiscountRuleName;
|
|
1166
|
+
/** Discount value. */
|
|
1167
|
+
amount?: Price;
|
|
1168
|
+
}
|
|
1169
|
+
interface DiscountRuleName {
|
|
1170
|
+
/**
|
|
1171
|
+
* Original discount rule name (in site's default language).
|
|
1172
|
+
* @minLength 1
|
|
1173
|
+
* @maxLength 256
|
|
1174
|
+
*/
|
|
1175
|
+
original?: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* Translated discount rule name according to buyer language. Defaults to `original` when not provided.
|
|
1178
|
+
* @minLength 1
|
|
1179
|
+
* @maxLength 500
|
|
1180
|
+
*/
|
|
1181
|
+
translated?: string | null;
|
|
1182
|
+
}
|
|
1183
|
+
interface CreatedBy extends CreatedByStringOneOf {
|
|
1184
|
+
/**
|
|
1185
|
+
* User ID. When the draft order was created by a Wix user.
|
|
1186
|
+
* @format GUID
|
|
1187
|
+
*/
|
|
1188
|
+
userId?: string;
|
|
1189
|
+
/**
|
|
1190
|
+
* App ID. When the draft order was created by an app.
|
|
1191
|
+
* @format GUID
|
|
1192
|
+
*/
|
|
1193
|
+
appId?: string;
|
|
1194
|
+
}
|
|
1195
|
+
/** @oneof */
|
|
1196
|
+
interface CreatedByStringOneOf {
|
|
1197
|
+
/**
|
|
1198
|
+
* User ID. When the draft order was created by a Wix user.
|
|
1199
|
+
* @format GUID
|
|
1200
|
+
*/
|
|
1201
|
+
userId?: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* App ID. When the draft order was created by an app.
|
|
1204
|
+
* @format GUID
|
|
1205
|
+
*/
|
|
1206
|
+
appId?: string;
|
|
1207
|
+
}
|
|
1208
|
+
declare enum EditingStatus {
|
|
1209
|
+
/** DraftOrder is in draft state. */
|
|
1210
|
+
DRAFT = "DRAFT",
|
|
1211
|
+
/** DraftOrder is in committed state. */
|
|
1212
|
+
COMMITTED = "COMMITTED"
|
|
1213
|
+
}
|
|
1214
|
+
declare enum WeightUnit {
|
|
1215
|
+
/** Weight unit can't be classified due to an error. */
|
|
1216
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
1217
|
+
/** Kilograms. */
|
|
1218
|
+
KG = "KG",
|
|
1219
|
+
/** Pounds. */
|
|
1220
|
+
LB = "LB"
|
|
1221
|
+
}
|
|
1222
|
+
interface PriceSummary {
|
|
1223
|
+
/** Subtotal of all the line items, before discounts and before tax. */
|
|
1224
|
+
subtotal?: Price;
|
|
1225
|
+
/** Total shipping price, before discounts and before tax. */
|
|
1226
|
+
shipping?: Price;
|
|
1227
|
+
/** Total tax on this order. */
|
|
1228
|
+
tax?: Price;
|
|
1229
|
+
/** Total calculated discount value. */
|
|
1230
|
+
discount?: Price;
|
|
1231
|
+
/** Order’s total price after discounts and tax. */
|
|
1232
|
+
total?: Price;
|
|
1233
|
+
/** Total price of additional fees before tax. */
|
|
1234
|
+
totalAdditionalFees?: Price;
|
|
1235
|
+
}
|
|
1236
|
+
interface TaxSummary {
|
|
1237
|
+
/**
|
|
1238
|
+
* Total tax.
|
|
1239
|
+
* @readonly
|
|
1240
|
+
*/
|
|
1241
|
+
totalTax?: Price;
|
|
1242
|
+
}
|
|
1243
|
+
interface BalanceSummary {
|
|
1244
|
+
/**
|
|
1245
|
+
* Amount left to pay for order to be considered paid.
|
|
1246
|
+
* @readonly
|
|
1247
|
+
*/
|
|
1248
|
+
balance?: Balance;
|
|
1249
|
+
/**
|
|
1250
|
+
* Sum of all authorized payments.
|
|
1251
|
+
* @readonly
|
|
1252
|
+
*/
|
|
1253
|
+
authorized?: Price;
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Order balance. Reflects amount left to be paid on order and is calculated dynamically. Can be negative per balance definition.
|
|
1257
|
+
* `amount` field depends on order payment status:
|
|
1258
|
+
* + UNSPECIFIED, NOT_PAID: price_summary.total_price
|
|
1259
|
+
* + PARTIALLY_PAID : price_summary.total_price - pay_now.total_price
|
|
1260
|
+
* + PENDING, REFUNDED, PARTIALLY_REFUNDED, PAID : 0
|
|
1261
|
+
*/
|
|
1262
|
+
interface Balance {
|
|
1263
|
+
/**
|
|
1264
|
+
* Balance amount.
|
|
1265
|
+
*
|
|
1266
|
+
* 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.
|
|
1267
|
+
* @decimalValue options { }
|
|
1268
|
+
* @readonly
|
|
1269
|
+
*/
|
|
1270
|
+
amount?: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* Amount formatted with currency symbol.
|
|
1273
|
+
* @readonly
|
|
1274
|
+
*/
|
|
1275
|
+
formattedAmount?: string;
|
|
1276
|
+
}
|
|
1277
|
+
/** Side-effects upon committing a draft order. */
|
|
1278
|
+
interface DraftOrderCommitSettings {
|
|
1279
|
+
/**
|
|
1280
|
+
* Whether to send notifications to the buyer.
|
|
1281
|
+
*
|
|
1282
|
+
* Default: `true`
|
|
1283
|
+
*/
|
|
1284
|
+
sendNotificationsToBuyer?: boolean | null;
|
|
1285
|
+
/**
|
|
1286
|
+
* Whether to send notifications to the business.
|
|
1287
|
+
*
|
|
1288
|
+
* Default: `true`
|
|
1289
|
+
*/
|
|
1290
|
+
sendNotificationsToBusiness?: boolean | null;
|
|
1291
|
+
/**
|
|
1292
|
+
* Whether to add activities to the order.
|
|
1293
|
+
*
|
|
1294
|
+
* Default: `true`
|
|
1295
|
+
*/
|
|
1296
|
+
addActivitiesToOrder?: boolean | null;
|
|
1297
|
+
/**
|
|
1298
|
+
* Whether to send email notifications to custom fulfillers when there is a change in the shippable items they fulfill.
|
|
1299
|
+
*
|
|
1300
|
+
* Default: `true`
|
|
1301
|
+
*/
|
|
1302
|
+
sendNotificationsToCustomFulfillers?: boolean | null;
|
|
1303
|
+
/**
|
|
1304
|
+
* Line item IDs for which to perform an inventory change.
|
|
1305
|
+
* When not provided, inventory will not change.
|
|
1306
|
+
* @maxSize 300
|
|
1307
|
+
*/
|
|
1308
|
+
updateInventory?: InventoryUpdate[];
|
|
1309
|
+
}
|
|
1310
|
+
interface InventoryUpdate {
|
|
1311
|
+
/**
|
|
1312
|
+
* Line item ID.
|
|
1313
|
+
* @format GUID
|
|
1314
|
+
*/
|
|
1315
|
+
lineItemId?: string;
|
|
1316
|
+
}
|
|
1317
|
+
interface RecipientInfoDetails extends RecipientInfoDetailsChangeTypeOneOf {
|
|
1318
|
+
/** Indicates that recipient information was added during draft. */
|
|
1319
|
+
added?: boolean;
|
|
1320
|
+
/** Indicates that recipient information was changed. Contains recipient information before draft. */
|
|
1321
|
+
changedDetails?: RecipientInfoChangedDetails;
|
|
1322
|
+
/** Indicates that recipient information was removed during draft. */
|
|
1323
|
+
removed?: boolean;
|
|
1324
|
+
/** Order recipient address and contact details. */
|
|
1325
|
+
recipientInfo?: AddressWithContact;
|
|
1326
|
+
}
|
|
1327
|
+
/** @oneof */
|
|
1328
|
+
interface RecipientInfoDetailsChangeTypeOneOf {
|
|
1329
|
+
/** Indicates that recipient information was added during draft. */
|
|
1330
|
+
added?: boolean;
|
|
1331
|
+
/** Indicates that recipient information was changed. Contains recipient information before draft. */
|
|
1332
|
+
changedDetails?: RecipientInfoChangedDetails;
|
|
1333
|
+
/** Indicates that recipient information was removed during draft. */
|
|
1334
|
+
removed?: boolean;
|
|
1335
|
+
}
|
|
1336
|
+
interface RecipientInfoChangedDetails {
|
|
1337
|
+
/** Order recipient address and contact details before draft. */
|
|
1338
|
+
recipientInfoBeforeChange?: AddressWithContact;
|
|
1339
|
+
}
|
|
1340
|
+
interface OrderTaxInfo {
|
|
1341
|
+
/** Calculated tax, added from line items. */
|
|
1342
|
+
totalTax?: Price;
|
|
1343
|
+
/**
|
|
1344
|
+
* 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.
|
|
1345
|
+
* @maxSize 50
|
|
1346
|
+
*/
|
|
1347
|
+
taxBreakdown?: OrderTaxBreakdown[];
|
|
1348
|
+
/**
|
|
1349
|
+
* Whether the order is exempt from tax calculations.
|
|
1350
|
+
*
|
|
1351
|
+
* Default: `false`
|
|
1352
|
+
* @readonly
|
|
1353
|
+
*/
|
|
1354
|
+
taxExempt?: boolean | null;
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* 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.
|
|
1358
|
+
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
1359
|
+
*/
|
|
1360
|
+
interface OrderTaxBreakdown {
|
|
1361
|
+
/**
|
|
1362
|
+
* The name of the tax against which this tax amount was calculated.
|
|
1363
|
+
* @maxLength 200
|
|
1364
|
+
*/
|
|
1365
|
+
taxName?: string;
|
|
1366
|
+
/**
|
|
1367
|
+
* The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
|
|
1368
|
+
* @maxLength 200
|
|
1369
|
+
*/
|
|
1370
|
+
taxType?: string;
|
|
1371
|
+
/**
|
|
1372
|
+
* The name of the jurisdiction in which this tax detail applies.
|
|
1373
|
+
* @maxLength 200
|
|
1374
|
+
*/
|
|
1375
|
+
jurisdiction?: string;
|
|
1376
|
+
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
1377
|
+
jurisdictionType?: JurisdictionType;
|
|
1378
|
+
/**
|
|
1379
|
+
* The rate at which this tax detail was calculated.
|
|
1380
|
+
* @format DECIMAL_VALUE
|
|
1381
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1382
|
+
*/
|
|
1383
|
+
rate?: string;
|
|
1384
|
+
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
1385
|
+
aggregatedTaxAmount?: Price;
|
|
1386
|
+
}
|
|
1387
|
+
interface BusinessLocationDetails extends BusinessLocationDetailsChangeTypeOneOf {
|
|
1388
|
+
/** Indicates that business location was added during draft. */
|
|
1389
|
+
added?: boolean;
|
|
1390
|
+
/** Indicates that business location was changed. Contains business location before draft. */
|
|
1391
|
+
changedDetails?: BusinessLocationChangedDetails;
|
|
1392
|
+
/** Indicates that business location was removed during draft. */
|
|
1393
|
+
removed?: boolean;
|
|
1394
|
+
/** Business location. */
|
|
1395
|
+
businessLocation?: Location;
|
|
1396
|
+
}
|
|
1397
|
+
/** @oneof */
|
|
1398
|
+
interface BusinessLocationDetailsChangeTypeOneOf {
|
|
1399
|
+
/** Indicates that business location was added during draft. */
|
|
1400
|
+
added?: boolean;
|
|
1401
|
+
/** Indicates that business location was changed. Contains business location before draft. */
|
|
1402
|
+
changedDetails?: BusinessLocationChangedDetails;
|
|
1403
|
+
/** Indicates that business location was removed during draft. */
|
|
1404
|
+
removed?: boolean;
|
|
1405
|
+
}
|
|
1406
|
+
interface Location {
|
|
1407
|
+
/**
|
|
1408
|
+
* Location ID.
|
|
1409
|
+
* Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
1410
|
+
* @format GUID
|
|
1411
|
+
*/
|
|
1412
|
+
id?: string;
|
|
1413
|
+
/**
|
|
1414
|
+
* Location name.
|
|
1415
|
+
* @minLength 1
|
|
1416
|
+
* @maxLength 500
|
|
1417
|
+
* @readonly
|
|
1418
|
+
*/
|
|
1419
|
+
name?: string;
|
|
1420
|
+
}
|
|
1421
|
+
interface BusinessLocationChangedDetails {
|
|
1422
|
+
/** Business location before draft. */
|
|
1423
|
+
businessLocationBeforeChange?: Location;
|
|
1424
|
+
}
|
|
1425
|
+
interface CreateDraftOrderRequest {
|
|
1426
|
+
/**
|
|
1427
|
+
* To create a draft from existing order, provide its id. Otherwise, an empty draft will be created.
|
|
1428
|
+
* @format GUID
|
|
1429
|
+
*/
|
|
1430
|
+
orderId: string | null;
|
|
1431
|
+
}
|
|
1432
|
+
interface CreateDraftOrderResponse {
|
|
1433
|
+
/** The draft order details calculated with latest content */
|
|
1434
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1435
|
+
}
|
|
1436
|
+
interface CalculatedDraftOrder {
|
|
1437
|
+
/**
|
|
1438
|
+
* The draft order full details with calculations based on it's content.
|
|
1439
|
+
* Discount and additional fee options are also included.
|
|
1440
|
+
*/
|
|
1441
|
+
draftOrder?: DraftOrder;
|
|
1442
|
+
/** Shipping options for the order. */
|
|
1443
|
+
shippingOptions?: ShippingOption[];
|
|
1444
|
+
/** Errors that occurred during calculation. */
|
|
1445
|
+
calculationErrors?: CalculationErrors;
|
|
1446
|
+
}
|
|
1447
|
+
interface ShippingOption {
|
|
1448
|
+
/**
|
|
1449
|
+
* This carrier's unique ID
|
|
1450
|
+
* @format GUID
|
|
1451
|
+
*/
|
|
1452
|
+
carrierId?: string | null;
|
|
1453
|
+
/** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */
|
|
1454
|
+
code?: string;
|
|
1455
|
+
/** Shipping rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. */
|
|
1456
|
+
title?: string;
|
|
1457
|
+
/** Shipping logistics. */
|
|
1458
|
+
logistics?: DeliveryLogistics;
|
|
1459
|
+
/** Shipping cost. */
|
|
1460
|
+
cost?: ShippingPrice;
|
|
1461
|
+
}
|
|
1462
|
+
interface DeliveryLogistics {
|
|
1463
|
+
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1464
|
+
deliveryTime?: string | null;
|
|
1465
|
+
/** Instructions for caller, e.g for pickup: "Ensure to come during Opening Hours, and please don't park in disabled-spot" */
|
|
1466
|
+
instructions?: string | null;
|
|
1467
|
+
/** Additional pickup details if it's a pickup */
|
|
1468
|
+
pickupDetails?: PickupDetails;
|
|
1469
|
+
/** Expected delivery time slot (from and to time stamps representation) */
|
|
1470
|
+
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1471
|
+
}
|
|
1472
|
+
interface PickupDetails {
|
|
1473
|
+
/** Pickup address */
|
|
1474
|
+
address?: Address;
|
|
1475
|
+
/**
|
|
1476
|
+
* Pickup method.
|
|
1477
|
+
*
|
|
1478
|
+
* Supported values:
|
|
1479
|
+
* + `"STORE_PICKUP"`
|
|
1480
|
+
* + `"PICKUP_POINT"`
|
|
1481
|
+
*/
|
|
1482
|
+
pickupMethod?: PickupMethod;
|
|
1483
|
+
}
|
|
1484
|
+
declare enum PickupMethod {
|
|
1485
|
+
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1486
|
+
STORE_PICKUP = "STORE_PICKUP",
|
|
1487
|
+
PICKUP_POINT = "PICKUP_POINT"
|
|
1488
|
+
}
|
|
1489
|
+
interface DeliveryTimeSlot {
|
|
1490
|
+
/** starting time of the delivery time slot */
|
|
1491
|
+
from?: Date | null;
|
|
1492
|
+
/** ending time of the delivery time slot */
|
|
1493
|
+
to?: Date | null;
|
|
1494
|
+
}
|
|
1495
|
+
interface ShippingPrice {
|
|
1496
|
+
/** The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1497
|
+
price?: Price;
|
|
1498
|
+
/**
|
|
1499
|
+
* 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.
|
|
1500
|
+
* @format CURRENCY
|
|
1501
|
+
*/
|
|
1502
|
+
currency?: string;
|
|
1503
|
+
}
|
|
1504
|
+
interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1505
|
+
/** General shipping calculation error. */
|
|
1506
|
+
generalShippingCalculationError?: Details;
|
|
1507
|
+
/** Carrier errors. */
|
|
1508
|
+
carrierErrors?: CarrierErrors;
|
|
1509
|
+
/** Tax calculation error. */
|
|
1510
|
+
taxCalculationError?: Details;
|
|
1511
|
+
/** Order validation errors. */
|
|
1512
|
+
orderValidationErrors?: ApplicationError[];
|
|
1513
|
+
}
|
|
1514
|
+
/** @oneof */
|
|
1515
|
+
interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1516
|
+
/** General shipping calculation error. */
|
|
1517
|
+
generalShippingCalculationError?: Details;
|
|
1518
|
+
/** Carrier errors. */
|
|
1519
|
+
carrierErrors?: CarrierErrors;
|
|
1520
|
+
}
|
|
1521
|
+
interface Details extends DetailsKindOneOf {
|
|
1522
|
+
applicationError?: ApplicationError;
|
|
1523
|
+
validationError?: ValidationError;
|
|
1524
|
+
systemError?: SystemError;
|
|
1525
|
+
/**
|
|
1526
|
+
* deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
|
|
1527
|
+
* @deprecated
|
|
1528
|
+
*/
|
|
1529
|
+
tracing?: Record<string, string>;
|
|
1530
|
+
}
|
|
1531
|
+
/** @oneof */
|
|
1532
|
+
interface DetailsKindOneOf {
|
|
1533
|
+
applicationError?: ApplicationError;
|
|
1534
|
+
validationError?: ValidationError;
|
|
1535
|
+
systemError?: SystemError;
|
|
1536
|
+
}
|
|
1537
|
+
interface ApplicationError {
|
|
1538
|
+
/** Error code. */
|
|
1539
|
+
code?: string;
|
|
1540
|
+
/** Description of the error. */
|
|
1541
|
+
description?: string;
|
|
1542
|
+
/** Data related to the error. */
|
|
1543
|
+
data?: Record<string, any> | null;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* example result:
|
|
1547
|
+
* {
|
|
1548
|
+
* "fieldViolations": [
|
|
1549
|
+
* {
|
|
1550
|
+
* "field": "fieldA",
|
|
1551
|
+
* "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
|
|
1552
|
+
* "violatedRule": "OTHER",
|
|
1553
|
+
* "ruleName": "INVALID_NOTE",
|
|
1554
|
+
* "data": {
|
|
1555
|
+
* "value": "FI"
|
|
1556
|
+
* }
|
|
1557
|
+
* },
|
|
1558
|
+
* {
|
|
1559
|
+
* "field": "fieldB",
|
|
1560
|
+
* "description": "field value out of range. supported range: [0-20]",
|
|
1561
|
+
* "violatedRule": "MAX",
|
|
1562
|
+
* "data": {
|
|
1563
|
+
* "threshold": 20
|
|
1564
|
+
* }
|
|
1565
|
+
* },
|
|
1566
|
+
* {
|
|
1567
|
+
* "field": "fieldC",
|
|
1568
|
+
* "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
|
|
1569
|
+
* "violatedRule": "FORMAT",
|
|
1570
|
+
* "data": {
|
|
1571
|
+
* "type": "PHONE"
|
|
1572
|
+
* }
|
|
1573
|
+
* }
|
|
1574
|
+
* ]
|
|
1575
|
+
* }
|
|
1576
|
+
*/
|
|
1577
|
+
interface ValidationError {
|
|
1578
|
+
fieldViolations?: FieldViolation[];
|
|
1579
|
+
}
|
|
1580
|
+
declare enum RuleType {
|
|
1581
|
+
VALIDATION = "VALIDATION",
|
|
1582
|
+
OTHER = "OTHER",
|
|
1583
|
+
MAX = "MAX",
|
|
1584
|
+
MIN = "MIN",
|
|
1585
|
+
MAX_LENGTH = "MAX_LENGTH",
|
|
1586
|
+
MIN_LENGTH = "MIN_LENGTH",
|
|
1587
|
+
MAX_SIZE = "MAX_SIZE",
|
|
1588
|
+
MIN_SIZE = "MIN_SIZE",
|
|
1589
|
+
FORMAT = "FORMAT",
|
|
1590
|
+
DECIMAL_LTE = "DECIMAL_LTE",
|
|
1591
|
+
DECIMAL_GTE = "DECIMAL_GTE",
|
|
1592
|
+
DECIMAL_LT = "DECIMAL_LT",
|
|
1593
|
+
DECIMAL_GT = "DECIMAL_GT",
|
|
1594
|
+
DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
|
|
1595
|
+
INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
|
|
1596
|
+
REQUIRED_FIELD = "REQUIRED_FIELD",
|
|
1597
|
+
FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
|
|
1598
|
+
ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
|
|
1599
|
+
EXACT_LENGTH = "EXACT_LENGTH",
|
|
1600
|
+
EXACT_SIZE = "EXACT_SIZE",
|
|
1601
|
+
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
1602
|
+
}
|
|
1603
|
+
interface FieldViolation {
|
|
1604
|
+
field?: string;
|
|
1605
|
+
description?: string;
|
|
1606
|
+
violatedRule?: RuleType;
|
|
1607
|
+
/** applicable when violated_rule=OTHER */
|
|
1608
|
+
ruleName?: string | null;
|
|
1609
|
+
data?: Record<string, any> | null;
|
|
1610
|
+
}
|
|
1611
|
+
interface SystemError {
|
|
1612
|
+
/** Error code. */
|
|
1613
|
+
errorCode?: string | null;
|
|
1614
|
+
}
|
|
1615
|
+
interface CarrierErrors {
|
|
1616
|
+
/** Carrier errors. */
|
|
1617
|
+
errors?: CarrierError[];
|
|
1618
|
+
}
|
|
1619
|
+
interface CarrierError {
|
|
1620
|
+
/** Carrier ID. */
|
|
1621
|
+
carrierId?: string;
|
|
1622
|
+
/** Error details. */
|
|
1623
|
+
error?: Details;
|
|
1624
|
+
}
|
|
1625
|
+
interface CreateEmptyDraftOrderRequest {
|
|
1626
|
+
}
|
|
1627
|
+
interface CreateEmptyDraftOrderResponse {
|
|
1628
|
+
/** The draft order details calculated with latest content */
|
|
1629
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1630
|
+
}
|
|
1631
|
+
interface AddLineItemsToDraftOrderRequest {
|
|
1632
|
+
/**
|
|
1633
|
+
* The draft order id
|
|
1634
|
+
* @format GUID
|
|
1635
|
+
*/
|
|
1636
|
+
draftOrderId: string;
|
|
1637
|
+
/**
|
|
1638
|
+
* Catalog line items to add to draft order.
|
|
1639
|
+
* @maxSize 300
|
|
1640
|
+
*/
|
|
1641
|
+
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1642
|
+
/**
|
|
1643
|
+
* Custom line items to add to draft order. Custom line items don't trigger the Catalog service plugin.
|
|
1644
|
+
* @maxSize 300
|
|
1645
|
+
*/
|
|
1646
|
+
customLineItems?: CustomLineItem[];
|
|
1647
|
+
}
|
|
1648
|
+
interface CatalogReferenceLineItem {
|
|
1649
|
+
/** 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. */
|
|
1650
|
+
catalogReference?: CatalogReference;
|
|
1651
|
+
/**
|
|
1652
|
+
* Item quantity.
|
|
1653
|
+
* @min 1
|
|
1654
|
+
* @max 100000
|
|
1655
|
+
*/
|
|
1656
|
+
quantity?: number;
|
|
1657
|
+
/** Item price override. */
|
|
1658
|
+
price?: Price;
|
|
1659
|
+
/**
|
|
1660
|
+
* Line item locations.
|
|
1661
|
+
*
|
|
1662
|
+
* The location's total quantity must not exceed the line item quantity.
|
|
1663
|
+
* @maxSize 5
|
|
1664
|
+
*/
|
|
1665
|
+
locations?: LocationAndQuantity[];
|
|
1666
|
+
}
|
|
1667
|
+
interface CustomLineItem {
|
|
1668
|
+
/**
|
|
1669
|
+
* Line item ID.
|
|
1670
|
+
* @format GUID
|
|
1671
|
+
*/
|
|
1672
|
+
id?: string | null;
|
|
1673
|
+
/**
|
|
1674
|
+
* Item quantity.
|
|
1675
|
+
*
|
|
1676
|
+
* Min: `"1"`
|
|
1677
|
+
* Max: `"100000"`
|
|
1678
|
+
* @min 1
|
|
1679
|
+
* @max 100000
|
|
1680
|
+
*/
|
|
1681
|
+
quantity?: number;
|
|
1682
|
+
/** 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. */
|
|
1683
|
+
catalogReference?: CatalogReference;
|
|
1684
|
+
/**
|
|
1685
|
+
* Item name.
|
|
1686
|
+
* + Stores - `product.name`
|
|
1687
|
+
* + Bookings - `service.info.name`
|
|
1688
|
+
* + Events - `ticket.name`
|
|
1689
|
+
*/
|
|
1690
|
+
productName?: ProductName;
|
|
1691
|
+
/** URL to the item's page on the site. */
|
|
1692
|
+
url?: PageUrlV2;
|
|
1693
|
+
/** Item price **after** catalog-defined discount and line item discounts. */
|
|
1694
|
+
price?: Price;
|
|
1695
|
+
/** Total line item price **after** catalog-defined discount and line item discounts. */
|
|
1696
|
+
lineItemPrice?: Price;
|
|
1697
|
+
/** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
|
|
1698
|
+
fullPrice?: Price;
|
|
1699
|
+
/** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */
|
|
1700
|
+
priceBeforeDiscounts?: Price;
|
|
1701
|
+
/** Line item description lines. Used for display purposes for order. */
|
|
1702
|
+
descriptionLines?: DescriptionLine[];
|
|
1703
|
+
/** Line item image details. */
|
|
1704
|
+
media?: Image;
|
|
1705
|
+
/** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */
|
|
1706
|
+
physicalProperties?: PhysicalProperties;
|
|
1707
|
+
/** Item type. Either a preset type or custom. */
|
|
1708
|
+
itemType?: ItemType;
|
|
1709
|
+
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
1710
|
+
priceDescription?: PriceDescription;
|
|
1711
|
+
/**
|
|
1712
|
+
* Delivery Profile Id for the product
|
|
1713
|
+
* @format GUID
|
|
1714
|
+
*/
|
|
1715
|
+
deliveryProfileId?: string | null;
|
|
1716
|
+
/**
|
|
1717
|
+
* Line item locations.
|
|
1718
|
+
*
|
|
1719
|
+
* The location's total quantity must not exceed the line item quantity.
|
|
1720
|
+
* @maxSize 5
|
|
1721
|
+
*/
|
|
1722
|
+
locations?: LocationAndQuantity[];
|
|
1723
|
+
}
|
|
1724
|
+
interface PageUrlV2 {
|
|
1725
|
+
/** The relative path for the page within the site. For example, `/product-page/a-product`. */
|
|
1726
|
+
relativePath?: string;
|
|
1727
|
+
/** The page's full URL. For example, `https://mysite.com/product-page/a-product`. */
|
|
1728
|
+
url?: string | null;
|
|
1729
|
+
}
|
|
1730
|
+
interface AddLineItemsToDraftOrderResponse {
|
|
1731
|
+
/** The draft order details calculated with latest content */
|
|
1732
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1733
|
+
}
|
|
1734
|
+
interface UpdateLineItemsRequest {
|
|
1735
|
+
/**
|
|
1736
|
+
* The draft order id
|
|
1737
|
+
* @format GUID
|
|
1738
|
+
*/
|
|
1739
|
+
draftOrderId: string;
|
|
1740
|
+
/**
|
|
1741
|
+
* Details of changes to apply per line item
|
|
1742
|
+
* @minSize 1
|
|
1743
|
+
* @maxSize 300
|
|
1744
|
+
*/
|
|
1745
|
+
lineItemChanges?: LineItemChangeDetails[];
|
|
1746
|
+
}
|
|
1747
|
+
interface LineItemChangeDetails {
|
|
1748
|
+
/**
|
|
1749
|
+
* The line item id to change
|
|
1750
|
+
* @format GUID
|
|
1751
|
+
*/
|
|
1752
|
+
lineItemId?: string;
|
|
1753
|
+
/**
|
|
1754
|
+
* The new quantity for the line item. quantity zero means to remove the line item.
|
|
1755
|
+
* @max 1000000
|
|
1756
|
+
*/
|
|
1757
|
+
newQuantity?: number | null;
|
|
1758
|
+
/**
|
|
1759
|
+
* The new price for 1 unit of the line item
|
|
1760
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
1761
|
+
*/
|
|
1762
|
+
newPrice?: string | null;
|
|
1763
|
+
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
1764
|
+
newPriceDescription?: PriceDescription;
|
|
1765
|
+
}
|
|
1766
|
+
interface UpdateLineItemsResponse {
|
|
1767
|
+
/** The draft order details calculated with latest content */
|
|
1768
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1769
|
+
}
|
|
1770
|
+
interface SetDiscountsRequest {
|
|
1771
|
+
/**
|
|
1772
|
+
* The draft order id
|
|
1773
|
+
* @format GUID
|
|
1774
|
+
*/
|
|
1775
|
+
draftOrderId: string;
|
|
1776
|
+
/**
|
|
1777
|
+
* The discount ids to opt-in. all existing discounts not listed are to be opted-out.
|
|
1778
|
+
* @minSize 1
|
|
1779
|
+
*/
|
|
1780
|
+
discounts: IdAndApplied[];
|
|
1781
|
+
}
|
|
1782
|
+
interface IdAndApplied {
|
|
1783
|
+
/** Discount ID. */
|
|
1784
|
+
id?: string;
|
|
1785
|
+
/** Whether to apply the discount to the draft order. */
|
|
1786
|
+
applied?: boolean;
|
|
1787
|
+
}
|
|
1788
|
+
interface SetDiscountsResponse {
|
|
1789
|
+
/** The draft order details calculated with latest content */
|
|
1790
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1791
|
+
}
|
|
1792
|
+
interface CreateCustomDiscountsRequest {
|
|
1793
|
+
/**
|
|
1794
|
+
* The draft order id
|
|
1795
|
+
* @format GUID
|
|
1796
|
+
*/
|
|
1797
|
+
draftOrderId: string;
|
|
1798
|
+
/**
|
|
1799
|
+
* The discounts to add.
|
|
1800
|
+
* @minSize 1
|
|
1801
|
+
* @maxSize 100
|
|
1802
|
+
*/
|
|
1803
|
+
discounts?: DiscountOption[];
|
|
1804
|
+
}
|
|
1805
|
+
interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
1806
|
+
/**
|
|
1807
|
+
* Discount type.
|
|
1808
|
+
* * `"GLOBAL"` - discount applies to entire order.
|
|
1809
|
+
* * `"SPECIFIC-ITEMS"` - discount applies to a specific item.
|
|
1810
|
+
* * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
|
|
1811
|
+
*/
|
|
1812
|
+
discountType?: DiscountType;
|
|
1813
|
+
/**
|
|
1814
|
+
* ID of line item discount applies to.
|
|
1815
|
+
* @format GUID
|
|
1816
|
+
* @deprecated ID of line item discount applies to.
|
|
1817
|
+
* @replacedBy line_item_discounts
|
|
1818
|
+
* @targetRemovalDate 2024-10-30
|
|
1819
|
+
*/
|
|
1820
|
+
lineItemId?: string | null;
|
|
1821
|
+
/**
|
|
1822
|
+
* Discount amount.
|
|
1823
|
+
* @deprecated Discount amount.
|
|
1824
|
+
* @replacedBy price_amount and percentage
|
|
1825
|
+
* @targetRemovalDate 2024-08-30
|
|
1826
|
+
*/
|
|
1827
|
+
amount?: Price;
|
|
1828
|
+
/**
|
|
1829
|
+
* Discount description as free text (optional).
|
|
1830
|
+
* @maxLength 200
|
|
1831
|
+
*/
|
|
1832
|
+
description?: string | null;
|
|
1833
|
+
/**
|
|
1834
|
+
* Should opt-in the added discount. default = false.
|
|
1835
|
+
* if not set or false, then to opt-in them, please call SetDiscounts with the added discounts ids
|
|
1836
|
+
*/
|
|
1837
|
+
applyToDraftOrder?: boolean | null;
|
|
1838
|
+
}
|
|
1839
|
+
/** @oneof */
|
|
1840
|
+
interface DiscountOptionDiscountAmountOneOf {
|
|
1841
|
+
}
|
|
1842
|
+
declare enum DiscountType {
|
|
1843
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
1844
|
+
GLOBAL = "GLOBAL",
|
|
1845
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
1846
|
+
SHIPPING = "SHIPPING"
|
|
1847
|
+
}
|
|
1848
|
+
interface CreateCustomDiscountsResponse {
|
|
1849
|
+
/** The draft order details with the added discounts */
|
|
1850
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1851
|
+
}
|
|
1852
|
+
interface DeleteCustomDiscountsRequest {
|
|
1853
|
+
/**
|
|
1854
|
+
* The draft order id
|
|
1855
|
+
* @format GUID
|
|
1856
|
+
*/
|
|
1857
|
+
draftOrderId: string;
|
|
1858
|
+
/**
|
|
1859
|
+
* The discounts to remove
|
|
1860
|
+
* @format GUID
|
|
1861
|
+
* @minSize 1
|
|
1862
|
+
* @maxSize 100
|
|
1863
|
+
*/
|
|
1864
|
+
discountIds: string[];
|
|
1865
|
+
}
|
|
1866
|
+
interface DeleteCustomDiscountsResponse {
|
|
1867
|
+
/** The draft order details calculated with latest content */
|
|
1868
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1869
|
+
}
|
|
1870
|
+
interface SetAdditionalFeesRequest {
|
|
1871
|
+
/**
|
|
1872
|
+
* The draft order id
|
|
1873
|
+
* @format GUID
|
|
1874
|
+
*/
|
|
1875
|
+
draftOrderId: string;
|
|
1876
|
+
/**
|
|
1877
|
+
* The additional fees ids to opt-in. all existing additional fees not listed are to be opted-out
|
|
1878
|
+
* @minSize 1
|
|
1879
|
+
* @maxSize 100
|
|
1880
|
+
*/
|
|
1881
|
+
additionalFees: IdAndApplied[];
|
|
1882
|
+
}
|
|
1883
|
+
interface SetAdditionalFeesResponse {
|
|
1884
|
+
/** The draft order details calculated with modified additional fees */
|
|
1885
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1886
|
+
}
|
|
1887
|
+
interface CreateCustomAdditionalFeesRequest {
|
|
1888
|
+
/**
|
|
1889
|
+
* The draft order id
|
|
1890
|
+
* @format GUID
|
|
1891
|
+
*/
|
|
1892
|
+
draftOrderId: string;
|
|
1893
|
+
/**
|
|
1894
|
+
* The additional fees to add. added with opted-out setting
|
|
1895
|
+
* @minSize 1
|
|
1896
|
+
* @maxSize 100
|
|
1897
|
+
*/
|
|
1898
|
+
customAdditionalFees?: AdditionalFeeOption[];
|
|
1899
|
+
}
|
|
1900
|
+
interface AdditionalFeeOption {
|
|
1901
|
+
/**
|
|
1902
|
+
* Translated additional fee's name
|
|
1903
|
+
* @minLength 1
|
|
1904
|
+
* @maxLength 50
|
|
1905
|
+
*/
|
|
1906
|
+
name?: string;
|
|
1907
|
+
/** Additional fee's price */
|
|
1908
|
+
price?: Price;
|
|
1909
|
+
/** Tax calculation details */
|
|
1910
|
+
taxDetails?: TaxDetails;
|
|
1911
|
+
/**
|
|
1912
|
+
* Should apply the additional fee. default = false.
|
|
1913
|
+
* if not set or false, then to apply them, please call ApplyAdditionalFees with the added additional fee ids
|
|
1914
|
+
*/
|
|
1915
|
+
applyToDraftOrder?: boolean | null;
|
|
1916
|
+
/**
|
|
1917
|
+
* Additional fee's unique code (or ID) for future processing
|
|
1918
|
+
* @minLength 1
|
|
1919
|
+
* @maxLength 100
|
|
1920
|
+
*/
|
|
1921
|
+
code?: string | null;
|
|
1922
|
+
}
|
|
1923
|
+
interface CreateCustomAdditionalFeesResponse {
|
|
1924
|
+
/** The draft order details with added custom additional fees */
|
|
1925
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1926
|
+
}
|
|
1927
|
+
interface DeleteCustomAdditionalFeesRequest {
|
|
1928
|
+
/**
|
|
1929
|
+
* The draft order id
|
|
1930
|
+
* @format GUID
|
|
1931
|
+
*/
|
|
1932
|
+
draftOrderId: string;
|
|
1933
|
+
/**
|
|
1934
|
+
* The additional fees to remove
|
|
1935
|
+
* @format GUID
|
|
1936
|
+
* @minSize 1
|
|
1937
|
+
* @maxSize 100
|
|
1938
|
+
*/
|
|
1939
|
+
customAdditionalFees: string[];
|
|
1940
|
+
}
|
|
1941
|
+
interface DeleteCustomAdditionalFeesResponse {
|
|
1942
|
+
/** The draft order details calculated with latest content */
|
|
1943
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1944
|
+
}
|
|
1945
|
+
interface SetShippingInfoRequest {
|
|
1946
|
+
}
|
|
1947
|
+
interface SetShippingInfoResponse {
|
|
1948
|
+
}
|
|
1949
|
+
interface SetBuyerInfoRequest {
|
|
1950
|
+
}
|
|
1951
|
+
interface SetBuyerInfoResponse {
|
|
1952
|
+
}
|
|
1953
|
+
interface SetRecipientInfoRequest {
|
|
1954
|
+
}
|
|
1955
|
+
interface SetRecipientInfoResponse {
|
|
1956
|
+
}
|
|
1957
|
+
interface SetBillingInfoRequest {
|
|
1958
|
+
}
|
|
1959
|
+
interface SetBillingInfoResponse {
|
|
1960
|
+
}
|
|
1961
|
+
interface GetDraftOrderRequest {
|
|
1962
|
+
/**
|
|
1963
|
+
* The draft order id
|
|
1964
|
+
* @format GUID
|
|
1965
|
+
*/
|
|
1966
|
+
draftOrderId: string;
|
|
1967
|
+
}
|
|
1968
|
+
interface GetDraftOrderResponse {
|
|
1969
|
+
/** The draft order details calculated with latest content */
|
|
1970
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1971
|
+
}
|
|
1972
|
+
interface GetOrderDraftabilityStatusRequest {
|
|
1973
|
+
/**
|
|
1974
|
+
* Order ID.
|
|
1975
|
+
* @minLength 1
|
|
1976
|
+
* @maxLength 100
|
|
1977
|
+
*/
|
|
1978
|
+
orderId: string;
|
|
1979
|
+
}
|
|
1980
|
+
interface GetOrderDraftabilityStatusResponse {
|
|
1981
|
+
/**
|
|
1982
|
+
* Order ID.
|
|
1983
|
+
* @minLength 1
|
|
1984
|
+
* @maxLength 100
|
|
1985
|
+
*/
|
|
1986
|
+
orderId?: string;
|
|
1987
|
+
/** Whether a draft can be created from this order */
|
|
1988
|
+
orderDraftable?: boolean;
|
|
1989
|
+
/**
|
|
1990
|
+
* Reasons why the order is not draftable
|
|
1991
|
+
* @maxSize 5
|
|
1992
|
+
*/
|
|
1993
|
+
nonDraftableReasons?: NonDraftableReason[];
|
|
1994
|
+
}
|
|
1995
|
+
declare enum NonDraftableReason {
|
|
1996
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1997
|
+
PARTIALLY_OR_FULLY_REFUNDED = "PARTIALLY_OR_FULLY_REFUNDED",
|
|
1998
|
+
UNSUPPORTED_CHANNEL_TYPE = "UNSUPPORTED_CHANNEL_TYPE",
|
|
1999
|
+
ORDER_STATUS_IS_NOT_SUPPORTED = "ORDER_STATUS_IS_NOT_SUPPORTED",
|
|
2000
|
+
ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT = "ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT",
|
|
2001
|
+
ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT = "ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT",
|
|
2002
|
+
AMOUNTS_DO_NOT_ADD_UP = "AMOUNTS_DO_NOT_ADD_UP",
|
|
2003
|
+
/** remove - this is not a reason, it's an error */
|
|
2004
|
+
ORDER_NOT_FOUND = "ORDER_NOT_FOUND",
|
|
2005
|
+
SUBSCRIPTION_LINE_ITEM_EXISTS = "SUBSCRIPTION_LINE_ITEM_EXISTS",
|
|
2006
|
+
UNSUPPORTED_CATALOG_ITEM = "UNSUPPORTED_CATALOG_ITEM",
|
|
2007
|
+
TAXABLE_EXISTING_ADDITIONAL_FEE = "TAXABLE_EXISTING_ADDITIONAL_FEE"
|
|
2008
|
+
}
|
|
2009
|
+
interface CommitDraftOrderRequest {
|
|
2010
|
+
/**
|
|
2011
|
+
* The draft order id
|
|
2012
|
+
* @format GUID
|
|
2013
|
+
*/
|
|
2014
|
+
draftOrderId: string;
|
|
2015
|
+
/** Optional side effects to trigger */
|
|
2016
|
+
commitSettings?: DraftOrderCommitSettings;
|
|
2017
|
+
/**
|
|
2018
|
+
* Reason for edit, given by user (optional).
|
|
2019
|
+
* @maxLength 200
|
|
2020
|
+
*/
|
|
2021
|
+
reason?: string | null;
|
|
2022
|
+
}
|
|
2023
|
+
interface CommitDraftOrderResponse {
|
|
2024
|
+
/** The draft order after commit. */
|
|
2025
|
+
committedDraftOrder?: DraftOrder;
|
|
2026
|
+
/** The updated order after commit. */
|
|
2027
|
+
orderAfterCommit?: Order;
|
|
2028
|
+
}
|
|
2029
|
+
interface Order {
|
|
2030
|
+
/**
|
|
2031
|
+
* Order ID.
|
|
2032
|
+
* @format GUID
|
|
2033
|
+
* @readonly
|
|
2034
|
+
*/
|
|
2035
|
+
id?: string | null;
|
|
2036
|
+
/**
|
|
2037
|
+
* Order number displayed in the site owner's dashboard (auto-generated).
|
|
2038
|
+
* @readonly
|
|
2039
|
+
*/
|
|
2040
|
+
number?: string;
|
|
2041
|
+
/**
|
|
2042
|
+
* Date and time the order was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
2043
|
+
* @readonly
|
|
2044
|
+
* @immutable
|
|
2045
|
+
*/
|
|
2046
|
+
createdDate?: Date | null;
|
|
2047
|
+
/**
|
|
2048
|
+
* Date and time the order was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
2049
|
+
* @readonly
|
|
2050
|
+
*/
|
|
2051
|
+
updatedDate?: Date | null;
|
|
2052
|
+
/**
|
|
2053
|
+
* Order line items.
|
|
2054
|
+
* @minSize 1
|
|
2055
|
+
* @maxSize 300
|
|
2056
|
+
* @readonly
|
|
2057
|
+
*/
|
|
2058
|
+
lineItems?: OrderLineItem[];
|
|
2059
|
+
/** Buyer information. */
|
|
2060
|
+
buyerInfo?: BuyerInfo;
|
|
2061
|
+
/** Order payment status. */
|
|
2062
|
+
paymentStatus?: PaymentStatus;
|
|
2063
|
+
/**
|
|
2064
|
+
* Order fulfillment status.
|
|
2065
|
+
* @readonly
|
|
2066
|
+
*/
|
|
2067
|
+
fulfillmentStatus?: FulfillmentStatus;
|
|
2068
|
+
/**
|
|
2069
|
+
* Language for communication with the buyer. Defaults to the site language.
|
|
2070
|
+
* For a site that supports multiple languages, this is the language the buyer selected.
|
|
2071
|
+
*/
|
|
2072
|
+
buyerLanguage?: string | null;
|
|
2073
|
+
/** Weight measurement unit - defaults to site's weight unit. */
|
|
2074
|
+
weightUnit?: WeightUnit;
|
|
2075
|
+
/**
|
|
2076
|
+
* 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.
|
|
2077
|
+
* @format CURRENCY
|
|
2078
|
+
*/
|
|
2079
|
+
currency?: string | null;
|
|
2080
|
+
/** Multi-currency information of the order. */
|
|
2081
|
+
currencyConversionDetails?: CurrencyConversionDetails;
|
|
2082
|
+
/**
|
|
2083
|
+
* Whether tax is included in line item prices.
|
|
2084
|
+
* @immutable
|
|
2085
|
+
*/
|
|
2086
|
+
taxIncludedInPrices?: boolean;
|
|
2087
|
+
/**
|
|
2088
|
+
* Site language in which original values are shown.
|
|
2089
|
+
* @readonly
|
|
2090
|
+
* @immutable
|
|
2091
|
+
*/
|
|
2092
|
+
siteLanguage?: string | null;
|
|
2093
|
+
/**
|
|
2094
|
+
* Order price summary.
|
|
2095
|
+
* @readonly
|
|
2096
|
+
*/
|
|
2097
|
+
priceSummary?: PriceSummary;
|
|
2098
|
+
/** Billing address and contact details. */
|
|
2099
|
+
billingInfo?: AddressWithContact;
|
|
2100
|
+
/** Shipping info and selected shipping option details. */
|
|
2101
|
+
shippingInfo?: V1ShippingInformation;
|
|
2102
|
+
/**
|
|
2103
|
+
* [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
|
|
2104
|
+
* @maxLength 1000
|
|
2105
|
+
*/
|
|
2106
|
+
buyerNote?: string | null;
|
|
2107
|
+
/** Order status. */
|
|
2108
|
+
status?: OrderStatus;
|
|
2109
|
+
/** Whether order is archived. */
|
|
2110
|
+
archived?: boolean | null;
|
|
2111
|
+
/**
|
|
2112
|
+
* Tax summary.
|
|
2113
|
+
* Deprecated. Use `taxInfo` instead.
|
|
2114
|
+
* This field will be removed on September 30, 2024.
|
|
2115
|
+
* @deprecated Tax summary.
|
|
2116
|
+
* Deprecated. Use `taxInfo` instead.
|
|
2117
|
+
* This field will be removed on September 30, 2024.
|
|
2118
|
+
* @replacedBy tax_info
|
|
2119
|
+
* @targetRemovalDate 2024-09-30
|
|
2120
|
+
*/
|
|
2121
|
+
taxSummary?: TaxSummary;
|
|
2122
|
+
/** Tax information. */
|
|
2123
|
+
taxInfo?: OrderTaxInfo;
|
|
2124
|
+
/**
|
|
2125
|
+
* Applied discounts.
|
|
2126
|
+
* @maxSize 320
|
|
2127
|
+
*/
|
|
2128
|
+
appliedDiscounts?: AppliedDiscount[];
|
|
2129
|
+
/**
|
|
2130
|
+
* Order activities.
|
|
2131
|
+
* @readonly
|
|
2132
|
+
* @maxSize 1000
|
|
2133
|
+
*/
|
|
2134
|
+
activities?: Activity[];
|
|
2135
|
+
/** Order attribution source. */
|
|
2136
|
+
attributionSource?: AttributionSource;
|
|
2137
|
+
/**
|
|
2138
|
+
* ID of the order's initiator.
|
|
2139
|
+
* @readonly
|
|
2140
|
+
*/
|
|
2141
|
+
createdBy?: V1CreatedBy;
|
|
2142
|
+
/** Information about the sales channel that submitted this order. */
|
|
2143
|
+
channelInfo?: ChannelInfo;
|
|
2144
|
+
/** Whether a human has seen the order. Set when an order is clicked on in the dashboard. */
|
|
2145
|
+
seenByAHuman?: boolean | null;
|
|
2146
|
+
/**
|
|
2147
|
+
* Checkout ID.
|
|
2148
|
+
* @format GUID
|
|
2149
|
+
*/
|
|
2150
|
+
checkoutId?: string | null;
|
|
2151
|
+
/** Custom fields. */
|
|
2152
|
+
customFields?: CustomField[];
|
|
2153
|
+
/**
|
|
2154
|
+
* Balance summary.
|
|
2155
|
+
* @readonly
|
|
2156
|
+
*/
|
|
2157
|
+
balanceSummary?: V1BalanceSummary;
|
|
2158
|
+
/**
|
|
2159
|
+
* Additional fees applied to the order.
|
|
2160
|
+
* @maxSize 100
|
|
2161
|
+
*/
|
|
2162
|
+
additionalFees?: AdditionalFee[];
|
|
2163
|
+
/**
|
|
2164
|
+
* Custom field data for the order object.
|
|
2165
|
+
*
|
|
2166
|
+
* [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.
|
|
2167
|
+
*/
|
|
2168
|
+
extendedFields?: ExtendedFields;
|
|
2169
|
+
/**
|
|
2170
|
+
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
2171
|
+
* @format GUID
|
|
2172
|
+
*/
|
|
2173
|
+
purchaseFlowId?: string | null;
|
|
2174
|
+
/**
|
|
2175
|
+
* Order recipient address and contact details.
|
|
2176
|
+
*
|
|
2177
|
+
* This field may differ from the address in `shippingInfo.logistics` when:
|
|
2178
|
+
* + The chosen shipping option is pickup point or store pickup.
|
|
2179
|
+
* + No shipping option is selected.
|
|
2180
|
+
*/
|
|
2181
|
+
recipientInfo?: AddressWithContact;
|
|
2182
|
+
/**
|
|
2183
|
+
* Order tags.
|
|
2184
|
+
*
|
|
2185
|
+
* [Tags](https://dev.wix.com/docs/rest/business-management/tags/introduction) are labels attached to entities, allowing for flexible categorization and data management.
|
|
2186
|
+
*/
|
|
2187
|
+
tags?: Tags;
|
|
2188
|
+
/**
|
|
2189
|
+
* Date and time the order was originally purchased in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
2190
|
+
* Used for migration from external systems.
|
|
2191
|
+
* @immutable
|
|
2192
|
+
*/
|
|
2193
|
+
purchasedDate?: Date | null;
|
|
2194
|
+
/** Order Location */
|
|
2195
|
+
businessLocation?: Location;
|
|
2196
|
+
}
|
|
2197
|
+
declare enum PaymentStatus {
|
|
2198
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
2199
|
+
/**
|
|
2200
|
+
* `NOT_PAID` can apply to an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`.
|
|
2201
|
+
* This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`.
|
|
2202
|
+
*/
|
|
2203
|
+
NOT_PAID = "NOT_PAID",
|
|
2204
|
+
/** All required payments associated with this order are paid. */
|
|
2205
|
+
PAID = "PAID",
|
|
2206
|
+
/** Order partially refunded, but the refunded amount is less than the order's total price. See `order.balanceSummary` for more details. */
|
|
2207
|
+
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
2208
|
+
/** Order fully refunded. Refund amount equals total price. See `order.balanceSummary` for more details. */
|
|
2209
|
+
FULLY_REFUNDED = "FULLY_REFUNDED",
|
|
2210
|
+
/**
|
|
2211
|
+
* All payments pending.
|
|
2212
|
+
*
|
|
2213
|
+
* 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.
|
|
2214
|
+
* Learn more about [pending orders](https://support.wix.com/en/article/pending-orders).
|
|
2215
|
+
*/
|
|
2216
|
+
PENDING = "PENDING",
|
|
2217
|
+
/** At least one payment received and approved, but it covers less than the order's total price. See `order.balanceSummary` for more details. */
|
|
2218
|
+
PARTIALLY_PAID = "PARTIALLY_PAID",
|
|
2219
|
+
/**
|
|
2220
|
+
* Payment received, but not yet confirmed by the payment provider.
|
|
2221
|
+
*
|
|
2222
|
+
* In most cases, when a payment provider is holding payment it's because setup hasn't been successfully completed by the merchant/site owner.
|
|
2223
|
+
* 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.
|
|
2224
|
+
* @documentationMaturity preview
|
|
2225
|
+
*/
|
|
2226
|
+
PENDING_MERCHANT = "PENDING_MERCHANT",
|
|
2227
|
+
/**
|
|
2228
|
+
* One or more payments canceled.
|
|
2229
|
+
* @documentationMaturity preview
|
|
2230
|
+
*/
|
|
2231
|
+
CANCELED = "CANCELED",
|
|
2232
|
+
/**
|
|
2233
|
+
* One or more payments declined.
|
|
2234
|
+
* @documentationMaturity preview
|
|
2235
|
+
*/
|
|
2236
|
+
DECLINED = "DECLINED"
|
|
2237
|
+
}
|
|
2238
|
+
declare enum FulfillmentStatus {
|
|
2239
|
+
/** None of the order items are fulfilled or the order was manually marked as unfulfilled. */
|
|
2240
|
+
NOT_FULFILLED = "NOT_FULFILLED",
|
|
2241
|
+
/**
|
|
2242
|
+
* All of the order items are fulfilled or the order was manually marked as fulfilled.
|
|
2243
|
+
* Orders without shipping info are fulfilled automatically.
|
|
2244
|
+
*/
|
|
2245
|
+
FULFILLED = "FULFILLED",
|
|
2246
|
+
/** Some, but not all, of the order items are fulfilled. */
|
|
2247
|
+
PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED"
|
|
2248
|
+
}
|
|
2249
|
+
interface CurrencyConversionDetails {
|
|
2250
|
+
/**
|
|
2251
|
+
* Original currency used to calculate the pricing before conversion to payment currency set on the order [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
|
|
2252
|
+
* @readonly
|
|
2253
|
+
* @immutable
|
|
2254
|
+
* @format CURRENCY
|
|
2255
|
+
*/
|
|
2256
|
+
originalCurrency?: string | null;
|
|
2257
|
+
/**
|
|
2258
|
+
* The rate used when converting from the original currency to the payment currency.
|
|
2259
|
+
* @readonly
|
|
2260
|
+
* @immutable
|
|
2261
|
+
* @decimalValue options { gt:0, lte:1000000000000000 }
|
|
2262
|
+
*/
|
|
2263
|
+
conversionRate?: string | null;
|
|
2264
|
+
}
|
|
2265
|
+
declare enum OrderStatus {
|
|
2266
|
+
/** Order created, but not yet approved or canceled. */
|
|
2267
|
+
INITIALIZED = "INITIALIZED",
|
|
2268
|
+
/**
|
|
2269
|
+
* Order approved.
|
|
2270
|
+
*
|
|
2271
|
+
* This happens when either an online payment is received **or** when `order.priceSummary.total = 0` (a zero-total order).
|
|
2272
|
+
* Offline orders (cash payment) are automatically approved.
|
|
2273
|
+
*/
|
|
2274
|
+
APPROVED = "APPROVED",
|
|
2275
|
+
/** Order canceled by the user. */
|
|
2276
|
+
CANCELED = "CANCELED",
|
|
2277
|
+
/**
|
|
2278
|
+
* Order pending.
|
|
2279
|
+
* @documentationMaturity preview
|
|
2280
|
+
*/
|
|
2281
|
+
PENDING = "PENDING",
|
|
2282
|
+
/**
|
|
2283
|
+
* Order rejected.
|
|
2284
|
+
*
|
|
2285
|
+
* This happens when pending payments fail.
|
|
2286
|
+
* @documentationMaturity preview
|
|
2287
|
+
*/
|
|
2288
|
+
REJECTED = "REJECTED"
|
|
2289
|
+
}
|
|
2290
|
+
interface Activity extends ActivityContentOneOf {
|
|
2291
|
+
/** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */
|
|
2292
|
+
customActivity?: CustomActivity;
|
|
2293
|
+
/** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */
|
|
2294
|
+
merchantComment?: MerchantComment;
|
|
2295
|
+
/** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */
|
|
2296
|
+
orderRefunded?: OrderRefunded;
|
|
2297
|
+
/**
|
|
2298
|
+
* Activity ID.
|
|
2299
|
+
* @format GUID
|
|
2300
|
+
* @readonly
|
|
2301
|
+
*/
|
|
2302
|
+
id?: string | null;
|
|
2303
|
+
/**
|
|
2304
|
+
* Activity author's email.
|
|
2305
|
+
* @format EMAIL
|
|
2306
|
+
* @readonly
|
|
2307
|
+
*/
|
|
2308
|
+
authorEmail?: string | null;
|
|
2309
|
+
/**
|
|
2310
|
+
* Activity creation date and time.
|
|
2311
|
+
* @readonly
|
|
2312
|
+
*/
|
|
2313
|
+
createdDate?: Date | null;
|
|
2314
|
+
/** Activity type. */
|
|
2315
|
+
type?: ActivityType;
|
|
2316
|
+
}
|
|
2317
|
+
/** @oneof */
|
|
2318
|
+
interface ActivityContentOneOf {
|
|
2319
|
+
/** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */
|
|
2320
|
+
customActivity?: CustomActivity;
|
|
2321
|
+
/** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */
|
|
2322
|
+
merchantComment?: MerchantComment;
|
|
2323
|
+
/** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */
|
|
2324
|
+
orderRefunded?: OrderRefunded;
|
|
2325
|
+
}
|
|
2326
|
+
interface CustomActivity {
|
|
2327
|
+
/**
|
|
2328
|
+
* ID of the app that created the custom activity.
|
|
2329
|
+
* @format GUID
|
|
2330
|
+
*/
|
|
2331
|
+
appId?: string;
|
|
2332
|
+
/**
|
|
2333
|
+
* Custom activity type. For example, `"Ticket number set"`.
|
|
2334
|
+
* @maxLength 100
|
|
2335
|
+
*/
|
|
2336
|
+
type?: string;
|
|
2337
|
+
/** Additional data in key-value form. For example, `{ "Ticket number": "123456" }`. */
|
|
2338
|
+
additionalData?: Record<string, string>;
|
|
2339
|
+
}
|
|
2340
|
+
/** Store owner added a comment */
|
|
2341
|
+
interface MerchantComment {
|
|
2342
|
+
/**
|
|
2343
|
+
* Merchant comment message.
|
|
2344
|
+
* @minLength 1
|
|
2345
|
+
* @maxLength 5000
|
|
2346
|
+
*/
|
|
2347
|
+
message?: string;
|
|
2348
|
+
}
|
|
2349
|
+
interface OrderRefunded {
|
|
2350
|
+
/** Whether order was refunded manually. For example, via payment provider or using cash. */
|
|
2351
|
+
manual?: boolean;
|
|
2352
|
+
/** Refund amount. */
|
|
2353
|
+
amount?: Price;
|
|
2354
|
+
/**
|
|
2355
|
+
* Reason for refund.
|
|
2356
|
+
* @maxLength 200
|
|
2357
|
+
*/
|
|
2358
|
+
reason?: string;
|
|
2359
|
+
}
|
|
2360
|
+
declare enum ActivityType {
|
|
2361
|
+
ORDER_REFUNDED = "ORDER_REFUNDED",
|
|
2362
|
+
ORDER_PLACED = "ORDER_PLACED",
|
|
2363
|
+
ORDER_PAID = "ORDER_PAID",
|
|
2364
|
+
ORDER_FULFILLED = "ORDER_FULFILLED",
|
|
2365
|
+
ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED",
|
|
2366
|
+
ORDER_CANCELED = "ORDER_CANCELED",
|
|
2367
|
+
DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT",
|
|
2368
|
+
TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED",
|
|
2369
|
+
TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED",
|
|
2370
|
+
TRACKING_LINK_ADDED = "TRACKING_LINK_ADDED",
|
|
2371
|
+
SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT",
|
|
2372
|
+
INVOICE_ADDED = "INVOICE_ADDED",
|
|
2373
|
+
INVOICE_REMOVED = "INVOICE_REMOVED",
|
|
2374
|
+
INVOICE_SENT = "INVOICE_SENT",
|
|
2375
|
+
FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT",
|
|
2376
|
+
SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED",
|
|
2377
|
+
EMAIL_EDITED = "EMAIL_EDITED",
|
|
2378
|
+
PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT",
|
|
2379
|
+
CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY",
|
|
2380
|
+
MERCHANT_COMMENT = "MERCHANT_COMMENT",
|
|
2381
|
+
ORDER_CREATED_FROM_EXCHANGE = "ORDER_CREATED_FROM_EXCHANGE",
|
|
2382
|
+
NEW_EXCHANGE_ORDER_CREATED = "NEW_EXCHANGE_ORDER_CREATED",
|
|
2383
|
+
ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID",
|
|
2384
|
+
DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED",
|
|
2385
|
+
SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD",
|
|
2386
|
+
/** @documentationMaturity preview */
|
|
2387
|
+
PAYMENT_PENDING = "PAYMENT_PENDING",
|
|
2388
|
+
/** @documentationMaturity preview */
|
|
2389
|
+
PAYMENT_CANCELED = "PAYMENT_CANCELED",
|
|
2390
|
+
/** @documentationMaturity preview */
|
|
2391
|
+
PAYMENT_DECLINED = "PAYMENT_DECLINED",
|
|
2392
|
+
/** @documentationMaturity preview */
|
|
2393
|
+
ORDER_PENDING = "ORDER_PENDING",
|
|
2394
|
+
/** @documentationMaturity preview */
|
|
2395
|
+
ORDER_REJECTED = "ORDER_REJECTED"
|
|
2396
|
+
}
|
|
2397
|
+
declare enum AttributionSource {
|
|
2398
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
2399
|
+
FACEBOOK_ADS = "FACEBOOK_ADS"
|
|
2400
|
+
}
|
|
2401
|
+
interface V1CreatedBy extends V1CreatedByStringOneOf {
|
|
2402
|
+
/**
|
|
2403
|
+
* User ID - when the order was created by a Wix user on behalf of a buyer.
|
|
2404
|
+
* For example, via POS (point of service).
|
|
2405
|
+
* @format GUID
|
|
2406
|
+
*/
|
|
2407
|
+
userId?: string;
|
|
2408
|
+
/**
|
|
2409
|
+
* Member ID - when the order was created by a **logged in** site visitor.
|
|
2410
|
+
* @format GUID
|
|
2411
|
+
*/
|
|
2412
|
+
memberId?: string;
|
|
2413
|
+
/**
|
|
2414
|
+
* Visitor ID - when the order was created by a site visitor that was **not** logged in.
|
|
2415
|
+
* @format GUID
|
|
2416
|
+
*/
|
|
2417
|
+
visitorId?: string;
|
|
2418
|
+
/**
|
|
2419
|
+
* App ID - when the order was created by an external application.
|
|
2420
|
+
* @format GUID
|
|
2421
|
+
*/
|
|
2422
|
+
appId?: string;
|
|
2423
|
+
}
|
|
2424
|
+
/** @oneof */
|
|
2425
|
+
interface V1CreatedByStringOneOf {
|
|
2426
|
+
/**
|
|
2427
|
+
* User ID - when the order was created by a Wix user on behalf of a buyer.
|
|
2428
|
+
* For example, via POS (point of service).
|
|
2429
|
+
* @format GUID
|
|
2430
|
+
*/
|
|
2431
|
+
userId?: string;
|
|
2432
|
+
/**
|
|
2433
|
+
* Member ID - when the order was created by a **logged in** site visitor.
|
|
2434
|
+
* @format GUID
|
|
2435
|
+
*/
|
|
2436
|
+
memberId?: string;
|
|
2437
|
+
/**
|
|
2438
|
+
* Visitor ID - when the order was created by a site visitor that was **not** logged in.
|
|
2439
|
+
* @format GUID
|
|
2440
|
+
*/
|
|
2441
|
+
visitorId?: string;
|
|
2442
|
+
/**
|
|
2443
|
+
* App ID - when the order was created by an external application.
|
|
2444
|
+
* @format GUID
|
|
2445
|
+
*/
|
|
2446
|
+
appId?: string;
|
|
2447
|
+
}
|
|
2448
|
+
interface ChannelInfo {
|
|
2449
|
+
/** Sales channel that submitted the order. */
|
|
2450
|
+
type?: ChannelType;
|
|
2451
|
+
/**
|
|
2452
|
+
* Reference to an order ID from an external system.
|
|
2453
|
+
* @maxLength 100
|
|
2454
|
+
*/
|
|
2455
|
+
externalOrderId?: string | null;
|
|
2456
|
+
/**
|
|
2457
|
+
* URL to the order in the external system.
|
|
2458
|
+
* @maxLength 300
|
|
2459
|
+
*/
|
|
2460
|
+
externalOrderUrl?: string | null;
|
|
2461
|
+
}
|
|
2462
|
+
declare enum ChannelType {
|
|
2463
|
+
/** Unspecified sales channel. This value is not supported. */
|
|
2464
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
2465
|
+
/** A web client. */
|
|
2466
|
+
WEB = "WEB",
|
|
2467
|
+
/** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
|
|
2468
|
+
POS = "POS",
|
|
2469
|
+
/** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
|
|
2470
|
+
EBAY = "EBAY",
|
|
2471
|
+
/** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
|
|
2472
|
+
AMAZON = "AMAZON",
|
|
2473
|
+
/** Other sales platform. */
|
|
2474
|
+
OTHER_PLATFORM = "OTHER_PLATFORM",
|
|
2475
|
+
/** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
|
|
2476
|
+
WIX_APP_STORE = "WIX_APP_STORE",
|
|
2477
|
+
/** 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) */
|
|
2478
|
+
WIX_INVOICES = "WIX_INVOICES",
|
|
2479
|
+
/** Wix merchant backoffice. */
|
|
2480
|
+
BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
|
|
2481
|
+
/** Wish sales channel. */
|
|
2482
|
+
WISH = "WISH",
|
|
2483
|
+
/** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
|
|
2484
|
+
CLASS_PASS = "CLASS_PASS",
|
|
2485
|
+
/** Global-E sales channel. */
|
|
2486
|
+
GLOBAL_E = "GLOBAL_E",
|
|
2487
|
+
/** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
|
|
2488
|
+
FACEBOOK = "FACEBOOK",
|
|
2489
|
+
/** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
|
|
2490
|
+
ETSY = "ETSY",
|
|
2491
|
+
/** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
|
|
2492
|
+
TIKTOK = "TIKTOK",
|
|
2493
|
+
/** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
|
|
2494
|
+
FAIRE_COM = "FAIRE_COM"
|
|
2495
|
+
}
|
|
2496
|
+
interface CustomField {
|
|
2497
|
+
/** Custom field value. */
|
|
2498
|
+
value?: any;
|
|
2499
|
+
/**
|
|
2500
|
+
* Custom field title.
|
|
2501
|
+
* @minLength 1
|
|
2502
|
+
* @maxLength 500
|
|
2503
|
+
*/
|
|
2504
|
+
title?: string;
|
|
2505
|
+
/**
|
|
2506
|
+
* Translated custom field title.
|
|
2507
|
+
* @minLength 1
|
|
2508
|
+
* @maxLength 500
|
|
2509
|
+
*/
|
|
2510
|
+
translatedTitle?: string | null;
|
|
2511
|
+
}
|
|
2512
|
+
interface V1BalanceSummary {
|
|
2513
|
+
/**
|
|
2514
|
+
* Current amount left to pay.
|
|
2515
|
+
* @readonly
|
|
2516
|
+
*/
|
|
2517
|
+
balance?: Balance;
|
|
2518
|
+
/**
|
|
2519
|
+
* Sum of all approved and successful payments.
|
|
2520
|
+
*
|
|
2521
|
+
* The value includes payments that have subsequently been fully or partially refunded.
|
|
2522
|
+
* @readonly
|
|
2523
|
+
*/
|
|
2524
|
+
paid?: Price;
|
|
2525
|
+
/**
|
|
2526
|
+
* Sum of all successfully refunded payments.
|
|
2527
|
+
* @readonly
|
|
2528
|
+
*/
|
|
2529
|
+
refunded?: Price;
|
|
2530
|
+
/**
|
|
2531
|
+
* Sum of all authorized payments.
|
|
2532
|
+
* @readonly
|
|
2533
|
+
*/
|
|
2534
|
+
authorized?: Price;
|
|
2535
|
+
/**
|
|
2536
|
+
* Sum of all pending transactions.
|
|
2537
|
+
* @readonly
|
|
2538
|
+
*/
|
|
2539
|
+
pending?: Price;
|
|
2540
|
+
}
|
|
2541
|
+
/**
|
|
2542
|
+
* Common object for tags.
|
|
2543
|
+
* Should be use as in this example:
|
|
2544
|
+
* message Foo {
|
|
2545
|
+
* string id = 1;
|
|
2546
|
+
* ...
|
|
2547
|
+
* Tags tags = 5
|
|
2548
|
+
* }
|
|
2549
|
+
*
|
|
2550
|
+
* example of taggable entity
|
|
2551
|
+
* {
|
|
2552
|
+
* id: "123"
|
|
2553
|
+
* tags: {
|
|
2554
|
+
* tags: {
|
|
2555
|
+
* tag_ids:["11","22"]
|
|
2556
|
+
* },
|
|
2557
|
+
* private_tags: {
|
|
2558
|
+
* tag_ids: ["33", "44"]
|
|
2559
|
+
* }
|
|
2560
|
+
* }
|
|
2561
|
+
* }
|
|
2562
|
+
*/
|
|
2563
|
+
interface Tags {
|
|
2564
|
+
/** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
|
|
2565
|
+
privateTags?: TagList;
|
|
2566
|
+
/** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
|
|
2567
|
+
tags?: TagList;
|
|
2568
|
+
}
|
|
2569
|
+
interface TagList {
|
|
2570
|
+
/**
|
|
2571
|
+
* List of tag IDs
|
|
2572
|
+
* @maxSize 100
|
|
2573
|
+
* @maxLength 5
|
|
2574
|
+
*/
|
|
2575
|
+
tagIds?: string[];
|
|
2576
|
+
}
|
|
2577
|
+
interface CreateOrderFromDraftRequest {
|
|
2578
|
+
}
|
|
2579
|
+
interface CreateOrderFromDraftResponse {
|
|
2580
|
+
}
|
|
2581
|
+
interface DeleteDraftOrderRequest {
|
|
2582
|
+
/**
|
|
2583
|
+
* The draft order id
|
|
2584
|
+
* @format GUID
|
|
2585
|
+
*/
|
|
2586
|
+
draftOrderId: string;
|
|
2587
|
+
}
|
|
2588
|
+
interface DeleteDraftOrderResponse {
|
|
2589
|
+
}
|
|
2590
|
+
interface QueryDraftOrdersRequest {
|
|
2591
|
+
/** WQL expression */
|
|
2592
|
+
query?: CursorQuery;
|
|
2593
|
+
}
|
|
2594
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
2595
|
+
/**
|
|
2596
|
+
* Cursor paging options.
|
|
2597
|
+
*
|
|
2598
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
2599
|
+
*/
|
|
2600
|
+
cursorPaging?: CursorPaging;
|
|
2601
|
+
/**
|
|
2602
|
+
* Filter object.
|
|
2603
|
+
*
|
|
2604
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
2605
|
+
*/
|
|
2606
|
+
filter?: Record<string, any> | null;
|
|
2607
|
+
/**
|
|
2608
|
+
* Sort object.
|
|
2609
|
+
*
|
|
2610
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
2611
|
+
* @maxSize 5
|
|
2612
|
+
*/
|
|
2613
|
+
sort?: Sorting[];
|
|
2614
|
+
}
|
|
2615
|
+
/** @oneof */
|
|
2616
|
+
interface CursorQueryPagingMethodOneOf {
|
|
2617
|
+
/**
|
|
2618
|
+
* Cursor paging options.
|
|
2619
|
+
*
|
|
2620
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
2621
|
+
*/
|
|
2622
|
+
cursorPaging?: CursorPaging;
|
|
2623
|
+
}
|
|
2624
|
+
interface Sorting {
|
|
2625
|
+
/**
|
|
2626
|
+
* Name of the field to sort by.
|
|
2627
|
+
* @maxLength 512
|
|
2628
|
+
*/
|
|
2629
|
+
fieldName?: string;
|
|
2630
|
+
/** Sort order. */
|
|
2631
|
+
order?: SortOrder;
|
|
2632
|
+
}
|
|
2633
|
+
declare enum SortOrder {
|
|
2634
|
+
ASC = "ASC",
|
|
2635
|
+
DESC = "DESC"
|
|
2636
|
+
}
|
|
2637
|
+
interface CursorPaging {
|
|
2638
|
+
/**
|
|
2639
|
+
* Maximum number of items to return in the results.
|
|
2640
|
+
* @max 100
|
|
2641
|
+
*/
|
|
2642
|
+
limit?: number | null;
|
|
2643
|
+
/**
|
|
2644
|
+
* Pointer to the next or previous page in the list of results.
|
|
2645
|
+
*
|
|
2646
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
2647
|
+
* Not relevant for the first request.
|
|
2648
|
+
* @maxLength 16000
|
|
2649
|
+
*/
|
|
2650
|
+
cursor?: string | null;
|
|
2651
|
+
}
|
|
2652
|
+
interface QueryDraftOrdersResponse {
|
|
2653
|
+
/** list of edits per order */
|
|
2654
|
+
draftOrders?: DraftOrder[];
|
|
2655
|
+
/** Paging metadata. */
|
|
2656
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
2657
|
+
}
|
|
2658
|
+
interface CursorPagingMetadata {
|
|
2659
|
+
/** Number of items returned in current page. */
|
|
2660
|
+
count?: number | null;
|
|
2661
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
2662
|
+
cursors?: Cursors;
|
|
2663
|
+
/**
|
|
2664
|
+
* Whether there are more pages to retrieve following the current page.
|
|
2665
|
+
*
|
|
2666
|
+
* + `true`: Another page of results can be retrieved.
|
|
2667
|
+
* + `false`: This is the last page.
|
|
2668
|
+
*/
|
|
2669
|
+
hasNext?: boolean | null;
|
|
2670
|
+
}
|
|
2671
|
+
interface Cursors {
|
|
2672
|
+
/**
|
|
2673
|
+
* Cursor string pointing to the next page in the list of results.
|
|
2674
|
+
* @maxLength 16000
|
|
2675
|
+
*/
|
|
2676
|
+
next?: string | null;
|
|
2677
|
+
/**
|
|
2678
|
+
* Cursor pointing to the previous page in the list of results.
|
|
2679
|
+
* @maxLength 16000
|
|
2680
|
+
*/
|
|
2681
|
+
prev?: string | null;
|
|
2682
|
+
}
|
|
2683
|
+
interface SetTaxExemptionRequest {
|
|
2684
|
+
}
|
|
2685
|
+
interface SetTaxExemptionResponse {
|
|
2686
|
+
}
|
|
2687
|
+
interface SetBusinessLocationRequest {
|
|
2688
|
+
}
|
|
2689
|
+
interface SetBusinessLocationResponse {
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2692
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
2693
|
+
getUrl: (context: any) => string;
|
|
2694
|
+
httpMethod: K;
|
|
2695
|
+
path: string;
|
|
2696
|
+
pathParams: M;
|
|
2697
|
+
__requestType: T;
|
|
2698
|
+
__originalRequestType: S;
|
|
2699
|
+
__responseType: Q;
|
|
2700
|
+
__originalResponseType: R;
|
|
2701
|
+
};
|
|
2702
|
+
declare function createDraftOrder(): __PublicMethodMetaInfo<'POST', {}, CreateDraftOrderRequest$1, CreateDraftOrderRequest, CreateDraftOrderResponse$1, CreateDraftOrderResponse>;
|
|
2703
|
+
declare function createEmptyDraftOrder(): __PublicMethodMetaInfo<'POST', {}, CreateEmptyDraftOrderRequest$1, CreateEmptyDraftOrderRequest, CreateEmptyDraftOrderResponse$1, CreateEmptyDraftOrderResponse>;
|
|
2704
|
+
declare function addLineItemsToDraftOrder(): __PublicMethodMetaInfo<'POST', {
|
|
2705
|
+
draftOrderId: string;
|
|
2706
|
+
}, AddLineItemsToDraftOrderRequest$1, AddLineItemsToDraftOrderRequest, AddLineItemsToDraftOrderResponse$1, AddLineItemsToDraftOrderResponse>;
|
|
2707
|
+
declare function updateLineItems(): __PublicMethodMetaInfo<'POST', {
|
|
2708
|
+
draftOrderId: string;
|
|
2709
|
+
}, UpdateLineItemsRequest$1, UpdateLineItemsRequest, UpdateLineItemsResponse$1, UpdateLineItemsResponse>;
|
|
2710
|
+
declare function setDiscounts(): __PublicMethodMetaInfo<'POST', {
|
|
2711
|
+
draftOrderId: string;
|
|
2712
|
+
}, SetDiscountsRequest$1, SetDiscountsRequest, SetDiscountsResponse$1, SetDiscountsResponse>;
|
|
2713
|
+
declare function createCustomDiscounts(): __PublicMethodMetaInfo<'POST', {
|
|
2714
|
+
draftOrderId: string;
|
|
2715
|
+
}, CreateCustomDiscountsRequest$1, CreateCustomDiscountsRequest, CreateCustomDiscountsResponse$1, CreateCustomDiscountsResponse>;
|
|
2716
|
+
declare function deleteCustomDiscounts(): __PublicMethodMetaInfo<'POST', {
|
|
2717
|
+
draftOrderId: string;
|
|
2718
|
+
}, DeleteCustomDiscountsRequest$1, DeleteCustomDiscountsRequest, DeleteCustomDiscountsResponse$1, DeleteCustomDiscountsResponse>;
|
|
2719
|
+
declare function setAdditionalFees(): __PublicMethodMetaInfo<'POST', {
|
|
2720
|
+
draftOrderId: string;
|
|
2721
|
+
}, SetAdditionalFeesRequest$1, SetAdditionalFeesRequest, SetAdditionalFeesResponse$1, SetAdditionalFeesResponse>;
|
|
2722
|
+
declare function createCustomAdditionalFees(): __PublicMethodMetaInfo<'POST', {
|
|
2723
|
+
draftOrderId: string;
|
|
2724
|
+
}, CreateCustomAdditionalFeesRequest$1, CreateCustomAdditionalFeesRequest, CreateCustomAdditionalFeesResponse$1, CreateCustomAdditionalFeesResponse>;
|
|
2725
|
+
declare function deleteCustomAdditionalFees(): __PublicMethodMetaInfo<'POST', {
|
|
2726
|
+
draftOrderId: string;
|
|
2727
|
+
}, DeleteCustomAdditionalFeesRequest$1, DeleteCustomAdditionalFeesRequest, DeleteCustomAdditionalFeesResponse$1, DeleteCustomAdditionalFeesResponse>;
|
|
2728
|
+
declare function setShippingInfo(): __PublicMethodMetaInfo<'PUT', {}, SetShippingInfoRequest$1, SetShippingInfoRequest, SetShippingInfoResponse$1, SetShippingInfoResponse>;
|
|
2729
|
+
declare function setBuyerInfo(): __PublicMethodMetaInfo<'PUT', {}, SetBuyerInfoRequest$1, SetBuyerInfoRequest, SetBuyerInfoResponse$1, SetBuyerInfoResponse>;
|
|
2730
|
+
declare function setRecipientInfo(): __PublicMethodMetaInfo<'PUT', {}, SetRecipientInfoRequest$1, SetRecipientInfoRequest, SetRecipientInfoResponse$1, SetRecipientInfoResponse>;
|
|
2731
|
+
declare function setBillingInfo(): __PublicMethodMetaInfo<'PUT', {}, SetBillingInfoRequest$1, SetBillingInfoRequest, SetBillingInfoResponse$1, SetBillingInfoResponse>;
|
|
2732
|
+
declare function getDraftOrder(): __PublicMethodMetaInfo<'GET', {
|
|
2733
|
+
draftOrderId: string;
|
|
2734
|
+
}, GetDraftOrderRequest$1, GetDraftOrderRequest, GetDraftOrderResponse$1, GetDraftOrderResponse>;
|
|
2735
|
+
declare function getOrderDraftabilityStatus(): __PublicMethodMetaInfo<'GET', {
|
|
2736
|
+
orderId: string;
|
|
2737
|
+
}, GetOrderDraftabilityStatusRequest$1, GetOrderDraftabilityStatusRequest, GetOrderDraftabilityStatusResponse$1, GetOrderDraftabilityStatusResponse>;
|
|
2738
|
+
declare function commitDraftOrder(): __PublicMethodMetaInfo<'POST', {
|
|
2739
|
+
draftOrderId: string;
|
|
2740
|
+
}, CommitDraftOrderRequest$1, CommitDraftOrderRequest, CommitDraftOrderResponse$1, CommitDraftOrderResponse>;
|
|
2741
|
+
declare function createOrderFromDraft(): __PublicMethodMetaInfo<'POST', {
|
|
2742
|
+
draftOrderId: string;
|
|
2743
|
+
}, CreateOrderFromDraftRequest$1, CreateOrderFromDraftRequest, CreateOrderFromDraftResponse$1, CreateOrderFromDraftResponse>;
|
|
2744
|
+
declare function deleteDraftOrder(): __PublicMethodMetaInfo<'DELETE', {
|
|
2745
|
+
draftOrderId: string;
|
|
2746
|
+
}, DeleteDraftOrderRequest$1, DeleteDraftOrderRequest, DeleteDraftOrderResponse$1, DeleteDraftOrderResponse>;
|
|
2747
|
+
declare function queryDraftOrders(): __PublicMethodMetaInfo<'POST', {}, QueryDraftOrdersRequest$1, QueryDraftOrdersRequest, QueryDraftOrdersResponse$1, QueryDraftOrdersResponse>;
|
|
2748
|
+
declare function setTaxExemption(): __PublicMethodMetaInfo<'PUT', {}, SetTaxExemptionRequest$1, SetTaxExemptionRequest, SetTaxExemptionResponse$1, SetTaxExemptionResponse>;
|
|
2749
|
+
declare function setBusinessLocation(): __PublicMethodMetaInfo<'PUT', {}, SetBusinessLocationRequest$1, SetBusinessLocationRequest, SetBusinessLocationResponse$1, SetBusinessLocationResponse>;
|
|
2750
|
+
|
|
2751
|
+
export { type __PublicMethodMetaInfo, addLineItemsToDraftOrder, commitDraftOrder, createCustomAdditionalFees, createCustomDiscounts, createDraftOrder, createEmptyDraftOrder, createOrderFromDraft, deleteCustomAdditionalFees, deleteCustomDiscounts, deleteDraftOrder, getDraftOrder, getOrderDraftabilityStatus, queryDraftOrders, setAdditionalFees, setBillingInfo, setBusinessLocation, setBuyerInfo, setDiscounts, setRecipientInfo, setShippingInfo, setTaxExemption, updateLineItems };
|