onroute-policy-engine 1.8.0 → 1.8.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.
- package/dist/policy-engine.d.ts +8 -1
- package/dist/policy-engine.js +14 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/policy-definition.d.ts +2 -1
- package/dist/types/standard-tire-size.d.ts +4 -0
- package/dist/types/standard-tire-size.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/policy-engine.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PolicyDefinition, PermitType, Commodity, VehicleType, SizeDimension, AxleConfiguration, BridgeCalculationResult, ConditionForPermit, TrailerType, PowerUnitType, TrailerWeightDimension, PowerUnitWeightDimension, WeightDimension, SingleAxleDimension } from 'onroute-policy-engine/types';
|
|
1
|
+
import { PolicyDefinition, PermitType, Commodity, VehicleType, SizeDimension, AxleConfiguration, BridgeCalculationResult, ConditionForPermit, TrailerType, PowerUnitType, TrailerWeightDimension, PowerUnitWeightDimension, WeightDimension, SingleAxleDimension, StandardTireSize } from 'onroute-policy-engine/types';
|
|
2
2
|
import { Engine } from 'json-rules-engine';
|
|
3
3
|
import { ValidationResults } from './validation-results';
|
|
4
4
|
import { SpecialAuthorizations } from './types/special-authorizations';
|
|
@@ -227,4 +227,11 @@ export declare class Policy {
|
|
|
227
227
|
* weights for the axle unit at the supplied axleIndex.
|
|
228
228
|
*/
|
|
229
229
|
selectCorrectWeightDimension(weightDimensions: Array<WeightDimension>, configuration: Array<string>, axleConfiguration: Array<AxleConfiguration>, axleIndex: number): SingleAxleDimension | null;
|
|
230
|
+
/**
|
|
231
|
+
* Get the list of known standard tire sizes, used to populate
|
|
232
|
+
* dropdown lists in front-end interfaces.
|
|
233
|
+
* @returns List of known standard tire sizes, or empty array if
|
|
234
|
+
* none are configured
|
|
235
|
+
*/
|
|
236
|
+
getStandardTireSizes(): Array<StandardTireSize>;
|
|
230
237
|
}
|
package/dist/policy-engine.js
CHANGED
|
@@ -682,5 +682,19 @@ class Policy {
|
|
|
682
682
|
selectCorrectWeightDimension(weightDimensions, configuration, axleConfiguration, axleIndex) {
|
|
683
683
|
return (0, dimensions_helper_1.selectCorrectWeightDimensionHelper)(this, weightDimensions, configuration, axleConfiguration, axleIndex);
|
|
684
684
|
}
|
|
685
|
+
/**
|
|
686
|
+
* Get the list of known standard tire sizes, used to populate
|
|
687
|
+
* dropdown lists in front-end interfaces.
|
|
688
|
+
* @returns List of known standard tire sizes, or empty array if
|
|
689
|
+
* none are configured
|
|
690
|
+
*/
|
|
691
|
+
getStandardTireSizes() {
|
|
692
|
+
if (this.policyDefinition.standardTireSizes) {
|
|
693
|
+
return this.policyDefinition.standardTireSizes;
|
|
694
|
+
}
|
|
695
|
+
else {
|
|
696
|
+
return new Array();
|
|
697
|
+
}
|
|
698
|
+
}
|
|
685
699
|
}
|
|
686
700
|
exports.Policy = Policy;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { RegionSizeOverride } from './region-size-override';
|
|
|
16
16
|
export { SelfIssuable } from './self-issuable';
|
|
17
17
|
export { SizeDimension } from './size-dimension';
|
|
18
18
|
export { SpecialAuthorizations } from './special-authorizations';
|
|
19
|
+
export { StandardTireSize } from './standard-tire-size';
|
|
19
20
|
export { VehicleCategory, PowerUnitCategory, TrailerCategory, VehicleCategories, } from './vehicle-category';
|
|
20
21
|
export { VehicleType, PowerUnitType, TrailerType, VehicleTypes, } from './vehicle-type';
|
|
21
22
|
export { Vehicle, VehicleSizeConfiguration, TrailerSize, PowerUnitWeight, TrailerWeight, } from './vehicle';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GeographicRegion, PermitType, DefaultWeightDimensions, VehicleTypes, Commodity, SizeDimension, VehicleCategories, RangeMatrix, BridgeCalculationConstants, PermitConditionDefinition } from 'onroute-policy-engine/types';
|
|
1
|
+
import { GeographicRegion, PermitType, DefaultWeightDimensions, VehicleTypes, Commodity, SizeDimension, VehicleCategories, RangeMatrix, BridgeCalculationConstants, PermitConditionDefinition, StandardTireSize } from 'onroute-policy-engine/types';
|
|
2
2
|
import { RuleProperties } from 'json-rules-engine';
|
|
3
3
|
export type PolicyDefinition = {
|
|
4
4
|
minPEVersion: string;
|
|
@@ -13,4 +13,5 @@ export type PolicyDefinition = {
|
|
|
13
13
|
rangeMatrices?: Array<RangeMatrix>;
|
|
14
14
|
bridgeCalculationConstants: BridgeCalculationConstants;
|
|
15
15
|
conditions?: Array<PermitConditionDefinition>;
|
|
16
|
+
standardTireSizes?: Array<StandardTireSize>;
|
|
16
17
|
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "v1.8.
|
|
1
|
+
export declare const version = "v1.8.1";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED