@shipengine/connect-carrier-api 4.33.0 → 4.34.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.
Files changed (35) hide show
  1. package/lib/app/carrier-app-definition.d.ts +7 -2
  2. package/lib/app/constants.d.ts +1 -0
  3. package/lib/app/constants.js +1 -0
  4. package/lib/app/constants.js.map +1 -1
  5. package/lib/app/create-endpoint-mapping.js +1 -0
  6. package/lib/app/create-endpoint-mapping.js.map +1 -1
  7. package/lib/models/tracking/bulk-tracking-error.d.ts +7 -0
  8. package/lib/models/tracking/bulk-tracking-error.js +12 -0
  9. package/lib/models/tracking/bulk-tracking-error.js.map +1 -0
  10. package/lib/models/tracking/index.d.ts +1 -0
  11. package/lib/models/tracking/index.js +1 -0
  12. package/lib/models/tracking/index.js.map +1 -1
  13. package/lib/requests/bulk-tracking-request.d.ts +14 -0
  14. package/lib/requests/bulk-tracking-request.js +19 -0
  15. package/lib/requests/bulk-tracking-request.js.map +1 -0
  16. package/lib/requests/index.d.ts +1 -0
  17. package/lib/requests/index.js +1 -0
  18. package/lib/requests/index.js.map +1 -1
  19. package/lib/responses/bulk-tracking-response.d.ts +18 -0
  20. package/lib/responses/bulk-tracking-response.js +22 -0
  21. package/lib/responses/bulk-tracking-response.js.map +1 -0
  22. package/lib/responses/index.d.ts +1 -0
  23. package/lib/responses/index.js +1 -0
  24. package/lib/responses/index.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/app/carrier-app-definition.ts +9 -0
  27. package/src/app/constants.ts +1 -0
  28. package/src/app/create-endpoint-mapping.ts +1 -0
  29. package/src/models/tracking/bulk-tracking-error.ts +7 -0
  30. package/src/models/tracking/index.ts +1 -0
  31. package/src/requests/bulk-tracking-request.ts +16 -0
  32. package/src/requests/index.ts +1 -0
  33. package/src/responses/bulk-tracking-response.ts +20 -0
  34. package/src/responses/index.ts +1 -0
  35. package/tsconfig.tsbuildinfo +1 -1
@@ -1,7 +1,7 @@
1
1
  import { ImportedTrackingEvent } from '../models';
2
2
  import type { Request } from 'express';
3
- import { RegisterRequest, CreateLabelRequest, VoidLabelsRequest, CreateManifestRequest, GetManifestRequest, SchedulePickupRequest, CancelPickupRequest, GetRatesRequest, TrackingRequest, CancelNotificationRequest, CreateNotificationRequest, ValidateInboundDataRequest, NormalizeTrackingDataRequest, GetRelayPointsRequest, GetServicePointsRequest, GetServicePointRequest, ImportTrackingEventsRequest, UpdateSettingsRequest, ListPickupsRequest, StartTrackingRequest, UploadDocumentRequest } from '../requests';
4
- import { RegisterResponse, CreateLabelResponse, VoidLabelsResponse, CreateManifestResponse, SchedulePickupResponse, CancelPickupResponse, GetRatesResponse, TrackingResponse, CancelNotificationResponse, CreateNotificationResponse, ValidateInboundDataResponse, NormalizeTrackingDataResponse, GetRelayPointsResponse, GetServicePointsResponse, GetServicePointResponse, UpdateSettingsResponse, ListPickupsResponse, StartTrackingResponse, UploadDocumentResponse } from '../responses';
3
+ import { RegisterRequest, BulkTrackingRequest, CreateLabelRequest, VoidLabelsRequest, CreateManifestRequest, GetManifestRequest, SchedulePickupRequest, CancelPickupRequest, GetRatesRequest, TrackingRequest, CancelNotificationRequest, CreateNotificationRequest, ValidateInboundDataRequest, NormalizeTrackingDataRequest, GetRelayPointsRequest, GetServicePointsRequest, GetServicePointRequest, ImportTrackingEventsRequest, UpdateSettingsRequest, ListPickupsRequest, StartTrackingRequest, UploadDocumentRequest } from '../requests';
4
+ import { RegisterResponse, BulkTrackingResponse, CreateLabelResponse, VoidLabelsResponse, CreateManifestResponse, SchedulePickupResponse, CancelPickupResponse, GetRatesResponse, TrackingResponse, CancelNotificationResponse, CreateNotificationResponse, ValidateInboundDataResponse, NormalizeTrackingDataResponse, GetRelayPointsResponse, GetServicePointsResponse, GetServicePointResponse, UpdateSettingsResponse, ListPickupsResponse, StartTrackingResponse, UploadDocumentResponse } from '../responses';
5
5
  import { CarrierAppMetadata } from './metadata/carrier-app-metadata';
6
6
  import { RequestResponseInfo, Handler } from '@shipengine/connect-runtime';
7
7
  /**
@@ -54,6 +54,11 @@ export interface CarrierAppDefinition {
54
54
  * @param request Data needed by the provider to track a shipment
55
55
  */
56
56
  Track?: (request: TrackingRequest) => TrackingResponse | Promise<TrackingResponse>;
57
+ /**
58
+ * @description This endpoint is used to get tracking information about multiple shipments in a single call
59
+ * @param request Data needed by the provider to track multiple shipments
60
+ */
61
+ BulkTrack?: (request: BulkTrackingRequest) => BulkTrackingResponse | Promise<BulkTrackingResponse>;
57
62
  /**
58
63
  * @description This endpoint is used to submit notification of the creation of a shipment
59
64
  * @param request Data needed by the provider to inform them of a shipment
@@ -8,6 +8,7 @@ export declare enum ApiEndpoints {
8
8
  SchedulePickup = "/SchedulePickup",
9
9
  CancelPickup = "/CancelPickup",
10
10
  Track = "/Track",
11
+ BulkTrack = "/BulkTrack",
11
12
  CreateNotification = "/CreateNotification",
12
13
  CancelNotification = "/CancelNotification",
13
14
  ValidateInboundData = "/ValidateInboundData",
@@ -12,6 +12,7 @@ var ApiEndpoints;
12
12
  ApiEndpoints["SchedulePickup"] = "/SchedulePickup";
13
13
  ApiEndpoints["CancelPickup"] = "/CancelPickup";
14
14
  ApiEndpoints["Track"] = "/Track";
15
+ ApiEndpoints["BulkTrack"] = "/BulkTrack";
15
16
  ApiEndpoints["CreateNotification"] = "/CreateNotification";
16
17
  ApiEndpoints["CancelNotification"] = "/CancelNotification";
17
18
  ApiEndpoints["ValidateInboundData"] = "/ValidateInboundData";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/app/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAsBX;AAtBD,WAAY,YAAY;IACtB,sCAAsB,CAAA;IACtB,4CAA4B,CAAA;IAC5B,0CAA0B,CAAA;IAC1B,sCAAsB,CAAA;IACtB,kDAAkC,CAAA;IAClC,4CAA4B,CAAA;IAC5B,kDAAkC,CAAA;IAClC,8CAA8B,CAAA;IAC9B,gCAAgB,CAAA;IAChB,0DAA0C,CAAA;IAC1C,0DAA0C,CAAA;IAC1C,4DAA4C,CAAA;IAC5C,gEAAgD,CAAA;IAChD,kDAAkC,CAAA;IAClC,sDAAsC,CAAA;IACtC,oDAAoC,CAAA;IACpC,8DAA8C,CAAA;IAC9C,kDAAkC,CAAA;IAClC,4CAA4B,CAAA;IAC5B,gDAAgC,CAAA;IAChC,kDAAkC,CAAA;AACpC,CAAC,EAtBW,YAAY,4BAAZ,YAAY,QAsBvB"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/app/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAuBX;AAvBD,WAAY,YAAY;IACtB,sCAAsB,CAAA;IACtB,4CAA4B,CAAA;IAC5B,0CAA0B,CAAA;IAC1B,sCAAsB,CAAA;IACtB,kDAAkC,CAAA;IAClC,4CAA4B,CAAA;IAC5B,kDAAkC,CAAA;IAClC,8CAA8B,CAAA;IAC9B,gCAAgB,CAAA;IAChB,wCAAwB,CAAA;IACxB,0DAA0C,CAAA;IAC1C,0DAA0C,CAAA;IAC1C,4DAA4C,CAAA;IAC5C,gEAAgD,CAAA;IAChD,kDAAkC,CAAA;IAClC,sDAAsC,CAAA;IACtC,oDAAoC,CAAA;IACpC,8DAA8C,CAAA;IAC9C,kDAAkC,CAAA;IAClC,4CAA4B,CAAA;IAC5B,gDAAgC,CAAA;IAChC,kDAAkC,CAAA;AACpC,CAAC,EAvBW,YAAY,4BAAZ,YAAY,QAuBvB"}
@@ -6,6 +6,7 @@ const constants_1 = require("./constants");
6
6
  const createEndpointMapping = (definition) => [
7
7
  //TODO: Remove `Method.POST` from this and all other maps since they are ALL post
8
8
  //TODO: Remove JOI validation from all endpoints and replace them with OpenAPI validation
9
+ [connect_runtime_1.Method.POST, constants_1.ApiEndpoints.BulkTrack, definition.BulkTrack],
9
10
  [connect_runtime_1.Method.POST, constants_1.ApiEndpoints.CancelNotification, definition.CancelNotification],
10
11
  [connect_runtime_1.Method.POST, constants_1.ApiEndpoints.CancelPickup, definition.CancelPickup],
11
12
  [connect_runtime_1.Method.POST, constants_1.ApiEndpoints.CreateLabel, definition.CreateLabel],
@@ -1 +1 @@
1
- {"version":3,"file":"create-endpoint-mapping.js","sourceRoot":"","sources":["../../src/app/create-endpoint-mapping.ts"],"names":[],"mappings":";;;AAAA,iEAA6E;AAC7E,2CAA2C;AAGpC,MAAM,qBAAqB,GAAG,CACnC,UAAgC,EACS,EAAE,CAAC;IAC5C,iFAAiF;IACjF,yFAAyF;IACzF,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAC7E,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC;IACjE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;IAC/D,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IACrE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;IAC/D,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAC7E,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAAC;IACnF,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IACrE,CAAC,wBAAM,CAAC,IAAI,EAAE,wB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,CAAC,UAAU,CAAC;IAC7D,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IACrE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,CAAC;IACzE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC;IACvE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,oBAAoB,EAAE,UAAU,CAAC,oBAAoB,CAAC;IACjF,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IACrE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;IAC/D,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC;IACnE,CAAC,wBAAM,CAAC,IAAI,EAAE,wBAAY,CAAC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IACrE,GAAG,IAAA,+BAAa,EAAC,UAAU,CAAC,UAAU,CAAC;CACxC,CAAC;AA5BW,QAAA,qBAAqB,yBA4BhC"}
@@ -0,0 +1,7 @@
1
+ /** @description Error detail for a single item within a bulk tracking response */
2
+ export declare class BulkTrackingError {
3
+ /** @description A code identifying the type of error encountered while tracking this item */
4
+ code: string;
5
+ /** @description A human readable description of the error */
6
+ message: string;
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkTrackingError = void 0;
4
+ /** @description Error detail for a single item within a bulk tracking response */
5
+ class BulkTrackingError {
6
+ /** @description A code identifying the type of error encountered while tracking this item */
7
+ code;
8
+ /** @description A human readable description of the error */
9
+ message;
10
+ }
11
+ exports.BulkTrackingError = BulkTrackingError;
12
+ //# sourceMappingURL=bulk-tracking-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk-tracking-error.js","sourceRoot":"","sources":["../../../src/models/tracking/bulk-tracking-error.ts"],"names":[],"mappings":";;;AAAA,kFAAkF;AAClF,MAAa,iBAAiB;IAC5B,6FAA6F;IAC7F,IAAI,CAAU;IACd,6DAA6D;IAC7D,OAAO,CAAU;CAClB;AALD,8CAKC"}
@@ -1,3 +1,4 @@
1
+ export * from './bulk-tracking-error';
1
2
  export * from './imported-tracking-event-schema';
2
3
  export * from './imported-tracking-event';
3
4
  export * from './lat-long-schema';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./bulk-tracking-error"), exports);
4
5
  tslib_1.__exportStar(require("./imported-tracking-event-schema"), exports);
5
6
  tslib_1.__exportStar(require("./imported-tracking-event"), exports);
6
7
  tslib_1.__exportStar(require("./lat-long-schema"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/tracking/index.ts"],"names":[],"mappings":";;;AAAA,2EAAiD;AACjD,oEAA0C;AAC1C,4DAAkC;AAClC,qDAA2B;AAC3B,2DAAiC;AACjC,oDAA0B;AAC1B,6EAAmD;AACnD,sEAA4C;AAC5C,+DAAqC;AACrC,wDAA8B;AAC9B,+DAAqC;AACrC,gEAAsC;AACtC,iEAAuC;AACvC,0DAAgC;AAChC,iEAAuC;AACvC,0DAAgC;AAChC,6EAAmD;AACnD,oFAA0D;AAC1D,kEAAwC;AACxC,yEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/tracking/index.ts"],"names":[],"mappings":";;;AAAA,gEAAsC;AACtC,2EAAiD;AACjD,oEAA0C;AAC1C,4DAAkC;AAClC,qDAA2B;AAC3B,2DAAiC;AACjC,oDAA0B;AAC1B,6EAAmD;AACnD,sEAA4C;AAC5C,+DAAqC;AACrC,wDAA8B;AAC9B,+DAAqC;AACrC,gEAAsC;AACtC,iEAAuC;AACvC,0DAAgC;AAChC,iEAAuC;AACvC,0DAAgC;AAChC,6EAAmD;AACnD,oFAA0D;AAC1D,kEAAwC;AACxC,yEAA+C"}
@@ -0,0 +1,14 @@
1
+ import { BaseRequest } from './base-request';
2
+ import { TrackingIdentifier, TrackingAttribute } from '../models';
3
+ /** @description A single shipment to request tracking information for as part of a bulk tracking request */
4
+ export declare class BulkTrackingItem {
5
+ /** @description List of identifiers */
6
+ identifiers?: TrackingIdentifier[];
7
+ /** @description List of attributes */
8
+ attributes?: TrackingAttribute[];
9
+ }
10
+ /** @description Basic structure for a request to get tracking information for multiple shipments in a single call */
11
+ export declare class BulkTrackingRequest extends BaseRequest {
12
+ /** @description The shipments to retrieve tracking information for */
13
+ items: BulkTrackingItem[];
14
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkTrackingRequest = exports.BulkTrackingItem = void 0;
4
+ const base_request_1 = require("./base-request");
5
+ /** @description A single shipment to request tracking information for as part of a bulk tracking request */
6
+ class BulkTrackingItem {
7
+ /** @description List of identifiers */
8
+ identifiers;
9
+ /** @description List of attributes */
10
+ attributes;
11
+ }
12
+ exports.BulkTrackingItem = BulkTrackingItem;
13
+ /** @description Basic structure for a request to get tracking information for multiple shipments in a single call */
14
+ class BulkTrackingRequest extends base_request_1.BaseRequest {
15
+ /** @description The shipments to retrieve tracking information for */
16
+ items;
17
+ }
18
+ exports.BulkTrackingRequest = BulkTrackingRequest;
19
+ //# sourceMappingURL=bulk-tracking-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk-tracking-request.js","sourceRoot":"","sources":["../../src/requests/bulk-tracking-request.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAG7C,4GAA4G;AAC5G,MAAa,gBAAgB;IAC3B,uCAAuC;IACvC,WAAW,CAAwB;IACnC,sCAAsC;IACtC,UAAU,CAAuB;CAClC;AALD,4CAKC;AAED,qHAAqH;AACrH,MAAa,mBAAoB,SAAQ,0BAAW;IAClD,sEAAsE;IACtE,KAAK,CAAsB;CAC5B;AAHD,kDAGC"}
@@ -1,3 +1,4 @@
1
+ export * from './bulk-tracking-request';
1
2
  export * from './cancel-notification-request';
2
3
  export * from './cancel-pickup-request';
3
4
  export * from './create-label-request';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./bulk-tracking-request"), exports);
4
5
  tslib_1.__exportStar(require("./cancel-notification-request"), exports);
5
6
  tslib_1.__exportStar(require("./cancel-pickup-request"), exports);
6
7
  tslib_1.__exportStar(require("./create-label-request"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C;AAC9C,kEAAwC;AACxC,iEAAuC;AACvC,oEAA0C;AAC1C,wEAA8C;AAC9C,iEAAuC;AACvC,8DAAoC;AACpC,qEAA2C;AAC3C,sEAA4C;AAC5C,uEAA6C;AAC7C,2EAAiD;AACjD,4EAAkD;AAClD,6DAAmC;AACnC,oEAA0C;AAC1C,iEAAuC;AACvC,6DAAmC;AACnC,0EAAgD;AAChD,gEAAsC;AACtC,oEAA0C;AAC1C,mEAAyC;AACzC,0EAAgD;AAChD,oEAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":";;;AAAA,kEAAwC;AACxC,wEAA8C;AAC9C,kEAAwC;AACxC,iEAAuC;AACvC,oEAA0C;AAC1C,wEAA8C;AAC9C,iEAAuC;AACvC,8DAAoC;AACpC,qEAA2C;AAC3C,sEAA4C;AAC5C,uEAA6C;AAC7C,2EAAiD;AACjD,4EAAkD;AAClD,6DAAmC;AACnC,oEAA0C;AAC1C,iEAAuC;AACvC,6DAAmC;AACnC,0EAAgD;AAChD,gEAAsC;AACtC,oEAA0C;AAC1C,mEAAyC;AACzC,0EAAgD;AAChD,oEAA0C"}
@@ -0,0 +1,18 @@
1
+ import { BaseResponse } from './base-response';
2
+ import { TrackingInfo } from '../models';
3
+ import { BulkTrackingError } from '../models/tracking/bulk-tracking-error';
4
+ /** @description Tracking result for a single item within a bulk tracking response */
5
+ export declare class BulkTrackingResultItem {
6
+ /** @description The carrier specific tracking identifier for this shipment */
7
+ tracking_number: string;
8
+ /** @description Tracking information for this shipment, present when tracking succeeded */
9
+ tracking_info?: TrackingInfo;
10
+ /** @description Error detail for this shipment, present when tracking failed */
11
+ error?: BulkTrackingError;
12
+ }
13
+ /** @description Basic structure for a response to get tracking information for multiple shipments in a single call */
14
+ export declare class BulkTrackingResponse extends BaseResponse {
15
+ transaction_id: string;
16
+ /** @description Per-item tracking results, in no guaranteed order relative to the request's items */
17
+ results: BulkTrackingResultItem[];
18
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BulkTrackingResponse = exports.BulkTrackingResultItem = void 0;
4
+ const base_response_1 = require("./base-response");
5
+ /** @description Tracking result for a single item within a bulk tracking response */
6
+ class BulkTrackingResultItem {
7
+ /** @description The carrier specific tracking identifier for this shipment */
8
+ tracking_number;
9
+ /** @description Tracking information for this shipment, present when tracking succeeded */
10
+ tracking_info;
11
+ /** @description Error detail for this shipment, present when tracking failed */
12
+ error;
13
+ }
14
+ exports.BulkTrackingResultItem = BulkTrackingResultItem;
15
+ /** @description Basic structure for a response to get tracking information for multiple shipments in a single call */
16
+ class BulkTrackingResponse extends base_response_1.BaseResponse {
17
+ transaction_id;
18
+ /** @description Per-item tracking results, in no guaranteed order relative to the request's items */
19
+ results;
20
+ }
21
+ exports.BulkTrackingResponse = BulkTrackingResponse;
22
+ //# sourceMappingURL=bulk-tracking-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk-tracking-response.js","sourceRoot":"","sources":["../../src/responses/bulk-tracking-response.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAI/C,qFAAqF;AACrF,MAAa,sBAAsB;IACjC,8EAA8E;IAC9E,eAAe,CAAU;IACzB,2FAA2F;IAC3F,aAAa,CAAgB;IAC7B,gFAAgF;IAChF,KAAK,CAAqB;CAC3B;AAPD,wDAOC;AAED,sHAAsH;AACtH,MAAa,oBAAqB,SAAQ,4BAAY;IACpD,cAAc,CAAU;IACxB,qGAAqG;IACrG,OAAO,CAA4B;CACpC;AAJD,oDAIC"}
@@ -1,3 +1,4 @@
1
+ export * from './bulk-tracking-response';
1
2
  export * from './cancel-notification-response-schema';
2
3
  export * from './cancel-notification-response';
3
4
  export * from './cancel-pickup-response-schema';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./bulk-tracking-response"), exports);
4
5
  tslib_1.__exportStar(require("./cancel-notification-response-schema"), exports);
5
6
  tslib_1.__exportStar(require("./cancel-notification-response"), exports);
6
7
  tslib_1.__exportStar(require("./cancel-pickup-response-schema"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":";;;AAAA,gFAAsD;AACtD,yEAA+C;AAC/C,0EAAgD;AAChD,mEAAyC;AACzC,yEAA+C;AAC/C,kEAAwC;AACxC,4EAAkD;AAClD,qEAA2C;AAC3C,gFAAsD;AACtD,yEAA+C;AAC/C,2DAAiC;AACjC,sEAA4C;AAC5C,+DAAqC;AACrC,6EAAmD;AACnD,sEAA4C;AAC5C,8EAAoD;AACpD,uEAA6C;AAC7C,+EAAqD;AACrD,wEAA8C;AAC9C,oFAA0D;AAC1D,6EAAmD;AACnD,qEAA2C;AAC3C,8DAAoC;AACpC,4EAAkD;AAClD,qEAA2C;AAC3C,yEAA+C;AAC/C,kEAAwC;AACxC,qEAA2C;AAC3C,8DAAoC;AACpC,kFAAwD;AACxD,2EAAiD;AACjD,wEAA8C;AAC9C,iEAAuC;AACvC,4EAAkD;AAClD,qEAA2C;AAC3C,oEAA0C;AAC1C,2EAAiD;AACjD,qEAA2C;AAC3C,4EAAkD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC;AACzC,gFAAsD;AACtD,yEAA+C;AAC/C,0EAAgD;AAChD,mEAAyC;AACzC,yEAA+C;AAC/C,kEAAwC;AACxC,4EAAkD;AAClD,qEAA2C;AAC3C,gFAAsD;AACtD,yEAA+C;AAC/C,2DAAiC;AACjC,sEAA4C;AAC5C,+DAAqC;AACrC,6EAAmD;AACnD,sEAA4C;AAC5C,8EAAoD;AACpD,uEAA6C;AAC7C,+EAAqD;AACrD,wEAA8C;AAC9C,oFAA0D;AAC1D,6EAAmD;AACnD,qEAA2C;AAC3C,8DAAoC;AACpC,4EAAkD;AAClD,qEAA2C;AAC3C,yEAA+C;AAC/C,kEAAwC;AACxC,qEAA2C;AAC3C,8DAAoC;AACpC,kFAAwD;AACxD,2EAAiD;AACjD,wEAA8C;AAC9C,iEAAuC;AACvC,4EAAkD;AAClD,qEAA2C;AAC3C,oEAA0C;AAC1C,2EAAiD;AACjD,qEAA2C;AAC3C,4EAAkD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/connect-carrier-api",
3
- "version": "4.33.0",
3
+ "version": "4.34.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",
@@ -2,6 +2,7 @@ import { ImportedTrackingEvent } from '../models';
2
2
  import type { Request } from 'express';
3
3
  import {
4
4
  RegisterRequest,
5
+ BulkTrackingRequest,
5
6
  CreateLabelRequest,
6
7
  VoidLabelsRequest,
7
8
  CreateManifestRequest,
@@ -26,6 +27,7 @@ import {
26
27
 
27
28
  import {
28
29
  RegisterResponse,
30
+ BulkTrackingResponse,
29
31
  CreateLabelResponse,
30
32
  VoidLabelsResponse,
31
33
  CreateManifestResponse,
@@ -108,6 +110,13 @@ export interface CarrierAppDefinition {
108
110
  * @param request Data needed by the provider to track a shipment
109
111
  */
110
112
  Track?: (request: TrackingRequest) => TrackingResponse | Promise<TrackingResponse>;
113
+ /**
114
+ * @description This endpoint is used to get tracking information about multiple shipments in a single call
115
+ * @param request Data needed by the provider to track multiple shipments
116
+ */
117
+ BulkTrack?: (
118
+ request: BulkTrackingRequest,
119
+ ) => BulkTrackingResponse | Promise<BulkTrackingResponse>;
111
120
  /**
112
121
  * @description This endpoint is used to submit notification of the creation of a shipment
113
122
  * @param request Data needed by the provider to inform them of a shipment
@@ -8,6 +8,7 @@ export enum ApiEndpoints {
8
8
  SchedulePickup = '/SchedulePickup',
9
9
  CancelPickup = '/CancelPickup',
10
10
  Track = '/Track',
11
+ BulkTrack = '/BulkTrack',
11
12
  CreateNotification = '/CreateNotification',
12
13
  CancelNotification = '/CancelNotification',
13
14
  ValidateInboundData = '/ValidateInboundData',
@@ -7,6 +7,7 @@ export const createEndpointMapping = (
7
7
  ): [Method, string, Handler | undefined][] => [
8
8
  //TODO: Remove `Method.POST` from this and all other maps since they are ALL post
9
9
  //TODO: Remove JOI validation from all endpoints and replace them with OpenAPI validation
10
+ [Method.POST, ApiEndpoints.BulkTrack, definition.BulkTrack],
10
11
  [Method.POST, ApiEndpoints.CancelNotification, definition.CancelNotification],
11
12
  [Method.POST, ApiEndpoints.CancelPickup, definition.CancelPickup],
12
13
  [Method.POST, ApiEndpoints.CreateLabel, definition.CreateLabel],
@@ -0,0 +1,7 @@
1
+ /** @description Error detail for a single item within a bulk tracking response */
2
+ export class BulkTrackingError {
3
+ /** @description A code identifying the type of error encountered while tracking this item */
4
+ code!: string;
5
+ /** @description A human readable description of the error */
6
+ message!: string;
7
+ }
@@ -1,3 +1,4 @@
1
+ export * from './bulk-tracking-error';
1
2
  export * from './imported-tracking-event-schema';
2
3
  export * from './imported-tracking-event';
3
4
  export * from './lat-long-schema';
@@ -0,0 +1,16 @@
1
+ import { BaseRequest } from './base-request';
2
+ import { TrackingIdentifier, TrackingAttribute } from '../models';
3
+
4
+ /** @description A single shipment to request tracking information for as part of a bulk tracking request */
5
+ export class BulkTrackingItem {
6
+ /** @description List of identifiers */
7
+ identifiers?: TrackingIdentifier[];
8
+ /** @description List of attributes */
9
+ attributes?: TrackingAttribute[];
10
+ }
11
+
12
+ /** @description Basic structure for a request to get tracking information for multiple shipments in a single call */
13
+ export class BulkTrackingRequest extends BaseRequest {
14
+ /** @description The shipments to retrieve tracking information for */
15
+ items!: BulkTrackingItem[];
16
+ }
@@ -1,3 +1,4 @@
1
+ export * from './bulk-tracking-request';
1
2
  export * from './cancel-notification-request';
2
3
  export * from './cancel-pickup-request';
3
4
  export * from './create-label-request';
@@ -0,0 +1,20 @@
1
+ import { BaseResponse } from './base-response';
2
+ import { TrackingInfo } from '../models';
3
+ import { BulkTrackingError } from '../models/tracking/bulk-tracking-error';
4
+
5
+ /** @description Tracking result for a single item within a bulk tracking response */
6
+ export class BulkTrackingResultItem {
7
+ /** @description The carrier specific tracking identifier for this shipment */
8
+ tracking_number!: string;
9
+ /** @description Tracking information for this shipment, present when tracking succeeded */
10
+ tracking_info?: TrackingInfo;
11
+ /** @description Error detail for this shipment, present when tracking failed */
12
+ error?: BulkTrackingError;
13
+ }
14
+
15
+ /** @description Basic structure for a response to get tracking information for multiple shipments in a single call */
16
+ export class BulkTrackingResponse extends BaseResponse {
17
+ transaction_id!: string;
18
+ /** @description Per-item tracking results, in no guaranteed order relative to the request's items */
19
+ results!: BulkTrackingResultItem[];
20
+ }
@@ -1,3 +1,4 @@
1
+ export * from './bulk-tracking-response';
1
2
  export * from './cancel-notification-response-schema';
2
3
  export * from './cancel-notification-response';
3
4
  export * from './cancel-pickup-response-schema';