@wix/auto_sdk_ecom_cart 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ecom-v1-cart-cart.context.d.ts +30 -0
- package/build/cjs/src/ecom-v1-cart-cart.context.js +58 -0
- package/build/cjs/src/ecom-v1-cart-cart.context.js.map +1 -0
- package/build/cjs/src/ecom-v1-cart-cart.http.d.ts +92 -0
- package/build/cjs/src/ecom-v1-cart-cart.http.js +844 -0
- package/build/cjs/src/ecom-v1-cart-cart.http.js.map +1 -0
- package/build/cjs/src/ecom-v1-cart-cart.meta.d.ts +46 -0
- package/build/cjs/src/ecom-v1-cart-cart.meta.js +256 -0
- package/build/cjs/src/ecom-v1-cart-cart.meta.js.map +1 -0
- package/build/cjs/src/ecom-v1-cart-cart.public.d.ts +152 -0
- package/build/cjs/src/ecom-v1-cart-cart.public.js +228 -0
- package/build/cjs/src/ecom-v1-cart-cart.public.js.map +1 -0
- package/build/cjs/src/ecom-v1-cart-cart.types.d.ts +2506 -0
- package/build/cjs/src/ecom-v1-cart-cart.types.js +255 -0
- package/build/cjs/src/ecom-v1-cart-cart.types.js.map +1 -0
- package/build/cjs/src/ecom-v1-cart-cart.universal.d.ts +2996 -0
- package/build/cjs/src/ecom-v1-cart-cart.universal.js +1169 -0
- package/build/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/ecom-v1-cart-cart.context.d.ts +30 -0
- package/build/es/src/ecom-v1-cart-cart.context.js +30 -0
- package/build/es/src/ecom-v1-cart-cart.context.js.map +1 -0
- package/build/es/src/ecom-v1-cart-cart.http.d.ts +92 -0
- package/build/es/src/ecom-v1-cart-cart.http.js +829 -0
- package/build/es/src/ecom-v1-cart-cart.http.js.map +1 -0
- package/build/es/src/ecom-v1-cart-cart.meta.d.ts +46 -0
- package/build/es/src/ecom-v1-cart-cart.meta.js +218 -0
- package/build/es/src/ecom-v1-cart-cart.meta.js.map +1 -0
- package/build/es/src/ecom-v1-cart-cart.public.d.ts +152 -0
- package/build/es/src/ecom-v1-cart-cart.public.js +188 -0
- package/build/es/src/ecom-v1-cart-cart.public.js.map +1 -0
- package/build/es/src/ecom-v1-cart-cart.types.d.ts +2506 -0
- package/build/es/src/ecom-v1-cart-cart.types.js +252 -0
- package/build/es/src/ecom-v1-cart-cart.types.js.map +1 -0
- package/build/es/src/ecom-v1-cart-cart.universal.d.ts +2996 -0
- package/build/es/src/ecom-v1-cart-cart.universal.js +1131 -0
- package/build/es/src/ecom-v1-cart-cart.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.context.d.ts +30 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.context.js +58 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.context.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.d.ts +92 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.js +844 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.meta.d.ts +46 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.meta.js +256 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.d.ts +170 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.js +228 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.types.d.ts +2565 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.types.js +255 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.types.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.universal.d.ts +3261 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js +1169 -0
- package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/ecom-v1-cart-cart.context.d.ts +30 -0
- package/build/internal/es/src/ecom-v1-cart-cart.context.js +30 -0
- package/build/internal/es/src/ecom-v1-cart-cart.context.js.map +1 -0
- package/build/internal/es/src/ecom-v1-cart-cart.http.d.ts +92 -0
- package/build/internal/es/src/ecom-v1-cart-cart.http.js +829 -0
- package/build/internal/es/src/ecom-v1-cart-cart.http.js.map +1 -0
- package/build/internal/es/src/ecom-v1-cart-cart.meta.d.ts +46 -0
- package/build/internal/es/src/ecom-v1-cart-cart.meta.js +218 -0
- package/build/internal/es/src/ecom-v1-cart-cart.meta.js.map +1 -0
- package/build/internal/es/src/ecom-v1-cart-cart.public.d.ts +170 -0
- package/build/internal/es/src/ecom-v1-cart-cart.public.js +188 -0
- package/build/internal/es/src/ecom-v1-cart-cart.public.js.map +1 -0
- package/build/internal/es/src/ecom-v1-cart-cart.types.d.ts +2565 -0
- package/build/internal/es/src/ecom-v1-cart-cart.types.js +252 -0
- package/build/internal/es/src/ecom-v1-cart-cart.types.js.map +1 -0
- package/build/internal/es/src/ecom-v1-cart-cart.universal.d.ts +3261 -0
- package/build/internal/es/src/ecom-v1-cart-cart.universal.js +1131 -0
- package/build/internal/es/src/ecom-v1-cart-cart.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,2506 @@
|
|
|
1
|
+
export interface Cart {
|
|
2
|
+
/** Cart ID. */
|
|
3
|
+
id?: string | null;
|
|
4
|
+
/**
|
|
5
|
+
* Line items.
|
|
6
|
+
* @readonly
|
|
7
|
+
*/
|
|
8
|
+
lineItems?: LineItem[];
|
|
9
|
+
/** Note left by the buyer/customer. */
|
|
10
|
+
buyerNote?: string | null;
|
|
11
|
+
/** Buyer information. */
|
|
12
|
+
buyerInfo?: BuyerInfo;
|
|
13
|
+
/**
|
|
14
|
+
* Currency used for pricing.
|
|
15
|
+
* @readonly
|
|
16
|
+
*/
|
|
17
|
+
currency?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Currency code used for all the converted prices that are returned.
|
|
20
|
+
* For a site that supports multiple currencies, this is the currency the buyer selected.
|
|
21
|
+
* @readonly
|
|
22
|
+
*/
|
|
23
|
+
conversionCurrency?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Language for communication with the buyer. Defaults to the site language.
|
|
26
|
+
* For a site that supports multiple languages, this is the language the buyer selected.
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
buyerLanguage?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Site language in which original values are displayed.
|
|
32
|
+
* @readonly
|
|
33
|
+
*/
|
|
34
|
+
siteLanguage?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Whether tax is included in line item prices.
|
|
37
|
+
* @readonly
|
|
38
|
+
*/
|
|
39
|
+
taxIncludedInPrices?: boolean | null;
|
|
40
|
+
/**
|
|
41
|
+
* Weight measurement unit - defaults to site's weight unit.
|
|
42
|
+
* @readonly
|
|
43
|
+
*/
|
|
44
|
+
weightUnit?: WeightUnit;
|
|
45
|
+
/**
|
|
46
|
+
* ID of the checkout that originated from this cart.
|
|
47
|
+
* @readonly
|
|
48
|
+
*/
|
|
49
|
+
checkoutId?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Cart discounts.
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
appliedDiscounts?: CartDiscount[];
|
|
55
|
+
/**
|
|
56
|
+
* Date and time the cart was created.
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
59
|
+
createdDate?: Date | null;
|
|
60
|
+
/**
|
|
61
|
+
* Date and time the cart was updated.
|
|
62
|
+
* @readonly
|
|
63
|
+
*/
|
|
64
|
+
updatedDate?: Date | null;
|
|
65
|
+
/** Contact info. */
|
|
66
|
+
contactInfo?: AddressWithContact;
|
|
67
|
+
/**
|
|
68
|
+
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
69
|
+
*
|
|
70
|
+
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the [Abandoned Checkout API](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/abandoned-checkout/introduction)
|
|
71
|
+
* to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
|
|
72
|
+
* standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
73
|
+
*/
|
|
74
|
+
overrideCheckoutUrl?: string | null;
|
|
75
|
+
/**
|
|
76
|
+
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
77
|
+
* @readonly
|
|
78
|
+
*/
|
|
79
|
+
purchaseFlowId?: string | null;
|
|
80
|
+
/** Selected shipping option. */
|
|
81
|
+
selectedShippingOption?: SelectedShippingOption;
|
|
82
|
+
}
|
|
83
|
+
export interface LineItem {
|
|
84
|
+
/**
|
|
85
|
+
* Line item ID.
|
|
86
|
+
* @readonly
|
|
87
|
+
*/
|
|
88
|
+
id?: string | null;
|
|
89
|
+
/** Item quantity. */
|
|
90
|
+
quantity?: number;
|
|
91
|
+
/** Catalog and item reference. Holds 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. */
|
|
92
|
+
catalogReference?: CatalogReference;
|
|
93
|
+
/**
|
|
94
|
+
* Item name.
|
|
95
|
+
* + Stores - `product.name`
|
|
96
|
+
* + Bookings - `service.info.name`
|
|
97
|
+
* + Events - `ticket.name`
|
|
98
|
+
* @readonly
|
|
99
|
+
*/
|
|
100
|
+
productName?: ProductName;
|
|
101
|
+
/**
|
|
102
|
+
* URL to the item's page on the site.
|
|
103
|
+
* @readonly
|
|
104
|
+
*/
|
|
105
|
+
url?: PageUrlV2;
|
|
106
|
+
/**
|
|
107
|
+
* Item price **after** catalog-defined discount and line item discounts.
|
|
108
|
+
* @readonly
|
|
109
|
+
*/
|
|
110
|
+
price?: MultiCurrencyPrice;
|
|
111
|
+
/**
|
|
112
|
+
* Item price **before** catalog-defined discount. Defaults to `price` when not provided.
|
|
113
|
+
* @readonly
|
|
114
|
+
*/
|
|
115
|
+
fullPrice?: MultiCurrencyPrice;
|
|
116
|
+
/**
|
|
117
|
+
* Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided.
|
|
118
|
+
* @readonly
|
|
119
|
+
*/
|
|
120
|
+
priceBeforeDiscounts?: MultiCurrencyPrice;
|
|
121
|
+
/**
|
|
122
|
+
* Line item description lines. Used for displaying the cart, checkout and order.
|
|
123
|
+
* @readonly
|
|
124
|
+
*/
|
|
125
|
+
descriptionLines?: DescriptionLine[];
|
|
126
|
+
/**
|
|
127
|
+
* Line item image details.
|
|
128
|
+
* @readonly
|
|
129
|
+
*/
|
|
130
|
+
image?: CommonImage;
|
|
131
|
+
/**
|
|
132
|
+
* Item availability details.
|
|
133
|
+
* @readonly
|
|
134
|
+
*/
|
|
135
|
+
availability?: ItemAvailabilityInfo;
|
|
136
|
+
/**
|
|
137
|
+
* Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability.
|
|
138
|
+
* @readonly
|
|
139
|
+
*/
|
|
140
|
+
physicalProperties?: PhysicalProperties;
|
|
141
|
+
/**
|
|
142
|
+
* Item type. Either a preset type or custom.
|
|
143
|
+
* @readonly
|
|
144
|
+
*/
|
|
145
|
+
itemType?: ItemType;
|
|
146
|
+
/**
|
|
147
|
+
* Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
|
|
148
|
+
* + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout.
|
|
149
|
+
* + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
|
|
150
|
+
* + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
151
|
+
* + `DEPOSIT_ONLINE` - Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is defined by `lineItem.deposit`.
|
|
152
|
+
* + `MEMBERSHIP_OFFLINE` - Payment for this item can only be performed by using a membership and must be manually redeemed in the dashboard by the site owner. When this option is used, `lineItem.price.amount` is 0.
|
|
153
|
+
* @readonly
|
|
154
|
+
*/
|
|
155
|
+
paymentOption?: PaymentOptionType;
|
|
156
|
+
/**
|
|
157
|
+
* Service properties. When relevant, this contains information such as date and number of participants.
|
|
158
|
+
* @readonly
|
|
159
|
+
*/
|
|
160
|
+
serviceProperties?: ServiceProperties;
|
|
161
|
+
/**
|
|
162
|
+
* In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
|
|
163
|
+
* + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
|
|
164
|
+
* + in most cases, this field is the same as `catalogReference.catalogItemId`.
|
|
165
|
+
* + Used in membership validation.
|
|
166
|
+
* @readonly
|
|
167
|
+
*/
|
|
168
|
+
rootCatalogItemId?: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
|
|
171
|
+
* @readonly
|
|
172
|
+
*/
|
|
173
|
+
priceDescription?: PriceDescription;
|
|
174
|
+
/**
|
|
175
|
+
* Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
|
|
176
|
+
* @readonly
|
|
177
|
+
*/
|
|
178
|
+
depositAmount?: MultiCurrencyPrice;
|
|
179
|
+
/** Selected membership to be used as payment for this item. Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`. This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`. */
|
|
180
|
+
selectedMembership?: SelectedMembership;
|
|
181
|
+
/**
|
|
182
|
+
* Tax group ID for this line item.
|
|
183
|
+
* @readonly
|
|
184
|
+
*/
|
|
185
|
+
taxGroupId?: string | null;
|
|
186
|
+
/**
|
|
187
|
+
* Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin.
|
|
188
|
+
* @readonly
|
|
189
|
+
*/
|
|
190
|
+
customLineItem?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
|
|
193
|
+
* @readonly
|
|
194
|
+
*/
|
|
195
|
+
consentRequiredPaymentPolicy?: string | null;
|
|
196
|
+
/**
|
|
197
|
+
* Overriding values for catalog item properties.
|
|
198
|
+
*
|
|
199
|
+
* To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
200
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
201
|
+
*/
|
|
202
|
+
catalogOverrideFields?: CatalogOverrideFields;
|
|
203
|
+
/**
|
|
204
|
+
* Whether to save the payment method on the order.
|
|
205
|
+
*
|
|
206
|
+
* Default: `false`
|
|
207
|
+
* @readonly
|
|
208
|
+
*/
|
|
209
|
+
savePaymentMethod?: boolean;
|
|
210
|
+
}
|
|
211
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
212
|
+
export interface CatalogReference {
|
|
213
|
+
/** ID of the item within the catalog it belongs to. */
|
|
214
|
+
catalogItemId?: string;
|
|
215
|
+
/**
|
|
216
|
+
* ID of the app providing the catalog.
|
|
217
|
+
*
|
|
218
|
+
* You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
219
|
+
*
|
|
220
|
+
* For items from Wix catalogs, the following values always apply:
|
|
221
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
222
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
223
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
224
|
+
*/
|
|
225
|
+
appId?: string;
|
|
226
|
+
/**
|
|
227
|
+
* 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.
|
|
228
|
+
*
|
|
229
|
+
* For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).
|
|
230
|
+
*/
|
|
231
|
+
options?: Record<string, any> | null;
|
|
232
|
+
}
|
|
233
|
+
export interface ProductName {
|
|
234
|
+
/**
|
|
235
|
+
* __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).
|
|
236
|
+
*
|
|
237
|
+
* Min: 1 character.
|
|
238
|
+
* Max: 200 characters.
|
|
239
|
+
*/
|
|
240
|
+
original?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Item name translated into the buyer's language.
|
|
243
|
+
*
|
|
244
|
+
* Min: 1 character.
|
|
245
|
+
* Max: 400 characters.
|
|
246
|
+
* Default: Same as `original`.
|
|
247
|
+
*/
|
|
248
|
+
translated?: string | null;
|
|
249
|
+
}
|
|
250
|
+
export interface PageUrlV2 {
|
|
251
|
+
/** The relative path for the page within the site. For example, `/product-page/a-product`. */
|
|
252
|
+
relativePath?: string;
|
|
253
|
+
/** The page's full URL. For example, `https://mysite.com/product-page/a-product`. */
|
|
254
|
+
url?: string | null;
|
|
255
|
+
}
|
|
256
|
+
export interface MultiCurrencyPrice {
|
|
257
|
+
/** Amount. */
|
|
258
|
+
amount?: string;
|
|
259
|
+
/**
|
|
260
|
+
* Converted amount.
|
|
261
|
+
* @readonly
|
|
262
|
+
*/
|
|
263
|
+
convertedAmount?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Amount formatted with currency symbol.
|
|
266
|
+
* @readonly
|
|
267
|
+
*/
|
|
268
|
+
formattedAmount?: string;
|
|
269
|
+
/**
|
|
270
|
+
* Converted amount formatted with currency symbol.
|
|
271
|
+
* @readonly
|
|
272
|
+
*/
|
|
273
|
+
formattedConvertedAmount?: string;
|
|
274
|
+
}
|
|
275
|
+
export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
276
|
+
/** Description line plain text value. */
|
|
277
|
+
plainText?: PlainTextValue;
|
|
278
|
+
/** Description line color value. */
|
|
279
|
+
colorInfo?: Color;
|
|
280
|
+
/** Description line name. */
|
|
281
|
+
name?: DescriptionLineName;
|
|
282
|
+
}
|
|
283
|
+
/** @oneof */
|
|
284
|
+
export interface DescriptionLineValueOneOf {
|
|
285
|
+
/** Description line plain text value. */
|
|
286
|
+
plainText?: PlainTextValue;
|
|
287
|
+
/** Description line color value. */
|
|
288
|
+
colorInfo?: Color;
|
|
289
|
+
}
|
|
290
|
+
/** @oneof */
|
|
291
|
+
export interface DescriptionLineDescriptionLineValueOneOf {
|
|
292
|
+
}
|
|
293
|
+
export interface DescriptionLineName {
|
|
294
|
+
/** Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */
|
|
295
|
+
original?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Description line name translated into the buyer's language.
|
|
298
|
+
*
|
|
299
|
+
* Default: Same as `original`.
|
|
300
|
+
*/
|
|
301
|
+
translated?: string | null;
|
|
302
|
+
}
|
|
303
|
+
export interface PlainTextValue {
|
|
304
|
+
/** Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */
|
|
305
|
+
original?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Description line plain text value translated into the buyer's language.
|
|
308
|
+
*
|
|
309
|
+
* Default: Same as `original`.
|
|
310
|
+
*/
|
|
311
|
+
translated?: string | null;
|
|
312
|
+
}
|
|
313
|
+
export interface Color {
|
|
314
|
+
/** Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */
|
|
315
|
+
original?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Description line color name translated into the buyer's language.
|
|
318
|
+
*
|
|
319
|
+
* Default: Same as `original`.
|
|
320
|
+
*/
|
|
321
|
+
translated?: string | null;
|
|
322
|
+
/** HEX or RGB color code for display. */
|
|
323
|
+
code?: string | null;
|
|
324
|
+
}
|
|
325
|
+
export declare enum DescriptionLineType {
|
|
326
|
+
/** Unrecognized type. */
|
|
327
|
+
UNRECOGNISED = "UNRECOGNISED",
|
|
328
|
+
/** Plain text type. */
|
|
329
|
+
PLAIN_TEXT = "PLAIN_TEXT",
|
|
330
|
+
/** Color type. */
|
|
331
|
+
COLOR = "COLOR"
|
|
332
|
+
}
|
|
333
|
+
export interface CommonImage {
|
|
334
|
+
/** WixMedia image ID. */
|
|
335
|
+
id?: string;
|
|
336
|
+
/** Image URL. */
|
|
337
|
+
url?: string;
|
|
338
|
+
/**
|
|
339
|
+
* Original image height.
|
|
340
|
+
* @readonly
|
|
341
|
+
*/
|
|
342
|
+
height?: number;
|
|
343
|
+
/**
|
|
344
|
+
* Original image width.
|
|
345
|
+
* @readonly
|
|
346
|
+
*/
|
|
347
|
+
width?: number;
|
|
348
|
+
/** Image alt text. */
|
|
349
|
+
altText?: string | null;
|
|
350
|
+
/**
|
|
351
|
+
* Image filename.
|
|
352
|
+
* @readonly
|
|
353
|
+
*/
|
|
354
|
+
filename?: string | null;
|
|
355
|
+
}
|
|
356
|
+
export interface FocalPoint {
|
|
357
|
+
/** X-coordinate of the focal point. */
|
|
358
|
+
x?: number;
|
|
359
|
+
/** Y-coordinate of the focal point. */
|
|
360
|
+
y?: number;
|
|
361
|
+
/** crop by height */
|
|
362
|
+
height?: number | null;
|
|
363
|
+
/** crop by width */
|
|
364
|
+
width?: number | null;
|
|
365
|
+
}
|
|
366
|
+
export interface ItemAvailabilityInfo {
|
|
367
|
+
/** Item availability status. */
|
|
368
|
+
status?: ItemAvailabilityStatus;
|
|
369
|
+
/** Quantity available. */
|
|
370
|
+
quantityAvailable?: number | null;
|
|
371
|
+
}
|
|
372
|
+
export declare enum ItemAvailabilityStatus {
|
|
373
|
+
AVAILABLE = "AVAILABLE",
|
|
374
|
+
/** Item does not exist */
|
|
375
|
+
NOT_FOUND = "NOT_FOUND",
|
|
376
|
+
/** Item not in stock */
|
|
377
|
+
NOT_AVAILABLE = "NOT_AVAILABLE",
|
|
378
|
+
/** Available quantity is less than requested */
|
|
379
|
+
PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE"
|
|
380
|
+
}
|
|
381
|
+
export interface PhysicalProperties {
|
|
382
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
383
|
+
weight?: number | null;
|
|
384
|
+
/** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
|
|
385
|
+
sku?: string | null;
|
|
386
|
+
/** Whether this line item is shippable. */
|
|
387
|
+
shippable?: boolean;
|
|
388
|
+
}
|
|
389
|
+
export interface Scope {
|
|
390
|
+
/** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
|
|
391
|
+
namespace?: string;
|
|
392
|
+
/** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
|
|
393
|
+
group?: Group;
|
|
394
|
+
}
|
|
395
|
+
export interface Group {
|
|
396
|
+
/** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
|
|
397
|
+
name?: string;
|
|
398
|
+
/** Item ID (when the coupon scope is limited to just one item). */
|
|
399
|
+
entityId?: string | null;
|
|
400
|
+
}
|
|
401
|
+
export interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
402
|
+
/** Preset item type. */
|
|
403
|
+
preset?: ItemTypeItemType;
|
|
404
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
405
|
+
custom?: string;
|
|
406
|
+
}
|
|
407
|
+
/** @oneof */
|
|
408
|
+
export interface ItemTypeItemTypeDataOneOf {
|
|
409
|
+
/** Preset item type. */
|
|
410
|
+
preset?: ItemTypeItemType;
|
|
411
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
412
|
+
custom?: string;
|
|
413
|
+
}
|
|
414
|
+
export declare enum ItemTypeItemType {
|
|
415
|
+
UNRECOGNISED = "UNRECOGNISED",
|
|
416
|
+
PHYSICAL = "PHYSICAL",
|
|
417
|
+
DIGITAL = "DIGITAL",
|
|
418
|
+
GIFT_CARD = "GIFT_CARD",
|
|
419
|
+
SERVICE = "SERVICE"
|
|
420
|
+
}
|
|
421
|
+
export interface SubscriptionOptionInfo {
|
|
422
|
+
/** Subscription option settings. */
|
|
423
|
+
subscriptionSettings?: SubscriptionSettings;
|
|
424
|
+
/** Subscription option title. */
|
|
425
|
+
title?: Title;
|
|
426
|
+
/** Subscription option description. */
|
|
427
|
+
description?: Description;
|
|
428
|
+
}
|
|
429
|
+
export interface SubscriptionSettings {
|
|
430
|
+
/** Frequency of recurring payment. */
|
|
431
|
+
frequency?: SubscriptionFrequency;
|
|
432
|
+
/**
|
|
433
|
+
* Interval of recurring payment.
|
|
434
|
+
*
|
|
435
|
+
* Default: `1`.
|
|
436
|
+
* If SubscriptionFrequency is Day the minimum interval is 7
|
|
437
|
+
*/
|
|
438
|
+
interval?: number | null;
|
|
439
|
+
/** Whether subscription is renewed automatically at the end of each period. */
|
|
440
|
+
autoRenewal?: boolean;
|
|
441
|
+
/** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */
|
|
442
|
+
billingCycles?: number | null;
|
|
443
|
+
}
|
|
444
|
+
/** Frequency unit of recurring payment */
|
|
445
|
+
export declare enum SubscriptionFrequency {
|
|
446
|
+
UNDEFINED = "UNDEFINED",
|
|
447
|
+
DAY = "DAY",
|
|
448
|
+
WEEK = "WEEK",
|
|
449
|
+
MONTH = "MONTH",
|
|
450
|
+
YEAR = "YEAR"
|
|
451
|
+
}
|
|
452
|
+
export interface FreeTrialPeriod {
|
|
453
|
+
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
454
|
+
frequency?: SubscriptionFrequency;
|
|
455
|
+
/** interval of period */
|
|
456
|
+
interval?: number;
|
|
457
|
+
}
|
|
458
|
+
export interface Title {
|
|
459
|
+
/** Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */
|
|
460
|
+
original?: string;
|
|
461
|
+
/**
|
|
462
|
+
* Subscription option name translated into the buyer's language.
|
|
463
|
+
*
|
|
464
|
+
* Default: Same as `original`.
|
|
465
|
+
*/
|
|
466
|
+
translated?: string | null;
|
|
467
|
+
}
|
|
468
|
+
export interface Description {
|
|
469
|
+
/** Subscription option description. */
|
|
470
|
+
original?: string;
|
|
471
|
+
/** Translated subscription option description. */
|
|
472
|
+
translated?: string | null;
|
|
473
|
+
}
|
|
474
|
+
export interface SecuredMedia {
|
|
475
|
+
/** Media ID in Wix Media Manager. */
|
|
476
|
+
id?: string;
|
|
477
|
+
/** Original filename. */
|
|
478
|
+
fileName?: string;
|
|
479
|
+
/** File type. */
|
|
480
|
+
fileType?: FileType;
|
|
481
|
+
}
|
|
482
|
+
export declare enum FileType {
|
|
483
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
484
|
+
SECURE_PICTURE = "SECURE_PICTURE",
|
|
485
|
+
SECURE_VIDEO = "SECURE_VIDEO",
|
|
486
|
+
SECURE_DOCUMENT = "SECURE_DOCUMENT",
|
|
487
|
+
SECURE_MUSIC = "SECURE_MUSIC",
|
|
488
|
+
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
489
|
+
}
|
|
490
|
+
/** Type of selected payment option for catalog item */
|
|
491
|
+
export declare enum PaymentOptionType {
|
|
492
|
+
/** The entire payment for this item happens as part of the checkout. */
|
|
493
|
+
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
494
|
+
/** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
|
|
495
|
+
FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
|
|
496
|
+
/** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
|
|
497
|
+
MEMBERSHIP = "MEMBERSHIP",
|
|
498
|
+
/** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
|
|
499
|
+
DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
|
|
500
|
+
/** 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`. */
|
|
501
|
+
MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
|
|
502
|
+
}
|
|
503
|
+
export interface ServiceProperties {
|
|
504
|
+
/**
|
|
505
|
+
* Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
506
|
+
* For example, the start time of a class.
|
|
507
|
+
*/
|
|
508
|
+
scheduledDate?: Date | null;
|
|
509
|
+
/** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */
|
|
510
|
+
numberOfParticipants?: number | null;
|
|
511
|
+
}
|
|
512
|
+
export interface PriceDescription {
|
|
513
|
+
/** __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). */
|
|
514
|
+
original?: string;
|
|
515
|
+
/**
|
|
516
|
+
* Price description translated into the buyer's language.
|
|
517
|
+
*
|
|
518
|
+
* Default: Same as `original`.
|
|
519
|
+
*/
|
|
520
|
+
translated?: string | null;
|
|
521
|
+
}
|
|
522
|
+
/** Selected Membership */
|
|
523
|
+
export interface SelectedMembership {
|
|
524
|
+
/** Membership ID. */
|
|
525
|
+
id?: string;
|
|
526
|
+
/** ID of the app providing this payment option. */
|
|
527
|
+
appId?: string;
|
|
528
|
+
}
|
|
529
|
+
export interface CatalogOverrideFields {
|
|
530
|
+
/** Item name. */
|
|
531
|
+
productName?: ProductName;
|
|
532
|
+
/** Item price **after** discounts. */
|
|
533
|
+
price?: string | null;
|
|
534
|
+
/** Item price **before** discounts. */
|
|
535
|
+
fullPrice?: string | null;
|
|
536
|
+
/** Item description lines. Used when displaying the line item to customers. */
|
|
537
|
+
descriptionLines?: DescriptionLine[];
|
|
538
|
+
/** Physical properties of the item. */
|
|
539
|
+
physicalProperties?: PhysicalProperties;
|
|
540
|
+
/** Item image. */
|
|
541
|
+
image?: Image;
|
|
542
|
+
/** Payment method selected for the item. */
|
|
543
|
+
paymentOption?: PaymentOption;
|
|
544
|
+
/** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */
|
|
545
|
+
depositAmount?: string | null;
|
|
546
|
+
/**
|
|
547
|
+
* Whether to save the payment method on the order.
|
|
548
|
+
*
|
|
549
|
+
* Default: `false`
|
|
550
|
+
*/
|
|
551
|
+
savePaymentMethod?: boolean | null;
|
|
552
|
+
}
|
|
553
|
+
export interface Image {
|
|
554
|
+
/** WixMedia image ID. */
|
|
555
|
+
id?: string;
|
|
556
|
+
/** Original image height. */
|
|
557
|
+
height?: number;
|
|
558
|
+
/** Original image width. */
|
|
559
|
+
width?: number;
|
|
560
|
+
/** Image alt text. Optional. */
|
|
561
|
+
altText?: string | null;
|
|
562
|
+
/** Image filename. Optional. */
|
|
563
|
+
filename?: string | null;
|
|
564
|
+
}
|
|
565
|
+
export interface PaymentOption {
|
|
566
|
+
/**
|
|
567
|
+
* + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout.
|
|
568
|
+
* + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
|
|
569
|
+
* + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`.
|
|
570
|
+
* + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`.
|
|
571
|
+
* + `MEMBERSHIP_OFFLINE`: 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`.
|
|
572
|
+
*/
|
|
573
|
+
value?: PaymentOptionType;
|
|
574
|
+
}
|
|
575
|
+
export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
576
|
+
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
577
|
+
addressType?: TaxableAddressType;
|
|
578
|
+
}
|
|
579
|
+
/** @oneof */
|
|
580
|
+
export interface TaxableAddressTaxableAddressDataOneOf {
|
|
581
|
+
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
582
|
+
addressType?: TaxableAddressType;
|
|
583
|
+
}
|
|
584
|
+
export declare enum TaxableAddressType {
|
|
585
|
+
UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
|
|
586
|
+
BUSINESS = "BUSINESS",
|
|
587
|
+
BILLING = "BILLING",
|
|
588
|
+
SHIPPING = "SHIPPING"
|
|
589
|
+
}
|
|
590
|
+
export interface ExtendedFields {
|
|
591
|
+
/**
|
|
592
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
593
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
594
|
+
*
|
|
595
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
596
|
+
*
|
|
597
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
598
|
+
*/
|
|
599
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
600
|
+
}
|
|
601
|
+
export interface Policy {
|
|
602
|
+
/** Policy title - should be translated */
|
|
603
|
+
title?: string | null;
|
|
604
|
+
/** Policy content - should be translated */
|
|
605
|
+
content?: string;
|
|
606
|
+
}
|
|
607
|
+
/** Buyer Info */
|
|
608
|
+
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
609
|
+
/**
|
|
610
|
+
* Visitor ID - if the buyer is **not** a site member.
|
|
611
|
+
* @readonly
|
|
612
|
+
*/
|
|
613
|
+
visitorId?: string;
|
|
614
|
+
/**
|
|
615
|
+
* Member ID - if the buyer is a site member.
|
|
616
|
+
* @readonly
|
|
617
|
+
*/
|
|
618
|
+
memberId?: string;
|
|
619
|
+
/**
|
|
620
|
+
* User ID - if the buyer (or cart owner) is a Wix user.
|
|
621
|
+
* @readonly
|
|
622
|
+
*/
|
|
623
|
+
userId?: string;
|
|
624
|
+
/** Contact ID. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). */
|
|
625
|
+
contactId?: string | null;
|
|
626
|
+
/** Buyer email address. */
|
|
627
|
+
email?: string | null;
|
|
628
|
+
}
|
|
629
|
+
/** @oneof */
|
|
630
|
+
export interface BuyerInfoIdOneOf {
|
|
631
|
+
/**
|
|
632
|
+
* Visitor ID - if the buyer is **not** a site member.
|
|
633
|
+
* @readonly
|
|
634
|
+
*/
|
|
635
|
+
visitorId?: string;
|
|
636
|
+
/**
|
|
637
|
+
* Member ID - if the buyer is a site member.
|
|
638
|
+
* @readonly
|
|
639
|
+
*/
|
|
640
|
+
memberId?: string;
|
|
641
|
+
/**
|
|
642
|
+
* User ID - if the buyer (or cart owner) is a Wix user.
|
|
643
|
+
* @readonly
|
|
644
|
+
*/
|
|
645
|
+
userId?: string;
|
|
646
|
+
}
|
|
647
|
+
export declare enum WeightUnit {
|
|
648
|
+
/** Weight unit can't be classified, due to an error */
|
|
649
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
650
|
+
/** Kilograms */
|
|
651
|
+
KG = "KG",
|
|
652
|
+
/** Pounds */
|
|
653
|
+
LB = "LB"
|
|
654
|
+
}
|
|
655
|
+
export interface CartDiscount extends CartDiscountDiscountSourceOneOf {
|
|
656
|
+
/** Coupon details. */
|
|
657
|
+
coupon?: Coupon;
|
|
658
|
+
/** Merchant discount. */
|
|
659
|
+
merchantDiscount?: MerchantDiscount;
|
|
660
|
+
}
|
|
661
|
+
/** @oneof */
|
|
662
|
+
export interface CartDiscountDiscountSourceOneOf {
|
|
663
|
+
/** Coupon details. */
|
|
664
|
+
coupon?: Coupon;
|
|
665
|
+
/** Merchant discount. */
|
|
666
|
+
merchantDiscount?: MerchantDiscount;
|
|
667
|
+
}
|
|
668
|
+
export interface Coupon {
|
|
669
|
+
/** Coupon ID. */
|
|
670
|
+
id?: string;
|
|
671
|
+
/** Coupon code. */
|
|
672
|
+
code?: string;
|
|
673
|
+
}
|
|
674
|
+
export interface MerchantDiscount {
|
|
675
|
+
/** Discount value. */
|
|
676
|
+
amount?: MultiCurrencyPrice;
|
|
677
|
+
}
|
|
678
|
+
export interface DiscountRule {
|
|
679
|
+
/** Discount rule ID */
|
|
680
|
+
id?: string;
|
|
681
|
+
/** Discount rule name */
|
|
682
|
+
name?: DiscountRuleName;
|
|
683
|
+
/** Discount value. */
|
|
684
|
+
amount?: MultiCurrencyPrice;
|
|
685
|
+
}
|
|
686
|
+
export interface DiscountRuleName {
|
|
687
|
+
/** Original discount rule name (in site's default language). */
|
|
688
|
+
original?: string;
|
|
689
|
+
/** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
|
|
690
|
+
translated?: string | null;
|
|
691
|
+
}
|
|
692
|
+
export declare enum DiscountType {
|
|
693
|
+
/** "GLOBAL" - discount applies to entire order. */
|
|
694
|
+
GLOBAL = "GLOBAL",
|
|
695
|
+
/** "SPECIFIC-ITEMS" - discount applies to specific items. */
|
|
696
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
697
|
+
/** "SHIPPING" - discount applies to shipping. For example, free shipping. */
|
|
698
|
+
SHIPPING = "SHIPPING"
|
|
699
|
+
}
|
|
700
|
+
/** Billing Info and shipping details */
|
|
701
|
+
export interface AddressWithContact {
|
|
702
|
+
/** Address. */
|
|
703
|
+
address?: Address;
|
|
704
|
+
/** Contact details. */
|
|
705
|
+
contactDetails?: FullAddressContactDetails;
|
|
706
|
+
}
|
|
707
|
+
/** Physical address */
|
|
708
|
+
export interface Address {
|
|
709
|
+
/** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
|
|
710
|
+
country?: string | null;
|
|
711
|
+
/** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
|
|
712
|
+
subdivision?: string | null;
|
|
713
|
+
/** City name. */
|
|
714
|
+
city?: string | null;
|
|
715
|
+
/** Postal or zip code. */
|
|
716
|
+
postalCode?: string | null;
|
|
717
|
+
/** Street address. */
|
|
718
|
+
streetAddress?: StreetAddress;
|
|
719
|
+
/** Main address line (usually street name and number). */
|
|
720
|
+
addressLine?: string | null;
|
|
721
|
+
/** Free text providing more detailed address info. Usually contains apt, suite, floor. */
|
|
722
|
+
addressLine2?: string | null;
|
|
723
|
+
/**
|
|
724
|
+
* Country's full name.
|
|
725
|
+
* @readonly
|
|
726
|
+
*/
|
|
727
|
+
countryFullname?: string | null;
|
|
728
|
+
/**
|
|
729
|
+
* Subdivision full-name.
|
|
730
|
+
* @readonly
|
|
731
|
+
*/
|
|
732
|
+
subdivisionFullname?: string | null;
|
|
733
|
+
}
|
|
734
|
+
export interface StreetAddress {
|
|
735
|
+
/** Street number. */
|
|
736
|
+
number?: string;
|
|
737
|
+
/** Street name. */
|
|
738
|
+
name?: string;
|
|
739
|
+
}
|
|
740
|
+
export interface AddressLocation {
|
|
741
|
+
/** Address latitude. */
|
|
742
|
+
latitude?: number | null;
|
|
743
|
+
/** Address longitude. */
|
|
744
|
+
longitude?: number | null;
|
|
745
|
+
}
|
|
746
|
+
/** Full contact details for an address */
|
|
747
|
+
export interface FullAddressContactDetails {
|
|
748
|
+
/** First name. */
|
|
749
|
+
firstName?: string | null;
|
|
750
|
+
/** Last name. */
|
|
751
|
+
lastName?: string | null;
|
|
752
|
+
/** Phone number. */
|
|
753
|
+
phone?: string | null;
|
|
754
|
+
/** Company name. */
|
|
755
|
+
company?: string | null;
|
|
756
|
+
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
757
|
+
vatId?: VatId;
|
|
758
|
+
}
|
|
759
|
+
export interface VatId {
|
|
760
|
+
/** Customer's tax ID. */
|
|
761
|
+
id?: string;
|
|
762
|
+
/**
|
|
763
|
+
* Tax type.
|
|
764
|
+
*
|
|
765
|
+
* Supported values:
|
|
766
|
+
* + `CPF`: for individual tax payers
|
|
767
|
+
* + `CNPJ`: for corporations
|
|
768
|
+
*/
|
|
769
|
+
type?: VatType;
|
|
770
|
+
}
|
|
771
|
+
/** tax info types */
|
|
772
|
+
export declare enum VatType {
|
|
773
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
774
|
+
/** CPF - for individual tax payers. */
|
|
775
|
+
CPF = "CPF",
|
|
776
|
+
/** CNPJ - for corporations */
|
|
777
|
+
CNPJ = "CNPJ"
|
|
778
|
+
}
|
|
779
|
+
export interface SelectedShippingOption {
|
|
780
|
+
/** Carrier ID. */
|
|
781
|
+
carrierId?: string | null;
|
|
782
|
+
/** Selected shipping option code. For example, "usps_std_overnight". */
|
|
783
|
+
code?: string;
|
|
784
|
+
}
|
|
785
|
+
export interface GetCurrentCartRequest {
|
|
786
|
+
}
|
|
787
|
+
export interface GetCurrentCartResponse {
|
|
788
|
+
/** Current session's active cart. */
|
|
789
|
+
cart?: Cart;
|
|
790
|
+
}
|
|
791
|
+
export interface UpdateCartRequest {
|
|
792
|
+
/** Cart info. */
|
|
793
|
+
cartInfo?: Cart;
|
|
794
|
+
/** Coupon code. For more information, see [Coupons API](https://dev.wix.com/api/rest/wix-coupons/coupons/introduction). */
|
|
795
|
+
couponCode?: string | null;
|
|
796
|
+
/** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */
|
|
797
|
+
merchantDiscounts?: MerchantDiscountInput[];
|
|
798
|
+
/** Catalog line items. */
|
|
799
|
+
lineItems?: LineItem[];
|
|
800
|
+
/**
|
|
801
|
+
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
802
|
+
*
|
|
803
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
804
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
805
|
+
*/
|
|
806
|
+
customLineItems?: CustomLineItem[];
|
|
807
|
+
}
|
|
808
|
+
export interface MerchantDiscountInput {
|
|
809
|
+
/** Discount amount. */
|
|
810
|
+
amount?: string;
|
|
811
|
+
/** IDs of line items the discount applies to. */
|
|
812
|
+
lineItemIds?: string[];
|
|
813
|
+
}
|
|
814
|
+
export interface CustomLineItem {
|
|
815
|
+
/**
|
|
816
|
+
* Custom line item quantity.
|
|
817
|
+
*
|
|
818
|
+
* Min: `1`
|
|
819
|
+
* Max: `100000`
|
|
820
|
+
*/
|
|
821
|
+
quantity?: number;
|
|
822
|
+
/**
|
|
823
|
+
* Custom line item price.
|
|
824
|
+
*
|
|
825
|
+
* Must be a number or a decimal without symbols.
|
|
826
|
+
*/
|
|
827
|
+
price?: string;
|
|
828
|
+
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
829
|
+
priceDescription?: PriceDescription;
|
|
830
|
+
/** Custom line item description lines. Used for display purposes for the cart, checkout and order. */
|
|
831
|
+
descriptionLines?: DescriptionLine[];
|
|
832
|
+
/** Custom line item's media. */
|
|
833
|
+
media?: Image;
|
|
834
|
+
/**
|
|
835
|
+
* Custom line item ID. If passed, `id` must be unique.
|
|
836
|
+
*
|
|
837
|
+
* Default: auto-generated ID
|
|
838
|
+
*/
|
|
839
|
+
id?: string | null;
|
|
840
|
+
/** Tax group ID for this custom line item. */
|
|
841
|
+
taxGroupId?: string | null;
|
|
842
|
+
/** Name of the item or product. */
|
|
843
|
+
productName?: ProductName;
|
|
844
|
+
/** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
|
|
845
|
+
url?: PageUrlV2;
|
|
846
|
+
/** Item type. Either a preset type or custom. */
|
|
847
|
+
itemType?: ItemType;
|
|
848
|
+
/** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
|
|
849
|
+
fullPrice?: string | null;
|
|
850
|
+
/**
|
|
851
|
+
* Item quantity available for purchase. Only return this if inventory is managed.
|
|
852
|
+
* Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
|
|
853
|
+
*/
|
|
854
|
+
quantityAvailable?: number | null;
|
|
855
|
+
/** Physical properties of the item. */
|
|
856
|
+
physicalProperties?: PhysicalProperties;
|
|
857
|
+
/**
|
|
858
|
+
* Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
|
|
859
|
+
*
|
|
860
|
+
* + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
|
|
861
|
+
* + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
|
|
862
|
+
* + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
863
|
+
* + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.
|
|
864
|
+
*/
|
|
865
|
+
paymentOption?: PaymentOptionType;
|
|
866
|
+
/**
|
|
867
|
+
* Service properties. When relevant, this contains information such as date and number of participants.
|
|
868
|
+
* Used, among other things, when checking for valid memberships.
|
|
869
|
+
*/
|
|
870
|
+
serviceProperties?: ServiceProperties;
|
|
871
|
+
/**
|
|
872
|
+
* In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
|
|
873
|
+
*
|
|
874
|
+
* + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
|
|
875
|
+
* + In most cases, this field is the same as `catalogReference.catalogItemId`.
|
|
876
|
+
* + Used in membership validation.
|
|
877
|
+
*/
|
|
878
|
+
rootCatalogItemId?: string | null;
|
|
879
|
+
/**
|
|
880
|
+
* Partial payment for the given item to be paid upfront during the checkout.
|
|
881
|
+
*
|
|
882
|
+
* Eligible for catalog items with type `DEPOSIT_ONLINE`.
|
|
883
|
+
* When omitted, the item's price will not be split and is expected to be paid in a single installment.
|
|
884
|
+
*/
|
|
885
|
+
depositAmount?: string | null;
|
|
886
|
+
/** 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. */
|
|
887
|
+
catalogReference?: CatalogReference;
|
|
888
|
+
/**
|
|
889
|
+
* Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
|
|
890
|
+
* @readonly
|
|
891
|
+
*/
|
|
892
|
+
consentRequiredPaymentPolicy?: string | null;
|
|
893
|
+
/**
|
|
894
|
+
* Whether to save the payment method on the order.
|
|
895
|
+
*
|
|
896
|
+
* Default: `false`
|
|
897
|
+
* @readonly
|
|
898
|
+
*/
|
|
899
|
+
savePaymentMethod?: boolean;
|
|
900
|
+
}
|
|
901
|
+
export interface UpdateCartResponse {
|
|
902
|
+
/** Updated Cart. */
|
|
903
|
+
cart?: Cart;
|
|
904
|
+
}
|
|
905
|
+
export interface AddToCurrentCartRequest {
|
|
906
|
+
/** Catalog line items. */
|
|
907
|
+
lineItems?: LineItem[];
|
|
908
|
+
/**
|
|
909
|
+
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
910
|
+
*
|
|
911
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
912
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
913
|
+
*/
|
|
914
|
+
customLineItems?: CustomLineItem[];
|
|
915
|
+
}
|
|
916
|
+
export interface AddToCartResponse {
|
|
917
|
+
/** Updated cart. */
|
|
918
|
+
cart?: Cart;
|
|
919
|
+
}
|
|
920
|
+
export interface AddToCurrentCartAndEstimateTotalsRequest {
|
|
921
|
+
/** Catalog line items. */
|
|
922
|
+
lineItems?: LineItem[];
|
|
923
|
+
/**
|
|
924
|
+
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
925
|
+
*
|
|
926
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
927
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
928
|
+
*/
|
|
929
|
+
customLineItems?: CustomLineItem[];
|
|
930
|
+
/** Selected shipping option. */
|
|
931
|
+
selectedShippingOption?: SelectedShippingOption;
|
|
932
|
+
/** Shipping address. Used for calculating tax and shipping (when applicable). */
|
|
933
|
+
shippingAddress?: Address;
|
|
934
|
+
/** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
|
|
935
|
+
billingAddress?: Address;
|
|
936
|
+
/** The selected membership payment options and which line items they apply to. */
|
|
937
|
+
selectedMemberships?: SelectedMemberships;
|
|
938
|
+
/**
|
|
939
|
+
* Whether to calculate tax in the calculation request.
|
|
940
|
+
*
|
|
941
|
+
* Default: `true`
|
|
942
|
+
*/
|
|
943
|
+
calculateTax?: boolean | null;
|
|
944
|
+
/**
|
|
945
|
+
* Whether to calculate shipping in the calculation request.
|
|
946
|
+
*
|
|
947
|
+
* Default: `true`
|
|
948
|
+
*/
|
|
949
|
+
calculateShipping?: boolean | null;
|
|
950
|
+
}
|
|
951
|
+
export interface SelectedMemberships {
|
|
952
|
+
/** Selected memberships. */
|
|
953
|
+
memberships?: HostSelectedMembership[];
|
|
954
|
+
}
|
|
955
|
+
export interface HostSelectedMembership {
|
|
956
|
+
/** Membership ID. */
|
|
957
|
+
id?: string;
|
|
958
|
+
/** ID of the app providing this payment option. */
|
|
959
|
+
appId?: string;
|
|
960
|
+
/** IDs of the line items this membership applies to. */
|
|
961
|
+
lineItemIds?: string[];
|
|
962
|
+
}
|
|
963
|
+
export interface EstimateTotalsResponse {
|
|
964
|
+
/** Cart. */
|
|
965
|
+
cart?: Cart;
|
|
966
|
+
/** Calculated line items. */
|
|
967
|
+
calculatedLineItems?: CalculatedLineItem[];
|
|
968
|
+
/** Price summary. */
|
|
969
|
+
priceSummary?: PriceSummary;
|
|
970
|
+
/** Applied gift card. */
|
|
971
|
+
giftCard?: GiftCard;
|
|
972
|
+
/** Tax summary. */
|
|
973
|
+
taxSummary?: TaxSummary;
|
|
974
|
+
/** Shipping information. */
|
|
975
|
+
shippingInfo?: ShippingInformation;
|
|
976
|
+
/** Applied discounts. */
|
|
977
|
+
appliedDiscounts?: AppliedDiscount[];
|
|
978
|
+
/** Calculation errors. */
|
|
979
|
+
calculationErrors?: CalculationErrors;
|
|
980
|
+
/** Weight measurement unit - defaults to site's weight unit. */
|
|
981
|
+
weightUnit?: WeightUnit;
|
|
982
|
+
/** Currency used for pricing in this store. */
|
|
983
|
+
currency?: string;
|
|
984
|
+
/**
|
|
985
|
+
* Minimal amount to pay in order to place the order.
|
|
986
|
+
* @readonly
|
|
987
|
+
*/
|
|
988
|
+
payNow?: PriceSummary;
|
|
989
|
+
/**
|
|
990
|
+
* Remaining amount for the order to be fully paid.
|
|
991
|
+
* @readonly
|
|
992
|
+
*/
|
|
993
|
+
payLater?: PriceSummary;
|
|
994
|
+
/** Information about valid and invalid memberships, and which ones are selected for usage. */
|
|
995
|
+
membershipOptions?: MembershipOptions;
|
|
996
|
+
/** Additional fees */
|
|
997
|
+
additionalFees?: AdditionalFee[];
|
|
998
|
+
/**
|
|
999
|
+
* List of validation violations raised by the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
|
|
1000
|
+
* @readonly
|
|
1001
|
+
*/
|
|
1002
|
+
violations?: Violation[];
|
|
1003
|
+
}
|
|
1004
|
+
export interface CalculatedLineItem {
|
|
1005
|
+
/** Line item ID. */
|
|
1006
|
+
lineItemId?: string;
|
|
1007
|
+
/** Price breakdown for this line item. */
|
|
1008
|
+
pricesBreakdown?: LineItemPricesData;
|
|
1009
|
+
/**
|
|
1010
|
+
* Type of selected payment option for current item. Supported values:
|
|
1011
|
+
* + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout
|
|
1012
|
+
* + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout
|
|
1013
|
+
* + `"MEMBERSHIP"` - This item cannot be paid via monetary payment options, only via non monetary option such membership. When this option is used, price must be set to 0
|
|
1014
|
+
* + `"DEPOSIT_ONLINE"` - Partial payment of the given item will happen as part of the checkout. Amount to be paid is defined by deposit_amount field.
|
|
1015
|
+
*/
|
|
1016
|
+
paymentOption?: PaymentOptionType;
|
|
1017
|
+
}
|
|
1018
|
+
export interface LineItemPricesData {
|
|
1019
|
+
/** Total price after discounts and after tax. */
|
|
1020
|
+
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
1021
|
+
/** Total price after discounts, and before tax. */
|
|
1022
|
+
totalPriceBeforeTax?: MultiCurrencyPrice;
|
|
1023
|
+
/** Tax details. */
|
|
1024
|
+
taxDetails?: ItemTaxFullDetails;
|
|
1025
|
+
/** Total discount for all line items. */
|
|
1026
|
+
totalDiscount?: MultiCurrencyPrice;
|
|
1027
|
+
/** Catalog price after catalog discount and automatic discounts. */
|
|
1028
|
+
price?: MultiCurrencyPrice;
|
|
1029
|
+
/** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */
|
|
1030
|
+
priceBeforeDiscounts?: MultiCurrencyPrice;
|
|
1031
|
+
/** Total price **after** catalog-defined discount and line item discounts. */
|
|
1032
|
+
lineItemPrice?: MultiCurrencyPrice;
|
|
1033
|
+
/** Item price **before** line item discounts and **before** catalog-defined discount. Defaults to `price` when not provided. */
|
|
1034
|
+
fullPrice?: MultiCurrencyPrice;
|
|
1035
|
+
}
|
|
1036
|
+
export interface ItemTaxFullDetails {
|
|
1037
|
+
/** Amount for which tax is calculated. */
|
|
1038
|
+
taxableAmount?: MultiCurrencyPrice;
|
|
1039
|
+
/** Tax rate %, as a decimal point between 0 and 1. */
|
|
1040
|
+
taxRate?: string;
|
|
1041
|
+
/** Calculated tax, based on `taxable_amount` and `tax_rate`. */
|
|
1042
|
+
totalTax?: MultiCurrencyPrice;
|
|
1043
|
+
/**
|
|
1044
|
+
* If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
|
|
1045
|
+
* @readonly
|
|
1046
|
+
* @deprecated
|
|
1047
|
+
*/
|
|
1048
|
+
rateBreakdown?: TaxRateBreakdown[];
|
|
1049
|
+
}
|
|
1050
|
+
export interface TaxRateBreakdown {
|
|
1051
|
+
/** Name of tax against which the calculation was performed. */
|
|
1052
|
+
name?: string;
|
|
1053
|
+
/** Rate at which this tax detail was calculated. */
|
|
1054
|
+
rate?: string;
|
|
1055
|
+
/** Amount of tax for this tax detail. */
|
|
1056
|
+
tax?: MultiCurrencyPrice;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* TaxBreakdown represents tax information for a line item.
|
|
1060
|
+
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
1061
|
+
*/
|
|
1062
|
+
export interface TaxBreakdown {
|
|
1063
|
+
/** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */
|
|
1064
|
+
jurisdiction?: string | null;
|
|
1065
|
+
/** The amount of this line item price that was considered nontaxable. (Decimal value) */
|
|
1066
|
+
nonTaxableAmount?: MultiCurrencyPrice;
|
|
1067
|
+
/** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */
|
|
1068
|
+
rate?: string | null;
|
|
1069
|
+
/** The amount of tax estimated for this line item. (Decimal value) */
|
|
1070
|
+
taxAmount?: MultiCurrencyPrice;
|
|
1071
|
+
/** The taxable amount of this line item. */
|
|
1072
|
+
taxableAmount?: MultiCurrencyPrice;
|
|
1073
|
+
/** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */
|
|
1074
|
+
taxType?: string | null;
|
|
1075
|
+
/**
|
|
1076
|
+
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
1077
|
+
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
1078
|
+
*/
|
|
1079
|
+
taxName?: string | null;
|
|
1080
|
+
/** The type of the jurisdiction in which this tax detail applies. */
|
|
1081
|
+
jurisdictionType?: JurisdictionType;
|
|
1082
|
+
}
|
|
1083
|
+
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
1084
|
+
export declare enum JurisdictionType {
|
|
1085
|
+
UNDEFINED = "UNDEFINED",
|
|
1086
|
+
COUNTRY = "COUNTRY",
|
|
1087
|
+
STATE = "STATE",
|
|
1088
|
+
COUNTY = "COUNTY",
|
|
1089
|
+
CITY = "CITY",
|
|
1090
|
+
SPECIAL = "SPECIAL"
|
|
1091
|
+
}
|
|
1092
|
+
export interface PriceSummary {
|
|
1093
|
+
/** Subtotal of all line items, before discounts and before tax. */
|
|
1094
|
+
subtotal?: MultiCurrencyPrice;
|
|
1095
|
+
/** Total shipping price, before discounts and before tax. */
|
|
1096
|
+
shipping?: MultiCurrencyPrice;
|
|
1097
|
+
/** Total tax. */
|
|
1098
|
+
tax?: MultiCurrencyPrice;
|
|
1099
|
+
/** Total calculated discount value. */
|
|
1100
|
+
discount?: MultiCurrencyPrice;
|
|
1101
|
+
/** Total price after discounts, gift cards, and tax. */
|
|
1102
|
+
total?: MultiCurrencyPrice;
|
|
1103
|
+
/** Total additional fees price before tax. */
|
|
1104
|
+
additionalFees?: MultiCurrencyPrice;
|
|
1105
|
+
}
|
|
1106
|
+
export interface GiftCard {
|
|
1107
|
+
/**
|
|
1108
|
+
* Gift Card ID.
|
|
1109
|
+
* @deprecated
|
|
1110
|
+
*/
|
|
1111
|
+
id?: string;
|
|
1112
|
+
/** Gift card obfuscated code. */
|
|
1113
|
+
obfuscatedCode?: string;
|
|
1114
|
+
/** Gift card value. */
|
|
1115
|
+
amount?: MultiCurrencyPrice;
|
|
1116
|
+
/** App ID of the gift card provider. */
|
|
1117
|
+
appId?: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* External ID in the gift card provider's system.
|
|
1120
|
+
* Used for integration and tracking across different platforms.
|
|
1121
|
+
*/
|
|
1122
|
+
externalId?: string | null;
|
|
1123
|
+
}
|
|
1124
|
+
export interface TaxSummary {
|
|
1125
|
+
/**
|
|
1126
|
+
* Amount for which tax is calculated, added from line items.
|
|
1127
|
+
* @readonly
|
|
1128
|
+
*/
|
|
1129
|
+
taxableAmount?: MultiCurrencyPrice;
|
|
1130
|
+
/**
|
|
1131
|
+
* Calculated tax, added from line items.
|
|
1132
|
+
* @readonly
|
|
1133
|
+
*/
|
|
1134
|
+
totalTax?: MultiCurrencyPrice;
|
|
1135
|
+
/**
|
|
1136
|
+
* Tax calculator that was active when the order was created.
|
|
1137
|
+
* @deprecated
|
|
1138
|
+
*/
|
|
1139
|
+
calculationDetails?: TaxCalculationDetails;
|
|
1140
|
+
}
|
|
1141
|
+
export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1142
|
+
/** Reason the manual calculation was used. */
|
|
1143
|
+
manualRateReason?: ManualCalculationReason;
|
|
1144
|
+
/** Details of the fallback rate calculation. */
|
|
1145
|
+
autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
|
|
1146
|
+
/** Rate calculation type. */
|
|
1147
|
+
rateType?: RateType;
|
|
1148
|
+
}
|
|
1149
|
+
/** @oneof */
|
|
1150
|
+
export interface TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1151
|
+
/** Reason the manual calculation was used. */
|
|
1152
|
+
manualRateReason?: ManualCalculationReason;
|
|
1153
|
+
/** Details of the fallback rate calculation. */
|
|
1154
|
+
autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
|
|
1155
|
+
}
|
|
1156
|
+
export declare enum RateType {
|
|
1157
|
+
/** no tax being collected for this request due to location of purchase */
|
|
1158
|
+
NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
|
|
1159
|
+
/** manual rate used for calculation */
|
|
1160
|
+
MANUAL_RATE = "MANUAL_RATE",
|
|
1161
|
+
/** autotax rate used for calculation */
|
|
1162
|
+
AUTO_RATE = "AUTO_RATE",
|
|
1163
|
+
/** fallback rate used for calculation */
|
|
1164
|
+
FALLBACK_RATE = "FALLBACK_RATE"
|
|
1165
|
+
}
|
|
1166
|
+
export declare enum ManualCalculationReason {
|
|
1167
|
+
/** user set calculator in Business Manager to be Manual */
|
|
1168
|
+
GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
|
|
1169
|
+
/** specific region is on manual even though Global setting is Auto-tax */
|
|
1170
|
+
REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
|
|
1171
|
+
}
|
|
1172
|
+
export interface AutoTaxFallbackCalculationDetails {
|
|
1173
|
+
/** reason for fallback */
|
|
1174
|
+
fallbackReason?: FallbackReason;
|
|
1175
|
+
/** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
|
|
1176
|
+
error?: ApplicationError;
|
|
1177
|
+
}
|
|
1178
|
+
export declare enum FallbackReason {
|
|
1179
|
+
/** auto-tax failed to be calculated */
|
|
1180
|
+
AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
|
|
1181
|
+
/** auto-tax was temporarily deactivated on a system-level */
|
|
1182
|
+
AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
|
|
1183
|
+
}
|
|
1184
|
+
export interface ApplicationError {
|
|
1185
|
+
/** Error code. */
|
|
1186
|
+
code?: string;
|
|
1187
|
+
/** Description of the error. */
|
|
1188
|
+
description?: string;
|
|
1189
|
+
/** Data related to the error. */
|
|
1190
|
+
data?: Record<string, any> | null;
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* 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.
|
|
1194
|
+
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
1195
|
+
*/
|
|
1196
|
+
export interface AggregatedTaxBreakdown {
|
|
1197
|
+
/** The name of the tax against which this tax amount was calculated. */
|
|
1198
|
+
taxName?: string;
|
|
1199
|
+
/** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */
|
|
1200
|
+
taxType?: string;
|
|
1201
|
+
/** The name of the jurisdiction in which this tax detail applies. */
|
|
1202
|
+
jurisdiction?: string;
|
|
1203
|
+
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
1204
|
+
jurisdictionTypeEnum?: JurisdictionType;
|
|
1205
|
+
/** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */
|
|
1206
|
+
rate?: string;
|
|
1207
|
+
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
1208
|
+
aggregatedTaxAmount?: MultiCurrencyPrice;
|
|
1209
|
+
}
|
|
1210
|
+
export interface ShippingInformation {
|
|
1211
|
+
/** Shipping region. */
|
|
1212
|
+
region?: ShippingRegion;
|
|
1213
|
+
/** Selected shipping option. */
|
|
1214
|
+
selectedCarrierServiceOption?: SelectedCarrierServiceOption;
|
|
1215
|
+
/** All shipping options. */
|
|
1216
|
+
carrierServiceOptions?: CarrierServiceOption[];
|
|
1217
|
+
}
|
|
1218
|
+
export interface ShippingRegion {
|
|
1219
|
+
/**
|
|
1220
|
+
* Shipping region ID.
|
|
1221
|
+
* @readonly
|
|
1222
|
+
*/
|
|
1223
|
+
id?: string;
|
|
1224
|
+
/** Shipping region name. */
|
|
1225
|
+
name?: string;
|
|
1226
|
+
}
|
|
1227
|
+
export interface SelectedCarrierServiceOption {
|
|
1228
|
+
/** Unique identifier of selected option. For example, "usps_std_overnight". */
|
|
1229
|
+
code?: string;
|
|
1230
|
+
/**
|
|
1231
|
+
* Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
|
|
1232
|
+
* For example, "Standard" or "First-Class Package International".
|
|
1233
|
+
* @readonly
|
|
1234
|
+
*/
|
|
1235
|
+
title?: string;
|
|
1236
|
+
/**
|
|
1237
|
+
* Delivery logistics.
|
|
1238
|
+
* @readonly
|
|
1239
|
+
*/
|
|
1240
|
+
logistics?: DeliveryLogistics;
|
|
1241
|
+
/**
|
|
1242
|
+
* Shipping costs.
|
|
1243
|
+
* @readonly
|
|
1244
|
+
*/
|
|
1245
|
+
cost?: SelectedCarrierServiceOptionPrices;
|
|
1246
|
+
/**
|
|
1247
|
+
* Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
|
|
1248
|
+
* @readonly
|
|
1249
|
+
*/
|
|
1250
|
+
requestedShippingOption?: boolean;
|
|
1251
|
+
/** Other charges */
|
|
1252
|
+
otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
|
|
1253
|
+
/** This carrier's unique ID */
|
|
1254
|
+
carrierId?: string | null;
|
|
1255
|
+
/** Delivery solution allocations to different delivery carriers and delivery regions */
|
|
1256
|
+
deliveryAllocations?: DeliveryAllocation[];
|
|
1257
|
+
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1258
|
+
partial?: boolean | null;
|
|
1259
|
+
}
|
|
1260
|
+
export interface DeliveryLogistics {
|
|
1261
|
+
/** Expected delivery time, in free text. For example, "3-5 business days". */
|
|
1262
|
+
deliveryTime?: string | null;
|
|
1263
|
+
/** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */
|
|
1264
|
+
instructions?: string | null;
|
|
1265
|
+
/** Pickup details. */
|
|
1266
|
+
pickupDetails?: PickupDetails;
|
|
1267
|
+
}
|
|
1268
|
+
export interface PickupDetails {
|
|
1269
|
+
/** Pickup address. */
|
|
1270
|
+
address?: Address;
|
|
1271
|
+
/**
|
|
1272
|
+
* Whether the pickup address is that of a business - this may effect tax calculation.
|
|
1273
|
+
* @deprecated
|
|
1274
|
+
*/
|
|
1275
|
+
businessLocation?: boolean;
|
|
1276
|
+
/** Pickup method */
|
|
1277
|
+
pickupMethod?: PickupMethod;
|
|
1278
|
+
}
|
|
1279
|
+
export declare enum PickupMethod {
|
|
1280
|
+
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1281
|
+
STORE_PICKUP = "STORE_PICKUP",
|
|
1282
|
+
PICKUP_POINT = "PICKUP_POINT"
|
|
1283
|
+
}
|
|
1284
|
+
export interface DeliveryTimeSlot {
|
|
1285
|
+
/** starting time of the delivery time slot */
|
|
1286
|
+
from?: Date | null;
|
|
1287
|
+
/** ending time of the delivery time slot */
|
|
1288
|
+
to?: Date | null;
|
|
1289
|
+
}
|
|
1290
|
+
export interface SelectedCarrierServiceOptionPrices {
|
|
1291
|
+
/** Total shipping price, after discount and after tax. */
|
|
1292
|
+
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
1293
|
+
/** Total price of shipping after discounts (when relevant), and before tax. */
|
|
1294
|
+
totalPriceBeforeTax?: MultiCurrencyPrice;
|
|
1295
|
+
/** Tax details. */
|
|
1296
|
+
taxDetails?: ItemTaxFullDetails;
|
|
1297
|
+
/** Shipping discount before tax. */
|
|
1298
|
+
totalDiscount?: MultiCurrencyPrice;
|
|
1299
|
+
/** Shipping price before discount and before tax. */
|
|
1300
|
+
price?: MultiCurrencyPrice;
|
|
1301
|
+
}
|
|
1302
|
+
export interface SelectedCarrierServiceOptionOtherCharge {
|
|
1303
|
+
/** Type of additional cost. */
|
|
1304
|
+
type?: ChargeType;
|
|
1305
|
+
/** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */
|
|
1306
|
+
details?: string | null;
|
|
1307
|
+
/** Price of added charge. */
|
|
1308
|
+
cost?: SelectedCarrierServiceOptionPrices;
|
|
1309
|
+
}
|
|
1310
|
+
export declare enum ChargeType {
|
|
1311
|
+
HANDLING_FEE = "HANDLING_FEE",
|
|
1312
|
+
INSURANCE = "INSURANCE"
|
|
1313
|
+
}
|
|
1314
|
+
export interface DeliveryAllocation {
|
|
1315
|
+
/** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
|
|
1316
|
+
deliveryCarrier?: Carrier;
|
|
1317
|
+
/** The delivery region that are relevant for this delivery solution. */
|
|
1318
|
+
deliveryRegion?: Region;
|
|
1319
|
+
/** Populated if the delivery solution is a partially supplied by this carrier. */
|
|
1320
|
+
applicableLineItems?: ApplicableLineItems;
|
|
1321
|
+
}
|
|
1322
|
+
export interface Carrier {
|
|
1323
|
+
/** The carrier app id */
|
|
1324
|
+
appId?: string | null;
|
|
1325
|
+
/** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */
|
|
1326
|
+
code?: string;
|
|
1327
|
+
}
|
|
1328
|
+
export interface Region {
|
|
1329
|
+
/** The delivery region id. */
|
|
1330
|
+
id?: string | null;
|
|
1331
|
+
/** The delivery region name. */
|
|
1332
|
+
name?: string | null;
|
|
1333
|
+
}
|
|
1334
|
+
export interface ApplicableLineItems {
|
|
1335
|
+
/** Line items that the delivery solution is for. */
|
|
1336
|
+
lineItemIds?: string[];
|
|
1337
|
+
}
|
|
1338
|
+
export interface CarrierServiceOption {
|
|
1339
|
+
/** Carrier ID. */
|
|
1340
|
+
carrierId?: string;
|
|
1341
|
+
/** Shipping options offered by this carrier for this request. */
|
|
1342
|
+
shippingOptions?: ShippingOption[];
|
|
1343
|
+
}
|
|
1344
|
+
export interface ShippingOption {
|
|
1345
|
+
/**
|
|
1346
|
+
* Unique code of provided shipping option like "usps_std_overnight".
|
|
1347
|
+
* For legacy calculators this would be the UUID of the option.
|
|
1348
|
+
*/
|
|
1349
|
+
code?: string;
|
|
1350
|
+
/**
|
|
1351
|
+
* Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
|
|
1352
|
+
* For example, "Standard" or "First-Class Package International".
|
|
1353
|
+
*/
|
|
1354
|
+
title?: string;
|
|
1355
|
+
/** Delivery logistics. */
|
|
1356
|
+
logistics?: DeliveryLogistics;
|
|
1357
|
+
/** Sipping price information. */
|
|
1358
|
+
cost?: ShippingPrice;
|
|
1359
|
+
/** Delivery solution allocations to different delivery carriers and delivery regions */
|
|
1360
|
+
deliveryAllocations?: DeliveryAllocation[];
|
|
1361
|
+
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1362
|
+
partial?: boolean | null;
|
|
1363
|
+
}
|
|
1364
|
+
export interface ShippingPrice {
|
|
1365
|
+
/** Shipping price. */
|
|
1366
|
+
price?: MultiCurrencyPrice;
|
|
1367
|
+
/** Other costs such as insurance, handling & packaging for fragile items, etc. */
|
|
1368
|
+
otherCharges?: OtherCharge[];
|
|
1369
|
+
}
|
|
1370
|
+
export interface OtherCharge {
|
|
1371
|
+
/** Type of additional cost. */
|
|
1372
|
+
type?: ChargeType;
|
|
1373
|
+
/** Price of added cost. */
|
|
1374
|
+
price?: MultiCurrencyPrice;
|
|
1375
|
+
}
|
|
1376
|
+
export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
1377
|
+
/** Coupon details. */
|
|
1378
|
+
coupon?: V1Coupon;
|
|
1379
|
+
/** Merchant discount. */
|
|
1380
|
+
merchantDiscount?: V1MerchantDiscount;
|
|
1381
|
+
/** Discount rule */
|
|
1382
|
+
discountRule?: V1DiscountRule;
|
|
1383
|
+
/** Discount type. */
|
|
1384
|
+
discountType?: AppliedDiscountDiscountType;
|
|
1385
|
+
/**
|
|
1386
|
+
* IDs of line items the discount applies to.
|
|
1387
|
+
* @deprecated IDs of line items the discount applies to.
|
|
1388
|
+
* @replacedBy line_items_discounts
|
|
1389
|
+
* @targetRemovalDate 2024-06-01
|
|
1390
|
+
*/
|
|
1391
|
+
lineItemIds?: string[];
|
|
1392
|
+
}
|
|
1393
|
+
/** @oneof */
|
|
1394
|
+
export interface AppliedDiscountDiscountSourceOneOf {
|
|
1395
|
+
/** Coupon details. */
|
|
1396
|
+
coupon?: V1Coupon;
|
|
1397
|
+
/** Merchant discount. */
|
|
1398
|
+
merchantDiscount?: V1MerchantDiscount;
|
|
1399
|
+
/** Discount rule */
|
|
1400
|
+
discountRule?: V1DiscountRule;
|
|
1401
|
+
}
|
|
1402
|
+
export declare enum AppliedDiscountDiscountType {
|
|
1403
|
+
GLOBAL = "GLOBAL",
|
|
1404
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
1405
|
+
SHIPPING = "SHIPPING"
|
|
1406
|
+
}
|
|
1407
|
+
/** Coupon */
|
|
1408
|
+
export interface V1Coupon {
|
|
1409
|
+
/** Coupon ID. */
|
|
1410
|
+
id?: string;
|
|
1411
|
+
/** Coupon code. */
|
|
1412
|
+
code?: string;
|
|
1413
|
+
/** Coupon value. */
|
|
1414
|
+
amount?: MultiCurrencyPrice;
|
|
1415
|
+
/** Coupon name. */
|
|
1416
|
+
name?: string;
|
|
1417
|
+
}
|
|
1418
|
+
export interface V1MerchantDiscount {
|
|
1419
|
+
/** Discount value. */
|
|
1420
|
+
amount?: MultiCurrencyPrice;
|
|
1421
|
+
/** Discount Percentage. Will be calculated from items price before other discounts. */
|
|
1422
|
+
percentage?: number | null;
|
|
1423
|
+
}
|
|
1424
|
+
export interface V1DiscountRule {
|
|
1425
|
+
/** Discount rule ID */
|
|
1426
|
+
id?: string;
|
|
1427
|
+
/** Discount rule name */
|
|
1428
|
+
name?: V1DiscountRuleName;
|
|
1429
|
+
/** Discount value. */
|
|
1430
|
+
amount?: MultiCurrencyPrice;
|
|
1431
|
+
}
|
|
1432
|
+
export interface V1DiscountRuleName {
|
|
1433
|
+
/** Original discount rule name (in site's default language). */
|
|
1434
|
+
original?: string;
|
|
1435
|
+
/** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
|
|
1436
|
+
translated?: string | null;
|
|
1437
|
+
}
|
|
1438
|
+
export interface LineItemDiscount {
|
|
1439
|
+
/** ID of line item the discount applies to. */
|
|
1440
|
+
id?: string;
|
|
1441
|
+
/** Discount value. */
|
|
1442
|
+
totalDiscountAmount?: MultiCurrencyPrice;
|
|
1443
|
+
}
|
|
1444
|
+
export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1445
|
+
/** General shipping calculation error. */
|
|
1446
|
+
generalShippingCalculationError?: Details;
|
|
1447
|
+
/** Carrier errors. */
|
|
1448
|
+
carrierErrors?: CarrierErrors;
|
|
1449
|
+
/** Tax calculation error. */
|
|
1450
|
+
taxCalculationError?: Details;
|
|
1451
|
+
/** Coupon calculation error. */
|
|
1452
|
+
couponCalculationError?: Details;
|
|
1453
|
+
/** Gift card calculation error. */
|
|
1454
|
+
giftCardCalculationError?: Details;
|
|
1455
|
+
/** Order validation errors. */
|
|
1456
|
+
orderValidationErrors?: ApplicationError[];
|
|
1457
|
+
/**
|
|
1458
|
+
* Membership payment methods calculation errors
|
|
1459
|
+
* For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
|
|
1460
|
+
*/
|
|
1461
|
+
membershipError?: Details;
|
|
1462
|
+
/** Discount Rule calculation error. */
|
|
1463
|
+
discountsCalculationError?: Details;
|
|
1464
|
+
}
|
|
1465
|
+
/** @oneof */
|
|
1466
|
+
export interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1467
|
+
/** General shipping calculation error. */
|
|
1468
|
+
generalShippingCalculationError?: Details;
|
|
1469
|
+
/** Carrier errors. */
|
|
1470
|
+
carrierErrors?: CarrierErrors;
|
|
1471
|
+
}
|
|
1472
|
+
export interface Details extends DetailsKindOneOf {
|
|
1473
|
+
applicationError?: ApplicationError;
|
|
1474
|
+
validationError?: ValidationError;
|
|
1475
|
+
systemError?: SystemError;
|
|
1476
|
+
/**
|
|
1477
|
+
* deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
|
|
1478
|
+
* @deprecated
|
|
1479
|
+
*/
|
|
1480
|
+
tracing?: Record<string, string>;
|
|
1481
|
+
}
|
|
1482
|
+
/** @oneof */
|
|
1483
|
+
export interface DetailsKindOneOf {
|
|
1484
|
+
applicationError?: ApplicationError;
|
|
1485
|
+
validationError?: ValidationError;
|
|
1486
|
+
systemError?: SystemError;
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* example result:
|
|
1490
|
+
* {
|
|
1491
|
+
* "fieldViolations": [
|
|
1492
|
+
* {
|
|
1493
|
+
* "field": "fieldA",
|
|
1494
|
+
* "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
|
|
1495
|
+
* "violatedRule": "OTHER",
|
|
1496
|
+
* "ruleName": "INVALID_NOTE",
|
|
1497
|
+
* "data": {
|
|
1498
|
+
* "value": "FI"
|
|
1499
|
+
* }
|
|
1500
|
+
* },
|
|
1501
|
+
* {
|
|
1502
|
+
* "field": "fieldB",
|
|
1503
|
+
* "description": "field value out of range. supported range: [0-20]",
|
|
1504
|
+
* "violatedRule": "MAX",
|
|
1505
|
+
* "data": {
|
|
1506
|
+
* "threshold": 20
|
|
1507
|
+
* }
|
|
1508
|
+
* },
|
|
1509
|
+
* {
|
|
1510
|
+
* "field": "fieldC",
|
|
1511
|
+
* "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
|
|
1512
|
+
* "violatedRule": "FORMAT",
|
|
1513
|
+
* "data": {
|
|
1514
|
+
* "type": "PHONE"
|
|
1515
|
+
* }
|
|
1516
|
+
* }
|
|
1517
|
+
* ]
|
|
1518
|
+
* }
|
|
1519
|
+
*/
|
|
1520
|
+
export interface ValidationError {
|
|
1521
|
+
fieldViolations?: FieldViolation[];
|
|
1522
|
+
}
|
|
1523
|
+
export declare enum RuleType {
|
|
1524
|
+
VALIDATION = "VALIDATION",
|
|
1525
|
+
OTHER = "OTHER",
|
|
1526
|
+
MAX = "MAX",
|
|
1527
|
+
MIN = "MIN",
|
|
1528
|
+
MAX_LENGTH = "MAX_LENGTH",
|
|
1529
|
+
MIN_LENGTH = "MIN_LENGTH",
|
|
1530
|
+
MAX_SIZE = "MAX_SIZE",
|
|
1531
|
+
MIN_SIZE = "MIN_SIZE",
|
|
1532
|
+
FORMAT = "FORMAT",
|
|
1533
|
+
DECIMAL_LTE = "DECIMAL_LTE",
|
|
1534
|
+
DECIMAL_GTE = "DECIMAL_GTE",
|
|
1535
|
+
DECIMAL_LT = "DECIMAL_LT",
|
|
1536
|
+
DECIMAL_GT = "DECIMAL_GT",
|
|
1537
|
+
DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
|
|
1538
|
+
INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
|
|
1539
|
+
REQUIRED_FIELD = "REQUIRED_FIELD",
|
|
1540
|
+
FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
|
|
1541
|
+
ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
|
|
1542
|
+
EXACT_LENGTH = "EXACT_LENGTH",
|
|
1543
|
+
EXACT_SIZE = "EXACT_SIZE",
|
|
1544
|
+
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
1545
|
+
}
|
|
1546
|
+
export interface FieldViolation {
|
|
1547
|
+
field?: string;
|
|
1548
|
+
description?: string;
|
|
1549
|
+
violatedRule?: RuleType;
|
|
1550
|
+
/** applicable when violated_rule=OTHER */
|
|
1551
|
+
ruleName?: string | null;
|
|
1552
|
+
data?: Record<string, any> | null;
|
|
1553
|
+
}
|
|
1554
|
+
export interface SystemError {
|
|
1555
|
+
/** Error code. */
|
|
1556
|
+
errorCode?: string | null;
|
|
1557
|
+
}
|
|
1558
|
+
export interface CarrierErrors {
|
|
1559
|
+
/** Carrier errors. */
|
|
1560
|
+
errors?: CarrierError[];
|
|
1561
|
+
}
|
|
1562
|
+
export interface CarrierError {
|
|
1563
|
+
/** Carrier ID. */
|
|
1564
|
+
carrierId?: string;
|
|
1565
|
+
/** Error details. */
|
|
1566
|
+
error?: Details;
|
|
1567
|
+
}
|
|
1568
|
+
export interface MembershipOptions {
|
|
1569
|
+
/** List of payment options that can be used. */
|
|
1570
|
+
eligibleMemberships?: Membership[];
|
|
1571
|
+
/** List of payment options that are owned by the member, but cannot be used due to reason provided. */
|
|
1572
|
+
invalidMemberships?: InvalidMembership[];
|
|
1573
|
+
/** The selected membership payment options and which line items they apply to. */
|
|
1574
|
+
selectedMemberships?: HostSelectedMembership[];
|
|
1575
|
+
}
|
|
1576
|
+
export interface Membership {
|
|
1577
|
+
/** Membership ID. */
|
|
1578
|
+
id?: string;
|
|
1579
|
+
/** ID of the application providing this payment option. */
|
|
1580
|
+
appId?: string;
|
|
1581
|
+
/** The name of this membership. */
|
|
1582
|
+
name?: MembershipName;
|
|
1583
|
+
/** Line item IDs which are "paid" for by this membership. */
|
|
1584
|
+
lineItemIds?: string[];
|
|
1585
|
+
/** Optional - For a membership that has limited credits, information about credit usage. */
|
|
1586
|
+
credits?: MembershipPaymentCredits;
|
|
1587
|
+
/** Optional - TMembership expiry date. */
|
|
1588
|
+
expirationDate?: Date | null;
|
|
1589
|
+
/** Additional data about this membership. */
|
|
1590
|
+
additionalData?: Record<string, any> | null;
|
|
1591
|
+
}
|
|
1592
|
+
export interface MembershipName {
|
|
1593
|
+
/** Membership name. */
|
|
1594
|
+
original?: string;
|
|
1595
|
+
/** Translated membership name. Defaults to `original` when not provided. */
|
|
1596
|
+
translated?: string | null;
|
|
1597
|
+
}
|
|
1598
|
+
export interface MembershipPaymentCredits {
|
|
1599
|
+
/** Membership's total amount of credits. */
|
|
1600
|
+
total?: number;
|
|
1601
|
+
/** Membership's remaining amount of credits. */
|
|
1602
|
+
remaining?: number;
|
|
1603
|
+
}
|
|
1604
|
+
export interface InvalidMembership {
|
|
1605
|
+
/** Membership details. */
|
|
1606
|
+
membership?: Membership;
|
|
1607
|
+
/** Reason why this membership is invalid and cannot be used. */
|
|
1608
|
+
reason?: string;
|
|
1609
|
+
}
|
|
1610
|
+
export interface AdditionalFee {
|
|
1611
|
+
/** Additional fee's unique code (or ID) for future processing. */
|
|
1612
|
+
code?: string | null;
|
|
1613
|
+
/** Translated additional fee's name. */
|
|
1614
|
+
name?: string;
|
|
1615
|
+
/** Additional fee's price. */
|
|
1616
|
+
price?: MultiCurrencyPrice;
|
|
1617
|
+
/** Tax details. */
|
|
1618
|
+
taxDetails?: ItemTaxFullDetails;
|
|
1619
|
+
/** Provider's app id. */
|
|
1620
|
+
providerAppId?: string | null;
|
|
1621
|
+
/** Additional fee's price before tax. */
|
|
1622
|
+
priceBeforeTax?: MultiCurrencyPrice;
|
|
1623
|
+
/** Additional fee's price after tax. */
|
|
1624
|
+
priceAfterTax?: MultiCurrencyPrice;
|
|
1625
|
+
/**
|
|
1626
|
+
* Optional - Line items associated with this additional fee.
|
|
1627
|
+
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
1628
|
+
*/
|
|
1629
|
+
lineItemIds?: string[];
|
|
1630
|
+
/** the source the additional fee was added from */
|
|
1631
|
+
source?: AdditionalFeeSource;
|
|
1632
|
+
}
|
|
1633
|
+
export declare enum AdditionalFeeSource {
|
|
1634
|
+
UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
|
|
1635
|
+
/** The additional fee was added by an additional fee service plugin */
|
|
1636
|
+
SERVICE_PLUGIN = "SERVICE_PLUGIN",
|
|
1637
|
+
/** The additional fee was added on the item either via the catalog or on custom line item */
|
|
1638
|
+
ITEM = "ITEM",
|
|
1639
|
+
/** The additional fee was added manually on the request */
|
|
1640
|
+
MANUAL = "MANUAL"
|
|
1641
|
+
}
|
|
1642
|
+
export interface Violation {
|
|
1643
|
+
/** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */
|
|
1644
|
+
severity?: Severity;
|
|
1645
|
+
/** Target location on a checkout or cart page where the violation will be displayed. */
|
|
1646
|
+
target?: Target;
|
|
1647
|
+
/** Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href="https://www.wix.com">Click me</a>`. */
|
|
1648
|
+
description?: string | null;
|
|
1649
|
+
}
|
|
1650
|
+
export declare enum Severity {
|
|
1651
|
+
/** The user is allowed to move forward in the flow. */
|
|
1652
|
+
WARNING = "WARNING",
|
|
1653
|
+
/**
|
|
1654
|
+
* The user is blocked from moving forward in the flow.
|
|
1655
|
+
* For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
|
|
1656
|
+
*/
|
|
1657
|
+
ERROR = "ERROR"
|
|
1658
|
+
}
|
|
1659
|
+
export interface Target extends TargetTargetTypeOneOf {
|
|
1660
|
+
/** General (other) violation. */
|
|
1661
|
+
other?: Other;
|
|
1662
|
+
/** Specific line item violation. */
|
|
1663
|
+
lineItem?: TargetLineItem;
|
|
1664
|
+
}
|
|
1665
|
+
/** @oneof */
|
|
1666
|
+
export interface TargetTargetTypeOneOf {
|
|
1667
|
+
/** General (other) violation. */
|
|
1668
|
+
other?: Other;
|
|
1669
|
+
/** Specific line item violation. */
|
|
1670
|
+
lineItem?: TargetLineItem;
|
|
1671
|
+
}
|
|
1672
|
+
/** Available locations on the webpage */
|
|
1673
|
+
export declare enum NameInOther {
|
|
1674
|
+
/** Default location, in case no specific location is specified. */
|
|
1675
|
+
OTHER_DEFAULT = "OTHER_DEFAULT"
|
|
1676
|
+
}
|
|
1677
|
+
/** Available locations on the line item */
|
|
1678
|
+
export declare enum NameInLineItem {
|
|
1679
|
+
/** Default location, in case no specific location is specified. */
|
|
1680
|
+
LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
|
|
1681
|
+
}
|
|
1682
|
+
export declare enum SuggestedFix {
|
|
1683
|
+
/** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
|
|
1684
|
+
UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
|
|
1685
|
+
/** The line item should be removed from the cart or checkout to resolve the violation. */
|
|
1686
|
+
REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
|
|
1687
|
+
}
|
|
1688
|
+
/** General (other) violation. */
|
|
1689
|
+
export interface Other {
|
|
1690
|
+
/** Location on a checkout or a cart page where a general (other) violation will be displayed. */
|
|
1691
|
+
name?: NameInOther;
|
|
1692
|
+
}
|
|
1693
|
+
/** Specific line item violation. */
|
|
1694
|
+
export interface TargetLineItem {
|
|
1695
|
+
/** Location on a checkout or a cart page where the specific line item violation will be displayed. */
|
|
1696
|
+
name?: NameInLineItem;
|
|
1697
|
+
/** ID of the line item containing the violation. */
|
|
1698
|
+
id?: string | null;
|
|
1699
|
+
}
|
|
1700
|
+
export interface RemoveLineItemsFromCurrentCartRequest {
|
|
1701
|
+
/** Line item IDs to remove from cart. */
|
|
1702
|
+
lineItemIds?: string[];
|
|
1703
|
+
}
|
|
1704
|
+
export interface RemoveLineItemsResponse {
|
|
1705
|
+
/** Updated cart. */
|
|
1706
|
+
cart?: Cart;
|
|
1707
|
+
}
|
|
1708
|
+
export interface CreateCheckoutFromCurrentCartRequest {
|
|
1709
|
+
/** __Required.__ Sales channel type. */
|
|
1710
|
+
channelType?: ChannelType;
|
|
1711
|
+
/** Shipping address. Used for calculating tax and shipping (when applicable). */
|
|
1712
|
+
shippingAddress?: Address;
|
|
1713
|
+
/** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
|
|
1714
|
+
billingAddress?: Address;
|
|
1715
|
+
/** Selected shipping option. */
|
|
1716
|
+
selectedShippingOption?: SelectedShippingOption;
|
|
1717
|
+
/** Mandatory when setting billing or shipping address and user is not logged in. */
|
|
1718
|
+
email?: string | null;
|
|
1719
|
+
}
|
|
1720
|
+
export declare enum ChannelType {
|
|
1721
|
+
/** Unspecified sales channel. This value is not supported. */
|
|
1722
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1723
|
+
/** A web client. */
|
|
1724
|
+
WEB = "WEB",
|
|
1725
|
+
/** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
|
|
1726
|
+
POS = "POS",
|
|
1727
|
+
/** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
|
|
1728
|
+
EBAY = "EBAY",
|
|
1729
|
+
/** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
|
|
1730
|
+
AMAZON = "AMAZON",
|
|
1731
|
+
/** Other sales platform. */
|
|
1732
|
+
OTHER_PLATFORM = "OTHER_PLATFORM",
|
|
1733
|
+
/** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
|
|
1734
|
+
WIX_APP_STORE = "WIX_APP_STORE",
|
|
1735
|
+
/** 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) */
|
|
1736
|
+
WIX_INVOICES = "WIX_INVOICES",
|
|
1737
|
+
/** Wix merchant backoffice. */
|
|
1738
|
+
BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
|
|
1739
|
+
/** Wish sales channel. */
|
|
1740
|
+
WISH = "WISH",
|
|
1741
|
+
/** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
|
|
1742
|
+
CLASS_PASS = "CLASS_PASS",
|
|
1743
|
+
/** Global-E sales channel. */
|
|
1744
|
+
GLOBAL_E = "GLOBAL_E",
|
|
1745
|
+
/** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
|
|
1746
|
+
FACEBOOK = "FACEBOOK",
|
|
1747
|
+
/** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
|
|
1748
|
+
ETSY = "ETSY",
|
|
1749
|
+
/** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
|
|
1750
|
+
TIKTOK = "TIKTOK",
|
|
1751
|
+
/** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
|
|
1752
|
+
FAIRE_COM = "FAIRE_COM"
|
|
1753
|
+
}
|
|
1754
|
+
export interface CreateCheckoutResponse {
|
|
1755
|
+
/** The newly created checkout's ID. */
|
|
1756
|
+
checkoutId?: string;
|
|
1757
|
+
}
|
|
1758
|
+
export interface RemoveCouponFromCurrentCartRequest {
|
|
1759
|
+
}
|
|
1760
|
+
export interface RemoveCouponResponse {
|
|
1761
|
+
/** Updated cart. */
|
|
1762
|
+
cart?: Cart;
|
|
1763
|
+
}
|
|
1764
|
+
export interface UpdateCurrentCartLineItemQuantityRequest {
|
|
1765
|
+
/** Line item IDs and their new quantity. */
|
|
1766
|
+
lineItems?: LineItemQuantityUpdate[];
|
|
1767
|
+
}
|
|
1768
|
+
export interface LineItemQuantityUpdate {
|
|
1769
|
+
/** Line item ID. Required. */
|
|
1770
|
+
id?: string;
|
|
1771
|
+
/** New quantity. Number must be 1 or higher. Required. */
|
|
1772
|
+
quantity?: number;
|
|
1773
|
+
}
|
|
1774
|
+
export interface UpdateLineItemsQuantityResponse {
|
|
1775
|
+
/** Updated cart. */
|
|
1776
|
+
cart?: Cart;
|
|
1777
|
+
}
|
|
1778
|
+
export interface EstimateCurrentCartTotalsRequest {
|
|
1779
|
+
/** Selected shipping option. */
|
|
1780
|
+
selectedShippingOption?: SelectedShippingOption;
|
|
1781
|
+
/** Shipping address. Used for calculating tax and shipping (when applicable). */
|
|
1782
|
+
shippingAddress?: Address;
|
|
1783
|
+
/** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
|
|
1784
|
+
billingAddress?: Address;
|
|
1785
|
+
/** The selected membership payment options and which line items they apply to. */
|
|
1786
|
+
selectedMemberships?: SelectedMemberships;
|
|
1787
|
+
/**
|
|
1788
|
+
* Whether to calculate tax in the calculation request.
|
|
1789
|
+
*
|
|
1790
|
+
* Default: `true`
|
|
1791
|
+
*/
|
|
1792
|
+
calculateTax?: boolean | null;
|
|
1793
|
+
/**
|
|
1794
|
+
* Whether to calculate shipping in the calculation request.
|
|
1795
|
+
*
|
|
1796
|
+
* Default: `true`
|
|
1797
|
+
*/
|
|
1798
|
+
calculateShipping?: boolean | null;
|
|
1799
|
+
}
|
|
1800
|
+
export interface DeleteCurrentCartRequest {
|
|
1801
|
+
}
|
|
1802
|
+
export interface DeleteCartResponse {
|
|
1803
|
+
}
|
|
1804
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
1805
|
+
createdEvent?: EntityCreatedEvent;
|
|
1806
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1807
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1808
|
+
actionEvent?: ActionEvent;
|
|
1809
|
+
/**
|
|
1810
|
+
* Unique event ID.
|
|
1811
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1812
|
+
*/
|
|
1813
|
+
id?: string;
|
|
1814
|
+
/**
|
|
1815
|
+
* Assumes actions are also always typed to an entity_type
|
|
1816
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1817
|
+
*/
|
|
1818
|
+
entityFqdn?: string;
|
|
1819
|
+
/**
|
|
1820
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1821
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1822
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1823
|
+
*/
|
|
1824
|
+
slug?: string;
|
|
1825
|
+
/** ID of the entity associated with the event. */
|
|
1826
|
+
entityId?: string;
|
|
1827
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1828
|
+
eventTime?: Date | null;
|
|
1829
|
+
/**
|
|
1830
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1831
|
+
* (for example, GDPR).
|
|
1832
|
+
*/
|
|
1833
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1834
|
+
/** If present, indicates the action that triggered the event. */
|
|
1835
|
+
originatedFrom?: string | null;
|
|
1836
|
+
/**
|
|
1837
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1838
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1839
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1840
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1841
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1842
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1843
|
+
*/
|
|
1844
|
+
entityEventSequence?: string | null;
|
|
1845
|
+
}
|
|
1846
|
+
/** @oneof */
|
|
1847
|
+
export interface DomainEventBodyOneOf {
|
|
1848
|
+
createdEvent?: EntityCreatedEvent;
|
|
1849
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1850
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1851
|
+
actionEvent?: ActionEvent;
|
|
1852
|
+
}
|
|
1853
|
+
export interface EntityCreatedEvent {
|
|
1854
|
+
entityAsJson?: string;
|
|
1855
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
1856
|
+
restoreInfo?: RestoreInfo;
|
|
1857
|
+
}
|
|
1858
|
+
export interface RestoreInfo {
|
|
1859
|
+
deletedDate?: Date | null;
|
|
1860
|
+
}
|
|
1861
|
+
export interface EntityUpdatedEvent {
|
|
1862
|
+
/**
|
|
1863
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1864
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1865
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1866
|
+
*/
|
|
1867
|
+
currentEntityAsJson?: string;
|
|
1868
|
+
}
|
|
1869
|
+
export interface EntityDeletedEvent {
|
|
1870
|
+
/** Entity that was deleted */
|
|
1871
|
+
deletedEntityAsJson?: string | null;
|
|
1872
|
+
}
|
|
1873
|
+
export interface ActionEvent {
|
|
1874
|
+
bodyAsJson?: string;
|
|
1875
|
+
}
|
|
1876
|
+
export interface MessageEnvelope {
|
|
1877
|
+
/** App instance ID. */
|
|
1878
|
+
instanceId?: string | null;
|
|
1879
|
+
/** Event type. */
|
|
1880
|
+
eventType?: string;
|
|
1881
|
+
/** The identification type and identity data. */
|
|
1882
|
+
identity?: IdentificationData;
|
|
1883
|
+
/** Stringify payload. */
|
|
1884
|
+
data?: string;
|
|
1885
|
+
}
|
|
1886
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1887
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1888
|
+
anonymousVisitorId?: string;
|
|
1889
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1890
|
+
memberId?: string;
|
|
1891
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1892
|
+
wixUserId?: string;
|
|
1893
|
+
/** ID of an app. */
|
|
1894
|
+
appId?: string;
|
|
1895
|
+
/** @readonly */
|
|
1896
|
+
identityType?: WebhookIdentityType;
|
|
1897
|
+
}
|
|
1898
|
+
/** @oneof */
|
|
1899
|
+
export interface IdentificationDataIdOneOf {
|
|
1900
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1901
|
+
anonymousVisitorId?: string;
|
|
1902
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1903
|
+
memberId?: string;
|
|
1904
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1905
|
+
wixUserId?: string;
|
|
1906
|
+
/** ID of an app. */
|
|
1907
|
+
appId?: string;
|
|
1908
|
+
}
|
|
1909
|
+
export declare enum WebhookIdentityType {
|
|
1910
|
+
UNKNOWN = "UNKNOWN",
|
|
1911
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1912
|
+
MEMBER = "MEMBER",
|
|
1913
|
+
WIX_USER = "WIX_USER",
|
|
1914
|
+
APP = "APP"
|
|
1915
|
+
}
|
|
1916
|
+
export interface CreateCartRequest {
|
|
1917
|
+
/** Cart info. */
|
|
1918
|
+
cartInfo?: Cart;
|
|
1919
|
+
/** Code of an existing coupon to apply to cart. For more information, see the [Coupons API](https://dev.wix.com/api/rest/coupons/coupons/introduction). */
|
|
1920
|
+
couponCode?: string | null;
|
|
1921
|
+
/** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */
|
|
1922
|
+
merchantDiscounts?: MerchantDiscountInput[];
|
|
1923
|
+
/** Catalog line items. */
|
|
1924
|
+
lineItems?: LineItem[];
|
|
1925
|
+
/**
|
|
1926
|
+
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
1927
|
+
*
|
|
1928
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
1929
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
1930
|
+
*/
|
|
1931
|
+
customLineItems?: CustomLineItem[];
|
|
1932
|
+
}
|
|
1933
|
+
export interface CreateCartResponse {
|
|
1934
|
+
/** Cart. */
|
|
1935
|
+
cart?: Cart;
|
|
1936
|
+
}
|
|
1937
|
+
export interface GetCartRequest {
|
|
1938
|
+
/** Cart ID. */
|
|
1939
|
+
id: string;
|
|
1940
|
+
}
|
|
1941
|
+
export interface GetCartResponse {
|
|
1942
|
+
/** The requested cart. */
|
|
1943
|
+
cart?: Cart;
|
|
1944
|
+
}
|
|
1945
|
+
export interface GetCartByCheckoutIdRequest {
|
|
1946
|
+
/** Checkout ID. */
|
|
1947
|
+
id: string;
|
|
1948
|
+
}
|
|
1949
|
+
export interface GetCartByCheckoutIdResponse {
|
|
1950
|
+
/** The requested cart. */
|
|
1951
|
+
cart?: Cart;
|
|
1952
|
+
}
|
|
1953
|
+
export interface AddToCartRequest {
|
|
1954
|
+
/** Cart ID. */
|
|
1955
|
+
id: string;
|
|
1956
|
+
/** Catalog line items. */
|
|
1957
|
+
lineItems?: LineItem[];
|
|
1958
|
+
/**
|
|
1959
|
+
* Custom line items. Custom line items don't trigger the Catalog service plugin.
|
|
1960
|
+
*
|
|
1961
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
1962
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
1963
|
+
*/
|
|
1964
|
+
customLineItems?: CustomLineItem[];
|
|
1965
|
+
}
|
|
1966
|
+
export interface RemoveLineItemsRequest {
|
|
1967
|
+
/** Cart ID. */
|
|
1968
|
+
id: string;
|
|
1969
|
+
/** Line item IDs to remove from cart. */
|
|
1970
|
+
lineItemIds: string[];
|
|
1971
|
+
}
|
|
1972
|
+
export interface CreateCheckoutRequest {
|
|
1973
|
+
/** Cart ID. */
|
|
1974
|
+
id: string;
|
|
1975
|
+
/** __Required.__ Sales channel type. */
|
|
1976
|
+
channelType?: ChannelType;
|
|
1977
|
+
/** Shipping address. Used for calculating tax and shipping (when applicable). */
|
|
1978
|
+
shippingAddress?: Address;
|
|
1979
|
+
/** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
|
|
1980
|
+
billingAddress?: Address;
|
|
1981
|
+
/** Selected shipping option. */
|
|
1982
|
+
selectedShippingOption?: SelectedShippingOption;
|
|
1983
|
+
/** Required when setting a billing or shipping address if the site visitor isn't logged in. */
|
|
1984
|
+
email?: string | null;
|
|
1985
|
+
}
|
|
1986
|
+
export interface RemoveCouponRequest {
|
|
1987
|
+
/** Cart ID. */
|
|
1988
|
+
id: string;
|
|
1989
|
+
}
|
|
1990
|
+
export interface UpdateLineItemsQuantityRequest {
|
|
1991
|
+
/** Cart ID. */
|
|
1992
|
+
id: string;
|
|
1993
|
+
/** Line item IDs and their new quantity. */
|
|
1994
|
+
lineItems: LineItemQuantityUpdate[];
|
|
1995
|
+
}
|
|
1996
|
+
export interface EstimateTotalsRequest {
|
|
1997
|
+
/** Cart ID. */
|
|
1998
|
+
id: string;
|
|
1999
|
+
/** Selected shipping option. */
|
|
2000
|
+
selectedShippingOption?: SelectedShippingOption;
|
|
2001
|
+
/** Shipping address. Used for calculating tax and shipping (when applicable). */
|
|
2002
|
+
shippingAddress?: Address;
|
|
2003
|
+
/** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
|
|
2004
|
+
billingAddress?: Address;
|
|
2005
|
+
/** The selected membership payment options and which line items they apply to. */
|
|
2006
|
+
selectedMemberships?: SelectedMemberships;
|
|
2007
|
+
/**
|
|
2008
|
+
* Whether to calculate tax in the calculation request.
|
|
2009
|
+
*
|
|
2010
|
+
* Default: `true`
|
|
2011
|
+
*/
|
|
2012
|
+
calculateTax?: boolean | null;
|
|
2013
|
+
/**
|
|
2014
|
+
* Whether to calculate shipping in the calculation request.
|
|
2015
|
+
*
|
|
2016
|
+
* Default: `true`
|
|
2017
|
+
*/
|
|
2018
|
+
calculateShipping?: boolean | null;
|
|
2019
|
+
}
|
|
2020
|
+
export interface DeleteCartRequest {
|
|
2021
|
+
/** ID of the cart to delete. */
|
|
2022
|
+
id: string;
|
|
2023
|
+
}
|
|
2024
|
+
export interface Empty {
|
|
2025
|
+
}
|
|
2026
|
+
export interface RemoveBusinessLocationRequest {
|
|
2027
|
+
/** Cart ID. */
|
|
2028
|
+
id: string;
|
|
2029
|
+
}
|
|
2030
|
+
export interface RemoveBusinessLocationResponse {
|
|
2031
|
+
/** Updated cart. */
|
|
2032
|
+
cart?: Cart;
|
|
2033
|
+
}
|
|
2034
|
+
interface CatalogReferenceNonNullableFields {
|
|
2035
|
+
catalogItemId: string;
|
|
2036
|
+
appId: string;
|
|
2037
|
+
}
|
|
2038
|
+
interface ProductNameNonNullableFields {
|
|
2039
|
+
original: string;
|
|
2040
|
+
}
|
|
2041
|
+
interface PageUrlV2NonNullableFields {
|
|
2042
|
+
relativePath: string;
|
|
2043
|
+
}
|
|
2044
|
+
interface MultiCurrencyPriceNonNullableFields {
|
|
2045
|
+
amount: string;
|
|
2046
|
+
convertedAmount: string;
|
|
2047
|
+
formattedAmount: string;
|
|
2048
|
+
formattedConvertedAmount: string;
|
|
2049
|
+
}
|
|
2050
|
+
interface PlainTextValueNonNullableFields {
|
|
2051
|
+
original: string;
|
|
2052
|
+
}
|
|
2053
|
+
interface ColorNonNullableFields {
|
|
2054
|
+
original: string;
|
|
2055
|
+
}
|
|
2056
|
+
interface DescriptionLineNameNonNullableFields {
|
|
2057
|
+
original: string;
|
|
2058
|
+
}
|
|
2059
|
+
interface DescriptionLineNonNullableFields {
|
|
2060
|
+
plainText?: PlainTextValueNonNullableFields;
|
|
2061
|
+
colorInfo?: ColorNonNullableFields;
|
|
2062
|
+
plainTextValue?: PlainTextValueNonNullableFields;
|
|
2063
|
+
color: string;
|
|
2064
|
+
name?: DescriptionLineNameNonNullableFields;
|
|
2065
|
+
lineType: DescriptionLineType;
|
|
2066
|
+
}
|
|
2067
|
+
interface FocalPointNonNullableFields {
|
|
2068
|
+
x: number;
|
|
2069
|
+
y: number;
|
|
2070
|
+
}
|
|
2071
|
+
interface CommonImageNonNullableFields {
|
|
2072
|
+
id: string;
|
|
2073
|
+
url: string;
|
|
2074
|
+
height: number;
|
|
2075
|
+
width: number;
|
|
2076
|
+
focalPoint?: FocalPointNonNullableFields;
|
|
2077
|
+
}
|
|
2078
|
+
interface ItemAvailabilityInfoNonNullableFields {
|
|
2079
|
+
status: ItemAvailabilityStatus;
|
|
2080
|
+
}
|
|
2081
|
+
interface PhysicalPropertiesNonNullableFields {
|
|
2082
|
+
shippable: boolean;
|
|
2083
|
+
}
|
|
2084
|
+
interface ItemTypeNonNullableFields {
|
|
2085
|
+
preset: ItemTypeItemType;
|
|
2086
|
+
custom: string;
|
|
2087
|
+
}
|
|
2088
|
+
interface SubscriptionSettingsNonNullableFields {
|
|
2089
|
+
frequency: SubscriptionFrequency;
|
|
2090
|
+
autoRenewal: boolean;
|
|
2091
|
+
}
|
|
2092
|
+
interface TitleNonNullableFields {
|
|
2093
|
+
original: string;
|
|
2094
|
+
}
|
|
2095
|
+
interface DescriptionNonNullableFields {
|
|
2096
|
+
original: string;
|
|
2097
|
+
}
|
|
2098
|
+
interface SubscriptionOptionInfoNonNullableFields {
|
|
2099
|
+
subscriptionSettings?: SubscriptionSettingsNonNullableFields;
|
|
2100
|
+
title?: TitleNonNullableFields;
|
|
2101
|
+
description?: DescriptionNonNullableFields;
|
|
2102
|
+
}
|
|
2103
|
+
interface SecuredMediaNonNullableFields {
|
|
2104
|
+
id: string;
|
|
2105
|
+
fileName: string;
|
|
2106
|
+
fileType: FileType;
|
|
2107
|
+
}
|
|
2108
|
+
interface PriceDescriptionNonNullableFields {
|
|
2109
|
+
original: string;
|
|
2110
|
+
}
|
|
2111
|
+
interface SelectedMembershipNonNullableFields {
|
|
2112
|
+
id: string;
|
|
2113
|
+
appId: string;
|
|
2114
|
+
}
|
|
2115
|
+
interface ImageNonNullableFields {
|
|
2116
|
+
id: string;
|
|
2117
|
+
height: number;
|
|
2118
|
+
width: number;
|
|
2119
|
+
}
|
|
2120
|
+
interface PaymentOptionNonNullableFields {
|
|
2121
|
+
value: PaymentOptionType;
|
|
2122
|
+
}
|
|
2123
|
+
interface CatalogOverrideFieldsNonNullableFields {
|
|
2124
|
+
productName?: ProductNameNonNullableFields;
|
|
2125
|
+
descriptionLines: DescriptionLineNonNullableFields[];
|
|
2126
|
+
physicalProperties?: PhysicalPropertiesNonNullableFields;
|
|
2127
|
+
image?: ImageNonNullableFields;
|
|
2128
|
+
paymentOption?: PaymentOptionNonNullableFields;
|
|
2129
|
+
}
|
|
2130
|
+
interface LineItemNonNullableFields {
|
|
2131
|
+
quantity: number;
|
|
2132
|
+
catalogReference?: CatalogReferenceNonNullableFields;
|
|
2133
|
+
productName?: ProductNameNonNullableFields;
|
|
2134
|
+
url?: PageUrlV2NonNullableFields;
|
|
2135
|
+
price?: MultiCurrencyPriceNonNullableFields;
|
|
2136
|
+
fullPrice?: MultiCurrencyPriceNonNullableFields;
|
|
2137
|
+
priceBeforeDiscounts?: MultiCurrencyPriceNonNullableFields;
|
|
2138
|
+
descriptionLines: DescriptionLineNonNullableFields[];
|
|
2139
|
+
image?: CommonImageNonNullableFields;
|
|
2140
|
+
availability?: ItemAvailabilityInfoNonNullableFields;
|
|
2141
|
+
physicalProperties?: PhysicalPropertiesNonNullableFields;
|
|
2142
|
+
itemType?: ItemTypeNonNullableFields;
|
|
2143
|
+
subscriptionOptionInfo?: SubscriptionOptionInfoNonNullableFields;
|
|
2144
|
+
digitalFile?: SecuredMediaNonNullableFields;
|
|
2145
|
+
paymentOption: PaymentOptionType;
|
|
2146
|
+
priceDescription?: PriceDescriptionNonNullableFields;
|
|
2147
|
+
depositAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2148
|
+
selectedMembership?: SelectedMembershipNonNullableFields;
|
|
2149
|
+
customLineItem: boolean;
|
|
2150
|
+
catalogOverrideFields?: CatalogOverrideFieldsNonNullableFields;
|
|
2151
|
+
savePaymentMethod: boolean;
|
|
2152
|
+
}
|
|
2153
|
+
interface BuyerInfoNonNullableFields {
|
|
2154
|
+
visitorId: string;
|
|
2155
|
+
memberId: string;
|
|
2156
|
+
userId: string;
|
|
2157
|
+
}
|
|
2158
|
+
interface CouponNonNullableFields {
|
|
2159
|
+
id: string;
|
|
2160
|
+
code: string;
|
|
2161
|
+
}
|
|
2162
|
+
interface MerchantDiscountNonNullableFields {
|
|
2163
|
+
amount?: MultiCurrencyPriceNonNullableFields;
|
|
2164
|
+
}
|
|
2165
|
+
interface CartDiscountNonNullableFields {
|
|
2166
|
+
coupon?: CouponNonNullableFields;
|
|
2167
|
+
merchantDiscount?: MerchantDiscountNonNullableFields;
|
|
2168
|
+
}
|
|
2169
|
+
interface StreetAddressNonNullableFields {
|
|
2170
|
+
number: string;
|
|
2171
|
+
name: string;
|
|
2172
|
+
apt: string;
|
|
2173
|
+
}
|
|
2174
|
+
interface AddressNonNullableFields {
|
|
2175
|
+
streetAddress?: StreetAddressNonNullableFields;
|
|
2176
|
+
}
|
|
2177
|
+
interface VatIdNonNullableFields {
|
|
2178
|
+
id: string;
|
|
2179
|
+
type: VatType;
|
|
2180
|
+
}
|
|
2181
|
+
interface FullAddressContactDetailsNonNullableFields {
|
|
2182
|
+
vatId?: VatIdNonNullableFields;
|
|
2183
|
+
}
|
|
2184
|
+
interface AddressWithContactNonNullableFields {
|
|
2185
|
+
address?: AddressNonNullableFields;
|
|
2186
|
+
contactDetails?: FullAddressContactDetailsNonNullableFields;
|
|
2187
|
+
}
|
|
2188
|
+
interface SelectedShippingOptionNonNullableFields {
|
|
2189
|
+
code: string;
|
|
2190
|
+
}
|
|
2191
|
+
interface CartNonNullableFields {
|
|
2192
|
+
lineItems: LineItemNonNullableFields[];
|
|
2193
|
+
buyerInfo?: BuyerInfoNonNullableFields;
|
|
2194
|
+
currency: string;
|
|
2195
|
+
conversionCurrency: string;
|
|
2196
|
+
weightUnit: WeightUnit;
|
|
2197
|
+
subtotal?: MultiCurrencyPriceNonNullableFields;
|
|
2198
|
+
appliedDiscounts: CartDiscountNonNullableFields[];
|
|
2199
|
+
contactInfo?: AddressWithContactNonNullableFields;
|
|
2200
|
+
selectedShippingOption?: SelectedShippingOptionNonNullableFields;
|
|
2201
|
+
}
|
|
2202
|
+
export interface CreateCartResponseNonNullableFields {
|
|
2203
|
+
cart?: CartNonNullableFields;
|
|
2204
|
+
}
|
|
2205
|
+
export interface UpdateCartResponseNonNullableFields {
|
|
2206
|
+
cart?: CartNonNullableFields;
|
|
2207
|
+
}
|
|
2208
|
+
export interface GetCartResponseNonNullableFields {
|
|
2209
|
+
cart?: CartNonNullableFields;
|
|
2210
|
+
}
|
|
2211
|
+
export interface GetCartByCheckoutIdResponseNonNullableFields {
|
|
2212
|
+
cart?: CartNonNullableFields;
|
|
2213
|
+
}
|
|
2214
|
+
export interface AddToCartResponseNonNullableFields {
|
|
2215
|
+
cart?: CartNonNullableFields;
|
|
2216
|
+
}
|
|
2217
|
+
export interface RemoveLineItemsResponseNonNullableFields {
|
|
2218
|
+
cart?: CartNonNullableFields;
|
|
2219
|
+
}
|
|
2220
|
+
export interface CreateCheckoutResponseNonNullableFields {
|
|
2221
|
+
checkoutId: string;
|
|
2222
|
+
}
|
|
2223
|
+
export interface RemoveCouponResponseNonNullableFields {
|
|
2224
|
+
cart?: CartNonNullableFields;
|
|
2225
|
+
}
|
|
2226
|
+
export interface UpdateLineItemsQuantityResponseNonNullableFields {
|
|
2227
|
+
cart?: CartNonNullableFields;
|
|
2228
|
+
}
|
|
2229
|
+
interface TaxRateBreakdownNonNullableFields {
|
|
2230
|
+
name: string;
|
|
2231
|
+
rate: string;
|
|
2232
|
+
tax?: MultiCurrencyPriceNonNullableFields;
|
|
2233
|
+
exemptAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2234
|
+
exemptionIds: number[];
|
|
2235
|
+
taxableAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2236
|
+
}
|
|
2237
|
+
interface TaxBreakdownNonNullableFields {
|
|
2238
|
+
nonTaxableAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2239
|
+
taxAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2240
|
+
taxableAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2241
|
+
jurisdictionType: JurisdictionType;
|
|
2242
|
+
}
|
|
2243
|
+
interface ItemTaxFullDetailsNonNullableFields {
|
|
2244
|
+
taxableAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2245
|
+
taxRate: string;
|
|
2246
|
+
totalTax?: MultiCurrencyPriceNonNullableFields;
|
|
2247
|
+
rateBreakdown: TaxRateBreakdownNonNullableFields[];
|
|
2248
|
+
exemptAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2249
|
+
taxBreakdown: TaxBreakdownNonNullableFields[];
|
|
2250
|
+
}
|
|
2251
|
+
interface LineItemPricesDataNonNullableFields {
|
|
2252
|
+
totalPriceAfterTax?: MultiCurrencyPriceNonNullableFields;
|
|
2253
|
+
totalPriceBeforeTax?: MultiCurrencyPriceNonNullableFields;
|
|
2254
|
+
taxDetails?: ItemTaxFullDetailsNonNullableFields;
|
|
2255
|
+
totalDiscount?: MultiCurrencyPriceNonNullableFields;
|
|
2256
|
+
price?: MultiCurrencyPriceNonNullableFields;
|
|
2257
|
+
priceBeforeDiscounts?: MultiCurrencyPriceNonNullableFields;
|
|
2258
|
+
lineItemPrice?: MultiCurrencyPriceNonNullableFields;
|
|
2259
|
+
fullPrice?: MultiCurrencyPriceNonNullableFields;
|
|
2260
|
+
}
|
|
2261
|
+
interface CalculatedLineItemNonNullableFields {
|
|
2262
|
+
lineItemId: string;
|
|
2263
|
+
pricesBreakdown?: LineItemPricesDataNonNullableFields;
|
|
2264
|
+
paymentOption: PaymentOptionType;
|
|
2265
|
+
}
|
|
2266
|
+
interface PriceSummaryNonNullableFields {
|
|
2267
|
+
subtotal?: MultiCurrencyPriceNonNullableFields;
|
|
2268
|
+
shipping?: MultiCurrencyPriceNonNullableFields;
|
|
2269
|
+
tax?: MultiCurrencyPriceNonNullableFields;
|
|
2270
|
+
discount?: MultiCurrencyPriceNonNullableFields;
|
|
2271
|
+
total?: MultiCurrencyPriceNonNullableFields;
|
|
2272
|
+
additionalFees?: MultiCurrencyPriceNonNullableFields;
|
|
2273
|
+
}
|
|
2274
|
+
interface GiftCardNonNullableFields {
|
|
2275
|
+
id: string;
|
|
2276
|
+
obfuscatedCode: string;
|
|
2277
|
+
amount?: MultiCurrencyPriceNonNullableFields;
|
|
2278
|
+
appId: string;
|
|
2279
|
+
}
|
|
2280
|
+
interface ApplicationErrorNonNullableFields {
|
|
2281
|
+
code: string;
|
|
2282
|
+
description: string;
|
|
2283
|
+
}
|
|
2284
|
+
interface AutoTaxFallbackCalculationDetailsNonNullableFields {
|
|
2285
|
+
fallbackReason: FallbackReason;
|
|
2286
|
+
error?: ApplicationErrorNonNullableFields;
|
|
2287
|
+
}
|
|
2288
|
+
interface TaxCalculationDetailsNonNullableFields {
|
|
2289
|
+
manualRateReason: ManualCalculationReason;
|
|
2290
|
+
autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetailsNonNullableFields;
|
|
2291
|
+
rateType: RateType;
|
|
2292
|
+
}
|
|
2293
|
+
interface AggregatedTaxBreakdownNonNullableFields {
|
|
2294
|
+
taxName: string;
|
|
2295
|
+
taxType: string;
|
|
2296
|
+
jurisdiction: string;
|
|
2297
|
+
jurisdictionTypeEnum: JurisdictionType;
|
|
2298
|
+
rate: string;
|
|
2299
|
+
aggregatedTaxAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2300
|
+
aggregatedTaxableAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2301
|
+
}
|
|
2302
|
+
interface TaxSummaryNonNullableFields {
|
|
2303
|
+
taxableAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2304
|
+
totalTax?: MultiCurrencyPriceNonNullableFields;
|
|
2305
|
+
manualTaxRate: string;
|
|
2306
|
+
calculationDetails?: TaxCalculationDetailsNonNullableFields;
|
|
2307
|
+
totalExempt?: MultiCurrencyPriceNonNullableFields;
|
|
2308
|
+
aggregatedTaxBreakdown: AggregatedTaxBreakdownNonNullableFields[];
|
|
2309
|
+
}
|
|
2310
|
+
interface ShippingRegionNonNullableFields {
|
|
2311
|
+
id: string;
|
|
2312
|
+
name: string;
|
|
2313
|
+
}
|
|
2314
|
+
interface PickupDetailsNonNullableFields {
|
|
2315
|
+
address?: AddressNonNullableFields;
|
|
2316
|
+
businessLocation: boolean;
|
|
2317
|
+
pickupMethod: PickupMethod;
|
|
2318
|
+
}
|
|
2319
|
+
interface DeliveryLogisticsNonNullableFields {
|
|
2320
|
+
pickupDetails?: PickupDetailsNonNullableFields;
|
|
2321
|
+
}
|
|
2322
|
+
interface SelectedCarrierServiceOptionPricesNonNullableFields {
|
|
2323
|
+
totalPriceAfterTax?: MultiCurrencyPriceNonNullableFields;
|
|
2324
|
+
totalPriceBeforeTax?: MultiCurrencyPriceNonNullableFields;
|
|
2325
|
+
taxDetails?: ItemTaxFullDetailsNonNullableFields;
|
|
2326
|
+
totalDiscount?: MultiCurrencyPriceNonNullableFields;
|
|
2327
|
+
price?: MultiCurrencyPriceNonNullableFields;
|
|
2328
|
+
}
|
|
2329
|
+
interface SelectedCarrierServiceOptionOtherChargeNonNullableFields {
|
|
2330
|
+
type: ChargeType;
|
|
2331
|
+
cost?: SelectedCarrierServiceOptionPricesNonNullableFields;
|
|
2332
|
+
}
|
|
2333
|
+
interface CarrierNonNullableFields {
|
|
2334
|
+
code: string;
|
|
2335
|
+
}
|
|
2336
|
+
interface ApplicableLineItemsNonNullableFields {
|
|
2337
|
+
lineItemIds: string[];
|
|
2338
|
+
}
|
|
2339
|
+
interface DeliveryAllocationNonNullableFields {
|
|
2340
|
+
deliveryCarrier?: CarrierNonNullableFields;
|
|
2341
|
+
applicableLineItems?: ApplicableLineItemsNonNullableFields;
|
|
2342
|
+
}
|
|
2343
|
+
interface SelectedCarrierServiceOptionNonNullableFields {
|
|
2344
|
+
code: string;
|
|
2345
|
+
title: string;
|
|
2346
|
+
logistics?: DeliveryLogisticsNonNullableFields;
|
|
2347
|
+
cost?: SelectedCarrierServiceOptionPricesNonNullableFields;
|
|
2348
|
+
requestedShippingOption: boolean;
|
|
2349
|
+
otherCharges: SelectedCarrierServiceOptionOtherChargeNonNullableFields[];
|
|
2350
|
+
deliveryAllocations: DeliveryAllocationNonNullableFields[];
|
|
2351
|
+
}
|
|
2352
|
+
interface OtherChargeNonNullableFields {
|
|
2353
|
+
type: ChargeType;
|
|
2354
|
+
price?: MultiCurrencyPriceNonNullableFields;
|
|
2355
|
+
}
|
|
2356
|
+
interface ShippingPriceNonNullableFields {
|
|
2357
|
+
price?: MultiCurrencyPriceNonNullableFields;
|
|
2358
|
+
otherCharges: OtherChargeNonNullableFields[];
|
|
2359
|
+
}
|
|
2360
|
+
interface ShippingOptionNonNullableFields {
|
|
2361
|
+
code: string;
|
|
2362
|
+
title: string;
|
|
2363
|
+
logistics?: DeliveryLogisticsNonNullableFields;
|
|
2364
|
+
cost?: ShippingPriceNonNullableFields;
|
|
2365
|
+
deliveryAllocations: DeliveryAllocationNonNullableFields[];
|
|
2366
|
+
}
|
|
2367
|
+
interface CarrierServiceOptionNonNullableFields {
|
|
2368
|
+
carrierId: string;
|
|
2369
|
+
shippingOptions: ShippingOptionNonNullableFields[];
|
|
2370
|
+
}
|
|
2371
|
+
interface ShippingInformationNonNullableFields {
|
|
2372
|
+
region?: ShippingRegionNonNullableFields;
|
|
2373
|
+
selectedCarrierServiceOption?: SelectedCarrierServiceOptionNonNullableFields;
|
|
2374
|
+
carrierServiceOptions: CarrierServiceOptionNonNullableFields[];
|
|
2375
|
+
}
|
|
2376
|
+
interface V1CouponNonNullableFields {
|
|
2377
|
+
id: string;
|
|
2378
|
+
code: string;
|
|
2379
|
+
amount?: MultiCurrencyPriceNonNullableFields;
|
|
2380
|
+
name: string;
|
|
2381
|
+
couponType: string;
|
|
2382
|
+
}
|
|
2383
|
+
interface V1MerchantDiscountNonNullableFields {
|
|
2384
|
+
amount?: MultiCurrencyPriceNonNullableFields;
|
|
2385
|
+
}
|
|
2386
|
+
interface V1DiscountRuleNameNonNullableFields {
|
|
2387
|
+
original: string;
|
|
2388
|
+
}
|
|
2389
|
+
interface V1DiscountRuleNonNullableFields {
|
|
2390
|
+
id: string;
|
|
2391
|
+
name?: V1DiscountRuleNameNonNullableFields;
|
|
2392
|
+
amount?: MultiCurrencyPriceNonNullableFields;
|
|
2393
|
+
}
|
|
2394
|
+
interface LineItemDiscountNonNullableFields {
|
|
2395
|
+
id: string;
|
|
2396
|
+
totalDiscountAmount?: MultiCurrencyPriceNonNullableFields;
|
|
2397
|
+
}
|
|
2398
|
+
interface AppliedDiscountNonNullableFields {
|
|
2399
|
+
coupon?: V1CouponNonNullableFields;
|
|
2400
|
+
merchantDiscount?: V1MerchantDiscountNonNullableFields;
|
|
2401
|
+
discountRule?: V1DiscountRuleNonNullableFields;
|
|
2402
|
+
discountType: AppliedDiscountDiscountType;
|
|
2403
|
+
lineItemIds: string[];
|
|
2404
|
+
lineItemDiscounts: LineItemDiscountNonNullableFields[];
|
|
2405
|
+
}
|
|
2406
|
+
interface FieldViolationNonNullableFields {
|
|
2407
|
+
field: string;
|
|
2408
|
+
description: string;
|
|
2409
|
+
violatedRule: RuleType;
|
|
2410
|
+
}
|
|
2411
|
+
interface ValidationErrorNonNullableFields {
|
|
2412
|
+
fieldViolations: FieldViolationNonNullableFields[];
|
|
2413
|
+
}
|
|
2414
|
+
interface DetailsNonNullableFields {
|
|
2415
|
+
applicationError?: ApplicationErrorNonNullableFields;
|
|
2416
|
+
validationError?: ValidationErrorNonNullableFields;
|
|
2417
|
+
}
|
|
2418
|
+
interface CarrierErrorNonNullableFields {
|
|
2419
|
+
carrierId: string;
|
|
2420
|
+
error?: DetailsNonNullableFields;
|
|
2421
|
+
}
|
|
2422
|
+
interface CarrierErrorsNonNullableFields {
|
|
2423
|
+
errors: CarrierErrorNonNullableFields[];
|
|
2424
|
+
}
|
|
2425
|
+
interface CalculationErrorsNonNullableFields {
|
|
2426
|
+
generalShippingCalculationError?: DetailsNonNullableFields;
|
|
2427
|
+
carrierErrors?: CarrierErrorsNonNullableFields;
|
|
2428
|
+
taxCalculationError?: DetailsNonNullableFields;
|
|
2429
|
+
couponCalculationError?: DetailsNonNullableFields;
|
|
2430
|
+
giftCardCalculationError?: DetailsNonNullableFields;
|
|
2431
|
+
orderValidationErrors: ApplicationErrorNonNullableFields[];
|
|
2432
|
+
membershipError?: DetailsNonNullableFields;
|
|
2433
|
+
discountsCalculationError?: DetailsNonNullableFields;
|
|
2434
|
+
}
|
|
2435
|
+
interface MembershipNameNonNullableFields {
|
|
2436
|
+
original: string;
|
|
2437
|
+
}
|
|
2438
|
+
interface MembershipPaymentCreditsNonNullableFields {
|
|
2439
|
+
total: number;
|
|
2440
|
+
remaining: number;
|
|
2441
|
+
}
|
|
2442
|
+
interface MembershipNonNullableFields {
|
|
2443
|
+
id: string;
|
|
2444
|
+
appId: string;
|
|
2445
|
+
name?: MembershipNameNonNullableFields;
|
|
2446
|
+
lineItemIds: string[];
|
|
2447
|
+
credits?: MembershipPaymentCreditsNonNullableFields;
|
|
2448
|
+
}
|
|
2449
|
+
interface InvalidMembershipNonNullableFields {
|
|
2450
|
+
membership?: MembershipNonNullableFields;
|
|
2451
|
+
reason: string;
|
|
2452
|
+
}
|
|
2453
|
+
interface HostSelectedMembershipNonNullableFields {
|
|
2454
|
+
id: string;
|
|
2455
|
+
appId: string;
|
|
2456
|
+
lineItemIds: string[];
|
|
2457
|
+
}
|
|
2458
|
+
interface MembershipOptionsNonNullableFields {
|
|
2459
|
+
eligibleMemberships: MembershipNonNullableFields[];
|
|
2460
|
+
invalidMemberships: InvalidMembershipNonNullableFields[];
|
|
2461
|
+
selectedMemberships: HostSelectedMembershipNonNullableFields[];
|
|
2462
|
+
}
|
|
2463
|
+
interface AdditionalFeeNonNullableFields {
|
|
2464
|
+
name: string;
|
|
2465
|
+
price?: MultiCurrencyPriceNonNullableFields;
|
|
2466
|
+
taxDetails?: ItemTaxFullDetailsNonNullableFields;
|
|
2467
|
+
priceBeforeTax?: MultiCurrencyPriceNonNullableFields;
|
|
2468
|
+
priceAfterTax?: MultiCurrencyPriceNonNullableFields;
|
|
2469
|
+
lineItemIds: string[];
|
|
2470
|
+
source: AdditionalFeeSource;
|
|
2471
|
+
}
|
|
2472
|
+
interface OtherNonNullableFields {
|
|
2473
|
+
name: NameInOther;
|
|
2474
|
+
}
|
|
2475
|
+
interface TargetLineItemNonNullableFields {
|
|
2476
|
+
name: NameInLineItem;
|
|
2477
|
+
}
|
|
2478
|
+
interface TargetNonNullableFields {
|
|
2479
|
+
other?: OtherNonNullableFields;
|
|
2480
|
+
lineItem?: TargetLineItemNonNullableFields;
|
|
2481
|
+
}
|
|
2482
|
+
interface ViolationNonNullableFields {
|
|
2483
|
+
severity: Severity;
|
|
2484
|
+
target?: TargetNonNullableFields;
|
|
2485
|
+
}
|
|
2486
|
+
export interface EstimateTotalsResponseNonNullableFields {
|
|
2487
|
+
cart?: CartNonNullableFields;
|
|
2488
|
+
calculatedLineItems: CalculatedLineItemNonNullableFields[];
|
|
2489
|
+
priceSummary?: PriceSummaryNonNullableFields;
|
|
2490
|
+
giftCard?: GiftCardNonNullableFields;
|
|
2491
|
+
taxSummary?: TaxSummaryNonNullableFields;
|
|
2492
|
+
shippingInfo?: ShippingInformationNonNullableFields;
|
|
2493
|
+
appliedDiscounts: AppliedDiscountNonNullableFields[];
|
|
2494
|
+
calculationErrors?: CalculationErrorsNonNullableFields;
|
|
2495
|
+
weightUnit: WeightUnit;
|
|
2496
|
+
currency: string;
|
|
2497
|
+
payNow?: PriceSummaryNonNullableFields;
|
|
2498
|
+
payLater?: PriceSummaryNonNullableFields;
|
|
2499
|
+
membershipOptions?: MembershipOptionsNonNullableFields;
|
|
2500
|
+
additionalFees: AdditionalFeeNonNullableFields[];
|
|
2501
|
+
violations: ViolationNonNullableFields[];
|
|
2502
|
+
}
|
|
2503
|
+
export interface RemoveBusinessLocationResponseNonNullableFields {
|
|
2504
|
+
cart?: CartNonNullableFields;
|
|
2505
|
+
}
|
|
2506
|
+
export {};
|