@wix/auto_sdk_ecom_delivery-solutions 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-3BB4aqZs.d.mts +561 -0
- package/build/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-3BB4aqZs.d.ts +561 -0
- package/build/index.d.mts +18 -0
- package/build/index.d.ts +18 -0
- package/build/index.js +256 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +226 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-DMPoOveb.d.mts +568 -0
- package/build/internal/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-DMPoOveb.d.ts +568 -0
- package/build/internal/index.d.mts +18 -0
- package/build/internal/index.d.ts +18 -0
- package/build/internal/index.js +256 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +226 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts → internal/meta.d.mts} +49 -84
- package/build/{es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts → internal/meta.d.ts} +49 -84
- package/build/internal/meta.js +127 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +100 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts → meta.d.mts} +49 -84
- package/build/{internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts → meta.d.ts} +49 -84
- package/build/meta.js +127 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +100 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +0 -5
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +0 -14
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +0 -1
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +0 -3
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +0 -79
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +0 -1
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +0 -13
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +0 -47
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +0 -1
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +0 -16
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +0 -19
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +0 -1
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +0 -72
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +0 -1
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +0 -576
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +0 -168
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +0 -5
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +0 -5
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +0 -1
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +0 -3
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +0 -75
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +0 -1
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +0 -13
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +0 -20
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +0 -1
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +0 -16
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +0 -9
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +0 -1
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +0 -69
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +0 -1
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +0 -576
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +0 -141
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +0 -5
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +0 -14
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +0 -1
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +0 -3
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +0 -79
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +0 -1
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +0 -13
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +0 -47
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +0 -1
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +0 -16
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +0 -19
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +0 -1
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +0 -72
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +0 -1
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +0 -583
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +0 -168
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +0 -5
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +0 -5
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +0 -1
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +0 -3
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +0 -75
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +0 -1
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +0 -13
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +0 -20
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +0 -1
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +0 -16
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +0 -9
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +0 -1
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +0 -69
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +0 -1
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +0 -583
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +0 -141
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +0 -1
package/build/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-3BB4aqZs.d.mts
ADDED
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
interface DeliveryRatesGateway {
|
|
2
|
+
/**
|
|
3
|
+
* @format GUID
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
_id?: string | null;
|
|
7
|
+
}
|
|
8
|
+
interface GetDeliverySolutionsRequest {
|
|
9
|
+
/**
|
|
10
|
+
* list of items to delivery that each of them points to delivery profile and delivery rule.
|
|
11
|
+
* @minSize 1
|
|
12
|
+
* @maxSize 300
|
|
13
|
+
*/
|
|
14
|
+
lineItems: DeliverableItem[];
|
|
15
|
+
/** Destination the items should deliver to */
|
|
16
|
+
destination: Address;
|
|
17
|
+
/**
|
|
18
|
+
* Origin the items should deliver from
|
|
19
|
+
* @deprecated Origin the items should deliver from
|
|
20
|
+
* @targetRemovalDate 2025-04-01
|
|
21
|
+
*/
|
|
22
|
+
origin?: Address;
|
|
23
|
+
/**
|
|
24
|
+
* Currency - Defaults to site's currency
|
|
25
|
+
* @format CURRENCY
|
|
26
|
+
*/
|
|
27
|
+
currency: string | null;
|
|
28
|
+
/** Contact details */
|
|
29
|
+
contactDetails?: FullAddressContactDetails;
|
|
30
|
+
/** Measure unit - defaults to site's weight unit */
|
|
31
|
+
weightUnit?: WeightUnit;
|
|
32
|
+
/**
|
|
33
|
+
* list of user preferences which are delivery options codes combined with delivery carrier app id
|
|
34
|
+
* @maxSize 5
|
|
35
|
+
*/
|
|
36
|
+
userPreferences?: UserPreference[];
|
|
37
|
+
/**
|
|
38
|
+
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
39
|
+
* @format GUID
|
|
40
|
+
*/
|
|
41
|
+
purchaseFlowId?: string | null;
|
|
42
|
+
}
|
|
43
|
+
interface DeliverableItem {
|
|
44
|
+
/**
|
|
45
|
+
* The ID of the line item.
|
|
46
|
+
* @minLength 1
|
|
47
|
+
* @maxLength 100
|
|
48
|
+
*/
|
|
49
|
+
_id?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Item name.
|
|
52
|
+
* @maxLength 400
|
|
53
|
+
*/
|
|
54
|
+
name?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The number of items ordered.
|
|
57
|
+
* @max 999999999
|
|
58
|
+
*/
|
|
59
|
+
quantity?: number;
|
|
60
|
+
/** Reference to the item's origin catalog. */
|
|
61
|
+
catalogReference?: CatalogReference;
|
|
62
|
+
/** Physical properties of the item. */
|
|
63
|
+
physicalProperties?: PhysicalProperties;
|
|
64
|
+
/**
|
|
65
|
+
* Price of a single item after discounts.
|
|
66
|
+
* @format DECIMAL_VALUE
|
|
67
|
+
* @decimalValue options { gte:0, maxScale:36 }
|
|
68
|
+
*/
|
|
69
|
+
price?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Total line item price before discounts.
|
|
72
|
+
* @format DECIMAL_VALUE
|
|
73
|
+
* @decimalValue options { gte:0, maxScale:36 }
|
|
74
|
+
*/
|
|
75
|
+
totalPriceBeforeDiscount?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Price of a single item before discounts.
|
|
78
|
+
* @format DECIMAL_VALUE
|
|
79
|
+
* @decimalValue options { gte:0, maxScale:36 }
|
|
80
|
+
*/
|
|
81
|
+
priceBeforeDiscount?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Total line item price after discounts. This is equal to `price` multiplied by `quantity`.
|
|
84
|
+
* @format DECIMAL_VALUE
|
|
85
|
+
* @decimalValue options { gte:0, maxScale:36 }
|
|
86
|
+
*/
|
|
87
|
+
totalPrice?: string | null;
|
|
88
|
+
/**
|
|
89
|
+
* For delivery rates by delivery profile id
|
|
90
|
+
* @format GUID
|
|
91
|
+
*/
|
|
92
|
+
deliveryProfileId?: string | null;
|
|
93
|
+
/** whether tax is included in line item price */
|
|
94
|
+
taxIncludedInPrice?: boolean | null;
|
|
95
|
+
}
|
|
96
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
97
|
+
interface CatalogReference {
|
|
98
|
+
/**
|
|
99
|
+
* ID of the item within the catalog it belongs to.
|
|
100
|
+
* @minLength 1
|
|
101
|
+
* @maxLength 36
|
|
102
|
+
*/
|
|
103
|
+
catalogItemId?: string;
|
|
104
|
+
/**
|
|
105
|
+
* ID of the app providing the catalog.
|
|
106
|
+
*
|
|
107
|
+
* You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
108
|
+
*
|
|
109
|
+
* For items from Wix catalogs, the following values always apply:
|
|
110
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
111
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
112
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
113
|
+
* @minLength 1
|
|
114
|
+
*/
|
|
115
|
+
appId?: string;
|
|
116
|
+
/**
|
|
117
|
+
* 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.
|
|
118
|
+
*
|
|
119
|
+
* For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
|
|
120
|
+
*/
|
|
121
|
+
options?: Record<string, any> | null;
|
|
122
|
+
}
|
|
123
|
+
interface PhysicalProperties {
|
|
124
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
125
|
+
weight?: number | null;
|
|
126
|
+
/**
|
|
127
|
+
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
128
|
+
* @maxLength 40
|
|
129
|
+
*/
|
|
130
|
+
sku?: string | null;
|
|
131
|
+
/** Whether this line item is shippable. */
|
|
132
|
+
shippable?: boolean;
|
|
133
|
+
}
|
|
134
|
+
/** Physical address */
|
|
135
|
+
interface Address extends AddressStreetOneOf {
|
|
136
|
+
/** Street name and number. */
|
|
137
|
+
streetAddress?: StreetAddress;
|
|
138
|
+
/** Main address line, usually street and number as free text. */
|
|
139
|
+
addressLine1?: string | null;
|
|
140
|
+
/**
|
|
141
|
+
* Country code.
|
|
142
|
+
* @format COUNTRY
|
|
143
|
+
*/
|
|
144
|
+
country?: string | null;
|
|
145
|
+
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
146
|
+
subdivision?: string | null;
|
|
147
|
+
/** City name. */
|
|
148
|
+
city?: string | null;
|
|
149
|
+
/** Zip/postal code. */
|
|
150
|
+
postalCode?: string | null;
|
|
151
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
152
|
+
addressLine2?: string | null;
|
|
153
|
+
}
|
|
154
|
+
/** @oneof */
|
|
155
|
+
interface AddressStreetOneOf {
|
|
156
|
+
/** Street name and number. */
|
|
157
|
+
streetAddress?: StreetAddress;
|
|
158
|
+
/** Main address line, usually street and number as free text. */
|
|
159
|
+
addressLine?: string | null;
|
|
160
|
+
}
|
|
161
|
+
interface StreetAddress {
|
|
162
|
+
/** Street number. */
|
|
163
|
+
number?: string;
|
|
164
|
+
/** Street name. */
|
|
165
|
+
name?: string;
|
|
166
|
+
}
|
|
167
|
+
interface AddressLocation {
|
|
168
|
+
/** Address latitude. */
|
|
169
|
+
latitude?: number | null;
|
|
170
|
+
/** Address longitude. */
|
|
171
|
+
longitude?: number | null;
|
|
172
|
+
}
|
|
173
|
+
interface Subdivision {
|
|
174
|
+
/** Short subdivision code. */
|
|
175
|
+
code?: string;
|
|
176
|
+
/** Subdivision full name. */
|
|
177
|
+
name?: string;
|
|
178
|
+
}
|
|
179
|
+
declare enum SubdivisionType {
|
|
180
|
+
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
181
|
+
/** State */
|
|
182
|
+
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
183
|
+
/** County */
|
|
184
|
+
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
185
|
+
/** City/town */
|
|
186
|
+
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
187
|
+
/** Neighborhood/quarter */
|
|
188
|
+
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
189
|
+
/** Street/block */
|
|
190
|
+
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
191
|
+
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
192
|
+
COUNTRY = "COUNTRY"
|
|
193
|
+
}
|
|
194
|
+
/** Full contact details for an address */
|
|
195
|
+
interface FullAddressContactDetails {
|
|
196
|
+
/** Contact's first name. */
|
|
197
|
+
firstName?: string | null;
|
|
198
|
+
/** Contact's last name. */
|
|
199
|
+
lastName?: string | null;
|
|
200
|
+
/**
|
|
201
|
+
* Contact's phone number.
|
|
202
|
+
* @format PHONE
|
|
203
|
+
*/
|
|
204
|
+
phone?: string | null;
|
|
205
|
+
/** Contact's company name. */
|
|
206
|
+
company?: string | null;
|
|
207
|
+
/**
|
|
208
|
+
* Email associated with the address.
|
|
209
|
+
* @format EMAIL
|
|
210
|
+
*/
|
|
211
|
+
email?: string | null;
|
|
212
|
+
/** Tax info. Currently usable only in Brazil. */
|
|
213
|
+
vatId?: VatId;
|
|
214
|
+
}
|
|
215
|
+
interface VatId {
|
|
216
|
+
/** Customer's tax ID. */
|
|
217
|
+
_id?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Tax type.
|
|
220
|
+
*
|
|
221
|
+
* Supported values:
|
|
222
|
+
* + `CPF`: for individual tax payers
|
|
223
|
+
* + `CNPJ`: for corporations
|
|
224
|
+
*/
|
|
225
|
+
type?: VatType;
|
|
226
|
+
}
|
|
227
|
+
/** tax info types */
|
|
228
|
+
declare enum VatType {
|
|
229
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
230
|
+
/** CPF - for individual tax payers. */
|
|
231
|
+
CPF = "CPF",
|
|
232
|
+
/** CNPJ - for corporations */
|
|
233
|
+
CNPJ = "CNPJ"
|
|
234
|
+
}
|
|
235
|
+
declare enum WeightUnit {
|
|
236
|
+
/** Weight unit can't be classified due to an error. */
|
|
237
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
238
|
+
/** Kilograms. */
|
|
239
|
+
KG = "KG",
|
|
240
|
+
/** Pounds. */
|
|
241
|
+
LB = "LB"
|
|
242
|
+
}
|
|
243
|
+
interface UserPreference {
|
|
244
|
+
/**
|
|
245
|
+
* The delivery carrier app id
|
|
246
|
+
* @format GUID
|
|
247
|
+
*/
|
|
248
|
+
appId?: string | null;
|
|
249
|
+
/**
|
|
250
|
+
* The delivery option code
|
|
251
|
+
* @maxLength 250
|
|
252
|
+
*/
|
|
253
|
+
code?: string;
|
|
254
|
+
}
|
|
255
|
+
interface ExternalReference {
|
|
256
|
+
/**
|
|
257
|
+
* ID of the app associated with the purchase flow.
|
|
258
|
+
* For example, the Wix Pay Links app ID.
|
|
259
|
+
* @format GUID
|
|
260
|
+
* @immutable
|
|
261
|
+
*/
|
|
262
|
+
appId?: string;
|
|
263
|
+
/**
|
|
264
|
+
* Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
|
|
265
|
+
* For example, a Wix Pay Link ID.
|
|
266
|
+
* @minLength 1
|
|
267
|
+
* @maxLength 100
|
|
268
|
+
* @immutable
|
|
269
|
+
*/
|
|
270
|
+
resourceId?: string | null;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Each delivery option has a list of items that can be delivered by it - the chosen one
|
|
274
|
+
* on Errors throw a business error from TC to catch and trigger destination completion
|
|
275
|
+
*/
|
|
276
|
+
interface GetDeliverySolutionsResponse {
|
|
277
|
+
/**
|
|
278
|
+
* Delivery Options with their associated items
|
|
279
|
+
* @maxSize 300
|
|
280
|
+
*/
|
|
281
|
+
deliverySolutions?: DeliverySolution[];
|
|
282
|
+
/**
|
|
283
|
+
* If a delivery carrier could not calculate rates, the error will be detailed here
|
|
284
|
+
* @maxSize 50
|
|
285
|
+
*/
|
|
286
|
+
errors?: DeliveryCarrierError[];
|
|
287
|
+
}
|
|
288
|
+
interface DeliverySolution {
|
|
289
|
+
/**
|
|
290
|
+
* Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
|
|
291
|
+
* @maxLength 250
|
|
292
|
+
*/
|
|
293
|
+
code?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Delivery rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`.
|
|
296
|
+
* @maxLength 250
|
|
297
|
+
*/
|
|
298
|
+
title?: string;
|
|
299
|
+
/** Delivery logistics. */
|
|
300
|
+
logistics?: DeliveryLogistics;
|
|
301
|
+
/** Delivery cost. */
|
|
302
|
+
cost?: DeliveryCost;
|
|
303
|
+
/**
|
|
304
|
+
* Delivery solution allocations to different delivery carriers and delivery regions
|
|
305
|
+
* @minSize 1
|
|
306
|
+
* @maxSize 300
|
|
307
|
+
*/
|
|
308
|
+
deliveryAllocations?: DeliveryAllocation[];
|
|
309
|
+
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
310
|
+
partial?: boolean | null;
|
|
311
|
+
}
|
|
312
|
+
interface DeliveryLogistics {
|
|
313
|
+
/**
|
|
314
|
+
* When the item is expected to be delivered in free text. For example, `"3-5 business days"`.
|
|
315
|
+
* @maxLength 1000
|
|
316
|
+
*/
|
|
317
|
+
deliveryTime?: string | null;
|
|
318
|
+
/**
|
|
319
|
+
* Instructions for delivery. For example, for pickup: `"Ensure to come during business hours, and please don't park in the disabled spot"`.
|
|
320
|
+
* @maxLength 1000
|
|
321
|
+
*/
|
|
322
|
+
instructions?: string | null;
|
|
323
|
+
/** Pickup details. Should be returned only if order is for pickup. */
|
|
324
|
+
pickupDetails?: PickupDetails;
|
|
325
|
+
/** Date and Time of the delivery option */
|
|
326
|
+
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
327
|
+
}
|
|
328
|
+
interface PickupDetails {
|
|
329
|
+
/** Pickup address. */
|
|
330
|
+
address?: Address;
|
|
331
|
+
/**
|
|
332
|
+
* Pickup method.
|
|
333
|
+
*
|
|
334
|
+
* Supported values:
|
|
335
|
+
* + `"STORE_PICKUP"`: When pickup is from the merchant's brick and mortar store.
|
|
336
|
+
* + `"PICKUP_POINT"`: When item is shipped to a specified pickup point.
|
|
337
|
+
*/
|
|
338
|
+
pickupMethod?: PickupMethod;
|
|
339
|
+
}
|
|
340
|
+
declare enum PickupMethod {
|
|
341
|
+
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
342
|
+
STORE_PICKUP = "STORE_PICKUP",
|
|
343
|
+
PICKUP_POINT = "PICKUP_POINT"
|
|
344
|
+
}
|
|
345
|
+
interface DeliveryTimeSlot {
|
|
346
|
+
/** starting time of the delivery time slot */
|
|
347
|
+
from?: Date | null;
|
|
348
|
+
/** ending time of the delivery time slot */
|
|
349
|
+
to?: Date | null;
|
|
350
|
+
}
|
|
351
|
+
interface DeliveryCost {
|
|
352
|
+
/**
|
|
353
|
+
* The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).
|
|
354
|
+
* @format DECIMAL_VALUE
|
|
355
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
356
|
+
*/
|
|
357
|
+
price?: string;
|
|
358
|
+
/**
|
|
359
|
+
* 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.
|
|
360
|
+
* @format CURRENCY
|
|
361
|
+
*/
|
|
362
|
+
currency?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Additional costs. For example, a handling fee for packaging fragile items.
|
|
365
|
+
* @maxSize 100
|
|
366
|
+
*/
|
|
367
|
+
additionalCharges?: AdditionalCharge[];
|
|
368
|
+
}
|
|
369
|
+
interface AdditionalCharge {
|
|
370
|
+
/** Additional charge type. */
|
|
371
|
+
type?: ChargeType;
|
|
372
|
+
/**
|
|
373
|
+
* Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
|
|
374
|
+
* @maxLength 250
|
|
375
|
+
*/
|
|
376
|
+
description?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* Cost of additional charge. For example, `12.5`.
|
|
379
|
+
* @format DECIMAL_VALUE
|
|
380
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
381
|
+
*/
|
|
382
|
+
price?: string;
|
|
383
|
+
}
|
|
384
|
+
declare enum ChargeType {
|
|
385
|
+
HANDLING_FEE = "HANDLING_FEE"
|
|
386
|
+
}
|
|
387
|
+
interface DeliveryAllocation {
|
|
388
|
+
/** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
|
|
389
|
+
deliveryCarrier?: Carrier;
|
|
390
|
+
/** The delivery region that are relevant for this delivery solution. */
|
|
391
|
+
deliveryRegion?: Region;
|
|
392
|
+
/** Populated if the delivery solution is a partially supplied by this carrier. */
|
|
393
|
+
applicableLineItems?: ApplicableLineItems;
|
|
394
|
+
}
|
|
395
|
+
interface Carrier {
|
|
396
|
+
/**
|
|
397
|
+
* The carrier app id
|
|
398
|
+
* @format GUID
|
|
399
|
+
*/
|
|
400
|
+
appId?: string | null;
|
|
401
|
+
/**
|
|
402
|
+
* Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
|
|
403
|
+
* @maxLength 250
|
|
404
|
+
*/
|
|
405
|
+
code?: string;
|
|
406
|
+
}
|
|
407
|
+
interface Region {
|
|
408
|
+
/**
|
|
409
|
+
* The delivery region id.
|
|
410
|
+
* @format GUID
|
|
411
|
+
*/
|
|
412
|
+
_id?: string | null;
|
|
413
|
+
/**
|
|
414
|
+
* The delivery region name.
|
|
415
|
+
* @maxLength 100
|
|
416
|
+
*/
|
|
417
|
+
name?: string | null;
|
|
418
|
+
}
|
|
419
|
+
interface ApplicableLineItems {
|
|
420
|
+
/**
|
|
421
|
+
* Line items that the delivery solution is for.
|
|
422
|
+
* @maxSize 300
|
|
423
|
+
* @minLength 1
|
|
424
|
+
* @maxLength 100
|
|
425
|
+
*/
|
|
426
|
+
lineItemIds?: string[];
|
|
427
|
+
}
|
|
428
|
+
interface DeliveryCarrierError {
|
|
429
|
+
/**
|
|
430
|
+
* The carrier app id
|
|
431
|
+
* @format GUID
|
|
432
|
+
*/
|
|
433
|
+
appId?: string | null;
|
|
434
|
+
/** The error details */
|
|
435
|
+
errorDetails?: Details;
|
|
436
|
+
}
|
|
437
|
+
interface Details extends DetailsKindOneOf {
|
|
438
|
+
applicationError?: ApplicationError;
|
|
439
|
+
validationError?: ValidationError;
|
|
440
|
+
systemError?: SystemError;
|
|
441
|
+
/**
|
|
442
|
+
* deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
|
|
443
|
+
* @deprecated
|
|
444
|
+
*/
|
|
445
|
+
tracing?: Record<string, string>;
|
|
446
|
+
}
|
|
447
|
+
/** @oneof */
|
|
448
|
+
interface DetailsKindOneOf {
|
|
449
|
+
applicationError?: ApplicationError;
|
|
450
|
+
validationError?: ValidationError;
|
|
451
|
+
systemError?: SystemError;
|
|
452
|
+
}
|
|
453
|
+
interface ApplicationError {
|
|
454
|
+
/** Error code. */
|
|
455
|
+
code?: string;
|
|
456
|
+
/** Description of the error. */
|
|
457
|
+
description?: string;
|
|
458
|
+
/** Data related to the error. */
|
|
459
|
+
data?: Record<string, any> | null;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* example result:
|
|
463
|
+
* {
|
|
464
|
+
* "fieldViolations": [
|
|
465
|
+
* {
|
|
466
|
+
* "field": "fieldA",
|
|
467
|
+
* "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
|
|
468
|
+
* "violatedRule": "OTHER",
|
|
469
|
+
* "ruleName": "INVALID_NOTE",
|
|
470
|
+
* "data": {
|
|
471
|
+
* "value": "FI"
|
|
472
|
+
* }
|
|
473
|
+
* },
|
|
474
|
+
* {
|
|
475
|
+
* "field": "fieldB",
|
|
476
|
+
* "description": "field value out of range. supported range: [0-20]",
|
|
477
|
+
* "violatedRule": "MAX",
|
|
478
|
+
* "data": {
|
|
479
|
+
* "threshold": 20
|
|
480
|
+
* }
|
|
481
|
+
* },
|
|
482
|
+
* {
|
|
483
|
+
* "field": "fieldC",
|
|
484
|
+
* "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
|
|
485
|
+
* "violatedRule": "FORMAT",
|
|
486
|
+
* "data": {
|
|
487
|
+
* "type": "PHONE"
|
|
488
|
+
* }
|
|
489
|
+
* }
|
|
490
|
+
* ]
|
|
491
|
+
* }
|
|
492
|
+
*/
|
|
493
|
+
interface ValidationError {
|
|
494
|
+
fieldViolations?: FieldViolation[];
|
|
495
|
+
}
|
|
496
|
+
declare enum RuleType {
|
|
497
|
+
VALIDATION = "VALIDATION",
|
|
498
|
+
OTHER = "OTHER",
|
|
499
|
+
MAX = "MAX",
|
|
500
|
+
MIN = "MIN",
|
|
501
|
+
MAX_LENGTH = "MAX_LENGTH",
|
|
502
|
+
MIN_LENGTH = "MIN_LENGTH",
|
|
503
|
+
MAX_SIZE = "MAX_SIZE",
|
|
504
|
+
MIN_SIZE = "MIN_SIZE",
|
|
505
|
+
FORMAT = "FORMAT",
|
|
506
|
+
DECIMAL_LTE = "DECIMAL_LTE",
|
|
507
|
+
DECIMAL_GTE = "DECIMAL_GTE",
|
|
508
|
+
DECIMAL_LT = "DECIMAL_LT",
|
|
509
|
+
DECIMAL_GT = "DECIMAL_GT",
|
|
510
|
+
DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
|
|
511
|
+
INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
|
|
512
|
+
REQUIRED_FIELD = "REQUIRED_FIELD",
|
|
513
|
+
FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
|
|
514
|
+
ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
|
|
515
|
+
EXACT_LENGTH = "EXACT_LENGTH",
|
|
516
|
+
EXACT_SIZE = "EXACT_SIZE",
|
|
517
|
+
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
518
|
+
}
|
|
519
|
+
interface FieldViolation {
|
|
520
|
+
field?: string;
|
|
521
|
+
description?: string;
|
|
522
|
+
violatedRule?: RuleType;
|
|
523
|
+
/** applicable when violated_rule=OTHER */
|
|
524
|
+
ruleName?: string | null;
|
|
525
|
+
data?: Record<string, any> | null;
|
|
526
|
+
}
|
|
527
|
+
interface SystemError {
|
|
528
|
+
/** Error code. */
|
|
529
|
+
errorCode?: string | null;
|
|
530
|
+
}
|
|
531
|
+
interface GetDeliverySolutionsOptions {
|
|
532
|
+
/** Destination the items should deliver to */
|
|
533
|
+
destination: Address;
|
|
534
|
+
/**
|
|
535
|
+
* Origin the items should deliver from
|
|
536
|
+
* @deprecated Origin the items should deliver from
|
|
537
|
+
* @targetRemovalDate 2025-04-01
|
|
538
|
+
*/
|
|
539
|
+
origin?: Address;
|
|
540
|
+
/**
|
|
541
|
+
* Currency - Defaults to site's currency
|
|
542
|
+
* @format CURRENCY
|
|
543
|
+
*/
|
|
544
|
+
currency: string | null;
|
|
545
|
+
/** Contact details */
|
|
546
|
+
contactDetails?: FullAddressContactDetails;
|
|
547
|
+
/** Measure unit - defaults to site's weight unit */
|
|
548
|
+
weightUnit?: WeightUnit;
|
|
549
|
+
/**
|
|
550
|
+
* list of user preferences which are delivery options codes combined with delivery carrier app id
|
|
551
|
+
* @maxSize 5
|
|
552
|
+
*/
|
|
553
|
+
userPreferences?: UserPreference[];
|
|
554
|
+
/**
|
|
555
|
+
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
556
|
+
* @format GUID
|
|
557
|
+
*/
|
|
558
|
+
purchaseFlowId?: string | null;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
export { type Address as A, type SystemError as B, ChargeType as C, type DeliverableItem as D, type ExternalReference as E, type FullAddressContactDetails as F, type GetDeliverySolutionsOptions as G, PickupMethod as P, RuleType as R, SubdivisionType as S, type UserPreference as U, VatType as V, WeightUnit as W, type GetDeliverySolutionsResponse as a, type DeliveryRatesGateway as b, type GetDeliverySolutionsRequest as c, type CatalogReference as d, type PhysicalProperties as e, type AddressStreetOneOf as f, type StreetAddress as g, type AddressLocation as h, type Subdivision as i, type VatId as j, type DeliverySolution as k, type DeliveryLogistics as l, type PickupDetails as m, type DeliveryTimeSlot as n, type DeliveryCost as o, type AdditionalCharge as p, type DeliveryAllocation as q, type Carrier as r, type Region as s, type ApplicableLineItems as t, type DeliveryCarrierError as u, type Details as v, type DetailsKindOneOf as w, type ApplicationError as x, type ValidationError as y, type FieldViolation as z };
|