@shipengine/connect-carrier-api 4.26.4 → 4.26.5
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/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 +5 -0
- 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/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"}
|
|
@@ -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
|
@@ -2445,6 +2445,11 @@
|
|
|
2445
2445
|
"type": "string",
|
|
2446
2446
|
"description": "The destination country code.",
|
|
2447
2447
|
"nullable": true
|
|
2448
|
+
},
|
|
2449
|
+
"service_code": {
|
|
2450
|
+
"type": "string",
|
|
2451
|
+
"description": "The shipment service code.",
|
|
2452
|
+
"nullable": true
|
|
2448
2453
|
}
|
|
2449
2454
|
},
|
|
2450
2455
|
"additionalProperties": false,
|
|
@@ -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
|
}
|