@wix/ecom 1.0.597 → 1.0.599
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/context/package.json +2 -1
- package/meta/package.json +2 -1
- package/package.json +30 -24
- package/service-plugins/context/package.json +2 -1
- package/service-plugins/package.json +2 -1
- package/type-bundles/context.bundle.d.ts +20888 -0
- package/type-bundles/index.bundle.d.ts +33271 -0
- package/type-bundles/meta.bundle.d.ts +43612 -0
- package/type-bundles/service-plugins-context.bundle.d.ts +3196 -0
- package/type-bundles/service-plugins.bundle.d.ts +3191 -0
|
@@ -0,0 +1,3196 @@
|
|
|
1
|
+
interface GetShippingRatesRequest {
|
|
2
|
+
/** The line items to be shipped. */
|
|
3
|
+
lineItems?: ProductItem[];
|
|
4
|
+
/** Address to ship to. */
|
|
5
|
+
shippingDestination?: Address$3;
|
|
6
|
+
/** Address item is shipped from. This is the site owner's business address. */
|
|
7
|
+
shippingOrigin?: Address$3;
|
|
8
|
+
/** Buyer's contact details. */
|
|
9
|
+
buyerContactDetails?: FullAddressContactDetails$3;
|
|
10
|
+
/**
|
|
11
|
+
* Weight measurement unit used for all items in the shipment.
|
|
12
|
+
*
|
|
13
|
+
* Supported values:
|
|
14
|
+
* + `"KG"`: kilograms
|
|
15
|
+
* + `"LB"`: pounds
|
|
16
|
+
*/
|
|
17
|
+
weightUnit?: WeightUnit$2;
|
|
18
|
+
/** Whether tax is included in the items' prices. */
|
|
19
|
+
taxIncludedInPrices?: boolean;
|
|
20
|
+
/** list of delivery preferences, for example preferred delivery code (shippingOptionId) */
|
|
21
|
+
deliveryPreferences?: DeliveryPreferences;
|
|
22
|
+
/** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */
|
|
23
|
+
purchaseFlowId?: string | null;
|
|
24
|
+
}
|
|
25
|
+
interface ProductItem {
|
|
26
|
+
/** Item name. */
|
|
27
|
+
name?: string;
|
|
28
|
+
/** The number of items ordered. */
|
|
29
|
+
quantity?: number;
|
|
30
|
+
/** Reference to the item's origin catalog. */
|
|
31
|
+
catalogReference?: CatalogReference$4;
|
|
32
|
+
/** Physical properties of the item. */
|
|
33
|
+
physicalProperties?: PhysicalProperties$3;
|
|
34
|
+
/** Price of a single item after discounts. */
|
|
35
|
+
price?: string;
|
|
36
|
+
/** Total line item price before discounts. */
|
|
37
|
+
totalPriceBeforeDiscount?: string | null;
|
|
38
|
+
/** Price of a single item before discounts. */
|
|
39
|
+
priceBeforeDiscount?: string | null;
|
|
40
|
+
/** Total line item price after discounts. This is equal to `price` multiplied by `quantity`. */
|
|
41
|
+
totalPrice?: string | null;
|
|
42
|
+
/** item delivery destination index in the shipping addresses list */
|
|
43
|
+
deliveryDestinationIndex?: number | null;
|
|
44
|
+
/** where the item is delivered from index in the from addresses list */
|
|
45
|
+
deliveryOriginIndex?: number | null;
|
|
46
|
+
/** whether tax is included in line item price */
|
|
47
|
+
taxIncludedInPrice?: boolean | null;
|
|
48
|
+
}
|
|
49
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
50
|
+
interface CatalogReference$4 {
|
|
51
|
+
/** ID of the item within the catalog it belongs to. */
|
|
52
|
+
catalogItemId?: string;
|
|
53
|
+
/**
|
|
54
|
+
* ID of the app providing the catalog.
|
|
55
|
+
*
|
|
56
|
+
* You can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).
|
|
57
|
+
*
|
|
58
|
+
* For items from Wix catalogs, the following values always apply:
|
|
59
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
60
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
61
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
62
|
+
*/
|
|
63
|
+
appId?: string;
|
|
64
|
+
/**
|
|
65
|
+
* 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.
|
|
66
|
+
*
|
|
67
|
+
* 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).
|
|
68
|
+
*/
|
|
69
|
+
options?: Record<string, any> | null;
|
|
70
|
+
}
|
|
71
|
+
interface PhysicalProperties$3 {
|
|
72
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
73
|
+
weight?: number | null;
|
|
74
|
+
/** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
|
|
75
|
+
sku?: string | null;
|
|
76
|
+
/** Whether this line item is shippable. */
|
|
77
|
+
shippable?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/** Physical address */
|
|
80
|
+
interface Address$3 extends AddressStreetOneOf {
|
|
81
|
+
/** Street name and number. */
|
|
82
|
+
streetAddress?: StreetAddress$3;
|
|
83
|
+
/** Main address line, usually street and number as free text. */
|
|
84
|
+
addressLine1?: string | null;
|
|
85
|
+
/** Country code. */
|
|
86
|
+
country?: string | null;
|
|
87
|
+
/** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */
|
|
88
|
+
subdivision?: string | null;
|
|
89
|
+
/** City name. */
|
|
90
|
+
city?: string | null;
|
|
91
|
+
/** Zip/postal code. */
|
|
92
|
+
postalCode?: string | null;
|
|
93
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
94
|
+
addressLine2?: string | null;
|
|
95
|
+
}
|
|
96
|
+
/** @oneof */
|
|
97
|
+
interface AddressStreetOneOf {
|
|
98
|
+
/** Street name and number. */
|
|
99
|
+
streetAddress?: StreetAddress$3;
|
|
100
|
+
/** Main address line, usually street and number as free text. */
|
|
101
|
+
addressLine?: string | null;
|
|
102
|
+
}
|
|
103
|
+
interface StreetAddress$3 {
|
|
104
|
+
/** Street number. */
|
|
105
|
+
number?: string;
|
|
106
|
+
/** Street name. */
|
|
107
|
+
name?: string;
|
|
108
|
+
}
|
|
109
|
+
interface AddressLocation$3 {
|
|
110
|
+
/** Address latitude. */
|
|
111
|
+
latitude?: number | null;
|
|
112
|
+
/** Address longitude. */
|
|
113
|
+
longitude?: number | null;
|
|
114
|
+
}
|
|
115
|
+
interface Subdivision {
|
|
116
|
+
/** Short subdivision code. */
|
|
117
|
+
code?: string;
|
|
118
|
+
/** Subdivision full name. */
|
|
119
|
+
name?: string;
|
|
120
|
+
}
|
|
121
|
+
declare enum SubdivisionType {
|
|
122
|
+
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
123
|
+
/** State */
|
|
124
|
+
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
125
|
+
/** County */
|
|
126
|
+
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
127
|
+
/** City/town */
|
|
128
|
+
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
129
|
+
/** Neighborhood/quarter */
|
|
130
|
+
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
131
|
+
/** Street/block */
|
|
132
|
+
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
133
|
+
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
134
|
+
COUNTRY = "COUNTRY"
|
|
135
|
+
}
|
|
136
|
+
/** Subdivision Concordance values */
|
|
137
|
+
interface StandardDetails {
|
|
138
|
+
/** subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30 */
|
|
139
|
+
iso31662?: string | null;
|
|
140
|
+
}
|
|
141
|
+
/** Full contact details for an address */
|
|
142
|
+
interface FullAddressContactDetails$3 {
|
|
143
|
+
/** Contact's first name. */
|
|
144
|
+
firstName?: string | null;
|
|
145
|
+
/** Contact's last name. */
|
|
146
|
+
lastName?: string | null;
|
|
147
|
+
/** Contact's phone number. */
|
|
148
|
+
phone?: string | null;
|
|
149
|
+
/** Contact's company name. */
|
|
150
|
+
company?: string | null;
|
|
151
|
+
/** Email associated with the address. */
|
|
152
|
+
email?: string | null;
|
|
153
|
+
/** Tax info. Currently usable only in Brazil. */
|
|
154
|
+
vatId?: VatId$3;
|
|
155
|
+
}
|
|
156
|
+
interface VatId$3 {
|
|
157
|
+
/** Customer's tax ID. */
|
|
158
|
+
_id?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Tax type.
|
|
161
|
+
*
|
|
162
|
+
* Supported values:
|
|
163
|
+
* + `CPF`: for individual tax payers
|
|
164
|
+
* + `CNPJ`: for corporations
|
|
165
|
+
*/
|
|
166
|
+
type?: VatType$3;
|
|
167
|
+
}
|
|
168
|
+
/** tax info types */
|
|
169
|
+
declare enum VatType$3 {
|
|
170
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
171
|
+
/** CPF - for individual tax payers. */
|
|
172
|
+
CPF = "CPF",
|
|
173
|
+
/** CNPJ - for corporations */
|
|
174
|
+
CNPJ = "CNPJ"
|
|
175
|
+
}
|
|
176
|
+
declare enum WeightUnit$2 {
|
|
177
|
+
/** Weight unit can't be classified, due to an error */
|
|
178
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
179
|
+
/** Kilograms */
|
|
180
|
+
KG = "KG",
|
|
181
|
+
/** Pounds */
|
|
182
|
+
LB = "LB"
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* delivery preferences, for example preferred delivery "code" (shippingOptionId).
|
|
186
|
+
* enrich the delivery providers with more data about the delivery
|
|
187
|
+
*/
|
|
188
|
+
interface DeliveryPreferences {
|
|
189
|
+
preferredCode?: string | null;
|
|
190
|
+
}
|
|
191
|
+
interface GetShippingRatesResponse {
|
|
192
|
+
/** Available shipping rates. These define the shipping rate options that are displayed to site visitors on the cart and checkout pages. */
|
|
193
|
+
shippingRates?: ShippingOption[];
|
|
194
|
+
}
|
|
195
|
+
interface ShippingOption {
|
|
196
|
+
/** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */
|
|
197
|
+
code?: string;
|
|
198
|
+
/** Shipping rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. */
|
|
199
|
+
title?: string;
|
|
200
|
+
/** Shipping logistics. */
|
|
201
|
+
logistics?: DeliveryLogistics$2;
|
|
202
|
+
/** Shipping cost. */
|
|
203
|
+
cost?: ShippingPrice$1;
|
|
204
|
+
}
|
|
205
|
+
interface DeliveryLogistics$2 {
|
|
206
|
+
/** When the item is expected to be delivered in free text. For example, `"3-5 business days"`. */
|
|
207
|
+
deliveryTime?: string | null;
|
|
208
|
+
/** Instructions for delivery. For example, for pickup: `"Ensure to come during business hours, and please don't park in the disabled spot"`. */
|
|
209
|
+
instructions?: string | null;
|
|
210
|
+
/** Pickup details. Should be returned only if order is for pickup. */
|
|
211
|
+
pickupDetails?: PickupDetails$2;
|
|
212
|
+
}
|
|
213
|
+
interface PickupDetails$2 {
|
|
214
|
+
/** Pickup address. */
|
|
215
|
+
address?: Address$3;
|
|
216
|
+
/**
|
|
217
|
+
* Pickup method.
|
|
218
|
+
*
|
|
219
|
+
* Supported values:
|
|
220
|
+
* + `"STORE_PICKUP"`: When pickup is from the merchant's brick and mortar store.
|
|
221
|
+
* + `"PICKUP_POINT"`: When item is shipped to a specified pickup point.
|
|
222
|
+
*/
|
|
223
|
+
pickupMethod?: PickupMethod$2;
|
|
224
|
+
}
|
|
225
|
+
declare enum PickupMethod$2 {
|
|
226
|
+
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
227
|
+
STORE_PICKUP = "STORE_PICKUP",
|
|
228
|
+
PICKUP_POINT = "PICKUP_POINT"
|
|
229
|
+
}
|
|
230
|
+
interface DeliveryTimeSlot$1 {
|
|
231
|
+
/** starting time of the delivery time slot */
|
|
232
|
+
from?: Date;
|
|
233
|
+
/** ending time of the delivery time slot */
|
|
234
|
+
to?: Date;
|
|
235
|
+
}
|
|
236
|
+
interface ShippingPrice$1 {
|
|
237
|
+
/** The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
238
|
+
price?: string;
|
|
239
|
+
/** Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field. */
|
|
240
|
+
currency?: string;
|
|
241
|
+
/** Additional costs. For example, a handling fee for packaging fragile items. */
|
|
242
|
+
additionalCharges?: AdditionalCharge[];
|
|
243
|
+
}
|
|
244
|
+
interface AdditionalCharge {
|
|
245
|
+
/** Additional charge type. */
|
|
246
|
+
type?: ChargeType$1;
|
|
247
|
+
/** Details of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`. */
|
|
248
|
+
details?: string | null;
|
|
249
|
+
/** Cost of additional charge. For example, `12.5`. */
|
|
250
|
+
price?: string;
|
|
251
|
+
}
|
|
252
|
+
declare enum ChargeType$1 {
|
|
253
|
+
HANDLING_FEE = "HANDLING_FEE"
|
|
254
|
+
}
|
|
255
|
+
interface PartialOption {
|
|
256
|
+
/** Items that the delivery option is for. If empty, the delivery option is for all items. */
|
|
257
|
+
lineItemIds?: string[];
|
|
258
|
+
}
|
|
259
|
+
interface MissingPostalCodeError {
|
|
260
|
+
error?: ApplicationError;
|
|
261
|
+
}
|
|
262
|
+
interface ApplicationError {
|
|
263
|
+
/** Error code. */
|
|
264
|
+
code?: string;
|
|
265
|
+
/** Description of the error. */
|
|
266
|
+
description?: string;
|
|
267
|
+
/** Data related to the error. */
|
|
268
|
+
data?: Record<string, any> | null;
|
|
269
|
+
}
|
|
270
|
+
interface InvalidPostalCodeError {
|
|
271
|
+
error?: ApplicationError;
|
|
272
|
+
}
|
|
273
|
+
interface InvalidAddressError {
|
|
274
|
+
fields?: FieldViolation[];
|
|
275
|
+
}
|
|
276
|
+
interface FieldViolation {
|
|
277
|
+
field?: string;
|
|
278
|
+
description?: string;
|
|
279
|
+
violatedRule?: RuleType;
|
|
280
|
+
/** applicable when violated_rule=OTHER */
|
|
281
|
+
ruleName?: string | null;
|
|
282
|
+
data?: Record<string, any> | null;
|
|
283
|
+
}
|
|
284
|
+
declare enum RuleType {
|
|
285
|
+
VALIDATION = "VALIDATION",
|
|
286
|
+
OTHER = "OTHER",
|
|
287
|
+
MAX = "MAX",
|
|
288
|
+
MIN = "MIN",
|
|
289
|
+
MAX_LENGTH = "MAX_LENGTH",
|
|
290
|
+
MIN_LENGTH = "MIN_LENGTH",
|
|
291
|
+
MAX_SIZE = "MAX_SIZE",
|
|
292
|
+
MIN_SIZE = "MIN_SIZE",
|
|
293
|
+
FORMAT = "FORMAT",
|
|
294
|
+
DECIMAL_LTE = "DECIMAL_LTE",
|
|
295
|
+
DECIMAL_GTE = "DECIMAL_GTE",
|
|
296
|
+
DECIMAL_LT = "DECIMAL_LT",
|
|
297
|
+
DECIMAL_GT = "DECIMAL_GT",
|
|
298
|
+
DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
|
|
299
|
+
INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
|
|
300
|
+
REQUIRED_FIELD = "REQUIRED_FIELD",
|
|
301
|
+
FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
|
|
302
|
+
ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT"
|
|
303
|
+
}
|
|
304
|
+
interface GenericShippingRatesError {
|
|
305
|
+
errors?: ApplicationError[];
|
|
306
|
+
}
|
|
307
|
+
interface GetDashboardTablesRequest {
|
|
308
|
+
/** Delivery profile id. */
|
|
309
|
+
deliveryProfileId?: string;
|
|
310
|
+
/** Delivery region ids to get settings for. */
|
|
311
|
+
deliveryRegionId?: string[];
|
|
312
|
+
}
|
|
313
|
+
interface GetDashboardTablesResponse {
|
|
314
|
+
/** The list of settings for the given requests. */
|
|
315
|
+
dashboardTableResults?: RegionDashboardTables[];
|
|
316
|
+
}
|
|
317
|
+
interface RegionDashboardTables {
|
|
318
|
+
/** The delivery rule id. */
|
|
319
|
+
deliveryRegionId?: string;
|
|
320
|
+
/** The shipping table values that are associated with the delivery rule. Can be multiple if the provider is an aggregator of multiple carriers. */
|
|
321
|
+
dashboardTables?: DashboardTable[];
|
|
322
|
+
}
|
|
323
|
+
interface DashboardTable {
|
|
324
|
+
/** The title of the delivery settings that will be displayed in the UI. */
|
|
325
|
+
title?: string;
|
|
326
|
+
/** The columns of the delivery settings that will be displayed in the UI. */
|
|
327
|
+
columns?: Column[];
|
|
328
|
+
/** The content of the delivery settings. Each row is a map of column name to value. */
|
|
329
|
+
rows?: Row[];
|
|
330
|
+
}
|
|
331
|
+
interface Column {
|
|
332
|
+
/** The name of the column. This is used to get the data from the row. */
|
|
333
|
+
key?: string;
|
|
334
|
+
/** The title of the column that will be displayed in the UI. */
|
|
335
|
+
name?: string;
|
|
336
|
+
}
|
|
337
|
+
interface Row {
|
|
338
|
+
/** The external key of the data presented in a row. This is used to identify the row in the UI for editing. */
|
|
339
|
+
key?: string;
|
|
340
|
+
/**
|
|
341
|
+
* The data presented in the row. The key is the column `name` and the value is the data in the specific row and column.
|
|
342
|
+
* Data will be in JSON format.
|
|
343
|
+
*/
|
|
344
|
+
data?: Record<string, any> | null;
|
|
345
|
+
}
|
|
346
|
+
interface ShippingRatesConfig {
|
|
347
|
+
/**
|
|
348
|
+
* Base URI where the endpoints are called.
|
|
349
|
+
* Wix eCommerce appends the endpoint path to the base URI.
|
|
350
|
+
* For example, to call the Get Shipping Rates endpoint at `https://my-shipping-provider.com/v1/getRates`,
|
|
351
|
+
* the base URI you provide here is `https://my-shipping-provider.com/`.
|
|
352
|
+
*/
|
|
353
|
+
deploymentUri?: string;
|
|
354
|
+
/** Human-readable name of the shipping provider. */
|
|
355
|
+
name?: string;
|
|
356
|
+
/** Description of the shipping provider. */
|
|
357
|
+
description?: string | null;
|
|
358
|
+
/** URL to more info about the shipping provider. */
|
|
359
|
+
learnMoreUrl?: string | null;
|
|
360
|
+
/** URL to reach the shipping provider app's dashboard. */
|
|
361
|
+
dashboardUrl?: string | null;
|
|
362
|
+
/** Whether to require the site owner to define a fallback/default rate. Set to `true` if you do not provide rates as part of the integration. */
|
|
363
|
+
fallbackDefinitionMandatory?: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* Thumbnail image of the shipping rates provider. Displayed in the shipping settings section in the Dashboard.
|
|
366
|
+
* The URL must be of an image uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager).
|
|
367
|
+
*/
|
|
368
|
+
thumbnailUrl?: string | null;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* this message is not directly used by any service,
|
|
372
|
+
* it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
|
|
373
|
+
* e.g. SPIs, event-handlers, etc..
|
|
374
|
+
* NOTE: this context object MUST be provided as the last argument in each Velo method signature.
|
|
375
|
+
*
|
|
376
|
+
* Example:
|
|
377
|
+
* ```typescript
|
|
378
|
+
* export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
|
|
379
|
+
* ...
|
|
380
|
+
* }
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
interface Context$4 {
|
|
384
|
+
/** A unique identifier for each request. Can be used for logging / troubleshooting */
|
|
385
|
+
requestId?: string | null;
|
|
386
|
+
/** 3 capital letters string representing a currency according to ISO-4217 */
|
|
387
|
+
currency?: string | null;
|
|
388
|
+
/** The identification type and identity data */
|
|
389
|
+
identity?: IdentificationData$4;
|
|
390
|
+
/** A string representing a language and region in the format of "xx-XX". First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2 */
|
|
391
|
+
languages?: string[];
|
|
392
|
+
/** App instance ID of SPI in context */
|
|
393
|
+
instanceId?: string | null;
|
|
394
|
+
}
|
|
395
|
+
declare enum IdentityType$4 {
|
|
396
|
+
UNKNOWN = "UNKNOWN",
|
|
397
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
398
|
+
MEMBER = "MEMBER",
|
|
399
|
+
WIX_USER = "WIX_USER",
|
|
400
|
+
APP = "APP"
|
|
401
|
+
}
|
|
402
|
+
interface IdentificationData$4 extends IdentificationDataIdOneOf$4 {
|
|
403
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
404
|
+
anonymousVisitorId?: string;
|
|
405
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
406
|
+
memberId?: string;
|
|
407
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
408
|
+
wixUserId?: string;
|
|
409
|
+
/** ID of an app. */
|
|
410
|
+
appId?: string;
|
|
411
|
+
/** @readonly */
|
|
412
|
+
identityType?: IdentityType$4;
|
|
413
|
+
}
|
|
414
|
+
/** @oneof */
|
|
415
|
+
interface IdentificationDataIdOneOf$4 {
|
|
416
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
417
|
+
anonymousVisitorId?: string;
|
|
418
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
419
|
+
memberId?: string;
|
|
420
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
421
|
+
wixUserId?: string;
|
|
422
|
+
/** ID of an app. */
|
|
423
|
+
appId?: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
declare class MissingPostalCodeWixError extends Error {
|
|
427
|
+
httpCode: string;
|
|
428
|
+
applicationCode: string;
|
|
429
|
+
errorDescription: string;
|
|
430
|
+
messageSchema: string;
|
|
431
|
+
data: MissingPostalCodeError;
|
|
432
|
+
constructor(data: MissingPostalCodeError);
|
|
433
|
+
}
|
|
434
|
+
declare class InvalidPostalCodeWixError extends Error {
|
|
435
|
+
httpCode: string;
|
|
436
|
+
applicationCode: string;
|
|
437
|
+
errorDescription: string;
|
|
438
|
+
messageSchema: string;
|
|
439
|
+
data: InvalidPostalCodeError;
|
|
440
|
+
constructor(data: InvalidPostalCodeError);
|
|
441
|
+
}
|
|
442
|
+
declare class InvalidAddressWixError extends Error {
|
|
443
|
+
httpCode: string;
|
|
444
|
+
applicationCode: string;
|
|
445
|
+
errorDescription: string;
|
|
446
|
+
messageSchema: string;
|
|
447
|
+
data: InvalidAddressError;
|
|
448
|
+
constructor(data: InvalidAddressError);
|
|
449
|
+
}
|
|
450
|
+
declare class GenericShippingRatesWixError extends Error {
|
|
451
|
+
httpCode: string;
|
|
452
|
+
applicationCode: string;
|
|
453
|
+
errorDescription: string;
|
|
454
|
+
messageSchema: string;
|
|
455
|
+
data: GenericShippingRatesError;
|
|
456
|
+
constructor(data: GenericShippingRatesError);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
type ServicePluginMethodInput = {
|
|
460
|
+
request: any;
|
|
461
|
+
metadata: any;
|
|
462
|
+
};
|
|
463
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
464
|
+
type ServicePluginMethodMetadata = {
|
|
465
|
+
name: string;
|
|
466
|
+
primaryHttpMappingPath: string;
|
|
467
|
+
transformations: {
|
|
468
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
469
|
+
toREST: (...args: unknown[]) => unknown;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
473
|
+
__type: 'service-plugin-definition';
|
|
474
|
+
componentType: string;
|
|
475
|
+
methods: ServicePluginMethodMetadata[];
|
|
476
|
+
__contract: Contract;
|
|
477
|
+
};
|
|
478
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
479
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
480
|
+
|
|
481
|
+
interface GetShippingRatesEnvelope {
|
|
482
|
+
request: GetShippingRatesRequest;
|
|
483
|
+
metadata: Context$4;
|
|
484
|
+
}
|
|
485
|
+
declare const provide$9: ServicePluginDefinition<{
|
|
486
|
+
getShippingRates(payload: GetShippingRatesEnvelope): GetShippingRatesResponse | Promise<GetShippingRatesResponse>;
|
|
487
|
+
}>;
|
|
488
|
+
|
|
489
|
+
declare const provide$8: BuildServicePluginDefinition<typeof provide$9>;
|
|
490
|
+
|
|
491
|
+
type context$4_AdditionalCharge = AdditionalCharge;
|
|
492
|
+
type context$4_AddressStreetOneOf = AddressStreetOneOf;
|
|
493
|
+
type context$4_ApplicationError = ApplicationError;
|
|
494
|
+
type context$4_Column = Column;
|
|
495
|
+
type context$4_DashboardTable = DashboardTable;
|
|
496
|
+
type context$4_DeliveryPreferences = DeliveryPreferences;
|
|
497
|
+
type context$4_FieldViolation = FieldViolation;
|
|
498
|
+
type context$4_GenericShippingRatesError = GenericShippingRatesError;
|
|
499
|
+
type context$4_GenericShippingRatesWixError = GenericShippingRatesWixError;
|
|
500
|
+
declare const context$4_GenericShippingRatesWixError: typeof GenericShippingRatesWixError;
|
|
501
|
+
type context$4_GetDashboardTablesRequest = GetDashboardTablesRequest;
|
|
502
|
+
type context$4_GetDashboardTablesResponse = GetDashboardTablesResponse;
|
|
503
|
+
type context$4_GetShippingRatesRequest = GetShippingRatesRequest;
|
|
504
|
+
type context$4_GetShippingRatesResponse = GetShippingRatesResponse;
|
|
505
|
+
type context$4_InvalidAddressError = InvalidAddressError;
|
|
506
|
+
type context$4_InvalidAddressWixError = InvalidAddressWixError;
|
|
507
|
+
declare const context$4_InvalidAddressWixError: typeof InvalidAddressWixError;
|
|
508
|
+
type context$4_InvalidPostalCodeError = InvalidPostalCodeError;
|
|
509
|
+
type context$4_InvalidPostalCodeWixError = InvalidPostalCodeWixError;
|
|
510
|
+
declare const context$4_InvalidPostalCodeWixError: typeof InvalidPostalCodeWixError;
|
|
511
|
+
type context$4_MissingPostalCodeError = MissingPostalCodeError;
|
|
512
|
+
type context$4_MissingPostalCodeWixError = MissingPostalCodeWixError;
|
|
513
|
+
declare const context$4_MissingPostalCodeWixError: typeof MissingPostalCodeWixError;
|
|
514
|
+
type context$4_PartialOption = PartialOption;
|
|
515
|
+
type context$4_ProductItem = ProductItem;
|
|
516
|
+
type context$4_RegionDashboardTables = RegionDashboardTables;
|
|
517
|
+
type context$4_Row = Row;
|
|
518
|
+
type context$4_RuleType = RuleType;
|
|
519
|
+
declare const context$4_RuleType: typeof RuleType;
|
|
520
|
+
type context$4_ShippingOption = ShippingOption;
|
|
521
|
+
type context$4_ShippingRatesConfig = ShippingRatesConfig;
|
|
522
|
+
type context$4_StandardDetails = StandardDetails;
|
|
523
|
+
type context$4_Subdivision = Subdivision;
|
|
524
|
+
type context$4_SubdivisionType = SubdivisionType;
|
|
525
|
+
declare const context$4_SubdivisionType: typeof SubdivisionType;
|
|
526
|
+
declare namespace context$4 {
|
|
527
|
+
export { type context$4_AdditionalCharge as AdditionalCharge, type Address$3 as Address, type AddressLocation$3 as AddressLocation, type context$4_AddressStreetOneOf as AddressStreetOneOf, type context$4_ApplicationError as ApplicationError, type CatalogReference$4 as CatalogReference, ChargeType$1 as ChargeType, type context$4_Column as Column, type Context$4 as Context, type context$4_DashboardTable as DashboardTable, type DeliveryLogistics$2 as DeliveryLogistics, type context$4_DeliveryPreferences as DeliveryPreferences, type DeliveryTimeSlot$1 as DeliveryTimeSlot, type context$4_FieldViolation as FieldViolation, type FullAddressContactDetails$3 as FullAddressContactDetails, type context$4_GenericShippingRatesError as GenericShippingRatesError, context$4_GenericShippingRatesWixError as GenericShippingRatesWixError, type context$4_GetDashboardTablesRequest as GetDashboardTablesRequest, type context$4_GetDashboardTablesResponse as GetDashboardTablesResponse, type context$4_GetShippingRatesRequest as GetShippingRatesRequest, type context$4_GetShippingRatesResponse as GetShippingRatesResponse, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, IdentityType$4 as IdentityType, type context$4_InvalidAddressError as InvalidAddressError, context$4_InvalidAddressWixError as InvalidAddressWixError, type context$4_InvalidPostalCodeError as InvalidPostalCodeError, context$4_InvalidPostalCodeWixError as InvalidPostalCodeWixError, type context$4_MissingPostalCodeError as MissingPostalCodeError, context$4_MissingPostalCodeWixError as MissingPostalCodeWixError, type context$4_PartialOption as PartialOption, type PhysicalProperties$3 as PhysicalProperties, type PickupDetails$2 as PickupDetails, PickupMethod$2 as PickupMethod, type context$4_ProductItem as ProductItem, type context$4_RegionDashboardTables as RegionDashboardTables, type context$4_Row as Row, context$4_RuleType as RuleType, type context$4_ShippingOption as ShippingOption, type ShippingPrice$1 as ShippingPrice, type context$4_ShippingRatesConfig as ShippingRatesConfig, type context$4_StandardDetails as StandardDetails, type StreetAddress$3 as StreetAddress, type context$4_Subdivision as Subdivision, context$4_SubdivisionType as SubdivisionType, type VatId$3 as VatId, VatType$3 as VatType, WeightUnit$2 as WeightUnit, provide$8 as provide };
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
interface CalculateAdditionalFeesRequest {
|
|
531
|
+
/**
|
|
532
|
+
* Line items to calculate additional fees for.
|
|
533
|
+
*
|
|
534
|
+
* Max: 300 items
|
|
535
|
+
*/
|
|
536
|
+
lineItems?: LineItem$2[];
|
|
537
|
+
/** Shipping address. */
|
|
538
|
+
shippingAddress?: Address$2;
|
|
539
|
+
/** Information about the buyer, such as contact details. */
|
|
540
|
+
buyerDetails?: BuyerDetails$1;
|
|
541
|
+
/** Applied discounts. */
|
|
542
|
+
appliedDiscounts?: AppliedDiscount$2[];
|
|
543
|
+
/** Shipping information. */
|
|
544
|
+
shippingInfo?: ShippingInformation$1;
|
|
545
|
+
/** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */
|
|
546
|
+
purchaseFlowId?: string | null;
|
|
547
|
+
}
|
|
548
|
+
interface LineItem$2 {
|
|
549
|
+
/** Line item ID. */
|
|
550
|
+
_id?: string;
|
|
551
|
+
/**
|
|
552
|
+
* Quantity of item.
|
|
553
|
+
*
|
|
554
|
+
* Min: `1`
|
|
555
|
+
* Max: `100000`
|
|
556
|
+
*/
|
|
557
|
+
quantity?: number | null;
|
|
558
|
+
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */
|
|
559
|
+
catalogReference?: CatalogReference$3;
|
|
560
|
+
/** Item name. */
|
|
561
|
+
productName?: string | null;
|
|
562
|
+
/** Price for a single item. */
|
|
563
|
+
price?: string;
|
|
564
|
+
/** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */
|
|
565
|
+
physicalProperties?: PhysicalProperties$2;
|
|
566
|
+
/**
|
|
567
|
+
* Partial payment to be paid upfront during the checkout.
|
|
568
|
+
* Only eligible for catalog items with `lineItem.paymentOption` type of `DEPOSIT_ONLINE`.
|
|
569
|
+
*/
|
|
570
|
+
depositAmount?: string | null;
|
|
571
|
+
}
|
|
572
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
573
|
+
interface CatalogReference$3 {
|
|
574
|
+
/** ID of the item within the catalog it belongs to. */
|
|
575
|
+
catalogItemId?: string;
|
|
576
|
+
/**
|
|
577
|
+
* ID of the app providing the catalog.
|
|
578
|
+
*
|
|
579
|
+
* You can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).
|
|
580
|
+
*
|
|
581
|
+
* For items from Wix catalogs, the following values always apply:
|
|
582
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
583
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
584
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
585
|
+
*/
|
|
586
|
+
appId?: string;
|
|
587
|
+
/**
|
|
588
|
+
* 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.
|
|
589
|
+
*
|
|
590
|
+
* 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).
|
|
591
|
+
*/
|
|
592
|
+
options?: Record<string, any> | null;
|
|
593
|
+
}
|
|
594
|
+
interface PhysicalProperties$2 {
|
|
595
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
596
|
+
weight?: number | null;
|
|
597
|
+
/** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
|
|
598
|
+
sku?: string | null;
|
|
599
|
+
/** Whether this line item is shippable. */
|
|
600
|
+
shippable?: boolean;
|
|
601
|
+
}
|
|
602
|
+
/** Physical address */
|
|
603
|
+
interface Address$2 {
|
|
604
|
+
/** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
|
|
605
|
+
country?: string | null;
|
|
606
|
+
/** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
|
|
607
|
+
subdivision?: string | null;
|
|
608
|
+
/** City name. */
|
|
609
|
+
city?: string | null;
|
|
610
|
+
/** Postal or zip code. */
|
|
611
|
+
postalCode?: string | null;
|
|
612
|
+
/** Street address. */
|
|
613
|
+
streetAddress?: StreetAddress$2;
|
|
614
|
+
/** Main address line (usually street name and number). */
|
|
615
|
+
addressLine1?: string | null;
|
|
616
|
+
/** Free text providing more detailed address info. Usually contains apt, suite, floor. */
|
|
617
|
+
addressLine2?: string | null;
|
|
618
|
+
}
|
|
619
|
+
interface StreetAddress$2 {
|
|
620
|
+
/** Street number. */
|
|
621
|
+
number?: string;
|
|
622
|
+
/** Street name. */
|
|
623
|
+
name?: string;
|
|
624
|
+
}
|
|
625
|
+
interface AddressLocation$2 {
|
|
626
|
+
/** Address latitude. */
|
|
627
|
+
latitude?: number | null;
|
|
628
|
+
/** Address longitude. */
|
|
629
|
+
longitude?: number | null;
|
|
630
|
+
}
|
|
631
|
+
interface BuyerDetails$1 {
|
|
632
|
+
/** Contact details. */
|
|
633
|
+
contactDetails?: FullAddressContactDetails$2;
|
|
634
|
+
}
|
|
635
|
+
/** Full contact details for an address */
|
|
636
|
+
interface FullAddressContactDetails$2 {
|
|
637
|
+
/** Contact's first name. */
|
|
638
|
+
firstName?: string | null;
|
|
639
|
+
/** Contact's last name. */
|
|
640
|
+
lastName?: string | null;
|
|
641
|
+
/** Contact's phone number. */
|
|
642
|
+
phone?: string | null;
|
|
643
|
+
/** Contact's company name. */
|
|
644
|
+
company?: string | null;
|
|
645
|
+
/** Email associated with the address. */
|
|
646
|
+
email?: string | null;
|
|
647
|
+
/** Tax info. Currently usable only in Brazil. */
|
|
648
|
+
vatId?: VatId$2;
|
|
649
|
+
}
|
|
650
|
+
interface VatId$2 {
|
|
651
|
+
/** Customer's tax ID. */
|
|
652
|
+
_id?: string;
|
|
653
|
+
/**
|
|
654
|
+
* Tax type.
|
|
655
|
+
*
|
|
656
|
+
* Supported values:
|
|
657
|
+
* + `CPF`: for individual tax payers
|
|
658
|
+
* + `CNPJ`: for corporations
|
|
659
|
+
*/
|
|
660
|
+
type?: VatType$2;
|
|
661
|
+
}
|
|
662
|
+
/** tax info types */
|
|
663
|
+
declare enum VatType$2 {
|
|
664
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
665
|
+
/** CPF - for individual tax payers. */
|
|
666
|
+
CPF = "CPF",
|
|
667
|
+
/** CNPJ - for corporations */
|
|
668
|
+
CNPJ = "CNPJ"
|
|
669
|
+
}
|
|
670
|
+
interface AppliedDiscount$2 extends AppliedDiscountDiscountSourceOneOf$2 {
|
|
671
|
+
/** Coupon details. */
|
|
672
|
+
coupon?: Coupon$2;
|
|
673
|
+
/** Merchant discount. */
|
|
674
|
+
merchantDiscount?: MerchantDiscount$2;
|
|
675
|
+
/** Discount rule */
|
|
676
|
+
discountRule?: DiscountRule$2;
|
|
677
|
+
/** Discount type. */
|
|
678
|
+
discountType?: DiscountType$2;
|
|
679
|
+
/** IDs of line items the discount applies to. */
|
|
680
|
+
lineItemIds?: string[];
|
|
681
|
+
}
|
|
682
|
+
/** @oneof */
|
|
683
|
+
interface AppliedDiscountDiscountSourceOneOf$2 {
|
|
684
|
+
/** Coupon details. */
|
|
685
|
+
coupon?: Coupon$2;
|
|
686
|
+
/** Merchant discount. */
|
|
687
|
+
merchantDiscount?: MerchantDiscount$2;
|
|
688
|
+
/** Discount rule */
|
|
689
|
+
discountRule?: DiscountRule$2;
|
|
690
|
+
}
|
|
691
|
+
declare enum DiscountType$2 {
|
|
692
|
+
GLOBAL = "GLOBAL",
|
|
693
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
694
|
+
SHIPPING = "SHIPPING"
|
|
695
|
+
}
|
|
696
|
+
/** Coupon */
|
|
697
|
+
interface Coupon$2 {
|
|
698
|
+
/** Coupon ID. */
|
|
699
|
+
_id?: string;
|
|
700
|
+
/** Coupon code. */
|
|
701
|
+
code?: string;
|
|
702
|
+
/** Coupon name. */
|
|
703
|
+
name?: string;
|
|
704
|
+
amount?: string;
|
|
705
|
+
}
|
|
706
|
+
interface MerchantDiscount$2 {
|
|
707
|
+
amount?: string;
|
|
708
|
+
}
|
|
709
|
+
interface DiscountRule$2 {
|
|
710
|
+
/** Discount rule ID */
|
|
711
|
+
_id?: string;
|
|
712
|
+
/** Discount rule name */
|
|
713
|
+
name?: DiscountRuleName$2;
|
|
714
|
+
amount?: string;
|
|
715
|
+
}
|
|
716
|
+
interface DiscountRuleName$2 {
|
|
717
|
+
/** Original discount rule name (in site's default language). */
|
|
718
|
+
original?: string;
|
|
719
|
+
/** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
|
|
720
|
+
translated?: string | null;
|
|
721
|
+
}
|
|
722
|
+
interface ShippingInformation$1 {
|
|
723
|
+
/** Selected carrier shipping option. */
|
|
724
|
+
selectedCarrierServiceOption?: SelectedCarrierServiceOption$1;
|
|
725
|
+
}
|
|
726
|
+
interface SelectedCarrierServiceOption$1 {
|
|
727
|
+
/** Unique identifier of selected option. For example, `"usps_std_overnight"`. */
|
|
728
|
+
code?: string;
|
|
729
|
+
/**
|
|
730
|
+
* Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
|
|
731
|
+
* For example, "Standard" or "First-Class Package International".
|
|
732
|
+
* @readonly
|
|
733
|
+
*/
|
|
734
|
+
title?: string;
|
|
735
|
+
/**
|
|
736
|
+
* Delivery logistics.
|
|
737
|
+
* @readonly
|
|
738
|
+
*/
|
|
739
|
+
logistics?: DeliveryLogistics$1;
|
|
740
|
+
/**
|
|
741
|
+
* Shipping costs.
|
|
742
|
+
* @readonly
|
|
743
|
+
*/
|
|
744
|
+
cost?: SelectedCarrierServiceOptionPrices$1;
|
|
745
|
+
/** Other charges. */
|
|
746
|
+
otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
|
|
747
|
+
}
|
|
748
|
+
interface DeliveryLogistics$1 {
|
|
749
|
+
/** Expected delivery time. For example, "3-5 business days". */
|
|
750
|
+
deliveryTime?: string | null;
|
|
751
|
+
/** Instructions for deliver. For example, "Please deliver during open hours and please don't park in disabled parking spot". */
|
|
752
|
+
instructions?: string | null;
|
|
753
|
+
/** Pickup details. */
|
|
754
|
+
pickupDetails?: PickupDetails$1;
|
|
755
|
+
}
|
|
756
|
+
interface PickupDetails$1 {
|
|
757
|
+
/** Pickup address. */
|
|
758
|
+
address?: Address$2;
|
|
759
|
+
/**
|
|
760
|
+
* Whether the pickup address is a business. This may affect tax calculation.
|
|
761
|
+
* @deprecated
|
|
762
|
+
*/
|
|
763
|
+
businessLocation?: boolean;
|
|
764
|
+
/** Pickup method. */
|
|
765
|
+
pickupMethod?: PickupMethod$1;
|
|
766
|
+
}
|
|
767
|
+
declare enum PickupMethod$1 {
|
|
768
|
+
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
769
|
+
STORE_PICKUP = "STORE_PICKUP",
|
|
770
|
+
PICKUP_POINT = "PICKUP_POINT"
|
|
771
|
+
}
|
|
772
|
+
interface SelectedCarrierServiceOptionPrices$1 {
|
|
773
|
+
/** Price. */
|
|
774
|
+
price?: string;
|
|
775
|
+
/** Total shipping discount. */
|
|
776
|
+
totalDiscount?: string | null;
|
|
777
|
+
}
|
|
778
|
+
interface SelectedCarrierServiceOptionOtherCharge {
|
|
779
|
+
/** Type of charge. */
|
|
780
|
+
type?: ChargeType;
|
|
781
|
+
/**
|
|
782
|
+
* Details of the charge.
|
|
783
|
+
*
|
|
784
|
+
* Max: 200 characters
|
|
785
|
+
*/
|
|
786
|
+
details?: string | null;
|
|
787
|
+
/**
|
|
788
|
+
* Cost.
|
|
789
|
+
*
|
|
790
|
+
* `cost` is `price` minus `totalDiscount`.
|
|
791
|
+
*/
|
|
792
|
+
cost?: SelectedCarrierServiceOptionPrices$1;
|
|
793
|
+
}
|
|
794
|
+
declare enum ChargeType {
|
|
795
|
+
HANDLING_FEE = "HANDLING_FEE",
|
|
796
|
+
INSURANCE = "INSURANCE"
|
|
797
|
+
}
|
|
798
|
+
interface CalculateAdditionalFeesResponse {
|
|
799
|
+
/** Additional fees calculated. */
|
|
800
|
+
additionalFees?: AdditionalFee$1[];
|
|
801
|
+
/**
|
|
802
|
+
* Currency of additional fees calculated. In three-letter currency code
|
|
803
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
804
|
+
*
|
|
805
|
+
* The currency returned in the response object must match the wix site's currency or those fees will
|
|
806
|
+
* be filtered out and not returned. Extract the `currency` from the
|
|
807
|
+
* [request envelope](https://dev.wix.com/api/rest/getting-started/service-provider-interface#getting-started_service-provider-interface_request-envelope)
|
|
808
|
+
* to ensure the correct currency is used in your calculation.
|
|
809
|
+
*/
|
|
810
|
+
currency?: string;
|
|
811
|
+
}
|
|
812
|
+
/** Additional fees calculated. */
|
|
813
|
+
interface AdditionalFee$1 {
|
|
814
|
+
/** Additional fee's unique code or ID. */
|
|
815
|
+
code?: string | null;
|
|
816
|
+
/**
|
|
817
|
+
* Additional fee's name.
|
|
818
|
+
*
|
|
819
|
+
* Max: 50 characters
|
|
820
|
+
*/
|
|
821
|
+
name?: string;
|
|
822
|
+
/** Total additional fees. This `price` does not include any taxes that may apply to these additional fees. */
|
|
823
|
+
price?: string;
|
|
824
|
+
/**
|
|
825
|
+
* Tax details.
|
|
826
|
+
*
|
|
827
|
+
* > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`.
|
|
828
|
+
*/
|
|
829
|
+
taxDetails?: TaxDetails;
|
|
830
|
+
/**
|
|
831
|
+
* Optional - Line items associated with this additional fee.
|
|
832
|
+
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
833
|
+
*/
|
|
834
|
+
lineItemIds?: string[];
|
|
835
|
+
}
|
|
836
|
+
/** Tax details. */
|
|
837
|
+
interface TaxDetails {
|
|
838
|
+
/** Whether additional fee is taxable. */
|
|
839
|
+
taxable?: boolean;
|
|
840
|
+
/** Reserved for internal use. */
|
|
841
|
+
taxGroupId?: string | null;
|
|
842
|
+
}
|
|
843
|
+
interface AdditionalFeesSPIConfig {
|
|
844
|
+
/**
|
|
845
|
+
* Base URI where the endpoints are called.
|
|
846
|
+
* Wix eCommerce appends the endpoint path to the base URI.
|
|
847
|
+
* For example, to call the Calculate Additional Fees endpoint at `https://my-additional-fees.com/v1/calculateAdditionalFees`,
|
|
848
|
+
* the base URI you provide here is `https://my-additional-fees.com/`.
|
|
849
|
+
*/
|
|
850
|
+
deploymentUri?: string;
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* this message is not directly used by any service,
|
|
854
|
+
* it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
|
|
855
|
+
* e.g. SPIs, event-handlers, etc..
|
|
856
|
+
* NOTE: this context object MUST be provided as the last argument in each Velo method signature.
|
|
857
|
+
*
|
|
858
|
+
* Example:
|
|
859
|
+
* ```typescript
|
|
860
|
+
* export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
|
|
861
|
+
* ...
|
|
862
|
+
* }
|
|
863
|
+
* ```
|
|
864
|
+
*/
|
|
865
|
+
interface Context$3 {
|
|
866
|
+
/** A unique identifier for each request. Can be used for logging / troubleshooting */
|
|
867
|
+
requestId?: string | null;
|
|
868
|
+
/** 3 capital letters string representing a currency according to ISO-4217 */
|
|
869
|
+
currency?: string | null;
|
|
870
|
+
/** The identification type and identity data */
|
|
871
|
+
identity?: IdentificationData$3;
|
|
872
|
+
/** A string representing a language and region in the format of "xx-XX". First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2 */
|
|
873
|
+
languages?: string[];
|
|
874
|
+
/** App instance ID of SPI in context */
|
|
875
|
+
instanceId?: string | null;
|
|
876
|
+
}
|
|
877
|
+
declare enum IdentityType$3 {
|
|
878
|
+
UNKNOWN = "UNKNOWN",
|
|
879
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
880
|
+
MEMBER = "MEMBER",
|
|
881
|
+
WIX_USER = "WIX_USER",
|
|
882
|
+
APP = "APP"
|
|
883
|
+
}
|
|
884
|
+
interface IdentificationData$3 extends IdentificationDataIdOneOf$3 {
|
|
885
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
886
|
+
anonymousVisitorId?: string;
|
|
887
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
888
|
+
memberId?: string;
|
|
889
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
890
|
+
wixUserId?: string;
|
|
891
|
+
/** ID of an app. */
|
|
892
|
+
appId?: string;
|
|
893
|
+
/** @readonly */
|
|
894
|
+
identityType?: IdentityType$3;
|
|
895
|
+
}
|
|
896
|
+
/** @oneof */
|
|
897
|
+
interface IdentificationDataIdOneOf$3 {
|
|
898
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
899
|
+
anonymousVisitorId?: string;
|
|
900
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
901
|
+
memberId?: string;
|
|
902
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
903
|
+
wixUserId?: string;
|
|
904
|
+
/** ID of an app. */
|
|
905
|
+
appId?: string;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
interface CalculateAdditionalFeesEnvelope {
|
|
909
|
+
request: CalculateAdditionalFeesRequest;
|
|
910
|
+
metadata: Context$3;
|
|
911
|
+
}
|
|
912
|
+
declare const provide$7: ServicePluginDefinition<{
|
|
913
|
+
calculateAdditionalFees(payload: CalculateAdditionalFeesEnvelope): CalculateAdditionalFeesResponse | Promise<CalculateAdditionalFeesResponse>;
|
|
914
|
+
}>;
|
|
915
|
+
|
|
916
|
+
declare const provide$6: BuildServicePluginDefinition<typeof provide$7>;
|
|
917
|
+
|
|
918
|
+
type context$3_AdditionalFeesSPIConfig = AdditionalFeesSPIConfig;
|
|
919
|
+
type context$3_CalculateAdditionalFeesRequest = CalculateAdditionalFeesRequest;
|
|
920
|
+
type context$3_CalculateAdditionalFeesResponse = CalculateAdditionalFeesResponse;
|
|
921
|
+
type context$3_ChargeType = ChargeType;
|
|
922
|
+
declare const context$3_ChargeType: typeof ChargeType;
|
|
923
|
+
type context$3_SelectedCarrierServiceOptionOtherCharge = SelectedCarrierServiceOptionOtherCharge;
|
|
924
|
+
type context$3_TaxDetails = TaxDetails;
|
|
925
|
+
declare namespace context$3 {
|
|
926
|
+
export { type AdditionalFee$1 as AdditionalFee, type context$3_AdditionalFeesSPIConfig as AdditionalFeesSPIConfig, type Address$2 as Address, type AddressLocation$2 as AddressLocation, type AppliedDiscount$2 as AppliedDiscount, type AppliedDiscountDiscountSourceOneOf$2 as AppliedDiscountDiscountSourceOneOf, type BuyerDetails$1 as BuyerDetails, type context$3_CalculateAdditionalFeesRequest as CalculateAdditionalFeesRequest, type context$3_CalculateAdditionalFeesResponse as CalculateAdditionalFeesResponse, type CatalogReference$3 as CatalogReference, context$3_ChargeType as ChargeType, type Context$3 as Context, type Coupon$2 as Coupon, type DeliveryLogistics$1 as DeliveryLogistics, type DiscountRule$2 as DiscountRule, type DiscountRuleName$2 as DiscountRuleName, DiscountType$2 as DiscountType, type FullAddressContactDetails$2 as FullAddressContactDetails, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, IdentityType$3 as IdentityType, type LineItem$2 as LineItem, type MerchantDiscount$2 as MerchantDiscount, type PhysicalProperties$2 as PhysicalProperties, type PickupDetails$1 as PickupDetails, PickupMethod$1 as PickupMethod, type SelectedCarrierServiceOption$1 as SelectedCarrierServiceOption, type context$3_SelectedCarrierServiceOptionOtherCharge as SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices$1 as SelectedCarrierServiceOptionPrices, type ShippingInformation$1 as ShippingInformation, type StreetAddress$2 as StreetAddress, type context$3_TaxDetails as TaxDetails, type VatId$2 as VatId, VatType$2 as VatType, provide$6 as provide };
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
interface CustomTrigger {
|
|
930
|
+
/** Custom trigger ID. */
|
|
931
|
+
_id?: string;
|
|
932
|
+
}
|
|
933
|
+
interface ListTriggersRequest {
|
|
934
|
+
}
|
|
935
|
+
interface ListTriggersResponse {
|
|
936
|
+
/** Custom triggers. */
|
|
937
|
+
customTriggers?: ListTriggersResponseCustomTrigger[];
|
|
938
|
+
}
|
|
939
|
+
interface ListTriggersResponseCustomTrigger {
|
|
940
|
+
/** Custom trigger ID. */
|
|
941
|
+
_id?: string;
|
|
942
|
+
/** Custom trigger name to display in the dashboard. */
|
|
943
|
+
name?: string;
|
|
944
|
+
}
|
|
945
|
+
interface GetEligibleTriggersRequest {
|
|
946
|
+
/** List of line items in the cart/checkout. */
|
|
947
|
+
lineItems?: LineItem$1[];
|
|
948
|
+
/** List of triggers to be checked for discount eligibility. */
|
|
949
|
+
triggers?: TriggerToFilterBy[];
|
|
950
|
+
/** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */
|
|
951
|
+
purchaseFlowId?: string | null;
|
|
952
|
+
}
|
|
953
|
+
interface LineItem$1 {
|
|
954
|
+
/** Line item ID. */
|
|
955
|
+
_id?: string;
|
|
956
|
+
/** Item quantity in this line item. */
|
|
957
|
+
quantity?: number | null;
|
|
958
|
+
/**
|
|
959
|
+
* Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info.
|
|
960
|
+
* This field is empty in the case of a custom line item.
|
|
961
|
+
*/
|
|
962
|
+
catalogReference?: CatalogReference$2;
|
|
963
|
+
/** Price of a single item. */
|
|
964
|
+
price?: string;
|
|
965
|
+
}
|
|
966
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
967
|
+
interface CatalogReference$2 {
|
|
968
|
+
/** ID of the item within the catalog it belongs to. */
|
|
969
|
+
catalogItemId?: string;
|
|
970
|
+
/**
|
|
971
|
+
* ID of the app providing the catalog.
|
|
972
|
+
*
|
|
973
|
+
* You can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).
|
|
974
|
+
*
|
|
975
|
+
* For items from Wix catalogs, the following values always apply:
|
|
976
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
977
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
978
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
979
|
+
*/
|
|
980
|
+
appId?: string;
|
|
981
|
+
/**
|
|
982
|
+
* 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.
|
|
983
|
+
*
|
|
984
|
+
* 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).
|
|
985
|
+
*/
|
|
986
|
+
options?: Record<string, any> | null;
|
|
987
|
+
}
|
|
988
|
+
interface TriggerToFilterBy {
|
|
989
|
+
/** Custom trigger info. */
|
|
990
|
+
customTrigger?: CustomTrigger;
|
|
991
|
+
/** Unique trigger identifier. The same value must be returned in `eligibleTriggers[i].identifier`. */
|
|
992
|
+
identifier?: string | null;
|
|
993
|
+
}
|
|
994
|
+
interface GetEligibleTriggersResponse {
|
|
995
|
+
/** List of eligible triggers. These are used by the Discount Rules API and Wix eCommerce to apply the relevant discount. */
|
|
996
|
+
eligibleTriggers?: EligibleTrigger[];
|
|
997
|
+
}
|
|
998
|
+
interface EligibleTrigger {
|
|
999
|
+
/** Custom trigger ID. Must be passed with relevant `identifier`. */
|
|
1000
|
+
customTriggerId?: string;
|
|
1001
|
+
/** Unique trigger identifier. The value must be the same as its equivalent in `triggers[i].identifier` in the request payload. */
|
|
1002
|
+
identifier?: string | null;
|
|
1003
|
+
}
|
|
1004
|
+
interface CustomTriggerConfig {
|
|
1005
|
+
/**
|
|
1006
|
+
* Required. Base URI where the endpoints are called.
|
|
1007
|
+
* Wix appends the endpoint path to the base URI. For example, to call the Get Eligible Triggers endpoint at `https://my-discount-app.com/v1/getEligibleTriggers`, the base URI you provide here is `https://my-discount-app.com/`.
|
|
1008
|
+
*/
|
|
1009
|
+
deploymentUri?: string;
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
* this message is not directly used by any service,
|
|
1013
|
+
* it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
|
|
1014
|
+
* e.g. SPIs, event-handlers, etc..
|
|
1015
|
+
* NOTE: this context object MUST be provided as the last argument in each Velo method signature.
|
|
1016
|
+
*
|
|
1017
|
+
* Example:
|
|
1018
|
+
* ```typescript
|
|
1019
|
+
* export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
|
|
1020
|
+
* ...
|
|
1021
|
+
* }
|
|
1022
|
+
* ```
|
|
1023
|
+
*/
|
|
1024
|
+
interface Context$2 {
|
|
1025
|
+
/** A unique identifier for each request. Can be used for logging / troubleshooting */
|
|
1026
|
+
requestId?: string | null;
|
|
1027
|
+
/** 3 capital letters string representing a currency according to ISO-4217 */
|
|
1028
|
+
currency?: string | null;
|
|
1029
|
+
/** The identification type and identity data */
|
|
1030
|
+
identity?: IdentificationData$2;
|
|
1031
|
+
/** A string representing a language and region in the format of "xx-XX". First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2 */
|
|
1032
|
+
languages?: string[];
|
|
1033
|
+
/** App instance ID of SPI in context */
|
|
1034
|
+
instanceId?: string | null;
|
|
1035
|
+
}
|
|
1036
|
+
declare enum IdentityType$2 {
|
|
1037
|
+
UNKNOWN = "UNKNOWN",
|
|
1038
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1039
|
+
MEMBER = "MEMBER",
|
|
1040
|
+
WIX_USER = "WIX_USER",
|
|
1041
|
+
APP = "APP"
|
|
1042
|
+
}
|
|
1043
|
+
interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
|
|
1044
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1045
|
+
anonymousVisitorId?: string;
|
|
1046
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1047
|
+
memberId?: string;
|
|
1048
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1049
|
+
wixUserId?: string;
|
|
1050
|
+
/** ID of an app. */
|
|
1051
|
+
appId?: string;
|
|
1052
|
+
/** @readonly */
|
|
1053
|
+
identityType?: IdentityType$2;
|
|
1054
|
+
}
|
|
1055
|
+
/** @oneof */
|
|
1056
|
+
interface IdentificationDataIdOneOf$2 {
|
|
1057
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1058
|
+
anonymousVisitorId?: string;
|
|
1059
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1060
|
+
memberId?: string;
|
|
1061
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1062
|
+
wixUserId?: string;
|
|
1063
|
+
/** ID of an app. */
|
|
1064
|
+
appId?: string;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
interface ListTriggersEnvelope {
|
|
1068
|
+
request: ListTriggersRequest;
|
|
1069
|
+
metadata: Context$2;
|
|
1070
|
+
}
|
|
1071
|
+
interface GetEligibleTriggersEnvelope {
|
|
1072
|
+
request: GetEligibleTriggersRequest;
|
|
1073
|
+
metadata: Context$2;
|
|
1074
|
+
}
|
|
1075
|
+
declare const provide$5: ServicePluginDefinition<{
|
|
1076
|
+
listTriggers(payload: ListTriggersEnvelope): ListTriggersResponse | Promise<ListTriggersResponse>;
|
|
1077
|
+
getEligibleTriggers(payload: GetEligibleTriggersEnvelope): GetEligibleTriggersResponse | Promise<GetEligibleTriggersResponse>;
|
|
1078
|
+
}>;
|
|
1079
|
+
|
|
1080
|
+
declare const provide$4: BuildServicePluginDefinition<typeof provide$5>;
|
|
1081
|
+
|
|
1082
|
+
type context$2_CustomTrigger = CustomTrigger;
|
|
1083
|
+
type context$2_CustomTriggerConfig = CustomTriggerConfig;
|
|
1084
|
+
type context$2_EligibleTrigger = EligibleTrigger;
|
|
1085
|
+
type context$2_GetEligibleTriggersRequest = GetEligibleTriggersRequest;
|
|
1086
|
+
type context$2_GetEligibleTriggersResponse = GetEligibleTriggersResponse;
|
|
1087
|
+
type context$2_ListTriggersRequest = ListTriggersRequest;
|
|
1088
|
+
type context$2_ListTriggersResponse = ListTriggersResponse;
|
|
1089
|
+
type context$2_ListTriggersResponseCustomTrigger = ListTriggersResponseCustomTrigger;
|
|
1090
|
+
type context$2_TriggerToFilterBy = TriggerToFilterBy;
|
|
1091
|
+
declare namespace context$2 {
|
|
1092
|
+
export { type CatalogReference$2 as CatalogReference, type Context$2 as Context, type context$2_CustomTrigger as CustomTrigger, type context$2_CustomTriggerConfig as CustomTriggerConfig, type context$2_EligibleTrigger as EligibleTrigger, type context$2_GetEligibleTriggersRequest as GetEligibleTriggersRequest, type context$2_GetEligibleTriggersResponse as GetEligibleTriggersResponse, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, IdentityType$2 as IdentityType, type LineItem$1 as LineItem, type context$2_ListTriggersRequest as ListTriggersRequest, type context$2_ListTriggersResponse as ListTriggersResponse, type context$2_ListTriggersResponseCustomTrigger as ListTriggersResponseCustomTrigger, type context$2_TriggerToFilterBy as TriggerToFilterBy, provide$4 as provide };
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
interface GetPaymentSettingsRequest {
|
|
1096
|
+
/** Order. */
|
|
1097
|
+
order?: Order;
|
|
1098
|
+
}
|
|
1099
|
+
interface Order {
|
|
1100
|
+
/**
|
|
1101
|
+
* Order ID.
|
|
1102
|
+
* @readonly
|
|
1103
|
+
*/
|
|
1104
|
+
_id?: string | null;
|
|
1105
|
+
/**
|
|
1106
|
+
* Order number displayed in the site owner's dashboard (auto-generated).
|
|
1107
|
+
* @readonly
|
|
1108
|
+
*/
|
|
1109
|
+
number?: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* Date and time the order was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
1112
|
+
* @readonly
|
|
1113
|
+
*/
|
|
1114
|
+
_createdDate?: Date;
|
|
1115
|
+
/**
|
|
1116
|
+
* Date and time the order was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
1117
|
+
* @readonly
|
|
1118
|
+
*/
|
|
1119
|
+
_updatedDate?: Date;
|
|
1120
|
+
/**
|
|
1121
|
+
* Order line items.
|
|
1122
|
+
* @readonly
|
|
1123
|
+
*/
|
|
1124
|
+
lineItems?: OrderLineItem[];
|
|
1125
|
+
/** Buyer information. */
|
|
1126
|
+
buyerInfo?: BuyerInfo;
|
|
1127
|
+
/**
|
|
1128
|
+
* Order payment status.
|
|
1129
|
+
* + `NOT_PAID` - This can be an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`.
|
|
1130
|
+
* + This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`.
|
|
1131
|
+
* + `PAID` - All payments associated with this order are paid. For online payments: [`payment.regularPaymentDetails.status: APPROVED`](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-transactions/order-transactions-object). For gift cards: [`payment.giftCardPaymentDetails.voided: false`](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-transactions/order-transactions-object).
|
|
1132
|
+
* + `PARTIALLY_REFUNDED` - Order was refunded, but refund amount is less than order total price.
|
|
1133
|
+
* + `FULLY_REFUNDED` - Order fully refunded. Refund amount equals total price.
|
|
1134
|
+
* + `PENDING` - Payments received but not yet confirmed by the payment provider.
|
|
1135
|
+
* + `PARTIALLY_PAID` - At least one payment was received and approved, covering less than total price amount.
|
|
1136
|
+
*/
|
|
1137
|
+
paymentStatus?: PaymentStatus;
|
|
1138
|
+
/**
|
|
1139
|
+
* Order fulfillment status.
|
|
1140
|
+
* @readonly
|
|
1141
|
+
*/
|
|
1142
|
+
fulfillmentStatus?: FulfillmentStatus;
|
|
1143
|
+
/**
|
|
1144
|
+
* Language for communication with the buyer. Defaults to the site language.
|
|
1145
|
+
* For a site that supports multiple languages, this is the language the buyer selected.
|
|
1146
|
+
*/
|
|
1147
|
+
buyerLanguage?: string | null;
|
|
1148
|
+
/** Weight measurement unit - defaults to site's weight unit. */
|
|
1149
|
+
weightUnit?: WeightUnit$1;
|
|
1150
|
+
/** Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. */
|
|
1151
|
+
currency?: string | null;
|
|
1152
|
+
/** Whether tax is included in line item prices. */
|
|
1153
|
+
taxIncludedInPrices?: boolean;
|
|
1154
|
+
/**
|
|
1155
|
+
* Site language in which original values are shown.
|
|
1156
|
+
* @readonly
|
|
1157
|
+
*/
|
|
1158
|
+
siteLanguage?: string | null;
|
|
1159
|
+
/**
|
|
1160
|
+
* Order price summary.
|
|
1161
|
+
* @readonly
|
|
1162
|
+
*/
|
|
1163
|
+
priceSummary?: PriceSummary$1;
|
|
1164
|
+
/** Billing address and contact details. */
|
|
1165
|
+
billingInfo?: AddressWithContact$1;
|
|
1166
|
+
/** Shipping info and selected shipping option details. */
|
|
1167
|
+
shippingInfo?: ShippingInformation;
|
|
1168
|
+
/** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */
|
|
1169
|
+
buyerNote?: string | null;
|
|
1170
|
+
/**
|
|
1171
|
+
* Order status.
|
|
1172
|
+
* + `INITIALIZED` - Order was created, but not yet approved or declined.
|
|
1173
|
+
* + `APPROVED` - Order was approved. This happens when either the online payment succeeded or the order is an offline order. Once an order is approved, many side effects are triggered. For example, holding of stock in the inventory and sending of notification emails.
|
|
1174
|
+
* + `CANCELED` - Order was canceled by the user.
|
|
1175
|
+
*/
|
|
1176
|
+
status?: OrderStatus;
|
|
1177
|
+
/** Whether order is archived. */
|
|
1178
|
+
archived?: boolean | null;
|
|
1179
|
+
/**
|
|
1180
|
+
* Tax summary.
|
|
1181
|
+
* Deprecated. Use `taxInfo` instead.
|
|
1182
|
+
* This field will be removed on September 30, 2024.
|
|
1183
|
+
* @deprecated Tax summary.
|
|
1184
|
+
* Deprecated. Use `taxInfo` instead.
|
|
1185
|
+
* This field will be removed on September 30, 2024.
|
|
1186
|
+
* @replacedBy tax_info
|
|
1187
|
+
* @removalDate 2024-09-30
|
|
1188
|
+
*/
|
|
1189
|
+
taxSummary?: TaxSummary;
|
|
1190
|
+
/** Tax information. */
|
|
1191
|
+
taxInfo?: OrderTaxInfo;
|
|
1192
|
+
/** Applied discounts. */
|
|
1193
|
+
appliedDiscounts?: AppliedDiscount$1[];
|
|
1194
|
+
/**
|
|
1195
|
+
* Order activities.
|
|
1196
|
+
* @readonly
|
|
1197
|
+
*/
|
|
1198
|
+
activities?: Activity[];
|
|
1199
|
+
/** Order attribution source. */
|
|
1200
|
+
attributionSource?: AttributionSource;
|
|
1201
|
+
/**
|
|
1202
|
+
* ID of the order's initiator.
|
|
1203
|
+
* @readonly
|
|
1204
|
+
*/
|
|
1205
|
+
createdBy?: CreatedBy;
|
|
1206
|
+
/** Information about the sales channel that submitted this order. */
|
|
1207
|
+
channelInfo?: ChannelInfo;
|
|
1208
|
+
/** Whether a human has seen the order. Set when an order is clicked on in the dashboard. */
|
|
1209
|
+
seenByAHuman?: boolean | null;
|
|
1210
|
+
/** Checkout ID. */
|
|
1211
|
+
checkoutId?: string | null;
|
|
1212
|
+
/** Custom fields. */
|
|
1213
|
+
customFields?: CustomField$1[];
|
|
1214
|
+
/**
|
|
1215
|
+
* Balance summary.
|
|
1216
|
+
* @readonly
|
|
1217
|
+
*/
|
|
1218
|
+
balanceSummary?: BalanceSummary;
|
|
1219
|
+
/** Additional fees applied to the order. */
|
|
1220
|
+
additionalFees?: AdditionalFee[];
|
|
1221
|
+
/**
|
|
1222
|
+
* Custom field data for the order object.
|
|
1223
|
+
*
|
|
1224
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.
|
|
1225
|
+
*/
|
|
1226
|
+
extendedFields?: ExtendedFields;
|
|
1227
|
+
/** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */
|
|
1228
|
+
purchaseFlowId?: string | null;
|
|
1229
|
+
/**
|
|
1230
|
+
* Order recipient address and contact details.
|
|
1231
|
+
*
|
|
1232
|
+
* This field may differ from the address in `shippingInfo.logistics` when:
|
|
1233
|
+
* + The chosen shipping option is pickup point or store pickup.
|
|
1234
|
+
* + No shipping option is selected.
|
|
1235
|
+
*/
|
|
1236
|
+
recipientInfo?: AddressWithContact$1;
|
|
1237
|
+
}
|
|
1238
|
+
interface OrderLineItem {
|
|
1239
|
+
/** Line item ID. */
|
|
1240
|
+
_id?: string;
|
|
1241
|
+
/**
|
|
1242
|
+
* Item name.
|
|
1243
|
+
* + Stores - `product.name`
|
|
1244
|
+
* + Bookings - `service.info.name`
|
|
1245
|
+
* + Events - `ticket.name`
|
|
1246
|
+
*/
|
|
1247
|
+
productName?: ProductName$1;
|
|
1248
|
+
/**
|
|
1249
|
+
* References to the line item's origin catalog.
|
|
1250
|
+
* This field is empty in the case of a custom line item.
|
|
1251
|
+
*/
|
|
1252
|
+
catalogReference?: CatalogReference$1;
|
|
1253
|
+
/** Line item quantity. */
|
|
1254
|
+
quantity?: number;
|
|
1255
|
+
/**
|
|
1256
|
+
* Total discount for this line item's entire quantity.
|
|
1257
|
+
* @readonly
|
|
1258
|
+
*/
|
|
1259
|
+
totalDiscount?: Price;
|
|
1260
|
+
/** Line item description lines. Used for display purposes for the cart, checkout and order. */
|
|
1261
|
+
descriptionLines?: DescriptionLine[];
|
|
1262
|
+
/** Line item image. */
|
|
1263
|
+
image?: string;
|
|
1264
|
+
/** Physical properties of the item. When relevant, contains information such as SKU and item weight. */
|
|
1265
|
+
physicalProperties?: PhysicalProperties$1;
|
|
1266
|
+
/** Item type. Either a preset type or custom. */
|
|
1267
|
+
itemType?: ItemType$1;
|
|
1268
|
+
/**
|
|
1269
|
+
* Fulfiller ID. Field is empty when the line item is self-fulfilled.
|
|
1270
|
+
* To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order).
|
|
1271
|
+
*/
|
|
1272
|
+
fulfillerId?: string | null;
|
|
1273
|
+
/**
|
|
1274
|
+
* Number of items that were refunded.
|
|
1275
|
+
* @readonly
|
|
1276
|
+
*/
|
|
1277
|
+
refundQuantity?: number | null;
|
|
1278
|
+
/**
|
|
1279
|
+
* Number of items restocked.
|
|
1280
|
+
* @readonly
|
|
1281
|
+
*/
|
|
1282
|
+
restockQuantity?: number | null;
|
|
1283
|
+
/** Line item price after line item discounts for display purposes. */
|
|
1284
|
+
price?: Price;
|
|
1285
|
+
/**
|
|
1286
|
+
* Line item price before line item discounts for display purposes. Defaults to `price` when not provided.
|
|
1287
|
+
* @readonly
|
|
1288
|
+
*/
|
|
1289
|
+
priceBeforeDiscounts?: Price;
|
|
1290
|
+
/**
|
|
1291
|
+
* Total price after discounts, and before tax.
|
|
1292
|
+
* @readonly
|
|
1293
|
+
*/
|
|
1294
|
+
totalPriceBeforeTax?: Price;
|
|
1295
|
+
/**
|
|
1296
|
+
* Total price after all discounts and tax.
|
|
1297
|
+
* @readonly
|
|
1298
|
+
*/
|
|
1299
|
+
totalPriceAfterTax?: Price;
|
|
1300
|
+
/**
|
|
1301
|
+
* Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
|
|
1302
|
+
* + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout.
|
|
1303
|
+
* + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
|
|
1304
|
+
* + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
1305
|
+
* + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only.
|
|
1306
|
+
*/
|
|
1307
|
+
paymentOption?: PaymentOptionType;
|
|
1308
|
+
/**
|
|
1309
|
+
* Deprecated. Use `taxInfo` instead.
|
|
1310
|
+
* This field will be removed on September 30, 2024.
|
|
1311
|
+
* Tax details for this line item.
|
|
1312
|
+
* @deprecated Deprecated. Use `taxInfo` instead.
|
|
1313
|
+
* This field will be removed on September 30, 2024.
|
|
1314
|
+
* Tax details for this line item.
|
|
1315
|
+
* @replacedBy tax_info
|
|
1316
|
+
* @removalDate 2024-09-30
|
|
1317
|
+
*/
|
|
1318
|
+
taxDetails?: ItemTaxFullDetails$1;
|
|
1319
|
+
/** Represents all the relevant tax details for a specific line item. */
|
|
1320
|
+
taxInfo?: LineItemTaxInfo;
|
|
1321
|
+
/** Digital file identifier, relevant only for items with type DIGITAL. */
|
|
1322
|
+
digitalFile?: DigitalFile;
|
|
1323
|
+
/** Subscription info. */
|
|
1324
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
1325
|
+
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
1326
|
+
priceDescription?: PriceDescription;
|
|
1327
|
+
/**
|
|
1328
|
+
* Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`.
|
|
1329
|
+
* @readonly
|
|
1330
|
+
*/
|
|
1331
|
+
depositAmount?: Price;
|
|
1332
|
+
}
|
|
1333
|
+
interface ProductName$1 {
|
|
1334
|
+
/**
|
|
1335
|
+
* __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).
|
|
1336
|
+
*
|
|
1337
|
+
* Min: 1 character.
|
|
1338
|
+
* Max: 200 characters.
|
|
1339
|
+
*/
|
|
1340
|
+
original?: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Item name translated into the buyer's language.
|
|
1343
|
+
*
|
|
1344
|
+
* Min: 1 character.
|
|
1345
|
+
* Max: 400 characters.
|
|
1346
|
+
* Default: Same as `original`.
|
|
1347
|
+
*/
|
|
1348
|
+
translated?: string | null;
|
|
1349
|
+
}
|
|
1350
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
1351
|
+
interface CatalogReference$1 {
|
|
1352
|
+
/** ID of the item within the catalog it belongs to. */
|
|
1353
|
+
catalogItemId?: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* ID of the app providing the catalog.
|
|
1356
|
+
*
|
|
1357
|
+
* You can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).
|
|
1358
|
+
*
|
|
1359
|
+
* For items from Wix catalogs, the following values always apply:
|
|
1360
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
1361
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
1362
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
1363
|
+
*/
|
|
1364
|
+
appId?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* 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.
|
|
1367
|
+
*
|
|
1368
|
+
* 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).
|
|
1369
|
+
*/
|
|
1370
|
+
options?: Record<string, any> | null;
|
|
1371
|
+
}
|
|
1372
|
+
interface Price {
|
|
1373
|
+
/** Amount. */
|
|
1374
|
+
amount?: string;
|
|
1375
|
+
/**
|
|
1376
|
+
* Amount formatted with currency symbol.
|
|
1377
|
+
* @readonly
|
|
1378
|
+
*/
|
|
1379
|
+
formattedAmount?: string;
|
|
1380
|
+
}
|
|
1381
|
+
interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
1382
|
+
/** Description line plain text value. */
|
|
1383
|
+
plainText?: PlainTextValue;
|
|
1384
|
+
/** Description line color value. */
|
|
1385
|
+
colorInfo?: Color;
|
|
1386
|
+
/** Description line name. */
|
|
1387
|
+
name?: DescriptionLineName;
|
|
1388
|
+
}
|
|
1389
|
+
/** @oneof */
|
|
1390
|
+
interface DescriptionLineValueOneOf {
|
|
1391
|
+
/** Description line plain text value. */
|
|
1392
|
+
plainText?: PlainTextValue;
|
|
1393
|
+
/** Description line color value. */
|
|
1394
|
+
colorInfo?: Color;
|
|
1395
|
+
}
|
|
1396
|
+
/** @oneof */
|
|
1397
|
+
interface DescriptionLineDescriptionLineValueOneOf {
|
|
1398
|
+
}
|
|
1399
|
+
interface DescriptionLineName {
|
|
1400
|
+
/** 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). */
|
|
1401
|
+
original?: string;
|
|
1402
|
+
/**
|
|
1403
|
+
* Description line name translated into the buyer's language.
|
|
1404
|
+
*
|
|
1405
|
+
* Default: Same as `original`.
|
|
1406
|
+
*/
|
|
1407
|
+
translated?: string | null;
|
|
1408
|
+
}
|
|
1409
|
+
interface PlainTextValue {
|
|
1410
|
+
/** 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). */
|
|
1411
|
+
original?: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* Description line plain text value translated into the buyer's language.
|
|
1414
|
+
*
|
|
1415
|
+
* Default: Same as `original`.
|
|
1416
|
+
*/
|
|
1417
|
+
translated?: string | null;
|
|
1418
|
+
}
|
|
1419
|
+
interface Color {
|
|
1420
|
+
/** 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). */
|
|
1421
|
+
original?: string;
|
|
1422
|
+
/**
|
|
1423
|
+
* Description line color name translated into the buyer's language.
|
|
1424
|
+
*
|
|
1425
|
+
* Default: Same as `original`.
|
|
1426
|
+
*/
|
|
1427
|
+
translated?: string | null;
|
|
1428
|
+
/** HEX or RGB color code for display. */
|
|
1429
|
+
code?: string | null;
|
|
1430
|
+
}
|
|
1431
|
+
declare enum DescriptionLineType {
|
|
1432
|
+
UNRECOGNISED = "UNRECOGNISED",
|
|
1433
|
+
PLAIN_TEXT = "PLAIN_TEXT",
|
|
1434
|
+
COLOR = "COLOR"
|
|
1435
|
+
}
|
|
1436
|
+
interface PhysicalProperties$1 {
|
|
1437
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
1438
|
+
weight?: number | null;
|
|
1439
|
+
/** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
|
|
1440
|
+
sku?: string | null;
|
|
1441
|
+
/** Whether this line item is shippable. */
|
|
1442
|
+
shippable?: boolean;
|
|
1443
|
+
}
|
|
1444
|
+
interface ItemType$1 extends ItemTypeItemTypeDataOneOf$1 {
|
|
1445
|
+
/** Preset item type. */
|
|
1446
|
+
preset?: ItemTypeItemType$1;
|
|
1447
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
1448
|
+
custom?: string;
|
|
1449
|
+
}
|
|
1450
|
+
/** @oneof */
|
|
1451
|
+
interface ItemTypeItemTypeDataOneOf$1 {
|
|
1452
|
+
/** Preset item type. */
|
|
1453
|
+
preset?: ItemTypeItemType$1;
|
|
1454
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
1455
|
+
custom?: string;
|
|
1456
|
+
}
|
|
1457
|
+
declare enum ItemTypeItemType$1 {
|
|
1458
|
+
UNRECOGNISED = "UNRECOGNISED",
|
|
1459
|
+
PHYSICAL = "PHYSICAL",
|
|
1460
|
+
DIGITAL = "DIGITAL",
|
|
1461
|
+
GIFT_CARD = "GIFT_CARD",
|
|
1462
|
+
SERVICE = "SERVICE"
|
|
1463
|
+
}
|
|
1464
|
+
/** Type of selected payment option for catalog item */
|
|
1465
|
+
declare enum PaymentOptionType {
|
|
1466
|
+
/** The entire payment for this item happens as part of the checkout. */
|
|
1467
|
+
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
1468
|
+
/** The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. */
|
|
1469
|
+
FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
|
|
1470
|
+
/** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
|
|
1471
|
+
MEMBERSHIP = "MEMBERSHIP",
|
|
1472
|
+
/** Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`. */
|
|
1473
|
+
DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
|
|
1474
|
+
/** 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`. */
|
|
1475
|
+
MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
|
|
1476
|
+
}
|
|
1477
|
+
interface ItemTaxFullDetails$1 {
|
|
1478
|
+
/** Taxable amount of this line item. */
|
|
1479
|
+
taxableAmount?: Price;
|
|
1480
|
+
/** Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`. */
|
|
1481
|
+
taxRate?: string;
|
|
1482
|
+
/** The calculated tax, based on the `taxableAmount` and `taxRate`. */
|
|
1483
|
+
totalTax?: Price;
|
|
1484
|
+
}
|
|
1485
|
+
interface LineItemTaxInfo {
|
|
1486
|
+
/** Calculated tax, based on `taxable_amount` and `tax_rate`. */
|
|
1487
|
+
taxAmount?: Price;
|
|
1488
|
+
/** Amount for which tax is calculated. */
|
|
1489
|
+
taxableAmount?: Price;
|
|
1490
|
+
/** Tax rate %, as a decimal point. */
|
|
1491
|
+
taxRate?: string | null;
|
|
1492
|
+
/** Indicates whether the price already includes tax. */
|
|
1493
|
+
taxIncludedInPrice?: boolean;
|
|
1494
|
+
/** Tax information for a line item. */
|
|
1495
|
+
taxBreakdown?: LineItemTaxBreakdown[];
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* TaxBreakdown represents tax information for a line item.
|
|
1499
|
+
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
1500
|
+
*/
|
|
1501
|
+
interface LineItemTaxBreakdown {
|
|
1502
|
+
/** Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec". */
|
|
1503
|
+
jurisdiction?: string | null;
|
|
1504
|
+
/** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000. */
|
|
1505
|
+
rate?: string | null;
|
|
1506
|
+
/** Amount of tax calculated for this line item. */
|
|
1507
|
+
taxAmount?: Price;
|
|
1508
|
+
/** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */
|
|
1509
|
+
taxType?: string | null;
|
|
1510
|
+
/**
|
|
1511
|
+
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
1512
|
+
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
1513
|
+
*/
|
|
1514
|
+
taxName?: string | null;
|
|
1515
|
+
/** Type of jurisdiction that taxes were calculated for. */
|
|
1516
|
+
jurisdictionType?: JurisdictionType$1;
|
|
1517
|
+
/** Non-taxable amount of the line item price. */
|
|
1518
|
+
nonTaxableAmount?: Price;
|
|
1519
|
+
/** Taxable amount of the line item price. */
|
|
1520
|
+
taxableAmount?: Price;
|
|
1521
|
+
}
|
|
1522
|
+
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
1523
|
+
declare enum JurisdictionType$1 {
|
|
1524
|
+
UNDEFINED = "UNDEFINED",
|
|
1525
|
+
COUNTRY = "COUNTRY",
|
|
1526
|
+
STATE = "STATE",
|
|
1527
|
+
COUNTY = "COUNTY",
|
|
1528
|
+
CITY = "CITY",
|
|
1529
|
+
SPECIAL = "SPECIAL"
|
|
1530
|
+
}
|
|
1531
|
+
interface DigitalFile {
|
|
1532
|
+
/** ID of the secure file in media. */
|
|
1533
|
+
fileId?: string;
|
|
1534
|
+
/** Link will exist after the digital links have been generated on the order. */
|
|
1535
|
+
link?: string | null;
|
|
1536
|
+
/**
|
|
1537
|
+
* Link expiration time and date.
|
|
1538
|
+
* @readonly
|
|
1539
|
+
*/
|
|
1540
|
+
expirationDate?: Date;
|
|
1541
|
+
}
|
|
1542
|
+
interface SubscriptionInfo {
|
|
1543
|
+
/** Subscription ID. */
|
|
1544
|
+
_id?: string | null;
|
|
1545
|
+
/** Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */
|
|
1546
|
+
cycleNumber?: number;
|
|
1547
|
+
/** Subscription option title. For example, `"Monthly coffee Subscription"`. */
|
|
1548
|
+
subscriptionOptionTitle?: string;
|
|
1549
|
+
/** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */
|
|
1550
|
+
subscriptionOptionDescription?: string | null;
|
|
1551
|
+
/** Subscription detailed information. */
|
|
1552
|
+
subscriptionSettings?: SubscriptionSettings$1;
|
|
1553
|
+
}
|
|
1554
|
+
interface SubscriptionSettings$1 {
|
|
1555
|
+
/** Frequency of recurring payment. */
|
|
1556
|
+
frequency?: SubscriptionFrequency$1;
|
|
1557
|
+
/** Interval of recurring payment. */
|
|
1558
|
+
interval?: number | null;
|
|
1559
|
+
/** Whether subscription is renewed automatically at the end of each period. */
|
|
1560
|
+
autoRenewal?: boolean;
|
|
1561
|
+
/** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */
|
|
1562
|
+
billingCycles?: number | null;
|
|
1563
|
+
}
|
|
1564
|
+
/** Frequency unit of recurring payment */
|
|
1565
|
+
declare enum SubscriptionFrequency$1 {
|
|
1566
|
+
UNDEFINED = "UNDEFINED",
|
|
1567
|
+
DAY = "DAY",
|
|
1568
|
+
WEEK = "WEEK",
|
|
1569
|
+
MONTH = "MONTH",
|
|
1570
|
+
YEAR = "YEAR"
|
|
1571
|
+
}
|
|
1572
|
+
interface PriceDescription {
|
|
1573
|
+
/** __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). */
|
|
1574
|
+
original?: string;
|
|
1575
|
+
/**
|
|
1576
|
+
* Price description translated into the buyer's language.
|
|
1577
|
+
*
|
|
1578
|
+
* Default: Same as `original`.
|
|
1579
|
+
*/
|
|
1580
|
+
translated?: string | null;
|
|
1581
|
+
}
|
|
1582
|
+
interface LocationAndQuantity {
|
|
1583
|
+
/** Location id in the associated owner app. */
|
|
1584
|
+
_id?: string;
|
|
1585
|
+
/** Location owner app, if not provided then the site business info locations will be used. */
|
|
1586
|
+
appId?: string | null;
|
|
1587
|
+
/** Quantity for specific location. */
|
|
1588
|
+
quantity?: number;
|
|
1589
|
+
}
|
|
1590
|
+
/** Buyer Info */
|
|
1591
|
+
interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
1592
|
+
/** Visitor ID (if site visitor is not a member). */
|
|
1593
|
+
visitorId?: string;
|
|
1594
|
+
/** Member ID (if site visitor is a site member). */
|
|
1595
|
+
memberId?: string;
|
|
1596
|
+
/** Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). */
|
|
1597
|
+
contactId?: string | null;
|
|
1598
|
+
/** Buyer email address. */
|
|
1599
|
+
email?: string | null;
|
|
1600
|
+
}
|
|
1601
|
+
/** @oneof */
|
|
1602
|
+
interface BuyerInfoIdOneOf {
|
|
1603
|
+
/** Visitor ID (if site visitor is not a member). */
|
|
1604
|
+
visitorId?: string;
|
|
1605
|
+
/** Member ID (if site visitor is a site member). */
|
|
1606
|
+
memberId?: string;
|
|
1607
|
+
}
|
|
1608
|
+
declare enum PaymentStatus {
|
|
1609
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1610
|
+
/** Order is not paid */
|
|
1611
|
+
NOT_PAID = "NOT_PAID",
|
|
1612
|
+
/** Order is paid */
|
|
1613
|
+
PAID = "PAID",
|
|
1614
|
+
/** Order was refunded, refund amount less than order total price */
|
|
1615
|
+
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
1616
|
+
/** Full order total price was refunded */
|
|
1617
|
+
FULLY_REFUNDED = "FULLY_REFUNDED",
|
|
1618
|
+
/** Payments received but not yet confirmed by the payment provider */
|
|
1619
|
+
PENDING = "PENDING",
|
|
1620
|
+
/** At least one payment was received and approved, covering less than total price amount */
|
|
1621
|
+
PARTIALLY_PAID = "PARTIALLY_PAID"
|
|
1622
|
+
}
|
|
1623
|
+
declare enum FulfillmentStatus {
|
|
1624
|
+
/** none of the order items are fulfilled or order was manually marked as unfulfilled */
|
|
1625
|
+
NOT_FULFILLED = "NOT_FULFILLED",
|
|
1626
|
+
/**
|
|
1627
|
+
* All of the order items are fulfilled or order was manually marked as fulfilled
|
|
1628
|
+
* Orders without shipping info are fulfilled automatically
|
|
1629
|
+
*/
|
|
1630
|
+
FULFILLED = "FULFILLED",
|
|
1631
|
+
/** Some, but not all of the order items are fulfilled */
|
|
1632
|
+
PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED"
|
|
1633
|
+
}
|
|
1634
|
+
declare enum WeightUnit$1 {
|
|
1635
|
+
/** Weight unit can't be classified, due to an error */
|
|
1636
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
1637
|
+
/** Kilograms */
|
|
1638
|
+
KG = "KG",
|
|
1639
|
+
/** Pounds */
|
|
1640
|
+
LB = "LB"
|
|
1641
|
+
}
|
|
1642
|
+
interface PriceSummary$1 {
|
|
1643
|
+
/** Subtotal of all the line items, before discounts and before tax. */
|
|
1644
|
+
subtotal?: Price;
|
|
1645
|
+
/** Total shipping price, before discounts and before tax. */
|
|
1646
|
+
shipping?: Price;
|
|
1647
|
+
/** Total tax on this order. */
|
|
1648
|
+
tax?: Price;
|
|
1649
|
+
/** Total calculated discount value. */
|
|
1650
|
+
discount?: Price;
|
|
1651
|
+
/** Order’s total price after discounts and tax. */
|
|
1652
|
+
total?: Price;
|
|
1653
|
+
/** Total price of additional fees before tax. */
|
|
1654
|
+
totalAdditionalFees?: Price;
|
|
1655
|
+
}
|
|
1656
|
+
/** Billing Info and shipping details */
|
|
1657
|
+
interface AddressWithContact$1 {
|
|
1658
|
+
/** Address. */
|
|
1659
|
+
address?: Address$1;
|
|
1660
|
+
/** Contact details. */
|
|
1661
|
+
contactDetails?: FullAddressContactDetails$1;
|
|
1662
|
+
}
|
|
1663
|
+
/** Physical address */
|
|
1664
|
+
interface Address$1 {
|
|
1665
|
+
/** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
|
|
1666
|
+
country?: string | null;
|
|
1667
|
+
/** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
|
|
1668
|
+
subdivision?: string | null;
|
|
1669
|
+
/** City name. */
|
|
1670
|
+
city?: string | null;
|
|
1671
|
+
/** Postal or zip code. */
|
|
1672
|
+
postalCode?: string | null;
|
|
1673
|
+
/** Street address. */
|
|
1674
|
+
streetAddress?: StreetAddress$1;
|
|
1675
|
+
/** Main address line (usually street name and number). */
|
|
1676
|
+
addressLine1?: string | null;
|
|
1677
|
+
/** Free text providing more detailed address info. Usually contains apt, suite, floor. */
|
|
1678
|
+
addressLine2?: string | null;
|
|
1679
|
+
}
|
|
1680
|
+
interface StreetAddress$1 {
|
|
1681
|
+
/** Street number. */
|
|
1682
|
+
number?: string;
|
|
1683
|
+
/** Street name. */
|
|
1684
|
+
name?: string;
|
|
1685
|
+
}
|
|
1686
|
+
interface AddressLocation$1 {
|
|
1687
|
+
/** Address latitude. */
|
|
1688
|
+
latitude?: number | null;
|
|
1689
|
+
/** Address longitude. */
|
|
1690
|
+
longitude?: number | null;
|
|
1691
|
+
}
|
|
1692
|
+
/** Full contact details for an address */
|
|
1693
|
+
interface FullAddressContactDetails$1 {
|
|
1694
|
+
/** First name. */
|
|
1695
|
+
firstName?: string | null;
|
|
1696
|
+
/** Last name. */
|
|
1697
|
+
lastName?: string | null;
|
|
1698
|
+
/** Phone number. */
|
|
1699
|
+
phone?: string | null;
|
|
1700
|
+
/** Company name. */
|
|
1701
|
+
company?: string | null;
|
|
1702
|
+
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
1703
|
+
vatId?: VatId$1;
|
|
1704
|
+
}
|
|
1705
|
+
interface VatId$1 {
|
|
1706
|
+
/** Customer's tax ID. */
|
|
1707
|
+
_id?: string;
|
|
1708
|
+
/**
|
|
1709
|
+
* Tax type.
|
|
1710
|
+
*
|
|
1711
|
+
* Supported values:
|
|
1712
|
+
* + `CPF`: for individual tax payers
|
|
1713
|
+
* + `CNPJ`: for corporations
|
|
1714
|
+
*/
|
|
1715
|
+
type?: VatType$1;
|
|
1716
|
+
}
|
|
1717
|
+
/** tax info types */
|
|
1718
|
+
declare enum VatType$1 {
|
|
1719
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1720
|
+
/** CPF - for individual tax payers. */
|
|
1721
|
+
CPF = "CPF",
|
|
1722
|
+
/** CNPJ - for corporations */
|
|
1723
|
+
CNPJ = "CNPJ"
|
|
1724
|
+
}
|
|
1725
|
+
interface ShippingInformation {
|
|
1726
|
+
/** App Def Id of external provider which was a source of shipping info */
|
|
1727
|
+
carrierId?: string | null;
|
|
1728
|
+
/** Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"``. */
|
|
1729
|
+
code?: string | null;
|
|
1730
|
+
/**
|
|
1731
|
+
* Shipping option title.
|
|
1732
|
+
* For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
|
|
1733
|
+
*/
|
|
1734
|
+
title?: string;
|
|
1735
|
+
/** Shipping logistics. */
|
|
1736
|
+
logistics?: DeliveryLogistics;
|
|
1737
|
+
/** Shipping costs. */
|
|
1738
|
+
cost?: ShippingPrice;
|
|
1739
|
+
/** Shipping region. */
|
|
1740
|
+
region?: ShippingRegion;
|
|
1741
|
+
}
|
|
1742
|
+
interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf {
|
|
1743
|
+
/** Shipping address and contact details. */
|
|
1744
|
+
shippingDestination?: AddressWithContact$1;
|
|
1745
|
+
/** Pickup details. */
|
|
1746
|
+
pickupDetails?: PickupDetails;
|
|
1747
|
+
/** Expected delivery time in free text. For example, `"3-5 business days"`. */
|
|
1748
|
+
deliveryTime?: string | null;
|
|
1749
|
+
/** Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */
|
|
1750
|
+
instructions?: string | null;
|
|
1751
|
+
/**
|
|
1752
|
+
* Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
1753
|
+
* @deprecated
|
|
1754
|
+
*/
|
|
1755
|
+
deliverByDate?: Date;
|
|
1756
|
+
/** Expected delivery time. */
|
|
1757
|
+
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1758
|
+
}
|
|
1759
|
+
/** @oneof */
|
|
1760
|
+
interface DeliveryLogisticsAddressOneOf {
|
|
1761
|
+
/** Shipping address and contact details. */
|
|
1762
|
+
shippingDestination?: AddressWithContact$1;
|
|
1763
|
+
/** Pickup details. */
|
|
1764
|
+
pickupDetails?: PickupDetails;
|
|
1765
|
+
}
|
|
1766
|
+
interface PickupDetails {
|
|
1767
|
+
/** Pickup address. */
|
|
1768
|
+
address?: PickupAddress;
|
|
1769
|
+
/** Pickup method */
|
|
1770
|
+
pickupMethod?: PickupMethod;
|
|
1771
|
+
}
|
|
1772
|
+
/** Physical address */
|
|
1773
|
+
interface PickupAddress {
|
|
1774
|
+
/** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
|
|
1775
|
+
country?: string | null;
|
|
1776
|
+
/** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
|
|
1777
|
+
subdivision?: string | null;
|
|
1778
|
+
/** City name. */
|
|
1779
|
+
city?: string | null;
|
|
1780
|
+
/** Postal or zip code. */
|
|
1781
|
+
postalCode?: string | null;
|
|
1782
|
+
/** Street address object, with number, name, and apartment number in separate fields. */
|
|
1783
|
+
streetAddress?: StreetAddress$1;
|
|
1784
|
+
/** Main address line (usually street name and number). */
|
|
1785
|
+
addressLine1?: string | null;
|
|
1786
|
+
/** Free text providing more detailed address info. Usually contains apt, suite, floor. */
|
|
1787
|
+
addressLine2?: string | null;
|
|
1788
|
+
}
|
|
1789
|
+
declare enum PickupMethod {
|
|
1790
|
+
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1791
|
+
STORE_PICKUP = "STORE_PICKUP",
|
|
1792
|
+
PICKUP_POINT = "PICKUP_POINT"
|
|
1793
|
+
}
|
|
1794
|
+
interface DeliveryTimeSlot {
|
|
1795
|
+
/** Delivery slot starting time. */
|
|
1796
|
+
from?: Date;
|
|
1797
|
+
/** Delivery slot ending time. */
|
|
1798
|
+
to?: Date;
|
|
1799
|
+
}
|
|
1800
|
+
interface ShippingPrice {
|
|
1801
|
+
/** Shipping price for display purposes. */
|
|
1802
|
+
price?: Price;
|
|
1803
|
+
/**
|
|
1804
|
+
* Total price of shipping after discounts (when relevant), and before tax.
|
|
1805
|
+
* @readonly
|
|
1806
|
+
*/
|
|
1807
|
+
totalPriceBeforeTax?: Price;
|
|
1808
|
+
/**
|
|
1809
|
+
* Shipping price after all discounts (if any exist), and after tax.
|
|
1810
|
+
* @readonly
|
|
1811
|
+
*/
|
|
1812
|
+
totalPriceAfterTax?: Price;
|
|
1813
|
+
/** Tax details. */
|
|
1814
|
+
taxDetails?: ItemTaxFullDetails$1;
|
|
1815
|
+
/**
|
|
1816
|
+
* Shipping discount before tax.
|
|
1817
|
+
* @readonly
|
|
1818
|
+
*/
|
|
1819
|
+
discount?: Price;
|
|
1820
|
+
}
|
|
1821
|
+
interface ShippingRegion {
|
|
1822
|
+
/** Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */
|
|
1823
|
+
name?: string | null;
|
|
1824
|
+
}
|
|
1825
|
+
declare enum OrderStatus {
|
|
1826
|
+
INITIALIZED = "INITIALIZED",
|
|
1827
|
+
APPROVED = "APPROVED",
|
|
1828
|
+
CANCELED = "CANCELED"
|
|
1829
|
+
}
|
|
1830
|
+
interface TaxSummary {
|
|
1831
|
+
/**
|
|
1832
|
+
* Total tax.
|
|
1833
|
+
* @readonly
|
|
1834
|
+
*/
|
|
1835
|
+
totalTax?: Price;
|
|
1836
|
+
}
|
|
1837
|
+
interface OrderTaxInfo {
|
|
1838
|
+
/** Calculated tax, added from line items. */
|
|
1839
|
+
totalTax?: Price;
|
|
1840
|
+
/** 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. */
|
|
1841
|
+
taxBreakdown?: OrderTaxBreakdown[];
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* 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.
|
|
1845
|
+
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
1846
|
+
*/
|
|
1847
|
+
interface OrderTaxBreakdown {
|
|
1848
|
+
/** The name of the tax against which this tax amount was calculated. */
|
|
1849
|
+
taxName?: string;
|
|
1850
|
+
/** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */
|
|
1851
|
+
taxType?: string;
|
|
1852
|
+
/** The name of the jurisdiction in which this tax detail applies. */
|
|
1853
|
+
jurisdiction?: string;
|
|
1854
|
+
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
1855
|
+
jurisdictionType?: JurisdictionType$1;
|
|
1856
|
+
/** The rate at which this tax detail was calculated. */
|
|
1857
|
+
rate?: string;
|
|
1858
|
+
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
1859
|
+
aggregatedTaxAmount?: Price;
|
|
1860
|
+
}
|
|
1861
|
+
interface AppliedDiscount$1 extends AppliedDiscountDiscountSourceOneOf$1 {
|
|
1862
|
+
/** Applied coupon info. */
|
|
1863
|
+
coupon?: Coupon$1;
|
|
1864
|
+
/** Merchant discount. */
|
|
1865
|
+
merchantDiscount?: MerchantDiscount$1;
|
|
1866
|
+
/** Automatic Discount */
|
|
1867
|
+
discountRule?: DiscountRule$1;
|
|
1868
|
+
/**
|
|
1869
|
+
* Discount type.
|
|
1870
|
+
* * `"GLOBAL"` - discount applies to entire order.
|
|
1871
|
+
* * `"SPECIFIC-ITEMS"` - discount applies to specific items.
|
|
1872
|
+
* * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
|
|
1873
|
+
*/
|
|
1874
|
+
discountType?: DiscountType$1;
|
|
1875
|
+
/**
|
|
1876
|
+
* IDs of line items discount applies to.
|
|
1877
|
+
* Deprecated. Use `line_item_discounts` instead.
|
|
1878
|
+
* @deprecated IDs of line items discount applies to.
|
|
1879
|
+
* Deprecated. Use `line_item_discounts` instead.
|
|
1880
|
+
* @replacedBy line_item_discounts
|
|
1881
|
+
* @removalDate 2024-10-30
|
|
1882
|
+
*/
|
|
1883
|
+
lineItemIds?: string[];
|
|
1884
|
+
/** Discount id. */
|
|
1885
|
+
_id?: string | null;
|
|
1886
|
+
}
|
|
1887
|
+
/** @oneof */
|
|
1888
|
+
interface AppliedDiscountDiscountSourceOneOf$1 {
|
|
1889
|
+
/** Applied coupon info. */
|
|
1890
|
+
coupon?: Coupon$1;
|
|
1891
|
+
/** Merchant discount. */
|
|
1892
|
+
merchantDiscount?: MerchantDiscount$1;
|
|
1893
|
+
/** Automatic Discount */
|
|
1894
|
+
discountRule?: DiscountRule$1;
|
|
1895
|
+
}
|
|
1896
|
+
declare enum DiscountType$1 {
|
|
1897
|
+
GLOBAL = "GLOBAL",
|
|
1898
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
1899
|
+
SHIPPING = "SHIPPING"
|
|
1900
|
+
}
|
|
1901
|
+
/** Coupon */
|
|
1902
|
+
interface Coupon$1 {
|
|
1903
|
+
/** Coupon ID. */
|
|
1904
|
+
_id?: string;
|
|
1905
|
+
/** Coupon code. */
|
|
1906
|
+
code?: string;
|
|
1907
|
+
/** Coupon name. */
|
|
1908
|
+
name?: string;
|
|
1909
|
+
/** Coupon value. */
|
|
1910
|
+
amount?: Price;
|
|
1911
|
+
}
|
|
1912
|
+
interface MerchantDiscount$1 extends MerchantDiscountMerchantDiscountReasonOneOf {
|
|
1913
|
+
/**
|
|
1914
|
+
* Pre-defined discount reason (optional).
|
|
1915
|
+
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
1916
|
+
*/
|
|
1917
|
+
discountReason?: DiscountReason;
|
|
1918
|
+
/** Discount description as free text (optional). */
|
|
1919
|
+
description?: string | null;
|
|
1920
|
+
/** Discount amount. */
|
|
1921
|
+
amount?: Price;
|
|
1922
|
+
}
|
|
1923
|
+
/** @oneof */
|
|
1924
|
+
interface MerchantDiscountMerchantDiscountReasonOneOf {
|
|
1925
|
+
/**
|
|
1926
|
+
* Pre-defined discount reason (optional).
|
|
1927
|
+
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
1928
|
+
*/
|
|
1929
|
+
discountReason?: DiscountReason;
|
|
1930
|
+
/** Discount description as free text (optional). */
|
|
1931
|
+
description?: string | null;
|
|
1932
|
+
}
|
|
1933
|
+
declare enum DiscountReason {
|
|
1934
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1935
|
+
EXCHANGED_ITEMS = "EXCHANGED_ITEMS"
|
|
1936
|
+
}
|
|
1937
|
+
interface DiscountRule$1 {
|
|
1938
|
+
/** Discount rule ID */
|
|
1939
|
+
_id?: string;
|
|
1940
|
+
/** Discount rule name */
|
|
1941
|
+
name?: DiscountRuleName$1;
|
|
1942
|
+
/** Discount value. */
|
|
1943
|
+
amount?: Price;
|
|
1944
|
+
}
|
|
1945
|
+
interface DiscountRuleName$1 {
|
|
1946
|
+
/** Original discount rule name (in site's default language). */
|
|
1947
|
+
original?: string;
|
|
1948
|
+
/** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
|
|
1949
|
+
translated?: string | null;
|
|
1950
|
+
}
|
|
1951
|
+
interface LineItemDiscount {
|
|
1952
|
+
/** ID of line item the discount applies to. */
|
|
1953
|
+
_id?: string;
|
|
1954
|
+
/** Total discount for this line item. */
|
|
1955
|
+
totalDiscount?: Price;
|
|
1956
|
+
}
|
|
1957
|
+
interface Activity extends ActivityContentOneOf {
|
|
1958
|
+
/** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */
|
|
1959
|
+
customActivity?: CustomActivity;
|
|
1960
|
+
/** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */
|
|
1961
|
+
merchantComment?: MerchantComment;
|
|
1962
|
+
/** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */
|
|
1963
|
+
orderRefunded?: OrderRefunded;
|
|
1964
|
+
/**
|
|
1965
|
+
* Activity ID.
|
|
1966
|
+
* @readonly
|
|
1967
|
+
*/
|
|
1968
|
+
_id?: string | null;
|
|
1969
|
+
/**
|
|
1970
|
+
* Activity author's email.
|
|
1971
|
+
* @readonly
|
|
1972
|
+
*/
|
|
1973
|
+
authorEmail?: string | null;
|
|
1974
|
+
/**
|
|
1975
|
+
* Activity creation date and time.
|
|
1976
|
+
* @readonly
|
|
1977
|
+
*/
|
|
1978
|
+
_createdDate?: Date;
|
|
1979
|
+
/** Activity type. */
|
|
1980
|
+
type?: ActivityType;
|
|
1981
|
+
}
|
|
1982
|
+
/** @oneof */
|
|
1983
|
+
interface ActivityContentOneOf {
|
|
1984
|
+
/** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */
|
|
1985
|
+
customActivity?: CustomActivity;
|
|
1986
|
+
/** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */
|
|
1987
|
+
merchantComment?: MerchantComment;
|
|
1988
|
+
/** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */
|
|
1989
|
+
orderRefunded?: OrderRefunded;
|
|
1990
|
+
}
|
|
1991
|
+
interface CustomActivity {
|
|
1992
|
+
/** ID of the app that created the custom activity. */
|
|
1993
|
+
appId?: string;
|
|
1994
|
+
/** Custom activity type. For example, `"Ticket number set"`. */
|
|
1995
|
+
type?: string;
|
|
1996
|
+
/** Additional data in key-value form. For example, `{ "Ticket number": "123456" }`. */
|
|
1997
|
+
additionalData?: Record<string, string>;
|
|
1998
|
+
}
|
|
1999
|
+
/** Store owner added a comment */
|
|
2000
|
+
interface MerchantComment {
|
|
2001
|
+
/** Merchant comment message. */
|
|
2002
|
+
message?: string;
|
|
2003
|
+
}
|
|
2004
|
+
interface OrderRefunded {
|
|
2005
|
+
/** Whether order was refunded manually. For example, via payment provider or using cash. */
|
|
2006
|
+
manual?: boolean;
|
|
2007
|
+
/** Refund amount. */
|
|
2008
|
+
amount?: Price;
|
|
2009
|
+
/** Reason for refund. */
|
|
2010
|
+
reason?: string;
|
|
2011
|
+
}
|
|
2012
|
+
interface OrderCreatedFromExchange {
|
|
2013
|
+
/** ID of the original order for which the exchange happened. */
|
|
2014
|
+
originalOrderId?: string;
|
|
2015
|
+
}
|
|
2016
|
+
interface NewExchangeOrderCreated {
|
|
2017
|
+
/** ID of the new order created as a result of an exchange of items. */
|
|
2018
|
+
exchangeOrderId?: string;
|
|
2019
|
+
/** IDs of the items that were exchanged. */
|
|
2020
|
+
lineItems?: LineItemExchangeData[];
|
|
2021
|
+
}
|
|
2022
|
+
interface LineItemExchangeData {
|
|
2023
|
+
/** ID of the exchanged line item. */
|
|
2024
|
+
lineItemId?: string;
|
|
2025
|
+
/** Line item quantity being exchanged. */
|
|
2026
|
+
quantity?: number;
|
|
2027
|
+
}
|
|
2028
|
+
interface DraftOrderChangesApplied {
|
|
2029
|
+
/** Draft order id. */
|
|
2030
|
+
draftOrderId?: string;
|
|
2031
|
+
/** Reason for edit, given by user (optional). */
|
|
2032
|
+
reason?: string | null;
|
|
2033
|
+
/** Changes applied to order. */
|
|
2034
|
+
changes?: OrderChange[];
|
|
2035
|
+
}
|
|
2036
|
+
interface OrderChange extends OrderChangeValueOneOf {
|
|
2037
|
+
lineItemChanged?: LineItemChanges;
|
|
2038
|
+
lineItemAdded?: ManagedLineItem;
|
|
2039
|
+
lineItemRemoved?: ManagedLineItem;
|
|
2040
|
+
discountAdded?: ManagedDiscount;
|
|
2041
|
+
discountRemoved?: ManagedDiscount;
|
|
2042
|
+
additionalFeeAdded?: ManagedAdditionalFee;
|
|
2043
|
+
additionalFeeRemoved?: ManagedAdditionalFee;
|
|
2044
|
+
totalPriceChanged?: TotalPriceChange;
|
|
2045
|
+
}
|
|
2046
|
+
/** @oneof */
|
|
2047
|
+
interface OrderChangeValueOneOf {
|
|
2048
|
+
lineItemChanged?: LineItemChanges;
|
|
2049
|
+
lineItemAdded?: ManagedLineItem;
|
|
2050
|
+
lineItemRemoved?: ManagedLineItem;
|
|
2051
|
+
discountAdded?: ManagedDiscount;
|
|
2052
|
+
discountRemoved?: ManagedDiscount;
|
|
2053
|
+
additionalFeeAdded?: ManagedAdditionalFee;
|
|
2054
|
+
additionalFeeRemoved?: ManagedAdditionalFee;
|
|
2055
|
+
totalPriceChanged?: TotalPriceChange;
|
|
2056
|
+
}
|
|
2057
|
+
interface LineItemChanges {
|
|
2058
|
+
/** Line item ID. */
|
|
2059
|
+
_id?: string;
|
|
2060
|
+
/** Item name. */
|
|
2061
|
+
name?: ProductName$1;
|
|
2062
|
+
/** Item quantity change. */
|
|
2063
|
+
quantity?: LineItemQuantityChange;
|
|
2064
|
+
/** Item price change. */
|
|
2065
|
+
price?: LineItemPriceChange;
|
|
2066
|
+
}
|
|
2067
|
+
interface LineItemQuantityChange {
|
|
2068
|
+
/** Item quantity before update. */
|
|
2069
|
+
originalQuantity?: number;
|
|
2070
|
+
/** Item quantity after update. */
|
|
2071
|
+
newQuantity?: number;
|
|
2072
|
+
/** Difference between original and new quantity. Absolute value. */
|
|
2073
|
+
diff?: number;
|
|
2074
|
+
/** Type of quantity change: increase or decrease. */
|
|
2075
|
+
deltaType?: LineItemQuantityChangeType;
|
|
2076
|
+
}
|
|
2077
|
+
declare enum LineItemQuantityChangeType {
|
|
2078
|
+
QUANTITY_INCREASED = "QUANTITY_INCREASED",
|
|
2079
|
+
QUANTITY_DECREASED = "QUANTITY_DECREASED"
|
|
2080
|
+
}
|
|
2081
|
+
interface LineItemPriceChange {
|
|
2082
|
+
/** Item price before update. */
|
|
2083
|
+
originalPrice?: Price;
|
|
2084
|
+
/** Item price after update. */
|
|
2085
|
+
newPrice?: Price;
|
|
2086
|
+
}
|
|
2087
|
+
interface ManagedLineItem {
|
|
2088
|
+
/** Line item ID. */
|
|
2089
|
+
_id?: string;
|
|
2090
|
+
/** Item name. */
|
|
2091
|
+
name?: ProductName$1;
|
|
2092
|
+
/** Added or removed item quantity. */
|
|
2093
|
+
quantity?: number;
|
|
2094
|
+
}
|
|
2095
|
+
interface ManagedDiscount {
|
|
2096
|
+
/** Discount id. */
|
|
2097
|
+
_id?: string;
|
|
2098
|
+
/** Discount name: coupon name / discount rule name / merchant discount description. */
|
|
2099
|
+
name?: TranslatedValue;
|
|
2100
|
+
/** Line items discount applies to. */
|
|
2101
|
+
affectedLineItems?: LineItemAmount[];
|
|
2102
|
+
/** Discount amount. */
|
|
2103
|
+
totalAmount?: Price;
|
|
2104
|
+
}
|
|
2105
|
+
interface TranslatedValue {
|
|
2106
|
+
/** Value in site default language. */
|
|
2107
|
+
original?: string;
|
|
2108
|
+
/** Translated value. */
|
|
2109
|
+
translated?: string | null;
|
|
2110
|
+
}
|
|
2111
|
+
interface LineItemAmount {
|
|
2112
|
+
/** Order line item id */
|
|
2113
|
+
_id?: string;
|
|
2114
|
+
/** Item name. */
|
|
2115
|
+
name?: ProductName$1;
|
|
2116
|
+
/** Amount associated with this item. (Discount amount for item / additional fee amount for item) */
|
|
2117
|
+
amount?: Price;
|
|
2118
|
+
}
|
|
2119
|
+
interface ManagedAdditionalFee {
|
|
2120
|
+
/** Additional fee id. */
|
|
2121
|
+
_id?: string;
|
|
2122
|
+
/** Additional fee name. */
|
|
2123
|
+
name?: TranslatedValue;
|
|
2124
|
+
/** Line items additional fee applies to. */
|
|
2125
|
+
affectedLineItems?: LineItemAmount[];
|
|
2126
|
+
/** Additional fee amount. */
|
|
2127
|
+
totalAmount?: Price;
|
|
2128
|
+
}
|
|
2129
|
+
interface TotalPriceChange {
|
|
2130
|
+
/** Order’s total price after discounts and tax. Before update */
|
|
2131
|
+
originalTotal?: Price;
|
|
2132
|
+
/** Order’s total price after discounts and tax. After update */
|
|
2133
|
+
newTotal?: Price;
|
|
2134
|
+
}
|
|
2135
|
+
/** Payment method is saved for order */
|
|
2136
|
+
interface SavedPaymentMethod {
|
|
2137
|
+
/** Payment method name */
|
|
2138
|
+
name?: string;
|
|
2139
|
+
/** Payment method description */
|
|
2140
|
+
description?: string | null;
|
|
2141
|
+
}
|
|
2142
|
+
declare enum ActivityType {
|
|
2143
|
+
ORDER_REFUNDED = "ORDER_REFUNDED",
|
|
2144
|
+
ORDER_PLACED = "ORDER_PLACED",
|
|
2145
|
+
ORDER_PAID = "ORDER_PAID",
|
|
2146
|
+
ORDER_FULFILLED = "ORDER_FULFILLED",
|
|
2147
|
+
ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED",
|
|
2148
|
+
ORDER_CANCELED = "ORDER_CANCELED",
|
|
2149
|
+
DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT",
|
|
2150
|
+
TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED",
|
|
2151
|
+
TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED",
|
|
2152
|
+
TRACKING_LINK_ADDED = "TRACKING_LINK_ADDED",
|
|
2153
|
+
SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT",
|
|
2154
|
+
INVOICE_ADDED = "INVOICE_ADDED",
|
|
2155
|
+
INVOICE_REMOVED = "INVOICE_REMOVED",
|
|
2156
|
+
INVOICE_SENT = "INVOICE_SENT",
|
|
2157
|
+
FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT",
|
|
2158
|
+
SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED",
|
|
2159
|
+
EMAIL_EDITED = "EMAIL_EDITED",
|
|
2160
|
+
PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT",
|
|
2161
|
+
CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY",
|
|
2162
|
+
MERCHANT_COMMENT = "MERCHANT_COMMENT",
|
|
2163
|
+
ORDER_CREATED_FROM_EXCHANGE = "ORDER_CREATED_FROM_EXCHANGE",
|
|
2164
|
+
NEW_EXCHANGE_ORDER_CREATED = "NEW_EXCHANGE_ORDER_CREATED",
|
|
2165
|
+
ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID",
|
|
2166
|
+
DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED",
|
|
2167
|
+
SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD"
|
|
2168
|
+
}
|
|
2169
|
+
declare enum AttributionSource {
|
|
2170
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
2171
|
+
FACEBOOK_ADS = "FACEBOOK_ADS"
|
|
2172
|
+
}
|
|
2173
|
+
interface CreatedBy extends CreatedByStringOneOf {
|
|
2174
|
+
/**
|
|
2175
|
+
* User ID - when the order was created by a Wix user on behalf of a buyer.
|
|
2176
|
+
* For example, via POS (point of service).
|
|
2177
|
+
*/
|
|
2178
|
+
userId?: string;
|
|
2179
|
+
/** Member ID - when the order was created by a **logged in** site visitor. */
|
|
2180
|
+
memberId?: string;
|
|
2181
|
+
/** Visitor ID - when the order was created by a site visitor that was **not** logged in. */
|
|
2182
|
+
visitorId?: string;
|
|
2183
|
+
/** App ID - when the order was created by an external application. */
|
|
2184
|
+
appId?: string;
|
|
2185
|
+
}
|
|
2186
|
+
/** @oneof */
|
|
2187
|
+
interface CreatedByStringOneOf {
|
|
2188
|
+
/**
|
|
2189
|
+
* User ID - when the order was created by a Wix user on behalf of a buyer.
|
|
2190
|
+
* For example, via POS (point of service).
|
|
2191
|
+
*/
|
|
2192
|
+
userId?: string;
|
|
2193
|
+
/** Member ID - when the order was created by a **logged in** site visitor. */
|
|
2194
|
+
memberId?: string;
|
|
2195
|
+
/** Visitor ID - when the order was created by a site visitor that was **not** logged in. */
|
|
2196
|
+
visitorId?: string;
|
|
2197
|
+
/** App ID - when the order was created by an external application. */
|
|
2198
|
+
appId?: string;
|
|
2199
|
+
}
|
|
2200
|
+
interface ChannelInfo {
|
|
2201
|
+
/** Sales channel that submitted the order. */
|
|
2202
|
+
type?: ChannelType;
|
|
2203
|
+
/** Reference to an order ID from an external system. */
|
|
2204
|
+
externalOrderId?: string | null;
|
|
2205
|
+
/** URL to the order in the external system. */
|
|
2206
|
+
externalOrderUrl?: string | null;
|
|
2207
|
+
}
|
|
2208
|
+
declare enum ChannelType {
|
|
2209
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
2210
|
+
WEB = "WEB",
|
|
2211
|
+
POS = "POS",
|
|
2212
|
+
EBAY = "EBAY",
|
|
2213
|
+
AMAZON = "AMAZON",
|
|
2214
|
+
OTHER_PLATFORM = "OTHER_PLATFORM",
|
|
2215
|
+
WIX_APP_STORE = "WIX_APP_STORE",
|
|
2216
|
+
WIX_INVOICES = "WIX_INVOICES",
|
|
2217
|
+
BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
|
|
2218
|
+
WISH = "WISH",
|
|
2219
|
+
CLASS_PASS = "CLASS_PASS",
|
|
2220
|
+
GLOBAL_E = "GLOBAL_E",
|
|
2221
|
+
FACEBOOK = "FACEBOOK",
|
|
2222
|
+
ETSY = "ETSY",
|
|
2223
|
+
TIKTOK = "TIKTOK",
|
|
2224
|
+
FAIRE_COM = "FAIRE_COM"
|
|
2225
|
+
}
|
|
2226
|
+
interface CustomField$1 {
|
|
2227
|
+
/** Custom field value. */
|
|
2228
|
+
value?: any;
|
|
2229
|
+
/** Custom field title. */
|
|
2230
|
+
title?: string;
|
|
2231
|
+
/** Translated custom field title. */
|
|
2232
|
+
translatedTitle?: string | null;
|
|
2233
|
+
}
|
|
2234
|
+
interface BalanceSummary {
|
|
2235
|
+
/**
|
|
2236
|
+
* Current amount left to pay.
|
|
2237
|
+
* @readonly
|
|
2238
|
+
*/
|
|
2239
|
+
balance?: Balance;
|
|
2240
|
+
/**
|
|
2241
|
+
* Sum of all approved and successful payments.
|
|
2242
|
+
*
|
|
2243
|
+
* The value includes payments that have subsequently been fully or partially refunded.
|
|
2244
|
+
* @readonly
|
|
2245
|
+
*/
|
|
2246
|
+
paid?: Price;
|
|
2247
|
+
/**
|
|
2248
|
+
* Sum of all successfully refunded payments.
|
|
2249
|
+
* @readonly
|
|
2250
|
+
*/
|
|
2251
|
+
refunded?: Price;
|
|
2252
|
+
}
|
|
2253
|
+
/**
|
|
2254
|
+
* Order balance. Reflects amount left to be paid on order and is calculated dynamically. Can be negative per balance definition.
|
|
2255
|
+
* `amount` field depends on order payment status:
|
|
2256
|
+
* + UNSPECIFIED, NOT_PAID: price_summary.total_price
|
|
2257
|
+
* + PARTIALLY_PAID : price_summary.total_price - pay_now.total_price
|
|
2258
|
+
* + PENDING, REFUNDED, PARTIALLY_REFUNDED, PAID : 0
|
|
2259
|
+
*/
|
|
2260
|
+
interface Balance {
|
|
2261
|
+
/**
|
|
2262
|
+
* Balance amount.
|
|
2263
|
+
*
|
|
2264
|
+
* A negative `amount` represents the amount to be refunded. This can happen due to overcharging or the order being modified after a payment has been made.
|
|
2265
|
+
* @readonly
|
|
2266
|
+
*/
|
|
2267
|
+
amount?: string;
|
|
2268
|
+
/**
|
|
2269
|
+
* Amount formatted with currency symbol.
|
|
2270
|
+
* @readonly
|
|
2271
|
+
*/
|
|
2272
|
+
formattedAmount?: string;
|
|
2273
|
+
}
|
|
2274
|
+
interface AdditionalFee {
|
|
2275
|
+
/** Additional fee's unique code for future processing. */
|
|
2276
|
+
code?: string | null;
|
|
2277
|
+
/** Name of additional fee. */
|
|
2278
|
+
name?: string;
|
|
2279
|
+
/** Additional fee's price. */
|
|
2280
|
+
price?: Price;
|
|
2281
|
+
/** Tax details. */
|
|
2282
|
+
taxDetails?: ItemTaxFullDetails$1;
|
|
2283
|
+
/** SPI implementer's `appId`. */
|
|
2284
|
+
providerAppId?: string | null;
|
|
2285
|
+
/** Additional fee's price before tax. */
|
|
2286
|
+
priceBeforeTax?: Price;
|
|
2287
|
+
/** Additional fee's id. */
|
|
2288
|
+
_id?: string;
|
|
2289
|
+
/**
|
|
2290
|
+
* Optional - Line items associated with this additional fee.
|
|
2291
|
+
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
2292
|
+
*/
|
|
2293
|
+
lineItemIds?: string[];
|
|
2294
|
+
}
|
|
2295
|
+
interface FulfillmentStatusesAggregate {
|
|
2296
|
+
/** Unique string values based on Fulfillment entities statuses */
|
|
2297
|
+
statuses?: string[] | null;
|
|
2298
|
+
}
|
|
2299
|
+
interface ExtendedFields {
|
|
2300
|
+
/**
|
|
2301
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
2302
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
2303
|
+
*
|
|
2304
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
2305
|
+
*
|
|
2306
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
2307
|
+
*/
|
|
2308
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
2309
|
+
}
|
|
2310
|
+
/**
|
|
2311
|
+
* Common object for tags.
|
|
2312
|
+
* Should be use as in this example:
|
|
2313
|
+
* message Foo {
|
|
2314
|
+
* string id = 1;
|
|
2315
|
+
* ...
|
|
2316
|
+
* Tags tags = 5
|
|
2317
|
+
* }
|
|
2318
|
+
*
|
|
2319
|
+
* example of taggable entity
|
|
2320
|
+
* {
|
|
2321
|
+
* id: "123"
|
|
2322
|
+
* tags: {
|
|
2323
|
+
* tags: {
|
|
2324
|
+
* tag_ids:["11","22"]
|
|
2325
|
+
* },
|
|
2326
|
+
* private_tags: {
|
|
2327
|
+
* tag_ids: ["33", "44"]
|
|
2328
|
+
* }
|
|
2329
|
+
* }
|
|
2330
|
+
* }
|
|
2331
|
+
*/
|
|
2332
|
+
interface Tags {
|
|
2333
|
+
/** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
|
|
2334
|
+
privateTags?: TagList;
|
|
2335
|
+
/** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
|
|
2336
|
+
tags?: TagList;
|
|
2337
|
+
}
|
|
2338
|
+
interface TagList {
|
|
2339
|
+
/** List of tag IDs */
|
|
2340
|
+
tagIds?: string[];
|
|
2341
|
+
}
|
|
2342
|
+
interface GetPaymentSettingsResponse {
|
|
2343
|
+
/** Retrieved payment settings. */
|
|
2344
|
+
paymentSettings?: PaymentSettings;
|
|
2345
|
+
}
|
|
2346
|
+
interface PaymentSettings {
|
|
2347
|
+
/**
|
|
2348
|
+
* Whether to apply [3D Secure](https://support.wix.com/en/article/about-3d-secure-3ds-payments-with-third-party-payment-providers) during the payment process.
|
|
2349
|
+
*
|
|
2350
|
+
* > __Note:__
|
|
2351
|
+
* > + Not all payment providers offer this feature in their Wix integration.
|
|
2352
|
+
* > + If the service plugin call fails, the value set in the [extension configuration](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/payment-settings-integration-spi/introduction#configuration) for `fallbackValueForRequires3dSecure` will be used.
|
|
2353
|
+
*/
|
|
2354
|
+
requires3dSecure?: boolean | null;
|
|
2355
|
+
}
|
|
2356
|
+
interface PaymentSettingsSPIConfig {
|
|
2357
|
+
/**
|
|
2358
|
+
* *Required.** Base URI where the endpoints are called. Wix eCommerce appends the endpoint path to the base URI.
|
|
2359
|
+
* For example, to call the Get Payment Settings endpoint at `https://my-payment-settings.com/v1/payment-settings`,
|
|
2360
|
+
* the base URI you provide here is `https://my-payment-settings.com/`.
|
|
2361
|
+
*/
|
|
2362
|
+
deploymentUri?: string;
|
|
2363
|
+
/**
|
|
2364
|
+
* The value to set for `paymentSettings.requires3dSecure` if the service plugin call fails.
|
|
2365
|
+
*
|
|
2366
|
+
* Default: `false`
|
|
2367
|
+
*/
|
|
2368
|
+
fallbackValueForRequires3dSecure?: boolean;
|
|
2369
|
+
}
|
|
2370
|
+
/**
|
|
2371
|
+
* this message is not directly used by any service,
|
|
2372
|
+
* it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
|
|
2373
|
+
* e.g. SPIs, event-handlers, etc..
|
|
2374
|
+
* NOTE: this context object MUST be provided as the last argument in each Velo method signature.
|
|
2375
|
+
*
|
|
2376
|
+
* Example:
|
|
2377
|
+
* ```typescript
|
|
2378
|
+
* export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
|
|
2379
|
+
* ...
|
|
2380
|
+
* }
|
|
2381
|
+
* ```
|
|
2382
|
+
*/
|
|
2383
|
+
interface Context$1 {
|
|
2384
|
+
/** A unique identifier for each request. Can be used for logging / troubleshooting */
|
|
2385
|
+
requestId?: string | null;
|
|
2386
|
+
/** 3 capital letters string representing a currency according to ISO-4217 */
|
|
2387
|
+
currency?: string | null;
|
|
2388
|
+
/** The identification type and identity data */
|
|
2389
|
+
identity?: IdentificationData$1;
|
|
2390
|
+
/** A string representing a language and region in the format of "xx-XX". First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2 */
|
|
2391
|
+
languages?: string[];
|
|
2392
|
+
/** App instance ID of SPI in context */
|
|
2393
|
+
instanceId?: string | null;
|
|
2394
|
+
}
|
|
2395
|
+
declare enum IdentityType$1 {
|
|
2396
|
+
UNKNOWN = "UNKNOWN",
|
|
2397
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
2398
|
+
MEMBER = "MEMBER",
|
|
2399
|
+
WIX_USER = "WIX_USER",
|
|
2400
|
+
APP = "APP"
|
|
2401
|
+
}
|
|
2402
|
+
interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
|
|
2403
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
2404
|
+
anonymousVisitorId?: string;
|
|
2405
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
2406
|
+
memberId?: string;
|
|
2407
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
2408
|
+
wixUserId?: string;
|
|
2409
|
+
/** ID of an app. */
|
|
2410
|
+
appId?: string;
|
|
2411
|
+
/** @readonly */
|
|
2412
|
+
identityType?: IdentityType$1;
|
|
2413
|
+
}
|
|
2414
|
+
/** @oneof */
|
|
2415
|
+
interface IdentificationDataIdOneOf$1 {
|
|
2416
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
2417
|
+
anonymousVisitorId?: string;
|
|
2418
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
2419
|
+
memberId?: string;
|
|
2420
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
2421
|
+
wixUserId?: string;
|
|
2422
|
+
/** ID of an app. */
|
|
2423
|
+
appId?: string;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
interface GetPaymentSettingsEnvelope {
|
|
2427
|
+
request: GetPaymentSettingsRequest;
|
|
2428
|
+
metadata: Context$1;
|
|
2429
|
+
}
|
|
2430
|
+
declare const provide$3: ServicePluginDefinition<{
|
|
2431
|
+
getPaymentSettings(payload: GetPaymentSettingsEnvelope): GetPaymentSettingsResponse | Promise<GetPaymentSettingsResponse>;
|
|
2432
|
+
}>;
|
|
2433
|
+
|
|
2434
|
+
declare const provide$2: BuildServicePluginDefinition<typeof provide$3>;
|
|
2435
|
+
|
|
2436
|
+
type context$1_Activity = Activity;
|
|
2437
|
+
type context$1_ActivityContentOneOf = ActivityContentOneOf;
|
|
2438
|
+
type context$1_ActivityType = ActivityType;
|
|
2439
|
+
declare const context$1_ActivityType: typeof ActivityType;
|
|
2440
|
+
type context$1_AdditionalFee = AdditionalFee;
|
|
2441
|
+
type context$1_AttributionSource = AttributionSource;
|
|
2442
|
+
declare const context$1_AttributionSource: typeof AttributionSource;
|
|
2443
|
+
type context$1_Balance = Balance;
|
|
2444
|
+
type context$1_BalanceSummary = BalanceSummary;
|
|
2445
|
+
type context$1_BuyerInfo = BuyerInfo;
|
|
2446
|
+
type context$1_BuyerInfoIdOneOf = BuyerInfoIdOneOf;
|
|
2447
|
+
type context$1_ChannelInfo = ChannelInfo;
|
|
2448
|
+
type context$1_ChannelType = ChannelType;
|
|
2449
|
+
declare const context$1_ChannelType: typeof ChannelType;
|
|
2450
|
+
type context$1_Color = Color;
|
|
2451
|
+
type context$1_CreatedBy = CreatedBy;
|
|
2452
|
+
type context$1_CreatedByStringOneOf = CreatedByStringOneOf;
|
|
2453
|
+
type context$1_CustomActivity = CustomActivity;
|
|
2454
|
+
type context$1_DeliveryLogistics = DeliveryLogistics;
|
|
2455
|
+
type context$1_DeliveryLogisticsAddressOneOf = DeliveryLogisticsAddressOneOf;
|
|
2456
|
+
type context$1_DeliveryTimeSlot = DeliveryTimeSlot;
|
|
2457
|
+
type context$1_DescriptionLine = DescriptionLine;
|
|
2458
|
+
type context$1_DescriptionLineDescriptionLineValueOneOf = DescriptionLineDescriptionLineValueOneOf;
|
|
2459
|
+
type context$1_DescriptionLineName = DescriptionLineName;
|
|
2460
|
+
type context$1_DescriptionLineType = DescriptionLineType;
|
|
2461
|
+
declare const context$1_DescriptionLineType: typeof DescriptionLineType;
|
|
2462
|
+
type context$1_DescriptionLineValueOneOf = DescriptionLineValueOneOf;
|
|
2463
|
+
type context$1_DigitalFile = DigitalFile;
|
|
2464
|
+
type context$1_DiscountReason = DiscountReason;
|
|
2465
|
+
declare const context$1_DiscountReason: typeof DiscountReason;
|
|
2466
|
+
type context$1_DraftOrderChangesApplied = DraftOrderChangesApplied;
|
|
2467
|
+
type context$1_ExtendedFields = ExtendedFields;
|
|
2468
|
+
type context$1_FulfillmentStatus = FulfillmentStatus;
|
|
2469
|
+
declare const context$1_FulfillmentStatus: typeof FulfillmentStatus;
|
|
2470
|
+
type context$1_FulfillmentStatusesAggregate = FulfillmentStatusesAggregate;
|
|
2471
|
+
type context$1_GetPaymentSettingsRequest = GetPaymentSettingsRequest;
|
|
2472
|
+
type context$1_GetPaymentSettingsResponse = GetPaymentSettingsResponse;
|
|
2473
|
+
type context$1_LineItemAmount = LineItemAmount;
|
|
2474
|
+
type context$1_LineItemChanges = LineItemChanges;
|
|
2475
|
+
type context$1_LineItemDiscount = LineItemDiscount;
|
|
2476
|
+
type context$1_LineItemExchangeData = LineItemExchangeData;
|
|
2477
|
+
type context$1_LineItemPriceChange = LineItemPriceChange;
|
|
2478
|
+
type context$1_LineItemQuantityChange = LineItemQuantityChange;
|
|
2479
|
+
type context$1_LineItemQuantityChangeType = LineItemQuantityChangeType;
|
|
2480
|
+
declare const context$1_LineItemQuantityChangeType: typeof LineItemQuantityChangeType;
|
|
2481
|
+
type context$1_LineItemTaxBreakdown = LineItemTaxBreakdown;
|
|
2482
|
+
type context$1_LineItemTaxInfo = LineItemTaxInfo;
|
|
2483
|
+
type context$1_LocationAndQuantity = LocationAndQuantity;
|
|
2484
|
+
type context$1_ManagedAdditionalFee = ManagedAdditionalFee;
|
|
2485
|
+
type context$1_ManagedDiscount = ManagedDiscount;
|
|
2486
|
+
type context$1_ManagedLineItem = ManagedLineItem;
|
|
2487
|
+
type context$1_MerchantComment = MerchantComment;
|
|
2488
|
+
type context$1_MerchantDiscountMerchantDiscountReasonOneOf = MerchantDiscountMerchantDiscountReasonOneOf;
|
|
2489
|
+
type context$1_NewExchangeOrderCreated = NewExchangeOrderCreated;
|
|
2490
|
+
type context$1_Order = Order;
|
|
2491
|
+
type context$1_OrderChange = OrderChange;
|
|
2492
|
+
type context$1_OrderChangeValueOneOf = OrderChangeValueOneOf;
|
|
2493
|
+
type context$1_OrderCreatedFromExchange = OrderCreatedFromExchange;
|
|
2494
|
+
type context$1_OrderLineItem = OrderLineItem;
|
|
2495
|
+
type context$1_OrderRefunded = OrderRefunded;
|
|
2496
|
+
type context$1_OrderStatus = OrderStatus;
|
|
2497
|
+
declare const context$1_OrderStatus: typeof OrderStatus;
|
|
2498
|
+
type context$1_OrderTaxBreakdown = OrderTaxBreakdown;
|
|
2499
|
+
type context$1_OrderTaxInfo = OrderTaxInfo;
|
|
2500
|
+
type context$1_PaymentOptionType = PaymentOptionType;
|
|
2501
|
+
declare const context$1_PaymentOptionType: typeof PaymentOptionType;
|
|
2502
|
+
type context$1_PaymentSettings = PaymentSettings;
|
|
2503
|
+
type context$1_PaymentSettingsSPIConfig = PaymentSettingsSPIConfig;
|
|
2504
|
+
type context$1_PaymentStatus = PaymentStatus;
|
|
2505
|
+
declare const context$1_PaymentStatus: typeof PaymentStatus;
|
|
2506
|
+
type context$1_PickupAddress = PickupAddress;
|
|
2507
|
+
type context$1_PickupDetails = PickupDetails;
|
|
2508
|
+
type context$1_PickupMethod = PickupMethod;
|
|
2509
|
+
declare const context$1_PickupMethod: typeof PickupMethod;
|
|
2510
|
+
type context$1_PlainTextValue = PlainTextValue;
|
|
2511
|
+
type context$1_Price = Price;
|
|
2512
|
+
type context$1_PriceDescription = PriceDescription;
|
|
2513
|
+
type context$1_SavedPaymentMethod = SavedPaymentMethod;
|
|
2514
|
+
type context$1_ShippingInformation = ShippingInformation;
|
|
2515
|
+
type context$1_ShippingPrice = ShippingPrice;
|
|
2516
|
+
type context$1_ShippingRegion = ShippingRegion;
|
|
2517
|
+
type context$1_SubscriptionInfo = SubscriptionInfo;
|
|
2518
|
+
type context$1_TagList = TagList;
|
|
2519
|
+
type context$1_Tags = Tags;
|
|
2520
|
+
type context$1_TaxSummary = TaxSummary;
|
|
2521
|
+
type context$1_TotalPriceChange = TotalPriceChange;
|
|
2522
|
+
type context$1_TranslatedValue = TranslatedValue;
|
|
2523
|
+
declare namespace context$1 {
|
|
2524
|
+
export { type context$1_Activity as Activity, type context$1_ActivityContentOneOf as ActivityContentOneOf, context$1_ActivityType as ActivityType, type context$1_AdditionalFee as AdditionalFee, type Address$1 as Address, type AddressLocation$1 as AddressLocation, type AddressWithContact$1 as AddressWithContact, type AppliedDiscount$1 as AppliedDiscount, type AppliedDiscountDiscountSourceOneOf$1 as AppliedDiscountDiscountSourceOneOf, context$1_AttributionSource as AttributionSource, type context$1_Balance as Balance, type context$1_BalanceSummary as BalanceSummary, type context$1_BuyerInfo as BuyerInfo, type context$1_BuyerInfoIdOneOf as BuyerInfoIdOneOf, type CatalogReference$1 as CatalogReference, type context$1_ChannelInfo as ChannelInfo, context$1_ChannelType as ChannelType, type context$1_Color as Color, type Context$1 as Context, type Coupon$1 as Coupon, type context$1_CreatedBy as CreatedBy, type context$1_CreatedByStringOneOf as CreatedByStringOneOf, type context$1_CustomActivity as CustomActivity, type CustomField$1 as CustomField, type context$1_DeliveryLogistics as DeliveryLogistics, type context$1_DeliveryLogisticsAddressOneOf as DeliveryLogisticsAddressOneOf, type context$1_DeliveryTimeSlot as DeliveryTimeSlot, type context$1_DescriptionLine as DescriptionLine, type context$1_DescriptionLineDescriptionLineValueOneOf as DescriptionLineDescriptionLineValueOneOf, type context$1_DescriptionLineName as DescriptionLineName, context$1_DescriptionLineType as DescriptionLineType, type context$1_DescriptionLineValueOneOf as DescriptionLineValueOneOf, type context$1_DigitalFile as DigitalFile, context$1_DiscountReason as DiscountReason, type DiscountRule$1 as DiscountRule, type DiscountRuleName$1 as DiscountRuleName, DiscountType$1 as DiscountType, type context$1_DraftOrderChangesApplied as DraftOrderChangesApplied, type context$1_ExtendedFields as ExtendedFields, context$1_FulfillmentStatus as FulfillmentStatus, type context$1_FulfillmentStatusesAggregate as FulfillmentStatusesAggregate, type FullAddressContactDetails$1 as FullAddressContactDetails, type context$1_GetPaymentSettingsRequest as GetPaymentSettingsRequest, type context$1_GetPaymentSettingsResponse as GetPaymentSettingsResponse, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, IdentityType$1 as IdentityType, type ItemTaxFullDetails$1 as ItemTaxFullDetails, type ItemType$1 as ItemType, ItemTypeItemType$1 as ItemTypeItemType, type ItemTypeItemTypeDataOneOf$1 as ItemTypeItemTypeDataOneOf, JurisdictionType$1 as JurisdictionType, type context$1_LineItemAmount as LineItemAmount, type context$1_LineItemChanges as LineItemChanges, type context$1_LineItemDiscount as LineItemDiscount, type context$1_LineItemExchangeData as LineItemExchangeData, type context$1_LineItemPriceChange as LineItemPriceChange, type context$1_LineItemQuantityChange as LineItemQuantityChange, context$1_LineItemQuantityChangeType as LineItemQuantityChangeType, type context$1_LineItemTaxBreakdown as LineItemTaxBreakdown, type context$1_LineItemTaxInfo as LineItemTaxInfo, type context$1_LocationAndQuantity as LocationAndQuantity, type context$1_ManagedAdditionalFee as ManagedAdditionalFee, type context$1_ManagedDiscount as ManagedDiscount, type context$1_ManagedLineItem as ManagedLineItem, type context$1_MerchantComment as MerchantComment, type MerchantDiscount$1 as MerchantDiscount, type context$1_MerchantDiscountMerchantDiscountReasonOneOf as MerchantDiscountMerchantDiscountReasonOneOf, type context$1_NewExchangeOrderCreated as NewExchangeOrderCreated, type context$1_Order as Order, type context$1_OrderChange as OrderChange, type context$1_OrderChangeValueOneOf as OrderChangeValueOneOf, type context$1_OrderCreatedFromExchange as OrderCreatedFromExchange, type context$1_OrderLineItem as OrderLineItem, type context$1_OrderRefunded as OrderRefunded, context$1_OrderStatus as OrderStatus, type context$1_OrderTaxBreakdown as OrderTaxBreakdown, type context$1_OrderTaxInfo as OrderTaxInfo, context$1_PaymentOptionType as PaymentOptionType, type context$1_PaymentSettings as PaymentSettings, type context$1_PaymentSettingsSPIConfig as PaymentSettingsSPIConfig, context$1_PaymentStatus as PaymentStatus, type PhysicalProperties$1 as PhysicalProperties, type context$1_PickupAddress as PickupAddress, type context$1_PickupDetails as PickupDetails, context$1_PickupMethod as PickupMethod, type context$1_PlainTextValue as PlainTextValue, type context$1_Price as Price, type context$1_PriceDescription as PriceDescription, type PriceSummary$1 as PriceSummary, type ProductName$1 as ProductName, type context$1_SavedPaymentMethod as SavedPaymentMethod, type context$1_ShippingInformation as ShippingInformation, type context$1_ShippingPrice as ShippingPrice, type context$1_ShippingRegion as ShippingRegion, type StreetAddress$1 as StreetAddress, SubscriptionFrequency$1 as SubscriptionFrequency, type context$1_SubscriptionInfo as SubscriptionInfo, type SubscriptionSettings$1 as SubscriptionSettings, type context$1_TagList as TagList, type context$1_Tags as Tags, type context$1_TaxSummary as TaxSummary, type context$1_TotalPriceChange as TotalPriceChange, type context$1_TranslatedValue as TranslatedValue, type VatId$1 as VatId, VatType$1 as VatType, WeightUnit$1 as WeightUnit, provide$2 as provide };
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
interface GetValidationViolationsRequest {
|
|
2528
|
+
/** Information about the source of the request. */
|
|
2529
|
+
sourceInfo?: SourceInfo;
|
|
2530
|
+
/** Information to validate. */
|
|
2531
|
+
validationInfo?: ValidationInfo;
|
|
2532
|
+
}
|
|
2533
|
+
interface SourceInfo {
|
|
2534
|
+
/** Source of the request. */
|
|
2535
|
+
source?: Source;
|
|
2536
|
+
/** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */
|
|
2537
|
+
purchaseFlowId?: string | null;
|
|
2538
|
+
}
|
|
2539
|
+
declare enum Source {
|
|
2540
|
+
/** Context cannot be recognized */
|
|
2541
|
+
OTHER = "OTHER",
|
|
2542
|
+
/** Called from Ecom's Cart service */
|
|
2543
|
+
CART = "CART",
|
|
2544
|
+
/** Called from Ecom's Checkout service */
|
|
2545
|
+
CHECKOUT = "CHECKOUT"
|
|
2546
|
+
}
|
|
2547
|
+
/** ValidationsData is the main entity of ValidationsSPI, which contains all the data required for validations */
|
|
2548
|
+
interface ValidationInfo {
|
|
2549
|
+
/** Buyer details. */
|
|
2550
|
+
buyerDetails?: BuyerDetails;
|
|
2551
|
+
/** Line items. Max: 300 line items */
|
|
2552
|
+
lineItems?: LineItem[];
|
|
2553
|
+
/**
|
|
2554
|
+
* Applied gift card details.
|
|
2555
|
+
*
|
|
2556
|
+
* >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards).
|
|
2557
|
+
*/
|
|
2558
|
+
giftCard?: GiftCard;
|
|
2559
|
+
/**
|
|
2560
|
+
* Weight measurement unit.
|
|
2561
|
+
* Default: Site's weight unit
|
|
2562
|
+
*/
|
|
2563
|
+
weightUnit?: WeightUnit;
|
|
2564
|
+
/** Price summary. */
|
|
2565
|
+
priceSummary?: PriceSummary;
|
|
2566
|
+
/** Billing information. */
|
|
2567
|
+
billingInfo?: AddressWithContact;
|
|
2568
|
+
/** Shipping address and contact details. */
|
|
2569
|
+
shippingAddress?: AddressWithContact;
|
|
2570
|
+
/** Shipping information. */
|
|
2571
|
+
shippingInfo?: ShippingInfo;
|
|
2572
|
+
/** Custom fields. */
|
|
2573
|
+
customFields?: CustomFields;
|
|
2574
|
+
/** Applied discounts. */
|
|
2575
|
+
appliedDiscounts?: AppliedDiscount[];
|
|
2576
|
+
}
|
|
2577
|
+
interface BuyerDetails {
|
|
2578
|
+
/** Buyer's email address. */
|
|
2579
|
+
email?: string | null;
|
|
2580
|
+
/** Contact ID if one exists. */
|
|
2581
|
+
contactId?: string | null;
|
|
2582
|
+
}
|
|
2583
|
+
interface LineItem {
|
|
2584
|
+
/** Line item ID. */
|
|
2585
|
+
_id?: string | null;
|
|
2586
|
+
/**
|
|
2587
|
+
* Item quantity.
|
|
2588
|
+
* Min: `0`
|
|
2589
|
+
* Max: `100000`
|
|
2590
|
+
*/
|
|
2591
|
+
quantity?: number;
|
|
2592
|
+
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */
|
|
2593
|
+
catalogReference?: CatalogReference;
|
|
2594
|
+
/**
|
|
2595
|
+
* Product name. For example,
|
|
2596
|
+
* + Stores: `product.name`
|
|
2597
|
+
* + Bookings: `service.info.name`
|
|
2598
|
+
* + Events: `ticket.name`
|
|
2599
|
+
*/
|
|
2600
|
+
productName?: ProductName;
|
|
2601
|
+
/** Price of the item **after** catalog-defined discount and line item discounts. */
|
|
2602
|
+
price?: MultiCurrencyPrice;
|
|
2603
|
+
/** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */
|
|
2604
|
+
physicalProperties?: PhysicalProperties;
|
|
2605
|
+
/** Item type. */
|
|
2606
|
+
itemType?: ItemType;
|
|
2607
|
+
/** [Subscription option](https://dev.wix.com/api/rest/wix-stores/subscription-options/introduction) information. A subscription is a product that is sold on a recurring basis. */
|
|
2608
|
+
subscriptionOptionInfo?: SubscriptionOptionInfo;
|
|
2609
|
+
/** Price breakdown for this line item. */
|
|
2610
|
+
pricesBreakdown?: LineItemPricesData;
|
|
2611
|
+
}
|
|
2612
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
2613
|
+
interface CatalogReference {
|
|
2614
|
+
/** ID of the item within the catalog it belongs to. */
|
|
2615
|
+
catalogItemId?: string;
|
|
2616
|
+
/**
|
|
2617
|
+
* ID of the app providing the catalog.
|
|
2618
|
+
*
|
|
2619
|
+
* You can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).
|
|
2620
|
+
*
|
|
2621
|
+
* For items from Wix catalogs, the following values always apply:
|
|
2622
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
2623
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
2624
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
2625
|
+
*/
|
|
2626
|
+
appId?: string;
|
|
2627
|
+
/**
|
|
2628
|
+
* 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.
|
|
2629
|
+
*
|
|
2630
|
+
* 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).
|
|
2631
|
+
*/
|
|
2632
|
+
options?: Record<string, any> | null;
|
|
2633
|
+
}
|
|
2634
|
+
interface ProductName {
|
|
2635
|
+
/**
|
|
2636
|
+
* __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).
|
|
2637
|
+
*
|
|
2638
|
+
* Min: 1 character.
|
|
2639
|
+
* Max: 200 characters.
|
|
2640
|
+
*/
|
|
2641
|
+
original?: string;
|
|
2642
|
+
/**
|
|
2643
|
+
* Item name translated into the buyer's language.
|
|
2644
|
+
*
|
|
2645
|
+
* Min: 1 character.
|
|
2646
|
+
* Max: 400 characters.
|
|
2647
|
+
* Default: Same as `original`.
|
|
2648
|
+
*/
|
|
2649
|
+
translated?: string | null;
|
|
2650
|
+
}
|
|
2651
|
+
interface MultiCurrencyPrice {
|
|
2652
|
+
/** Amount. */
|
|
2653
|
+
amount?: string;
|
|
2654
|
+
/**
|
|
2655
|
+
* Converted amount.
|
|
2656
|
+
* @readonly
|
|
2657
|
+
*/
|
|
2658
|
+
convertedAmount?: string;
|
|
2659
|
+
/**
|
|
2660
|
+
* Amount formatted with currency symbol.
|
|
2661
|
+
* @readonly
|
|
2662
|
+
*/
|
|
2663
|
+
formattedAmount?: string;
|
|
2664
|
+
/**
|
|
2665
|
+
* Converted amount formatted with currency symbol.
|
|
2666
|
+
* @readonly
|
|
2667
|
+
*/
|
|
2668
|
+
formattedConvertedAmount?: string;
|
|
2669
|
+
}
|
|
2670
|
+
interface PhysicalProperties {
|
|
2671
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
2672
|
+
weight?: number | null;
|
|
2673
|
+
/** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
|
|
2674
|
+
sku?: string | null;
|
|
2675
|
+
/** Whether this line item is shippable. */
|
|
2676
|
+
shippable?: boolean;
|
|
2677
|
+
}
|
|
2678
|
+
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
2679
|
+
/** Preset item type. */
|
|
2680
|
+
preset?: ItemTypeItemType;
|
|
2681
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
2682
|
+
custom?: string;
|
|
2683
|
+
}
|
|
2684
|
+
/** @oneof */
|
|
2685
|
+
interface ItemTypeItemTypeDataOneOf {
|
|
2686
|
+
/** Preset item type. */
|
|
2687
|
+
preset?: ItemTypeItemType;
|
|
2688
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
2689
|
+
custom?: string;
|
|
2690
|
+
}
|
|
2691
|
+
declare enum ItemTypeItemType {
|
|
2692
|
+
UNRECOGNISED = "UNRECOGNISED",
|
|
2693
|
+
PHYSICAL = "PHYSICAL",
|
|
2694
|
+
DIGITAL = "DIGITAL",
|
|
2695
|
+
GIFT_CARD = "GIFT_CARD",
|
|
2696
|
+
SERVICE = "SERVICE"
|
|
2697
|
+
}
|
|
2698
|
+
interface SubscriptionOptionInfo {
|
|
2699
|
+
/** Subscription option settings. */
|
|
2700
|
+
subscriptionSettings?: SubscriptionSettings;
|
|
2701
|
+
/** Subscription option title. */
|
|
2702
|
+
title?: Title;
|
|
2703
|
+
/** Subscription option description. */
|
|
2704
|
+
description?: Description;
|
|
2705
|
+
}
|
|
2706
|
+
interface SubscriptionSettings {
|
|
2707
|
+
/** Frequency of recurring payment. */
|
|
2708
|
+
frequency?: SubscriptionFrequency;
|
|
2709
|
+
/** Whether subscription is renewed automatically at the end of each period. */
|
|
2710
|
+
autoRenewal?: boolean;
|
|
2711
|
+
/** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */
|
|
2712
|
+
billingCycles?: number | null;
|
|
2713
|
+
}
|
|
2714
|
+
/** Frequency unit of recurring payment */
|
|
2715
|
+
declare enum SubscriptionFrequency {
|
|
2716
|
+
UNDEFINED = "UNDEFINED",
|
|
2717
|
+
DAY = "DAY",
|
|
2718
|
+
WEEK = "WEEK",
|
|
2719
|
+
MONTH = "MONTH",
|
|
2720
|
+
YEAR = "YEAR"
|
|
2721
|
+
}
|
|
2722
|
+
interface Title {
|
|
2723
|
+
/** 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). */
|
|
2724
|
+
original?: string;
|
|
2725
|
+
/**
|
|
2726
|
+
* Subscription option name translated into the buyer's language.
|
|
2727
|
+
*
|
|
2728
|
+
* Default: Same as `original`.
|
|
2729
|
+
*/
|
|
2730
|
+
translated?: string | null;
|
|
2731
|
+
}
|
|
2732
|
+
interface Description {
|
|
2733
|
+
/** Subscription option description. */
|
|
2734
|
+
original?: string;
|
|
2735
|
+
/** Translated subscription option description. */
|
|
2736
|
+
translated?: string | null;
|
|
2737
|
+
}
|
|
2738
|
+
interface LineItemPricesData {
|
|
2739
|
+
/** Total price after discounts and after tax. */
|
|
2740
|
+
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
2741
|
+
/** Total price after discounts, and before tax. */
|
|
2742
|
+
totalPriceBeforeTax?: MultiCurrencyPrice;
|
|
2743
|
+
/** Tax details. */
|
|
2744
|
+
taxDetails?: ItemTaxFullDetails;
|
|
2745
|
+
/** Total discount for all line items. */
|
|
2746
|
+
totalDiscount?: MultiCurrencyPrice;
|
|
2747
|
+
/** Catalog price after catalog discount and automatic discounts. */
|
|
2748
|
+
price?: MultiCurrencyPrice;
|
|
2749
|
+
/** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */
|
|
2750
|
+
priceBeforeDiscounts?: MultiCurrencyPrice;
|
|
2751
|
+
/** Total price **after** catalog-defined discount and line item discounts. */
|
|
2752
|
+
lineItemPrice?: MultiCurrencyPrice;
|
|
2753
|
+
/** Item price **before** line item discounts and **before** catalog-defined discount. Defaults to `price` when not provided. */
|
|
2754
|
+
fullPrice?: MultiCurrencyPrice;
|
|
2755
|
+
}
|
|
2756
|
+
interface ItemTaxFullDetails {
|
|
2757
|
+
/** The portion of the total amount of this estimate that was taxable. */
|
|
2758
|
+
taxableAmount?: MultiCurrencyPrice;
|
|
2759
|
+
/** Calculated tax, based on `taxable_amount`. */
|
|
2760
|
+
totalTax?: MultiCurrencyPrice;
|
|
2761
|
+
/** Indicates whether the price already includes tax. */
|
|
2762
|
+
isTaxIncluded?: boolean | null;
|
|
2763
|
+
/** A detailed description of all the tax authorities applied on this item. */
|
|
2764
|
+
taxBreakdown?: TaxBreakdown[];
|
|
2765
|
+
}
|
|
2766
|
+
interface TaxBreakdown {
|
|
2767
|
+
/** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */
|
|
2768
|
+
jurisdiction?: string | null;
|
|
2769
|
+
/** The amount of this line item price that was considered nontaxable. (Decimal value) */
|
|
2770
|
+
nonTaxableAmount?: MultiCurrencyPrice;
|
|
2771
|
+
/** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */
|
|
2772
|
+
rate?: string | null;
|
|
2773
|
+
/** The amount of tax estimated for this line item. (Decimal value) */
|
|
2774
|
+
taxAmount?: MultiCurrencyPrice;
|
|
2775
|
+
/** The taxable amount of this line item. */
|
|
2776
|
+
taxableAmount?: MultiCurrencyPrice;
|
|
2777
|
+
/** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */
|
|
2778
|
+
taxType?: string | null;
|
|
2779
|
+
/**
|
|
2780
|
+
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
2781
|
+
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
2782
|
+
*/
|
|
2783
|
+
taxName?: string | null;
|
|
2784
|
+
/** The type of the jurisdiction in which this tax detail applies. */
|
|
2785
|
+
jurisdictionType?: JurisdictionType;
|
|
2786
|
+
}
|
|
2787
|
+
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
2788
|
+
declare enum JurisdictionType {
|
|
2789
|
+
UNDEFINED = "UNDEFINED",
|
|
2790
|
+
COUNTRY = "COUNTRY",
|
|
2791
|
+
STATE = "STATE",
|
|
2792
|
+
COUNTY = "COUNTY",
|
|
2793
|
+
CITY = "CITY",
|
|
2794
|
+
SPECIAL = "SPECIAL"
|
|
2795
|
+
}
|
|
2796
|
+
interface GiftCard {
|
|
2797
|
+
/**
|
|
2798
|
+
* Gift card ID.
|
|
2799
|
+
* @deprecated
|
|
2800
|
+
*/
|
|
2801
|
+
_id?: string;
|
|
2802
|
+
/** Gift card obfuscated code. */
|
|
2803
|
+
obfuscatedCode?: string;
|
|
2804
|
+
/** Gift card value. */
|
|
2805
|
+
amount?: MultiCurrencyPrice;
|
|
2806
|
+
/** App ID of the gift card provider. */
|
|
2807
|
+
appId?: string;
|
|
2808
|
+
}
|
|
2809
|
+
declare enum WeightUnit {
|
|
2810
|
+
/** Weight unit can't be classified, due to an error */
|
|
2811
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
2812
|
+
/** Kilograms */
|
|
2813
|
+
KG = "KG",
|
|
2814
|
+
/** Pounds */
|
|
2815
|
+
LB = "LB"
|
|
2816
|
+
}
|
|
2817
|
+
interface PriceSummary {
|
|
2818
|
+
/** Subtotal of all line items, before discounts and before tax. */
|
|
2819
|
+
subtotal?: MultiCurrencyPrice;
|
|
2820
|
+
/** Total shipping price, before discounts and before tax. */
|
|
2821
|
+
shipping?: MultiCurrencyPrice;
|
|
2822
|
+
/** Total tax. */
|
|
2823
|
+
tax?: MultiCurrencyPrice;
|
|
2824
|
+
/** Total calculated discount value. */
|
|
2825
|
+
discount?: MultiCurrencyPrice;
|
|
2826
|
+
/** Total price **after** discounts, gift cards, and tax. */
|
|
2827
|
+
total?: MultiCurrencyPrice;
|
|
2828
|
+
/** Total additional fees price **before** tax. */
|
|
2829
|
+
additionalFees?: MultiCurrencyPrice;
|
|
2830
|
+
}
|
|
2831
|
+
/** Billing Info and shipping details */
|
|
2832
|
+
interface AddressWithContact {
|
|
2833
|
+
/** Address. */
|
|
2834
|
+
address?: Address;
|
|
2835
|
+
/** Contact details. */
|
|
2836
|
+
contactDetails?: FullAddressContactDetails;
|
|
2837
|
+
}
|
|
2838
|
+
/** Physical address */
|
|
2839
|
+
interface Address {
|
|
2840
|
+
/** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
|
|
2841
|
+
country?: string | null;
|
|
2842
|
+
/** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
|
|
2843
|
+
subdivision?: string | null;
|
|
2844
|
+
/** City name. */
|
|
2845
|
+
city?: string | null;
|
|
2846
|
+
/** Postal or zip code. */
|
|
2847
|
+
postalCode?: string | null;
|
|
2848
|
+
/** Street address. */
|
|
2849
|
+
streetAddress?: StreetAddress;
|
|
2850
|
+
/** Main address line (usually street name and number). */
|
|
2851
|
+
addressLine1?: string | null;
|
|
2852
|
+
/** Free text providing more detailed address info. Usually contains apt, suite, floor. */
|
|
2853
|
+
addressLine2?: string | null;
|
|
2854
|
+
}
|
|
2855
|
+
interface StreetAddress {
|
|
2856
|
+
/** Street number. */
|
|
2857
|
+
number?: string;
|
|
2858
|
+
/** Street name. */
|
|
2859
|
+
name?: string;
|
|
2860
|
+
}
|
|
2861
|
+
interface AddressLocation {
|
|
2862
|
+
/** Address latitude. */
|
|
2863
|
+
latitude?: number | null;
|
|
2864
|
+
/** Address longitude. */
|
|
2865
|
+
longitude?: number | null;
|
|
2866
|
+
}
|
|
2867
|
+
/** Full contact details for an address */
|
|
2868
|
+
interface FullAddressContactDetails {
|
|
2869
|
+
/** First name. */
|
|
2870
|
+
firstName?: string | null;
|
|
2871
|
+
/** Last name. */
|
|
2872
|
+
lastName?: string | null;
|
|
2873
|
+
/** Phone number. */
|
|
2874
|
+
phone?: string | null;
|
|
2875
|
+
/** Company name. */
|
|
2876
|
+
company?: string | null;
|
|
2877
|
+
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
2878
|
+
vatId?: VatId;
|
|
2879
|
+
}
|
|
2880
|
+
interface VatId {
|
|
2881
|
+
/** Customer's tax ID. */
|
|
2882
|
+
_id?: string;
|
|
2883
|
+
/**
|
|
2884
|
+
* Tax type.
|
|
2885
|
+
*
|
|
2886
|
+
* Supported values:
|
|
2887
|
+
* + `CPF`: for individual tax payers
|
|
2888
|
+
* + `CNPJ`: for corporations
|
|
2889
|
+
*/
|
|
2890
|
+
type?: VatType;
|
|
2891
|
+
}
|
|
2892
|
+
/** tax info types */
|
|
2893
|
+
declare enum VatType {
|
|
2894
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
2895
|
+
/** CPF - for individual tax payers. */
|
|
2896
|
+
CPF = "CPF",
|
|
2897
|
+
/** CNPJ - for corporations */
|
|
2898
|
+
CNPJ = "CNPJ"
|
|
2899
|
+
}
|
|
2900
|
+
interface ShippingInfo {
|
|
2901
|
+
/** Selected option out of the options allowed for the `region`. */
|
|
2902
|
+
selectedCarrierServiceOption?: SelectedCarrierServiceOption;
|
|
2903
|
+
}
|
|
2904
|
+
interface SelectedCarrierServiceOption {
|
|
2905
|
+
/** Unique identifier of selected option. For example, `usps_std_overnight`. */
|
|
2906
|
+
code?: string;
|
|
2907
|
+
/**
|
|
2908
|
+
* Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
|
|
2909
|
+
* For example, "Standard" or "First-Class Package International".
|
|
2910
|
+
*/
|
|
2911
|
+
title?: string;
|
|
2912
|
+
/** Shipping costs. */
|
|
2913
|
+
cost?: SelectedCarrierServiceOptionPrices;
|
|
2914
|
+
}
|
|
2915
|
+
interface SelectedCarrierServiceOptionPrices {
|
|
2916
|
+
/** Total shipping price, after discount and after tax. */
|
|
2917
|
+
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
2918
|
+
/** Total price of shipping after discounts (when relevant), and before tax. */
|
|
2919
|
+
totalPriceBeforeTax?: MultiCurrencyPrice;
|
|
2920
|
+
/** Tax details. */
|
|
2921
|
+
taxDetails?: ItemTaxFullDetails;
|
|
2922
|
+
/** Shipping discount before tax. */
|
|
2923
|
+
totalDiscount?: MultiCurrencyPrice;
|
|
2924
|
+
/** Shipping price before discount and before tax. */
|
|
2925
|
+
price?: MultiCurrencyPrice;
|
|
2926
|
+
}
|
|
2927
|
+
interface CustomFields {
|
|
2928
|
+
/** List of custom fields */
|
|
2929
|
+
fields?: CustomField[];
|
|
2930
|
+
}
|
|
2931
|
+
interface CustomField {
|
|
2932
|
+
/** Custom field value. */
|
|
2933
|
+
value?: any;
|
|
2934
|
+
/** Custom field title. */
|
|
2935
|
+
title?: string;
|
|
2936
|
+
/** Translated custom field title. */
|
|
2937
|
+
translatedTitle?: string | null;
|
|
2938
|
+
}
|
|
2939
|
+
interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
2940
|
+
/** Coupon details. */
|
|
2941
|
+
coupon?: Coupon;
|
|
2942
|
+
/** Merchant discount. */
|
|
2943
|
+
merchantDiscount?: MerchantDiscount;
|
|
2944
|
+
/** Discount rule. */
|
|
2945
|
+
discountRule?: DiscountRule;
|
|
2946
|
+
/** Discount type. */
|
|
2947
|
+
discountType?: DiscountType;
|
|
2948
|
+
/** IDs of the line items the discount applies to. */
|
|
2949
|
+
lineItemIds?: string[];
|
|
2950
|
+
}
|
|
2951
|
+
/** @oneof */
|
|
2952
|
+
interface AppliedDiscountDiscountSourceOneOf {
|
|
2953
|
+
/** Coupon details. */
|
|
2954
|
+
coupon?: Coupon;
|
|
2955
|
+
/** Merchant discount. */
|
|
2956
|
+
merchantDiscount?: MerchantDiscount;
|
|
2957
|
+
/** Discount rule. */
|
|
2958
|
+
discountRule?: DiscountRule;
|
|
2959
|
+
}
|
|
2960
|
+
declare enum DiscountType {
|
|
2961
|
+
GLOBAL = "GLOBAL",
|
|
2962
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2963
|
+
SHIPPING = "SHIPPING"
|
|
2964
|
+
}
|
|
2965
|
+
/** Coupon */
|
|
2966
|
+
interface Coupon {
|
|
2967
|
+
/** Coupon ID. */
|
|
2968
|
+
_id?: string;
|
|
2969
|
+
/** Coupon code. */
|
|
2970
|
+
code?: string;
|
|
2971
|
+
/** Coupon name. */
|
|
2972
|
+
name?: string;
|
|
2973
|
+
amount?: string;
|
|
2974
|
+
}
|
|
2975
|
+
interface MerchantDiscount {
|
|
2976
|
+
amount?: string;
|
|
2977
|
+
}
|
|
2978
|
+
interface DiscountRule {
|
|
2979
|
+
/** Discount rule ID. */
|
|
2980
|
+
_id?: string;
|
|
2981
|
+
/** Discount rule name. */
|
|
2982
|
+
name?: DiscountRuleName;
|
|
2983
|
+
amount?: string;
|
|
2984
|
+
}
|
|
2985
|
+
interface DiscountRuleName {
|
|
2986
|
+
/** Original discount rule name (in site's default language). */
|
|
2987
|
+
original?: string;
|
|
2988
|
+
/** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
|
|
2989
|
+
translated?: string | null;
|
|
2990
|
+
}
|
|
2991
|
+
interface GetValidationViolationsResponse {
|
|
2992
|
+
/** List of validation violations. */
|
|
2993
|
+
violations?: Violation[];
|
|
2994
|
+
}
|
|
2995
|
+
interface Violation {
|
|
2996
|
+
/** 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. */
|
|
2997
|
+
severity?: Severity;
|
|
2998
|
+
/** Target location on a checkout or cart page where the violation will be displayed. */
|
|
2999
|
+
target?: Target;
|
|
3000
|
+
/** 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>`. */
|
|
3001
|
+
description?: string | null;
|
|
3002
|
+
}
|
|
3003
|
+
declare enum Severity {
|
|
3004
|
+
/** The user is allowed to move forward in the flow. */
|
|
3005
|
+
WARNING = "WARNING",
|
|
3006
|
+
/**
|
|
3007
|
+
* The user is blocked from moving forward in the flow.
|
|
3008
|
+
* For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
|
|
3009
|
+
*/
|
|
3010
|
+
ERROR = "ERROR"
|
|
3011
|
+
}
|
|
3012
|
+
interface Target extends TargetTargetTypeOneOf {
|
|
3013
|
+
/** General (other) violation. */
|
|
3014
|
+
other?: Other;
|
|
3015
|
+
/** Specific line item violation. */
|
|
3016
|
+
lineItem?: TargetLineItem;
|
|
3017
|
+
}
|
|
3018
|
+
/** @oneof */
|
|
3019
|
+
interface TargetTargetTypeOneOf {
|
|
3020
|
+
/** General (other) violation. */
|
|
3021
|
+
other?: Other;
|
|
3022
|
+
/** Specific line item violation. */
|
|
3023
|
+
lineItem?: TargetLineItem;
|
|
3024
|
+
}
|
|
3025
|
+
/** Available locations on the webpage */
|
|
3026
|
+
declare enum NameInOther {
|
|
3027
|
+
/** default location, in case no specific location is specified */
|
|
3028
|
+
OTHER_DEFAULT = "OTHER_DEFAULT"
|
|
3029
|
+
}
|
|
3030
|
+
/** Available locations on the line item */
|
|
3031
|
+
declare enum NameInLineItem {
|
|
3032
|
+
/** default location, in case no specific location is specified */
|
|
3033
|
+
LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
|
|
3034
|
+
}
|
|
3035
|
+
/** General (other) violation. */
|
|
3036
|
+
interface Other {
|
|
3037
|
+
/** Location on a checkout or a cart page where a general (other) violation will be displayed. */
|
|
3038
|
+
name?: NameInOther;
|
|
3039
|
+
}
|
|
3040
|
+
/** Specific line item violation. */
|
|
3041
|
+
interface TargetLineItem {
|
|
3042
|
+
/** Location on a checkout or a cart page where the specific line item violation will be displayed. */
|
|
3043
|
+
name?: NameInLineItem;
|
|
3044
|
+
/** ID of the line item containing the violation. */
|
|
3045
|
+
_id?: string | null;
|
|
3046
|
+
}
|
|
3047
|
+
interface ValidationsSPIConfig {
|
|
3048
|
+
/** Whether to validate the cart page in addition to the checkout page. Default: `false` */
|
|
3049
|
+
validateInCart?: boolean;
|
|
3050
|
+
/**
|
|
3051
|
+
* Required. Base URI where the endpoints are called. Wix appends the endpoint path to the base URI.
|
|
3052
|
+
* For example, to call the Get Eligible Triggers endpoint at `https://my-validations.com/v1/get-violations`, the base URI you provide here is `https://my-validations.com`.
|
|
3053
|
+
*/
|
|
3054
|
+
deploymentUri?: string;
|
|
3055
|
+
}
|
|
3056
|
+
/**
|
|
3057
|
+
* this message is not directly used by any service,
|
|
3058
|
+
* it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
|
|
3059
|
+
* e.g. SPIs, event-handlers, etc..
|
|
3060
|
+
* NOTE: this context object MUST be provided as the last argument in each Velo method signature.
|
|
3061
|
+
*
|
|
3062
|
+
* Example:
|
|
3063
|
+
* ```typescript
|
|
3064
|
+
* export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
|
|
3065
|
+
* ...
|
|
3066
|
+
* }
|
|
3067
|
+
* ```
|
|
3068
|
+
*/
|
|
3069
|
+
interface Context {
|
|
3070
|
+
/** A unique identifier for each request. Can be used for logging / troubleshooting */
|
|
3071
|
+
requestId?: string | null;
|
|
3072
|
+
/** 3 capital letters string representing a currency according to ISO-4217 */
|
|
3073
|
+
currency?: string | null;
|
|
3074
|
+
/** The identification type and identity data */
|
|
3075
|
+
identity?: IdentificationData;
|
|
3076
|
+
/** A string representing a language and region in the format of "xx-XX". First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2 */
|
|
3077
|
+
languages?: string[];
|
|
3078
|
+
/** App instance ID of SPI in context */
|
|
3079
|
+
instanceId?: string | null;
|
|
3080
|
+
}
|
|
3081
|
+
declare enum IdentityType {
|
|
3082
|
+
UNKNOWN = "UNKNOWN",
|
|
3083
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
3084
|
+
MEMBER = "MEMBER",
|
|
3085
|
+
WIX_USER = "WIX_USER",
|
|
3086
|
+
APP = "APP"
|
|
3087
|
+
}
|
|
3088
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3089
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
3090
|
+
anonymousVisitorId?: string;
|
|
3091
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
3092
|
+
memberId?: string;
|
|
3093
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
3094
|
+
wixUserId?: string;
|
|
3095
|
+
/** ID of an app. */
|
|
3096
|
+
appId?: string;
|
|
3097
|
+
/** @readonly */
|
|
3098
|
+
identityType?: IdentityType;
|
|
3099
|
+
}
|
|
3100
|
+
/** @oneof */
|
|
3101
|
+
interface IdentificationDataIdOneOf {
|
|
3102
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
3103
|
+
anonymousVisitorId?: string;
|
|
3104
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
3105
|
+
memberId?: string;
|
|
3106
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
3107
|
+
wixUserId?: string;
|
|
3108
|
+
/** ID of an app. */
|
|
3109
|
+
appId?: string;
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
interface GetValidationViolationsEnvelope {
|
|
3113
|
+
request: GetValidationViolationsRequest;
|
|
3114
|
+
metadata: Context;
|
|
3115
|
+
}
|
|
3116
|
+
declare const provide$1: ServicePluginDefinition<{
|
|
3117
|
+
getValidationViolations(payload: GetValidationViolationsEnvelope): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;
|
|
3118
|
+
}>;
|
|
3119
|
+
|
|
3120
|
+
declare const provide: BuildServicePluginDefinition<typeof provide$1>;
|
|
3121
|
+
|
|
3122
|
+
type context_Address = Address;
|
|
3123
|
+
type context_AddressLocation = AddressLocation;
|
|
3124
|
+
type context_AddressWithContact = AddressWithContact;
|
|
3125
|
+
type context_AppliedDiscount = AppliedDiscount;
|
|
3126
|
+
type context_AppliedDiscountDiscountSourceOneOf = AppliedDiscountDiscountSourceOneOf;
|
|
3127
|
+
type context_BuyerDetails = BuyerDetails;
|
|
3128
|
+
type context_CatalogReference = CatalogReference;
|
|
3129
|
+
type context_Context = Context;
|
|
3130
|
+
type context_Coupon = Coupon;
|
|
3131
|
+
type context_CustomField = CustomField;
|
|
3132
|
+
type context_CustomFields = CustomFields;
|
|
3133
|
+
type context_Description = Description;
|
|
3134
|
+
type context_DiscountRule = DiscountRule;
|
|
3135
|
+
type context_DiscountRuleName = DiscountRuleName;
|
|
3136
|
+
type context_DiscountType = DiscountType;
|
|
3137
|
+
declare const context_DiscountType: typeof DiscountType;
|
|
3138
|
+
type context_FullAddressContactDetails = FullAddressContactDetails;
|
|
3139
|
+
type context_GetValidationViolationsRequest = GetValidationViolationsRequest;
|
|
3140
|
+
type context_GetValidationViolationsResponse = GetValidationViolationsResponse;
|
|
3141
|
+
type context_GiftCard = GiftCard;
|
|
3142
|
+
type context_IdentificationData = IdentificationData;
|
|
3143
|
+
type context_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
3144
|
+
type context_IdentityType = IdentityType;
|
|
3145
|
+
declare const context_IdentityType: typeof IdentityType;
|
|
3146
|
+
type context_ItemTaxFullDetails = ItemTaxFullDetails;
|
|
3147
|
+
type context_ItemType = ItemType;
|
|
3148
|
+
type context_ItemTypeItemType = ItemTypeItemType;
|
|
3149
|
+
declare const context_ItemTypeItemType: typeof ItemTypeItemType;
|
|
3150
|
+
type context_ItemTypeItemTypeDataOneOf = ItemTypeItemTypeDataOneOf;
|
|
3151
|
+
type context_JurisdictionType = JurisdictionType;
|
|
3152
|
+
declare const context_JurisdictionType: typeof JurisdictionType;
|
|
3153
|
+
type context_LineItem = LineItem;
|
|
3154
|
+
type context_LineItemPricesData = LineItemPricesData;
|
|
3155
|
+
type context_MerchantDiscount = MerchantDiscount;
|
|
3156
|
+
type context_MultiCurrencyPrice = MultiCurrencyPrice;
|
|
3157
|
+
type context_NameInLineItem = NameInLineItem;
|
|
3158
|
+
declare const context_NameInLineItem: typeof NameInLineItem;
|
|
3159
|
+
type context_NameInOther = NameInOther;
|
|
3160
|
+
declare const context_NameInOther: typeof NameInOther;
|
|
3161
|
+
type context_Other = Other;
|
|
3162
|
+
type context_PhysicalProperties = PhysicalProperties;
|
|
3163
|
+
type context_PriceSummary = PriceSummary;
|
|
3164
|
+
type context_ProductName = ProductName;
|
|
3165
|
+
type context_SelectedCarrierServiceOption = SelectedCarrierServiceOption;
|
|
3166
|
+
type context_SelectedCarrierServiceOptionPrices = SelectedCarrierServiceOptionPrices;
|
|
3167
|
+
type context_Severity = Severity;
|
|
3168
|
+
declare const context_Severity: typeof Severity;
|
|
3169
|
+
type context_ShippingInfo = ShippingInfo;
|
|
3170
|
+
type context_Source = Source;
|
|
3171
|
+
declare const context_Source: typeof Source;
|
|
3172
|
+
type context_SourceInfo = SourceInfo;
|
|
3173
|
+
type context_StreetAddress = StreetAddress;
|
|
3174
|
+
type context_SubscriptionFrequency = SubscriptionFrequency;
|
|
3175
|
+
declare const context_SubscriptionFrequency: typeof SubscriptionFrequency;
|
|
3176
|
+
type context_SubscriptionOptionInfo = SubscriptionOptionInfo;
|
|
3177
|
+
type context_SubscriptionSettings = SubscriptionSettings;
|
|
3178
|
+
type context_Target = Target;
|
|
3179
|
+
type context_TargetLineItem = TargetLineItem;
|
|
3180
|
+
type context_TargetTargetTypeOneOf = TargetTargetTypeOneOf;
|
|
3181
|
+
type context_TaxBreakdown = TaxBreakdown;
|
|
3182
|
+
type context_Title = Title;
|
|
3183
|
+
type context_ValidationInfo = ValidationInfo;
|
|
3184
|
+
type context_ValidationsSPIConfig = ValidationsSPIConfig;
|
|
3185
|
+
type context_VatId = VatId;
|
|
3186
|
+
type context_VatType = VatType;
|
|
3187
|
+
declare const context_VatType: typeof VatType;
|
|
3188
|
+
type context_Violation = Violation;
|
|
3189
|
+
type context_WeightUnit = WeightUnit;
|
|
3190
|
+
declare const context_WeightUnit: typeof WeightUnit;
|
|
3191
|
+
declare const context_provide: typeof provide;
|
|
3192
|
+
declare namespace context {
|
|
3193
|
+
export { type context_Address as Address, type context_AddressLocation as AddressLocation, type context_AddressWithContact as AddressWithContact, type context_AppliedDiscount as AppliedDiscount, type context_AppliedDiscountDiscountSourceOneOf as AppliedDiscountDiscountSourceOneOf, type context_BuyerDetails as BuyerDetails, type context_CatalogReference as CatalogReference, type context_Context as Context, type context_Coupon as Coupon, type context_CustomField as CustomField, type context_CustomFields as CustomFields, type context_Description as Description, type context_DiscountRule as DiscountRule, type context_DiscountRuleName as DiscountRuleName, context_DiscountType as DiscountType, type context_FullAddressContactDetails as FullAddressContactDetails, type context_GetValidationViolationsRequest as GetValidationViolationsRequest, type context_GetValidationViolationsResponse as GetValidationViolationsResponse, type context_GiftCard as GiftCard, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_IdentityType as IdentityType, type context_ItemTaxFullDetails as ItemTaxFullDetails, type context_ItemType as ItemType, context_ItemTypeItemType as ItemTypeItemType, type context_ItemTypeItemTypeDataOneOf as ItemTypeItemTypeDataOneOf, context_JurisdictionType as JurisdictionType, type context_LineItem as LineItem, type context_LineItemPricesData as LineItemPricesData, type context_MerchantDiscount as MerchantDiscount, type context_MultiCurrencyPrice as MultiCurrencyPrice, context_NameInLineItem as NameInLineItem, context_NameInOther as NameInOther, type context_Other as Other, type context_PhysicalProperties as PhysicalProperties, type context_PriceSummary as PriceSummary, type context_ProductName as ProductName, type context_SelectedCarrierServiceOption as SelectedCarrierServiceOption, type context_SelectedCarrierServiceOptionPrices as SelectedCarrierServiceOptionPrices, context_Severity as Severity, type context_ShippingInfo as ShippingInfo, context_Source as Source, type context_SourceInfo as SourceInfo, type context_StreetAddress as StreetAddress, context_SubscriptionFrequency as SubscriptionFrequency, type context_SubscriptionOptionInfo as SubscriptionOptionInfo, type context_SubscriptionSettings as SubscriptionSettings, type context_Target as Target, type context_TargetLineItem as TargetLineItem, type context_TargetTargetTypeOneOf as TargetTargetTypeOneOf, type context_TaxBreakdown as TaxBreakdown, type context_Title as Title, type context_ValidationInfo as ValidationInfo, type context_ValidationsSPIConfig as ValidationsSPIConfig, type context_VatId as VatId, context_VatType as VatType, type context_Violation as Violation, context_WeightUnit as WeightUnit, context_provide as provide };
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
export { context$3 as additionalFees, context$2 as customTriggers, context$1 as paymentSettings, context$4 as shippingRates, context as validations };
|