@shipengine/connect-carrier-api 4.31.0-beta → 4.32.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/app/metadata/carrier-attributes.d.ts +5 -1
- package/lib/app/metadata/carrier-attributes.js +4 -0
- package/lib/app/metadata/carrier-attributes.js.map +1 -1
- package/lib/app/metadata/enums.d.ts +3 -1
- package/lib/app/metadata/enums.js +2 -0
- package/lib/app/metadata/enums.js.map +1 -1
- package/lib/models/index.d.ts +0 -3
- package/lib/models/index.js +0 -3
- package/lib/models/index.js.map +1 -1
- package/lib/models/native-rating/implementation-type.d.ts +3 -0
- package/lib/models/native-rating/implementation-type.js.map +1 -1
- package/lib/models/native-rating/rating-context.d.ts +11 -1
- package/lib/models/pickup/shipped-products-schema.js +0 -2
- package/lib/models/pickup/shipped-products-schema.js.map +1 -1
- package/lib/models/pickup/shipped-products.d.ts +0 -3
- package/lib/models/pickup/shipped-products.js +0 -2
- package/lib/models/pickup/shipped-products.js.map +1 -1
- package/lib/models/products.d.ts +0 -3
- package/lib/models/products.js +0 -2
- package/lib/models/products.js.map +1 -1
- package/package.json +1 -1
- package/spec.json +1 -35
- package/src/app/metadata/carrier-attributes.ts +4 -0
- package/src/app/metadata/enums.ts +2 -0
- package/src/models/index.ts +0 -3
- package/src/models/native-rating/implementation-type.ts +3 -0
- package/src/models/native-rating/rating-context.ts +13 -1
- package/src/models/pickup/shipped-products-schema.ts +0 -2
- package/src/models/pickup/shipped-products.ts +0 -3
- package/src/models/products.ts +0 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/models/cpsc-disclaim-code.d.ts +0 -4
- package/lib/models/cpsc-disclaim-code.js +0 -9
- package/lib/models/cpsc-disclaim-code.js.map +0 -1
- package/lib/models/cpsc-disclaim-schema.d.ts +0 -2
- package/lib/models/cpsc-disclaim-schema.js +0 -14
- package/lib/models/cpsc-disclaim-schema.js.map +0 -1
- package/lib/models/cpsc-disclaim.d.ts +0 -10
- package/lib/models/cpsc-disclaim.js +0 -14
- package/lib/models/cpsc-disclaim.js.map +0 -1
- package/src/models/cpsc-disclaim-code.ts +0 -4
- package/src/models/cpsc-disclaim-schema.ts +0 -10
- package/src/models/cpsc-disclaim.ts +0 -11
|
@@ -19,6 +19,10 @@ export declare enum CarrierAttributeEnum {
|
|
|
19
19
|
/** @description The shipping provider returns an image captured at the time of delivery, serving as evidence that the shipment was successfully delivered to the recipient via tracking */
|
|
20
20
|
ProofOfDelivery = "ProofOfDelivery",
|
|
21
21
|
/** @description The shipping provider returns estimated event location and timezone via tracking */
|
|
22
|
-
CountryTimezoneEstimation = "CountryTimezoneEstimation"
|
|
22
|
+
CountryTimezoneEstimation = "CountryTimezoneEstimation",
|
|
23
|
+
/** @description This carrier supports machine learning-based estimated delivery date predictions derived from historical tracking data. */
|
|
24
|
+
EstimatedDeliveryDate = "EstimatedDeliveryDate",
|
|
25
|
+
/** @description This carrier supports machine learning-based shipment delay risk assessment. */
|
|
26
|
+
DelayDetection = "DelayDetection"
|
|
23
27
|
}
|
|
24
28
|
export declare const CarrierAttributeEnumSchema: Joi.StringSchema;
|
|
@@ -25,6 +25,10 @@ var CarrierAttributeEnum;
|
|
|
25
25
|
CarrierAttributeEnum["ProofOfDelivery"] = "ProofOfDelivery";
|
|
26
26
|
/** @description The shipping provider returns estimated event location and timezone via tracking */
|
|
27
27
|
CarrierAttributeEnum["CountryTimezoneEstimation"] = "CountryTimezoneEstimation";
|
|
28
|
+
/** @description This carrier supports machine learning-based estimated delivery date predictions derived from historical tracking data. */
|
|
29
|
+
CarrierAttributeEnum["EstimatedDeliveryDate"] = "EstimatedDeliveryDate";
|
|
30
|
+
/** @description This carrier supports machine learning-based shipment delay risk assessment. */
|
|
31
|
+
CarrierAttributeEnum["DelayDetection"] = "DelayDetection";
|
|
28
32
|
})(CarrierAttributeEnum || (exports.CarrierAttributeEnum = CarrierAttributeEnum = {}));
|
|
29
33
|
exports.CarrierAttributeEnumSchema = joi_1.default.string().valid(...Object.values(CarrierAttributeEnum));
|
|
30
34
|
//# sourceMappingURL=carrier-attributes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier-attributes.js","sourceRoot":"","sources":["../../../src/app/metadata/carrier-attributes.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,IAAY,
|
|
1
|
+
{"version":3,"file":"carrier-attributes.js","sourceRoot":"","sources":["../../../src/app/metadata/carrier-attributes.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAEtB,IAAY,oBAyBX;AAzBD,WAAY,oBAAoB;IAC9B,uDAAuD;IACvD,2DAAmC,CAAA;IACnC,wDAAwD;IACxD,6DAAqC,CAAA;IACrC,qEAAqE;IACrE,qDAA6B,CAAA;IAC7B,gEAAgE;IAChE,6CAAqB,CAAA;IACrB,wEAAwE;IACxE,yEAAiD,CAAA;IACjD,wFAAwF;IACxF,uDAA+B,CAAA;IAC/B,mIAAmI;IACnI,yEAAiD,CAAA;IACjD,6EAA6E;IAC7E,6DAAqC,CAAA;IACrC,2LAA2L;IAC3L,2DAAmC,CAAA;IACnC,oGAAoG;IACpG,+EAAuD,CAAA;IACvD,2IAA2I;IAC3I,uEAA+C,CAAA;IAC/C,gGAAgG;IAChG,yDAAiC,CAAA;AACnC,CAAC,EAzBW,oBAAoB,oCAApB,oBAAoB,QAyB/B;AAEY,QAAA,0BAA0B,GAAG,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAC1D,GAAG,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CACvC,CAAC"}
|
|
@@ -7,7 +7,9 @@ export declare enum CarrierAttribute {
|
|
|
7
7
|
DetailedStatuses = "DetailedStatuses",
|
|
8
8
|
ProofOfDelivery = "ProofOfDelivery",
|
|
9
9
|
TrackingSubscriptionLevel = "TrackingSubscriptionLevel",
|
|
10
|
-
CountryTimezoneEstimation = "CountryTimezoneEstimation"
|
|
10
|
+
CountryTimezoneEstimation = "CountryTimezoneEstimation",
|
|
11
|
+
EstimatedDeliveryDate = "EstimatedDeliveryDate",
|
|
12
|
+
DelayDetection = "DelayDetection"
|
|
11
13
|
}
|
|
12
14
|
export declare enum ShippingServiceAttribute {
|
|
13
15
|
Returns = "Returns",
|
|
@@ -12,6 +12,8 @@ var CarrierAttribute;
|
|
|
12
12
|
CarrierAttribute["ProofOfDelivery"] = "ProofOfDelivery";
|
|
13
13
|
CarrierAttribute["TrackingSubscriptionLevel"] = "TrackingSubscriptionLevel";
|
|
14
14
|
CarrierAttribute["CountryTimezoneEstimation"] = "CountryTimezoneEstimation";
|
|
15
|
+
CarrierAttribute["EstimatedDeliveryDate"] = "EstimatedDeliveryDate";
|
|
16
|
+
CarrierAttribute["DelayDetection"] = "DelayDetection";
|
|
15
17
|
})(CarrierAttribute || (exports.CarrierAttribute = CarrierAttribute = {}));
|
|
16
18
|
var ShippingServiceAttribute;
|
|
17
19
|
(function (ShippingServiceAttribute) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/app/metadata/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/app/metadata/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAYX;AAZD,WAAY,gBAAgB;IAC1B,uDAAmC,CAAA;IACnC,yDAAqC,CAAA;IACrC,iDAA6B,CAAA;IAC7B,yCAAqB,CAAA;IACrB,qEAAiD,CAAA;IACjD,yDAAqC,CAAA;IACrC,uDAAmC,CAAA;IACnC,2EAAuD,CAAA;IACvD,2EAAuD,CAAA;IACvD,mEAA+C,CAAA;IAC/C,qDAAiC,CAAA;AACnC,CAAC,EAZW,gBAAgB,gCAAhB,gBAAgB,QAY3B;AAED,IAAY,wBAgBX;AAhBD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,yDAA6B,CAAA;IAC7B,iDAAqB,CAAA;IACrB,uEAA2C,CAAA;IAC3C,iFAAqD,CAAA;IACrD,+DAAmC,CAAA;IACnC,iEAAqC,CAAA;IACrC,6DAAiC,CAAA;IACjC,uCAAW,CAAA;IACX,6DAAiC,CAAA;IACjC,2EAA+C,CAAA;IAC/C,6DAAiC,CAAA;IACjC,6EAAiD,CAAA;IACjD,yFAA6D,CAAA;IAC7D,6EAAiD,CAAA;AACnD,CAAC,EAhBW,wBAAwB,wCAAxB,wBAAwB,QAgBnC;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,6CAAuB,CAAA;IACvB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,YASX;AATD,WAAY,YAAY;IACtB,2CAA2B,CAAA;IAC3B,iCAAiB,CAAA;IACjB,iCAAiB,CAAA;IACjB,2CAA2B,CAAA;IAC3B,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;IACjB,2CAA2B,CAAA;IAC3B,qCAAqB,CAAA;AACvB,CAAC,EATW,YAAY,4BAAZ,YAAY,QASvB;AAED,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,2CAA2B,CAAA;IAC3B,mCAAmB,CAAA;IACnB,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,6CAAyB,CAAA;AAC3B,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,0CAAa,CAAA;IACb,8DAAiC,CAAA;IACjC,gDAAmB,CAAA;AACrB,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;IACjB,iCAAa,CAAA;AACf,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAED,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,wBAAW,CAAA;AACb,CAAC,EARW,SAAS,yBAAT,SAAS,QAQpB"}
|
package/lib/models/index.d.ts
CHANGED
|
@@ -7,9 +7,6 @@ export * from './billing';
|
|
|
7
7
|
export * from './confirmation-types';
|
|
8
8
|
export * from './cpsc-certificate';
|
|
9
9
|
export * from './cpsc-certificate-schema';
|
|
10
|
-
export * from './cpsc-disclaim';
|
|
11
|
-
export * from './cpsc-disclaim-code';
|
|
12
|
-
export * from './cpsc-disclaim-schema';
|
|
13
10
|
export * from './currency-schema';
|
|
14
11
|
export * from './currency';
|
|
15
12
|
export * from './customs';
|
package/lib/models/index.js
CHANGED
|
@@ -10,9 +10,6 @@ tslib_1.__exportStar(require("./billing"), exports);
|
|
|
10
10
|
tslib_1.__exportStar(require("./confirmation-types"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./cpsc-certificate"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("./cpsc-certificate-schema"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./cpsc-disclaim"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./cpsc-disclaim-code"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./cpsc-disclaim-schema"), exports);
|
|
16
13
|
tslib_1.__exportStar(require("./currency-schema"), exports);
|
|
17
14
|
tslib_1.__exportStar(require("./currency"), exports);
|
|
18
15
|
tslib_1.__exportStar(require("./customs"), exports);
|
package/lib/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,6DAAmC;AACnC,0DAAgC;AAChC,6DAAmC;AACnC,gEAAsC;AACtC,oDAA0B;AAC1B,+DAAqC;AACrC,6DAAmC;AACnC,oEAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,6DAAmC;AACnC,0DAAgC;AAChC,6DAAmC;AACnC,gEAAsC;AACtC,oDAA0B;AAC1B,+DAAqC;AACrC,6DAAmC;AACnC,oEAA0C;AAC1C,4DAAkC;AAClC,qDAA2B;AAC3B,oDAA0B;AAC1B,kEAAwC;AACxC,2DAAiC;AACjC,sDAA4B;AAC5B,mDAAyB;AACzB,8DAAoC;AACpC,8DAAoC;AACpC,uDAA6B;AAC7B,yEAA+C;AAC/C,kEAAwC;AACxC,gEAAsC;AACtC,mDAAyB;AACzB,sDAA4B;AAC5B,iFAAuD;AACvD,0DAAgC;AAChC,oDAA0B;AAC1B,mDAAyB;AACzB,kDAAwB;AACxB,yDAA+B;AAC/B,yDAA+B;AAC/B,qEAA2C;AAC3C,8DAAoC;AACpC,kDAAwB;AACxB,+DAAqC;AACrC,wDAA8B;AAC9B,qDAA2B;AAC3B,kDAAwB;AACxB,oDAA0B;AAC1B,qEAA2C;AAC3C,kEAAwC"}
|
|
@@ -24,6 +24,9 @@ export interface RatingCarrier {
|
|
|
24
24
|
* @returns List of rates for the given shipments
|
|
25
25
|
*/
|
|
26
26
|
rateShipments: (context: RatingContext, shipment: ShipmentAndId[]) => Promise<RateResultsAndId[]>;
|
|
27
|
+
/** Optionally pre-populate caches before serving traffic.
|
|
28
|
+
* Presence of this export opts a carrier into pre-warming. */
|
|
29
|
+
warmup?: (context: RatingContext) => Promise<void>;
|
|
27
30
|
}
|
|
28
31
|
/** Signify a validation error from the carrier */
|
|
29
32
|
export declare class CarrierValidationError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation-type.js","sourceRoot":"","sources":["../../../src/models/native-rating/implementation-type.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"implementation-type.js","sourceRoot":"","sources":["../../../src/models/native-rating/implementation-type.ts"],"names":[],"mappings":";;;AAkCA,kDAAkD;AAClD,MAAa,sBAAuB,SAAQ,KAAK;CAAG;AAApD,wDAAoD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger } from 'winston';
|
|
2
|
-
import { GetVariables } from './get-variables';
|
|
2
|
+
import { GetVariables, GetVariableResults } from './get-variables';
|
|
3
3
|
import { GetRates } from './get-rates';
|
|
4
4
|
import { GetZone } from './get-zone';
|
|
5
5
|
/** Rates request context */
|
|
@@ -12,4 +12,14 @@ export interface RatingContext {
|
|
|
12
12
|
getZone: GetZone;
|
|
13
13
|
/** Logger that implementers can use */
|
|
14
14
|
log: Logger;
|
|
15
|
+
/** Fetch all variables for the active rate card in a single query.
|
|
16
|
+
* Present only for published requests. Used by bundles to pre-warm
|
|
17
|
+
* their variable cache on startup.
|
|
18
|
+
* Unlike getVariables, which omits keys that have no stored value,
|
|
19
|
+
* this returns every variable key in the rate card. */
|
|
20
|
+
getAllVariables?: () => Promise<GetVariableResults>;
|
|
21
|
+
/** Version identifier of the currently published rate card.
|
|
22
|
+
* Present only for published requests. Used by bundles to invalidate
|
|
23
|
+
* their cache when a new rate card is published. */
|
|
24
|
+
rateCardVersion?: string;
|
|
15
25
|
}
|
|
@@ -7,7 +7,6 @@ const connect_carrier_api_1 = require("@shipengine/connect-carrier-api");
|
|
|
7
7
|
const weight_details_schema_1 = require("../units/weight-details-schema");
|
|
8
8
|
const manufacturer_product_identifier_type_1 = require("../manufacturer-product-identifier-type");
|
|
9
9
|
const cpsc_certificate_schema_1 = require("../cpsc-certificate-schema");
|
|
10
|
-
const cpsc_disclaim_schema_1 = require("../cpsc-disclaim-schema");
|
|
11
10
|
exports.ShippedProductsSchema = joi_1.default.object({
|
|
12
11
|
description: joi_1.default.string().optional(),
|
|
13
12
|
quantity: joi_1.default.number().optional(),
|
|
@@ -27,6 +26,5 @@ exports.ShippedProductsSchema = joi_1.default.object({
|
|
|
27
26
|
manufacturer_ns_product_id: joi_1.default.string().optional(),
|
|
28
27
|
dangerous_goods: joi_1.default.object().optional(),
|
|
29
28
|
cpsc_certificates: joi_1.default.array().items(cpsc_certificate_schema_1.CpscCertificateSchema).optional(),
|
|
30
|
-
cpsc_disclaim: cpsc_disclaim_schema_1.CpscDisclaimSchema.optional(),
|
|
31
29
|
});
|
|
32
30
|
//# sourceMappingURL=shipped-products-schema.js.map
|
|
@@ -1 +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;AACrE,kGAA4F;AAC5F,wEAAmE;
|
|
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;AACrE,kGAA4F;AAC5F,wEAAmE;AAEtD,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,4BAA4B,EAAE,aAAG,CAAC,MAAM,EAAE;SACvC,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,wEAAiC,CAAC,CAAC;SAC1D,QAAQ,EAAE;IACb,uBAAuB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChD,0BAA0B,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnD,eAAe,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,iBAAiB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,+CAAqB,CAAC,CAAC,QAAQ,EAAE;CACvE,CAAC,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { Currency, WeightDetails } from '@shipengine/connect-carrier-api';
|
|
|
2
2
|
import { DangerousGoods } from '../dangerous-good/dangerous-goods';
|
|
3
3
|
import { ManufacturerProductIdentifierType } from '../manufacturer-product-identifier-type';
|
|
4
4
|
import { CpscCertificate } from '../cpsc-certificate';
|
|
5
|
-
import { CpscDisclaim } from '../cpsc-disclaim';
|
|
6
5
|
/** @description Basic structure for a product from a shipped shipment*/
|
|
7
6
|
export declare class ShippedProducts {
|
|
8
7
|
/** @description A user specified free form string describing this customs item. If the field is absent the user has not specified a description */
|
|
@@ -37,8 +36,6 @@ export declare class ShippedProducts {
|
|
|
37
36
|
dangerous_goods?: DangerousGoods[];
|
|
38
37
|
/** @description CPSC (U.S. Consumer Product Safety Commission) Certificate of Compliance reference data for U.S. CPSC eFiling. Supports the Reference (Abbreviated) PGA Message Set. */
|
|
39
38
|
cpsc_certificates?: CpscCertificate[];
|
|
40
|
-
/** @description CPSC (U.S. Consumer Product Safety Commission) eFiling Disclaim data for products that are not subject to CPSC regulation. */
|
|
41
|
-
cpsc_disclaim?: CpscDisclaim;
|
|
42
39
|
/** @description Additional details for product. */
|
|
43
40
|
[key: string]: any;
|
|
44
41
|
}
|
|
@@ -35,8 +35,6 @@ class ShippedProducts {
|
|
|
35
35
|
dangerous_goods;
|
|
36
36
|
/** @description CPSC (U.S. Consumer Product Safety Commission) Certificate of Compliance reference data for U.S. CPSC eFiling. Supports the Reference (Abbreviated) PGA Message Set. */
|
|
37
37
|
cpsc_certificates;
|
|
38
|
-
/** @description CPSC (U.S. Consumer Product Safety Commission) eFiling Disclaim data for products that are not subject to CPSC regulation. */
|
|
39
|
-
cpsc_disclaim;
|
|
40
38
|
}
|
|
41
39
|
exports.ShippedProducts = ShippedProducts;
|
|
42
40
|
//# sourceMappingURL=shipped-products.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipped-products.js","sourceRoot":"","sources":["../../../src/models/pickup/shipped-products.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"shipped-products.js","sourceRoot":"","sources":["../../../src/models/pickup/shipped-products.ts"],"names":[],"mappings":";;;AAKA,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,wMAAwM;IACxM,4BAA4B,CAAqC;IACjE,8DAA8D;IAC9D,uBAAuB,CAAU;IACjC,iKAAiK;IACjK,0BAA0B,CAAU;IACpC,qGAAqG;IACrG,eAAe,CAAoB;IACnC,wLAAwL;IACxL,iBAAiB,CAAqB;CAGvC;AAnCD,0CAmCC"}
|
package/lib/models/products.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { DangerousGoods } from './dangerous-good/dangerous-goods';
|
|
|
4
4
|
import { UnitOfMeasureTypes } from './customs/unit-of-measure-types';
|
|
5
5
|
import { ManufacturerProductIdentifierType } from './manufacturer-product-identifier-type';
|
|
6
6
|
import { CpscCertificate } from './cpsc-certificate';
|
|
7
|
-
import { CpscDisclaim } from './cpsc-disclaim';
|
|
8
7
|
/** @description Basic structure for a product */
|
|
9
8
|
export declare class Products {
|
|
10
9
|
/** @description A user specified free form string describing this customs item. If the field is absent the user has not specified a description */
|
|
@@ -41,8 +40,6 @@ export declare class Products {
|
|
|
41
40
|
manufacturer_ns_product_id?: string;
|
|
42
41
|
/** @description CPSC (U.S. Consumer Product Safety Commission) Certificate of Compliance reference data for U.S. CPSC eFiling. Supports the Reference (Abbreviated) PGA Message Set. */
|
|
43
42
|
cpsc_certificates?: CpscCertificate[];
|
|
44
|
-
/** @description CPSC (U.S. Consumer Product Safety Commission) eFiling Disclaim data for products that are not subject to CPSC regulation. */
|
|
45
|
-
cpsc_disclaim?: CpscDisclaim;
|
|
46
43
|
/** @description Additional details for product. */
|
|
47
44
|
[key: string]: any;
|
|
48
45
|
}
|
package/lib/models/products.js
CHANGED
|
@@ -37,8 +37,6 @@ class Products {
|
|
|
37
37
|
manufacturer_ns_product_id;
|
|
38
38
|
/** @description CPSC (U.S. Consumer Product Safety Commission) Certificate of Compliance reference data for U.S. CPSC eFiling. Supports the Reference (Abbreviated) PGA Message Set. */
|
|
39
39
|
cpsc_certificates;
|
|
40
|
-
/** @description CPSC (U.S. Consumer Product Safety Commission) eFiling Disclaim data for products that are not subject to CPSC regulation. */
|
|
41
|
-
cpsc_disclaim;
|
|
42
40
|
}
|
|
43
41
|
exports.Products = Products;
|
|
44
42
|
//# sourceMappingURL=products.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/models/products.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/models/products.ts"],"names":[],"mappings":";;;AAOA,iDAAiD;AACjD,MAAa,QAAQ;IACnB,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,2EAA2E;IAC3E,eAAe,CAAsB;IACrC,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;IACnC,wMAAwM;IACxM,4BAA4B,CAAqC;IACjE,8DAA8D;IAC9D,uBAAuB,CAAU;IACjC,iKAAiK;IACjK,0BAA0B,CAAU;IACpC,wLAAwL;IACxL,iBAAiB,CAAqB;CAGvC;AArCD,4BAqCC"}
|
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.48.0"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/Register": {
|
|
@@ -1422,26 +1422,6 @@
|
|
|
1422
1422
|
],
|
|
1423
1423
|
"type": "string"
|
|
1424
1424
|
},
|
|
1425
|
-
"CpscDisclaim": {
|
|
1426
|
-
"type": "object",
|
|
1427
|
-
"properties": {
|
|
1428
|
-
"disclaim_code": {
|
|
1429
|
-
"$ref": "#/components/schemas/DisclaimCode"
|
|
1430
|
-
},
|
|
1431
|
-
"intended_use_code": {
|
|
1432
|
-
"type": "string",
|
|
1433
|
-
"description": "The intended use code for the product. Maximum length of 16 characters.",
|
|
1434
|
-
"nullable": true
|
|
1435
|
-
},
|
|
1436
|
-
"intended_use_description": {
|
|
1437
|
-
"type": "string",
|
|
1438
|
-
"description": "The intended use description for the product. Maximum length of 100 characters.",
|
|
1439
|
-
"nullable": true
|
|
1440
|
-
}
|
|
1441
|
-
},
|
|
1442
|
-
"additionalProperties": false,
|
|
1443
|
-
"description": "CPSC (U.S. Consumer Product Safety Commission) eFiling Disclaim data.\r\nUsed when a product is exempt from CPSC certificate requirements."
|
|
1444
|
-
},
|
|
1445
1425
|
"CpscCertificate": {
|
|
1446
1426
|
"type": "object",
|
|
1447
1427
|
"properties": {
|
|
@@ -2411,14 +2391,6 @@
|
|
|
2411
2391
|
"additionalProperties": false,
|
|
2412
2392
|
"description": "This model represents the measurements for dimensions."
|
|
2413
2393
|
},
|
|
2414
|
-
"DisclaimCode": {
|
|
2415
|
-
"enum": [
|
|
2416
|
-
"A",
|
|
2417
|
-
"B"
|
|
2418
|
-
],
|
|
2419
|
-
"type": "string",
|
|
2420
|
-
"description": "The CPSC disclaim code indicating the reason a product is exempt from CPSC certificate requirements."
|
|
2421
|
-
},
|
|
2422
2394
|
"DisplayScheme": {
|
|
2423
2395
|
"enum": [
|
|
2424
2396
|
"label",
|
|
@@ -4015,9 +3987,6 @@
|
|
|
4015
3987
|
},
|
|
4016
3988
|
"description": "CPSC (U.S. Consumer Product Safety Commission) Certificate of Compliance reference\r\ndata for U.S. CPSC eFiling. Supports the Reference (Abbreviated) PGA Message Set.",
|
|
4017
3989
|
"nullable": true
|
|
4018
|
-
},
|
|
4019
|
-
"cpsc_disclaim": {
|
|
4020
|
-
"$ref": "#/components/schemas/CpscDisclaim"
|
|
4021
3990
|
}
|
|
4022
3991
|
},
|
|
4023
3992
|
"additionalProperties": { },
|
|
@@ -4903,9 +4872,6 @@
|
|
|
4903
4872
|
},
|
|
4904
4873
|
"description": "CPSC (U.S. Consumer Product Safety Commission) Certificate of Compliance reference\r\ndata for U.S. CPSC eFiling. Supports the Reference (Abbreviated) PGA Message Set.",
|
|
4905
4874
|
"nullable": true
|
|
4906
|
-
},
|
|
4907
|
-
"cpsc_disclaim": {
|
|
4908
|
-
"$ref": "#/components/schemas/CpscDisclaim"
|
|
4909
4875
|
}
|
|
4910
4876
|
},
|
|
4911
4877
|
"additionalProperties": { },
|
|
@@ -21,6 +21,10 @@ export enum CarrierAttributeEnum {
|
|
|
21
21
|
ProofOfDelivery = 'ProofOfDelivery',
|
|
22
22
|
/** @description The shipping provider returns estimated event location and timezone via tracking */
|
|
23
23
|
CountryTimezoneEstimation = 'CountryTimezoneEstimation',
|
|
24
|
+
/** @description This carrier supports machine learning-based estimated delivery date predictions derived from historical tracking data. */
|
|
25
|
+
EstimatedDeliveryDate = 'EstimatedDeliveryDate',
|
|
26
|
+
/** @description This carrier supports machine learning-based shipment delay risk assessment. */
|
|
27
|
+
DelayDetection = 'DelayDetection',
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
export const CarrierAttributeEnumSchema = Joi.string().valid(
|
|
@@ -8,6 +8,8 @@ export enum CarrierAttribute {
|
|
|
8
8
|
ProofOfDelivery = 'ProofOfDelivery',
|
|
9
9
|
TrackingSubscriptionLevel = 'TrackingSubscriptionLevel',
|
|
10
10
|
CountryTimezoneEstimation = 'CountryTimezoneEstimation',
|
|
11
|
+
EstimatedDeliveryDate = 'EstimatedDeliveryDate',
|
|
12
|
+
DelayDetection = 'DelayDetection',
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
export enum ShippingServiceAttribute {
|
package/src/models/index.ts
CHANGED
|
@@ -7,9 +7,6 @@ export * from './billing';
|
|
|
7
7
|
export * from './confirmation-types';
|
|
8
8
|
export * from './cpsc-certificate';
|
|
9
9
|
export * from './cpsc-certificate-schema';
|
|
10
|
-
export * from './cpsc-disclaim';
|
|
11
|
-
export * from './cpsc-disclaim-code';
|
|
12
|
-
export * from './cpsc-disclaim-schema';
|
|
13
10
|
export * from './currency-schema';
|
|
14
11
|
export * from './currency';
|
|
15
12
|
export * from './customs';
|
|
@@ -27,6 +27,9 @@ export interface RatingCarrier {
|
|
|
27
27
|
* @returns List of rates for the given shipments
|
|
28
28
|
*/
|
|
29
29
|
rateShipments: (context: RatingContext, shipment: ShipmentAndId[]) => Promise<RateResultsAndId[]>;
|
|
30
|
+
/** Optionally pre-populate caches before serving traffic.
|
|
31
|
+
* Presence of this export opts a carrier into pre-warming. */
|
|
32
|
+
warmup?: (context: RatingContext) => Promise<void>;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
/** Signify a validation error from the carrier */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger } from 'winston';
|
|
2
|
-
import { GetVariables } from './get-variables';
|
|
2
|
+
import { GetVariables, GetVariableResults } from './get-variables';
|
|
3
3
|
import { GetRates } from './get-rates';
|
|
4
4
|
import { GetZone } from './get-zone';
|
|
5
5
|
|
|
@@ -16,4 +16,16 @@ export interface RatingContext {
|
|
|
16
16
|
|
|
17
17
|
/** Logger that implementers can use */
|
|
18
18
|
log: Logger;
|
|
19
|
+
|
|
20
|
+
/** Fetch all variables for the active rate card in a single query.
|
|
21
|
+
* Present only for published requests. Used by bundles to pre-warm
|
|
22
|
+
* their variable cache on startup.
|
|
23
|
+
* Unlike getVariables, which omits keys that have no stored value,
|
|
24
|
+
* this returns every variable key in the rate card. */
|
|
25
|
+
getAllVariables?: () => Promise<GetVariableResults>;
|
|
26
|
+
|
|
27
|
+
/** Version identifier of the currently published rate card.
|
|
28
|
+
* Present only for published requests. Used by bundles to invalidate
|
|
29
|
+
* their cache when a new rate card is published. */
|
|
30
|
+
rateCardVersion?: string;
|
|
19
31
|
}
|
|
@@ -3,7 +3,6 @@ import { CurrencySchema } from '@shipengine/connect-carrier-api';
|
|
|
3
3
|
import { WeightDetailsSchema } from '../units/weight-details-schema';
|
|
4
4
|
import { ManufacturerProductIdentifierType } from '../manufacturer-product-identifier-type';
|
|
5
5
|
import { CpscCertificateSchema } from '../cpsc-certificate-schema';
|
|
6
|
-
import { CpscDisclaimSchema } from '../cpsc-disclaim-schema';
|
|
7
6
|
|
|
8
7
|
export const ShippedProductsSchema = Joi.object({
|
|
9
8
|
description: Joi.string().optional(),
|
|
@@ -24,5 +23,4 @@ export const ShippedProductsSchema = Joi.object({
|
|
|
24
23
|
manufacturer_ns_product_id: Joi.string().optional(),
|
|
25
24
|
dangerous_goods: Joi.object().optional(),
|
|
26
25
|
cpsc_certificates: Joi.array().items(CpscCertificateSchema).optional(),
|
|
27
|
-
cpsc_disclaim: CpscDisclaimSchema.optional(),
|
|
28
26
|
});
|
|
@@ -2,7 +2,6 @@ import { Currency, WeightDetails } from '@shipengine/connect-carrier-api';
|
|
|
2
2
|
import { DangerousGoods } from '../dangerous-good/dangerous-goods';
|
|
3
3
|
import { ManufacturerProductIdentifierType } from '../manufacturer-product-identifier-type';
|
|
4
4
|
import { CpscCertificate } from '../cpsc-certificate';
|
|
5
|
-
import { CpscDisclaim } from '../cpsc-disclaim';
|
|
6
5
|
|
|
7
6
|
/** @description Basic structure for a product from a shipped shipment*/
|
|
8
7
|
export class ShippedProducts {
|
|
@@ -38,8 +37,6 @@ export class ShippedProducts {
|
|
|
38
37
|
dangerous_goods?: DangerousGoods[];
|
|
39
38
|
/** @description CPSC (U.S. Consumer Product Safety Commission) Certificate of Compliance reference data for U.S. CPSC eFiling. Supports the Reference (Abbreviated) PGA Message Set. */
|
|
40
39
|
cpsc_certificates?: CpscCertificate[];
|
|
41
|
-
/** @description CPSC (U.S. Consumer Product Safety Commission) eFiling Disclaim data for products that are not subject to CPSC regulation. */
|
|
42
|
-
cpsc_disclaim?: CpscDisclaim;
|
|
43
40
|
/** @description Additional details for product. */
|
|
44
41
|
[key: string]: any;
|
|
45
42
|
}
|
package/src/models/products.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { DangerousGoods } from './dangerous-good/dangerous-goods';
|
|
|
4
4
|
import { UnitOfMeasureTypes } from './customs/unit-of-measure-types';
|
|
5
5
|
import { ManufacturerProductIdentifierType } from './manufacturer-product-identifier-type';
|
|
6
6
|
import { CpscCertificate } from './cpsc-certificate';
|
|
7
|
-
import { CpscDisclaim } from './cpsc-disclaim';
|
|
8
7
|
|
|
9
8
|
/** @description Basic structure for a product */
|
|
10
9
|
export class Products {
|
|
@@ -42,8 +41,6 @@ export class Products {
|
|
|
42
41
|
manufacturer_ns_product_id?: string;
|
|
43
42
|
/** @description CPSC (U.S. Consumer Product Safety Commission) Certificate of Compliance reference data for U.S. CPSC eFiling. Supports the Reference (Abbreviated) PGA Message Set. */
|
|
44
43
|
cpsc_certificates?: CpscCertificate[];
|
|
45
|
-
/** @description CPSC (U.S. Consumer Product Safety Commission) eFiling Disclaim data for products that are not subject to CPSC regulation. */
|
|
46
|
-
cpsc_disclaim?: CpscDisclaim;
|
|
47
44
|
/** @description Additional details for product. */
|
|
48
45
|
[key: string]: any;
|
|
49
46
|
}
|