@wix/auto_sdk_ecom_delivery-solutions 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +5 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +14 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +1 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +3 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +79 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +1 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +13 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +47 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +1 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +16 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +19 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +1 -0
- package/build/{gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-3BB4aqZs.d.mts → cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts} +49 -74
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +72 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +1 -0
- package/build/{internal/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-DMPoOveb.d.mts → cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts} +62 -42
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +170 -0
- package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +5 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +5 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +1 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +3 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +75 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +1 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +13 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +20 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +1 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +16 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +9 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +1 -0
- package/build/{gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-3BB4aqZs.d.ts → es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts} +49 -74
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +69 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +1 -0
- package/build/{internal/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-DMPoOveb.d.ts → es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts} +62 -42
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +143 -0
- package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +5 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +14 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +1 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +3 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +79 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +1 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +13 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +47 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +1 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +16 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +19 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +1 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts +536 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +72 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +1 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +588 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +170 -0
- package/build/internal/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.d.ts +5 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js +5 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map +1 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.d.ts +3 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js +75 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map +1 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.d.ts +13 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js +20 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js.map +1 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.d.ts +16 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js +9 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js.map +1 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.d.ts +536 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js +69 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js.map +1 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.d.ts +588 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js +143 -0
- package/build/internal/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -18
- package/build/index.d.ts +0 -18
- package/build/index.js +0 -256
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -226
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -18
- package/build/internal/index.d.ts +0 -18
- package/build/internal/index.js +0 -256
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -226
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -495
- package/build/internal/meta.d.ts +0 -495
- package/build/internal/meta.js +0 -127
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -100
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -495
- package/build/meta.d.ts +0 -495
- package/build/meta.js +0 -127
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -100
- package/build/meta.mjs.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
export interface DeliveryRatesGateway {
|
|
2
3
|
/**
|
|
3
4
|
* @format GUID
|
|
4
5
|
* @readonly
|
|
5
6
|
*/
|
|
6
7
|
_id?: string | null;
|
|
7
8
|
}
|
|
8
|
-
interface GetDeliverySolutionsRequest {
|
|
9
|
+
export interface GetDeliverySolutionsRequest {
|
|
9
10
|
/**
|
|
10
11
|
* list of items to delivery that each of them points to delivery profile and delivery rule.
|
|
11
12
|
* @minSize 1
|
|
@@ -42,12 +43,11 @@ interface GetDeliverySolutionsRequest {
|
|
|
42
43
|
/**
|
|
43
44
|
* Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
|
|
44
45
|
* For example, a Wix Pay Link ID.
|
|
45
|
-
* @internal
|
|
46
46
|
* @maxSize 20
|
|
47
47
|
*/
|
|
48
48
|
externalReferences?: ExternalReference[];
|
|
49
49
|
}
|
|
50
|
-
interface DeliverableItem {
|
|
50
|
+
export interface DeliverableItem {
|
|
51
51
|
/**
|
|
52
52
|
* The ID of the line item.
|
|
53
53
|
* @minLength 1
|
|
@@ -101,7 +101,7 @@ interface DeliverableItem {
|
|
|
101
101
|
taxIncludedInPrice?: boolean | null;
|
|
102
102
|
}
|
|
103
103
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
104
|
-
interface CatalogReference {
|
|
104
|
+
export interface CatalogReference {
|
|
105
105
|
/**
|
|
106
106
|
* ID of the item within the catalog it belongs to.
|
|
107
107
|
* @minLength 1
|
|
@@ -127,7 +127,7 @@ interface CatalogReference {
|
|
|
127
127
|
*/
|
|
128
128
|
options?: Record<string, any> | null;
|
|
129
129
|
}
|
|
130
|
-
interface PhysicalProperties {
|
|
130
|
+
export interface PhysicalProperties {
|
|
131
131
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
132
132
|
weight?: number | null;
|
|
133
133
|
/**
|
|
@@ -139,7 +139,7 @@ interface PhysicalProperties {
|
|
|
139
139
|
shippable?: boolean;
|
|
140
140
|
}
|
|
141
141
|
/** Physical address */
|
|
142
|
-
interface Address extends AddressStreetOneOf {
|
|
142
|
+
export interface Address extends AddressStreetOneOf {
|
|
143
143
|
/** Street name and number. */
|
|
144
144
|
streetAddress?: StreetAddress;
|
|
145
145
|
/** Main address line, usually street and number as free text. */
|
|
@@ -159,31 +159,31 @@ interface Address extends AddressStreetOneOf {
|
|
|
159
159
|
addressLine2?: string | null;
|
|
160
160
|
}
|
|
161
161
|
/** @oneof */
|
|
162
|
-
interface AddressStreetOneOf {
|
|
162
|
+
export interface AddressStreetOneOf {
|
|
163
163
|
/** Street name and number. */
|
|
164
164
|
streetAddress?: StreetAddress;
|
|
165
165
|
/** Main address line, usually street and number as free text. */
|
|
166
166
|
addressLine?: string | null;
|
|
167
167
|
}
|
|
168
|
-
interface StreetAddress {
|
|
168
|
+
export interface StreetAddress {
|
|
169
169
|
/** Street number. */
|
|
170
170
|
number?: string;
|
|
171
171
|
/** Street name. */
|
|
172
172
|
name?: string;
|
|
173
173
|
}
|
|
174
|
-
interface AddressLocation {
|
|
174
|
+
export interface AddressLocation {
|
|
175
175
|
/** Address latitude. */
|
|
176
176
|
latitude?: number | null;
|
|
177
177
|
/** Address longitude. */
|
|
178
178
|
longitude?: number | null;
|
|
179
179
|
}
|
|
180
|
-
interface Subdivision {
|
|
180
|
+
export interface Subdivision {
|
|
181
181
|
/** Short subdivision code. */
|
|
182
182
|
code?: string;
|
|
183
183
|
/** Subdivision full name. */
|
|
184
184
|
name?: string;
|
|
185
185
|
}
|
|
186
|
-
declare enum SubdivisionType {
|
|
186
|
+
export declare enum SubdivisionType {
|
|
187
187
|
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
188
188
|
/** State */
|
|
189
189
|
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
@@ -199,7 +199,7 @@ declare enum SubdivisionType {
|
|
|
199
199
|
COUNTRY = "COUNTRY"
|
|
200
200
|
}
|
|
201
201
|
/** Full contact details for an address */
|
|
202
|
-
interface FullAddressContactDetails {
|
|
202
|
+
export interface FullAddressContactDetails {
|
|
203
203
|
/** Contact's first name. */
|
|
204
204
|
firstName?: string | null;
|
|
205
205
|
/** Contact's last name. */
|
|
@@ -219,7 +219,7 @@ interface FullAddressContactDetails {
|
|
|
219
219
|
/** Tax info. Currently usable only in Brazil. */
|
|
220
220
|
vatId?: VatId;
|
|
221
221
|
}
|
|
222
|
-
interface VatId {
|
|
222
|
+
export interface VatId {
|
|
223
223
|
/** Customer's tax ID. */
|
|
224
224
|
_id?: string;
|
|
225
225
|
/**
|
|
@@ -232,14 +232,14 @@ interface VatId {
|
|
|
232
232
|
type?: VatType;
|
|
233
233
|
}
|
|
234
234
|
/** tax info types */
|
|
235
|
-
declare enum VatType {
|
|
235
|
+
export declare enum VatType {
|
|
236
236
|
UNSPECIFIED = "UNSPECIFIED",
|
|
237
237
|
/** CPF - for individual tax payers. */
|
|
238
238
|
CPF = "CPF",
|
|
239
239
|
/** CNPJ - for corporations */
|
|
240
240
|
CNPJ = "CNPJ"
|
|
241
241
|
}
|
|
242
|
-
declare enum WeightUnit {
|
|
242
|
+
export declare enum WeightUnit {
|
|
243
243
|
/** Weight unit can't be classified due to an error. */
|
|
244
244
|
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
245
245
|
/** Kilograms. */
|
|
@@ -247,7 +247,7 @@ declare enum WeightUnit {
|
|
|
247
247
|
/** Pounds. */
|
|
248
248
|
LB = "LB"
|
|
249
249
|
}
|
|
250
|
-
interface UserPreference {
|
|
250
|
+
export interface UserPreference {
|
|
251
251
|
/**
|
|
252
252
|
* The delivery carrier app id
|
|
253
253
|
* @format GUID
|
|
@@ -259,7 +259,7 @@ interface UserPreference {
|
|
|
259
259
|
*/
|
|
260
260
|
code?: string;
|
|
261
261
|
}
|
|
262
|
-
interface ExternalReference {
|
|
262
|
+
export interface ExternalReference {
|
|
263
263
|
/**
|
|
264
264
|
* ID of the app associated with the purchase flow.
|
|
265
265
|
* For example, the Wix Pay Links app ID.
|
|
@@ -280,7 +280,7 @@ interface ExternalReference {
|
|
|
280
280
|
* Each delivery option has a list of items that can be delivered by it - the chosen one
|
|
281
281
|
* on Errors throw a business error from TC to catch and trigger destination completion
|
|
282
282
|
*/
|
|
283
|
-
interface GetDeliverySolutionsResponse {
|
|
283
|
+
export interface GetDeliverySolutionsResponse {
|
|
284
284
|
/**
|
|
285
285
|
* Delivery Options with their associated items
|
|
286
286
|
* @maxSize 300
|
|
@@ -292,7 +292,7 @@ interface GetDeliverySolutionsResponse {
|
|
|
292
292
|
*/
|
|
293
293
|
errors?: DeliveryCarrierError[];
|
|
294
294
|
}
|
|
295
|
-
interface DeliverySolution {
|
|
295
|
+
export interface DeliverySolution {
|
|
296
296
|
/**
|
|
297
297
|
* Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
|
|
298
298
|
* @maxLength 250
|
|
@@ -316,7 +316,7 @@ interface DeliverySolution {
|
|
|
316
316
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
317
317
|
partial?: boolean | null;
|
|
318
318
|
}
|
|
319
|
-
interface DeliveryLogistics {
|
|
319
|
+
export interface DeliveryLogistics {
|
|
320
320
|
/**
|
|
321
321
|
* When the item is expected to be delivered in free text. For example, `"3-5 business days"`.
|
|
322
322
|
* @maxLength 1000
|
|
@@ -332,7 +332,7 @@ interface DeliveryLogistics {
|
|
|
332
332
|
/** Date and Time of the delivery option */
|
|
333
333
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
334
334
|
}
|
|
335
|
-
interface PickupDetails {
|
|
335
|
+
export interface PickupDetails {
|
|
336
336
|
/** Pickup address. */
|
|
337
337
|
address?: Address;
|
|
338
338
|
/**
|
|
@@ -344,18 +344,18 @@ interface PickupDetails {
|
|
|
344
344
|
*/
|
|
345
345
|
pickupMethod?: PickupMethod;
|
|
346
346
|
}
|
|
347
|
-
declare enum PickupMethod {
|
|
347
|
+
export declare enum PickupMethod {
|
|
348
348
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
349
349
|
STORE_PICKUP = "STORE_PICKUP",
|
|
350
350
|
PICKUP_POINT = "PICKUP_POINT"
|
|
351
351
|
}
|
|
352
|
-
interface DeliveryTimeSlot {
|
|
352
|
+
export interface DeliveryTimeSlot {
|
|
353
353
|
/** starting time of the delivery time slot */
|
|
354
354
|
from?: Date | null;
|
|
355
355
|
/** ending time of the delivery time slot */
|
|
356
356
|
to?: Date | null;
|
|
357
357
|
}
|
|
358
|
-
interface DeliveryCost {
|
|
358
|
+
export interface DeliveryCost {
|
|
359
359
|
/**
|
|
360
360
|
* The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).
|
|
361
361
|
* @format DECIMAL_VALUE
|
|
@@ -373,7 +373,7 @@ interface DeliveryCost {
|
|
|
373
373
|
*/
|
|
374
374
|
additionalCharges?: AdditionalCharge[];
|
|
375
375
|
}
|
|
376
|
-
interface AdditionalCharge {
|
|
376
|
+
export interface AdditionalCharge {
|
|
377
377
|
/** Additional charge type. */
|
|
378
378
|
type?: ChargeType;
|
|
379
379
|
/**
|
|
@@ -388,10 +388,10 @@ interface AdditionalCharge {
|
|
|
388
388
|
*/
|
|
389
389
|
price?: string;
|
|
390
390
|
}
|
|
391
|
-
declare enum ChargeType {
|
|
391
|
+
export declare enum ChargeType {
|
|
392
392
|
HANDLING_FEE = "HANDLING_FEE"
|
|
393
393
|
}
|
|
394
|
-
interface DeliveryAllocation {
|
|
394
|
+
export interface DeliveryAllocation {
|
|
395
395
|
/** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
|
|
396
396
|
deliveryCarrier?: Carrier;
|
|
397
397
|
/** The delivery region that are relevant for this delivery solution. */
|
|
@@ -399,7 +399,7 @@ interface DeliveryAllocation {
|
|
|
399
399
|
/** Populated if the delivery solution is a partially supplied by this carrier. */
|
|
400
400
|
applicableLineItems?: ApplicableLineItems;
|
|
401
401
|
}
|
|
402
|
-
interface Carrier {
|
|
402
|
+
export interface Carrier {
|
|
403
403
|
/**
|
|
404
404
|
* The carrier app id
|
|
405
405
|
* @format GUID
|
|
@@ -411,7 +411,7 @@ interface Carrier {
|
|
|
411
411
|
*/
|
|
412
412
|
code?: string;
|
|
413
413
|
}
|
|
414
|
-
interface Region {
|
|
414
|
+
export interface Region {
|
|
415
415
|
/**
|
|
416
416
|
* The delivery region id.
|
|
417
417
|
* @format GUID
|
|
@@ -423,7 +423,7 @@ interface Region {
|
|
|
423
423
|
*/
|
|
424
424
|
name?: string | null;
|
|
425
425
|
}
|
|
426
|
-
interface ApplicableLineItems {
|
|
426
|
+
export interface ApplicableLineItems {
|
|
427
427
|
/**
|
|
428
428
|
* Line items that the delivery solution is for.
|
|
429
429
|
* @maxSize 300
|
|
@@ -432,7 +432,7 @@ interface ApplicableLineItems {
|
|
|
432
432
|
*/
|
|
433
433
|
lineItemIds?: string[];
|
|
434
434
|
}
|
|
435
|
-
interface DeliveryCarrierError {
|
|
435
|
+
export interface DeliveryCarrierError {
|
|
436
436
|
/**
|
|
437
437
|
* The carrier app id
|
|
438
438
|
* @format GUID
|
|
@@ -441,7 +441,7 @@ interface DeliveryCarrierError {
|
|
|
441
441
|
/** The error details */
|
|
442
442
|
errorDetails?: Details;
|
|
443
443
|
}
|
|
444
|
-
interface Details extends DetailsKindOneOf {
|
|
444
|
+
export interface Details extends DetailsKindOneOf {
|
|
445
445
|
applicationError?: ApplicationError;
|
|
446
446
|
validationError?: ValidationError;
|
|
447
447
|
systemError?: SystemError;
|
|
@@ -452,12 +452,12 @@ interface Details extends DetailsKindOneOf {
|
|
|
452
452
|
tracing?: Record<string, string>;
|
|
453
453
|
}
|
|
454
454
|
/** @oneof */
|
|
455
|
-
interface DetailsKindOneOf {
|
|
455
|
+
export interface DetailsKindOneOf {
|
|
456
456
|
applicationError?: ApplicationError;
|
|
457
457
|
validationError?: ValidationError;
|
|
458
458
|
systemError?: SystemError;
|
|
459
459
|
}
|
|
460
|
-
interface ApplicationError {
|
|
460
|
+
export interface ApplicationError {
|
|
461
461
|
/** Error code. */
|
|
462
462
|
code?: string;
|
|
463
463
|
/** Description of the error. */
|
|
@@ -497,10 +497,10 @@ interface ApplicationError {
|
|
|
497
497
|
* ]
|
|
498
498
|
* }
|
|
499
499
|
*/
|
|
500
|
-
interface ValidationError {
|
|
500
|
+
export interface ValidationError {
|
|
501
501
|
fieldViolations?: FieldViolation[];
|
|
502
502
|
}
|
|
503
|
-
declare enum RuleType {
|
|
503
|
+
export declare enum RuleType {
|
|
504
504
|
VALIDATION = "VALIDATION",
|
|
505
505
|
OTHER = "OTHER",
|
|
506
506
|
MAX = "MAX",
|
|
@@ -523,7 +523,7 @@ declare enum RuleType {
|
|
|
523
523
|
EXACT_SIZE = "EXACT_SIZE",
|
|
524
524
|
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
525
525
|
}
|
|
526
|
-
interface FieldViolation {
|
|
526
|
+
export interface FieldViolation {
|
|
527
527
|
field?: string;
|
|
528
528
|
description?: string;
|
|
529
529
|
violatedRule?: RuleType;
|
|
@@ -531,11 +531,27 @@ interface FieldViolation {
|
|
|
531
531
|
ruleName?: string | null;
|
|
532
532
|
data?: Record<string, any> | null;
|
|
533
533
|
}
|
|
534
|
-
interface SystemError {
|
|
534
|
+
export interface SystemError {
|
|
535
535
|
/** Error code. */
|
|
536
536
|
errorCode?: string | null;
|
|
537
537
|
}
|
|
538
|
-
|
|
538
|
+
/**
|
|
539
|
+
* Get Delivery Solutions for the given line items from all relevant delivery carriers
|
|
540
|
+
* @param lineItems - list of items to delivery that each of them points to delivery profile and delivery rule.
|
|
541
|
+
* @public
|
|
542
|
+
* @documentationMaturity preview
|
|
543
|
+
* @requiredField lineItems
|
|
544
|
+
* @requiredField options.currency
|
|
545
|
+
* @requiredField options.destination
|
|
546
|
+
* @requiredField options.destination.country
|
|
547
|
+
* @permissionId ECOM.DELIVERY_SOLUTION_READ
|
|
548
|
+
* @applicableIdentity VISITOR
|
|
549
|
+
* @returns Each delivery option has a list of items that can be delivered by it - the chosen one
|
|
550
|
+
* on Errors throw a business error from TC to catch and trigger destination completion
|
|
551
|
+
* @fqn wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions
|
|
552
|
+
*/
|
|
553
|
+
export declare function getDeliverySolutions(lineItems: DeliverableItem[], options?: NonNullablePaths<GetDeliverySolutionsOptions, `currency` | `destination` | `destination.country`>): Promise<NonNullablePaths<GetDeliverySolutionsResponse, `deliverySolutions` | `deliverySolutions.${number}.code` | `deliverySolutions.${number}.title` | `deliverySolutions.${number}.logistics.pickupDetails.address.streetAddress.number` | `deliverySolutions.${number}.logistics.pickupDetails.address.streetAddress.name` | `deliverySolutions.${number}.logistics.pickupDetails.pickupMethod` | `deliverySolutions.${number}.cost.price` | `deliverySolutions.${number}.cost.currency` | `errors` | `errors.${number}.errorDetails.applicationError.code` | `errors.${number}.errorDetails.applicationError.description`>>;
|
|
554
|
+
export interface GetDeliverySolutionsOptions {
|
|
539
555
|
/** Destination the items should deliver to */
|
|
540
556
|
destination: Address;
|
|
541
557
|
/**
|
|
@@ -563,6 +579,10 @@ interface GetDeliverySolutionsOptions {
|
|
|
563
579
|
* @format GUID
|
|
564
580
|
*/
|
|
565
581
|
purchaseFlowId?: string | null;
|
|
582
|
+
/**
|
|
583
|
+
* Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
|
|
584
|
+
* For example, a Wix Pay Link ID.
|
|
585
|
+
* @maxSize 20
|
|
586
|
+
*/
|
|
587
|
+
externalReferences?: ExternalReference[];
|
|
566
588
|
}
|
|
567
|
-
|
|
568
|
-
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 };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.getDeliverySolutions = exports.RuleType = exports.ChargeType = exports.PickupMethod = exports.WeightUnit = exports.VatType = exports.SubdivisionType = void 0;
|
|
27
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
+
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
29
|
+
const ambassadorWixGatewaysEcomV1DeliveryRatesGateway = __importStar(require("./gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js"));
|
|
30
|
+
const address_1 = require("@wix/sdk-runtime/transformations/address");
|
|
31
|
+
const address_2 = require("@wix/sdk-runtime/transformations/address");
|
|
32
|
+
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
33
|
+
var SubdivisionType;
|
|
34
|
+
(function (SubdivisionType) {
|
|
35
|
+
SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
|
|
36
|
+
/** State */
|
|
37
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
|
|
38
|
+
/** County */
|
|
39
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
|
|
40
|
+
/** City/town */
|
|
41
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
|
|
42
|
+
/** Neighborhood/quarter */
|
|
43
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
|
|
44
|
+
/** Street/block */
|
|
45
|
+
SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
|
|
46
|
+
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
47
|
+
SubdivisionType["COUNTRY"] = "COUNTRY";
|
|
48
|
+
})(SubdivisionType || (exports.SubdivisionType = SubdivisionType = {}));
|
|
49
|
+
/** tax info types */
|
|
50
|
+
var VatType;
|
|
51
|
+
(function (VatType) {
|
|
52
|
+
VatType["UNSPECIFIED"] = "UNSPECIFIED";
|
|
53
|
+
/** CPF - for individual tax payers. */
|
|
54
|
+
VatType["CPF"] = "CPF";
|
|
55
|
+
/** CNPJ - for corporations */
|
|
56
|
+
VatType["CNPJ"] = "CNPJ";
|
|
57
|
+
})(VatType || (exports.VatType = VatType = {}));
|
|
58
|
+
var WeightUnit;
|
|
59
|
+
(function (WeightUnit) {
|
|
60
|
+
/** Weight unit can't be classified due to an error. */
|
|
61
|
+
WeightUnit["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
|
|
62
|
+
/** Kilograms. */
|
|
63
|
+
WeightUnit["KG"] = "KG";
|
|
64
|
+
/** Pounds. */
|
|
65
|
+
WeightUnit["LB"] = "LB";
|
|
66
|
+
})(WeightUnit || (exports.WeightUnit = WeightUnit = {}));
|
|
67
|
+
var PickupMethod;
|
|
68
|
+
(function (PickupMethod) {
|
|
69
|
+
PickupMethod["UNKNOWN_METHOD"] = "UNKNOWN_METHOD";
|
|
70
|
+
PickupMethod["STORE_PICKUP"] = "STORE_PICKUP";
|
|
71
|
+
PickupMethod["PICKUP_POINT"] = "PICKUP_POINT";
|
|
72
|
+
})(PickupMethod || (exports.PickupMethod = PickupMethod = {}));
|
|
73
|
+
var ChargeType;
|
|
74
|
+
(function (ChargeType) {
|
|
75
|
+
ChargeType["HANDLING_FEE"] = "HANDLING_FEE";
|
|
76
|
+
})(ChargeType || (exports.ChargeType = ChargeType = {}));
|
|
77
|
+
var RuleType;
|
|
78
|
+
(function (RuleType) {
|
|
79
|
+
RuleType["VALIDATION"] = "VALIDATION";
|
|
80
|
+
RuleType["OTHER"] = "OTHER";
|
|
81
|
+
RuleType["MAX"] = "MAX";
|
|
82
|
+
RuleType["MIN"] = "MIN";
|
|
83
|
+
RuleType["MAX_LENGTH"] = "MAX_LENGTH";
|
|
84
|
+
RuleType["MIN_LENGTH"] = "MIN_LENGTH";
|
|
85
|
+
RuleType["MAX_SIZE"] = "MAX_SIZE";
|
|
86
|
+
RuleType["MIN_SIZE"] = "MIN_SIZE";
|
|
87
|
+
RuleType["FORMAT"] = "FORMAT";
|
|
88
|
+
RuleType["DECIMAL_LTE"] = "DECIMAL_LTE";
|
|
89
|
+
RuleType["DECIMAL_GTE"] = "DECIMAL_GTE";
|
|
90
|
+
RuleType["DECIMAL_LT"] = "DECIMAL_LT";
|
|
91
|
+
RuleType["DECIMAL_GT"] = "DECIMAL_GT";
|
|
92
|
+
RuleType["DECIMAL_MAX_SCALE"] = "DECIMAL_MAX_SCALE";
|
|
93
|
+
RuleType["INVALID_ENUM_VALUE"] = "INVALID_ENUM_VALUE";
|
|
94
|
+
RuleType["REQUIRED_FIELD"] = "REQUIRED_FIELD";
|
|
95
|
+
RuleType["FIELD_NOT_ALLOWED"] = "FIELD_NOT_ALLOWED";
|
|
96
|
+
RuleType["ONE_OF_ALIGNMENT"] = "ONE_OF_ALIGNMENT";
|
|
97
|
+
RuleType["EXACT_LENGTH"] = "EXACT_LENGTH";
|
|
98
|
+
RuleType["EXACT_SIZE"] = "EXACT_SIZE";
|
|
99
|
+
RuleType["REQUIRED_ONE_OF_FIELD"] = "REQUIRED_ONE_OF_FIELD";
|
|
100
|
+
})(RuleType || (exports.RuleType = RuleType = {}));
|
|
101
|
+
/**
|
|
102
|
+
* Get Delivery Solutions for the given line items from all relevant delivery carriers
|
|
103
|
+
* @param lineItems - list of items to delivery that each of them points to delivery profile and delivery rule.
|
|
104
|
+
* @public
|
|
105
|
+
* @documentationMaturity preview
|
|
106
|
+
* @requiredField lineItems
|
|
107
|
+
* @requiredField options.currency
|
|
108
|
+
* @requiredField options.destination
|
|
109
|
+
* @requiredField options.destination.country
|
|
110
|
+
* @permissionId ECOM.DELIVERY_SOLUTION_READ
|
|
111
|
+
* @applicableIdentity VISITOR
|
|
112
|
+
* @returns Each delivery option has a list of items that can be delivered by it - the chosen one
|
|
113
|
+
* on Errors throw a business error from TC to catch and trigger destination completion
|
|
114
|
+
* @fqn wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions
|
|
115
|
+
*/
|
|
116
|
+
async function getDeliverySolutions(lineItems, options) {
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
119
|
+
const payload = (0, transform_paths_1.transformPaths)((0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
120
|
+
lineItems: lineItems,
|
|
121
|
+
destination: options?.destination,
|
|
122
|
+
origin: options?.origin,
|
|
123
|
+
currency: options?.currency,
|
|
124
|
+
contactDetails: options?.contactDetails,
|
|
125
|
+
weightUnit: options?.weightUnit,
|
|
126
|
+
userPreferences: options?.userPreferences,
|
|
127
|
+
purchaseFlowId: options?.purchaseFlowId,
|
|
128
|
+
externalReferences: options?.externalReferences,
|
|
129
|
+
}), [
|
|
130
|
+
{
|
|
131
|
+
transformFn: address_1.transformSDKAddressToRESTAddress,
|
|
132
|
+
paths: [{ path: 'destination' }, { path: 'origin' }],
|
|
133
|
+
},
|
|
134
|
+
]);
|
|
135
|
+
const reqOpts = ambassadorWixGatewaysEcomV1DeliveryRatesGateway.getDeliverySolutions(payload);
|
|
136
|
+
sideEffects?.onSiteCall?.();
|
|
137
|
+
try {
|
|
138
|
+
const result = await httpClient.request(reqOpts);
|
|
139
|
+
sideEffects?.onSuccess?.(result);
|
|
140
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(result.data, [
|
|
141
|
+
{
|
|
142
|
+
transformFn: address_2.transformRESTAddressToSDKAddress,
|
|
143
|
+
paths: [
|
|
144
|
+
{ path: 'deliverySolutions.logistics.pickupDetails.address' },
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
]));
|
|
148
|
+
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
151
|
+
spreadPathsToArguments: {},
|
|
152
|
+
explicitPathsToArguments: {
|
|
153
|
+
lineItems: '$[0]',
|
|
154
|
+
destination: '$[1].destination',
|
|
155
|
+
origin: '$[1].origin',
|
|
156
|
+
currency: '$[1].currency',
|
|
157
|
+
contactDetails: '$[1].contactDetails',
|
|
158
|
+
weightUnit: '$[1].weightUnit',
|
|
159
|
+
userPreferences: '$[1].userPreferences',
|
|
160
|
+
purchaseFlowId: '$[1].purchaseFlowId',
|
|
161
|
+
externalReferences: '$[1].externalReferences',
|
|
162
|
+
},
|
|
163
|
+
singleArgumentUnchanged: false,
|
|
164
|
+
}, ['lineItems', 'options']);
|
|
165
|
+
sideEffects?.onError?.(err);
|
|
166
|
+
throw transformedError;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
exports.getDeliverySolutions = getDeliverySolutions;
|
|
170
|
+
//# sourceMappingURL=gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map
|
package/build/cjs/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js","sourceRoot":"","sources":["../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.ts"],"names":[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,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,IAAA,gEAAuC,EAC5C,IAAA,gCAAc,EAAC,MAAM,CAAC,IAAI,EAAE;YAC1B;gBACE,WAAW,EAAE,0CAAgC;gBAC7C,KAAK,EAAE;oBACL,EAAE,IAAI,EAAE,mDAAmD,EAAE;iBAC9D;aACF;SACF,CAAC,CACF,CAAC;IACL,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE;gBACxB,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,kBAAkB;gBAC/B,MAAM,EAAE,aAAa;gBACrB,QAAQ,EAAE,eAAe;gBACzB,cAAc,EAAE,qBAAqB;gBACrC,UAAU,EAAE,iBAAiB;gBAC7B,eAAe,EAAE,sBAAsB;gBACvC,cAAc,EAAE,qBAAqB;gBACrC,kBAAkB,EAAE,yBAAyB;aAC9C;YACD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,WAAW,EAAE,SAAS,CAAC,CACzB,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AA5FD,oDA4FC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,6EAA6E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,+EAA+E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js';
|
package/build/es/meta.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,0EAA0E,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { getDeliverySolutions as publicGetDeliverySolutions } from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js';
|
|
2
|
+
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
3
|
+
export declare const getDeliverySolutions: MaybeContext<BuildRESTFunction<typeof publicGetDeliverySolutions> & typeof publicGetDeliverySolutions>;
|
|
4
|
+
export { SubdivisionType, VatType, WeightUnit, PickupMethod, ChargeType, RuleType, } from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';
|
|
5
|
+
export { DeliveryRatesGateway, GetDeliverySolutionsRequest, DeliverableItem, CatalogReference, PhysicalProperties, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, FullAddressContactDetails, VatId, UserPreference, ExternalReference, GetDeliverySolutionsResponse, DeliverySolution, DeliveryLogistics, PickupDetails, DeliveryTimeSlot, DeliveryCost, AdditionalCharge, DeliveryAllocation, Carrier, Region, ApplicableLineItems, DeliveryCarrierError, Details, DetailsKindOneOf, ApplicationError, ValidationError, FieldViolation, SystemError, GetDeliverySolutionsOptions, } from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { getDeliverySolutions as publicGetDeliverySolutions } from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js';
|
|
2
|
+
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
|
|
3
|
+
export const getDeliverySolutions = /*#__PURE__*/ createRESTModule(publicGetDeliverySolutions);
|
|
4
|
+
export { SubdivisionType, VatType, WeightUnit, PickupMethod, ChargeType, RuleType, } from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';
|
|
5
|
+
//# sourceMappingURL=gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map
|
package/build/es/src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.js","sourceRoot":"","sources":["../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,IAAI,0BAA0B,EAAE,MAAM,wEAAwE,CAAC;AAC5I,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,oBAAoB,GAG7B,aAAa,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;AAE/D,OAAO,EACL,eAAe,EACf,OAAO,EACP,UAAU,EACV,YAAY,EACZ,UAAU,EACV,QAAQ,GACT,MAAM,2EAA2E,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';
|
|
2
|
+
import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
|
|
3
|
+
import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
4
|
+
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
5
|
+
import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
|
|
6
|
+
function resolveWixEcomDeliveryprofileV1DeliveryRatesUrl(opts) {
|
|
7
|
+
const domainToMappings = {
|
|
8
|
+
'api._api_base_domain_': [
|
|
9
|
+
{
|
|
10
|
+
srcPath: '/delivery-rates',
|
|
11
|
+
destPath: '',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
_: [
|
|
15
|
+
{
|
|
16
|
+
srcPath: '/_api/delivery-rates',
|
|
17
|
+
destPath: '',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
22
|
+
}
|
|
23
|
+
const PACKAGE_NAME = '@wix/auto_sdk_ecom_delivery-solutions';
|
|
24
|
+
/** Get Delivery Solutions for the given line items from all relevant delivery carriers */
|
|
25
|
+
export function getDeliverySolutions(payload) {
|
|
26
|
+
function __getDeliverySolutions({ host }) {
|
|
27
|
+
const serializedData = transformPaths(payload, [
|
|
28
|
+
{
|
|
29
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
30
|
+
paths: [
|
|
31
|
+
{ path: 'lineItems.physicalProperties.weight' },
|
|
32
|
+
{ path: 'destination.geocode.latitude' },
|
|
33
|
+
{ path: 'destination.geocode.longitude' },
|
|
34
|
+
{ path: 'origin.geocode.latitude' },
|
|
35
|
+
{ path: 'origin.geocode.longitude' },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
]);
|
|
39
|
+
const metadata = {
|
|
40
|
+
entityFqdn: 'wix.gateways.ecom.v1.delivery_rates_gateway',
|
|
41
|
+
method: 'POST',
|
|
42
|
+
methodFqn: 'wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions',
|
|
43
|
+
packageName: PACKAGE_NAME,
|
|
44
|
+
url: resolveWixEcomDeliveryprofileV1DeliveryRatesUrl({
|
|
45
|
+
protoPath: '/v1/get-delivery-solutions',
|
|
46
|
+
data: serializedData,
|
|
47
|
+
host,
|
|
48
|
+
}),
|
|
49
|
+
data: serializedData,
|
|
50
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
51
|
+
{
|
|
52
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
53
|
+
paths: [
|
|
54
|
+
{
|
|
55
|
+
path: 'deliverySolutions.logistics.pickupDetails.address.geocode.latitude',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
path: 'deliverySolutions.logistics.pickupDetails.address.geocode.longitude',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
64
|
+
paths: [
|
|
65
|
+
{ path: 'deliverySolutions.logistics.deliveryTimeSlot.from' },
|
|
66
|
+
{ path: 'deliverySolutions.logistics.deliveryTimeSlot.to' },
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
]),
|
|
70
|
+
};
|
|
71
|
+
return metadata;
|
|
72
|
+
}
|
|
73
|
+
return __getDeliverySolutions;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js","sourceRoot":"","sources":["../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,+CAA+C,CACtD,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,CAAC,EAAE;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF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