onroute-policy-engine 2.28.0 → 2.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.
- package/dist/constants/commodity-codes.d.ts +8 -0
- package/dist/constants/commodity-codes.js +11 -0
- package/dist/constants/permit-codes.d.ts +18 -0
- package/dist/constants/permit-codes.js +25 -0
- package/dist/constants/power-unit-codes.d.ts +37 -0
- package/dist/constants/power-unit-codes.js +40 -0
- package/dist/constants/semi-trailer-codes.d.ts +3 -0
- package/dist/constants/semi-trailer-codes.js +29 -0
- package/dist/constants/trailer-codes.d.ts +58 -0
- package/dist/constants/trailer-codes.js +60 -0
- package/dist/enum/index.d.ts +1 -0
- package/dist/enum/index.js +3 -1
- package/dist/enum/validation-result-id.d.ts +4 -0
- package/dist/enum/validation-result-id.js +8 -0
- package/dist/helper/axle-spread.helper.js +9 -7
- package/dist/helper/dimensions.helper.d.ts +2 -2
- package/dist/helper/dimensions.helper.js +2 -2
- package/dist/helper/display-code-helper.js +1 -1
- package/dist/helper/policy-check.helper.d.ts +10 -10
- package/dist/helper/policy-check.helper.js +44 -42
- package/dist/helper/rules-engine.helper.d.ts +13 -1
- package/dist/helper/rules-engine.helper.js +18 -0
- package/dist/helper/vehicles.helper.d.ts +10 -10
- package/dist/helper/vehicles.helper.js +10 -10
- package/dist/policy-engine.d.ts +9 -9
- package/dist/policy-engine.js +16 -11
- package/dist/types/facts.d.ts +1 -1
- package/dist/types/permit-application.d.ts +1 -1
- package/dist/validation-result.d.ts +2 -0
- package/dist/validation-results.js +9 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/constants/semi-trailer-types.d.ts +0 -2
- package/dist/constants/semi-trailer-types.js +0 -47
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMODITY_CODES = void 0;
|
|
4
|
+
exports.COMMODITY_CODES = {
|
|
5
|
+
BRIDGE_BEAMS: 'BRGBEAM',
|
|
6
|
+
EMPTY: 'EMPTYXX',
|
|
7
|
+
LAMINATED_BEAMS: 'LAMBEAM',
|
|
8
|
+
NON_REDUCIBLE_LOADS: 'NONREDU',
|
|
9
|
+
NONE: 'XXXXXXX',
|
|
10
|
+
REDUCIBLE_LOADS: 'REDUCBL',
|
|
11
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const PERMIT_CODES: {
|
|
2
|
+
readonly TERM_OVERSIZE: 'TROS';
|
|
3
|
+
readonly TERM_OVERWEIGHT: 'TROW';
|
|
4
|
+
readonly HIGHWAY_CROSSING: 'HC';
|
|
5
|
+
readonly EXTRA_PROVINCIAL_TEMP_OPERATING_PERMIT: 'EPTOP';
|
|
6
|
+
readonly SINGLE_TRIP_OVERWEIGHT: 'STOW';
|
|
7
|
+
readonly SINGLE_TRIP_OVERSIZE: 'STOS';
|
|
8
|
+
readonly SINGLE_TRIP_OVERSIZE_OVERWEIGHT: 'STWS';
|
|
9
|
+
readonly EMPTY_SINGLE_TRIP_OVER_LENGTH_27_5: 'STWSE';
|
|
10
|
+
readonly SINGLE_TRIP_GVW_INCREASE: 'STGVWI';
|
|
11
|
+
readonly RIG_MOVE: 'RIG';
|
|
12
|
+
readonly INCREASED_GVW: 'IGVW';
|
|
13
|
+
readonly QUARTERLY_ICBC_BASIC_INSURANCE_FR: 'QRFR';
|
|
14
|
+
readonly QUARTERLY_NON_RESIDENT: 'NRQCV';
|
|
15
|
+
readonly SINGLE_TRIP_ICBC_BASIC_INSURANCE_FR: 'STFR';
|
|
16
|
+
readonly SINGLE_TRIP_NON_RESIDENT: 'NRSCV';
|
|
17
|
+
readonly MOTIVE_FUEL_USER_PERMIT: 'MFP';
|
|
18
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PERMIT_CODES = void 0;
|
|
4
|
+
exports.PERMIT_CODES = {
|
|
5
|
+
// TERM
|
|
6
|
+
TERM_OVERSIZE: 'TROS',
|
|
7
|
+
TERM_OVERWEIGHT: 'TROW',
|
|
8
|
+
HIGHWAY_CROSSING: 'HC',
|
|
9
|
+
// SINGLE TRIP
|
|
10
|
+
EXTRA_PROVINCIAL_TEMP_OPERATING_PERMIT: 'EPTOP',
|
|
11
|
+
SINGLE_TRIP_OVERWEIGHT: 'STOW',
|
|
12
|
+
SINGLE_TRIP_OVERSIZE: 'STOS',
|
|
13
|
+
SINGLE_TRIP_OVERSIZE_OVERWEIGHT: 'STWS',
|
|
14
|
+
EMPTY_SINGLE_TRIP_OVER_LENGTH_27_5: 'STWSE',
|
|
15
|
+
SINGLE_TRIP_GVW_INCREASE: 'STGVWI',
|
|
16
|
+
RIG_MOVE: 'RIG',
|
|
17
|
+
INCREASED_GVW: 'IGVW',
|
|
18
|
+
// NON RESIDENT
|
|
19
|
+
QUARTERLY_ICBC_BASIC_INSURANCE_FR: 'QRFR',
|
|
20
|
+
QUARTERLY_NON_RESIDENT: 'NRQCV',
|
|
21
|
+
SINGLE_TRIP_ICBC_BASIC_INSURANCE_FR: 'STFR',
|
|
22
|
+
SINGLE_TRIP_NON_RESIDENT: 'NRSCV',
|
|
23
|
+
// MOTIVE FUEL USER PERMIT
|
|
24
|
+
MOTIVE_FUEL_USER_PERMIT: 'MFP',
|
|
25
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const POWER_UNIT_CODES: {
|
|
2
|
+
readonly BUSES: 'BUSCRUM';
|
|
3
|
+
readonly INTERCITY_BUSES_PULLING_PONY_TRAILERS: 'BUSTRLR';
|
|
4
|
+
readonly CONCRETE_PUMPER_TRUCKS: 'CONCRET';
|
|
5
|
+
readonly CRANES_ALL_TERRAIN: 'CRANEAT';
|
|
6
|
+
readonly CRANES_MOBILE: 'CRANEMB';
|
|
7
|
+
readonly CRANES_RUBBER_TIRED_LOADERS_FIRETRUCKS_ALL_TERRAIN: 'CRAFTAT';
|
|
8
|
+
readonly CRANES_RUBBER_TIRED_LOADERS_FIRETRUCKS_MOBILE: 'CRAFTMB';
|
|
9
|
+
readonly DOUBLE_DECKER_BUSES: 'DDCKBUS';
|
|
10
|
+
readonly FARM_TRACTORS: 'FARMTRC';
|
|
11
|
+
readonly FARM_VEHICLES: 'FARMVEH';
|
|
12
|
+
readonly FIXED_EQUIPMENT_TRUCKS_GRADERS: 'GRADERS';
|
|
13
|
+
readonly LCV_ROCKY_MOUNTAIN_DOUBLES: 'LCVRMDB';
|
|
14
|
+
readonly LCV_TURNPIKE_DOUBLES: 'LCVTPDB';
|
|
15
|
+
readonly LOGGING_TRUCKS: 'LOGGING';
|
|
16
|
+
readonly LOGGING_TRUCKS_OFF_HIGHWAY: 'LOGOFFH';
|
|
17
|
+
readonly LONG_WHEELBASE_TRUCK_TRACTORS: 'LWBTRCT';
|
|
18
|
+
readonly MUNICIPAL_FIRE_TRUCKS: 'MUNFITR';
|
|
19
|
+
readonly OIL_AND_GAS_BED_TRUCKS: 'OGBEDTK';
|
|
20
|
+
readonly OIL_AND_GAS_OILFIELD_SOWS: 'OGOILSW';
|
|
21
|
+
readonly OIL_AND_GAS_SERVICE_RIGS: 'OGSERVC';
|
|
22
|
+
readonly OIL_AND_GAS_SERVICE_RIGS_HEAVY_FRONT_CRANE: 'OGSRRAH';
|
|
23
|
+
readonly PICKER_TRUCKS: 'PICKRTR';
|
|
24
|
+
readonly PICKER_TRUCK_TRACTORS: 'PICKRTT';
|
|
25
|
+
readonly TRUCKS_FRONT_OR_UNDERBODY_PLOW_BLADES: 'PLOWBLD';
|
|
26
|
+
readonly TAXIS: 'PUTAXIS';
|
|
27
|
+
readonly RUBBER_TIRED_LOADERS: 'RBTRLDR';
|
|
28
|
+
readonly TRUCKS: 'REGTRCK';
|
|
29
|
+
readonly SCRAPERS: 'SCRAPER';
|
|
30
|
+
readonly SPECIALLY_AUTHORIZED_VEHICLES: 'SPAUTHV';
|
|
31
|
+
readonly TRUCK_TRACTORS_STINGER_STEERED: 'STINGER';
|
|
32
|
+
readonly TELESCOPIC_CONVEYOR_TRUCKS: 'TLSCONV';
|
|
33
|
+
readonly TOW_VEHICLES: 'TOWVEHC';
|
|
34
|
+
readonly TRUCK_TRACTOR_WITH_PME: 'TRACPME';
|
|
35
|
+
readonly TRUCK_WITH_PME: 'TRCKPME';
|
|
36
|
+
readonly TRUCK_TRACTORS: 'TRKTRAC';
|
|
37
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POWER_UNIT_CODES = void 0;
|
|
4
|
+
exports.POWER_UNIT_CODES = {
|
|
5
|
+
BUSES: 'BUSCRUM',
|
|
6
|
+
INTERCITY_BUSES_PULLING_PONY_TRAILERS: 'BUSTRLR',
|
|
7
|
+
CONCRETE_PUMPER_TRUCKS: 'CONCRET',
|
|
8
|
+
CRANES_ALL_TERRAIN: 'CRANEAT',
|
|
9
|
+
CRANES_MOBILE: 'CRANEMB',
|
|
10
|
+
CRANES_RUBBER_TIRED_LOADERS_FIRETRUCKS_ALL_TERRAIN: 'CRAFTAT',
|
|
11
|
+
CRANES_RUBBER_TIRED_LOADERS_FIRETRUCKS_MOBILE: 'CRAFTMB',
|
|
12
|
+
DOUBLE_DECKER_BUSES: 'DDCKBUS',
|
|
13
|
+
FARM_TRACTORS: 'FARMTRC',
|
|
14
|
+
FARM_VEHICLES: 'FARMVEH',
|
|
15
|
+
FIXED_EQUIPMENT_TRUCKS_GRADERS: 'GRADERS',
|
|
16
|
+
LCV_ROCKY_MOUNTAIN_DOUBLES: 'LCVRMDB',
|
|
17
|
+
LCV_TURNPIKE_DOUBLES: 'LCVTPDB',
|
|
18
|
+
LOGGING_TRUCKS: 'LOGGING',
|
|
19
|
+
LOGGING_TRUCKS_OFF_HIGHWAY: 'LOGOFFH',
|
|
20
|
+
LONG_WHEELBASE_TRUCK_TRACTORS: 'LWBTRCT',
|
|
21
|
+
MUNICIPAL_FIRE_TRUCKS: 'MUNFITR',
|
|
22
|
+
OIL_AND_GAS_BED_TRUCKS: 'OGBEDTK',
|
|
23
|
+
OIL_AND_GAS_OILFIELD_SOWS: 'OGOILSW',
|
|
24
|
+
OIL_AND_GAS_SERVICE_RIGS: 'OGSERVC',
|
|
25
|
+
OIL_AND_GAS_SERVICE_RIGS_HEAVY_FRONT_CRANE: 'OGSRRAH',
|
|
26
|
+
PICKER_TRUCKS: 'PICKRTR',
|
|
27
|
+
PICKER_TRUCK_TRACTORS: 'PICKRTT',
|
|
28
|
+
TRUCKS_FRONT_OR_UNDERBODY_PLOW_BLADES: 'PLOWBLD',
|
|
29
|
+
TAXIS: 'PUTAXIS',
|
|
30
|
+
RUBBER_TIRED_LOADERS: 'RBTRLDR',
|
|
31
|
+
TRUCKS: 'REGTRCK',
|
|
32
|
+
SCRAPERS: 'SCRAPER',
|
|
33
|
+
SPECIALLY_AUTHORIZED_VEHICLES: 'SPAUTHV',
|
|
34
|
+
TRUCK_TRACTORS_STINGER_STEERED: 'STINGER',
|
|
35
|
+
TELESCOPIC_CONVEYOR_TRUCKS: 'TLSCONV',
|
|
36
|
+
TOW_VEHICLES: 'TOWVEHC',
|
|
37
|
+
TRUCK_TRACTOR_WITH_PME: 'TRACPME',
|
|
38
|
+
TRUCK_WITH_PME: 'TRCKPME',
|
|
39
|
+
TRUCK_TRACTORS: 'TRKTRAC',
|
|
40
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEMI_TRAILER_CODES = void 0;
|
|
4
|
+
exports.isSemiTrailerType = isSemiTrailerType;
|
|
5
|
+
const trailer_codes_1 = require("./trailer-codes");
|
|
6
|
+
exports.SEMI_TRAILER_CODES = new Set([
|
|
7
|
+
trailer_codes_1.TRAILER_CODES.EXPANDO_SEMI_TRAILERS,
|
|
8
|
+
trailer_codes_1.TRAILER_CODES.FIXED_EQUIPMENT_CONVEYORS,
|
|
9
|
+
trailer_codes_1.TRAILER_CODES.FIXED_EQUIPMENT_COUNTER_FLOW_ASPHALT_DRUM_MIXERS,
|
|
10
|
+
trailer_codes_1.TRAILER_CODES.FIXED_EQUIPMENT_PORTABLE_ASPHALT_BAGHOUSES,
|
|
11
|
+
trailer_codes_1.TRAILER_CODES.FIXED_EQUIPMENT_SEMI_TRAILERS,
|
|
12
|
+
trailer_codes_1.TRAILER_CODES.FIXED_EQUIPMENT_WHEELER_SEMI_TRAILERS,
|
|
13
|
+
trailer_codes_1.TRAILER_CODES.HIBOYS_EXPANDOS,
|
|
14
|
+
trailer_codes_1.TRAILER_CODES.HIBOYS_FLAT_DECKS,
|
|
15
|
+
trailer_codes_1.TRAILER_CODES.OIL_AND_GAS_OVERSIZE_OILFIELD_FLAT_DECK,
|
|
16
|
+
trailer_codes_1.TRAILER_CODES.PLATFORM_TRAILERS,
|
|
17
|
+
trailer_codes_1.TRAILER_CODES.PLATFORM_TRAILERS_WHEELERS,
|
|
18
|
+
trailer_codes_1.TRAILER_CODES.POLE_TRAILERS,
|
|
19
|
+
trailer_codes_1.TRAILER_CODES.READY_MIX_CONCRETE_PUMP_SEMI_TRAILERS,
|
|
20
|
+
trailer_codes_1.TRAILER_CODES.SEMI_TRAILERS,
|
|
21
|
+
trailer_codes_1.TRAILER_CODES.SEMI_TRAILERS_SINGLE_DOUBLE_DROP_STEP_DECK_LOWBED,
|
|
22
|
+
trailer_codes_1.TRAILER_CODES.SEMI_TRAILERS_WITH_CRANE,
|
|
23
|
+
trailer_codes_1.TRAILER_CODES.SEMI_TRAILERS_SPREAD_TANDEMS,
|
|
24
|
+
trailer_codes_1.TRAILER_CODES.SEMI_TRAILERS_WHEELERS,
|
|
25
|
+
trailer_codes_1.TRAILER_CODES.SEMI_TRAILERS_WIDE_WHEELERS,
|
|
26
|
+
]);
|
|
27
|
+
function isSemiTrailerType(vehicleType) {
|
|
28
|
+
return exports.SEMI_TRAILER_CODES.has(vehicleType);
|
|
29
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const TRAILER_CODES: {
|
|
2
|
+
readonly ADDITIONAL_AXLE_UNIT_ALL_TERRAIN_CRANE: 'ATCAXLE';
|
|
3
|
+
readonly ADDITIONAL_AXLE_UNIT_PLATFORM_TRAILER: 'PFMAXLE';
|
|
4
|
+
readonly BOOSTER: 'BOOSTER';
|
|
5
|
+
readonly TANDEM_TRIDEM_DRIVE_B_TRAIN: 'DBTRBTR';
|
|
6
|
+
readonly DOLLIES: 'DOLLIES';
|
|
7
|
+
readonly EXPANDO_SEMI_TRAILERS: 'EXPANDO';
|
|
8
|
+
readonly FIXED_EQUIPMENT_PORTABLE_ASPHALT_BAGHOUSES: 'FEBGHSE';
|
|
9
|
+
readonly FIXED_EQUIPMENT_CONVEYORS: 'FECVYRX';
|
|
10
|
+
readonly FIXED_EQUIPMENT_COUNTER_FLOW_ASPHALT_DRUM_MIXERS: 'FEDRMMX';
|
|
11
|
+
readonly FIXED_EQUIPMENT_PONY_TRAILERS: 'FEPNYTR';
|
|
12
|
+
readonly FIXED_EQUIPMENT_SEMI_TRAILERS: 'FESEMTR';
|
|
13
|
+
readonly FIXED_EQUIPMENT_WHEELER_SEMI_TRAILERS: 'FEWHELR';
|
|
14
|
+
readonly FIXED_EQUIPMENT_SEMI_TRAILER_PEACE_RIVER: 'FEWHLPR';
|
|
15
|
+
readonly FLOAT_TRAILERS: 'FLOATTR';
|
|
16
|
+
readonly FULL_TRAILERS: 'FULLLTL';
|
|
17
|
+
readonly HIBOYS_EXPANDOS: 'HIBOEXP';
|
|
18
|
+
readonly HIBOYS_FLAT_DECKS: 'HIBOFLT';
|
|
19
|
+
readonly JEEPS: 'JEEPSRG';
|
|
20
|
+
readonly LOGGING_TANDEM_POLE_TRAILERS_DOGLOGGERS: 'LOGDGLG';
|
|
21
|
+
readonly LOGGING_FULL_TRAILERS: 'LOGFULL';
|
|
22
|
+
readonly LOGGING_NON_TAC_B_TRAINS: 'LOGNTAC';
|
|
23
|
+
readonly LOGGING_OVERWIDTH_BUNKS: 'LOGOWBK';
|
|
24
|
+
readonly LOGGING_SEMI_TRAILER_EMPTY: 'LOGSMEM';
|
|
25
|
+
readonly LOGGING_SINGLE_AXLE_JEEPS: 'LOGTNDM';
|
|
26
|
+
readonly LEGACY_LOGGING_TRAILER_COMBINATIONS: 'LOGLGCY';
|
|
27
|
+
readonly LOGGING_TRI_AXLE_TRAILERS: 'LOGTRIX';
|
|
28
|
+
readonly MANUFACTURED_HOMES_OVER_5M: 'MHMBSHG';
|
|
29
|
+
readonly MANUFACTURED_HOMES_UNDER_5M: 'MHMBSHL';
|
|
30
|
+
readonly OVERDIMENSIONAL_TRAILERS_FOR_EXPORT: 'ODTRLEX';
|
|
31
|
+
readonly OIL_AND_GAS_OVERSIZE_OILFIELD_FLAT_DECK: 'OGOSFDT';
|
|
32
|
+
readonly PLATFORM_TRAILERS: 'PLATFRM';
|
|
33
|
+
readonly PLATFORM_TRAILERS_WHEELERS: 'PLATWHE';
|
|
34
|
+
readonly PARK_MODEL_HOMES: 'PMHWAAX';
|
|
35
|
+
readonly POLE_TRAILERS: 'POLETRL';
|
|
36
|
+
readonly PONY_TRAILERS: 'PONYTRL';
|
|
37
|
+
readonly READY_MIX_CONCRETE_PUMP_SEMI_TRAILERS: 'REDIMIX';
|
|
38
|
+
readonly SEMI_TRAILERS: 'SEMITRL';
|
|
39
|
+
readonly SEMI_TRAILERS_A_TRAINS_C_TRAINS: 'STACTRN';
|
|
40
|
+
readonly SEMI_TRAILERS_B_TRAINS: 'STBTRAN';
|
|
41
|
+
readonly SEMI_TRAILERS_WALLED_B_TRAINS: 'STCHIPS';
|
|
42
|
+
readonly SEMI_TRAILERS_WITH_CRANE: 'STCRANE';
|
|
43
|
+
readonly STINGER_STEERED_AUTOMOBILE_TRANSPORTERS: 'STINGAT';
|
|
44
|
+
readonly SEMI_TRAILERS_LOGGING: 'STLOGNG';
|
|
45
|
+
readonly SEMI_TRAILERS_NON_TAC_SHORT_CHASSIS: 'STNTSHC';
|
|
46
|
+
readonly STEERING_DOLLIES: 'STRDLY';
|
|
47
|
+
readonly SEMI_TRAILERS_INSULATED_VANS_REEFER: 'STREEFR';
|
|
48
|
+
readonly STEERING_TRAILERS_MANNED: 'STROPRT';
|
|
49
|
+
readonly STEERING_TRAILERS_SELF_REMOTE: 'STRSELF';
|
|
50
|
+
readonly SEMI_TRAILERS_SINGLE_DOUBLE_DROP_STEP_DECK_LOWBED: 'STSDBDK';
|
|
51
|
+
readonly SEMI_TRAILERS_STEERING_TRAILERS: 'STSTEER';
|
|
52
|
+
readonly SEMI_TRAILERS_STINGER_STEEERED_AUTOMOBILE_TRANSPORTERS: 'STSTNGR';
|
|
53
|
+
readonly SEMI_TRAILERS_SPREAD_TANDEMS: 'STWDTAN';
|
|
54
|
+
readonly SEMI_TRAILERS_WHEELERS: 'STWHELR';
|
|
55
|
+
readonly SEMI_TRAILERS_WIDE_WHEELERS: 'STWIDWH';
|
|
56
|
+
readonly NONE: 'XXXXXXX';
|
|
57
|
+
};
|
|
58
|
+
export type TrailerCode = (typeof TRAILER_CODES)[keyof typeof TRAILER_CODES];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TRAILER_CODES = void 0;
|
|
4
|
+
exports.TRAILER_CODES = {
|
|
5
|
+
ADDITIONAL_AXLE_UNIT_ALL_TERRAIN_CRANE: 'ATCAXLE',
|
|
6
|
+
ADDITIONAL_AXLE_UNIT_PLATFORM_TRAILER: 'PFMAXLE',
|
|
7
|
+
BOOSTER: 'BOOSTER',
|
|
8
|
+
TANDEM_TRIDEM_DRIVE_B_TRAIN: 'DBTRBTR',
|
|
9
|
+
DOLLIES: 'DOLLIES',
|
|
10
|
+
EXPANDO_SEMI_TRAILERS: 'EXPANDO',
|
|
11
|
+
FIXED_EQUIPMENT_PORTABLE_ASPHALT_BAGHOUSES: 'FEBGHSE',
|
|
12
|
+
FIXED_EQUIPMENT_CONVEYORS: 'FECVYRX',
|
|
13
|
+
FIXED_EQUIPMENT_COUNTER_FLOW_ASPHALT_DRUM_MIXERS: 'FEDRMMX',
|
|
14
|
+
FIXED_EQUIPMENT_PONY_TRAILERS: 'FEPNYTR',
|
|
15
|
+
FIXED_EQUIPMENT_SEMI_TRAILERS: 'FESEMTR',
|
|
16
|
+
FIXED_EQUIPMENT_WHEELER_SEMI_TRAILERS: 'FEWHELR',
|
|
17
|
+
FIXED_EQUIPMENT_SEMI_TRAILER_PEACE_RIVER: 'FEWHLPR',
|
|
18
|
+
FLOAT_TRAILERS: 'FLOATTR',
|
|
19
|
+
FULL_TRAILERS: 'FULLLTL',
|
|
20
|
+
HIBOYS_EXPANDOS: 'HIBOEXP',
|
|
21
|
+
HIBOYS_FLAT_DECKS: 'HIBOFLT',
|
|
22
|
+
JEEPS: 'JEEPSRG',
|
|
23
|
+
LOGGING_TANDEM_POLE_TRAILERS_DOGLOGGERS: 'LOGDGLG',
|
|
24
|
+
LOGGING_FULL_TRAILERS: 'LOGFULL',
|
|
25
|
+
LOGGING_NON_TAC_B_TRAINS: 'LOGNTAC',
|
|
26
|
+
LOGGING_OVERWIDTH_BUNKS: 'LOGOWBK',
|
|
27
|
+
LOGGING_SEMI_TRAILER_EMPTY: 'LOGSMEM',
|
|
28
|
+
LOGGING_SINGLE_AXLE_JEEPS: 'LOGTNDM',
|
|
29
|
+
LEGACY_LOGGING_TRAILER_COMBINATIONS: 'LOGLGCY',
|
|
30
|
+
LOGGING_TRI_AXLE_TRAILERS: 'LOGTRIX',
|
|
31
|
+
MANUFACTURED_HOMES_OVER_5M: 'MHMBSHG',
|
|
32
|
+
MANUFACTURED_HOMES_UNDER_5M: 'MHMBSHL',
|
|
33
|
+
OVERDIMENSIONAL_TRAILERS_FOR_EXPORT: 'ODTRLEX',
|
|
34
|
+
OIL_AND_GAS_OVERSIZE_OILFIELD_FLAT_DECK: 'OGOSFDT',
|
|
35
|
+
PLATFORM_TRAILERS: 'PLATFRM',
|
|
36
|
+
PLATFORM_TRAILERS_WHEELERS: 'PLATWHE',
|
|
37
|
+
PARK_MODEL_HOMES: 'PMHWAAX',
|
|
38
|
+
POLE_TRAILERS: 'POLETRL',
|
|
39
|
+
PONY_TRAILERS: 'PONYTRL',
|
|
40
|
+
READY_MIX_CONCRETE_PUMP_SEMI_TRAILERS: 'REDIMIX',
|
|
41
|
+
SEMI_TRAILERS: 'SEMITRL',
|
|
42
|
+
SEMI_TRAILERS_A_TRAINS_C_TRAINS: 'STACTRN',
|
|
43
|
+
SEMI_TRAILERS_B_TRAINS: 'STBTRAN',
|
|
44
|
+
SEMI_TRAILERS_WALLED_B_TRAINS: 'STCHIPS',
|
|
45
|
+
SEMI_TRAILERS_WITH_CRANE: 'STCRANE',
|
|
46
|
+
STINGER_STEERED_AUTOMOBILE_TRANSPORTERS: 'STINGAT',
|
|
47
|
+
SEMI_TRAILERS_LOGGING: 'STLOGNG',
|
|
48
|
+
SEMI_TRAILERS_NON_TAC_SHORT_CHASSIS: 'STNTSHC',
|
|
49
|
+
STEERING_DOLLIES: 'STRDLY',
|
|
50
|
+
SEMI_TRAILERS_INSULATED_VANS_REEFER: 'STREEFR',
|
|
51
|
+
STEERING_TRAILERS_MANNED: 'STROPRT',
|
|
52
|
+
STEERING_TRAILERS_SELF_REMOTE: 'STRSELF',
|
|
53
|
+
SEMI_TRAILERS_SINGLE_DOUBLE_DROP_STEP_DECK_LOWBED: 'STSDBDK',
|
|
54
|
+
SEMI_TRAILERS_STEERING_TRAILERS: 'STSTEER',
|
|
55
|
+
SEMI_TRAILERS_STINGER_STEEERED_AUTOMOBILE_TRANSPORTERS: 'STSTNGR',
|
|
56
|
+
SEMI_TRAILERS_SPREAD_TANDEMS: 'STWDTAN',
|
|
57
|
+
SEMI_TRAILERS_WHEELERS: 'STWHELR',
|
|
58
|
+
SEMI_TRAILERS_WIDE_WHEELERS: 'STWIDWH',
|
|
59
|
+
NONE: 'XXXXXXX',
|
|
60
|
+
};
|
package/dist/enum/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { OverloadCalculationDetailKind } from './overload-calculation-detail-kin
|
|
|
6
6
|
export { PolicyCheckResultType, PolicyCheckId } from './policy-check';
|
|
7
7
|
export { RelativePosition } from './relative-position';
|
|
8
8
|
export { ValidationResultCode } from './validation-result-code';
|
|
9
|
+
export { ValidationResultId } from './validation-result-id';
|
|
9
10
|
export { ValidationResultType } from './validation-result-type';
|
|
10
11
|
export { VehicleCategory } from './vehicle-category';
|
|
11
12
|
export { VehicleTypes } from './vehicle-types';
|
package/dist/enum/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VehicleTypes = exports.VehicleCategory = exports.ValidationResultType = exports.ValidationResultCode = exports.RelativePosition = exports.PolicyCheckId = exports.PolicyCheckResultType = exports.OverloadCalculationDetailKind = exports.PermitAppInfo = exports.CostFacts = exports.PolicyFacts = exports.CustomOperator = exports.AccessoryVehicleType = void 0;
|
|
3
|
+
exports.VehicleTypes = exports.VehicleCategory = exports.ValidationResultType = exports.ValidationResultId = exports.ValidationResultCode = exports.RelativePosition = exports.PolicyCheckId = exports.PolicyCheckResultType = exports.OverloadCalculationDetailKind = exports.PermitAppInfo = exports.CostFacts = exports.PolicyFacts = exports.CustomOperator = exports.AccessoryVehicleType = void 0;
|
|
4
4
|
var accessory_vehicle_type_1 = require("./accessory-vehicle-type");
|
|
5
5
|
Object.defineProperty(exports, "AccessoryVehicleType", { enumerable: true, get: function () { return accessory_vehicle_type_1.AccessoryVehicleType; } });
|
|
6
6
|
var custom_operator_1 = require("./custom-operator");
|
|
@@ -19,6 +19,8 @@ var relative_position_1 = require("./relative-position");
|
|
|
19
19
|
Object.defineProperty(exports, "RelativePosition", { enumerable: true, get: function () { return relative_position_1.RelativePosition; } });
|
|
20
20
|
var validation_result_code_1 = require("./validation-result-code");
|
|
21
21
|
Object.defineProperty(exports, "ValidationResultCode", { enumerable: true, get: function () { return validation_result_code_1.ValidationResultCode; } });
|
|
22
|
+
var validation_result_id_1 = require("./validation-result-id");
|
|
23
|
+
Object.defineProperty(exports, "ValidationResultId", { enumerable: true, get: function () { return validation_result_id_1.ValidationResultId; } });
|
|
22
24
|
var validation_result_type_1 = require("./validation-result-type");
|
|
23
25
|
Object.defineProperty(exports, "ValidationResultType", { enumerable: true, get: function () { return validation_result_type_1.ValidationResultType; } });
|
|
24
26
|
var vehicle_category_1 = require("./vehicle-category");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationResultId = void 0;
|
|
4
|
+
/** Identifies validation results that require specific consumer processing. */
|
|
5
|
+
var ValidationResultId;
|
|
6
|
+
(function (ValidationResultId) {
|
|
7
|
+
ValidationResultId["AxleWeightSpacing"] = "axle-weight-spacing";
|
|
8
|
+
})(ValidationResultId || (exports.ValidationResultId = ValidationResultId = {}));
|
|
@@ -4,10 +4,12 @@ exports.getTandemAxleSpreadThreshold = getTandemAxleSpreadThreshold;
|
|
|
4
4
|
exports.getTridemAxleSpreadThreshold = getTridemAxleSpreadThreshold;
|
|
5
5
|
exports.getAxleSpreadThreshold = getAxleSpreadThreshold;
|
|
6
6
|
const axle_spread_legal_limits_1 = require("../constants/axle-spread-legal-limits");
|
|
7
|
-
const
|
|
7
|
+
const power_unit_codes_1 = require("../constants/power-unit-codes");
|
|
8
|
+
const semi_trailer_codes_1 = require("../constants/semi-trailer-codes");
|
|
9
|
+
const trailer_codes_1 = require("../constants/trailer-codes");
|
|
8
10
|
function getTandemAxleSpreadThreshold(vehicleConfiguration, vehicleIndex) {
|
|
9
11
|
const vehicleType = vehicleConfiguration[vehicleIndex];
|
|
10
|
-
const isSpreadTandemSemiTrailer = vehicleType ===
|
|
12
|
+
const isSpreadTandemSemiTrailer = vehicleType === trailer_codes_1.TRAILER_CODES.SEMI_TRAILERS_SPREAD_TANDEMS;
|
|
11
13
|
if (isSpreadTandemSemiTrailer) {
|
|
12
14
|
return {
|
|
13
15
|
minCm: axle_spread_legal_limits_1.AXLE_SPREAD_LEGAL_LIMITS.TANDEM.SPREAD_TANDEM_SEMI_TRAILER.MINIMUM,
|
|
@@ -23,10 +25,10 @@ function getTridemAxleSpreadThreshold(vehicleConfiguration, vehicleIndex, axleCo
|
|
|
23
25
|
const vehicleType = vehicleConfiguration[vehicleIndex];
|
|
24
26
|
const isDriveAxle = axleIndex === 1;
|
|
25
27
|
const isTridemDrive = axleConfiguration[1].numberOfAxles === 3;
|
|
26
|
-
const isPonyTrailer = vehicleType ===
|
|
27
|
-
const isPoleTrailer = vehicleType ===
|
|
28
|
-
const isOilfieldBedTruck = vehicleType ===
|
|
29
|
-
const isPowerUnitTruckTractor = vehicleConfiguration[0] ===
|
|
28
|
+
const isPonyTrailer = vehicleType === trailer_codes_1.TRAILER_CODES.PONY_TRAILERS;
|
|
29
|
+
const isPoleTrailer = vehicleType === trailer_codes_1.TRAILER_CODES.POLE_TRAILERS;
|
|
30
|
+
const isOilfieldBedTruck = vehicleType === power_unit_codes_1.POWER_UNIT_CODES.OIL_AND_GAS_BED_TRUCKS;
|
|
31
|
+
const isPowerUnitTruckTractor = vehicleConfiguration[0] === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTORS;
|
|
30
32
|
if (isOilfieldBedTruck && isDriveAxle) {
|
|
31
33
|
return {
|
|
32
34
|
minCm: axle_spread_legal_limits_1.AXLE_SPREAD_LEGAL_LIMITS.TRIDEM.MINIMUM,
|
|
@@ -39,7 +41,7 @@ function getTridemAxleSpreadThreshold(vehicleConfiguration, vehicleIndex, axleCo
|
|
|
39
41
|
maxCm: axle_spread_legal_limits_1.AXLE_SPREAD_LEGAL_LIMITS.TRIDEM.PONY_TRAILER.MAXIMUM,
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
|
-
if (isPowerUnitTruckTractor && (0,
|
|
44
|
+
if (isPowerUnitTruckTractor && (0, semi_trailer_codes_1.isSemiTrailerType)(vehicleType)) {
|
|
43
45
|
return {
|
|
44
46
|
minCm: axle_spread_legal_limits_1.AXLE_SPREAD_LEGAL_LIMITS.TRIDEM.MINIMUM,
|
|
45
47
|
maxCm: axle_spread_legal_limits_1.AXLE_SPREAD_LEGAL_LIMITS.TRIDEM.SEMI_TRAILER.MAXIMUM,
|
|
@@ -96,7 +96,7 @@ export declare function getVehicleRelatives(policy: Policy, configuration: Array
|
|
|
96
96
|
*
|
|
97
97
|
* @example
|
|
98
98
|
* // Additional power-unit axle: CONCRET owns all three axle units explicitly.
|
|
99
|
-
* getAxleUnitVehicleIndexes(policy, [
|
|
99
|
+
* getAxleUnitVehicleIndexes(policy, [POWER_UNIT_CODES.CONCRETE_PUMPER_TRUCKS], [
|
|
100
100
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
101
101
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
102
102
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
@@ -105,7 +105,7 @@ export declare function getVehicleRelatives(policy: Policy, configuration: Array
|
|
|
105
105
|
*
|
|
106
106
|
* @example
|
|
107
107
|
* // Additional trailer axle: the trailer owns both trailer axle units explicitly.
|
|
108
|
-
* getAxleUnitVehicleIndexes(policy, [
|
|
108
|
+
* getAxleUnitVehicleIndexes(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.STEERING_TRAILERS_MANNED], [
|
|
109
109
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
110
110
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
111
111
|
* { ...axleUnit, vehicleIndex: 1 },
|
|
@@ -501,7 +501,7 @@ function getVehicleRelatives(policy, configuration, axleIndex, axleUnitVehicleIn
|
|
|
501
501
|
*
|
|
502
502
|
* @example
|
|
503
503
|
* // Additional power-unit axle: CONCRET owns all three axle units explicitly.
|
|
504
|
-
* getAxleUnitVehicleIndexes(policy, [
|
|
504
|
+
* getAxleUnitVehicleIndexes(policy, [POWER_UNIT_CODES.CONCRETE_PUMPER_TRUCKS], [
|
|
505
505
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
506
506
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
507
507
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
@@ -510,7 +510,7 @@ function getVehicleRelatives(policy, configuration, axleIndex, axleUnitVehicleIn
|
|
|
510
510
|
*
|
|
511
511
|
* @example
|
|
512
512
|
* // Additional trailer axle: the trailer owns both trailer axle units explicitly.
|
|
513
|
-
* getAxleUnitVehicleIndexes(policy, [
|
|
513
|
+
* getAxleUnitVehicleIndexes(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.STEERING_TRAILERS_MANNED], [
|
|
514
514
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
515
515
|
* { ...axleUnit, vehicleIndex: 0 },
|
|
516
516
|
* { ...axleUnit, vehicleIndex: 1 },
|
|
@@ -201,7 +201,7 @@ function getUniversalDisplayCode(policy, axleConfiguration) {
|
|
|
201
201
|
*
|
|
202
202
|
* @example
|
|
203
203
|
* // Returns true for a standard truck-tractor with semi-trailer
|
|
204
|
-
* canCreateStandardCode(policy, [
|
|
204
|
+
* canCreateStandardCode(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS, 'SEMI'], [
|
|
205
205
|
* { numberOfAxles: 2, ... }, // Steer axle
|
|
206
206
|
* { numberOfAxles: 3, ... }, // Drive axle
|
|
207
207
|
* { numberOfAxles: 3, ... } // Trailer axle
|
|
@@ -57,7 +57,7 @@ export declare function CheckNumberOfAxles(_policy: Policy, _vehicleConfiguratio
|
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
59
|
* // For a vehicle with 3 axle groups
|
|
60
|
-
* const results = CheckBridgeFormula(policy, [
|
|
60
|
+
* const results = CheckBridgeFormula(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS], [
|
|
61
61
|
* { numberOfAxles: 2, axleSpread: 1.8, weight: 12000 },
|
|
62
62
|
* { numberOfAxles: 3, axleSpread: 4.2, weight: 34000 },
|
|
63
63
|
* { numberOfAxles: 3, axleSpread: 3.0, weight: 34000 }
|
|
@@ -84,7 +84,7 @@ export declare function CheckBridgeFormula(policy: Policy, _vehicleConfiguration
|
|
|
84
84
|
*
|
|
85
85
|
* @example
|
|
86
86
|
* // For a vehicle with 2 axle units
|
|
87
|
-
* const results = CheckNumTiresPerAxle(policy, [
|
|
87
|
+
* const results = CheckNumTiresPerAxle(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
88
88
|
* { numberOfAxles: 2, numberOfTires: 4 }, // tandem steer: 4 (valid)
|
|
89
89
|
* { numberOfAxles: 3, numberOfTires: 12 } // tridem drive: 12 (valid)
|
|
90
90
|
* ]);
|
|
@@ -92,7 +92,7 @@ export declare function CheckBridgeFormula(policy: Policy, _vehicleConfiguration
|
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
94
|
* // Invalid tire count example
|
|
95
|
-
* const results = CheckNumTiresPerAxle(policy, [
|
|
95
|
+
* const results = CheckNumTiresPerAxle(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
96
96
|
* { numberOfAxles: 1, numberOfTires: 8 } // single drive: 8 (invalid)
|
|
97
97
|
* ]);
|
|
98
98
|
* // Returns fail result for the axle unit
|
|
@@ -122,7 +122,7 @@ export declare function CheckNumTiresPerAxle(_policy: Policy, _vehicleConfigurat
|
|
|
122
122
|
*
|
|
123
123
|
* @example
|
|
124
124
|
* // For a truck-tractor with 2-axle steer, 3-axle drive, and a 3-axle semi-trailer
|
|
125
|
-
* const results = CheckPermittableWeight(policy, [
|
|
125
|
+
* const results = CheckPermittableWeight(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS], [
|
|
126
126
|
* { numberOfAxles: 2, axleUnitWeight: 12000 }, // Steer axle unit
|
|
127
127
|
* { numberOfAxles: 3, axleUnitWeight: 34000 }, // Drive axle unit
|
|
128
128
|
* { numberOfAxles: 3, axleUnitWeight: 34000 } // Trailer axle unit
|
|
@@ -131,7 +131,7 @@ export declare function CheckNumTiresPerAxle(_policy: Policy, _vehicleConfigurat
|
|
|
131
131
|
*
|
|
132
132
|
* @example
|
|
133
133
|
* // For a single power unit with no trailers
|
|
134
|
-
* const results = CheckPermittableWeight(policy, [
|
|
134
|
+
* const results = CheckPermittableWeight(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
135
135
|
* { numberOfAxles: 2, axleUnitWeight: 12000 }, // Steer axle unit
|
|
136
136
|
* { numberOfAxles: 3, axleUnitWeight: 34000 } // Drive axle unit
|
|
137
137
|
* ]);
|
|
@@ -141,7 +141,7 @@ export declare function CheckNumTiresPerAxle(_policy: Policy, _vehicleConfigurat
|
|
|
141
141
|
* // For a configured power unit with an additional axle unit
|
|
142
142
|
* const results = CheckPermittableWeight(
|
|
143
143
|
* policy,
|
|
144
|
-
* [
|
|
144
|
+
* [POWER_UNIT_CODES.CONCRETE_PUMPER_TRUCKS],
|
|
145
145
|
* [
|
|
146
146
|
* { numberOfAxles: 1, axleUnitWeight: 5000, vehicleIndex: 0 },
|
|
147
147
|
* { numberOfAxles: 1, axleUnitWeight: 5000, vehicleIndex: 0 },
|
|
@@ -170,7 +170,7 @@ export declare function CheckPermittableWeight(policy: Policy, vehicleConfigurat
|
|
|
170
170
|
*
|
|
171
171
|
* @example
|
|
172
172
|
* // For a single steer, tridem drive configuration
|
|
173
|
-
* const results = CheckMinSteerAxleWeight(policy, [
|
|
173
|
+
* const results = CheckMinSteerAxleWeight(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
174
174
|
* { numberOfAxles: 1, axleUnitWeight: 8000 }, // Single steer axle
|
|
175
175
|
* { numberOfAxles: 3, axleUnitWeight: 30000 } // Tridem drive axle
|
|
176
176
|
* ]);
|
|
@@ -211,7 +211,7 @@ export declare function CheckPickerTruckTractorWeightRestrictions(policy: Policy
|
|
|
211
211
|
*
|
|
212
212
|
* @example
|
|
213
213
|
* // For a tandem drive configuration with GCVW of 120,000 kg
|
|
214
|
-
* const results = CheckMinDriveAxleWeight(policy, [
|
|
214
|
+
* const results = CheckMinDriveAxleWeight(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
215
215
|
* { numberOfAxles: 1, axleUnitWeight: 12000 }, // Steer axle
|
|
216
216
|
* { numberOfAxles: 2, axleUnitWeight: 24000 } // Tandem drive axle
|
|
217
217
|
* ]);
|
|
@@ -247,7 +247,7 @@ export declare function CheckMinDriveAxleWeight(_policy: Policy, vehicleConfigur
|
|
|
247
247
|
*
|
|
248
248
|
* @example
|
|
249
249
|
* // For a vehicle with valid tire loads
|
|
250
|
-
* const results = CheckMaxTireLoad(policy, [
|
|
250
|
+
* const results = CheckMaxTireLoad(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
251
251
|
* { tireSize: 445, numberOfTires: 2, axleUnitWeight: 8000 }, // Steer axle: 8000kg ≤ 9100kg (pass)
|
|
252
252
|
* { tireSize: 445, numberOfTires: 8, axleUnitWeight: 30000 } // Drive axle: 30000kg ≤ 30800kg (pass)
|
|
253
253
|
* ]);
|
|
@@ -255,7 +255,7 @@ export declare function CheckMinDriveAxleWeight(_policy: Policy, vehicleConfigur
|
|
|
255
255
|
*
|
|
256
256
|
* @example
|
|
257
257
|
* // For a vehicle with invalid tire loads
|
|
258
|
-
* const results = CheckMaxTireLoad(policy, [
|
|
258
|
+
* const results = CheckMaxTireLoad(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
259
259
|
* { tireSize: 460, numberOfTires: 2, axleUnitWeight: 8000 }, // Steer axle: tire size > 455mm (fail)
|
|
260
260
|
* { tireSize: 445, numberOfTires: 8, axleUnitWeight: 32000 } // Drive axle: 32000kg > 30800kg (fail)
|
|
261
261
|
* ]);
|
|
@@ -25,9 +25,10 @@ const axle_weight_legal_maximums_1 = require("../constants/axle-weight-legal-max
|
|
|
25
25
|
const axle_weight_permittable_maximums_1 = require("../constants/axle-weight-permittable-maximums");
|
|
26
26
|
const power_unit_axle_code_multiplier_1 = require("../constants/power-unit-axle-code-multiplier");
|
|
27
27
|
const axle_spread_helper_1 = require("./axle-spread.helper");
|
|
28
|
-
const
|
|
28
|
+
const semi_trailer_codes_1 = require("../constants/semi-trailer-codes");
|
|
29
29
|
const interaxle_spacing_helper_1 = require("./interaxle-spacing.helper");
|
|
30
30
|
const format_meters_helper_1 = require("./format-meters.helper");
|
|
31
|
+
const power_unit_codes_1 = require("../constants/power-unit-codes");
|
|
31
32
|
/** Applies the standard lower-of rule or the exact 7.16(g) exception. */
|
|
32
33
|
function getMaximumLegalAxleGroupWeightThreshold(individualLegalWeightSum, ctr717TableValue, isTandemDriveSingleJeepException) {
|
|
33
34
|
const tandemDriveSingleJeepMinimumKg = 24000;
|
|
@@ -80,19 +81,20 @@ function getConfiguredAxleUnitWeightThreshold(policy, vehicleConfiguration, axle
|
|
|
80
81
|
return ((_b = (_a = policy.selectCorrectWeightDimension(weights, vehicleConfiguration, axleConfiguration, axleIndex)) === null || _a === void 0 ? void 0 : _a[threshold]) !== null && _b !== void 0 ? _b : 0);
|
|
81
82
|
}
|
|
82
83
|
function isFeatureLegalWeightPowerUnit(vehicleType) {
|
|
83
|
-
return (vehicleType ===
|
|
84
|
-
vehicleType ===
|
|
85
|
-
vehicleType ===
|
|
86
|
-
vehicleType ===
|
|
84
|
+
return (vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCKS ||
|
|
85
|
+
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTORS ||
|
|
86
|
+
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_WITH_PME ||
|
|
87
|
+
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME);
|
|
87
88
|
}
|
|
88
89
|
function getFeatureLegalPowerUnitWeightThreshold(vehicleType, axleConfiguration, axleIndex) {
|
|
89
90
|
const steerAxle = axleConfiguration[0];
|
|
90
91
|
const driveAxle = axleConfiguration[1];
|
|
91
|
-
const hasPme = vehicleType ===
|
|
92
|
+
const hasPme = vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_WITH_PME ||
|
|
93
|
+
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME;
|
|
92
94
|
if (axleIndex === 0) {
|
|
93
95
|
if (steerAxle.numberOfAxles === 1 &&
|
|
94
96
|
(driveAxle.numberOfAxles === 1 || driveAxle.numberOfAxles === 2)) {
|
|
95
|
-
return hasPme || vehicleType ===
|
|
97
|
+
return hasPme || vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCKS
|
|
96
98
|
? axle_weight_legal_maximums_1.AXLE_WEIGHT_LEGAL_MAXIMUMS.SINGLE_AXLE
|
|
97
99
|
: axle_weight_legal_maximums_1.AXLE_WEIGHT_LEGAL_MAXIMUMS.STANDARD_TRUCK_TRACTOR_STEER;
|
|
98
100
|
}
|
|
@@ -141,8 +143,8 @@ function CheckLegalWeight(policy, vehicleConfiguration, axleConfiguration) {
|
|
|
141
143
|
return {
|
|
142
144
|
id: policyId,
|
|
143
145
|
message: `Weight for axle unit ${axleUnitNumber} ${result ? 'is legal' : `must not exceed ${legalWeight} kgs`}`,
|
|
144
|
-
// We intentionally only return Pass/Warning, as we should never
|
|
145
|
-
// show an error for being above legal amount, only permitable
|
|
146
|
+
// We intentionally only return Pass/Warning, as we should never
|
|
147
|
+
// show an error for being above legal amount, only permitable
|
|
146
148
|
// amount. But it's still useful info for things like OCD table.
|
|
147
149
|
result: result
|
|
148
150
|
? enum_1.PolicyCheckResultType.Pass
|
|
@@ -208,7 +210,7 @@ function CheckAxleGroupMaximumLegalWeightThreshold(policy, vehicleConfiguration,
|
|
|
208
210
|
const ctr717TableValue = (0, ctr_717_helper_1.getCtr717TableValue)(groupSpread);
|
|
209
211
|
const isTandemDriveSingleJeepException = startAxleIndex === 1 &&
|
|
210
212
|
endAxleIndex === 2 &&
|
|
211
|
-
vehicleConfiguration[0] ===
|
|
213
|
+
vehicleConfiguration[0] === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTORS &&
|
|
212
214
|
vehicleConfiguration[1] === enum_1.AccessoryVehicleType.Jeep &&
|
|
213
215
|
axleUnitVehicleIndexes[1] === 0 &&
|
|
214
216
|
axleUnitVehicleIndexes[2] === 1 &&
|
|
@@ -329,7 +331,7 @@ function getBridgeFormulaInputFailure(axleConfiguration) {
|
|
|
329
331
|
*
|
|
330
332
|
* @example
|
|
331
333
|
* // For a vehicle with 3 axle groups
|
|
332
|
-
* const results = CheckBridgeFormula(policy, [
|
|
334
|
+
* const results = CheckBridgeFormula(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS], [
|
|
333
335
|
* { numberOfAxles: 2, axleSpread: 1.8, weight: 12000 },
|
|
334
336
|
* { numberOfAxles: 3, axleSpread: 4.2, weight: 34000 },
|
|
335
337
|
* { numberOfAxles: 3, axleSpread: 3.0, weight: 34000 }
|
|
@@ -377,7 +379,7 @@ function CheckBridgeFormula(policy, _vehicleConfiguration, axleConfiguration) {
|
|
|
377
379
|
*
|
|
378
380
|
* @example
|
|
379
381
|
* // For a vehicle with 2 axle units
|
|
380
|
-
* const results = CheckNumTiresPerAxle(policy, [
|
|
382
|
+
* const results = CheckNumTiresPerAxle(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
381
383
|
* { numberOfAxles: 2, numberOfTires: 4 }, // tandem steer: 4 (valid)
|
|
382
384
|
* { numberOfAxles: 3, numberOfTires: 12 } // tridem drive: 12 (valid)
|
|
383
385
|
* ]);
|
|
@@ -385,7 +387,7 @@ function CheckBridgeFormula(policy, _vehicleConfiguration, axleConfiguration) {
|
|
|
385
387
|
*
|
|
386
388
|
* @example
|
|
387
389
|
* // Invalid tire count example
|
|
388
|
-
* const results = CheckNumTiresPerAxle(policy, [
|
|
390
|
+
* const results = CheckNumTiresPerAxle(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
389
391
|
* { numberOfAxles: 1, numberOfTires: 8 } // single drive: 8 (invalid)
|
|
390
392
|
* ]);
|
|
391
393
|
* // Returns fail result for the axle unit
|
|
@@ -450,7 +452,7 @@ function CheckNumTiresPerAxle(_policy, _vehicleConfiguration, axleConfiguration)
|
|
|
450
452
|
*
|
|
451
453
|
* @example
|
|
452
454
|
* // For a truck-tractor with 2-axle steer, 3-axle drive, and a 3-axle semi-trailer
|
|
453
|
-
* const results = CheckPermittableWeight(policy, [
|
|
455
|
+
* const results = CheckPermittableWeight(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS], [
|
|
454
456
|
* { numberOfAxles: 2, axleUnitWeight: 12000 }, // Steer axle unit
|
|
455
457
|
* { numberOfAxles: 3, axleUnitWeight: 34000 }, // Drive axle unit
|
|
456
458
|
* { numberOfAxles: 3, axleUnitWeight: 34000 } // Trailer axle unit
|
|
@@ -459,7 +461,7 @@ function CheckNumTiresPerAxle(_policy, _vehicleConfiguration, axleConfiguration)
|
|
|
459
461
|
*
|
|
460
462
|
* @example
|
|
461
463
|
* // For a single power unit with no trailers
|
|
462
|
-
* const results = CheckPermittableWeight(policy, [
|
|
464
|
+
* const results = CheckPermittableWeight(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
463
465
|
* { numberOfAxles: 2, axleUnitWeight: 12000 }, // Steer axle unit
|
|
464
466
|
* { numberOfAxles: 3, axleUnitWeight: 34000 } // Drive axle unit
|
|
465
467
|
* ]);
|
|
@@ -469,7 +471,7 @@ function CheckNumTiresPerAxle(_policy, _vehicleConfiguration, axleConfiguration)
|
|
|
469
471
|
* // For a configured power unit with an additional axle unit
|
|
470
472
|
* const results = CheckPermittableWeight(
|
|
471
473
|
* policy,
|
|
472
|
-
* [
|
|
474
|
+
* [POWER_UNIT_CODES.CONCRETE_PUMPER_TRUCKS],
|
|
473
475
|
* [
|
|
474
476
|
* { numberOfAxles: 1, axleUnitWeight: 5000, vehicleIndex: 0 },
|
|
475
477
|
* { numberOfAxles: 1, axleUnitWeight: 5000, vehicleIndex: 0 },
|
|
@@ -548,7 +550,7 @@ function CheckPermittableWeight(policy, vehicleConfiguration, axleConfiguration)
|
|
|
548
550
|
*
|
|
549
551
|
* @example
|
|
550
552
|
* // For a single steer, tridem drive configuration
|
|
551
|
-
* const results = CheckMinSteerAxleWeight(policy, [
|
|
553
|
+
* const results = CheckMinSteerAxleWeight(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
552
554
|
* { numberOfAxles: 1, axleUnitWeight: 8000 }, // Single steer axle
|
|
553
555
|
* { numberOfAxles: 3, axleUnitWeight: 30000 } // Tridem drive axle
|
|
554
556
|
* ]);
|
|
@@ -649,7 +651,7 @@ function CheckPickerTruckTractorWeightRestrictions(policy, vehicleConfiguration,
|
|
|
649
651
|
endAxleUnit: 2,
|
|
650
652
|
},
|
|
651
653
|
];
|
|
652
|
-
if (vehicleConfiguration[0] !==
|
|
654
|
+
if (vehicleConfiguration[0] !== power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS ||
|
|
653
655
|
!steerAxle ||
|
|
654
656
|
!driveAxle ||
|
|
655
657
|
steerAxle.numberOfAxles !== 2 ||
|
|
@@ -672,7 +674,7 @@ function CheckPickerTruckTractorWeightRestrictions(policy, vehicleConfiguration,
|
|
|
672
674
|
if (!isNonStandard) {
|
|
673
675
|
return doesNotApply();
|
|
674
676
|
}
|
|
675
|
-
const powerUnitWeights = policy.getDefaultPowerUnitWeight(
|
|
677
|
+
const powerUnitWeights = policy.getDefaultPowerUnitWeight(power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS, 23);
|
|
676
678
|
const steerWeightDimension = policy.selectCorrectWeightDimension(powerUnitWeights, vehicleConfiguration, axleConfiguration, 0);
|
|
677
679
|
const driveWeightDimension = policy.selectCorrectWeightDimension(powerUnitWeights, vehicleConfiguration, axleConfiguration, 1);
|
|
678
680
|
const steerPermittable = steerWeightDimension === null || steerWeightDimension === void 0 ? void 0 : steerWeightDimension.permittable;
|
|
@@ -733,7 +735,7 @@ function CheckPickerTruckTractorWeightRestrictions(policy, vehicleConfiguration,
|
|
|
733
735
|
*
|
|
734
736
|
* @example
|
|
735
737
|
* // For a tandem drive configuration with GCVW of 120,000 kg
|
|
736
|
-
* const results = CheckMinDriveAxleWeight(policy, [
|
|
738
|
+
* const results = CheckMinDriveAxleWeight(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
737
739
|
* { numberOfAxles: 1, axleUnitWeight: 12000 }, // Steer axle
|
|
738
740
|
* { numberOfAxles: 2, axleUnitWeight: 24000 } // Tandem drive axle
|
|
739
741
|
* ]);
|
|
@@ -752,11 +754,11 @@ function CheckMinDriveAxleWeight(_policy, vehicleConfiguration, axleConfiguratio
|
|
|
752
754
|
const isTandemDrive = driveAxle.numberOfAxles === 2;
|
|
753
755
|
const isTridemDrive = driveAxle.numberOfAxles === 3;
|
|
754
756
|
const isSupportedVehicleSubtype = (value) => {
|
|
755
|
-
return (value ===
|
|
756
|
-
value ===
|
|
757
|
-
value ===
|
|
758
|
-
value ===
|
|
759
|
-
value ===
|
|
757
|
+
return (value === power_unit_codes_1.POWER_UNIT_CODES.TRUCKS ||
|
|
758
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTORS ||
|
|
759
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS ||
|
|
760
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_WITH_PME ||
|
|
761
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME);
|
|
760
762
|
};
|
|
761
763
|
if ((isTandemDrive || isTridemDrive) &&
|
|
762
764
|
isSupportedVehicleSubtype(powerUnitSubtype)) {
|
|
@@ -816,7 +818,7 @@ function CheckMinDriveAxleWeight(_policy, vehicleConfiguration, axleConfiguratio
|
|
|
816
818
|
*
|
|
817
819
|
* @example
|
|
818
820
|
* // For a vehicle with valid tire loads
|
|
819
|
-
* const results = CheckMaxTireLoad(policy, [
|
|
821
|
+
* const results = CheckMaxTireLoad(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
820
822
|
* { tireSize: 445, numberOfTires: 2, axleUnitWeight: 8000 }, // Steer axle: 8000kg ≤ 9100kg (pass)
|
|
821
823
|
* { tireSize: 445, numberOfTires: 8, axleUnitWeight: 30000 } // Drive axle: 30000kg ≤ 30800kg (pass)
|
|
822
824
|
* ]);
|
|
@@ -824,7 +826,7 @@ function CheckMinDriveAxleWeight(_policy, vehicleConfiguration, axleConfiguratio
|
|
|
824
826
|
*
|
|
825
827
|
* @example
|
|
826
828
|
* // For a vehicle with invalid tire loads
|
|
827
|
-
* const results = CheckMaxTireLoad(policy, [
|
|
829
|
+
* const results = CheckMaxTireLoad(policy, [POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
828
830
|
* { tireSize: 460, numberOfTires: 2, axleUnitWeight: 8000 }, // Steer axle: tire size > 455mm (fail)
|
|
829
831
|
* { tireSize: 445, numberOfTires: 8, axleUnitWeight: 32000 } // Drive axle: 32000kg > 30800kg (fail)
|
|
830
832
|
* ]);
|
|
@@ -839,9 +841,9 @@ function CheckMaxTireLoad(_policy, _vehicleConfiguration, axleConfiguration) {
|
|
|
839
841
|
const policyCheckResults = new Array();
|
|
840
842
|
const policyId = enum_1.PolicyCheckId.MaxTireLoad;
|
|
841
843
|
const powerUnitType = _vehicleConfiguration[0];
|
|
842
|
-
const isRubberTiredLoader = powerUnitType ===
|
|
843
|
-
const isAllTerrainCrane = powerUnitType ===
|
|
844
|
-
const isMobileCrane = powerUnitType ===
|
|
844
|
+
const isRubberTiredLoader = powerUnitType === power_unit_codes_1.POWER_UNIT_CODES.RUBBER_TIRED_LOADERS;
|
|
845
|
+
const isAllTerrainCrane = powerUnitType === power_unit_codes_1.POWER_UNIT_CODES.CRANES_ALL_TERRAIN;
|
|
846
|
+
const isMobileCrane = powerUnitType === power_unit_codes_1.POWER_UNIT_CODES.CRANES_MOBILE;
|
|
845
847
|
const addFailResult = (axleUnit) => {
|
|
846
848
|
policyCheckResults.push({
|
|
847
849
|
id: policyId,
|
|
@@ -1063,22 +1065,22 @@ function CheckWheelbaseLegalLimits(_policy, vehicleConfiguration, axleConfigurat
|
|
|
1063
1065
|
const steerAxle = Object.assign(Object.assign({}, axleConfiguration[0]), { axleSpread: (_a = axleConfiguration[0].axleSpread) !== null && _a !== void 0 ? _a : 0 });
|
|
1064
1066
|
const driveAxle = Object.assign(Object.assign({}, axleConfiguration[1]), { axleSpread: (_b = axleConfiguration[1].axleSpread) !== null && _b !== void 0 ? _b : 0, interaxleSpacing: (_c = axleConfiguration[1].interaxleSpacing) !== null && _c !== void 0 ? _c : 0 });
|
|
1065
1067
|
const isSupportedVehicleSubtype = (value) => {
|
|
1066
|
-
return (value ===
|
|
1067
|
-
value ===
|
|
1068
|
-
value ===
|
|
1069
|
-
value ===
|
|
1070
|
-
value ===
|
|
1071
|
-
value ===
|
|
1068
|
+
return (value === power_unit_codes_1.POWER_UNIT_CODES.TRUCKS ||
|
|
1069
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTORS ||
|
|
1070
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS ||
|
|
1071
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.OIL_AND_GAS_BED_TRUCKS ||
|
|
1072
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_WITH_PME ||
|
|
1073
|
+
value === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME);
|
|
1072
1074
|
};
|
|
1073
1075
|
const isSingleSteer = steerAxle.numberOfAxles === 1;
|
|
1074
1076
|
const isTandemSteer = steerAxle.numberOfAxles === 2;
|
|
1075
1077
|
const isTandemDrive = driveAxle.numberOfAxles === 2;
|
|
1076
1078
|
const isTridemDrive = driveAxle.numberOfAxles === 3;
|
|
1077
|
-
const isTruckTractor = powerUnitSubtype ===
|
|
1078
|
-
const isPickerTruckTractor = powerUnitSubtype ===
|
|
1079
|
-
const isTruckWithPME = powerUnitSubtype ===
|
|
1080
|
-
const isTruckTractorWithPME = powerUnitSubtype ===
|
|
1081
|
-
const isOilfieldBedTruck = powerUnitSubtype ===
|
|
1079
|
+
const isTruckTractor = powerUnitSubtype === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTORS;
|
|
1080
|
+
const isPickerTruckTractor = powerUnitSubtype === power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS;
|
|
1081
|
+
const isTruckWithPME = powerUnitSubtype === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_WITH_PME;
|
|
1082
|
+
const isTruckTractorWithPME = powerUnitSubtype === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME;
|
|
1083
|
+
const isOilfieldBedTruck = powerUnitSubtype === power_unit_codes_1.POWER_UNIT_CODES.OIL_AND_GAS_BED_TRUCKS;
|
|
1082
1084
|
const wheelbase = isSingleSteer
|
|
1083
1085
|
? driveAxle.interaxleSpacing + driveAxle.axleSpread / 2
|
|
1084
1086
|
: steerAxle.axleSpread / 2 +
|
|
@@ -1098,7 +1100,7 @@ function CheckWheelbaseLegalLimits(_policy, vehicleConfiguration, axleConfigurat
|
|
|
1098
1100
|
const hasTrailer = vehicleConfiguration.length > 1;
|
|
1099
1101
|
const hasDisallowedTrailer = vehicleConfiguration
|
|
1100
1102
|
.slice(1)
|
|
1101
|
-
.some((vehicleType) => !(0,
|
|
1103
|
+
.some((vehicleType) => !(0, semi_trailer_codes_1.isSemiTrailerType)(vehicleType));
|
|
1102
1104
|
return [
|
|
1103
1105
|
Object.assign(Object.assign({}, resultBase), { result: hasDisallowedTrailer
|
|
1104
1106
|
? enum_1.PolicyCheckResultType.Fail
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import { Engine } from 'json-rules-engine';
|
|
1
|
+
import { Engine, EngineResult, Event } from 'json-rules-engine';
|
|
2
2
|
import { Policy } from 'onroute-policy-engine';
|
|
3
|
+
/** This returns the "Event", eg the axleCalcViolations event, in the _current-config.json. Helps
|
|
4
|
+
* identify an object like this from the JSON and return it for in-memory modification
|
|
5
|
+
*
|
|
6
|
+
* This is the structure of the object we retrieve with this function
|
|
7
|
+
* "conditions": {
|
|
8
|
+
* "not": {
|
|
9
|
+
* "fact": "axleCalcViolations",
|
|
10
|
+
* "operator": "isEmptyArray",
|
|
11
|
+
* "value": true
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export declare function getSuccessfulEventByFact(engineResult: EngineResult, fact: string): Event | undefined;
|
|
3
15
|
/**
|
|
4
16
|
* Creates a json-rules-engine Engine object for each permit type specified in
|
|
5
17
|
* the policy definition, added to a Map. All rules specific to each permit type
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSuccessfulEventByFact = getSuccessfulEventByFact;
|
|
3
4
|
exports.getRulesEngines = getRulesEngines;
|
|
4
5
|
const json_rules_engine_1 = require("json-rules-engine");
|
|
5
6
|
const custom_operators_1 = require("../rule-operator/custom-operators");
|
|
@@ -19,6 +20,23 @@ function getEngine(policyDefinition) {
|
|
|
19
20
|
policyDefinition.commonRules.forEach((r) => engine.addRule(r));
|
|
20
21
|
return engine;
|
|
21
22
|
}
|
|
23
|
+
/** This returns the "Event", eg the axleCalcViolations event, in the _current-config.json. Helps
|
|
24
|
+
* identify an object like this from the JSON and return it for in-memory modification
|
|
25
|
+
*
|
|
26
|
+
* This is the structure of the object we retrieve with this function
|
|
27
|
+
* "conditions": {
|
|
28
|
+
* "not": {
|
|
29
|
+
* "fact": "axleCalcViolations",
|
|
30
|
+
* "operator": "isEmptyArray",
|
|
31
|
+
* "value": true
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
function getSuccessfulEventByFact(engineResult, fact) {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = engineResult.results.find(({ conditions }) => 'not' in conditions &&
|
|
37
|
+
'fact' in conditions.not &&
|
|
38
|
+
conditions.not.fact === fact)) === null || _a === void 0 ? void 0 : _a.event;
|
|
39
|
+
}
|
|
22
40
|
/**
|
|
23
41
|
* Creates a json-rules-engine Engine object for each permit type specified in
|
|
24
42
|
* the policy definition, added to a Map. All rules specific to each permit type
|
|
@@ -23,7 +23,7 @@ export declare function filterVehiclesByType(vehicleList: Array<string>, vehicle
|
|
|
23
23
|
* vehicle configuration in the order: [powerUnit, trailer1, trailer2, ...].
|
|
24
24
|
*
|
|
25
25
|
* @param vehicleDetails - The vehicle details containing power unit information including
|
|
26
|
-
* the vehicle subtype (e.g.,
|
|
26
|
+
* the vehicle subtype (e.g., POWER_UNIT_CODES.TRUCK_TRACTORS for truck-tractor)
|
|
27
27
|
* @param vehicleConfiguration - The vehicle configuration containing trailer information
|
|
28
28
|
* and other vehicle configuration details
|
|
29
29
|
* @returns An array of vehicle type identifiers representing the complete vehicle configuration.
|
|
@@ -33,29 +33,29 @@ export declare function filterVehiclesByType(vehicleList: Array<string>, vehicle
|
|
|
33
33
|
* @example
|
|
34
34
|
* // For a truck-tractor with a semi-trailer
|
|
35
35
|
* const config = getSimplifiedVehicleConfigurationHelper(
|
|
36
|
-
* { vehicleSubType:
|
|
37
|
-
* { trailers: [{ vehicleSubType:
|
|
36
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
37
|
+
* { trailers: [{ vehicleSubType: TRAILER_CODES.SEMI_TRAILERS }] }
|
|
38
38
|
* );
|
|
39
|
-
* // Returns: [
|
|
39
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS]
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
42
|
* // For a single power unit with no trailers
|
|
43
43
|
* const config = getSimplifiedVehicleConfigurationHelper(
|
|
44
|
-
* { vehicleSubType:
|
|
44
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
45
45
|
* { trailers: [] }
|
|
46
46
|
* );
|
|
47
|
-
* // Returns: [
|
|
47
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS]
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
50
|
* // For a power unit with multiple trailers
|
|
51
51
|
* const config = getSimplifiedVehicleConfigurationHelper(
|
|
52
|
-
* { vehicleSubType:
|
|
52
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
53
53
|
* { trailers: [
|
|
54
|
-
* { vehicleSubType:
|
|
55
|
-
* { vehicleSubType:
|
|
54
|
+
* { vehicleSubType: TRAILER_CODES.SEMI_TRAILERS },
|
|
55
|
+
* { vehicleSubType: TRAILER_CODES.BOOSTER }
|
|
56
56
|
* ]}
|
|
57
57
|
* );
|
|
58
|
-
* // Returns: [
|
|
58
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS, TRAILER_CODES.BOOSTER]
|
|
59
59
|
*/
|
|
60
60
|
export declare function getSimplifiedVehicleConfigurationHelper(vehicleDetails: PermitVehicleDetails, vehicleConfiguration: VehicleConfiguration): string[];
|
|
61
61
|
/**
|
|
@@ -67,7 +67,7 @@ function filterVehiclesByType(vehicleList, vehicleTypes, type) {
|
|
|
67
67
|
* vehicle configuration in the order: [powerUnit, trailer1, trailer2, ...].
|
|
68
68
|
*
|
|
69
69
|
* @param vehicleDetails - The vehicle details containing power unit information including
|
|
70
|
-
* the vehicle subtype (e.g.,
|
|
70
|
+
* the vehicle subtype (e.g., POWER_UNIT_CODES.TRUCK_TRACTORS for truck-tractor)
|
|
71
71
|
* @param vehicleConfiguration - The vehicle configuration containing trailer information
|
|
72
72
|
* and other vehicle configuration details
|
|
73
73
|
* @returns An array of vehicle type identifiers representing the complete vehicle configuration.
|
|
@@ -77,29 +77,29 @@ function filterVehiclesByType(vehicleList, vehicleTypes, type) {
|
|
|
77
77
|
* @example
|
|
78
78
|
* // For a truck-tractor with a semi-trailer
|
|
79
79
|
* const config = getSimplifiedVehicleConfigurationHelper(
|
|
80
|
-
* { vehicleSubType:
|
|
81
|
-
* { trailers: [{ vehicleSubType:
|
|
80
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
81
|
+
* { trailers: [{ vehicleSubType: TRAILER_CODES.SEMI_TRAILERS }] }
|
|
82
82
|
* );
|
|
83
|
-
* // Returns: [
|
|
83
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS]
|
|
84
84
|
*
|
|
85
85
|
* @example
|
|
86
86
|
* // For a single power unit with no trailers
|
|
87
87
|
* const config = getSimplifiedVehicleConfigurationHelper(
|
|
88
|
-
* { vehicleSubType:
|
|
88
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
89
89
|
* { trailers: [] }
|
|
90
90
|
* );
|
|
91
|
-
* // Returns: [
|
|
91
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS]
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
94
|
* // For a power unit with multiple trailers
|
|
95
95
|
* const config = getSimplifiedVehicleConfigurationHelper(
|
|
96
|
-
* { vehicleSubType:
|
|
96
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
97
97
|
* { trailers: [
|
|
98
|
-
* { vehicleSubType:
|
|
99
|
-
* { vehicleSubType:
|
|
98
|
+
* { vehicleSubType: TRAILER_CODES.SEMI_TRAILERS },
|
|
99
|
+
* { vehicleSubType: TRAILER_CODES.BOOSTER }
|
|
100
100
|
* ]}
|
|
101
101
|
* );
|
|
102
|
-
* // Returns: [
|
|
102
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS, TRAILER_CODES.BOOSTER]
|
|
103
103
|
*/
|
|
104
104
|
function getSimplifiedVehicleConfigurationHelper(vehicleDetails, vehicleConfiguration) {
|
|
105
105
|
// Retrieve the power unit type from vehicle details
|
package/dist/policy-engine.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export declare class Policy {
|
|
|
196
196
|
*
|
|
197
197
|
* @param vehicleConfiguration Array of vehicle type identifiers representing the vehicle configuration.
|
|
198
198
|
* The first element should be a power unit type, followed by trailer types.
|
|
199
|
-
* Example: [
|
|
199
|
+
* Example: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS] for a truck tractor with semi-trailer.
|
|
200
200
|
* @param axleConfiguration Array of axle configurations corresponding to each vehicle in the configuration.
|
|
201
201
|
* Each axle configuration contains details like number of axles, spacing, tire count, etc.
|
|
202
202
|
* The length should match the vehicleConfiguration array plus one (since the first
|
|
@@ -210,7 +210,7 @@ export declare class Policy {
|
|
|
210
210
|
* @example
|
|
211
211
|
* // For a truck-tractor with 2-axle steer, 3-axle drive, and a 3-axle semi-trailer
|
|
212
212
|
* const results = policy.runAxleCalculation(
|
|
213
|
-
* [
|
|
213
|
+
* [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS],
|
|
214
214
|
* [
|
|
215
215
|
* { numberOfAxles: 2, axleSpread: 1.8, numberOfTires: 4 },
|
|
216
216
|
* { numberOfAxles: 3, axleSpread: 4.2, numberOfTires: 12 },
|
|
@@ -299,7 +299,7 @@ export declare class Policy {
|
|
|
299
299
|
*
|
|
300
300
|
* @example
|
|
301
301
|
* // For a truck-tractor with 2-axle steer, 3-axle drive, and a 3-axle semi-trailer
|
|
302
|
-
* const code = policy.getVehicleDisplayCode([
|
|
302
|
+
* const code = policy.getVehicleDisplayCode([POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
303
303
|
* { numberOfAxles: 2, axleSpread: 1.8, ... },
|
|
304
304
|
* { numberOfAxles: 3, axleSpread: 4.2, ... },
|
|
305
305
|
* { numberOfAxles: 3, axleSpread: 3.0, ... }
|
|
@@ -318,7 +318,7 @@ export declare class Policy {
|
|
|
318
318
|
* vehicle configuration in the order: [powerUnit, trailer1, trailer2, ...].
|
|
319
319
|
*
|
|
320
320
|
* @param vehicleDetails - The vehicle details containing power unit information including
|
|
321
|
-
* the vehicle subtype (e.g.,
|
|
321
|
+
* the vehicle subtype (e.g., POWER_UNIT_CODES.TRUCK_TRACTORS for truck-tractor)
|
|
322
322
|
* @param vehicleConfiguration - The vehicle configuration containing trailer information
|
|
323
323
|
* and other vehicle configuration details
|
|
324
324
|
* @returns An array of vehicle type identifiers representing the complete vehicle configuration.
|
|
@@ -328,18 +328,18 @@ export declare class Policy {
|
|
|
328
328
|
* @example
|
|
329
329
|
* // For a truck-tractor with a semi-trailer
|
|
330
330
|
* const config = policy.getSimplifiedVehicleConfiguration(
|
|
331
|
-
* { vehicleSubType:
|
|
332
|
-
* { trailers: [{ vehicleSubType:
|
|
331
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
332
|
+
* { trailers: [{ vehicleSubType: TRAILER_CODES.SEMI_TRAILERS }] }
|
|
333
333
|
* );
|
|
334
|
-
* // Returns: [
|
|
334
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS]
|
|
335
335
|
*
|
|
336
336
|
* @example
|
|
337
337
|
* // For a single power unit with no trailers
|
|
338
338
|
* const config = policy.getSimplifiedVehicleConfiguration(
|
|
339
|
-
* { vehicleSubType:
|
|
339
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
340
340
|
* { trailers: [] }
|
|
341
341
|
* );
|
|
342
|
-
* // Returns: [
|
|
342
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS]
|
|
343
343
|
*/
|
|
344
344
|
getSimplifiedVehicleConfiguration(vehicleDetails: PermitVehicleDetails, vehicleConfiguration: VehicleConfiguration): string[];
|
|
345
345
|
/**
|
package/dist/policy-engine.js
CHANGED
|
@@ -23,6 +23,7 @@ const display_code_helper_1 = require("./helper/display-code-helper");
|
|
|
23
23
|
const policy_check_helper_1 = require("./helper/policy-check.helper");
|
|
24
24
|
const cost_1 = require("./constants/cost");
|
|
25
25
|
const overload_helper_1 = require("./helper/overload.helper");
|
|
26
|
+
const permit_codes_1 = require("./constants/permit-codes");
|
|
26
27
|
/** Class representing commercial vehicle policy. */
|
|
27
28
|
class Policy {
|
|
28
29
|
/**
|
|
@@ -78,9 +79,13 @@ class Policy {
|
|
|
78
79
|
(0, facts_helper_1.addRuntimeFacts)(engine, this);
|
|
79
80
|
// Run the json-rules-engine against the permit facts
|
|
80
81
|
const engineResult = await engine.run(permit);
|
|
82
|
+
const axleCalculationEvent = (0, rules_engine_helper_1.getSuccessfulEventByFact)(engineResult, enum_1.PolicyFacts.AxleCalcViolations);
|
|
83
|
+
if (axleCalculationEvent === null || axleCalculationEvent === void 0 ? void 0 : axleCalculationEvent.params) {
|
|
84
|
+
axleCalculationEvent.params.id = enum_1.ValidationResultId.AxleWeightSpacing;
|
|
85
|
+
}
|
|
81
86
|
// Wrap the json-rules-engine result in a ValidationResult object
|
|
82
87
|
const validationResults = new validation_results_1.ValidationResults(engineResult);
|
|
83
|
-
const shouldIncludeAxleCalculationResults = permit.permitType ===
|
|
88
|
+
const shouldIncludeAxleCalculationResults = permit.permitType === permit_codes_1.PERMIT_CODES.SINGLE_TRIP_OVERWEIGHT &&
|
|
84
89
|
((_b = (_a = permit.permitData) === null || _a === void 0 ? void 0 : _a.vehicleConfiguration) === null || _b === void 0 ? void 0 : _b.axleConfiguration);
|
|
85
90
|
if (shouldIncludeAxleCalculationResults) {
|
|
86
91
|
validationResults.axleCalculationResults =
|
|
@@ -94,7 +99,7 @@ class Policy {
|
|
|
94
99
|
// has a no fee flag set.
|
|
95
100
|
if ((_d = this.specialAuthorizations) === null || _d === void 0 ? void 0 : _d.noFeeType) {
|
|
96
101
|
const originalPermitCost = validationResults === null || validationResults === void 0 ? void 0 : validationResults.cost.reduce((accumulator, { cost }) => accumulator + (cost !== null && cost !== void 0 ? cost : 0), 0);
|
|
97
|
-
if (permit.permitType !==
|
|
102
|
+
if (permit.permitType !== permit_codes_1.PERMIT_CODES.EMPTY_SINGLE_TRIP_OVER_LENGTH_27_5) {
|
|
98
103
|
// Clear the cost array and replace with zero cost
|
|
99
104
|
validationResults.cost.length = 0;
|
|
100
105
|
const newPermitCostResult = new validation_result_1.ValidationResult(enum_1.ValidationResultType.Cost, enum_1.ValidationResultCode.CostValue, cost_1.DEFAULT_COST_DESCRIPTION);
|
|
@@ -687,7 +692,7 @@ class Policy {
|
|
|
687
692
|
*
|
|
688
693
|
* @param vehicleConfiguration Array of vehicle type identifiers representing the vehicle configuration.
|
|
689
694
|
* The first element should be a power unit type, followed by trailer types.
|
|
690
|
-
* Example: [
|
|
695
|
+
* Example: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS] for a truck tractor with semi-trailer.
|
|
691
696
|
* @param axleConfiguration Array of axle configurations corresponding to each vehicle in the configuration.
|
|
692
697
|
* Each axle configuration contains details like number of axles, spacing, tire count, etc.
|
|
693
698
|
* The length should match the vehicleConfiguration array plus one (since the first
|
|
@@ -701,7 +706,7 @@ class Policy {
|
|
|
701
706
|
* @example
|
|
702
707
|
* // For a truck-tractor with 2-axle steer, 3-axle drive, and a 3-axle semi-trailer
|
|
703
708
|
* const results = policy.runAxleCalculation(
|
|
704
|
-
* [
|
|
709
|
+
* [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS],
|
|
705
710
|
* [
|
|
706
711
|
* { numberOfAxles: 2, axleSpread: 1.8, numberOfTires: 4 },
|
|
707
712
|
* { numberOfAxles: 3, axleSpread: 4.2, numberOfTires: 12 },
|
|
@@ -862,7 +867,7 @@ class Policy {
|
|
|
862
867
|
*
|
|
863
868
|
* @example
|
|
864
869
|
* // For a truck-tractor with 2-axle steer, 3-axle drive, and a 3-axle semi-trailer
|
|
865
|
-
* const code = policy.getVehicleDisplayCode([
|
|
870
|
+
* const code = policy.getVehicleDisplayCode([POWER_UNIT_CODES.TRUCK_TRACTORS], [
|
|
866
871
|
* { numberOfAxles: 2, axleSpread: 1.8, ... },
|
|
867
872
|
* { numberOfAxles: 3, axleSpread: 4.2, ... },
|
|
868
873
|
* { numberOfAxles: 3, axleSpread: 3.0, ... }
|
|
@@ -883,7 +888,7 @@ class Policy {
|
|
|
883
888
|
* vehicle configuration in the order: [powerUnit, trailer1, trailer2, ...].
|
|
884
889
|
*
|
|
885
890
|
* @param vehicleDetails - The vehicle details containing power unit information including
|
|
886
|
-
* the vehicle subtype (e.g.,
|
|
891
|
+
* the vehicle subtype (e.g., POWER_UNIT_CODES.TRUCK_TRACTORS for truck-tractor)
|
|
887
892
|
* @param vehicleConfiguration - The vehicle configuration containing trailer information
|
|
888
893
|
* and other vehicle configuration details
|
|
889
894
|
* @returns An array of vehicle type identifiers representing the complete vehicle configuration.
|
|
@@ -893,18 +898,18 @@ class Policy {
|
|
|
893
898
|
* @example
|
|
894
899
|
* // For a truck-tractor with a semi-trailer
|
|
895
900
|
* const config = policy.getSimplifiedVehicleConfiguration(
|
|
896
|
-
* { vehicleSubType:
|
|
897
|
-
* { trailers: [{ vehicleSubType:
|
|
901
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
902
|
+
* { trailers: [{ vehicleSubType: TRAILER_CODES.SEMI_TRAILERS }] }
|
|
898
903
|
* );
|
|
899
|
-
* // Returns: [
|
|
904
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS]
|
|
900
905
|
*
|
|
901
906
|
* @example
|
|
902
907
|
* // For a single power unit with no trailers
|
|
903
908
|
* const config = policy.getSimplifiedVehicleConfiguration(
|
|
904
|
-
* { vehicleSubType:
|
|
909
|
+
* { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
|
|
905
910
|
* { trailers: [] }
|
|
906
911
|
* );
|
|
907
|
-
* // Returns: [
|
|
912
|
+
* // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS]
|
|
908
913
|
*/
|
|
909
914
|
getSimplifiedVehicleConfiguration(vehicleDetails, vehicleConfiguration) {
|
|
910
915
|
return (0, vehicles_helper_1.getSimplifiedVehicleConfigurationHelper)(vehicleDetails, vehicleConfiguration);
|
package/dist/types/facts.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type PermitFacts = {
|
|
|
17
17
|
vehicleIdentificationNumber?: string;
|
|
18
18
|
/** Vehicle license plate number */
|
|
19
19
|
vehiclePlate?: string;
|
|
20
|
-
/** Type of vehicle permitted (primary vehicle) (e.g.,
|
|
20
|
+
/** Type of vehicle permitted (primary vehicle) (e.g., POWER_UNIT_CODES.TRUCK_TRACTORS) */
|
|
21
21
|
vehicleType?: string;
|
|
22
22
|
/** Additional application data as a generic object */
|
|
23
23
|
app?: object;
|
|
@@ -67,7 +67,7 @@ export type PermitVehicleDetails = {
|
|
|
67
67
|
provinceCode: string;
|
|
68
68
|
/** Type of vehicle (e.g., 'powerUnit', 'trailer') */
|
|
69
69
|
vehicleType: string;
|
|
70
|
-
/** Subtype of vehicle (e.g.,
|
|
70
|
+
/** Subtype of vehicle (e.g., POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS) */
|
|
71
71
|
vehicleSubType: string;
|
|
72
72
|
/** Licensed Gross Vehicle Weight in kilograms (optional) */
|
|
73
73
|
licensedGVW?: number | null;
|
|
@@ -15,6 +15,8 @@ export declare class ValidationResult {
|
|
|
15
15
|
type: string;
|
|
16
16
|
code: string;
|
|
17
17
|
message: string;
|
|
18
|
+
/** Stable identifier for validation classes requiring specific processing. */
|
|
19
|
+
id?: string;
|
|
18
20
|
fieldReference?: string;
|
|
19
21
|
cost?: number;
|
|
20
22
|
details?: Array<string>;
|
|
@@ -36,15 +36,16 @@ class ValidationResults {
|
|
|
36
36
|
this.cost = [];
|
|
37
37
|
if (engineResult) {
|
|
38
38
|
engineResult.events.forEach((e) => {
|
|
39
|
-
var _a, _b, _c, _d, _e;
|
|
40
|
-
var
|
|
41
|
-
const message = (
|
|
42
|
-
const code = (
|
|
43
|
-
const type = (
|
|
39
|
+
var _a, _b, _c, _d, _e, _f;
|
|
40
|
+
var _g, _h, _j;
|
|
41
|
+
const message = (_g = (_a = e.params) === null || _a === void 0 ? void 0 : _a.message) !== null && _g !== void 0 ? _g : `Unknown message: params=${JSON.stringify(e.params)}`;
|
|
42
|
+
const code = (_h = (_b = e.params) === null || _b === void 0 ? void 0 : _b.code) !== null && _h !== void 0 ? _h : validation_result_code_1.ValidationResultCode.GeneralResult;
|
|
43
|
+
const type = (_j = e.type) !== null && _j !== void 0 ? _j : validation_result_type_1.ValidationResultType.Violation.toString();
|
|
44
44
|
const result = new validation_result_1.ValidationResult(type, code, message);
|
|
45
|
-
result.
|
|
46
|
-
result.
|
|
47
|
-
result.
|
|
45
|
+
result.id = (_c = e.params) === null || _c === void 0 ? void 0 : _c.id;
|
|
46
|
+
result.fieldReference = (_d = e.params) === null || _d === void 0 ? void 0 : _d.fieldReference;
|
|
47
|
+
result.cost = (_e = e.params) === null || _e === void 0 ? void 0 : _e.cost;
|
|
48
|
+
result.details = (_f = e.params) === null || _f === void 0 ? void 0 : _f.details;
|
|
48
49
|
switch (type) {
|
|
49
50
|
case validation_result_type_1.ValidationResultType.Violation:
|
|
50
51
|
this.violations.push(result);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
1
|
+
export declare const version = "v2.30.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SEMI_TRAILER_TYPES = void 0;
|
|
4
|
-
exports.isSemiTrailerType = isSemiTrailerType;
|
|
5
|
-
exports.SEMI_TRAILER_TYPES = new Set([
|
|
6
|
-
// Expando Semi-Trailers
|
|
7
|
-
'EXPANDO',
|
|
8
|
-
// Fixed Equipment - Conveyors
|
|
9
|
-
'FECVYRX',
|
|
10
|
-
// Fixed Equipment - Counter Flow Asphalt Drum Mixers
|
|
11
|
-
'FEDRMMX',
|
|
12
|
-
// Fixed Equipment - Portable Asphalt Baghouses
|
|
13
|
-
'FEBGHSE',
|
|
14
|
-
// Fixed Equipment - Semi-Trailers
|
|
15
|
-
'FESEMTR',
|
|
16
|
-
// Fixed Equipment - Wheeler Semi-Trailers
|
|
17
|
-
'FEWHELR',
|
|
18
|
-
// Semi-Trailers - Hiboys/Expandos
|
|
19
|
-
'HIBOEXP',
|
|
20
|
-
// Semi-Trailers - Hiboys/Flat Decks
|
|
21
|
-
'HIBOFLT',
|
|
22
|
-
// Oil and Gas - Oversize Oilfield Flat Deck Semi-Trailers
|
|
23
|
-
'OGOSFDT',
|
|
24
|
-
// Platform Trailer
|
|
25
|
-
'PLATFRM',
|
|
26
|
-
// Platform Trailers - Wheelers
|
|
27
|
-
'PLATWHE',
|
|
28
|
-
// Pole Trailers
|
|
29
|
-
'POLETRL',
|
|
30
|
-
// Ready Mix Concrete Pump Semi-Trailers
|
|
31
|
-
'REDIMIX',
|
|
32
|
-
// Semi-Trailers
|
|
33
|
-
'SEMITRL',
|
|
34
|
-
// Semi-Trailers - Single Drop, Double Drop, Step Decks, Lowbed, Expandos, etc.
|
|
35
|
-
'STSDBDK',
|
|
36
|
-
// Semi-Trailers with Crane
|
|
37
|
-
'STCRANE',
|
|
38
|
-
// Semi-Trailers - Spread Tandem
|
|
39
|
-
'STWDTAN',
|
|
40
|
-
// Semi-Trailers - Wheelers
|
|
41
|
-
'STWHELR',
|
|
42
|
-
// Semi-Trailers - Wide Wheelers
|
|
43
|
-
'STWIDWH',
|
|
44
|
-
]);
|
|
45
|
-
function isSemiTrailerType(vehicleType) {
|
|
46
|
-
return exports.SEMI_TRAILER_TYPES.has(vehicleType);
|
|
47
|
-
}
|