onroute-policy-engine 1.8.2 → 1.8.4
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/dist/enum/vehicle-category.d.ts +2 -1
- package/dist/enum/vehicle-category.js +1 -0
- package/dist/policy-engine.d.ts +1 -1
- package/dist/policy-engine.js +6 -3
- package/dist/types/commodity.d.ts +2 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/vehicle.d.ts +8 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/policy-engine.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export declare class Policy {
|
|
|
135
135
|
* Gets a list of all configured trailer types in the policy definition.
|
|
136
136
|
* @returns Map of trailer type IDs to trailer type names.
|
|
137
137
|
*/
|
|
138
|
-
getTrailerTypes(): Map<string, string>;
|
|
138
|
+
getTrailerTypes(includePseudo?: boolean): Map<string, string>;
|
|
139
139
|
/**
|
|
140
140
|
* Gets a full PermitType definition by ID.
|
|
141
141
|
* @param type Type ID of the permit definition to return.
|
package/dist/policy-engine.js
CHANGED
|
@@ -522,9 +522,12 @@ class Policy {
|
|
|
522
522
|
* Gets a list of all configured trailer types in the policy definition.
|
|
523
523
|
* @returns Map of trailer type IDs to trailer type names.
|
|
524
524
|
*/
|
|
525
|
-
getTrailerTypes() {
|
|
526
|
-
|
|
527
|
-
|
|
525
|
+
getTrailerTypes(includePseudo) {
|
|
526
|
+
let allTypes = this.policyDefinition.vehicleTypes.trailerTypes;
|
|
527
|
+
if (!includePseudo) {
|
|
528
|
+
allTypes = allTypes.filter((t) => t.category !== enum_1.VehicleCategory.Pseudo.toString());
|
|
529
|
+
}
|
|
530
|
+
return (0, lists_helper_1.extractIdentifiedObjects)(allTypes);
|
|
528
531
|
}
|
|
529
532
|
/**
|
|
530
533
|
* Gets a full PermitType definition by ID.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdentifiedObject, VehicleSizeConfiguration,
|
|
1
|
+
import { IdentifiedObject, VehicleSizeConfiguration, VehicleWeightConfiguration } from 'onroute-policy-engine/types';
|
|
2
2
|
export type Commodity = IdentifiedObject & {
|
|
3
3
|
size?: CommoditySize;
|
|
4
4
|
weight?: CommodityWeight;
|
|
@@ -7,6 +7,5 @@ export type CommoditySize = {
|
|
|
7
7
|
powerUnits?: Array<VehicleSizeConfiguration>;
|
|
8
8
|
};
|
|
9
9
|
export type CommodityWeight = {
|
|
10
|
-
powerUnits?: Array<
|
|
11
|
-
trailers?: Array<TrailerWeight>;
|
|
10
|
+
powerUnits?: Array<VehicleWeightConfiguration>;
|
|
12
11
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,5 +19,5 @@ export { SpecialAuthorizations } from './special-authorizations';
|
|
|
19
19
|
export { StandardTireSize } from './standard-tire-size';
|
|
20
20
|
export { VehicleCategory, PowerUnitCategory, TrailerCategory, VehicleCategories, } from './vehicle-category';
|
|
21
21
|
export { VehicleType, PowerUnitType, TrailerType, VehicleTypes, } from './vehicle-type';
|
|
22
|
-
export { Vehicle, VehicleSizeConfiguration,
|
|
22
|
+
export { Vehicle, VehicleSizeConfiguration, VehicleWeightConfiguration, TrailerSize, TrailerWeight, } from './vehicle';
|
|
23
23
|
export { WeightDimension, PowerUnitWeightDimension, TrailerWeightDimension, DefaultWeightDimensions, SingleAxleDimension, } from './weight-dimension';
|
package/dist/types/vehicle.d.ts
CHANGED
|
@@ -5,14 +5,19 @@ export type Vehicle = SelfIssuable & {
|
|
|
5
5
|
export type VehicleSizeConfiguration = Vehicle & {
|
|
6
6
|
trailers: Array<TrailerSize>;
|
|
7
7
|
};
|
|
8
|
+
export type VehicleWeightConfiguration = Vehicle & {
|
|
9
|
+
weightDimensions?: Array<PowerUnitWeightDimension>;
|
|
10
|
+
additionalAxleSubType?: string;
|
|
11
|
+
trailers: Array<TrailerWeight>;
|
|
12
|
+
};
|
|
8
13
|
export type TrailerSize = Vehicle & {
|
|
9
14
|
sizeDimensions?: Array<SizeDimension>;
|
|
10
15
|
jeep: boolean;
|
|
11
16
|
booster: boolean;
|
|
12
17
|
};
|
|
13
|
-
export type PowerUnitWeight = Vehicle & {
|
|
14
|
-
weightDimensions?: Array<PowerUnitWeightDimension>;
|
|
15
|
-
};
|
|
16
18
|
export type TrailerWeight = Vehicle & {
|
|
17
19
|
weightDimensions?: Array<TrailerWeightDimension>;
|
|
20
|
+
additionalAxleSubType?: string;
|
|
21
|
+
jeep: boolean;
|
|
22
|
+
booster: boolean;
|
|
18
23
|
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "v1.8.
|
|
1
|
+
export declare const version = "v1.8.4";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"dayjs": "^1.11.13",
|
|
57
|
-
"json-rules-engine": "^7.
|
|
57
|
+
"json-rules-engine": "^7.3.1",
|
|
58
58
|
"semver": "^7.6.3"
|
|
59
59
|
},
|
|
60
60
|
"jest": {
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
],
|
|
90
90
|
"testEnvironment": "node"
|
|
91
91
|
},
|
|
92
|
-
"version": "v1.8.
|
|
92
|
+
"version": "v1.8.4"
|
|
93
93
|
}
|