@shipengine/connect-carrier-api 4.26.1 → 4.26.3

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.
Files changed (38) hide show
  1. package/lib/models/addresses/address-base-schema.js +2 -14
  2. package/lib/models/addresses/address-base-schema.js.map +1 -1
  3. package/lib/models/addresses/address-base.d.ts +2 -30
  4. package/lib/models/addresses/address-base.js +2 -27
  5. package/lib/models/addresses/address-base.js.map +1 -1
  6. package/lib/models/addresses/address-common-schema.d.ts +2 -0
  7. package/lib/models/addresses/address-common-schema.js +21 -0
  8. package/lib/models/addresses/address-common-schema.js.map +1 -0
  9. package/lib/models/addresses/address-common.d.ts +31 -0
  10. package/lib/models/addresses/address-common.js +33 -0
  11. package/lib/models/addresses/address-common.js.map +1 -0
  12. package/lib/models/addresses/index.d.ts +1 -0
  13. package/lib/models/addresses/index.js +1 -0
  14. package/lib/models/addresses/index.js.map +1 -1
  15. package/lib/models/addresses/pudo-location.d.ts +16 -3
  16. package/lib/models/addresses/pudo-location.js +16 -3
  17. package/lib/models/addresses/pudo-location.js.map +1 -1
  18. package/lib/models/documents/uploads/document-upload-shipment.d.ts +9 -0
  19. package/lib/models/documents/uploads/document-upload-shipment.js +14 -0
  20. package/lib/models/documents/uploads/document-upload-shipment.js.map +1 -0
  21. package/lib/models/documents/uploads/index.d.ts +1 -0
  22. package/lib/models/documents/uploads/index.js +1 -0
  23. package/lib/models/documents/uploads/index.js.map +1 -1
  24. package/lib/requests/upload-document-request.d.ts +3 -1
  25. package/lib/requests/upload-document-request.js +2 -0
  26. package/lib/requests/upload-document-request.js.map +1 -1
  27. package/package.json +1 -1
  28. package/spec.json +35 -0
  29. package/src/models/addresses/address-base-schema.ts +2 -14
  30. package/src/models/addresses/address-base.ts +2 -28
  31. package/src/models/addresses/address-common-schema.ts +17 -0
  32. package/src/models/addresses/address-common.ts +30 -0
  33. package/src/models/addresses/index.ts +1 -0
  34. package/src/models/addresses/pudo-location.ts +16 -3
  35. package/src/models/documents/uploads/document-upload-shipment.ts +9 -0
  36. package/src/models/documents/uploads/index.ts +1 -0
  37. package/src/requests/upload-document-request.ts +8 -1
  38. package/tsconfig.tsbuildinfo +1 -1
@@ -3,21 +3,9 @@ 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
- 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(),
6
+ const address_common_schema_1 = require("./address-common-schema");
7
+ exports.AddressBaseSchema = address_common_schema_1.AddressCommonSchema.keys({
16
8
  postal_code: joi_1.default.string().required(),
17
9
  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(),
22
10
  });
23
11
  //# 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;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
+ {"version":3,"file":"address-base-schema.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,mEAA8D;AAEjD,QAAA,iBAAiB,GAAG,2CAAmB,CAAC,IAAI,CAAC;IACxD,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC"}
@@ -1,35 +1,7 @@
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;
1
+ import { AddressCommon } from './address-common';
2
+ export declare class AddressBase extends AddressCommon {
21
3
  /** @description Zip or postal code (No Newline Characters) */
22
4
  postal_code: string;
23
5
  /** @description ISO 3166-1 two-letter country code max length 2 characters */
24
6
  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;
35
7
  }
@@ -1,37 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AddressBase = void 0;
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;
4
+ const address_common_1 = require("./address-common");
5
+ class AddressBase extends address_common_1.AddressCommon {
23
6
  /** @description Zip or postal code (No Newline Characters) */
24
7
  postal_code;
25
8
  /** @description ISO 3166-1 two-letter country code max length 2 characters */
26
9
  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;
35
10
  }
36
11
  exports.AddressBase = AddressBase;
37
12
  //# sourceMappingURL=address-base.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"address-base.js","sourceRoot":"","sources":["../../../src/models/addresses/address-base.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAEjD,MAAa,WAAY,SAAQ,8BAAa;IAC5C,8DAA8D;IAC9D,WAAW,CAAU;IACrB,+EAA+E;IAC/E,YAAY,CAAU;CACvB;AALD,kCAKC"}
@@ -0,0 +1,2 @@
1
+ import Joi from 'joi';
2
+ export declare const AddressCommonSchema: Joi.ObjectSchema<any>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddressCommonSchema = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
6
+ exports.AddressCommonSchema = 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(),
16
+ address_residential_indicator: joi_1.default.string().optional().empty(),
17
+ is_eu: joi_1.default.boolean().optional(),
18
+ address_metadata: joi_1.default.object().optional().empty(),
19
+ instructions: joi_1.default.string().optional().empty(),
20
+ });
21
+ //# sourceMappingURL=address-common-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address-common-schema.js","sourceRoot":"","sources":["../../../src/models/addresses/address-common-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAET,QAAA,mBAAmB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC5C,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,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"}
@@ -0,0 +1,31 @@
1
+ import { AddressResidentialIndicator } from './address-residential-indicator';
2
+ export declare class AddressCommon {
3
+ /** @description The full name of the 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;
21
+ /** @description Whether the address is residential or commercial */
22
+ address_residential_indicator?: AddressResidentialIndicator;
23
+ /** @description Whether the country of the shipment address is a member of the EU */
24
+ is_eu?: boolean;
25
+ /** @description Additional metadata provided for specific requests */
26
+ address_metadata?: {
27
+ [key: string]: string;
28
+ };
29
+ /** @description Instructions to help the carrier navigate to the address */
30
+ instructions?: string;
31
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddressCommon = void 0;
4
+ class AddressCommon {
5
+ /** @description The full name of the 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;
23
+ /** @description Whether the address is residential or commercial */
24
+ address_residential_indicator;
25
+ /** @description Whether the country of the shipment address is a member of the EU */
26
+ is_eu;
27
+ /** @description Additional metadata provided for specific requests */
28
+ address_metadata;
29
+ /** @description Instructions to help the carrier navigate to the address */
30
+ instructions;
31
+ }
32
+ exports.AddressCommon = AddressCommon;
33
+ //# sourceMappingURL=address-common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address-common.js","sourceRoot":"","sources":["../../../src/models/addresses/address-common.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IACxB,4EAA4E;IAC5E,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,oEAAoE;IACpE,6BAA6B,CAA+B;IAC5D,qFAAqF;IACrF,KAAK,CAAW;IAChB,sEAAsE;IACtE,gBAAgB,CAA6B;IAC7C,4EAA4E;IAC5E,YAAY,CAAU;CACvB;AA3BD,sCA2BC"}
@@ -1,4 +1,5 @@
1
1
  export * from './address-base';
2
+ export * from './address-common';
2
3
  export * from './address-residential-indicator';
3
4
  export * from './ship-from';
4
5
  export * from './ship-from-display';
@@ -2,6 +2,7 @@
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);
5
6
  tslib_1.__exportStar(require("./address-residential-indicator"), exports);
6
7
  tslib_1.__exportStar(require("./ship-from"), exports);
7
8
  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,0EAAgD;AAChD,sDAA4B;AAC5B,8DAAoC;AACpC,oDAA0B;AAC1B,0DAAgC;AAChC,iEAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/addresses/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,2DAAiC;AACjC,0EAAgD;AAChD,sDAA4B;AAC5B,8DAAoC;AACpC,oDAA0B;AAC1B,0DAAgC;AAChC,iEAAuC"}
@@ -1,8 +1,21 @@
1
- import { AddressBase } from './address-base';
1
+ import { AddressCommon } from './address-common';
2
2
  /** @description Pickup/Dropoff location used by carriers */
3
- export declare class PudoLocation extends AddressBase {
3
+ export declare class PudoLocation extends AddressCommon {
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;
4
14
  /** @description Standardized carrier code the location id belongs to */
5
15
  carrier_code?: string;
6
- /** @description Location id needed to look up the location */
16
+ /**
17
+ * @description Location id needed to look up the location.
18
+ * Required if `postal_code` or `country_code` is not provided.
19
+ */
7
20
  location_id?: string;
8
21
  }
@@ -1,12 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PudoLocation = void 0;
4
- const address_base_1 = require("./address-base");
4
+ const address_common_1 = require("./address-common");
5
5
  /** @description Pickup/Dropoff location used by carriers */
6
- class PudoLocation extends address_base_1.AddressBase {
6
+ class PudoLocation extends address_common_1.AddressCommon {
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;
7
17
  /** @description Standardized carrier code the location id belongs to */
8
18
  carrier_code;
9
- /** @description Location id needed to look up the location */
19
+ /**
20
+ * @description Location id needed to look up the location.
21
+ * Required if `postal_code` or `country_code` is not provided.
22
+ */
10
23
  location_id;
11
24
  }
12
25
  exports.PudoLocation = PudoLocation;
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"pudo-location.js","sourceRoot":"","sources":["../../../src/models/addresses/pudo-location.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAEjD,4DAA4D;AAC5D,MAAa,YAAa,SAAQ,8BAAa;IAC7C;;;OAGG;IACH,WAAW,CAAU;IACrB;;;OAGG;IACH,YAAY,CAAU;IACtB,wEAAwE;IACxE,YAAY,CAAU;IACtB;;;OAGG;IACH,WAAW,CAAU;CACtB;AAlBD,oCAkBC"}
@@ -0,0 +1,9 @@
1
+ /** @description Shipment information relating to an uploaded document */
2
+ export declare class DocumentUploadShipment {
3
+ /** @description The shipment datetime */
4
+ datetime: string;
5
+ /** @description The origin country code */
6
+ origin_country_code: string;
7
+ /** @description The destination country code */
8
+ destination_country_code: string;
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DocumentUploadShipment = void 0;
4
+ /** @description Shipment information relating to an uploaded document */
5
+ class DocumentUploadShipment {
6
+ /** @description The shipment datetime */
7
+ datetime;
8
+ /** @description The origin country code */
9
+ origin_country_code;
10
+ /** @description The destination country code */
11
+ destination_country_code;
12
+ }
13
+ exports.DocumentUploadShipment = DocumentUploadShipment;
14
+ //# sourceMappingURL=document-upload-shipment.js.map
@@ -0,0 +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;CACnC;AAPD,wDAOC"}
@@ -1,4 +1,5 @@
1
1
  export * from './document-upload-format';
2
2
  export * from './document-upload-format-schema';
3
+ export * from './document-upload-shipment';
3
4
  export * from './document-upload-type';
4
5
  export * from './document-upload-type-schema';
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./document-upload-format"), exports);
5
5
  tslib_1.__exportStar(require("./document-upload-format-schema"), exports);
6
+ tslib_1.__exportStar(require("./document-upload-shipment"), exports);
6
7
  tslib_1.__exportStar(require("./document-upload-type"), exports);
7
8
  tslib_1.__exportStar(require("./document-upload-type-schema"), exports);
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/documents/uploads/index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC;AACzC,0EAAgD;AAChD,iEAAuC;AACvC,wEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/documents/uploads/index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC;AACzC,0EAAgD;AAChD,qEAA2C;AAC3C,iEAAuC;AACvC,wEAA8C"}
@@ -1,5 +1,5 @@
1
1
  import { BaseRequest } from './base-request';
2
- import { Identifier, DocumentUploadFormat, DocumentUploadType } from '../models';
2
+ import { Identifier, DocumentUploadFormat, DocumentUploadShipment, DocumentUploadType } from '../models';
3
3
  /**
4
4
  * A request to upload a document for a shipment.
5
5
  */
@@ -18,4 +18,6 @@ export declare class UploadDocumentRequest extends BaseRequest {
18
18
  tracking_number: string;
19
19
  /** @description Non-tracking alternative ids associated with this shipment */
20
20
  alternative_identifiers?: Identifier[];
21
+ /** @description Shipment information relating to an uploaded document */
22
+ shipment?: DocumentUploadShipment;
21
23
  }
@@ -20,6 +20,8 @@ class UploadDocumentRequest extends base_request_1.BaseRequest {
20
20
  tracking_number;
21
21
  /** @description Non-tracking alternative ids associated with this shipment */
22
22
  alternative_identifiers;
23
+ /** @description Shipment information relating to an uploaded document */
24
+ shipment;
23
25
  }
24
26
  exports.UploadDocumentRequest = UploadDocumentRequest;
25
27
  //# sourceMappingURL=upload-document-request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-document-request.js","sourceRoot":"","sources":["../../src/requests/upload-document-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAG7C;;GAEG;AACH,MAAa,qBAAsB,SAAQ,0BAAW;IACpD,mCAAmC;IACnC,WAAW,CAAU;IACrB,4CAA4C;IAC5C,aAAa,CAAsB;IACnC,8CAA8C;IAC9C,eAAe,CAAwB;IACvC,iCAAiC;IACjC,SAAS,CAAU;IACnB,gCAAgC;IAChC,QAAQ,CAAU;IAClB,iEAAiE;IACjE,eAAe,CAAU;IACzB,8EAA8E;IAC9E,uBAAuB,CAAgB;CACxC;AAfD,sDAeC"}
1
+ {"version":3,"file":"upload-document-request.js","sourceRoot":"","sources":["../../src/requests/upload-document-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAQ7C;;GAEG;AACH,MAAa,qBAAsB,SAAQ,0BAAW;IACpD,mCAAmC;IACnC,WAAW,CAAU;IACrB,4CAA4C;IAC5C,aAAa,CAAsB;IACnC,8CAA8C;IAC9C,eAAe,CAAwB;IACvC,iCAAiC;IACjC,SAAS,CAAU;IACnB,gCAAgC;IAChC,QAAQ,CAAU;IAClB,iEAAiE;IACjE,eAAe,CAAU;IACzB,8EAA8E;IAC9E,uBAAuB,CAAgB;IACvC,yEAAyE;IACzE,QAAQ,CAA0B;CACnC;AAjBD,sDAiBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/connect-carrier-api",
3
- "version": "4.26.1",
3
+ "version": "4.26.3",
4
4
  "description": "This is the typescript/javascript definitions for carrier api",
5
5
  "homepage": "https://connect.shipengine.com",
6
6
  "main": "./lib/index.js",
package/spec.json CHANGED
@@ -2428,6 +2428,28 @@
2428
2428
  ],
2429
2429
  "type": "string"
2430
2430
  },
2431
+ "DocumentUploadShipment": {
2432
+ "type": "object",
2433
+ "properties": {
2434
+ "datetime": {
2435
+ "type": "string",
2436
+ "description": "The shipment datetime",
2437
+ "format": "date-time"
2438
+ },
2439
+ "origin_country_code": {
2440
+ "type": "string",
2441
+ "description": "The origin country code.",
2442
+ "nullable": true
2443
+ },
2444
+ "destination_country_code": {
2445
+ "type": "string",
2446
+ "description": "The destination country code.",
2447
+ "nullable": true
2448
+ }
2449
+ },
2450
+ "additionalProperties": false,
2451
+ "description": "Shipment information relating to an uploaded document."
2452
+ },
2431
2453
  "DocumentUploadType": {
2432
2454
  "enum": [
2433
2455
  "commercial_invoice",
@@ -3941,6 +3963,16 @@
3941
3963
  }
3942
3964
  ],
3943
3965
  "properties": {
3966
+ "postal_code": {
3967
+ "type": "string",
3968
+ "description": "The postal code of the address.\r\nNot required when location_id is provided.",
3969
+ "nullable": true
3970
+ },
3971
+ "country_code": {
3972
+ "type": "string",
3973
+ "description": "The two character country code of the shipment address.\r\nNot required when location_id is provided.",
3974
+ "nullable": true
3975
+ },
3944
3976
  "carrier_code": {
3945
3977
  "type": "string",
3946
3978
  "description": "Standardized carrier code the location ID belongs to.",
@@ -5602,6 +5634,9 @@
5602
5634
  },
5603
5635
  "description": "Alternative identifiers associated with this package",
5604
5636
  "nullable": true
5637
+ },
5638
+ "shipment": {
5639
+ "$ref": "#/components/schemas/DocumentUploadShipment"
5605
5640
  }
5606
5641
  },
5607
5642
  "additionalProperties": false,
@@ -1,19 +1,7 @@
1
1
  import Joi from 'joi';
2
+ import { AddressCommonSchema } from './address-common-schema';
2
3
 
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(),
4
+ export const AddressBaseSchema = AddressCommonSchema.keys({
13
5
  postal_code: Joi.string().required(),
14
6
  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(),
19
7
  });
@@ -1,34 +1,8 @@
1
- import { AddressResidentialIndicator } from './address-residential-indicator';
1
+ import { AddressCommon } from './address-common';
2
2
 
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;
3
+ export class AddressBase extends AddressCommon {
22
4
  /** @description Zip or postal code (No Newline Characters) */
23
5
  postal_code!: string;
24
6
  /** @description ISO 3166-1 two-letter country code max length 2 characters */
25
7
  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;
34
8
  }
@@ -0,0 +1,17 @@
1
+ import Joi from 'joi';
2
+
3
+ export const AddressCommonSchema = 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(),
13
+ address_residential_indicator: Joi.string().optional().empty(),
14
+ is_eu: Joi.boolean().optional(),
15
+ address_metadata: Joi.object().optional().empty(),
16
+ instructions: Joi.string().optional().empty(),
17
+ });
@@ -0,0 +1,30 @@
1
+ import { AddressResidentialIndicator } from './address-residential-indicator';
2
+
3
+ export class AddressCommon {
4
+ /** @description The full name of the 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;
22
+ /** @description Whether the address is residential or commercial */
23
+ address_residential_indicator?: AddressResidentialIndicator;
24
+ /** @description Whether the country of the shipment address is a member of the EU */
25
+ is_eu?: boolean;
26
+ /** @description Additional metadata provided for specific requests */
27
+ address_metadata?: { [key: string]: string };
28
+ /** @description Instructions to help the carrier navigate to the address */
29
+ instructions?: string;
30
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './address-base';
2
+ export * from './address-common';
2
3
  export * from './address-residential-indicator';
3
4
  export * from './ship-from';
4
5
  export * from './ship-from-display';
@@ -1,9 +1,22 @@
1
- import { AddressBase } from './address-base';
1
+ import { AddressCommon } from './address-common';
2
2
 
3
3
  /** @description Pickup/Dropoff location used by carriers */
4
- export class PudoLocation extends AddressBase {
4
+ export class PudoLocation extends AddressCommon {
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;
5
15
  /** @description Standardized carrier code the location id belongs to */
6
16
  carrier_code?: string;
7
- /** @description Location id needed to look up the location */
17
+ /**
18
+ * @description Location id needed to look up the location.
19
+ * Required if `postal_code` or `country_code` is not provided.
20
+ */
8
21
  location_id?: string;
9
22
  }
@@ -0,0 +1,9 @@
1
+ /** @description Shipment information relating to an uploaded document */
2
+ export class DocumentUploadShipment {
3
+ /** @description The shipment datetime */
4
+ datetime!: string;
5
+ /** @description The origin country code */
6
+ origin_country_code!: string;
7
+ /** @description The destination country code */
8
+ destination_country_code!: string;
9
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './document-upload-format';
2
2
  export * from './document-upload-format-schema';
3
+ export * from './document-upload-shipment';
3
4
  export * from './document-upload-type';
4
5
  export * from './document-upload-type-schema';
@@ -1,5 +1,10 @@
1
1
  import { BaseRequest } from './base-request';
2
- import { Identifier, DocumentUploadFormat, DocumentUploadType } from '../models';
2
+ import {
3
+ Identifier,
4
+ DocumentUploadFormat,
5
+ DocumentUploadShipment,
6
+ DocumentUploadType,
7
+ } from '../models';
3
8
 
4
9
  /**
5
10
  * A request to upload a document for a shipment.
@@ -19,4 +24,6 @@ export class UploadDocumentRequest extends BaseRequest {
19
24
  tracking_number!: string;
20
25
  /** @description Non-tracking alternative ids associated with this shipment */
21
26
  alternative_identifiers?: Identifier[];
27
+ /** @description Shipment information relating to an uploaded document */
28
+ shipment?: DocumentUploadShipment;
22
29
  }