@shipengine/connect-carrier-api 4.6.9 → 4.7.0
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/pickup/shipped-package-schema.js +1 -0
- package/lib/models/pickup/shipped-package-schema.js.map +1 -1
- package/lib/models/pickup/shipped-package.d.ts +3 -0
- package/lib/models/pickup/shipped-package.js +2 -0
- package/lib/models/pickup/shipped-package.js.map +1 -1
- package/lib/models/pickup/shipped-products-schema.d.ts +2 -0
- package/lib/models/pickup/shipped-products-schema.js +22 -0
- package/lib/models/pickup/shipped-products-schema.js.map +1 -0
- package/lib/models/pickup/shipped-products.d.ts +29 -0
- package/lib/models/pickup/shipped-products.js +32 -0
- package/lib/models/pickup/shipped-products.js.map +1 -0
- package/package.json +1 -1
- package/spec.json +97 -2
- package/src/models/pickup/shipped-package-schema.ts +1 -0
- package/src/models/pickup/shipped-package.ts +3 -0
- package/src/models/pickup/shipped-products-schema.ts +18 -0
- package/src/models/pickup/shipped-products.ts +30 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -22,5 +22,6 @@ exports.ShippedPackageSchema = joi_1.default.object({
|
|
|
22
22
|
insured_value: currency_schema_1.CurrencySchema.required(),
|
|
23
23
|
label_messages: label_message_schema_1.LabelMessageSchema.optional(),
|
|
24
24
|
customs: customs_schema_1.CustomsSchema.optional(),
|
|
25
|
+
shipped_products: joi_1.default.array().items(identifier_schema_1.IdentifierSchema).optional(),
|
|
25
26
|
});
|
|
26
27
|
//# sourceMappingURL=shipped-package-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipped-package-schema.js","sourceRoot":"","sources":["../../../src/models/pickup/shipped-package-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,4DAAwD;AACxD,oCAA4C;AAC5C,wDAAoD;AACpD,gFAA2E;AAC3E,0EAAqE;AACrE,yEAAoE;AACpE,8DAA0D;AAE7C,QAAA,oBAAoB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC7C,eAAe,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,uBAAuB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,oCAAgB,CAAC,CAAC,QAAQ,EAAE;IACvE,iBAAiB,EAAE,iDAAsB,CAAC,QAAQ,EAAE;IACpD,cAAc,EAAE,2CAAmB,CAAC,QAAQ,EAAE;IAC9C,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,MAAM,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IACvC,aAAa,EAAE,gCAAc,CAAC,QAAQ,EAAE;IACxC,cAAc,EAAE,yCAAkB,CAAC,QAAQ,EAAE;IAC7C,OAAO,EAAE,8BAAa,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"shipped-package-schema.js","sourceRoot":"","sources":["../../../src/models/pickup/shipped-package-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,4DAAwD;AACxD,oCAA4C;AAC5C,wDAAoD;AACpD,gFAA2E;AAC3E,0EAAqE;AACrE,yEAAoE;AACpE,8DAA0D;AAE7C,QAAA,oBAAoB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC7C,eAAe,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,uBAAuB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,oCAAgB,CAAC,CAAC,QAAQ,EAAE;IACvE,iBAAiB,EAAE,iDAAsB,CAAC,QAAQ,EAAE;IACpD,cAAc,EAAE,2CAAmB,CAAC,QAAQ,EAAE;IAC9C,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,MAAM,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IACvC,aAAa,EAAE,gCAAc,CAAC,QAAQ,EAAE;IACxC,cAAc,EAAE,yCAAkB,CAAC,QAAQ,EAAE;IAC7C,OAAO,EAAE,8BAAa,CAAC,QAAQ,EAAE;IACjC,gBAAgB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,oCAAgB,CAAC,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { Dimensions } from '../units/dimensions';
|
|
|
5
5
|
import { Currency } from '../currency';
|
|
6
6
|
import { LabelMessage } from '../labels/label-message';
|
|
7
7
|
import { Customs } from '../customs';
|
|
8
|
+
import { ShippedProducts } from './shipped-products';
|
|
8
9
|
/** @description Basic structure for a package that has been shipped */
|
|
9
10
|
export declare class ShippedPackage {
|
|
10
11
|
/** @description The carrier tracking number associated with this package */
|
|
@@ -29,4 +30,6 @@ export declare class ShippedPackage {
|
|
|
29
30
|
label_messages?: LabelMessage;
|
|
30
31
|
/** @description Basic structure for a customs declaration (Only available on international shipments) */
|
|
31
32
|
customs?: Customs;
|
|
33
|
+
/** @description List of products associated with this package. */
|
|
34
|
+
shipped_products?: ShippedProducts[];
|
|
32
35
|
}
|
|
@@ -25,6 +25,8 @@ class ShippedPackage {
|
|
|
25
25
|
label_messages;
|
|
26
26
|
/** @description Basic structure for a customs declaration (Only available on international shipments) */
|
|
27
27
|
customs;
|
|
28
|
+
/** @description List of products associated with this package. */
|
|
29
|
+
shipped_products;
|
|
28
30
|
}
|
|
29
31
|
exports.ShippedPackage = ShippedPackage;
|
|
30
32
|
//# sourceMappingURL=shipped-package.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipped-package.js","sourceRoot":"","sources":["../../../src/models/pickup/shipped-package.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"shipped-package.js","sourceRoot":"","sources":["../../../src/models/pickup/shipped-package.ts"],"names":[],"mappings":";;;AASA,uEAAuE;AACvE,MAAa,cAAc;IACzB,4EAA4E;IAC5E,eAAe,CAAU;IACzB,yEAAyE;IACzE,YAAY,CAAU;IACtB,wEAAwE;IACxE,uBAAuB,CAAgB;IACvC,+DAA+D;IAC/D,iBAAiB,CAAoB;IACrC,2DAA2D;IAC3D,cAAc,CAAiB;IAC/B,6DAA6D;IAC7D,YAAY,CAAU;IACtB,0DAA0D;IAC1D,MAAM,CAAU;IAChB,6DAA6D;IAC7D,UAAU,CAAc;IACxB,sDAAsD;IACtD,aAAa,CAAY;IACzB,2EAA2E;IAC3E,cAAc,CAAgB;IAC9B,yGAAyG;IACzG,OAAO,CAAW;IAClB,kEAAkE;IAClE,gBAAgB,CAAqB;CACtC;AAzBD,wCAyBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShippedProductsSchema = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const joi_1 = tslib_1.__importDefault(require("joi"));
|
|
6
|
+
const connect_carrier_api_1 = require("@shipengine/connect-carrier-api");
|
|
7
|
+
const weight_details_schema_1 = require("../units/weight-details-schema");
|
|
8
|
+
exports.ShippedProductsSchema = joi_1.default.object({
|
|
9
|
+
description: joi_1.default.string().optional(),
|
|
10
|
+
quantity: joi_1.default.number().optional(),
|
|
11
|
+
value: connect_carrier_api_1.CurrencySchema.optional(),
|
|
12
|
+
country_of_origin: joi_1.default.string().optional(),
|
|
13
|
+
harmonized_tariff_code: joi_1.default.string().optional(),
|
|
14
|
+
sku: joi_1.default.string().optional(),
|
|
15
|
+
sku_description: joi_1.default.string().optional(),
|
|
16
|
+
item_weight: weight_details_schema_1.WeightDetailsSchema.optional(),
|
|
17
|
+
product_url: joi_1.default.string().optional(),
|
|
18
|
+
vat_rate: joi_1.default.number().optional(),
|
|
19
|
+
mid_code: joi_1.default.string().optional(),
|
|
20
|
+
dangerous_goods: joi_1.default.object().optional(),
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=shipped-products-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipped-products-schema.js","sourceRoot":"","sources":["../../../src/models/pickup/shipped-products-schema.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,yEAAiE;AACjE,0EAAqE;AAExD,QAAA,qBAAqB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC9C,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,QAAQ,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,oCAAc,CAAC,QAAQ,EAAE;IAChC,iBAAiB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,sBAAsB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/C,GAAG,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,eAAe,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,WAAW,EAAE,2CAAmB,CAAC,QAAQ,EAAE;IAC3C,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,QAAQ,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,eAAe,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Currency, WeightDetails } from '@shipengine/connect-carrier-api';
|
|
2
|
+
import { DangerousGoods } from '../dangerous-good/dangerous-goods';
|
|
3
|
+
/** @description Basic structure for a product from a shipped shipment*/
|
|
4
|
+
export declare class ShippedProducts {
|
|
5
|
+
/** @description A user specified free form string describing this customs item. If the field is absent the user has not specified a description */
|
|
6
|
+
description?: string;
|
|
7
|
+
/** @description The user specified count of items in this declaration. This value should be 1 or greater */
|
|
8
|
+
quantity?: number;
|
|
9
|
+
/** @description The user specified declared customs value of this customs item. Generally, this value needs to be greater than 0 to be accepted through customs */
|
|
10
|
+
value?: Currency;
|
|
11
|
+
/** @description The user specified declared country of origin of this customs item */
|
|
12
|
+
country_of_origin?: string;
|
|
13
|
+
/** @description The user specified Harmonized Tariff Code. See https://hts.usitc.gov/ for more information */
|
|
14
|
+
harmonized_tariff_code?: string;
|
|
15
|
+
/** @description The user specified SKU of this customs item. This field is completely free form. */
|
|
16
|
+
sku?: string;
|
|
17
|
+
/** @description The user specified SKU description of this customs item. This field is completely free form. */
|
|
18
|
+
sku_description?: string;
|
|
19
|
+
/** @description Detailed information about the weight of this item */
|
|
20
|
+
item_weight?: WeightDetails;
|
|
21
|
+
/** @description A link to the item being shipped on the seller's website, used by customs officials to visually compare the item in the package to the available photo on the website. */
|
|
22
|
+
product_url?: string;
|
|
23
|
+
/** @description The VAT rate applicable to the item being shipped, expressed as a decimal value between 0 and 1. */
|
|
24
|
+
vat_rate?: number;
|
|
25
|
+
/** @description The Manufacturer Identification Code (MID). It is ussed as an alternative to the full name and address of a manufacturer, shipper or exporter and is always required for U.S. formal customs entries. */
|
|
26
|
+
mid_code?: string;
|
|
27
|
+
/** @description List of dangerous goods model associated with this package passed to the carrier. */
|
|
28
|
+
dangerous_goods?: DangerousGoods[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShippedProducts = void 0;
|
|
4
|
+
/** @description Basic structure for a product from a shipped shipment*/
|
|
5
|
+
class ShippedProducts {
|
|
6
|
+
/** @description A user specified free form string describing this customs item. If the field is absent the user has not specified a description */
|
|
7
|
+
description;
|
|
8
|
+
/** @description The user specified count of items in this declaration. This value should be 1 or greater */
|
|
9
|
+
quantity;
|
|
10
|
+
/** @description The user specified declared customs value of this customs item. Generally, this value needs to be greater than 0 to be accepted through customs */
|
|
11
|
+
value;
|
|
12
|
+
/** @description The user specified declared country of origin of this customs item */
|
|
13
|
+
country_of_origin;
|
|
14
|
+
/** @description The user specified Harmonized Tariff Code. See https://hts.usitc.gov/ for more information */
|
|
15
|
+
harmonized_tariff_code;
|
|
16
|
+
/** @description The user specified SKU of this customs item. This field is completely free form. */
|
|
17
|
+
sku;
|
|
18
|
+
/** @description The user specified SKU description of this customs item. This field is completely free form. */
|
|
19
|
+
sku_description;
|
|
20
|
+
/** @description Detailed information about the weight of this item */
|
|
21
|
+
item_weight;
|
|
22
|
+
/** @description A link to the item being shipped on the seller's website, used by customs officials to visually compare the item in the package to the available photo on the website. */
|
|
23
|
+
product_url;
|
|
24
|
+
/** @description The VAT rate applicable to the item being shipped, expressed as a decimal value between 0 and 1. */
|
|
25
|
+
vat_rate;
|
|
26
|
+
/** @description The Manufacturer Identification Code (MID). It is ussed as an alternative to the full name and address of a manufacturer, shipper or exporter and is always required for U.S. formal customs entries. */
|
|
27
|
+
mid_code;
|
|
28
|
+
/** @description List of dangerous goods model associated with this package passed to the carrier. */
|
|
29
|
+
dangerous_goods;
|
|
30
|
+
}
|
|
31
|
+
exports.ShippedProducts = ShippedProducts;
|
|
32
|
+
//# sourceMappingURL=shipped-products.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipped-products.js","sourceRoot":"","sources":["../../../src/models/pickup/shipped-products.ts"],"names":[],"mappings":";;;AAGA,wEAAwE;AACxE,MAAa,eAAe;IAC1B,mJAAmJ;IACnJ,WAAW,CAAU;IACrB,4GAA4G;IAC5G,QAAQ,CAAU;IAClB,mKAAmK;IACnK,KAAK,CAAY;IACjB,sFAAsF;IACtF,iBAAiB,CAAU;IAC3B,8GAA8G;IAC9G,sBAAsB,CAAU;IAChC,oGAAoG;IACpG,GAAG,CAAU;IACb,gHAAgH;IAChH,eAAe,CAAU;IACzB,sEAAsE;IACtE,WAAW,CAAiB;IAC5B,0LAA0L;IAC1L,WAAW,CAAU;IACrB,oHAAoH;IACpH,QAAQ,CAAU;IAClB,yNAAyN;IACzN,QAAQ,CAAU;IAClB,qGAAqG;IACrG,eAAe,CAAoB;CACpC;AAzBD,0CAyBC"}
|
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.21.0"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/Register": {
|
|
@@ -716,7 +716,8 @@
|
|
|
716
716
|
"commercial",
|
|
717
717
|
"residential"
|
|
718
718
|
],
|
|
719
|
-
"type": "string"
|
|
719
|
+
"type": "string",
|
|
720
|
+
"description": "'Commercial' is no longer used, please use 'No'. <br />'Residential' is no longer used, please use 'Yes'."
|
|
720
721
|
},
|
|
721
722
|
"AddressWithContact": {
|
|
722
723
|
"required": [
|
|
@@ -3964,11 +3965,105 @@
|
|
|
3964
3965
|
},
|
|
3965
3966
|
"description": "The insured value of this package.",
|
|
3966
3967
|
"nullable": true
|
|
3968
|
+
},
|
|
3969
|
+
"products": {
|
|
3970
|
+
"type": "array",
|
|
3971
|
+
"items": {
|
|
3972
|
+
"$ref": "#/components/schemas/ShippedProducts"
|
|
3973
|
+
},
|
|
3974
|
+
"description": "List of products associated with this package.",
|
|
3975
|
+
"nullable": true
|
|
3967
3976
|
}
|
|
3968
3977
|
},
|
|
3969
3978
|
"additionalProperties": false,
|
|
3970
3979
|
"description": "This is the model for a package that has had a label generated for it"
|
|
3971
3980
|
},
|
|
3981
|
+
"ShippedProducts": {
|
|
3982
|
+
"required": [
|
|
3983
|
+
"value"
|
|
3984
|
+
],
|
|
3985
|
+
"type": "object",
|
|
3986
|
+
"properties": {
|
|
3987
|
+
"description": {
|
|
3988
|
+
"type": "string",
|
|
3989
|
+
"description": "A user specified free form string describing this customs item. If the field is absent the user has\r\nnot specified a description.",
|
|
3990
|
+
"nullable": true
|
|
3991
|
+
},
|
|
3992
|
+
"quantity": {
|
|
3993
|
+
"type": "integer",
|
|
3994
|
+
"description": "The user specified count of items in this declaration. This value should be 1 or greater",
|
|
3995
|
+
"format": "int32"
|
|
3996
|
+
},
|
|
3997
|
+
"value": {
|
|
3998
|
+
"required": [
|
|
3999
|
+
"currency",
|
|
4000
|
+
"amount"
|
|
4001
|
+
],
|
|
4002
|
+
"type": "object",
|
|
4003
|
+
"properties": {
|
|
4004
|
+
"amount": {
|
|
4005
|
+
"type": "string",
|
|
4006
|
+
"description": "Decimal currency value, as a string."
|
|
4007
|
+
},
|
|
4008
|
+
"currency": {
|
|
4009
|
+
"type": "string",
|
|
4010
|
+
"description": "Alpha-3 currency code complying with ISO 4217."
|
|
4011
|
+
}
|
|
4012
|
+
},
|
|
4013
|
+
"description": "The user specified declared customs value of this customs item. Generally, this value needs to be greater\r\nthan 0 to be accepted through customs.",
|
|
4014
|
+
"nullable": true
|
|
4015
|
+
},
|
|
4016
|
+
"country_of_origin": {
|
|
4017
|
+
"type": "string",
|
|
4018
|
+
"description": "The user specified declared country of origin of this customs item.",
|
|
4019
|
+
"nullable": true
|
|
4020
|
+
},
|
|
4021
|
+
"harmonized_tariff_code": {
|
|
4022
|
+
"type": "string",
|
|
4023
|
+
"description": "The user specified Harmonized Tariff Code. See https://hts.usitc.gov/ for more information.",
|
|
4024
|
+
"nullable": true
|
|
4025
|
+
},
|
|
4026
|
+
"sku": {
|
|
4027
|
+
"type": "string",
|
|
4028
|
+
"description": "The user specified SKU of this customs item. This field is completely free form.",
|
|
4029
|
+
"nullable": true
|
|
4030
|
+
},
|
|
4031
|
+
"sku_description": {
|
|
4032
|
+
"type": "string",
|
|
4033
|
+
"description": "The user specified SKU description of this customs item. This field is completely free form.",
|
|
4034
|
+
"nullable": true
|
|
4035
|
+
},
|
|
4036
|
+
"item_weight": {
|
|
4037
|
+
"$ref": "#/components/schemas/WeightDetails"
|
|
4038
|
+
},
|
|
4039
|
+
"product_url": {
|
|
4040
|
+
"type": "string",
|
|
4041
|
+
"description": "A link to the item being shipped on the seller's website, used by customs officials\r\nto visually compare the item in the package to the available photo on the website.",
|
|
4042
|
+
"nullable": true
|
|
4043
|
+
},
|
|
4044
|
+
"vat_rate": {
|
|
4045
|
+
"type": "number",
|
|
4046
|
+
"description": "The VAT rate applicable to the item being shipped, expressed as a decimal value between 0 and 1.",
|
|
4047
|
+
"format": "double",
|
|
4048
|
+
"nullable": true
|
|
4049
|
+
},
|
|
4050
|
+
"mid_code": {
|
|
4051
|
+
"type": "string",
|
|
4052
|
+
"description": "The Manufacturer Identification Code (MID). It is ussed as an alternative to the full\r\nname and address of a manufacturer, shipper or exporter and is always required for\r\nU.S. formal customs entries.",
|
|
4053
|
+
"nullable": true
|
|
4054
|
+
},
|
|
4055
|
+
"dangerous_goods": {
|
|
4056
|
+
"type": "array",
|
|
4057
|
+
"items": {
|
|
4058
|
+
"$ref": "#/components/schemas/DangerousGoods"
|
|
4059
|
+
},
|
|
4060
|
+
"description": "List of dangerous Goods model associated with this package passed to the carrier.",
|
|
4061
|
+
"nullable": true
|
|
4062
|
+
}
|
|
4063
|
+
},
|
|
4064
|
+
"additionalProperties": false,
|
|
4065
|
+
"description": "This model represents the product of a package that has had a label generated for it"
|
|
4066
|
+
},
|
|
3972
4067
|
"ShippedShipment": {
|
|
3973
4068
|
"type": "object",
|
|
3974
4069
|
"properties": {
|
|
@@ -5,6 +5,7 @@ import { Dimensions } from '../units/dimensions';
|
|
|
5
5
|
import { Currency } from '../currency';
|
|
6
6
|
import { LabelMessage } from '../labels/label-message';
|
|
7
7
|
import { Customs } from '../customs';
|
|
8
|
+
import { ShippedProducts } from './shipped-products';
|
|
8
9
|
|
|
9
10
|
/** @description Basic structure for a package that has been shipped */
|
|
10
11
|
export class ShippedPackage {
|
|
@@ -30,4 +31,6 @@ export class ShippedPackage {
|
|
|
30
31
|
label_messages?: LabelMessage;
|
|
31
32
|
/** @description Basic structure for a customs declaration (Only available on international shipments) */
|
|
32
33
|
customs?: Customs;
|
|
34
|
+
/** @description List of products associated with this package. */
|
|
35
|
+
shipped_products?: ShippedProducts[];
|
|
33
36
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { CurrencySchema } from '@shipengine/connect-carrier-api';
|
|
3
|
+
import { WeightDetailsSchema } from '../units/weight-details-schema';
|
|
4
|
+
|
|
5
|
+
export const ShippedProductsSchema = Joi.object({
|
|
6
|
+
description: Joi.string().optional(),
|
|
7
|
+
quantity: Joi.number().optional(),
|
|
8
|
+
value: CurrencySchema.optional(),
|
|
9
|
+
country_of_origin: Joi.string().optional(),
|
|
10
|
+
harmonized_tariff_code: Joi.string().optional(),
|
|
11
|
+
sku: Joi.string().optional(),
|
|
12
|
+
sku_description: Joi.string().optional(),
|
|
13
|
+
item_weight: WeightDetailsSchema.optional(),
|
|
14
|
+
product_url: Joi.string().optional(),
|
|
15
|
+
vat_rate: Joi.number().optional(),
|
|
16
|
+
mid_code: Joi.string().optional(),
|
|
17
|
+
dangerous_goods: Joi.object().optional(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Currency, WeightDetails } from '@shipengine/connect-carrier-api';
|
|
2
|
+
import { DangerousGoods } from '../dangerous-good/dangerous-goods';
|
|
3
|
+
|
|
4
|
+
/** @description Basic structure for a product from a shipped shipment*/
|
|
5
|
+
export class ShippedProducts {
|
|
6
|
+
/** @description A user specified free form string describing this customs item. If the field is absent the user has not specified a description */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** @description The user specified count of items in this declaration. This value should be 1 or greater */
|
|
9
|
+
quantity?: number;
|
|
10
|
+
/** @description The user specified declared customs value of this customs item. Generally, this value needs to be greater than 0 to be accepted through customs */
|
|
11
|
+
value?: Currency;
|
|
12
|
+
/** @description The user specified declared country of origin of this customs item */
|
|
13
|
+
country_of_origin?: string;
|
|
14
|
+
/** @description The user specified Harmonized Tariff Code. See https://hts.usitc.gov/ for more information */
|
|
15
|
+
harmonized_tariff_code?: string;
|
|
16
|
+
/** @description The user specified SKU of this customs item. This field is completely free form. */
|
|
17
|
+
sku?: string;
|
|
18
|
+
/** @description The user specified SKU description of this customs item. This field is completely free form. */
|
|
19
|
+
sku_description?: string;
|
|
20
|
+
/** @description Detailed information about the weight of this item */
|
|
21
|
+
item_weight?: WeightDetails;
|
|
22
|
+
/** @description A link to the item being shipped on the seller's website, used by customs officials to visually compare the item in the package to the available photo on the website. */
|
|
23
|
+
product_url?: string;
|
|
24
|
+
/** @description The VAT rate applicable to the item being shipped, expressed as a decimal value between 0 and 1. */
|
|
25
|
+
vat_rate?: number;
|
|
26
|
+
/** @description The Manufacturer Identification Code (MID). It is ussed as an alternative to the full name and address of a manufacturer, shipper or exporter and is always required for U.S. formal customs entries. */
|
|
27
|
+
mid_code?: string;
|
|
28
|
+
/** @description List of dangerous goods model associated with this package passed to the carrier. */
|
|
29
|
+
dangerous_goods?: DangerousGoods[];
|
|
30
|
+
}
|