@shipengine/connect-carrier-api 4.26.4 → 4.26.6
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/lib/models/addresses/address-base-schema.js +14 -2
- package/lib/models/addresses/address-base-schema.js.map +1 -1
- package/lib/models/addresses/address-base.d.ts +30 -2
- package/lib/models/addresses/address-base.js +27 -2
- package/lib/models/addresses/address-base.js.map +1 -1
- package/lib/models/addresses/index.d.ts +0 -1
- package/lib/models/addresses/index.js +0 -1
- package/lib/models/addresses/index.js.map +1 -1
- package/lib/models/addresses/pudo-location-schema.js +0 -10
- package/lib/models/addresses/pudo-location-schema.js.map +1 -1
- package/lib/models/addresses/pudo-location.d.ts +3 -16
- package/lib/models/addresses/pudo-location.js +3 -16
- package/lib/models/addresses/pudo-location.js.map +1 -1
- package/lib/models/customs/customs-content-types.d.ts +5 -1
- package/lib/models/customs/customs-content-types.js +4 -0
- package/lib/models/customs/customs-content-types.js.map +1 -1
- package/lib/models/documents/uploads/document-upload-shipment.d.ts +2 -0
- package/lib/models/documents/uploads/document-upload-shipment.js +2 -0
- package/lib/models/documents/uploads/document-upload-shipment.js.map +1 -1
- package/package.json +1 -1
- package/spec.json +14 -26
- package/src/models/addresses/address-base-schema.ts +14 -2
- package/src/models/addresses/address-base.ts +28 -2
- package/src/models/addresses/index.ts +0 -1
- package/src/models/addresses/pudo-location-schema.ts +0 -10
- package/src/models/addresses/pudo-location.ts +3 -16
- package/src/models/customs/customs-content-types.ts +4 -0
- package/src/models/documents/uploads/document-upload-shipment.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/models/addresses/address-common-schema.d.ts +0 -2
- package/lib/models/addresses/address-common-schema.js +0 -21
- package/lib/models/addresses/address-common-schema.js.map +0 -1
- package/lib/models/addresses/address-common.d.ts +0 -31
- package/lib/models/addresses/address-common.js +0 -33
- package/lib/models/addresses/address-common.js.map +0 -1
- package/src/models/addresses/address-common-schema.ts +0 -17
- package/src/models/addresses/address-common.ts +0 -30
|
@@ -3,9 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AddressBaseSchema = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const joi_1 = tslib_1.__importDefault(require("joi"));
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
exports.AddressBaseSchema = joi_1.default.object({
|
|
7
|
+
name: joi_1.default.string().optional().empty(),
|
|
8
|
+
first_name: joi_1.default.string().optional().empty(),
|
|
9
|
+
last_name: joi_1.default.string().optional().empty(),
|
|
10
|
+
email: joi_1.default.string().email().optional().empty(),
|
|
11
|
+
phone_number: joi_1.default.string().optional().empty(),
|
|
12
|
+
company_name: joi_1.default.string().optional().empty(),
|
|
13
|
+
address_lines: joi_1.default.array().items(joi_1.default.string()).optional(),
|
|
14
|
+
city_locality: joi_1.default.string().optional().empty(),
|
|
15
|
+
state_province: joi_1.default.string().optional().empty(),
|
|
8
16
|
postal_code: joi_1.default.string().required(),
|
|
9
17
|
country_code: joi_1.default.string().required(),
|
|
18
|
+
address_residential_indicator: joi_1.default.string().optional().empty(),
|
|
19
|
+
is_eu: joi_1.default.boolean().optional(),
|
|
20
|
+
address_metadata: joi_1.default.object().optional().empty(),
|
|
21
|
+
instructions: joi_1.default.string().optional().empty(),
|
|
10
22
|
});
|
|
11
23
|
//# sourceMappingURL=address-base-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-base-schema.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;
|
|
1
|
+
{"version":3,"file":"address-base-schema.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAET,QAAA,iBAAiB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IACrC,UAAU,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAC3C,SAAS,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAC1C,KAAK,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAC9C,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAC7C,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAC7C,aAAa,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,aAAG,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzD,aAAa,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAC9C,cAAc,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAC/C,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,6BAA6B,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IAC9D,KAAK,EAAE,aAAG,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,gBAAgB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;IACjD,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;CAC9C,CAAC,CAAC"}
|
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class AddressBase
|
|
1
|
+
import { AddressResidentialIndicator } from './address-residential-indicator';
|
|
2
|
+
export declare class AddressBase {
|
|
3
|
+
/** @description The full name of the contact contact associated with the address */
|
|
4
|
+
name?: string;
|
|
5
|
+
/** @description The first name of the contact associated with the address */
|
|
6
|
+
first_name?: string;
|
|
7
|
+
/** @description The last name of the contact associated with the address */
|
|
8
|
+
last_name?: string;
|
|
9
|
+
/** @description The email of the contact associated with the address */
|
|
10
|
+
email?: string;
|
|
11
|
+
/** @description The phone number of the contact associated with the address (No Newline Characters) */
|
|
12
|
+
phone_number?: string;
|
|
13
|
+
/** @description The name of the company associated with this address (No Newline Characters) max length 100 characters */
|
|
14
|
+
company_name?: string;
|
|
15
|
+
/** @description The address lines of the address (No Newline Characters) max length 100 characters */
|
|
16
|
+
address_lines?: string[];
|
|
17
|
+
/** @description City or locality (No Newline Characters) */
|
|
18
|
+
city_locality?: string;
|
|
19
|
+
/** @description State or province (No Newline Characters) */
|
|
20
|
+
state_province?: string;
|
|
3
21
|
/** @description Zip or postal code (No Newline Characters) */
|
|
4
22
|
postal_code: string;
|
|
5
23
|
/** @description ISO 3166-1 two-letter country code max length 2 characters */
|
|
6
24
|
country_code: string;
|
|
25
|
+
/** @description Whether the address is residential or commercial */
|
|
26
|
+
address_residential_indicator?: AddressResidentialIndicator;
|
|
27
|
+
/** @description Whether the country of the shipment address is a member of the EU */
|
|
28
|
+
is_eu?: boolean;
|
|
29
|
+
/** @description Additional metadata provided for specific requests */
|
|
30
|
+
address_metadata?: {
|
|
31
|
+
[key: string]: string;
|
|
32
|
+
};
|
|
33
|
+
/** @description Instructions to help the carrier navigate to the address */
|
|
34
|
+
instructions?: string;
|
|
7
35
|
}
|
|
@@ -1,12 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AddressBase = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
class AddressBase {
|
|
5
|
+
/** @description The full name of the contact contact associated with the address */
|
|
6
|
+
name;
|
|
7
|
+
/** @description The first name of the contact associated with the address */
|
|
8
|
+
first_name;
|
|
9
|
+
/** @description The last name of the contact associated with the address */
|
|
10
|
+
last_name;
|
|
11
|
+
/** @description The email of the contact associated with the address */
|
|
12
|
+
email;
|
|
13
|
+
/** @description The phone number of the contact associated with the address (No Newline Characters) */
|
|
14
|
+
phone_number;
|
|
15
|
+
/** @description The name of the company associated with this address (No Newline Characters) max length 100 characters */
|
|
16
|
+
company_name;
|
|
17
|
+
/** @description The address lines of the address (No Newline Characters) max length 100 characters */
|
|
18
|
+
address_lines;
|
|
19
|
+
/** @description City or locality (No Newline Characters) */
|
|
20
|
+
city_locality;
|
|
21
|
+
/** @description State or province (No Newline Characters) */
|
|
22
|
+
state_province;
|
|
6
23
|
/** @description Zip or postal code (No Newline Characters) */
|
|
7
24
|
postal_code;
|
|
8
25
|
/** @description ISO 3166-1 two-letter country code max length 2 characters */
|
|
9
26
|
country_code;
|
|
27
|
+
/** @description Whether the address is residential or commercial */
|
|
28
|
+
address_residential_indicator;
|
|
29
|
+
/** @description Whether the country of the shipment address is a member of the EU */
|
|
30
|
+
is_eu;
|
|
31
|
+
/** @description Additional metadata provided for specific requests */
|
|
32
|
+
address_metadata;
|
|
33
|
+
/** @description Instructions to help the carrier navigate to the address */
|
|
34
|
+
instructions;
|
|
10
35
|
}
|
|
11
36
|
exports.AddressBase = AddressBase;
|
|
12
37
|
//# sourceMappingURL=address-base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-base.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"address-base.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IACtB,oFAAoF;IACpF,IAAI,CAAU;IACd,6EAA6E;IAC7E,UAAU,CAAU;IACpB,4EAA4E;IAC5E,SAAS,CAAU;IACnB,wEAAwE;IACxE,KAAK,CAAU;IACf,uGAAuG;IACvG,YAAY,CAAU;IACtB,0HAA0H;IAC1H,YAAY,CAAU;IACtB,sGAAsG;IACtG,aAAa,CAAY;IACzB,4DAA4D;IAC5D,aAAa,CAAU;IACvB,6DAA6D;IAC7D,cAAc,CAAU;IACxB,8DAA8D;IAC9D,WAAW,CAAU;IACrB,+EAA+E;IAC/E,YAAY,CAAU;IACtB,oEAAoE;IACpE,6BAA6B,CAA+B;IAC5D,qFAAqF;IACrF,KAAK,CAAW;IAChB,sEAAsE;IACtE,gBAAgB,CAA6B;IAC7C,4EAA4E;IAC5E,YAAY,CAAU;CACvB;AA/BD,kCA+BC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./address-base"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./address-common"), exports);
|
|
6
5
|
tslib_1.__exportStar(require("./address-residential-indicator"), exports);
|
|
7
6
|
tslib_1.__exportStar(require("./ship-from"), exports);
|
|
8
7
|
tslib_1.__exportStar(require("./ship-from-display"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/addresses/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/addresses/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,0EAAgD;AAChD,sDAA4B;AAC5B,8DAAoC;AACpC,oDAA0B;AAC1B,0DAAgC;AAChC,iEAAuC"}
|
|
@@ -7,15 +7,5 @@ const address_base_schema_1 = require("./address-base-schema");
|
|
|
7
7
|
exports.PudoLocationSchema = address_base_schema_1.AddressBaseSchema.keys({
|
|
8
8
|
carrier_code: joi_1.default.string().optional(),
|
|
9
9
|
location_id: joi_1.default.string().optional(),
|
|
10
|
-
postal_code: joi_1.default.string().when('location_id', {
|
|
11
|
-
is: joi_1.default.exist(),
|
|
12
|
-
then: joi_1.default.optional().allow(''),
|
|
13
|
-
otherwise: joi_1.default.required(),
|
|
14
|
-
}),
|
|
15
|
-
country_code: joi_1.default.string().when('location_id', {
|
|
16
|
-
is: joi_1.default.exist(),
|
|
17
|
-
then: joi_1.default.optional().allow(''),
|
|
18
|
-
otherwise: joi_1.default.required(),
|
|
19
|
-
}),
|
|
20
10
|
});
|
|
21
11
|
//# sourceMappingURL=pudo-location-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pudo-location-schema.js","sourceRoot":"","sources":["../../../src/models/addresses/pudo-location-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,+DAA0D;AAE7C,QAAA,kBAAkB,GAAG,uCAAiB,CAAC,IAAI,CAAC;IACvD,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"pudo-location-schema.js","sourceRoot":"","sources":["../../../src/models/addresses/pudo-location-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,+DAA0D;AAE7C,QAAA,kBAAkB,GAAG,uCAAiB,CAAC,IAAI,CAAC;IACvD,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC"}
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AddressBase } from './address-base';
|
|
2
2
|
/** @description Pickup/Dropoff location used by carriers */
|
|
3
|
-
export declare class PudoLocation extends
|
|
4
|
-
/**
|
|
5
|
-
* @description Zip or postal code (No Newline Characters)
|
|
6
|
-
* Required if `location_id` is not provided
|
|
7
|
-
*/
|
|
8
|
-
postal_code?: string;
|
|
9
|
-
/**
|
|
10
|
-
* @description ISO 3166-1 two-letter country code max length 2 characters
|
|
11
|
-
* Required if `location_id` is not provided
|
|
12
|
-
*/
|
|
13
|
-
country_code?: string;
|
|
3
|
+
export declare class PudoLocation extends AddressBase {
|
|
14
4
|
/** @description Standardized carrier code the location id belongs to */
|
|
15
5
|
carrier_code?: string;
|
|
16
|
-
/**
|
|
17
|
-
* @description Location id needed to look up the location.
|
|
18
|
-
* Required if `postal_code` or `country_code` is not provided.
|
|
19
|
-
*/
|
|
6
|
+
/** @description Location id needed to look up the location */
|
|
20
7
|
location_id?: string;
|
|
21
8
|
}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PudoLocation = void 0;
|
|
4
|
-
const
|
|
4
|
+
const address_base_1 = require("./address-base");
|
|
5
5
|
/** @description Pickup/Dropoff location used by carriers */
|
|
6
|
-
class PudoLocation extends
|
|
7
|
-
/**
|
|
8
|
-
* @description Zip or postal code (No Newline Characters)
|
|
9
|
-
* Required if `location_id` is not provided
|
|
10
|
-
*/
|
|
11
|
-
postal_code;
|
|
12
|
-
/**
|
|
13
|
-
* @description ISO 3166-1 two-letter country code max length 2 characters
|
|
14
|
-
* Required if `location_id` is not provided
|
|
15
|
-
*/
|
|
16
|
-
country_code;
|
|
6
|
+
class PudoLocation extends address_base_1.AddressBase {
|
|
17
7
|
/** @description Standardized carrier code the location id belongs to */
|
|
18
8
|
carrier_code;
|
|
19
|
-
/**
|
|
20
|
-
* @description Location id needed to look up the location.
|
|
21
|
-
* Required if `postal_code` or `country_code` is not provided.
|
|
22
|
-
*/
|
|
9
|
+
/** @description Location id needed to look up the location */
|
|
23
10
|
location_id;
|
|
24
11
|
}
|
|
25
12
|
exports.PudoLocation = PudoLocation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pudo-location.js","sourceRoot":"","sources":["../../../src/models/addresses/pudo-location.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"pudo-location.js","sourceRoot":"","sources":["../../../src/models/addresses/pudo-location.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAE7C,4DAA4D;AAC5D,MAAa,YAAa,SAAQ,0BAAW;IAC3C,wEAAwE;IACxE,YAAY,CAAU;IACtB,8DAA8D;IAC9D,WAAW,CAAU;CACtB;AALD,oCAKC"}
|
|
@@ -11,5 +11,9 @@ export declare enum CustomsContentTypes {
|
|
|
11
11
|
/** @description Items that are being returned */
|
|
12
12
|
ReturnedGoods = "returned_goods",
|
|
13
13
|
/** @description What other means in case of the shipment*/
|
|
14
|
-
Other = "other"
|
|
14
|
+
Other = "other",
|
|
15
|
+
/** @description Items purchased through an online (B2C) e-commerce transaction */
|
|
16
|
+
ECommerceGoods = "e_commerce_goods",
|
|
17
|
+
/** @description Items sold from one business to another (B2B) */
|
|
18
|
+
CommercialSaleOfGoodsB2B = "commercial_sale_of_goods_b2b"
|
|
15
19
|
}
|
|
@@ -16,5 +16,9 @@ var CustomsContentTypes;
|
|
|
16
16
|
CustomsContentTypes["ReturnedGoods"] = "returned_goods";
|
|
17
17
|
/** @description What other means in case of the shipment*/
|
|
18
18
|
CustomsContentTypes["Other"] = "other";
|
|
19
|
+
/** @description Items purchased through an online (B2C) e-commerce transaction */
|
|
20
|
+
CustomsContentTypes["ECommerceGoods"] = "e_commerce_goods";
|
|
21
|
+
/** @description Items sold from one business to another (B2B) */
|
|
22
|
+
CustomsContentTypes["CommercialSaleOfGoodsB2B"] = "commercial_sale_of_goods_b2b";
|
|
19
23
|
})(CustomsContentTypes || (exports.CustomsContentTypes = CustomsContentTypes = {}));
|
|
20
24
|
//# sourceMappingURL=customs-content-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customs-content-types.js","sourceRoot":"","sources":["../../../src/models/customs/customs-content-types.ts"],"names":[],"mappings":";;;AAAA,4DAA4D;AAC5D,IAAY,
|
|
1
|
+
{"version":3,"file":"customs-content-types.js","sourceRoot":"","sources":["../../../src/models/customs/customs-content-types.ts"],"names":[],"mappings":";;;AAAA,4DAA4D;AAC5D,IAAY,mBAiBX;AAjBD,WAAY,mBAAmB;IAC7B,8EAA8E;IAC9E,kDAA2B,CAAA;IAC3B,oDAAoD;IACpD,8CAAuB,CAAA;IACvB,2EAA2E;IAC3E,oCAAa,CAAA;IACb,uDAAuD;IACvD,wCAAiB,CAAA;IACjB,iDAAiD;IACjD,uDAAgC,CAAA;IAChC,6DAA6D;IAC7D,sCAAe,CAAA;IACf,kFAAkF;IAClF,0DAAmC,CAAA;IACnC,iEAAiE;IACjE,gFAAyD,CAAA;AAC3D,CAAC,EAjBW,mBAAmB,mCAAnB,mBAAmB,QAiB9B"}
|
|
@@ -9,6 +9,8 @@ class DocumentUploadShipment {
|
|
|
9
9
|
origin_country_code;
|
|
10
10
|
/** @description The destination country code */
|
|
11
11
|
destination_country_code;
|
|
12
|
+
/** @description The shipment service code */
|
|
13
|
+
service_code;
|
|
12
14
|
}
|
|
13
15
|
exports.DocumentUploadShipment = DocumentUploadShipment;
|
|
14
16
|
//# sourceMappingURL=document-upload-shipment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-upload-shipment.js","sourceRoot":"","sources":["../../../../src/models/documents/uploads/document-upload-shipment.ts"],"names":[],"mappings":";;;AAAA,yEAAyE;AACzE,MAAa,sBAAsB;IACjC,yCAAyC;IACzC,QAAQ,CAAU;IAClB,2CAA2C;IAC3C,mBAAmB,CAAU;IAC7B,gDAAgD;IAChD,wBAAwB,CAAU;
|
|
1
|
+
{"version":3,"file":"document-upload-shipment.js","sourceRoot":"","sources":["../../../../src/models/documents/uploads/document-upload-shipment.ts"],"names":[],"mappings":";;;AAAA,yEAAyE;AACzE,MAAa,sBAAsB;IACjC,yCAAyC;IACzC,QAAQ,CAAU;IAClB,2CAA2C;IAC3C,mBAAmB,CAAU;IAC7B,gDAAgD;IAChD,wBAAwB,CAAU;IAClC,6CAA6C;IAC7C,YAAY,CAAU;CACvB;AATD,wDASC"}
|
package/package.json
CHANGED
package/spec.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Shipping API",
|
|
5
5
|
"description": "This API specification describes the canonical ShipEngine Shipping API connector module.",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.40.0"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/Register": {
|
|
@@ -2055,7 +2055,9 @@
|
|
|
2055
2055
|
"gift",
|
|
2056
2056
|
"sample",
|
|
2057
2057
|
"returned_goods",
|
|
2058
|
-
"other"
|
|
2058
|
+
"other",
|
|
2059
|
+
"e_commerce_goods",
|
|
2060
|
+
"commercial_sale_of_goods_b2b"
|
|
2059
2061
|
],
|
|
2060
2062
|
"type": "string"
|
|
2061
2063
|
},
|
|
@@ -2445,6 +2447,11 @@
|
|
|
2445
2447
|
"type": "string",
|
|
2446
2448
|
"description": "The destination country code.",
|
|
2447
2449
|
"nullable": true
|
|
2450
|
+
},
|
|
2451
|
+
"service_code": {
|
|
2452
|
+
"type": "string",
|
|
2453
|
+
"description": "The shipment service code.",
|
|
2454
|
+
"nullable": true
|
|
2448
2455
|
}
|
|
2449
2456
|
},
|
|
2450
2457
|
"additionalProperties": false,
|
|
@@ -3944,36 +3951,17 @@
|
|
|
3944
3951
|
"description": "Base class for all subscription channel protocols"
|
|
3945
3952
|
},
|
|
3946
3953
|
"PudoLocation": {
|
|
3954
|
+
"required": [
|
|
3955
|
+
"postal_code",
|
|
3956
|
+
"country_code"
|
|
3957
|
+
],
|
|
3947
3958
|
"type": "object",
|
|
3948
3959
|
"allOf": [
|
|
3949
3960
|
{
|
|
3950
3961
|
"$ref": "#/components/schemas/AddressWithContact"
|
|
3951
3962
|
}
|
|
3952
3963
|
],
|
|
3953
|
-
"anyOf": [
|
|
3954
|
-
{
|
|
3955
|
-
"required": [
|
|
3956
|
-
"location_id"
|
|
3957
|
-
]
|
|
3958
|
-
},
|
|
3959
|
-
{
|
|
3960
|
-
"required": [
|
|
3961
|
-
"postal_code",
|
|
3962
|
-
"country_code"
|
|
3963
|
-
]
|
|
3964
|
-
}
|
|
3965
|
-
],
|
|
3966
3964
|
"properties": {
|
|
3967
|
-
"postal_code": {
|
|
3968
|
-
"type": "string",
|
|
3969
|
-
"description": "The postal code of the address.\r\nNot required when location_id is provided.",
|
|
3970
|
-
"nullable": true
|
|
3971
|
-
},
|
|
3972
|
-
"country_code": {
|
|
3973
|
-
"type": "string",
|
|
3974
|
-
"description": "The two character country code of the shipment address.\r\nNot required when location_id is provided.",
|
|
3975
|
-
"nullable": true
|
|
3976
|
-
},
|
|
3977
3965
|
"carrier_code": {
|
|
3978
3966
|
"type": "string",
|
|
3979
3967
|
"description": "Standardized carrier code the location ID belongs to.",
|
|
@@ -6110,4 +6098,4 @@
|
|
|
6110
6098
|
"description": ""
|
|
6111
6099
|
}
|
|
6112
6100
|
]
|
|
6113
|
-
}
|
|
6101
|
+
}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
|
-
import { AddressCommonSchema } from './address-common-schema';
|
|
3
2
|
|
|
4
|
-
export const AddressBaseSchema =
|
|
3
|
+
export const AddressBaseSchema = Joi.object({
|
|
4
|
+
name: Joi.string().optional().empty(),
|
|
5
|
+
first_name: Joi.string().optional().empty(),
|
|
6
|
+
last_name: Joi.string().optional().empty(),
|
|
7
|
+
email: Joi.string().email().optional().empty(),
|
|
8
|
+
phone_number: Joi.string().optional().empty(),
|
|
9
|
+
company_name: Joi.string().optional().empty(),
|
|
10
|
+
address_lines: Joi.array().items(Joi.string()).optional(),
|
|
11
|
+
city_locality: Joi.string().optional().empty(),
|
|
12
|
+
state_province: Joi.string().optional().empty(),
|
|
5
13
|
postal_code: Joi.string().required(),
|
|
6
14
|
country_code: Joi.string().required(),
|
|
15
|
+
address_residential_indicator: Joi.string().optional().empty(),
|
|
16
|
+
is_eu: Joi.boolean().optional(),
|
|
17
|
+
address_metadata: Joi.object().optional().empty(),
|
|
18
|
+
instructions: Joi.string().optional().empty(),
|
|
7
19
|
});
|
|
@@ -1,8 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AddressResidentialIndicator } from './address-residential-indicator';
|
|
2
2
|
|
|
3
|
-
export class AddressBase
|
|
3
|
+
export class AddressBase {
|
|
4
|
+
/** @description The full name of the contact contact associated with the address */
|
|
5
|
+
name?: string;
|
|
6
|
+
/** @description The first name of the contact associated with the address */
|
|
7
|
+
first_name?: string;
|
|
8
|
+
/** @description The last name of the contact associated with the address */
|
|
9
|
+
last_name?: string;
|
|
10
|
+
/** @description The email of the contact associated with the address */
|
|
11
|
+
email?: string;
|
|
12
|
+
/** @description The phone number of the contact associated with the address (No Newline Characters) */
|
|
13
|
+
phone_number?: string;
|
|
14
|
+
/** @description The name of the company associated with this address (No Newline Characters) max length 100 characters */
|
|
15
|
+
company_name?: string;
|
|
16
|
+
/** @description The address lines of the address (No Newline Characters) max length 100 characters */
|
|
17
|
+
address_lines?: string[];
|
|
18
|
+
/** @description City or locality (No Newline Characters) */
|
|
19
|
+
city_locality?: string;
|
|
20
|
+
/** @description State or province (No Newline Characters) */
|
|
21
|
+
state_province?: string;
|
|
4
22
|
/** @description Zip or postal code (No Newline Characters) */
|
|
5
23
|
postal_code!: string;
|
|
6
24
|
/** @description ISO 3166-1 two-letter country code max length 2 characters */
|
|
7
25
|
country_code!: string;
|
|
26
|
+
/** @description Whether the address is residential or commercial */
|
|
27
|
+
address_residential_indicator?: AddressResidentialIndicator;
|
|
28
|
+
/** @description Whether the country of the shipment address is a member of the EU */
|
|
29
|
+
is_eu?: boolean;
|
|
30
|
+
/** @description Additional metadata provided for specific requests */
|
|
31
|
+
address_metadata?: { [key: string]: string };
|
|
32
|
+
/** @description Instructions to help the carrier navigate to the address */
|
|
33
|
+
instructions?: string;
|
|
8
34
|
}
|
|
@@ -4,14 +4,4 @@ import { AddressBaseSchema } from './address-base-schema';
|
|
|
4
4
|
export const PudoLocationSchema = AddressBaseSchema.keys({
|
|
5
5
|
carrier_code: Joi.string().optional(),
|
|
6
6
|
location_id: Joi.string().optional(),
|
|
7
|
-
postal_code: Joi.string().when('location_id', {
|
|
8
|
-
is: Joi.exist(),
|
|
9
|
-
then: Joi.optional().allow(''),
|
|
10
|
-
otherwise: Joi.required(),
|
|
11
|
-
}),
|
|
12
|
-
country_code: Joi.string().when('location_id', {
|
|
13
|
-
is: Joi.exist(),
|
|
14
|
-
then: Joi.optional().allow(''),
|
|
15
|
-
otherwise: Joi.required(),
|
|
16
|
-
}),
|
|
17
7
|
});
|
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AddressBase } from './address-base';
|
|
2
2
|
|
|
3
3
|
/** @description Pickup/Dropoff location used by carriers */
|
|
4
|
-
export class PudoLocation extends
|
|
5
|
-
/**
|
|
6
|
-
* @description Zip or postal code (No Newline Characters)
|
|
7
|
-
* Required if `location_id` is not provided
|
|
8
|
-
*/
|
|
9
|
-
postal_code?: string;
|
|
10
|
-
/**
|
|
11
|
-
* @description ISO 3166-1 two-letter country code max length 2 characters
|
|
12
|
-
* Required if `location_id` is not provided
|
|
13
|
-
*/
|
|
14
|
-
country_code?: string;
|
|
4
|
+
export class PudoLocation extends AddressBase {
|
|
15
5
|
/** @description Standardized carrier code the location id belongs to */
|
|
16
6
|
carrier_code?: string;
|
|
17
|
-
/**
|
|
18
|
-
* @description Location id needed to look up the location.
|
|
19
|
-
* Required if `postal_code` or `country_code` is not provided.
|
|
20
|
-
*/
|
|
7
|
+
/** @description Location id needed to look up the location */
|
|
21
8
|
location_id?: string;
|
|
22
9
|
}
|
|
@@ -12,4 +12,8 @@ export enum CustomsContentTypes {
|
|
|
12
12
|
ReturnedGoods = 'returned_goods',
|
|
13
13
|
/** @description What other means in case of the shipment*/
|
|
14
14
|
Other = 'other',
|
|
15
|
+
/** @description Items purchased through an online (B2C) e-commerce transaction */
|
|
16
|
+
ECommerceGoods = 'e_commerce_goods',
|
|
17
|
+
/** @description Items sold from one business to another (B2B) */
|
|
18
|
+
CommercialSaleOfGoodsB2B = 'commercial_sale_of_goods_b2b',
|
|
15
19
|
}
|