onroute-policy-engine 2.29.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.
@@ -0,0 +1,8 @@
1
+ export declare const COMMODITY_CODES: {
2
+ readonly BRIDGE_BEAMS: 'BRGBEAM';
3
+ readonly EMPTY: 'EMPTYXX';
4
+ readonly LAMINATED_BEAMS: 'LAMBEAM';
5
+ readonly NON_REDUCIBLE_LOADS: 'NONREDU';
6
+ readonly NONE: 'XXXXXXX';
7
+ readonly REDUCIBLE_LOADS: 'REDUCBL';
8
+ };
@@ -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,3 @@
1
+ import { TrailerCode } from './trailer-codes';
2
+ export declare const SEMI_TRAILER_CODES: Set<TrailerCode>;
3
+ export declare function isSemiTrailerType(vehicleType: string): boolean;
@@ -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
+ };
@@ -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 semi_trailer_types_1 = require("../constants/semi-trailer-types");
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 === 'STWDTAN';
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 === 'PONYTRL';
27
- const isPoleTrailer = vehicleType === 'POLETRL';
28
- const isOilfieldBedTruck = vehicleType === 'OGBEDTK';
29
- const isPowerUnitTruckTractor = vehicleConfiguration[0] === 'TRKTRAC';
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, semi_trailer_types_1.isSemiTrailerType)(vehicleType)) {
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, ['CONCRET'], [
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, ['TRKTRAC', 'STROPRT'], [
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, ['CONCRET'], [
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, ['TRKTRAC', 'STROPRT'], [
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, ['TRKTRAC', 'SEMI'], [
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, ['TRKTRAC', 'SEMITRL'], [
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, ['TRKTRAC'], [
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, ['TRKTRAC'], [
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, ['TRKTRAC', 'SEMITRL'], [
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, ['TRKTRAC'], [
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
- * ['CONCRET'],
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, ['TRKTRAC'], [
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, ['TRKTRAC'], [
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, ['TRKTRAC'], [
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, ['TRKTRAC'], [
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 semi_trailer_types_1 = require("../constants/semi-trailer-types");
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 === 'REGTRCK' ||
84
- vehicleType === 'TRKTRAC' ||
85
- vehicleType === 'TRCKPME' ||
86
- vehicleType === 'TRACPME');
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 === 'TRCKPME' || vehicleType === 'TRACPME';
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 === 'REGTRCK'
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] === 'TRKTRAC' &&
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, ['TRKTRAC', 'SEMITRL'], [
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, ['TRKTRAC'], [
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, ['TRKTRAC'], [
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, ['TRKTRAC', 'SEMITRL'], [
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, ['TRKTRAC'], [
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
- * ['CONCRET'],
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, ['TRKTRAC'], [
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] !== 'PICKRTT' ||
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('PICKRTT', 23);
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, ['TRKTRAC'], [
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 === 'REGTRCK' ||
756
- value === 'TRKTRAC' ||
757
- value === 'PICKRTT' ||
758
- value === 'TRCKPME' ||
759
- value === 'TRACPME');
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, ['TRKTRAC'], [
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, ['TRKTRAC'], [
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 === 'RBTRLDR';
843
- const isAllTerrainCrane = powerUnitType === 'CRANEAT';
844
- const isMobileCrane = powerUnitType === 'CRANEMB';
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 === 'REGTRCK' ||
1067
- value === 'TRKTRAC' ||
1068
- value === 'PICKRTT' ||
1069
- value === 'OGBEDTK' ||
1070
- value === 'TRCKPME' ||
1071
- value === 'TRACPME');
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 === 'TRKTRAC';
1078
- const isPickerTruckTractor = powerUnitSubtype === 'PICKRTT';
1079
- const isTruckWithPME = powerUnitSubtype === 'TRCKPME';
1080
- const isTruckTractorWithPME = powerUnitSubtype === 'TRACPME';
1081
- const isOilfieldBedTruck = powerUnitSubtype === 'OGBEDTK';
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, semi_trailer_types_1.isSemiTrailerType)(vehicleType));
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
@@ -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., 'TRKTRAC' for truck-tractor)
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: 'TRKTRAC', ... },
37
- * { trailers: [{ vehicleSubType: 'SEMITRL' }] }
36
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
37
+ * { trailers: [{ vehicleSubType: TRAILER_CODES.SEMI_TRAILERS }] }
38
38
  * );
39
- * // Returns: ['TRKTRAC', 'SEMITRL']
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: 'TRKTRAC', ... },
44
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
45
45
  * { trailers: [] }
46
46
  * );
47
- * // Returns: ['TRKTRAC']
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: 'TRKTRAC', ... },
52
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
53
53
  * { trailers: [
54
- * { vehicleSubType: 'SEMITRL' },
55
- * { vehicleSubType: 'BOOSTER' }
54
+ * { vehicleSubType: TRAILER_CODES.SEMI_TRAILERS },
55
+ * { vehicleSubType: TRAILER_CODES.BOOSTER }
56
56
  * ]}
57
57
  * );
58
- * // Returns: ['TRKTRAC', 'SEMITRL', 'BOOSTER']
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., 'TRKTRAC' for truck-tractor)
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: 'TRKTRAC', ... },
81
- * { trailers: [{ vehicleSubType: 'SEMITRL' }] }
80
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
81
+ * { trailers: [{ vehicleSubType: TRAILER_CODES.SEMI_TRAILERS }] }
82
82
  * );
83
- * // Returns: ['TRKTRAC', 'SEMITRL']
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: 'TRKTRAC', ... },
88
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
89
89
  * { trailers: [] }
90
90
  * );
91
- * // Returns: ['TRKTRAC']
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: 'TRKTRAC', ... },
96
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
97
97
  * { trailers: [
98
- * { vehicleSubType: 'SEMITRL' },
99
- * { vehicleSubType: 'BOOSTER' }
98
+ * { vehicleSubType: TRAILER_CODES.SEMI_TRAILERS },
99
+ * { vehicleSubType: TRAILER_CODES.BOOSTER }
100
100
  * ]}
101
101
  * );
102
- * // Returns: ['TRKTRAC', 'SEMITRL', 'BOOSTER']
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
@@ -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: ['TRKTRAC', 'SEMITRL'] for a truck tractor with semi-trailer.
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
- * ['TRKTRAC', 'SEMITRL'],
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(['TRKTRAC'], [
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., 'TRKTRAC' for truck-tractor)
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: 'TRKTRAC', ... },
332
- * { trailers: [{ vehicleSubType: 'SEMITRL' }] }
331
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
332
+ * { trailers: [{ vehicleSubType: TRAILER_CODES.SEMI_TRAILERS }] }
333
333
  * );
334
- * // Returns: ['TRKTRAC', 'SEMITRL']
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: 'TRKTRAC', ... },
339
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
340
340
  * { trailers: [] }
341
341
  * );
342
- * // Returns: ['TRKTRAC']
342
+ * // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS]
343
343
  */
344
344
  getSimplifiedVehicleConfiguration(vehicleDetails: PermitVehicleDetails, vehicleConfiguration: VehicleConfiguration): string[];
345
345
  /**
@@ -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
  /**
@@ -84,7 +85,7 @@ class Policy {
84
85
  }
85
86
  // Wrap the json-rules-engine result in a ValidationResult object
86
87
  const validationResults = new validation_results_1.ValidationResults(engineResult);
87
- const shouldIncludeAxleCalculationResults = permit.permitType === 'STOW' &&
88
+ const shouldIncludeAxleCalculationResults = permit.permitType === permit_codes_1.PERMIT_CODES.SINGLE_TRIP_OVERWEIGHT &&
88
89
  ((_b = (_a = permit.permitData) === null || _a === void 0 ? void 0 : _a.vehicleConfiguration) === null || _b === void 0 ? void 0 : _b.axleConfiguration);
89
90
  if (shouldIncludeAxleCalculationResults) {
90
91
  validationResults.axleCalculationResults =
@@ -98,7 +99,7 @@ class Policy {
98
99
  // has a no fee flag set.
99
100
  if ((_d = this.specialAuthorizations) === null || _d === void 0 ? void 0 : _d.noFeeType) {
100
101
  const originalPermitCost = validationResults === null || validationResults === void 0 ? void 0 : validationResults.cost.reduce((accumulator, { cost }) => accumulator + (cost !== null && cost !== void 0 ? cost : 0), 0);
101
- if (permit.permitType !== 'STWSE') {
102
+ if (permit.permitType !== permit_codes_1.PERMIT_CODES.EMPTY_SINGLE_TRIP_OVER_LENGTH_27_5) {
102
103
  // Clear the cost array and replace with zero cost
103
104
  validationResults.cost.length = 0;
104
105
  const newPermitCostResult = new validation_result_1.ValidationResult(enum_1.ValidationResultType.Cost, enum_1.ValidationResultCode.CostValue, cost_1.DEFAULT_COST_DESCRIPTION);
@@ -691,7 +692,7 @@ class Policy {
691
692
  *
692
693
  * @param vehicleConfiguration Array of vehicle type identifiers representing the vehicle configuration.
693
694
  * The first element should be a power unit type, followed by trailer types.
694
- * Example: ['TRKTRAC', 'SEMITRL'] for a truck tractor with semi-trailer.
695
+ * Example: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS] for a truck tractor with semi-trailer.
695
696
  * @param axleConfiguration Array of axle configurations corresponding to each vehicle in the configuration.
696
697
  * Each axle configuration contains details like number of axles, spacing, tire count, etc.
697
698
  * The length should match the vehicleConfiguration array plus one (since the first
@@ -705,7 +706,7 @@ class Policy {
705
706
  * @example
706
707
  * // For a truck-tractor with 2-axle steer, 3-axle drive, and a 3-axle semi-trailer
707
708
  * const results = policy.runAxleCalculation(
708
- * ['TRKTRAC', 'SEMITRL'],
709
+ * [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS],
709
710
  * [
710
711
  * { numberOfAxles: 2, axleSpread: 1.8, numberOfTires: 4 },
711
712
  * { numberOfAxles: 3, axleSpread: 4.2, numberOfTires: 12 },
@@ -866,7 +867,7 @@ class Policy {
866
867
  *
867
868
  * @example
868
869
  * // For a truck-tractor with 2-axle steer, 3-axle drive, and a 3-axle semi-trailer
869
- * const code = policy.getVehicleDisplayCode(['TRKTRAC'], [
870
+ * const code = policy.getVehicleDisplayCode([POWER_UNIT_CODES.TRUCK_TRACTORS], [
870
871
  * { numberOfAxles: 2, axleSpread: 1.8, ... },
871
872
  * { numberOfAxles: 3, axleSpread: 4.2, ... },
872
873
  * { numberOfAxles: 3, axleSpread: 3.0, ... }
@@ -887,7 +888,7 @@ class Policy {
887
888
  * vehicle configuration in the order: [powerUnit, trailer1, trailer2, ...].
888
889
  *
889
890
  * @param vehicleDetails - The vehicle details containing power unit information including
890
- * the vehicle subtype (e.g., 'TRKTRAC' for truck-tractor)
891
+ * the vehicle subtype (e.g., POWER_UNIT_CODES.TRUCK_TRACTORS for truck-tractor)
891
892
  * @param vehicleConfiguration - The vehicle configuration containing trailer information
892
893
  * and other vehicle configuration details
893
894
  * @returns An array of vehicle type identifiers representing the complete vehicle configuration.
@@ -897,18 +898,18 @@ class Policy {
897
898
  * @example
898
899
  * // For a truck-tractor with a semi-trailer
899
900
  * const config = policy.getSimplifiedVehicleConfiguration(
900
- * { vehicleSubType: 'TRKTRAC', ... },
901
- * { trailers: [{ vehicleSubType: 'SEMITRL' }] }
901
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
902
+ * { trailers: [{ vehicleSubType: TRAILER_CODES.SEMI_TRAILERS }] }
902
903
  * );
903
- * // Returns: ['TRKTRAC', 'SEMITRL']
904
+ * // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS, TRAILER_CODES.SEMI_TRAILERS]
904
905
  *
905
906
  * @example
906
907
  * // For a single power unit with no trailers
907
908
  * const config = policy.getSimplifiedVehicleConfiguration(
908
- * { vehicleSubType: 'TRKTRAC', ... },
909
+ * { vehicleSubType: POWER_UNIT_CODES.TRUCK_TRACTORS, ... },
909
910
  * { trailers: [] }
910
911
  * );
911
- * // Returns: ['TRKTRAC']
912
+ * // Returns: [POWER_UNIT_CODES.TRUCK_TRACTORS]
912
913
  */
913
914
  getSimplifiedVehicleConfiguration(vehicleDetails, vehicleConfiguration) {
914
915
  return (0, vehicles_helper_1.getSimplifiedVehicleConfigurationHelper)(vehicleDetails, vehicleConfiguration);
@@ -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., 'TRKTRAC') */
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., 'TRKTRAC', 'SEMITRL') */
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;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "v2.29.0";
1
+ export declare const version = "v2.30.0";
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 = 'v2.29.0';
5
+ exports.version = 'v2.30.0';
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  ],
92
92
  "testEnvironment": "node"
93
93
  },
94
- "version": "v2.29.0"
94
+ "version": "v2.30.0"
95
95
  }
@@ -1,2 +0,0 @@
1
- export declare const SEMI_TRAILER_TYPES: Set<string>;
2
- export declare function isSemiTrailerType(vehicleType: string): boolean;
@@ -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
- }