@shipengine/connect-carrier-api 4.1.0 → 4.1.2
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/dangerous-good/dangerous-goods.d.ts +45 -0
- package/lib/models/dangerous-good/dangerous-goods.js +46 -0
- package/lib/models/dangerous-good/dangerous-goods.js.map +1 -0
- package/lib/models/dangerous-good/package-instruction-section-types.d.ts +7 -0
- package/lib/models/dangerous-good/package-instruction-section-types.js +12 -0
- package/lib/models/dangerous-good/package-instruction-section-types.js.map +1 -0
- package/lib/models/dangerous-good/packaging-group-types.d.ts +9 -0
- package/lib/models/dangerous-good/packaging-group-types.js +14 -0
- package/lib/models/dangerous-good/packaging-group-types.js.map +1 -0
- package/lib/models/dangerous-good/regulation-level-types.d.ts +11 -0
- package/lib/models/dangerous-good/regulation-level-types.js +16 -0
- package/lib/models/dangerous-good/regulation-level-types.js.map +1 -0
- package/lib/models/dangerous-good/transport-mean-types.d.ts +11 -0
- package/lib/models/dangerous-good/transport-mean-types.js +16 -0
- package/lib/models/dangerous-good/transport-mean-types.js.map +1 -0
- package/lib/models/importer-records/importer-of-record.d.ts +1 -1
- package/lib/models/package.d.ts +3 -0
- package/lib/models/package.js +2 -0
- package/lib/models/package.js.map +1 -1
- package/package.json +2 -1
- package/spec.json +375 -116
- package/src/models/dangerous-good/dangerous-goods.ts +46 -0
- package/src/models/dangerous-good/package-instruction-section-types.ts +7 -0
- package/src/models/dangerous-good/packaging-group-types.ts +9 -0
- package/src/models/dangerous-good/regulation-level-types.ts +11 -0
- package/src/models/dangerous-good/transport-mean-types.ts +11 -0
- package/src/models/importer-records/importer-of-record.ts +1 -1
- package/src/models/package.ts +3 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PackageInstructionSectionTypes } from './package-instruction-section-types';
|
|
2
|
+
import { PackagingGroupTypes } from './packaging-group-types';
|
|
3
|
+
import { RegulationLevelTypes } from './regulation-level-types';
|
|
4
|
+
import { TransportMeanTypes } from './transport-mean-types';
|
|
5
|
+
/** @description Basic structure for a dangerous goods */
|
|
6
|
+
export declare class DangerousGoods {
|
|
7
|
+
/** @description UN number to identify the dangerous goods */
|
|
8
|
+
id_number?: string;
|
|
9
|
+
/** @description Trade description of the dangerous goods */
|
|
10
|
+
shipping_name?: string;
|
|
11
|
+
/** @description Recognized Technical or chemical name of dangerous goods */
|
|
12
|
+
technical_name?: string;
|
|
13
|
+
/** @description Dangerous goods product class based on regulation */
|
|
14
|
+
product_class?: string;
|
|
15
|
+
/** @description A secondary of product class for substances presenting more than one particular hazard */
|
|
16
|
+
product_class_subsidiary?: string;
|
|
17
|
+
/** @description This indicates the packaging group based on the degree of danger */
|
|
18
|
+
packaging_group?: PackagingGroupTypes;
|
|
19
|
+
/** @description The amount of the dangerous goods */
|
|
20
|
+
dangerous_amount?: string;
|
|
21
|
+
/** @description Quantity of dangerous goods */
|
|
22
|
+
quantity?: number;
|
|
23
|
+
/** @description The specific standardized packaging instructions from the relevant regulatory agency that have been applied to the parcel/container */
|
|
24
|
+
packaging_instruction?: string;
|
|
25
|
+
/** @description Complementary information to specify the exact 'Section of Packaging' instructions */
|
|
26
|
+
packaging_instruction_section?: PackageInstructionSectionTypes;
|
|
27
|
+
/** @description The type of exterior packaging used to contain the dangerous good */
|
|
28
|
+
packaging_type?: string;
|
|
29
|
+
/** @description Transportation means through which the dangerous goods are transported */
|
|
30
|
+
transport_mean?: TransportMeanTypes;
|
|
31
|
+
/** @description Transport category assign to dangerous goods for the transport purpose */
|
|
32
|
+
transport_category?: string;
|
|
33
|
+
/** @description Name of the regulatory authority */
|
|
34
|
+
regulation_authority?: string;
|
|
35
|
+
/** @description Regulation level of the dangerous goods */
|
|
36
|
+
regulation_level?: RegulationLevelTypes;
|
|
37
|
+
/** @description Indication if the substance is radioactive */
|
|
38
|
+
radioactive?: boolean;
|
|
39
|
+
/** @description Indication if the substance needs to be reported to regulatory authority based on the quantity */
|
|
40
|
+
reportable_quantity?: boolean;
|
|
41
|
+
/** @description Defines which types of tunnels the shipment is allowed to go through */
|
|
42
|
+
tunnel_code?: string;
|
|
43
|
+
/** @description Provider additonal description regarding the dangerous goods. This is used as a placed holder to provider additional context and varies by carrier */
|
|
44
|
+
additional_description?: string;
|
|
45
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DangerousGoods = void 0;
|
|
4
|
+
/** @description Basic structure for a dangerous goods */
|
|
5
|
+
class DangerousGoods {
|
|
6
|
+
/** @description UN number to identify the dangerous goods */
|
|
7
|
+
id_number;
|
|
8
|
+
/** @description Trade description of the dangerous goods */
|
|
9
|
+
shipping_name;
|
|
10
|
+
/** @description Recognized Technical or chemical name of dangerous goods */
|
|
11
|
+
technical_name;
|
|
12
|
+
/** @description Dangerous goods product class based on regulation */
|
|
13
|
+
product_class;
|
|
14
|
+
/** @description A secondary of product class for substances presenting more than one particular hazard */
|
|
15
|
+
product_class_subsidiary;
|
|
16
|
+
/** @description This indicates the packaging group based on the degree of danger */
|
|
17
|
+
packaging_group;
|
|
18
|
+
/** @description The amount of the dangerous goods */
|
|
19
|
+
dangerous_amount;
|
|
20
|
+
/** @description Quantity of dangerous goods */
|
|
21
|
+
quantity;
|
|
22
|
+
/** @description The specific standardized packaging instructions from the relevant regulatory agency that have been applied to the parcel/container */
|
|
23
|
+
packaging_instruction;
|
|
24
|
+
/** @description Complementary information to specify the exact 'Section of Packaging' instructions */
|
|
25
|
+
packaging_instruction_section;
|
|
26
|
+
/** @description The type of exterior packaging used to contain the dangerous good */
|
|
27
|
+
packaging_type;
|
|
28
|
+
/** @description Transportation means through which the dangerous goods are transported */
|
|
29
|
+
transport_mean;
|
|
30
|
+
/** @description Transport category assign to dangerous goods for the transport purpose */
|
|
31
|
+
transport_category;
|
|
32
|
+
/** @description Name of the regulatory authority */
|
|
33
|
+
regulation_authority;
|
|
34
|
+
/** @description Regulation level of the dangerous goods */
|
|
35
|
+
regulation_level;
|
|
36
|
+
/** @description Indication if the substance is radioactive */
|
|
37
|
+
radioactive;
|
|
38
|
+
/** @description Indication if the substance needs to be reported to regulatory authority based on the quantity */
|
|
39
|
+
reportable_quantity;
|
|
40
|
+
/** @description Defines which types of tunnels the shipment is allowed to go through */
|
|
41
|
+
tunnel_code;
|
|
42
|
+
/** @description Provider additonal description regarding the dangerous goods. This is used as a placed holder to provider additional context and varies by carrier */
|
|
43
|
+
additional_description;
|
|
44
|
+
}
|
|
45
|
+
exports.DangerousGoods = DangerousGoods;
|
|
46
|
+
//# sourceMappingURL=dangerous-goods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dangerous-goods.js","sourceRoot":"","sources":["../../../src/models/dangerous-good/dangerous-goods.ts"],"names":[],"mappings":";;;AAKA,yDAAyD;AACzD,MAAa,cAAc;IACzB,6DAA6D;IAC7D,SAAS,CAAU;IACnB,4DAA4D;IAC5D,aAAa,CAAU;IACvB,4EAA4E;IAC5E,cAAc,CAAU;IACxB,qEAAqE;IACrE,aAAa,CAAU;IACvB,0GAA0G;IAC1G,wBAAwB,CAAU;IAClC,oFAAoF;IACpF,eAAe,CAAuB;IACtC,qDAAqD;IACrD,gBAAgB,CAAU;IAC1B,+CAA+C;IAC/C,QAAQ,CAAU;IAClB,uJAAuJ;IACvJ,qBAAqB,CAAU;IAC/B,sGAAsG;IACtG,6BAA6B,CAAkC;IAC/D,qFAAqF;IACrF,cAAc,CAAU;IACxB,0FAA0F;IAC1F,cAAc,CAAsB;IACpC,0FAA0F;IAC1F,kBAAkB,CAAU;IAC5B,oDAAoD;IACpD,oBAAoB,CAAU;IAC9B,2DAA2D;IAC3D,gBAAgB,CAAwB;IACxC,8DAA8D;IAC9D,WAAW,CAAW;IACtB,kHAAkH;IAClH,mBAAmB,CAAW;IAC9B,wFAAwF;IACxF,WAAW,CAAU;IACrB,sKAAsK;IACtK,sBAAsB,CAAU;CACjC;AAvCD,wCAuCC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @description Complementary information to specify the exact 'Section of Packaging' Instructions (a mandatory piece of data for processing lithium batteries shipments). */
|
|
2
|
+
export declare enum PackageInstructionSectionTypes {
|
|
3
|
+
Section1 = "section_1",
|
|
4
|
+
Section2 = "section_2",
|
|
5
|
+
Section1A = "section_1A",
|
|
6
|
+
Section1B = "section_1B"
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PackageInstructionSectionTypes = void 0;
|
|
4
|
+
/** @description Complementary information to specify the exact 'Section of Packaging' Instructions (a mandatory piece of data for processing lithium batteries shipments). */
|
|
5
|
+
var PackageInstructionSectionTypes;
|
|
6
|
+
(function (PackageInstructionSectionTypes) {
|
|
7
|
+
PackageInstructionSectionTypes["Section1"] = "section_1";
|
|
8
|
+
PackageInstructionSectionTypes["Section2"] = "section_2";
|
|
9
|
+
PackageInstructionSectionTypes["Section1A"] = "section_1A";
|
|
10
|
+
PackageInstructionSectionTypes["Section1B"] = "section_1B";
|
|
11
|
+
})(PackageInstructionSectionTypes = exports.PackageInstructionSectionTypes || (exports.PackageInstructionSectionTypes = {}));
|
|
12
|
+
//# sourceMappingURL=package-instruction-section-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-instruction-section-types.js","sourceRoot":"","sources":["../../../src/models/dangerous-good/package-instruction-section-types.ts"],"names":[],"mappings":";;;AAAA,8KAA8K;AAC9K,IAAY,8BAKX;AALD,WAAY,8BAA8B;IACxC,wDAAsB,CAAA;IACtB,wDAAsB,CAAA;IACtB,0DAAwB,CAAA;IACxB,0DAAwB,CAAA;AAC1B,CAAC,EALW,8BAA8B,GAA9B,sCAA8B,KAA9B,sCAA8B,QAKzC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @description Types of packaging group for dangerous good and it indicates the degree of danger */
|
|
2
|
+
export declare enum PackagingGroupTypes {
|
|
3
|
+
/** @description level 1 */
|
|
4
|
+
i = "i",
|
|
5
|
+
/** @description level 2 */
|
|
6
|
+
ii = "ii",
|
|
7
|
+
/** @description level 3 */
|
|
8
|
+
iii = "iii"
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PackagingGroupTypes = void 0;
|
|
4
|
+
/** @description Types of packaging group for dangerous good and it indicates the degree of danger */
|
|
5
|
+
var PackagingGroupTypes;
|
|
6
|
+
(function (PackagingGroupTypes) {
|
|
7
|
+
/** @description level 1 */
|
|
8
|
+
PackagingGroupTypes["i"] = "i";
|
|
9
|
+
/** @description level 2 */
|
|
10
|
+
PackagingGroupTypes["ii"] = "ii";
|
|
11
|
+
/** @description level 3 */
|
|
12
|
+
PackagingGroupTypes["iii"] = "iii";
|
|
13
|
+
})(PackagingGroupTypes = exports.PackagingGroupTypes || (exports.PackagingGroupTypes = {}));
|
|
14
|
+
//# sourceMappingURL=packaging-group-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packaging-group-types.js","sourceRoot":"","sources":["../../../src/models/dangerous-good/packaging-group-types.ts"],"names":[],"mappings":";;;AAAA,qGAAqG;AACrG,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,2BAA2B;IAC3B,8BAAO,CAAA;IACP,2BAA2B;IAC3B,gCAAS,CAAA;IACT,2BAA2B;IAC3B,kCAAW,CAAA;AACb,CAAC,EAPW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAO9B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @description Types of regulation level defined for dangerous good */
|
|
2
|
+
export declare enum RegulationLevelTypes {
|
|
3
|
+
/** @description lightly regulated */
|
|
4
|
+
LightlyRegulated = "lightly_regulated",
|
|
5
|
+
/** @description fully regualted */
|
|
6
|
+
FullyRegulated = "fully_regulated",
|
|
7
|
+
/** @description limited quantities regulated */
|
|
8
|
+
LimitedQuantities = "limited_quantities",
|
|
9
|
+
/** @description excepted quantity regulated */
|
|
10
|
+
ExceptedQuantity = "excepted_quantity"
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RegulationLevelTypes = void 0;
|
|
4
|
+
/** @description Types of regulation level defined for dangerous good */
|
|
5
|
+
var RegulationLevelTypes;
|
|
6
|
+
(function (RegulationLevelTypes) {
|
|
7
|
+
/** @description lightly regulated */
|
|
8
|
+
RegulationLevelTypes["LightlyRegulated"] = "lightly_regulated";
|
|
9
|
+
/** @description fully regualted */
|
|
10
|
+
RegulationLevelTypes["FullyRegulated"] = "fully_regulated";
|
|
11
|
+
/** @description limited quantities regulated */
|
|
12
|
+
RegulationLevelTypes["LimitedQuantities"] = "limited_quantities";
|
|
13
|
+
/** @description excepted quantity regulated */
|
|
14
|
+
RegulationLevelTypes["ExceptedQuantity"] = "excepted_quantity";
|
|
15
|
+
})(RegulationLevelTypes = exports.RegulationLevelTypes || (exports.RegulationLevelTypes = {}));
|
|
16
|
+
//# sourceMappingURL=regulation-level-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regulation-level-types.js","sourceRoot":"","sources":["../../../src/models/dangerous-good/regulation-level-types.ts"],"names":[],"mappings":";;;AAAA,wEAAwE;AACxE,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,qCAAqC;IACrC,8DAAsC,CAAA;IACtC,mCAAmC;IACnC,0DAAkC,CAAA;IAClC,gDAAgD;IAChD,gEAAwC,CAAA;IACxC,+CAA+C;IAC/C,8DAAsC,CAAA;AACxC,CAAC,EATW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAS/B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @description Types of transport mean for dangerous good */
|
|
2
|
+
export declare enum TransportMeanTypes {
|
|
3
|
+
/** @description ground transport */
|
|
4
|
+
Ground = "ground",
|
|
5
|
+
/** @description water transport */
|
|
6
|
+
Water = "water",
|
|
7
|
+
/** @description cargo aircraft only transport */
|
|
8
|
+
CAO = "cao",
|
|
9
|
+
/** @description passenger aircraft transport */
|
|
10
|
+
PA = "pa"
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransportMeanTypes = void 0;
|
|
4
|
+
/** @description Types of transport mean for dangerous good */
|
|
5
|
+
var TransportMeanTypes;
|
|
6
|
+
(function (TransportMeanTypes) {
|
|
7
|
+
/** @description ground transport */
|
|
8
|
+
TransportMeanTypes["Ground"] = "ground";
|
|
9
|
+
/** @description water transport */
|
|
10
|
+
TransportMeanTypes["Water"] = "water";
|
|
11
|
+
/** @description cargo aircraft only transport */
|
|
12
|
+
TransportMeanTypes["CAO"] = "cao";
|
|
13
|
+
/** @description passenger aircraft transport */
|
|
14
|
+
TransportMeanTypes["PA"] = "pa";
|
|
15
|
+
})(TransportMeanTypes = exports.TransportMeanTypes || (exports.TransportMeanTypes = {}));
|
|
16
|
+
//# sourceMappingURL=transport-mean-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport-mean-types.js","sourceRoot":"","sources":["../../../src/models/dangerous-good/transport-mean-types.ts"],"names":[],"mappings":";;;AAAA,8DAA8D;AAC9D,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,oCAAoC;IACpC,uCAAiB,CAAA;IACjB,mCAAmC;IACnC,qCAAe,CAAA;IACf,iDAAiD;IACjD,iCAAW,CAAA;IACX,gDAAgD;IAChD,+BAAS,CAAA;AACX,CAAC,EATW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAS7B"}
|
|
@@ -8,7 +8,7 @@ export declare class ImporterOfRecord {
|
|
|
8
8
|
/** @description Indicates Company Name of the owner or purchaser of the products being imported into a destination country*/
|
|
9
9
|
company_name?: string;
|
|
10
10
|
/** @description Indicates address line one of the owner or purchaser of the products being imported into a destination country*/
|
|
11
|
-
address_line1
|
|
11
|
+
address_line1?: string;
|
|
12
12
|
/** @description Indicates address of the owner or purchaser of the products being imported into a destination country*/
|
|
13
13
|
address_line2?: string;
|
|
14
14
|
/** @description Indicates City or Locality of the owner or purchaser of the products being imported into a destination country */
|
package/lib/models/package.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { WeightDetails } from './units/weight-details';
|
|
|
3
3
|
import { Currency } from './currency';
|
|
4
4
|
import { LabelMessage } from './labels/label-message';
|
|
5
5
|
import { Customs } from './customs';
|
|
6
|
+
import { DangerousGoods } from './dangerous-good/dangerous-goods';
|
|
6
7
|
/** @description Basic structure for a package */
|
|
7
8
|
export declare class Package {
|
|
8
9
|
/** @description Package code defined for the carrier in ShipEngine. */
|
|
@@ -19,4 +20,6 @@ export declare class Package {
|
|
|
19
20
|
label_messages?: LabelMessage;
|
|
20
21
|
/** @description Basic structure for a customs declaration (Only available on international shipments) */
|
|
21
22
|
customs?: Customs;
|
|
23
|
+
/** @description List of dangerous goods model associated with this package passed to the carrier. */
|
|
24
|
+
dangerous_goods?: DangerousGoods[];
|
|
22
25
|
}
|
package/lib/models/package.js
CHANGED
|
@@ -17,6 +17,8 @@ class Package {
|
|
|
17
17
|
label_messages;
|
|
18
18
|
/** @description Basic structure for a customs declaration (Only available on international shipments) */
|
|
19
19
|
customs;
|
|
20
|
+
/** @description List of dangerous goods model associated with this package passed to the carrier. */
|
|
21
|
+
dangerous_goods;
|
|
20
22
|
}
|
|
21
23
|
exports.Package = Package;
|
|
22
24
|
//# sourceMappingURL=package.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/models/package.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/models/package.ts"],"names":[],"mappings":";;;AAOA,iDAAiD;AACjD,MAAa,OAAO;IAClB,uEAAuE;IACvE,YAAY,CAAU;IACtB,sIAAsI;IACtI,mBAAmB,CAAU;IAC7B,+DAA+D;IAC/D,iBAAiB,CAAoB;IACrC,2DAA2D;IAC3D,cAAc,CAAiB;IAC/B,sDAAsD;IACtD,aAAa,CAAY;IACzB,2EAA2E;IAC3E,cAAc,CAAgB;IAC9B,yGAAyG;IACzG,OAAO,CAAW;IAClB,qGAAqG;IACrG,eAAe,CAAoB;CACpC;AAjBD,0BAiBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/connect-carrier-api",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
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",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@types/sanitize-html": "^2.6.2",
|
|
35
35
|
"prettier": "^2.8.8",
|
|
36
36
|
"typescript": "^4.9.5",
|
|
37
|
+
"vite": "^4.3.9",
|
|
37
38
|
"vitest": "^0.23.4"
|
|
38
39
|
},
|
|
39
40
|
"optionalDependencies": {
|