@shipengine/connect-carrier-api 4.34.1-alpha-gold-28569.0 → 4.35.0-alpha.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-app-metadata.d.ts +6 -0
- package/lib/app/metadata/carrier-app-metadata.js +1 -0
- package/lib/app/metadata/carrier-app-metadata.js.map +1 -1
- package/lib/requests/create-label-request.d.ts +2 -0
- package/lib/requests/create-label-request.js +2 -0
- package/lib/requests/create-label-request.js.map +1 -1
- package/lib/requests/get-rates-request.d.ts +2 -0
- package/lib/requests/get-rates-request.js +2 -0
- package/lib/requests/get-rates-request.js.map +1 -1
- package/package.json +1 -1
- package/spec.json +8 -2
- package/src/app/metadata/carrier-app-metadata.test.ts +18 -0
- package/src/app/metadata/carrier-app-metadata.ts +7 -0
- package/src/requests/create-label-request.ts +2 -0
- package/src/requests/get-rates-request.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -11,5 +11,11 @@ export interface CarrierAppMetadata {
|
|
|
11
11
|
Carriers: Carrier[];
|
|
12
12
|
/** @description Indicates whether the integration was developed by the carrier themselves (true) or by ShipStation (false) */
|
|
13
13
|
IsSelfIntegrated?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @description Strips the distributed-tracing headers that the platform's APM agents (New Relic,
|
|
16
|
+
* Sentry) add to outbound http/https requests: traceparent, tracestate, newrelic, sentry-trace and
|
|
17
|
+
* baggage. Enable this when the carrier's API rejects requests carrying them. Defaults to false.
|
|
18
|
+
*/
|
|
19
|
+
SuppressOutboundTracingHeaders?: boolean;
|
|
14
20
|
}
|
|
15
21
|
export declare const CarrierAppMetadataSchema: Joi.ObjectSchema<any>;
|
|
@@ -15,5 +15,6 @@ exports.CarrierAppMetadataSchema = joi_1.default.object({
|
|
|
15
15
|
.message('There must be at least 1 Carrier defined')
|
|
16
16
|
.items(_1.CarrierSchema),
|
|
17
17
|
IsSelfIntegrated: joi_1.default.boolean().strict().optional(),
|
|
18
|
+
SuppressOutboundTracingHeaders: joi_1.default.boolean().strict().optional(),
|
|
18
19
|
});
|
|
19
20
|
//# sourceMappingURL=carrier-app-metadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier-app-metadata.js","sourceRoot":"","sources":["../../../src/app/metadata/carrier-app-metadata.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,wBAAuF;
|
|
1
|
+
{"version":3,"file":"carrier-app-metadata.js","sourceRoot":"","sources":["../../../src/app/metadata/carrier-app-metadata.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,wBAAuF;AAqB1E,QAAA,wBAAwB,GAAG,aAAG,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,WAAW,EAAE,0BAAuB,CAAC,QAAQ,EAAE;IAC/C,QAAQ,EAAE,aAAG,CAAC,KAAK,EAAE;SAClB,MAAM,CAAC,IAAI,CAAC;SACZ,QAAQ,EAAE;SACV,GAAG,CAAC,CAAC,CAAC;SACN,OAAO,CAAC,0CAA0C,CAAC;SACnD,KAAK,CAAC,gBAAa,CAAC;IACvB,gBAAgB,EAAE,aAAG,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnD,8BAA8B,EAAE,aAAG,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClE,CAAC,CAAC"}
|
|
@@ -33,6 +33,8 @@ export declare class CreateLabelRequest extends BaseRequest {
|
|
|
33
33
|
attachments?: Document[];
|
|
34
34
|
/** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
|
|
35
35
|
carrier_pickup_window?: TimeWindow;
|
|
36
|
+
/** @description The delivery window is the time designated when the carrier will drop off the package to the recipient */
|
|
37
|
+
delivery_window?: TimeWindow;
|
|
36
38
|
/** @description Unique identifier for the carrier rate */
|
|
37
39
|
carrier_rate_id?: string;
|
|
38
40
|
/** @description Display schemes that the label will be returned in. Label is returned by default */
|
|
@@ -34,6 +34,8 @@ class CreateLabelRequest extends base_request_1.BaseRequest {
|
|
|
34
34
|
attachments;
|
|
35
35
|
/** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
|
|
36
36
|
carrier_pickup_window;
|
|
37
|
+
/** @description The delivery window is the time designated when the carrier will drop off the package to the recipient */
|
|
38
|
+
delivery_window;
|
|
37
39
|
/** @description Unique identifier for the carrier rate */
|
|
38
40
|
carrier_rate_id;
|
|
39
41
|
/** @description Display schemes that the label will be returned in. Label is returned by default */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-label-request.js","sourceRoot":"","sources":["../../src/requests/create-label-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAuB7C,mEAAmE;AACnE,MAAa,kBAAmB,SAAQ,0BAAW;IACjD,YAAY,CAAU;IACtB,aAAa,CAAU;IACvB,yBAAyB,CAAU;IACnC,YAAY,CAAqB;IACjC,YAAY,CAAkB;IAC9B,YAAY,CAAgB;IAC5B,qDAAqD;IACrD,aAAa,CAAW;IACxB,2FAA2F;IAC3F,gBAAgB,CAAmB;IACnC,kBAAkB,CAAsB;IACxC,oDAAoD;IACpD,eAAe,CAAW;IAC1B,QAAQ,CAAa;IACrB,OAAO,CAAU;IACjB,SAAS,CAAY;IACrB,gBAAgB,CAAgB;IAChC,eAAe,CAAgB;IAC/B,YAAY,CAAqB;IACjC,iBAAiB,CAAmB;IACpC,mEAAmE;IACnE,QAAQ,CAAW;IACnB,yDAAyD;IACzD,aAAa,CAAW;IACxB,SAAS,CAAU;IACnB,cAAc,CAAsB;IACpC,wBAAwB,CAA0B;IAClD,WAAW,CAAc;IACzB,wIAAwI;IACxI,qBAAqB,CAAc;IACnC,0DAA0D;IAC1D,eAAe,CAAU;IACzB,oGAAoG;IACpG,eAAe,CAAmB;IAClC,OAAO,CAAW;IAClB,kJAAkJ;IAClJ,gBAAgB,CAAU;IAC1B,8HAA8H;IAC9H,2BAA2B,CAA6B;CACzD;
|
|
1
|
+
{"version":3,"file":"create-label-request.js","sourceRoot":"","sources":["../../src/requests/create-label-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAuB7C,mEAAmE;AACnE,MAAa,kBAAmB,SAAQ,0BAAW;IACjD,YAAY,CAAU;IACtB,aAAa,CAAU;IACvB,yBAAyB,CAAU;IACnC,YAAY,CAAqB;IACjC,YAAY,CAAkB;IAC9B,YAAY,CAAgB;IAC5B,qDAAqD;IACrD,aAAa,CAAW;IACxB,2FAA2F;IAC3F,gBAAgB,CAAmB;IACnC,kBAAkB,CAAsB;IACxC,oDAAoD;IACpD,eAAe,CAAW;IAC1B,QAAQ,CAAa;IACrB,OAAO,CAAU;IACjB,SAAS,CAAY;IACrB,gBAAgB,CAAgB;IAChC,eAAe,CAAgB;IAC/B,YAAY,CAAqB;IACjC,iBAAiB,CAAmB;IACpC,mEAAmE;IACnE,QAAQ,CAAW;IACnB,yDAAyD;IACzD,aAAa,CAAW;IACxB,SAAS,CAAU;IACnB,cAAc,CAAsB;IACpC,wBAAwB,CAA0B;IAClD,WAAW,CAAc;IACzB,wIAAwI;IACxI,qBAAqB,CAAc;IACnC,0HAA0H;IAC1H,eAAe,CAAc;IAC7B,0DAA0D;IAC1D,eAAe,CAAU;IACzB,oGAAoG;IACpG,eAAe,CAAmB;IAClC,OAAO,CAAW;IAClB,kJAAkJ;IAClJ,gBAAgB,CAAU;IAC1B,8HAA8H;IAC9H,2BAA2B,CAA6B;CACzD;AA1CD,gDA0CC"}
|
|
@@ -21,6 +21,8 @@ export declare class GetRatesRequest extends BaseRequest {
|
|
|
21
21
|
fulfillment_plan_details?: FulfillmentPlanDetails;
|
|
22
22
|
/** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
|
|
23
23
|
carrier_pickup_window?: TimeWindow;
|
|
24
|
+
/** @description The delivery window is the time designated when the carrier will drop off the package to the recipient */
|
|
25
|
+
delivery_window?: TimeWindow;
|
|
24
26
|
/** Items included in the shipment */
|
|
25
27
|
items?: ShipmentItem[];
|
|
26
28
|
/** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
|
|
@@ -21,6 +21,8 @@ class GetRatesRequest extends base_request_1.BaseRequest {
|
|
|
21
21
|
fulfillment_plan_details;
|
|
22
22
|
/** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
|
|
23
23
|
carrier_pickup_window;
|
|
24
|
+
/** @description The delivery window is the time designated when the carrier will drop off the package to the recipient */
|
|
25
|
+
delivery_window;
|
|
24
26
|
/** Items included in the shipment */
|
|
25
27
|
items;
|
|
26
28
|
/** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-rates-request.js","sourceRoot":"","sources":["../../src/requests/get-rates-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAkB7C,8DAA8D;AAC9D,MAAa,eAAgB,SAAQ,0BAAW;IAC9C,YAAY,CAAU;IACtB,aAAa,CAAU;IACvB,yBAAyB,CAAU;IACnC,YAAY,CAAqB;IACjC,gBAAgB,CAAmB;IACnC,kBAAkB,CAAsB;IACxC,eAAe,CAAW;IAC1B,QAAQ,CAAa;IACrB,OAAO,CAAW;IAClB,OAAO,CAAU;IACjB,SAAS,CAAY;IACrB,eAAe,CAAgB;IAC/B,aAAa,CAAW;IACxB,QAAQ,CAAW;IACnB,wBAAwB,CAA0B;IAClD,wIAAwI;IACxI,qBAAqB,CAAc;IACnC,qCAAqC;IACrC,KAAK,CAAkB;IACvB,kJAAkJ;IAClJ,gBAAgB,CAAU;IAC1B,oGAAoG;IACpG,eAAe,CAAmB;IAClC,8HAA8H;IAC9H,2BAA2B,CAA6B;CACzD;
|
|
1
|
+
{"version":3,"file":"get-rates-request.js","sourceRoot":"","sources":["../../src/requests/get-rates-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAkB7C,8DAA8D;AAC9D,MAAa,eAAgB,SAAQ,0BAAW;IAC9C,YAAY,CAAU;IACtB,aAAa,CAAU;IACvB,yBAAyB,CAAU;IACnC,YAAY,CAAqB;IACjC,gBAAgB,CAAmB;IACnC,kBAAkB,CAAsB;IACxC,eAAe,CAAW;IAC1B,QAAQ,CAAa;IACrB,OAAO,CAAW;IAClB,OAAO,CAAU;IACjB,SAAS,CAAY;IACrB,eAAe,CAAgB;IAC/B,aAAa,CAAW;IACxB,QAAQ,CAAW;IACnB,wBAAwB,CAA0B;IAClD,wIAAwI;IACxI,qBAAqB,CAAc;IACnC,0HAA0H;IAC1H,eAAe,CAAc;IAC7B,qCAAqC;IACrC,KAAK,CAAkB;IACvB,kJAAkJ;IAClJ,gBAAgB,CAAU;IAC1B,oGAAoG;IACpG,eAAe,CAAmB;IAClC,8HAA8H;IAC9H,2BAA2B,CAA6B;CACzD;AA5BD,0CA4BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/connect-carrier-api",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.35.0-alpha.0",
|
|
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
|
@@ -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.53.1"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/Register": {
|
|
@@ -1727,6 +1727,9 @@
|
|
|
1727
1727
|
"carrier_pickup_window": {
|
|
1728
1728
|
"$ref": "#/components/schemas/TimeWindow"
|
|
1729
1729
|
},
|
|
1730
|
+
"delivery_window": {
|
|
1731
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
1732
|
+
},
|
|
1730
1733
|
"carrier_rate_id": {
|
|
1731
1734
|
"type": "string",
|
|
1732
1735
|
"description": "Unique identifier for the carrier rate",
|
|
@@ -2949,6 +2952,9 @@
|
|
|
2949
2952
|
"carrier_pickup_window": {
|
|
2950
2953
|
"$ref": "#/components/schemas/TimeWindow"
|
|
2951
2954
|
},
|
|
2955
|
+
"delivery_window": {
|
|
2956
|
+
"$ref": "#/components/schemas/TimeWindow"
|
|
2957
|
+
},
|
|
2952
2958
|
"display_schemes": {
|
|
2953
2959
|
"type": "array",
|
|
2954
2960
|
"items": {
|
|
@@ -6361,4 +6367,4 @@
|
|
|
6361
6367
|
"description": ""
|
|
6362
6368
|
}
|
|
6363
6369
|
]
|
|
6364
|
-
}
|
|
6370
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { CarrierAppMetadataSchema } from './carrier-app-metadata';
|
|
3
|
+
|
|
4
|
+
const suppressionErrors = (SuppressOutboundTracingHeaders: unknown) =>
|
|
5
|
+
CarrierAppMetadataSchema.validate(
|
|
6
|
+
{ Id: 'id', Name: 'name', Carriers: [{}], SuppressOutboundTracingHeaders },
|
|
7
|
+
{ allowUnknown: true, abortEarly: false },
|
|
8
|
+
).error?.details.filter((detail) => detail.path[0] === 'SuppressOutboundTracingHeaders') ?? [];
|
|
9
|
+
|
|
10
|
+
describe('CarrierAppMetadataSchema.SuppressOutboundTracingHeaders', () => {
|
|
11
|
+
it.each([undefined, true, false])('accepts %s', (value) => {
|
|
12
|
+
expect(suppressionErrors(value)).toEqual([]);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it.each(['true', 1, ['baggage']])('rejects %j', (value) => {
|
|
16
|
+
expect(suppressionErrors(value)).toHaveLength(1);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -12,6 +12,12 @@ export interface CarrierAppMetadata {
|
|
|
12
12
|
Carriers: Carrier[];
|
|
13
13
|
/** @description Indicates whether the integration was developed by the carrier themselves (true) or by ShipStation (false) */
|
|
14
14
|
IsSelfIntegrated?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @description Strips the distributed-tracing headers that the platform's APM agents (New Relic,
|
|
17
|
+
* Sentry) add to outbound http/https requests: traceparent, tracestate, newrelic, sentry-trace and
|
|
18
|
+
* baggage. Enable this when the carrier's API rejects requests carrying them. Defaults to false.
|
|
19
|
+
*/
|
|
20
|
+
SuppressOutboundTracingHeaders?: boolean;
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
export const CarrierAppMetadataSchema = Joi.object({
|
|
@@ -25,4 +31,5 @@ export const CarrierAppMetadataSchema = Joi.object({
|
|
|
25
31
|
.message('There must be at least 1 Carrier defined')
|
|
26
32
|
.items(CarrierSchema),
|
|
27
33
|
IsSelfIntegrated: Joi.boolean().strict().optional(),
|
|
34
|
+
SuppressOutboundTracingHeaders: Joi.boolean().strict().optional(),
|
|
28
35
|
});
|
|
@@ -53,6 +53,8 @@ export class CreateLabelRequest extends BaseRequest {
|
|
|
53
53
|
attachments?: Document[];
|
|
54
54
|
/** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
|
|
55
55
|
carrier_pickup_window?: TimeWindow;
|
|
56
|
+
/** @description The delivery window is the time designated when the carrier will drop off the package to the recipient */
|
|
57
|
+
delivery_window?: TimeWindow;
|
|
56
58
|
/** @description Unique identifier for the carrier rate */
|
|
57
59
|
carrier_rate_id?: string;
|
|
58
60
|
/** @description Display schemes that the label will be returned in. Label is returned by default */
|
|
@@ -35,6 +35,8 @@ export class GetRatesRequest extends BaseRequest {
|
|
|
35
35
|
fulfillment_plan_details?: FulfillmentPlanDetails;
|
|
36
36
|
/** @description The carrier pickup window is the time designated when the carrier will pickup your package from the initial location */
|
|
37
37
|
carrier_pickup_window?: TimeWindow;
|
|
38
|
+
/** @description The delivery window is the time designated when the carrier will drop off the package to the recipient */
|
|
39
|
+
delivery_window?: TimeWindow;
|
|
38
40
|
/** Items included in the shipment */
|
|
39
41
|
items?: ShipmentItem[];
|
|
40
42
|
/** @description Bill the shipping charges to this entity. If null, it should be assumed the "shipper" is responsible for the shipping charges. */
|