@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.
Files changed (33) hide show
  1. package/README.md +53 -0
  2. package/json-schemas/.DS_Store +0 -0
  3. package/json-schemas/activity/index.json +62 -0
  4. package/json-schemas/defect-category-reference-data/index.json +440 -0
  5. package/json-schemas/defect-details/index.json +265 -0
  6. package/json-schemas/defect-location/index.json +49 -0
  7. package/json-schemas/reason-item/index.json +17 -0
  8. package/json-schemas/tech-record/index.json +639 -0
  9. package/json-schemas/test/index.json +1843 -0
  10. package/json-schemas/test-result/index.json +636 -0
  11. package/json-schemas/test-station/index.json +67 -0
  12. package/json-schemas/test-type/index.json +479 -0
  13. package/json-schemas/vehicle/index.json +1804 -0
  14. package/json-schemas/vehicle-tech-record/index.json +683 -0
  15. package/json-schemas/visit/index.json +1895 -0
  16. package/lib/schemas.d.ts +1 -0
  17. package/lib/schemas.js +18 -0
  18. package/lib/src/schema-validation/schema-validator.d.ts +3 -0
  19. package/lib/src/schema-validation/schema-validator.js +22 -0
  20. package/package.json +35 -0
  21. package/types/activity/index.d.ts +23 -0
  22. package/types/defect-category-reference-data/index.d.ts +52 -0
  23. package/types/defect-details/index.d.ts +53 -0
  24. package/types/defect-location/index.d.ts +16 -0
  25. package/types/reason-item/index.d.ts +11 -0
  26. package/types/tech-record/index.d.ts +202 -0
  27. package/types/test/index.d.ts +353 -0
  28. package/types/test-result/index.d.ts +136 -0
  29. package/types/test-station/index.d.ts +23 -0
  30. package/types/test-type/index.d.ts +98 -0
  31. package/types/vehicle/index.d.ts +345 -0
  32. package/types/vehicle-tech-record/index.d.ts +212 -0
  33. package/types/visit/index.d.ts +366 -0
@@ -0,0 +1,636 @@
1
+ {
2
+ "title": "Test Result Schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "testResultId": {
6
+ "type": "string"
7
+ },
8
+ "testStationName": {
9
+ "type": "string"
10
+ },
11
+ "testStationPNumber": {
12
+ "type": "string"
13
+ },
14
+ "testStationType": {
15
+ "type": "string"
16
+ },
17
+ "testerName": {
18
+ "type": "string"
19
+ },
20
+ "testerStaffId": {
21
+ "type": "string"
22
+ },
23
+ "testerEmailAddress": {
24
+ "type": "string"
25
+ },
26
+ "testStartTimestamp": {
27
+ "type": "string"
28
+ },
29
+ "testEndTimestamp": {
30
+ "type": "string"
31
+ },
32
+ "testStatus": {
33
+ "type": "string"
34
+ },
35
+ "reasonForCancellation": {
36
+ "type": [
37
+ "string",
38
+ "null"
39
+ ]
40
+ },
41
+ "systemNumber": {
42
+ "type": "string"
43
+ },
44
+ "vrm": {
45
+ "type": "string"
46
+ },
47
+ "trailerId": {
48
+ "type": "string"
49
+ },
50
+ "vin": {
51
+ "type": "string"
52
+ },
53
+ "vehicleClass": {
54
+ "title": "Vehicle Class Schema",
55
+ "type": "object",
56
+ "properties": {
57
+ "code": {
58
+ "type": "string"
59
+ },
60
+ "description": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "code",
67
+ "description"
68
+ ]
69
+ },
70
+ "vehicleSubclass": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string"
74
+ }
75
+ },
76
+ "vehicleType": {
77
+ "type": "string"
78
+ },
79
+ "vehicleConfiguration": {
80
+ "type": "string"
81
+ },
82
+ "odometerReading": {
83
+ "type": [
84
+ "number",
85
+ "null"
86
+ ]
87
+ },
88
+ "odometerReadingUnits": {
89
+ "type": [
90
+ "string",
91
+ "null"
92
+ ]
93
+ },
94
+ "preparerId": {
95
+ "type": "string"
96
+ },
97
+ "preparerName": {
98
+ "type": "string"
99
+ },
100
+ "euVehicleCategory": {
101
+ "type": "string"
102
+ },
103
+ "countryOfRegistration": {
104
+ "type": [
105
+ "string",
106
+ "null"
107
+ ]
108
+ },
109
+ "noOfAxles": {
110
+ "type": "integer"
111
+ },
112
+ "numberOfWheelsDriven": {
113
+ "type": "integer"
114
+ },
115
+ "vehicleSize": {
116
+ "type": "string"
117
+ },
118
+ "numberOfSeats": {
119
+ "type": "integer"
120
+ },
121
+ "regnDate": {
122
+ "type": "string"
123
+ },
124
+ "firstUseDate": {
125
+ "type": "string"
126
+ },
127
+ "testTypes": {
128
+ "type": "array",
129
+ "items": {
130
+ "title": "Test Type Schema",
131
+ "type": "object",
132
+ "properties": {
133
+ "testTypeName": {
134
+ "type": "string"
135
+ },
136
+ "name": {
137
+ "type": "string"
138
+ },
139
+ "testTypeId": {
140
+ "type": "string"
141
+ },
142
+ "certificateNumber": {
143
+ "type": [
144
+ "string",
145
+ "null"
146
+ ]
147
+ },
148
+ "secondaryCertificateNumber": {
149
+ "type": [
150
+ "string",
151
+ "null"
152
+ ]
153
+ },
154
+ "testTypeStartTimestamp": {
155
+ "type": [
156
+ "string",
157
+ "null"
158
+ ]
159
+ },
160
+ "testTypeEndTimestamp": {
161
+ "type": [
162
+ "string",
163
+ "null"
164
+ ]
165
+ },
166
+ "testResult": {
167
+ "type": [
168
+ "string",
169
+ "null"
170
+ ]
171
+ },
172
+ "prohibitionIssued": {
173
+ "type": [
174
+ "boolean",
175
+ "null"
176
+ ]
177
+ },
178
+ "reasonForAbandoning": {
179
+ "type": [
180
+ "string",
181
+ "null"
182
+ ]
183
+ },
184
+ "additionalNotesRecorded": {
185
+ "type": [
186
+ "string",
187
+ "null"
188
+ ]
189
+ },
190
+ "additionalCommentsForAbandon": {
191
+ "type": [
192
+ "string",
193
+ "null"
194
+ ]
195
+ },
196
+ "numberOfSeatbeltsFitted": {
197
+ "type": [
198
+ "integer",
199
+ "null"
200
+ ]
201
+ },
202
+ "lastSeatbeltInstallationCheckDate": {
203
+ "type": [
204
+ "string",
205
+ "null"
206
+ ]
207
+ },
208
+ "seatbeltInstallationCheckDate": {
209
+ "type": [
210
+ "boolean",
211
+ "null"
212
+ ]
213
+ },
214
+ "testExpiryDate": {
215
+ "type": "string"
216
+ },
217
+ "modType": {
218
+ "anyOf": [
219
+ {
220
+ "title": "Mod Type Schema",
221
+ "type": "object",
222
+ "properties": {
223
+ "code": {
224
+ "type": "string"
225
+ },
226
+ "description": {
227
+ "type": "string"
228
+ }
229
+ },
230
+ "required": [
231
+ "code",
232
+ "description"
233
+ ],
234
+ "additionalProperties": false
235
+ },
236
+ {
237
+ "type": "string"
238
+ },
239
+ {
240
+ "type": "null"
241
+ }
242
+ ]
243
+ },
244
+ "emissionStandard": {
245
+ "type": "string"
246
+ },
247
+ "fuelType": {
248
+ "type": "string"
249
+ },
250
+ "modificationTypeUsed": {
251
+ "type": "string"
252
+ },
253
+ "smokeTestKLimitApplied": {
254
+ "type": "string"
255
+ },
256
+ "particulateTrapFitted": {
257
+ "type": "string"
258
+ },
259
+ "particulateTrapSerialNumber": {
260
+ "type": "string"
261
+ },
262
+ "defects": {
263
+ "type": [
264
+ "array"
265
+ ],
266
+ "items": {
267
+ "title": "Defect Details Schema",
268
+ "type": "object",
269
+ "properties": {
270
+ "imNumber": {
271
+ "type": "integer"
272
+ },
273
+ "imDescription": {
274
+ "type": "string"
275
+ },
276
+ "additionalInformation": {
277
+ "properties": {
278
+ "location": {
279
+ "title": "Defect Location Schema",
280
+ "type": "object",
281
+ "properties": {
282
+ "vertical": {
283
+ "type": [
284
+ "string",
285
+ "null"
286
+ ]
287
+ },
288
+ "horizontal": {
289
+ "type": [
290
+ "string",
291
+ "null"
292
+ ]
293
+ },
294
+ "lateral": {
295
+ "type": [
296
+ "string",
297
+ "null"
298
+ ]
299
+ },
300
+ "longitudinal": {
301
+ "type": [
302
+ "string",
303
+ "null"
304
+ ]
305
+ },
306
+ "rowNumber": {
307
+ "type": [
308
+ "integer",
309
+ "null"
310
+ ]
311
+ },
312
+ "seatNumber": {
313
+ "type": [
314
+ "integer",
315
+ "null"
316
+ ]
317
+ },
318
+ "axleNumber": {
319
+ "type": [
320
+ "integer",
321
+ "null"
322
+ ]
323
+ }
324
+ },
325
+ "additionalProperties": false
326
+ },
327
+ "notes": {
328
+ "type": "string"
329
+ }
330
+ },
331
+ "additionalProperties": false,
332
+ "required": [
333
+ "location",
334
+ "notes"
335
+ ]
336
+ },
337
+ "itemNumber": {
338
+ "type": "integer"
339
+ },
340
+ "itemDescription": {
341
+ "type": "string"
342
+ },
343
+ "deficiencyRef": {
344
+ "type": "string"
345
+ },
346
+ "deficiencyId": {
347
+ "type": [
348
+ "string",
349
+ "null"
350
+ ]
351
+ },
352
+ "deficiencySubId": {
353
+ "type": [
354
+ "string",
355
+ "null"
356
+ ]
357
+ },
358
+ "deficiencyCategory": {
359
+ "type": "string"
360
+ },
361
+ "deficiencyText": {
362
+ "type": [
363
+ "string",
364
+ "null"
365
+ ]
366
+ },
367
+ "stdForProhibition": {
368
+ "type": [
369
+ "boolean",
370
+ "null"
371
+ ]
372
+ },
373
+ "prs": {
374
+ "type": [
375
+ "boolean",
376
+ "null"
377
+ ]
378
+ },
379
+ "prohibitionIssued": {
380
+ "type": [
381
+ "boolean",
382
+ "null"
383
+ ]
384
+ },
385
+ "metadata": {
386
+ "title": "Defect Metadata Schema",
387
+ "type": "object",
388
+ "properties": {
389
+ "category": {
390
+ "properties": {
391
+ "additionalInfo": {
392
+ "title": "Defect Additional Details Metadata Schema",
393
+ "type": "object",
394
+ "properties": {
395
+ "location": {
396
+ "title": "Defect Location Metadata Schema",
397
+ "type": "object",
398
+ "properties": {
399
+ "vertical": {
400
+ "anyOf": [
401
+ {
402
+ "type": "array",
403
+ "items": {
404
+ "type": "string"
405
+ }
406
+ },
407
+ {
408
+ "type": "null"
409
+ }
410
+ ]
411
+ },
412
+ "horizontal": {
413
+ "anyOf": [
414
+ {
415
+ "type": "array",
416
+ "items": {
417
+ "type": "string"
418
+ }
419
+ },
420
+ {
421
+ "type": "null"
422
+ }
423
+ ]
424
+ },
425
+ "lateral": {
426
+ "anyOf": [
427
+ {
428
+ "type": "array",
429
+ "items": {
430
+ "type": "string"
431
+ }
432
+ },
433
+ {
434
+ "type": "null"
435
+ }
436
+ ]
437
+ },
438
+ "longitudinal": {
439
+ "anyOf": [
440
+ {
441
+ "type": "array",
442
+ "items": {
443
+ "type": "string"
444
+ }
445
+ },
446
+ {
447
+ "type": "null"
448
+ }
449
+ ]
450
+ },
451
+ "rowNumber": {
452
+ "anyOf": [
453
+ {
454
+ "type": "array",
455
+ "items": {
456
+ "type": "number"
457
+ }
458
+ },
459
+ {
460
+ "type": "null"
461
+ }
462
+ ]
463
+ },
464
+ "seatNumber": {
465
+ "anyOf": [
466
+ {
467
+ "type": "array",
468
+ "items": {
469
+ "type": "integer"
470
+ }
471
+ },
472
+ {
473
+ "type": "null"
474
+ }
475
+ ]
476
+ },
477
+ "axleNumber": {
478
+ "anyOf": [
479
+ {
480
+ "type": "array",
481
+ "items": {
482
+ "type": "number"
483
+ }
484
+ },
485
+ {
486
+ "type": "null"
487
+ }
488
+ ]
489
+ }
490
+ },
491
+ "additionalProperties": false
492
+ },
493
+ "notes": {
494
+ "type": "boolean"
495
+ }
496
+ },
497
+ "additionalProperties": false,
498
+ "required": [
499
+ "location",
500
+ "notes"
501
+ ]
502
+ }
503
+ },
504
+ "additionalProperties": false
505
+ }
506
+ },
507
+ "additionalProperties": false,
508
+ "required": [
509
+ "category"
510
+ ]
511
+ }
512
+ },
513
+ "additionalProperties": false,
514
+ "required": [
515
+ "imNumber",
516
+ "imDescription",
517
+ "additionalInformation",
518
+ "itemNumber",
519
+ "itemDescription",
520
+ "deficiencyRef",
521
+ "deficiencyId",
522
+ "deficiencySubId",
523
+ "deficiencyCategory",
524
+ "deficiencyText",
525
+ "stdForProhibition",
526
+ "prs",
527
+ "prohibitionIssued",
528
+ "metadata"
529
+ ]
530
+ }
531
+ },
532
+ "customDefects": {
533
+ "type": [
534
+ "array"
535
+ ],
536
+ "items": {
537
+ "title": "Specialist Custom Defects Schema",
538
+ "type": "object",
539
+ "properties": {
540
+ "referenceNumber": {
541
+ "type": "string"
542
+ },
543
+ "defectName": {
544
+ "type": "string"
545
+ },
546
+ "defectNotes": {
547
+ "type": "string"
548
+ },
549
+ "hasAllMandatoryFields": {
550
+ "type": "boolean",
551
+ "description": "FE only"
552
+ }
553
+ },
554
+ "additionalProperties": false,
555
+ "required": [
556
+ "referenceNumber",
557
+ "defectName",
558
+ "defectNotes"
559
+ ]
560
+ }
561
+ },
562
+ "completionStatus": {
563
+ "type": "string"
564
+ },
565
+ "testTypeCategoryName": {
566
+ "type": "string"
567
+ },
568
+ "reasons": {
569
+ "type": "array",
570
+ "items": {
571
+ "type": "string"
572
+ }
573
+ },
574
+ "testNumber": {
575
+ "type": "string"
576
+ },
577
+ "linkedIds": {
578
+ "anyOf": [
579
+ {
580
+ "type": "array",
581
+ "items": {
582
+ "type": "string"
583
+ }
584
+ },
585
+ {
586
+ "type": "null"
587
+ }
588
+ ]
589
+ }
590
+ },
591
+ "required": [
592
+ "testTypeName",
593
+ "name",
594
+ "testTypeId",
595
+ "certificateNumber",
596
+ "secondaryCertificateNumber",
597
+ "testTypeStartTimestamp",
598
+ "testTypeEndTimestamp",
599
+ "testResult",
600
+ "prohibitionIssued",
601
+ "reasonForAbandoning",
602
+ "additionalNotesRecorded",
603
+ "additionalCommentsForAbandon",
604
+ "defects"
605
+ ],
606
+ "additionalProperties": false
607
+ }
608
+ }
609
+ },
610
+ "additionalProperties": false,
611
+ "required": [
612
+ "testResultId",
613
+ "testStationName",
614
+ "testStationPNumber",
615
+ "testStationType",
616
+ "testerName",
617
+ "testerStaffId",
618
+ "testerEmailAddress",
619
+ "testStartTimestamp",
620
+ "testEndTimestamp",
621
+ "testStatus",
622
+ "reasonForCancellation",
623
+ "systemNumber",
624
+ "vin",
625
+ "vehicleClass",
626
+ "vehicleType",
627
+ "vehicleConfiguration",
628
+ "preparerId",
629
+ "preparerName",
630
+ "euVehicleCategory",
631
+ "countryOfRegistration",
632
+ "noOfAxles",
633
+ "numberOfWheelsDriven",
634
+ "testTypes"
635
+ ]
636
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "title": "Test Station Schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "testStationId": {
6
+ "type": "string"
7
+ },
8
+ "testStationPNumber": {
9
+ "type": "string"
10
+ },
11
+ "testStationName": {
12
+ "type": "string"
13
+ },
14
+ "testStationContactNumber": {
15
+ "type": "string"
16
+ },
17
+ "testStationAccessNotes": {
18
+ "type": "string"
19
+ },
20
+ "testStationGeneralNotes": {
21
+ "type": "string"
22
+ },
23
+ "testStationTown": {
24
+ "type": "string"
25
+ },
26
+ "testStationAddress": {
27
+ "type": "string"
28
+ },
29
+ "testStationPostcode": {
30
+ "type": "string"
31
+ },
32
+ "testStationLongitude": {
33
+ "type": "integer"
34
+ },
35
+ "testStationLatitude": {
36
+ "type": "integer"
37
+ },
38
+ "testStationType": {
39
+ "type": "string"
40
+ },
41
+ "testStationEmails": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "string"
45
+ }
46
+ },
47
+ "searchProperty": {
48
+ "type": "string"
49
+ }
50
+ },
51
+ "required": [
52
+ "testStationId",
53
+ "testStationPNumber",
54
+ "testStationName",
55
+ "testStationContactNumber",
56
+ "testStationAccessNotes",
57
+ "testStationGeneralNotes",
58
+ "testStationTown",
59
+ "testStationAddress",
60
+ "testStationPostcode",
61
+ "testStationLongitude",
62
+ "testStationLatitude",
63
+ "testStationType",
64
+ "testStationEmails"
65
+ ],
66
+ "additionalProperties": false
67
+ }