onroute-policy-engine 2.1.0 → 2.2.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/.github/workflows/pipeline.yml +25 -6
- package/dist/enum/custom-operator.d.ts +6 -0
- package/dist/enum/custom-operator.js +10 -0
- package/dist/enum/facts.d.ts +8 -4
- package/dist/enum/facts.js +8 -4
- package/dist/enum/index.d.ts +2 -0
- package/dist/enum/index.js +6 -1
- package/dist/enum/permit-app-info.d.ts +8 -5
- package/dist/enum/permit-app-info.js +8 -5
- package/dist/enum/policy-check.d.ts +11 -0
- package/dist/enum/policy-check.js +16 -0
- package/dist/enum/validation-result-code.d.ts +1 -0
- package/dist/enum/validation-result-code.js +1 -0
- package/dist/helper/dimensions.helper.js +7 -3
- package/dist/helper/display-code-helper.d.ts +42 -0
- package/dist/helper/display-code-helper.js +73 -1
- package/dist/helper/facts.helper.js +64 -0
- package/dist/helper/policy-check.helper.d.ts +183 -0
- package/dist/helper/policy-check.helper.js +337 -0
- package/dist/helper/vehicles.helper.d.ts +45 -1
- package/dist/helper/vehicles.helper.js +61 -0
- package/dist/policy-engine.d.ts +95 -1
- package/dist/policy-engine.js +103 -0
- package/dist/rule-operator/custom-operators.d.ts +7 -0
- package/dist/rule-operator/custom-operators.js +57 -3
- package/dist/types/axle-calculation-results.d.ts +49 -0
- package/dist/types/axle-calculation-results.js +8 -0
- package/dist/types/axle-configuration.d.ts +12 -0
- package/dist/types/axle-configuration.js +6 -0
- package/dist/types/bridge-calculation-constants.d.ts +8 -0
- package/dist/types/bridge-calculation-result.d.ts +11 -0
- package/dist/types/commodity.d.ts +10 -0
- package/dist/types/commodity.js +6 -0
- package/dist/types/cost-rule.d.ts +8 -0
- package/dist/types/cost-rule.js +6 -0
- package/dist/types/dimension-modifier.d.ts +27 -0
- package/dist/types/dimension-modifier.js +6 -0
- package/dist/types/display-code-defaults.d.ts +22 -0
- package/dist/types/display-code-defaults.js +6 -0
- package/dist/types/facts.d.ts +14 -0
- package/dist/types/facts.js +6 -0
- package/dist/types/geographic-region.d.ts +10 -0
- package/dist/types/geographic-region.js +6 -0
- package/dist/types/identified-object.d.ts +8 -0
- package/dist/types/identified-object.js +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/permit-application.d.ts +109 -0
- package/dist/types/permit-application.js +6 -0
- package/dist/types/permit-condition.d.ts +18 -0
- package/dist/types/permit-condition.js +6 -0
- package/dist/types/permit-type.d.ts +18 -0
- package/dist/types/permit-type.js +6 -0
- package/dist/types/policy-definition.d.ts +24 -0
- package/dist/types/policy-definition.js +7 -0
- package/dist/types/range-matrix.d.ts +17 -0
- package/dist/types/range-matrix.js +6 -0
- package/dist/types/region-size-override.d.ts +10 -0
- package/dist/types/region-size-override.js +6 -0
- package/dist/types/self-issuable.d.ts +7 -0
- package/dist/types/self-issuable.js +6 -0
- package/dist/types/size-dimension.d.ts +17 -0
- package/dist/types/size-dimension.js +6 -0
- package/dist/types/special-authorizations.d.ts +9 -0
- package/dist/types/special-authorizations.js +6 -0
- package/dist/types/standard-tire-size.d.ts +8 -0
- package/dist/types/standard-tire-size.js +6 -0
- package/dist/types/vehicle-category.d.ts +27 -0
- package/dist/types/vehicle-category.js +6 -0
- package/dist/types/vehicle-type.d.ts +36 -0
- package/dist/types/vehicle-type.js +6 -0
- package/dist/types/vehicle.d.ts +27 -0
- package/dist/types/vehicle.js +6 -0
- package/dist/types/weight-dimension.d.ts +34 -0
- package/dist/types/weight-dimension.js +6 -0
- package/dist/validation-result.d.ts +1 -0
- package/dist/validation-results.js +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/eslint.config.mjs +1 -1
- package/package.json +2 -1
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geographic Region Type
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for geographic regions used in permit routing and validation.
|
|
5
|
+
* Extends IdentifiedObject with optional description for enhanced identification.
|
|
6
|
+
*/
|
|
1
7
|
import { IdentifiedObject } from 'onroute-policy-engine/types';
|
|
8
|
+
/**
|
|
9
|
+
* A geographic region with identification and optional description
|
|
10
|
+
*/
|
|
2
11
|
export type GeographicRegion = IdentifiedObject & {
|
|
12
|
+
/** Optional description of the geographic region */
|
|
3
13
|
description?: string;
|
|
4
14
|
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Geographic Region Type
|
|
4
|
+
*
|
|
5
|
+
* Defines the structure for geographic regions used in permit routing and validation.
|
|
6
|
+
* Extends IdentifiedObject with optional description for enhanced identification.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identified Object Type
|
|
3
|
+
*
|
|
4
|
+
* Base type for objects that require unique identification and naming.
|
|
5
|
+
* Used as a foundation for many other types in the system.
|
|
6
|
+
*/
|
|
1
7
|
export type IdentifiedObject = {
|
|
8
|
+
/** Unique identifier for the object */
|
|
2
9
|
id: string;
|
|
10
|
+
/** Human-readable name for the object */
|
|
3
11
|
name: string;
|
|
4
12
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { AxleCalcResults, PolicyCheckResult, AxleUnitPolicyCheckResult, AxleGroupPolicyCheckResult, } from './axle-calculation-results';
|
|
1
2
|
export { AxleConfiguration } from './axle-configuration';
|
|
2
3
|
export { BridgeCalculationConstants } from './bridge-calculation-constants';
|
|
3
4
|
export { BridgeCalculationResult } from './bridge-calculation-result';
|
|
@@ -1,93 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permit Application Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the complete structure for permit applications including contact details,
|
|
5
|
+
* vehicle information, routing, and configuration data.
|
|
6
|
+
*/
|
|
1
7
|
import { AxleConfiguration } from 'onroute-policy-engine/types';
|
|
8
|
+
/**
|
|
9
|
+
* Mailing address for permit correspondence
|
|
10
|
+
*/
|
|
2
11
|
export type PermitMailingAddress = {
|
|
12
|
+
/** Primary address line */
|
|
3
13
|
addressLine1: string;
|
|
14
|
+
/** Secondary address line (optional) */
|
|
4
15
|
addressLine2?: string | null;
|
|
16
|
+
/** City name */
|
|
5
17
|
city: string;
|
|
18
|
+
/** Province/state code (e.g., 'BC', 'AB') */
|
|
6
19
|
provinceCode: string;
|
|
20
|
+
/** Country code (e.g., 'CA', 'US') */
|
|
7
21
|
countryCode: string;
|
|
22
|
+
/** Postal/zip code */
|
|
8
23
|
postalCode: string;
|
|
9
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Contact information for the permit applicant
|
|
27
|
+
*/
|
|
10
28
|
export type PermitContactDetails = {
|
|
29
|
+
/** Contact's first name */
|
|
11
30
|
firstName: string;
|
|
31
|
+
/** Contact's last name */
|
|
12
32
|
lastName: string;
|
|
33
|
+
/** Primary phone number */
|
|
13
34
|
phone1: string;
|
|
35
|
+
/** Primary phone extension (optional) */
|
|
14
36
|
phone1Extension?: string | null;
|
|
37
|
+
/** Secondary phone number (optional) */
|
|
15
38
|
phone2?: string | null;
|
|
39
|
+
/** Secondary phone extension (optional) */
|
|
16
40
|
phone2Extension?: string | null;
|
|
41
|
+
/** Primary email address */
|
|
17
42
|
email: string;
|
|
43
|
+
/** Additional email address (optional) */
|
|
18
44
|
additionalEmail?: string | null;
|
|
45
|
+
/** Fax number (optional) */
|
|
19
46
|
fax?: string | null;
|
|
20
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* Detailed information about the vehicle in the permit application
|
|
50
|
+
*/
|
|
21
51
|
export type PermitVehicleDetails = {
|
|
52
|
+
/** Internal vehicle identifier (optional) */
|
|
22
53
|
vehicleId?: string | null;
|
|
54
|
+
/** Unit number for fleet vehicles (optional) */
|
|
23
55
|
unitNumber?: string | null;
|
|
56
|
+
/** Vehicle Identification Number */
|
|
24
57
|
vin: string;
|
|
58
|
+
/** License plate number */
|
|
25
59
|
plate: string;
|
|
60
|
+
/** Vehicle make (optional) */
|
|
26
61
|
make?: string | null;
|
|
62
|
+
/** Vehicle model year (optional) */
|
|
27
63
|
year?: number | null;
|
|
64
|
+
/** Country code where vehicle is registered */
|
|
28
65
|
countryCode: string;
|
|
66
|
+
/** Province/state code where vehicle is registered */
|
|
29
67
|
provinceCode: string;
|
|
68
|
+
/** Type of vehicle (e.g., 'powerUnit', 'trailer') */
|
|
30
69
|
vehicleType: string;
|
|
70
|
+
/** Subtype of vehicle (e.g., 'TRKTRAC', 'SEMITRL') */
|
|
31
71
|
vehicleSubType: string;
|
|
72
|
+
/** Licensed Gross Vehicle Weight in kilograms (optional) */
|
|
32
73
|
licensedGVW?: number | null;
|
|
74
|
+
/** Whether to save this vehicle to the inventory (optional) */
|
|
33
75
|
saveVehicle?: boolean | null;
|
|
34
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Commodity information for the permit application
|
|
79
|
+
*/
|
|
35
80
|
export type PermitCommodity = {
|
|
81
|
+
/** Description of the commodity being transported */
|
|
36
82
|
description: string;
|
|
83
|
+
/** Special conditions for the commodity */
|
|
37
84
|
condition: string;
|
|
85
|
+
/** Link to detailed commodity conditions */
|
|
38
86
|
conditionLink: string;
|
|
87
|
+
/** Whether this commodity is selected */
|
|
39
88
|
checked: boolean;
|
|
89
|
+
/** Whether this commodity option is disabled */
|
|
40
90
|
disabled: boolean;
|
|
41
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
* Complete permit data including all application details
|
|
94
|
+
*/
|
|
42
95
|
export type PermitData = {
|
|
96
|
+
/** Company name applying for the permit */
|
|
43
97
|
companyName: string;
|
|
98
|
+
/** Doing Business As name (optional) */
|
|
44
99
|
doingBusinessAs?: string;
|
|
100
|
+
/** Client number for the company */
|
|
45
101
|
clientNumber: string;
|
|
102
|
+
/** Duration of the permit in days */
|
|
46
103
|
permitDuration: number;
|
|
104
|
+
/** Array of commodities being transported */
|
|
47
105
|
commodities: Array<PermitCommodity>;
|
|
106
|
+
/** Contact details for the applicant */
|
|
48
107
|
contactDetails: PermitContactDetails;
|
|
108
|
+
/** Mailing address for correspondence */
|
|
49
109
|
mailingAddress: PermitMailingAddress;
|
|
110
|
+
/** Detailed vehicle information */
|
|
50
111
|
vehicleDetails: PermitVehicleDetails;
|
|
112
|
+
/** Fee summary information (optional) */
|
|
51
113
|
feeSummary?: string | null;
|
|
114
|
+
/** Permit start date (YYYY-MM-DD format) */
|
|
52
115
|
startDate: string;
|
|
116
|
+
/** Permit expiry date (YYYY-MM-DD format, optional) */
|
|
53
117
|
expiryDate?: string | null;
|
|
118
|
+
/** Selected permitted commodity (optional) */
|
|
54
119
|
permittedCommodity?: PermittedCommodity | null;
|
|
120
|
+
/** Vehicle configuration details (optional) */
|
|
55
121
|
vehicleConfiguration?: VehicleConfiguration | null;
|
|
122
|
+
/** Permitted route information (optional) */
|
|
56
123
|
permittedRoute?: PermittedRoute | null;
|
|
124
|
+
/** Additional application notes (optional) */
|
|
57
125
|
applicationNotes?: string | null;
|
|
126
|
+
/** Third party liability information (optional) */
|
|
58
127
|
thirdPartyLiability?: string | null;
|
|
128
|
+
/** Conditional licensing fee information (optional) */
|
|
59
129
|
conditionalLicensingFee?: string | null;
|
|
60
130
|
};
|
|
131
|
+
/**
|
|
132
|
+
* Selected commodity for the permit with load description
|
|
133
|
+
*/
|
|
61
134
|
export type PermittedCommodity = {
|
|
135
|
+
/** Type of commodity being transported */
|
|
62
136
|
commodityType: string;
|
|
137
|
+
/** Description of the load being transported */
|
|
63
138
|
loadDescription: string;
|
|
64
139
|
};
|
|
140
|
+
/**
|
|
141
|
+
* Vehicle configuration within the permit application
|
|
142
|
+
*/
|
|
65
143
|
export type VehicleInConfiguration = {
|
|
144
|
+
/** Subtype of the vehicle */
|
|
66
145
|
vehicleSubType: string;
|
|
67
146
|
};
|
|
147
|
+
/**
|
|
148
|
+
* Complete vehicle configuration including dimensions and axles
|
|
149
|
+
*/
|
|
68
150
|
export type VehicleConfiguration = {
|
|
151
|
+
/** Overall length in meters (optional) */
|
|
69
152
|
overallLength?: number;
|
|
153
|
+
/** Overall width in meters (optional) */
|
|
70
154
|
overallWidth?: number;
|
|
155
|
+
/** Overall height in meters (optional) */
|
|
71
156
|
overallHeight?: number;
|
|
157
|
+
/** Front projection in meters (optional) */
|
|
72
158
|
frontProjection?: number;
|
|
159
|
+
/** Rear projection in meters (optional) */
|
|
73
160
|
rearProjection?: number;
|
|
161
|
+
/** Array of trailers in the configuration (optional) */
|
|
74
162
|
trailers?: Array<VehicleInConfiguration> | null;
|
|
163
|
+
/** Loaded Gross Vehicle Weight in kilograms (optional) */
|
|
75
164
|
loadedGVW?: number;
|
|
165
|
+
/** Net weight in kilograms (optional) */
|
|
76
166
|
netWeight?: number;
|
|
167
|
+
/** Axle configuration details (optional) */
|
|
77
168
|
axleConfiguration?: Array<AxleConfiguration>;
|
|
78
169
|
};
|
|
170
|
+
/**
|
|
171
|
+
* Route information for the permit
|
|
172
|
+
*/
|
|
79
173
|
export type PermittedRoute = {
|
|
174
|
+
/** Manual route details (optional) */
|
|
80
175
|
manualRoute?: ManualRoute | null;
|
|
176
|
+
/** Additional route details (optional) */
|
|
81
177
|
routeDetails?: string | null;
|
|
82
178
|
};
|
|
179
|
+
/**
|
|
180
|
+
* Manual route configuration with highway sequence
|
|
181
|
+
*/
|
|
83
182
|
export type ManualRoute = {
|
|
183
|
+
/** Sequence of highways for the route */
|
|
84
184
|
highwaySequence: Array<string>;
|
|
185
|
+
/** Origin point of the route */
|
|
85
186
|
origin: string;
|
|
187
|
+
/** Destination point of the route */
|
|
86
188
|
destination: string;
|
|
189
|
+
/** Exit point from the route (optional) */
|
|
87
190
|
exitPoint?: string;
|
|
191
|
+
/** Total distance in kilometers (optional) */
|
|
88
192
|
totalDistance?: number;
|
|
89
193
|
};
|
|
194
|
+
/**
|
|
195
|
+
* Complete permit application structure
|
|
196
|
+
*/
|
|
90
197
|
export type PermitApplication = {
|
|
198
|
+
/** All permit data and details */
|
|
91
199
|
permitData: PermitData;
|
|
200
|
+
/** Type of permit being applied for */
|
|
92
201
|
permitType: string;
|
|
93
202
|
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Permit Application Types
|
|
4
|
+
*
|
|
5
|
+
* Defines the complete structure for permit applications including contact details,
|
|
6
|
+
* vehicle information, routing, and configuration data.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,10 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permit Condition Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for permit conditions and requirements that must be met
|
|
5
|
+
* for permit approval and compliance.
|
|
6
|
+
*/
|
|
1
7
|
export type PermitConditionDefinition = {
|
|
8
|
+
/** Human-readable description of the condition */
|
|
2
9
|
description: string;
|
|
10
|
+
/** Specific condition text that must be met */
|
|
3
11
|
condition: string;
|
|
12
|
+
/** Link to detailed condition information */
|
|
4
13
|
conditionLink: string;
|
|
5
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Requirement for a permit condition including mandatory status
|
|
17
|
+
*/
|
|
6
18
|
export type ConditionRequirement = {
|
|
19
|
+
/** The condition text that must be satisfied */
|
|
7
20
|
condition: string;
|
|
21
|
+
/** Whether this condition is mandatory for permit approval */
|
|
8
22
|
mandatory?: boolean;
|
|
9
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Complete permit condition combining definition and requirement
|
|
26
|
+
* Extends PermitConditionDefinition with requirement details
|
|
27
|
+
*/
|
|
10
28
|
export type ConditionForPermit = PermitConditionDefinition & ConditionRequirement;
|
|
@@ -1,13 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permit Type
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for permit types including requirements, allowed vehicles,
|
|
5
|
+
* commodities, rules, and conditions. Extends IdentifiedObject with permit-specific properties.
|
|
6
|
+
*/
|
|
1
7
|
import { RuleProperties } from 'json-rules-engine';
|
|
2
8
|
import { CostRule, IdentifiedObject, ConditionRequirement } from 'onroute-policy-engine/types';
|
|
9
|
+
/**
|
|
10
|
+
* Complete definition of a permit type with all requirements and configurations
|
|
11
|
+
*/
|
|
3
12
|
export type PermitType = IdentifiedObject & {
|
|
13
|
+
/** Whether routing information is required for this permit type */
|
|
4
14
|
routingRequired: boolean;
|
|
15
|
+
/** Whether weight dimension information is required for this permit type */
|
|
5
16
|
weightDimensionRequired: boolean;
|
|
17
|
+
/** Whether size dimension information is required for this permit type */
|
|
6
18
|
sizeDimensionRequired: boolean;
|
|
19
|
+
/** Whether commodity information is required for this permit type */
|
|
7
20
|
commodityRequired: boolean;
|
|
21
|
+
/** Array of allowed vehicle types for this permit (optional) */
|
|
8
22
|
allowedVehicles?: Array<string>;
|
|
23
|
+
/** Array of allowed commodities for this permit (optional) */
|
|
9
24
|
allowedCommodities?: Array<string>;
|
|
25
|
+
/** Array of validation rules for this permit type (optional) */
|
|
10
26
|
rules?: Array<RuleProperties>;
|
|
27
|
+
/** Array of cost calculation rules for this permit type (optional) */
|
|
11
28
|
costRules?: Array<CostRule>;
|
|
29
|
+
/** Array of conditions that must be met for this permit type (optional) */
|
|
12
30
|
conditions?: Array<ConditionRequirement>;
|
|
13
31
|
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Permit Type
|
|
4
|
+
*
|
|
5
|
+
* Defines the structure for permit types including requirements, allowed vehicles,
|
|
6
|
+
* commodities, rules, and conditions. Extends IdentifiedObject with permit-specific properties.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,18 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Policy Definition Type
|
|
3
|
+
*
|
|
4
|
+
* Defines the complete structure for policy definitions including geographic regions,
|
|
5
|
+
* permit types, rules, defaults, and configurations. This is the main configuration
|
|
6
|
+
* type for the policy engine.
|
|
7
|
+
*/
|
|
1
8
|
import { GeographicRegion, PermitType, DefaultWeightDimensions, VehicleTypes, Commodity, SizeDimension, VehicleCategories, RangeMatrix, BridgeCalculationConstants, PermitConditionDefinition, StandardTireSize, VehicleDisplayCodeDefaults } from 'onroute-policy-engine/types';
|
|
2
9
|
import { RuleProperties } from 'json-rules-engine';
|
|
10
|
+
/**
|
|
11
|
+
* Complete policy definition containing all configuration data for the policy engine
|
|
12
|
+
*/
|
|
3
13
|
export type PolicyDefinition = {
|
|
14
|
+
/** Minimum required policy engine version for compatibility */
|
|
4
15
|
minPEVersion: string;
|
|
16
|
+
/** Array of geographic regions having specific policy rules */
|
|
5
17
|
geographicRegions: Array<GeographicRegion>;
|
|
18
|
+
/** Array of permit types available in this policy */
|
|
6
19
|
permitTypes: Array<PermitType>;
|
|
20
|
+
/** Array of common rules that apply to all permits */
|
|
7
21
|
commonRules: Array<RuleProperties>;
|
|
22
|
+
/** Global default weight dimensions for vehicles */
|
|
8
23
|
globalWeightDefaults: DefaultWeightDimensions;
|
|
24
|
+
/** Global default size dimensions for vehicles */
|
|
9
25
|
globalSizeDefaults: SizeDimension;
|
|
26
|
+
/** Vehicle categories configuration */
|
|
10
27
|
vehicleCategories: VehicleCategories;
|
|
28
|
+
/** Vehicle types configuration */
|
|
11
29
|
vehicleTypes: VehicleTypes;
|
|
30
|
+
/** Array of commodities that can be transported */
|
|
12
31
|
commodities: Array<Commodity>;
|
|
32
|
+
/** Array of range matrices for cost calculations (optional) */
|
|
13
33
|
rangeMatrices?: Array<RangeMatrix>;
|
|
34
|
+
/** Constants for bridge formula calculations */
|
|
14
35
|
bridgeCalculationConstants: BridgeCalculationConstants;
|
|
36
|
+
/** Array of permit conditions (optional) */
|
|
15
37
|
conditions?: Array<PermitConditionDefinition>;
|
|
38
|
+
/** Array of standard tire sizes (optional) */
|
|
16
39
|
standardTireSizes?: Array<StandardTireSize>;
|
|
40
|
+
/** Default configuration for vehicle display codes (optional) */
|
|
17
41
|
vehicleDisplayCodeDefaults?: VehicleDisplayCodeDefaults;
|
|
18
42
|
};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Policy Definition Type
|
|
4
|
+
*
|
|
5
|
+
* Defines the complete structure for policy definitions including geographic regions,
|
|
6
|
+
* permit types, rules, defaults, and configurations. This is the main configuration
|
|
7
|
+
* type for the policy engine.
|
|
8
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,9 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Range Matrix Types
|
|
3
|
+
*
|
|
4
|
+
* Defines structures for range-based calculations and lookups used in cost
|
|
5
|
+
* calculations and other policy determinations.
|
|
6
|
+
*/
|
|
1
7
|
import { IdentifiedObject } from 'onroute-policy-engine/types';
|
|
8
|
+
/**
|
|
9
|
+
* A range matrix containing multiple matrix entries for lookups
|
|
10
|
+
* Extends IdentifiedObject with matrix data
|
|
11
|
+
*/
|
|
2
12
|
export type RangeMatrix = IdentifiedObject & {
|
|
13
|
+
/** Array of matrix entries for range-based lookups */
|
|
3
14
|
matrix: Matrix[];
|
|
4
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Individual matrix entry with range and value
|
|
18
|
+
*/
|
|
5
19
|
export type Matrix = {
|
|
20
|
+
/** Minimum value for the range (optional) */
|
|
6
21
|
min?: number;
|
|
22
|
+
/** Maximum value for the range (optional) */
|
|
7
23
|
max?: number;
|
|
24
|
+
/** Value associated with this range */
|
|
8
25
|
value: number;
|
|
9
26
|
};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Region Size Override Type
|
|
3
|
+
*
|
|
4
|
+
* Defines size dimension overrides for specific geographic regions.
|
|
5
|
+
* Used to apply region-specific size limits and requirements.
|
|
6
|
+
*/
|
|
1
7
|
export type RegionSizeOverride = {
|
|
8
|
+
/** Geographic region identifier */
|
|
2
9
|
region: string;
|
|
10
|
+
/** Width override in meters (optional) */
|
|
3
11
|
w?: number;
|
|
12
|
+
/** Height override in meters (optional) */
|
|
4
13
|
h?: number;
|
|
14
|
+
/** Length override in meters (optional) */
|
|
5
15
|
l?: number;
|
|
6
16
|
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self Issuable Type
|
|
3
|
+
*
|
|
4
|
+
* Defines the capability for self-issuance of permits or other documents.
|
|
5
|
+
* Used as a base type for objects that can be self-issued.
|
|
6
|
+
*/
|
|
1
7
|
export type SelfIssuable = {
|
|
8
|
+
/** Whether this object can be self-issued */
|
|
2
9
|
selfIssue?: boolean;
|
|
3
10
|
};
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Size Dimension Type
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for vehicle size dimensions including length, width, height,
|
|
5
|
+
* projections, and regional overrides. Extends SelfIssuable for self-issuance capability.
|
|
6
|
+
*/
|
|
1
7
|
import { DimensionModifier, RegionSizeOverride, SelfIssuable } from 'onroute-policy-engine/types';
|
|
8
|
+
/**
|
|
9
|
+
* Complete size dimension configuration for vehicles
|
|
10
|
+
* Extends SelfIssuable to include self-issuance capability
|
|
11
|
+
*/
|
|
2
12
|
export type SizeDimension = SelfIssuable & {
|
|
13
|
+
/** Front projection in meters (optional) */
|
|
3
14
|
fp?: number;
|
|
15
|
+
/** Rear projection in meters (optional) */
|
|
4
16
|
rp?: number;
|
|
17
|
+
/** Width in meters (optional) */
|
|
5
18
|
w?: number;
|
|
19
|
+
/** Height in meters (optional) */
|
|
6
20
|
h?: number;
|
|
21
|
+
/** Length in meters (optional) */
|
|
7
22
|
l?: number;
|
|
23
|
+
/** Array of dimension modifiers for special configurations (optional) */
|
|
8
24
|
modifiers?: Array<DimensionModifier>;
|
|
25
|
+
/** Array of regional size overrides (optional) */
|
|
9
26
|
regions?: Array<RegionSizeOverride>;
|
|
10
27
|
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Size Dimension Type
|
|
4
|
+
*
|
|
5
|
+
* Defines the structure for vehicle size dimensions including length, width, height,
|
|
6
|
+
* projections, and regional overrides. Extends SelfIssuable for self-issuance capability.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Special Authorizations Type
|
|
3
|
+
*
|
|
4
|
+
* Defines special authorizations and exemptions for companies including
|
|
5
|
+
* LCV (Long Combination Vehicle) allowances and fee exemptions.
|
|
6
|
+
*/
|
|
1
7
|
export type SpecialAuthorizations = {
|
|
8
|
+
/** Company identifier */
|
|
2
9
|
companyId: number;
|
|
10
|
+
/** Whether LCV (Long Combination Vehicle) operations are allowed */
|
|
3
11
|
isLcvAllowed: boolean;
|
|
12
|
+
/** Type of fee exemption if applicable, null if no exemption */
|
|
4
13
|
noFeeType: string | null;
|
|
5
14
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard Tire Size Type
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for standard tire sizes used in vehicle configurations
|
|
5
|
+
* and axle calculations.
|
|
6
|
+
*/
|
|
1
7
|
export type StandardTireSize = {
|
|
8
|
+
/** Name of the tire size (e.g., '11R22.5') */
|
|
2
9
|
name: string;
|
|
10
|
+
/** Tire size in inches (e.g., 22.5 for 11R22.5) */
|
|
3
11
|
size: number;
|
|
4
12
|
};
|
|
@@ -1,15 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vehicle Category Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for vehicle categories including power units and trailers.
|
|
5
|
+
* Extends IdentifiedObject with size and weight dimension defaults.
|
|
6
|
+
*/
|
|
1
7
|
import { IdentifiedObject, SizeDimension, PowerUnitWeightDimension, TrailerWeightDimension, WeightDimension } from 'onroute-policy-engine/types';
|
|
8
|
+
/**
|
|
9
|
+
* Base vehicle category with identification and default dimensions
|
|
10
|
+
* Extends IdentifiedObject with dimension defaults
|
|
11
|
+
*/
|
|
2
12
|
export type VehicleCategory = IdentifiedObject & {
|
|
13
|
+
/** Default size dimensions for this vehicle category (optional) */
|
|
3
14
|
defaultSizeDimensions?: SizeDimension;
|
|
15
|
+
/** Default weight dimensions for this vehicle category (optional) */
|
|
4
16
|
defaultWeightDimensions?: Array<WeightDimension>;
|
|
5
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Power unit category with power unit specific weight dimensions
|
|
20
|
+
* Extends VehicleCategory with power unit weight defaults
|
|
21
|
+
*/
|
|
6
22
|
export type PowerUnitCategory = VehicleCategory & {
|
|
23
|
+
/** Default weight dimensions specific to power units (optional) */
|
|
7
24
|
defaultWeightDimensions?: Array<PowerUnitWeightDimension>;
|
|
8
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Trailer category with trailer specific weight dimensions
|
|
28
|
+
* Extends VehicleCategory with trailer weight defaults
|
|
29
|
+
*/
|
|
9
30
|
export type TrailerCategory = VehicleCategory & {
|
|
31
|
+
/** Default weight dimensions specific to trailers (optional) */
|
|
10
32
|
defaultWeightDimensions?: Array<TrailerWeightDimension>;
|
|
11
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Complete vehicle categories configuration
|
|
36
|
+
*/
|
|
12
37
|
export type VehicleCategories = {
|
|
38
|
+
/** Array of power unit categories */
|
|
13
39
|
powerUnitCategories: Array<PowerUnitCategory>;
|
|
40
|
+
/** Array of trailer categories */
|
|
14
41
|
trailerCategories: Array<TrailerCategory>;
|
|
15
42
|
};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Vehicle Category Types
|
|
4
|
+
*
|
|
5
|
+
* Defines the structure for vehicle categories including power units and trailers.
|
|
6
|
+
* Extends IdentifiedObject with size and weight dimension defaults.
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|