onroute-policy-engine 1.3.0 → 1.4.1

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.
@@ -68,7 +68,7 @@ export declare class Policy {
68
68
  * other keyed on 'trailers'. Each map consists of a string id for the
69
69
  * vehicle, and a string common name for the vehicle.
70
70
  */
71
- getPermittableVehicleTypes(permitTypeId: string, commodityId?: string): Map<string, Map<string, string>>;
71
+ getPermittableVehicleTypes(permitTypeId: string, commodityId?: string | null): Map<string, Map<string, string>>;
72
72
  /**
73
73
  * Gets a list of all allowable power unit types for the given permit type
74
74
  * and commodity.
@@ -719,6 +719,7 @@ class Policy {
719
719
  * @param permitType Permit type definition
720
720
  */
721
721
  getAllowedVehicles(permitType) {
722
+ var _a;
722
723
  if (permitType.commodityRequired) {
723
724
  // If commodity is required, this method cannot be used since it
724
725
  // requires a fixed set of allowed vehicle types, not commodity-based
@@ -728,8 +729,7 @@ class Policy {
728
729
  if (!allowedVehicles) {
729
730
  return new Map();
730
731
  }
731
- if (!this.specialAuthorizations ||
732
- !this.specialAuthorizations.isLcvAllowed) {
732
+ if (!((_a = this.specialAuthorizations) === null || _a === void 0 ? void 0 : _a.isLcvAllowed)) {
733
733
  allowedVehicles = this.filterOutLongCombinationVehicles(allowedVehicles);
734
734
  }
735
735
  const allowedVehicleMap = new Map();
@@ -1,5 +1,5 @@
1
1
  export type SpecialAuthorizations = {
2
2
  companyId: number;
3
- isLcvAllowed?: boolean;
4
- noFeeType?: string;
3
+ isLcvAllowed: boolean;
4
+ noFeeType: string | null;
5
5
  };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "v1.3.0";
1
+ export declare const version = "v1.4.1";
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  // Generated by genversion.
5
- exports.version = 'v1.3.0';
5
+ exports.version = 'v1.4.1';
package/package.json CHANGED
@@ -89,5 +89,5 @@
89
89
  ],
90
90
  "testEnvironment": "node"
91
91
  },
92
- "version": "v1.3.0"
92
+ "version": "v1.4.1"
93
93
  }