@shipengine/connect-carrier-api 4.29.2 → 4.30.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.
@@ -9,5 +9,7 @@ export interface CarrierAppMetadata {
9
9
  AuthProcess?: AuthSpecification;
10
10
  /** @description A list of branded carriers */
11
11
  Carriers: Carrier[];
12
+ /** @description Indicates whether the integration was developed by the carrier themselves (true) or by ShipStation (false) */
13
+ IsSelfIntegrated?: boolean;
12
14
  }
13
15
  export declare const CarrierAppMetadataSchema: Joi.ObjectSchema<any>;
@@ -14,5 +14,6 @@ exports.CarrierAppMetadataSchema = joi_1.default.object({
14
14
  .min(1)
15
15
  .message('There must be at least 1 Carrier defined')
16
16
  .items(_1.CarrierSchema),
17
+ IsSelfIntegrated: joi_1.default.boolean().strict().optional(),
17
18
  });
18
19
  //# 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;AAa1E,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;CACxB,CAAC,CAAC"}
1
+ {"version":3,"file":"carrier-app-metadata.js","sourceRoot":"","sources":["../../../src/app/metadata/carrier-app-metadata.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,wBAAuF;AAe1E,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;CACpD,CAAC,CAAC"}
@@ -56,3 +56,17 @@ export declare enum TrackingSubscriptionLevel {
56
56
  TrackingNumber = "TrackingNumber",
57
57
  Account = "Account"
58
58
  }
59
+ export declare enum ServiceDirection {
60
+ Outbound = "Outbound",
61
+ Return = "Return",
62
+ Both = "Both"
63
+ }
64
+ export declare enum DayOfWeek {
65
+ MON = "MON",
66
+ TUE = "TUE",
67
+ WED = "WED",
68
+ THU = "THU",
69
+ FRI = "FRI",
70
+ SAT = "SAT",
71
+ SUN = "SUN"
72
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TrackingSubscriptionLevel = exports.RequiredProperty = exports.ServiceGrade = exports.ServiceClass = exports.SupportedLabelSize = exports.ShippingServiceAttribute = exports.CarrierAttribute = void 0;
3
+ exports.DayOfWeek = exports.ServiceDirection = exports.TrackingSubscriptionLevel = exports.RequiredProperty = exports.ServiceGrade = exports.ServiceClass = exports.SupportedLabelSize = exports.ShippingServiceAttribute = exports.CarrierAttribute = void 0;
4
4
  var CarrierAttribute;
5
5
  (function (CarrierAttribute) {
6
6
  CarrierAttribute["ManifestDigital"] = "ManifestDigital";
@@ -66,4 +66,20 @@ var TrackingSubscriptionLevel;
66
66
  TrackingSubscriptionLevel["TrackingNumber"] = "TrackingNumber";
67
67
  TrackingSubscriptionLevel["Account"] = "Account";
68
68
  })(TrackingSubscriptionLevel || (exports.TrackingSubscriptionLevel = TrackingSubscriptionLevel = {}));
69
+ var ServiceDirection;
70
+ (function (ServiceDirection) {
71
+ ServiceDirection["Outbound"] = "Outbound";
72
+ ServiceDirection["Return"] = "Return";
73
+ ServiceDirection["Both"] = "Both";
74
+ })(ServiceDirection || (exports.ServiceDirection = ServiceDirection = {}));
75
+ var DayOfWeek;
76
+ (function (DayOfWeek) {
77
+ DayOfWeek["MON"] = "MON";
78
+ DayOfWeek["TUE"] = "TUE";
79
+ DayOfWeek["WED"] = "WED";
80
+ DayOfWeek["THU"] = "THU";
81
+ DayOfWeek["FRI"] = "FRI";
82
+ DayOfWeek["SAT"] = "SAT";
83
+ DayOfWeek["SUN"] = "SUN";
84
+ })(DayOfWeek || (exports.DayOfWeek = DayOfWeek = {}));
69
85
  //# sourceMappingURL=enums.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/app/metadata/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAUX;AAVD,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;AACzD,CAAC,EAVW,gBAAgB,gCAAhB,gBAAgB,QAU3B;AAED,IAAY,wBAgBX;AAhBD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,yDAA6B,CAAA;IAC7B,iDAAqB,CAAA;IACrB,uEAA2C,CAAA;IAC3C,iFAAqD,CAAA;IACrD,+D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jB,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"}
@@ -25,3 +25,5 @@ export * from './shipping-service';
25
25
  export * from './zone';
26
26
  export * from './connection-names-configuration';
27
27
  export * from './account-connection-specification';
28
+ export * from './transit';
29
+ export * from './package-constraints';
@@ -28,4 +28,6 @@ tslib_1.__exportStar(require("./shipping-service"), exports);
28
28
  tslib_1.__exportStar(require("./zone"), exports);
29
29
  tslib_1.__exportStar(require("./connection-names-configuration"), exports);
30
30
  tslib_1.__exportStar(require("./account-connection-specification"), exports);
31
+ tslib_1.__exportStar(require("./transit"), exports);
32
+ tslib_1.__exportStar(require("./package-constraints"), exports);
31
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/metadata/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,4DAAkC;AAClC,+DAAqC;AACrC,oDAA0B;AAC1B,iEAAuC;AACvC,+DAAqC;AACrC,8DAAoC;AACpC,gEAAsC;AACtC,8DAAoC;AACpC,kDAAwB;AACxB,qDAA2B;AAC3B,0DAAgC;AAChC,wDAA8B;AAC9B,qDAA2B;AAC3B,wEAA8C;AAC9C,yDAA+B;AAC/B,sDAA4B;AAC5B,0DAAgC;AAChC,0DAAgC;AAChC,wEAA8C;AAC9C,gEAAsC;AACtC,4DAAkC;AAClC,wEAA8C;AAC9C,6DAAmC;AACnC,iDAAuB;AACvB,2EAAiD;AACjD,6EAAmD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/metadata/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,4DAAkC;AAClC,+DAAqC;AACrC,oDAA0B;AAC1B,iEAAuC;AACvC,+DAAqC;AACrC,8DAAoC;AACpC,gEAAsC;AACtC,8DAAoC;AACpC,kDAAwB;AACxB,qDAA2B;AAC3B,0DAAgC;AAChC,wDAA8B;AAC9B,qDAA2B;AAC3B,wEAA8C;AAC9C,yDAA+B;AAC/B,sDAA4B;AAC5B,0DAAgC;AAChC,0DAAgC;AAChC,wEAA8C;AAC9C,gEAAsC;AACtC,4DAAkC;AAClC,wEAA8C;AAC9C,6DAAmC;AACnC,iDAAuB;AACvB,2EAAiD;AACjD,6EAAmD;AACnD,oDAA0B;AAC1B,gEAAsC"}
@@ -0,0 +1,13 @@
1
+ import Joi from 'joi';
2
+ /** @description Package size and weight constraints for a shipping service */
3
+ export interface PackageConstraints {
4
+ /** @description Minimum package dimensions in LxWxH format (cm), e.g. "10x10x1" */
5
+ MinDimensions?: string | null;
6
+ /** @description Maximum package dimensions in LxWxH format (cm), e.g. "120x60x60" */
7
+ MaxDimensions?: string | null;
8
+ /** @description Minimum package weight in kg */
9
+ MinWeight?: number | null;
10
+ /** @description Maximum package weight in kg */
11
+ MaxWeight?: number | null;
12
+ }
13
+ export declare const PackageConstraintsSchema: Joi.ObjectSchema<any>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PackageConstraintsSchema = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
6
+ exports.PackageConstraintsSchema = joi_1.default.object({
7
+ MinDimensions: joi_1.default.string().optional().allow(null),
8
+ MaxDimensions: joi_1.default.string().optional().allow(null),
9
+ MinWeight: joi_1.default.number().optional().allow(null),
10
+ MaxWeight: joi_1.default.number().optional().allow(null),
11
+ });
12
+ //# sourceMappingURL=package-constraints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-constraints.js","sourceRoot":"","sources":["../../../src/app/metadata/package-constraints.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AAcT,QAAA,wBAAwB,GAAG,aAAG,CAAC,MAAM,CAAC;IACjD,aAAa,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;IAClD,aAAa,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;IAClD,SAAS,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;IAC9C,SAAS,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;CAC/C,CAAC,CAAC"}
@@ -4,4 +4,6 @@ export interface ShippingProviderConnector {
4
4
  Functions: FunctionSpecification[];
5
5
  ApiVersion: string;
6
6
  DiagnosticRoutes?: DiagnosticRoutes;
7
+ /** @description Indicates whether the integration was developed by the carrier themselves (true) or by ShipStation (false) */
8
+ IsSelfIntegrated?: boolean;
7
9
  }
@@ -6,6 +6,9 @@ import { ServiceClassEnum } from './service-class';
6
6
  import { ServiceGradeEnum } from './service-grade';
7
7
  import { ServiceRequiredPropertiesEnum } from './service-required-properties';
8
8
  import Joi from 'joi';
9
+ import { Transit } from './transit';
10
+ import { PackageConstraints } from './package-constraints';
11
+ import { ServiceDirection } from './enums';
9
12
  /** @description Basic structure for each shipping service */
10
13
  export interface ShippingService {
11
14
  /** @description The confirmation types associated with this service */
@@ -36,5 +39,15 @@ export interface ShippingService {
36
39
  ApiCode?: string;
37
40
  /** @description The unique identifier for this shipping service. It should not change after being published */
38
41
  Id: string;
42
+ /** @description Customer-facing description of service capabilities and features */
43
+ ServiceDescription?: string;
44
+ /** @description Direction of this service */
45
+ ServiceDirection?: ServiceDirection;
46
+ /** @description List of ISO 3166-1 alpha-2 destination country codes supported by this service */
47
+ DestinationCountries?: string[];
48
+ /** @description Transit time and delivery schedule information */
49
+ Transit?: Transit;
50
+ /** @description Package size and weight constraints for this service */
51
+ PackageConstraints?: PackageConstraints;
39
52
  }
40
53
  export declare const ShippingServiceSchema: Joi.ObjectSchema<any>;
@@ -11,6 +11,10 @@ const service_grade_1 = require("./service-grade");
11
11
  const service_required_properties_1 = require("./service-required-properties");
12
12
  const joi_1 = tslib_1.__importDefault(require("joi"));
13
13
  const connect_runtime_1 = require("@shipengine/connect-runtime");
14
+ const transit_1 = require("./transit");
15
+ const package_constraints_1 = require("./package-constraints");
16
+ const enums_1 = require("./enums");
17
+ const ServiceDirectionSchema = joi_1.default.string().valid(...Object.values(enums_1.ServiceDirection));
14
18
  exports.ShippingServiceSchema = joi_1.default.object({
15
19
  ConfirmationTypes: joi_1.default.array().optional().items(confirmation_type_1.ConfirmationTypeSchema).unique('Type'),
16
20
  ServiceAttributes: joi_1.default.array().items(services_attributes_1.ServiceAttributesEnumSchema).optional(),
@@ -26,5 +30,13 @@ exports.ShippingServiceSchema = joi_1.default.object({
26
30
  Name: joi_1.default.string().required().max(80),
27
31
  ApiCode: joi_1.default.string().optional().pattern(connect_runtime_1.ApiCodeRegex, connect_runtime_1.ApiCodeValidationMessage),
28
32
  Id: joi_1.default.string().uuid().required(),
33
+ ServiceDescription: joi_1.default.string().optional(),
34
+ ServiceDirection: ServiceDirectionSchema.optional(),
35
+ DestinationCountries: joi_1.default.array()
36
+ .optional()
37
+ .items(joi_1.default.string().pattern(/^[A-Z]{2}$/))
38
+ .unique(),
39
+ Transit: transit_1.TransitSchema.optional(),
40
+ PackageConstraints: package_constraints_1.PackageConstraintsSchema.optional(),
29
41
  });
30
42
  //# sourceMappingURL=shipping-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shipping-service.js","sourceRoot":"","sources":["../../../src/app/metadata/shipping-service.ts"],"names":[],"mappings":";;;;AAAA,2DAA+E;AAC/E,+DAAqF;AACrF,+DAA2F;AAC3F,+CAAqE;AACrE,mDAA2E;AAC3E,mDAA2E;AAC3E,+EAGuC;AACvC,sDAAsB;AAEtB,iEAAqF;AAkCxE,QAAA,qBAAqB,GAAG,aAAG,CAAC,MAAM,CAAC;IAC9C,iBAAiB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,0CAAsB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACtF,iBAAiB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,iDAA2B,CAAC,CAAC,QAAQ,EAAE;IAC5E,kBAAkB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,8CAAwB,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;IAChG,mBAAmB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,kCAAoB,CAAC,CAAC,MAAM,EAAE;IAChF,kBAAkB,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,iEAAmC,CAAC,CAAC,MAAM,EAAE;IAC9F,KAAK,EAAE,sCAAsB,CAAC,QAAQ,EAAE;IACxC,KAAK,EAAE,sCAAsB,CAAC,QAAQ,EAAE;IACxC,SAAS,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1C,aAAa,EAAE,aAAG,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,E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AO,CAAC,YAAY,CAAC,CAAC;SACzC,MAAM,EAAE;IACX,OAAO,EAAE,uBAAa,CAAC,QAAQ,EAAE;IACjC,kBAAkB,EAAE,8CAAwB,CAAC,QAAQ,EAAE;CACxD,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import Joi from 'joi';
2
+ import { DayOfWeek } from './enums';
3
+ /** @description Operational schedule defining collection, trunking and delivery days */
4
+ export interface OperationalSchedule {
5
+ /** @description Days on which the carrier collects parcels */
6
+ CollectionDays?: DayOfWeek[];
7
+ /** @description Days on which the carrier trunks parcels between hubs */
8
+ TrunkingDays?: DayOfWeek[];
9
+ /** @description Days on which the carrier delivers parcels */
10
+ DeliveryDays?: DayOfWeek[];
11
+ }
12
+ export declare const OperationalScheduleSchema: Joi.ObjectSchema<any>;
13
+ /** @description Transit information for a shipping service */
14
+ export interface Transit {
15
+ /** @description Transit time in days, as a number or range (e.g. "3" or "3-5") */
16
+ TransitTimeInDays?: string | null;
17
+ /** @description Latest time of day by which delivery is made (e.g. "17:00") */
18
+ DeliveryByTime?: string | null;
19
+ /** @description Operational schedule for collection, trunking and delivery days */
20
+ OperationalSchedule?: OperationalSchedule;
21
+ }
22
+ export declare const TransitSchema: Joi.ObjectSchema<any>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransitSchema = exports.OperationalScheduleSchema = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const joi_1 = tslib_1.__importDefault(require("joi"));
6
+ const enums_1 = require("./enums");
7
+ const DayOfWeekSchema = joi_1.default.string().valid(...Object.values(enums_1.DayOfWeek));
8
+ exports.OperationalScheduleSchema = joi_1.default.object({
9
+ CollectionDays: joi_1.default.array().optional().items(DayOfWeekSchema).unique(),
10
+ TrunkingDays: joi_1.default.array().optional().items(DayOfWeekSchema).unique(),
11
+ DeliveryDays: joi_1.default.array().optional().items(DayOfWeekSchema).unique(),
12
+ });
13
+ exports.TransitSchema = joi_1.default.object({
14
+ TransitTimeInDays: joi_1.default.string().optional().allow(null),
15
+ DeliveryByTime: joi_1.default.string().optional().allow(null),
16
+ OperationalSchedule: exports.OperationalScheduleSchema.optional(),
17
+ });
18
+ //# sourceMappingURL=transit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transit.js","sourceRoot":"","sources":["../../../src/app/metadata/transit.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,mCAAoC;AAYpC,MAAM,eAAe,GAAG,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAS,CAAC,CAAC,CAAC;AAE3D,QAAA,yBAAyB,GAAG,aAAG,CAAC,MAAM,CAAC;IAClD,cAAc,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE;IACtE,YAAY,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE;IACpE,YAAY,EAAE,aAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE;CACrE,CAAC,CAAC;AAYU,QAAA,aAAa,GAAG,aAAG,CAAC,MAAM,CAAC;IACtC,iBAAiB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;IACtD,cAAc,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;IACnD,mBAAmB,EAAE,iCAAyB,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/connect-carrier-api",
3
- "version": "4.29.2",
3
+ "version": "4.30.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",
@@ -10,6 +10,8 @@ export interface CarrierAppMetadata {
10
10
  AuthProcess?: AuthSpecification;
11
11
  /** @description A list of branded carriers */
12
12
  Carriers: Carrier[];
13
+ /** @description Indicates whether the integration was developed by the carrier themselves (true) or by ShipStation (false) */
14
+ IsSelfIntegrated?: boolean;
13
15
  }
14
16
 
15
17
  export const CarrierAppMetadataSchema = Joi.object({
@@ -22,4 +24,5 @@ export const CarrierAppMetadataSchema = Joi.object({
22
24
  .min(1)
23
25
  .message('There must be at least 1 Carrier defined')
24
26
  .items(CarrierSchema),
27
+ IsSelfIntegrated: Joi.boolean().strict().optional(),
25
28
  });
@@ -62,3 +62,19 @@ export enum TrackingSubscriptionLevel {
62
62
  TrackingNumber = 'TrackingNumber',
63
63
  Account = 'Account',
64
64
  }
65
+
66
+ export enum ServiceDirection {
67
+ Outbound = 'Outbound',
68
+ Return = 'Return',
69
+ Both = 'Both',
70
+ }
71
+
72
+ export enum DayOfWeek {
73
+ MON = 'MON',
74
+ TUE = 'TUE',
75
+ WED = 'WED',
76
+ THU = 'THU',
77
+ FRI = 'FRI',
78
+ SAT = 'SAT',
79
+ SUN = 'SUN',
80
+ }
@@ -25,3 +25,5 @@ export * from './shipping-service';
25
25
  export * from './zone';
26
26
  export * from './connection-names-configuration';
27
27
  export * from './account-connection-specification';
28
+ export * from './transit';
29
+ export * from './package-constraints';
@@ -0,0 +1,20 @@
1
+ import Joi from 'joi';
2
+
3
+ /** @description Package size and weight constraints for a shipping service */
4
+ export interface PackageConstraints {
5
+ /** @description Minimum package dimensions in LxWxH format (cm), e.g. "10x10x1" */
6
+ MinDimensions?: string | null;
7
+ /** @description Maximum package dimensions in LxWxH format (cm), e.g. "120x60x60" */
8
+ MaxDimensions?: string | null;
9
+ /** @description Minimum package weight in kg */
10
+ MinWeight?: number | null;
11
+ /** @description Maximum package weight in kg */
12
+ MaxWeight?: number | null;
13
+ }
14
+
15
+ export const PackageConstraintsSchema = Joi.object({
16
+ MinDimensions: Joi.string().optional().allow(null),
17
+ MaxDimensions: Joi.string().optional().allow(null),
18
+ MinWeight: Joi.number().optional().allow(null),
19
+ MaxWeight: Joi.number().optional().allow(null),
20
+ });
@@ -5,4 +5,6 @@ export interface ShippingProviderConnector {
5
5
  Functions: FunctionSpecification[];
6
6
  ApiVersion: string;
7
7
  DiagnosticRoutes?: DiagnosticRoutes;
8
+ /** @description Indicates whether the integration was developed by the carrier themselves (true) or by ShipStation (false) */
9
+ IsSelfIntegrated?: boolean;
8
10
  }
@@ -11,6 +11,11 @@ import {
11
11
  import Joi from 'joi';
12
12
 
13
13
  import { ApiCodeRegex, ApiCodeValidationMessage } from '@shipengine/connect-runtime';
14
+ import { Transit, TransitSchema } from './transit';
15
+ import { PackageConstraints, PackageConstraintsSchema } from './package-constraints';
16
+ import { ServiceDirection } from './enums';
17
+
18
+ const ServiceDirectionSchema = Joi.string().valid(...Object.values(ServiceDirection));
14
19
 
15
20
  /** @description Basic structure for each shipping service */
16
21
  export interface ShippingService {
@@ -42,6 +47,16 @@ export interface ShippingService {
42
47
  ApiCode?: string;
43
48
  /** @description The unique identifier for this shipping service. It should not change after being published */
44
49
  Id: string;
50
+ /** @description Customer-facing description of service capabilities and features */
51
+ ServiceDescription?: string;
52
+ /** @description Direction of this service */
53
+ ServiceDirection?: ServiceDirection;
54
+ /** @description List of ISO 3166-1 alpha-2 destination country codes supported by this service */
55
+ DestinationCountries?: string[];
56
+ /** @description Transit time and delivery schedule information */
57
+ Transit?: Transit;
58
+ /** @description Package size and weight constraints for this service */
59
+ PackageConstraints?: PackageConstraints;
45
60
  }
46
61
 
47
62
  export const ShippingServiceSchema = Joi.object({
@@ -59,4 +74,12 @@ export const ShippingServiceSchema = Joi.object({
59
74
  Name: Joi.string().required().max(80),
60
75
  ApiCode: Joi.string().optional().pattern(ApiCodeRegex, ApiCodeValidationMessage),
61
76
  Id: Joi.string().uuid().required(),
77
+ ServiceDescription: Joi.string().optional(),
78
+ ServiceDirection: ServiceDirectionSchema.optional(),
79
+ DestinationCountries: Joi.array()
80
+ .optional()
81
+ .items(Joi.string().pattern(/^[A-Z]{2}$/))
82
+ .unique(),
83
+ Transit: TransitSchema.optional(),
84
+ PackageConstraints: PackageConstraintsSchema.optional(),
62
85
  });
@@ -0,0 +1,36 @@
1
+ import Joi from 'joi';
2
+ import { DayOfWeek } from './enums';
3
+
4
+ /** @description Operational schedule defining collection, trunking and delivery days */
5
+ export interface OperationalSchedule {
6
+ /** @description Days on which the carrier collects parcels */
7
+ CollectionDays?: DayOfWeek[];
8
+ /** @description Days on which the carrier trunks parcels between hubs */
9
+ TrunkingDays?: DayOfWeek[];
10
+ /** @description Days on which the carrier delivers parcels */
11
+ DeliveryDays?: DayOfWeek[];
12
+ }
13
+
14
+ const DayOfWeekSchema = Joi.string().valid(...Object.values(DayOfWeek));
15
+
16
+ export const OperationalScheduleSchema = Joi.object({
17
+ CollectionDays: Joi.array().optional().items(DayOfWeekSchema).unique(),
18
+ TrunkingDays: Joi.array().optional().items(DayOfWeekSchema).unique(),
19
+ DeliveryDays: Joi.array().optional().items(DayOfWeekSchema).unique(),
20
+ });
21
+
22
+ /** @description Transit information for a shipping service */
23
+ export interface Transit {
24
+ /** @description Transit time in days, as a number or range (e.g. "3" or "3-5") */
25
+ TransitTimeInDays?: string | null;
26
+ /** @description Latest time of day by which delivery is made (e.g. "17:00") */
27
+ DeliveryByTime?: string | null;
28
+ /** @description Operational schedule for collection, trunking and delivery days */
29
+ OperationalSchedule?: OperationalSchedule;
30
+ }
31
+
32
+ export const TransitSchema = Joi.object({
33
+ TransitTimeInDays: Joi.string().optional().allow(null),
34
+ DeliveryByTime: Joi.string().optional().allow(null),
35
+ OperationalSchedule: OperationalScheduleSchema.optional(),
36
+ });