@dvsa/cvs-type-definitions 1.0.11
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/README.md +53 -0
- package/json-schemas/.DS_Store +0 -0
- package/json-schemas/activity/index.json +62 -0
- package/json-schemas/defect-category-reference-data/index.json +440 -0
- package/json-schemas/defect-details/index.json +265 -0
- package/json-schemas/defect-location/index.json +49 -0
- package/json-schemas/reason-item/index.json +17 -0
- package/json-schemas/tech-record/index.json +639 -0
- package/json-schemas/test/index.json +1843 -0
- package/json-schemas/test-result/index.json +636 -0
- package/json-schemas/test-station/index.json +67 -0
- package/json-schemas/test-type/index.json +479 -0
- package/json-schemas/vehicle/index.json +1804 -0
- package/json-schemas/vehicle-tech-record/index.json +683 -0
- package/json-schemas/visit/index.json +1895 -0
- package/lib/schemas.d.ts +1 -0
- package/lib/schemas.js +18 -0
- package/lib/src/schema-validation/schema-validator.d.ts +3 -0
- package/lib/src/schema-validation/schema-validator.js +22 -0
- package/package.json +35 -0
- package/types/activity/index.d.ts +23 -0
- package/types/defect-category-reference-data/index.d.ts +52 -0
- package/types/defect-details/index.d.ts +53 -0
- package/types/defect-location/index.d.ts +16 -0
- package/types/reason-item/index.d.ts +11 -0
- package/types/tech-record/index.d.ts +202 -0
- package/types/test/index.d.ts +353 -0
- package/types/test-result/index.d.ts +136 -0
- package/types/test-station/index.d.ts +23 -0
- package/types/test-type/index.d.ts +98 -0
- package/types/vehicle/index.d.ts +345 -0
- package/types/vehicle-tech-record/index.d.ts +212 -0
- package/types/visit/index.d.ts +366 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface VisitSchema {
|
|
9
|
+
startTime: string;
|
|
10
|
+
endTime: string;
|
|
11
|
+
testStationName: string;
|
|
12
|
+
testStationPNumber: string;
|
|
13
|
+
testStationEmail: string;
|
|
14
|
+
testStationType: string;
|
|
15
|
+
testerName: string;
|
|
16
|
+
testerId: string;
|
|
17
|
+
testerEmail: string;
|
|
18
|
+
tests: CommercialVehicleTestSchema[];
|
|
19
|
+
id?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CommercialVehicleTestSchema {
|
|
22
|
+
testResultId?: string;
|
|
23
|
+
startTime: string;
|
|
24
|
+
endTime: string;
|
|
25
|
+
status: "submitted" | "cancelled" | null;
|
|
26
|
+
reasonForCancellation: string;
|
|
27
|
+
vehicles: VehicleSchema[];
|
|
28
|
+
}
|
|
29
|
+
export interface VehicleSchema {
|
|
30
|
+
systemNumber: string;
|
|
31
|
+
vrm: string;
|
|
32
|
+
vin: string;
|
|
33
|
+
techRecord: TechRecordSchema;
|
|
34
|
+
testResultsHistory?: TestResultSchema[];
|
|
35
|
+
countryOfRegistration?: string;
|
|
36
|
+
euVehicleCategory?: string;
|
|
37
|
+
odometerReading?: string;
|
|
38
|
+
odometerMetric?: string;
|
|
39
|
+
preparerId?: string;
|
|
40
|
+
preparerName?: string;
|
|
41
|
+
testTypes?: TestTypeSchema[];
|
|
42
|
+
/**
|
|
43
|
+
* trailer only
|
|
44
|
+
*/
|
|
45
|
+
trailerId?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface TechRecordSchema {
|
|
48
|
+
bodyType: {
|
|
49
|
+
code: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
manufactureYear: number;
|
|
53
|
+
regnDate: string;
|
|
54
|
+
ntaNumber: string;
|
|
55
|
+
conversionRefNo: string;
|
|
56
|
+
speedLimiterMrk: boolean;
|
|
57
|
+
tachoExemptMrk: boolean;
|
|
58
|
+
reasonForCreation: string;
|
|
59
|
+
statusCode: string;
|
|
60
|
+
grossKerbWeight: number;
|
|
61
|
+
grossLadenWeight: number;
|
|
62
|
+
noOfAxles: number;
|
|
63
|
+
brakeCode: string;
|
|
64
|
+
vehicleType: string;
|
|
65
|
+
euVehicleCategory: string;
|
|
66
|
+
axles: AxleSchema[];
|
|
67
|
+
vehicleClass: VehicleClassSchema;
|
|
68
|
+
vehicleSubclass: string[];
|
|
69
|
+
vehicleConfiguration: string;
|
|
70
|
+
recordCompleteness?: string;
|
|
71
|
+
chassisMake?: string;
|
|
72
|
+
chassisModel?: string;
|
|
73
|
+
bodyMake?: string;
|
|
74
|
+
bodyModel?: string;
|
|
75
|
+
vehicleSize?: string;
|
|
76
|
+
coifDate?: string;
|
|
77
|
+
unladenWeight?: number;
|
|
78
|
+
grossGbWeight?: number;
|
|
79
|
+
grossDesignWeight?: number;
|
|
80
|
+
grossUnladenWeight?: number;
|
|
81
|
+
seatsLowerDeck?: number;
|
|
82
|
+
seatsUpperDeck?: number;
|
|
83
|
+
standingCapacity?: number;
|
|
84
|
+
speedRestriction?: number;
|
|
85
|
+
dispensations?: string;
|
|
86
|
+
remarks?: string;
|
|
87
|
+
brakes?: Brake;
|
|
88
|
+
make?: string;
|
|
89
|
+
model?: string;
|
|
90
|
+
functionCode?: string;
|
|
91
|
+
typeUseCode?: string;
|
|
92
|
+
roadFriendly?: boolean;
|
|
93
|
+
drawbarCouplingFitted?: boolean;
|
|
94
|
+
dimensions?: DimensionsSchema;
|
|
95
|
+
notes: string;
|
|
96
|
+
adrDetails?: ADRDetailsSchema;
|
|
97
|
+
trainGbWeight?: number;
|
|
98
|
+
trainDesignWeight?: number;
|
|
99
|
+
maxTrainGbWeight?: number;
|
|
100
|
+
maxTrainDesignWeight?: number;
|
|
101
|
+
euroStandard?: number;
|
|
102
|
+
frontAxleTo5thWheelMin?: number;
|
|
103
|
+
frontAxleTo5thWheelMax?: number;
|
|
104
|
+
frontAxleTo5thWheelCouplingMin?: number;
|
|
105
|
+
frontAxleTo5thWheelCouplingMax?: number;
|
|
106
|
+
firstUseDate?: string;
|
|
107
|
+
maxLoadOnCoupling?: number;
|
|
108
|
+
suspensionType?: string;
|
|
109
|
+
couplingType?: string;
|
|
110
|
+
frontAxleToRearAxle?: number;
|
|
111
|
+
rearAxleToRearTrl?: number;
|
|
112
|
+
couplingCenterToRearAxleMin?: number;
|
|
113
|
+
couplingCenterToRearAxleMax?: number;
|
|
114
|
+
couplingCenterToRearTrlMin?: number;
|
|
115
|
+
couplingCenterToRearTrlMax?: number;
|
|
116
|
+
numberOfWheelsDriven?: number;
|
|
117
|
+
}
|
|
118
|
+
export interface AxleSchema {
|
|
119
|
+
parkingBrakeMrk?: boolean;
|
|
120
|
+
axleNumber: number;
|
|
121
|
+
weights?: WeightsSchema;
|
|
122
|
+
tyres: TyresSchema;
|
|
123
|
+
brakes?: AxleBrakePropertiesSchema;
|
|
124
|
+
}
|
|
125
|
+
export interface WeightsSchema {
|
|
126
|
+
kerbWeight?: number;
|
|
127
|
+
ladenWeight?: number;
|
|
128
|
+
gbWeight: number;
|
|
129
|
+
designWeight: number;
|
|
130
|
+
}
|
|
131
|
+
export interface TyresSchema {
|
|
132
|
+
tyreSize: string;
|
|
133
|
+
plyRating: string;
|
|
134
|
+
fitmentCode: string;
|
|
135
|
+
dataTrPsvAxles?: number;
|
|
136
|
+
tyreCode: number;
|
|
137
|
+
dataTrAxles?: number;
|
|
138
|
+
/**
|
|
139
|
+
* PSV only
|
|
140
|
+
*/
|
|
141
|
+
speedCategorySymbol?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface AxleBrakePropertiesSchema {
|
|
144
|
+
brakeActuator: number;
|
|
145
|
+
leverLength: number;
|
|
146
|
+
springBrakeParking: boolean;
|
|
147
|
+
}
|
|
148
|
+
export interface VehicleClassSchema {
|
|
149
|
+
code: string;
|
|
150
|
+
description: string;
|
|
151
|
+
}
|
|
152
|
+
export interface Brake {
|
|
153
|
+
brakeCode?: string;
|
|
154
|
+
dataTrBrakeOne?: string;
|
|
155
|
+
dataTrBrakeTwo?: string;
|
|
156
|
+
dataTrBrakeThree?: string;
|
|
157
|
+
retarderBrakeOne?: string;
|
|
158
|
+
retarderBrakeTwo?: string;
|
|
159
|
+
brakeCodeOriginal?: string;
|
|
160
|
+
brakeForceWheelsNotLocked?: BrakeForceWheel;
|
|
161
|
+
brakeForceWheelsUpToHalfLocked?: BrakeForceWheel;
|
|
162
|
+
dtpNumber?: string;
|
|
163
|
+
loadSensingValve?: boolean;
|
|
164
|
+
antilockBrakingSystem?: boolean;
|
|
165
|
+
}
|
|
166
|
+
export interface BrakeForceWheel {
|
|
167
|
+
serviceBrakeForce: number;
|
|
168
|
+
secondaryBrakeForce: number;
|
|
169
|
+
parkingBrakeForce: number;
|
|
170
|
+
}
|
|
171
|
+
export interface DimensionsSchema {
|
|
172
|
+
length: number;
|
|
173
|
+
width: number;
|
|
174
|
+
/**
|
|
175
|
+
* @minItems 1
|
|
176
|
+
* @maxItems 1
|
|
177
|
+
*/
|
|
178
|
+
axleSpacing: [
|
|
179
|
+
{
|
|
180
|
+
axles: string;
|
|
181
|
+
value: number;
|
|
182
|
+
}
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
export interface ADRDetailsSchema {
|
|
186
|
+
vehicleDetails?: {
|
|
187
|
+
type?: string;
|
|
188
|
+
approvalDate?: string;
|
|
189
|
+
};
|
|
190
|
+
listStatementApplicable?: boolean;
|
|
191
|
+
batteryListNumber?: string;
|
|
192
|
+
permittedDangerousGoods?: string[];
|
|
193
|
+
additionalExaminerNotes?: string;
|
|
194
|
+
applicantDetails?: ApplicantDetailsSchema;
|
|
195
|
+
memosApply?: string[];
|
|
196
|
+
additionalNotes?: {
|
|
197
|
+
number?: string[];
|
|
198
|
+
guidanceNotes?: string[];
|
|
199
|
+
};
|
|
200
|
+
adrTypeApprovalNo?: string;
|
|
201
|
+
compatibilityGroupJ?: boolean;
|
|
202
|
+
tank?: TankSchema;
|
|
203
|
+
}
|
|
204
|
+
export interface ApplicantDetailsSchema {
|
|
205
|
+
name?: string;
|
|
206
|
+
street?: string;
|
|
207
|
+
town?: string;
|
|
208
|
+
city?: string;
|
|
209
|
+
postcode?: string;
|
|
210
|
+
}
|
|
211
|
+
export interface TankSchema {
|
|
212
|
+
tankDetails?: TankDetailsSchema;
|
|
213
|
+
tankStatement?: TankStatementSchema;
|
|
214
|
+
}
|
|
215
|
+
export interface TankDetailsSchema {
|
|
216
|
+
tankManufacturer?: string;
|
|
217
|
+
tc2Details?: TC2DetailsSchema;
|
|
218
|
+
tc3Details?: TC3DetailsSchema[];
|
|
219
|
+
yearOfManufacture?: string;
|
|
220
|
+
tankCode?: string;
|
|
221
|
+
specialProvisions?: string;
|
|
222
|
+
tankManufacturerSerialNo?: string;
|
|
223
|
+
tankTypeAppNo?: string;
|
|
224
|
+
}
|
|
225
|
+
export interface TC2DetailsSchema {
|
|
226
|
+
tc2Type?: string;
|
|
227
|
+
tc2IntermediateApprovalNo?: string;
|
|
228
|
+
tc2IntermediateExpiryDate?: string;
|
|
229
|
+
}
|
|
230
|
+
export interface TC3DetailsSchema {
|
|
231
|
+
tc3Type?: string;
|
|
232
|
+
tc3IntermediateApprovalNo?: string;
|
|
233
|
+
tc3IntermediateExpiryDate?: string;
|
|
234
|
+
}
|
|
235
|
+
export interface TankStatementSchema {
|
|
236
|
+
substancesPermitted?: string;
|
|
237
|
+
statement?: string;
|
|
238
|
+
productList?: string;
|
|
239
|
+
productListRefNo?: string;
|
|
240
|
+
productListUnNo?: string[];
|
|
241
|
+
}
|
|
242
|
+
export interface TestResultSchema {
|
|
243
|
+
testResultId: string;
|
|
244
|
+
testStationName: string;
|
|
245
|
+
testStationPNumber: string;
|
|
246
|
+
testStationType: string;
|
|
247
|
+
testerName: string;
|
|
248
|
+
testerStaffId: string;
|
|
249
|
+
testerEmailAddress: string;
|
|
250
|
+
testStartTimestamp: string;
|
|
251
|
+
testEndTimestamp: string;
|
|
252
|
+
testStatus: string;
|
|
253
|
+
reasonForCancellation: string | null;
|
|
254
|
+
systemNumber: string;
|
|
255
|
+
vrm?: string;
|
|
256
|
+
trailerId?: string;
|
|
257
|
+
vin: string;
|
|
258
|
+
vehicleClass: VehicleClassSchema;
|
|
259
|
+
vehicleSubclass?: string[];
|
|
260
|
+
vehicleType: string;
|
|
261
|
+
vehicleConfiguration: string;
|
|
262
|
+
odometerReading?: number | null;
|
|
263
|
+
odometerReadingUnits?: string | null;
|
|
264
|
+
preparerId: string;
|
|
265
|
+
preparerName: string;
|
|
266
|
+
euVehicleCategory: string;
|
|
267
|
+
countryOfRegistration: string | null;
|
|
268
|
+
noOfAxles: number;
|
|
269
|
+
numberOfWheelsDriven: number;
|
|
270
|
+
vehicleSize?: string;
|
|
271
|
+
numberOfSeats?: number;
|
|
272
|
+
regnDate?: string;
|
|
273
|
+
firstUseDate?: string;
|
|
274
|
+
testTypes: TestTypeSchema[];
|
|
275
|
+
}
|
|
276
|
+
export interface TestTypeSchema {
|
|
277
|
+
testTypeName: string;
|
|
278
|
+
name: string;
|
|
279
|
+
testTypeId: string;
|
|
280
|
+
certificateNumber: string | null;
|
|
281
|
+
secondaryCertificateNumber: string | null;
|
|
282
|
+
testTypeStartTimestamp: string | null;
|
|
283
|
+
testTypeEndTimestamp: string | null;
|
|
284
|
+
testResult: string | null;
|
|
285
|
+
prohibitionIssued: boolean | null;
|
|
286
|
+
reasonForAbandoning: string | null;
|
|
287
|
+
additionalNotesRecorded: string | null;
|
|
288
|
+
additionalCommentsForAbandon: string | null;
|
|
289
|
+
numberOfSeatbeltsFitted?: number | null;
|
|
290
|
+
lastSeatbeltInstallationCheckDate?: string | null;
|
|
291
|
+
seatbeltInstallationCheckDate?: boolean | null;
|
|
292
|
+
testExpiryDate?: string;
|
|
293
|
+
modType?: ModTypeSchema | string | null;
|
|
294
|
+
emissionStandard?: string;
|
|
295
|
+
fuelType?: string;
|
|
296
|
+
modificationTypeUsed?: string;
|
|
297
|
+
smokeTestKLimitApplied?: string;
|
|
298
|
+
particulateTrapFitted?: string;
|
|
299
|
+
particulateTrapSerialNumber?: string;
|
|
300
|
+
defects: DefectDetailsSchema[];
|
|
301
|
+
customDefects?: SpecialistCustomDefectsSchema[];
|
|
302
|
+
completionStatus?: string;
|
|
303
|
+
testTypeCategoryName?: string;
|
|
304
|
+
reasons?: string[];
|
|
305
|
+
testNumber?: string;
|
|
306
|
+
linkedIds?: string[] | null;
|
|
307
|
+
}
|
|
308
|
+
export interface ModTypeSchema {
|
|
309
|
+
code: string;
|
|
310
|
+
description: string;
|
|
311
|
+
}
|
|
312
|
+
export interface DefectDetailsSchema {
|
|
313
|
+
imNumber: number;
|
|
314
|
+
imDescription: string;
|
|
315
|
+
additionalInformation: {
|
|
316
|
+
location: DefectLocationSchema;
|
|
317
|
+
notes: string;
|
|
318
|
+
};
|
|
319
|
+
itemNumber: number;
|
|
320
|
+
itemDescription: string;
|
|
321
|
+
deficiencyRef: string;
|
|
322
|
+
deficiencyId: string | null;
|
|
323
|
+
deficiencySubId: string | null;
|
|
324
|
+
deficiencyCategory: string;
|
|
325
|
+
deficiencyText: string | null;
|
|
326
|
+
stdForProhibition: boolean | null;
|
|
327
|
+
prs: boolean | null;
|
|
328
|
+
prohibitionIssued: boolean | null;
|
|
329
|
+
metadata: DefectMetadataSchema;
|
|
330
|
+
}
|
|
331
|
+
export interface DefectLocationSchema {
|
|
332
|
+
vertical?: string | null;
|
|
333
|
+
horizontal?: string | null;
|
|
334
|
+
lateral?: string | null;
|
|
335
|
+
longitudinal?: string | null;
|
|
336
|
+
rowNumber?: number | null;
|
|
337
|
+
seatNumber?: number | null;
|
|
338
|
+
axleNumber?: number | null;
|
|
339
|
+
}
|
|
340
|
+
export interface DefectMetadataSchema {
|
|
341
|
+
category: {
|
|
342
|
+
additionalInfo?: DefectAdditionalDetailsMetadataSchema;
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
export interface DefectAdditionalDetailsMetadataSchema {
|
|
346
|
+
location: DefectLocationMetadataSchema;
|
|
347
|
+
notes: boolean;
|
|
348
|
+
}
|
|
349
|
+
export interface DefectLocationMetadataSchema {
|
|
350
|
+
vertical?: string[] | null;
|
|
351
|
+
horizontal?: string[] | null;
|
|
352
|
+
lateral?: string[] | null;
|
|
353
|
+
longitudinal?: string[] | null;
|
|
354
|
+
rowNumber?: number[] | null;
|
|
355
|
+
seatNumber?: number[] | null;
|
|
356
|
+
axleNumber?: number[] | null;
|
|
357
|
+
}
|
|
358
|
+
export interface SpecialistCustomDefectsSchema {
|
|
359
|
+
referenceNumber: string;
|
|
360
|
+
defectName: string;
|
|
361
|
+
defectNotes: string;
|
|
362
|
+
/**
|
|
363
|
+
* FE only
|
|
364
|
+
*/
|
|
365
|
+
hasAllMandatoryFields?: boolean;
|
|
366
|
+
}
|