@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,1804 @@
1
+ {
2
+ "title": "Vehicle Schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "systemNumber": {
6
+ "type": "string"
7
+ },
8
+ "vrm": {
9
+ "type": "string"
10
+ },
11
+ "vin": {
12
+ "type": "string"
13
+ },
14
+ "techRecord": {
15
+ "title": "Tech Record Schema",
16
+ "type": "object",
17
+ "properties": {
18
+ "bodyType": {
19
+ "properties": {
20
+ "code": {
21
+ "type": "string"
22
+ },
23
+ "description": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "additionalProperties": false,
28
+ "required": [
29
+ "code",
30
+ "description"
31
+ ]
32
+ },
33
+ "manufactureYear": {
34
+ "type": "integer"
35
+ },
36
+ "regnDate": {
37
+ "type": "string"
38
+ },
39
+ "ntaNumber": {
40
+ "type": "string"
41
+ },
42
+ "conversionRefNo": {
43
+ "type": "string"
44
+ },
45
+ "speedLimiterMrk": {
46
+ "type": "boolean"
47
+ },
48
+ "tachoExemptMrk": {
49
+ "type": "boolean"
50
+ },
51
+ "reasonForCreation": {
52
+ "type": "string"
53
+ },
54
+ "statusCode": {
55
+ "type": "string"
56
+ },
57
+ "grossKerbWeight": {
58
+ "type": "integer"
59
+ },
60
+ "grossLadenWeight": {
61
+ "type": "integer"
62
+ },
63
+ "noOfAxles": {
64
+ "type": "integer"
65
+ },
66
+ "brakeCode": {
67
+ "type": "string"
68
+ },
69
+ "vehicleType": {
70
+ "type": "string"
71
+ },
72
+ "euVehicleCategory": {
73
+ "type": "string"
74
+ },
75
+ "axles": {
76
+ "type": "array",
77
+ "items": {
78
+ "title": "Axle Schema",
79
+ "type": "object",
80
+ "properties": {
81
+ "parkingBrakeMrk": {
82
+ "type": "boolean"
83
+ },
84
+ "axleNumber": {
85
+ "type": "integer"
86
+ },
87
+ "weights": {
88
+ "title": "Weights Schema",
89
+ "type": "object",
90
+ "properties": {
91
+ "kerbWeight": {
92
+ "type": "integer"
93
+ },
94
+ "ladenWeight": {
95
+ "type": "integer"
96
+ },
97
+ "gbWeight": {
98
+ "type": "integer"
99
+ },
100
+ "designWeight": {
101
+ "type": "integer"
102
+ }
103
+ },
104
+ "additionalProperties": false,
105
+ "required": [
106
+ "gbWeight",
107
+ "designWeight"
108
+ ]
109
+ },
110
+ "tyres": {
111
+ "title": "Tyres Schema",
112
+ "type": "object",
113
+ "properties": {
114
+ "tyreSize": {
115
+ "type": "string"
116
+ },
117
+ "plyRating": {
118
+ "type": "string"
119
+ },
120
+ "fitmentCode": {
121
+ "type": "string"
122
+ },
123
+ "dataTrPsvAxles": {
124
+ "type": "integer"
125
+ },
126
+ "tyreCode": {
127
+ "type": "number"
128
+ },
129
+ "dataTrAxles": {
130
+ "type": "number"
131
+ },
132
+ "speedCategorySymbol": {
133
+ "description": "PSV only",
134
+ "type": "string"
135
+ }
136
+ },
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "tyreSize",
140
+ "plyRating",
141
+ "fitmentCode",
142
+ "tyreCode"
143
+ ]
144
+ },
145
+ "brakes": {
146
+ "title": "Axle Brake Properties Schema",
147
+ "type": "object",
148
+ "properties": {
149
+ "brakeActuator": {
150
+ "type": "integer"
151
+ },
152
+ "leverLength": {
153
+ "type": "integer"
154
+ },
155
+ "springBrakeParking": {
156
+ "type": "boolean"
157
+ }
158
+ },
159
+ "required": [
160
+ "brakeActuator",
161
+ "leverLength",
162
+ "springBrakeParking"
163
+ ],
164
+ "additionalProperties": false
165
+ }
166
+ },
167
+ "required": [
168
+ "axleNumber",
169
+ "tyres"
170
+ ],
171
+ "additionalProperties": false
172
+ },
173
+ "additionalProperties": false
174
+ },
175
+ "vehicleClass": {
176
+ "title": "Vehicle Class Schema",
177
+ "type": "object",
178
+ "properties": {
179
+ "code": {
180
+ "type": "string"
181
+ },
182
+ "description": {
183
+ "type": "string"
184
+ }
185
+ },
186
+ "additionalProperties": false,
187
+ "required": [
188
+ "code",
189
+ "description"
190
+ ]
191
+ },
192
+ "vehicleSubclass": {
193
+ "type": "array",
194
+ "items": {
195
+ "type": "string"
196
+ }
197
+ },
198
+ "vehicleConfiguration": {
199
+ "type": "string"
200
+ },
201
+ "recordCompleteness": {
202
+ "type": "string"
203
+ },
204
+ "chassisMake": {
205
+ "type": "string"
206
+ },
207
+ "chassisModel": {
208
+ "type": "string"
209
+ },
210
+ "bodyMake": {
211
+ "type": "string"
212
+ },
213
+ "bodyModel": {
214
+ "type": "string"
215
+ },
216
+ "vehicleSize": {
217
+ "type": "string"
218
+ },
219
+ "coifDate": {
220
+ "type": "string"
221
+ },
222
+ "unladenWeight": {
223
+ "type": "integer"
224
+ },
225
+ "grossGbWeight": {
226
+ "type": "integer"
227
+ },
228
+ "grossDesignWeight": {
229
+ "type": "integer"
230
+ },
231
+ "grossUnladenWeight": {
232
+ "type": "integer"
233
+ },
234
+ "seatsLowerDeck": {
235
+ "type": "integer"
236
+ },
237
+ "seatsUpperDeck": {
238
+ "type": "integer"
239
+ },
240
+ "standingCapacity": {
241
+ "type": "integer"
242
+ },
243
+ "speedRestriction": {
244
+ "type": "integer"
245
+ },
246
+ "dispensations": {
247
+ "type": "string"
248
+ },
249
+ "remarks": {
250
+ "type": "string"
251
+ },
252
+ "brakes": {
253
+ "title": "Brake",
254
+ "type": "object",
255
+ "properties": {
256
+ "brakeCode": {
257
+ "type": "string"
258
+ },
259
+ "dataTrBrakeOne": {
260
+ "type": "string"
261
+ },
262
+ "dataTrBrakeTwo": {
263
+ "type": "string"
264
+ },
265
+ "dataTrBrakeThree": {
266
+ "type": "string"
267
+ },
268
+ "retarderBrakeOne": {
269
+ "type": "string"
270
+ },
271
+ "retarderBrakeTwo": {
272
+ "type": "string"
273
+ },
274
+ "brakeCodeOriginal": {
275
+ "type": "string"
276
+ },
277
+ "brakeForceWheelsNotLocked": {
278
+ "title": "Brake Force Wheel",
279
+ "type": "object",
280
+ "properties": {
281
+ "serviceBrakeForce": {
282
+ "type": "integer"
283
+ },
284
+ "secondaryBrakeForce": {
285
+ "type": "integer"
286
+ },
287
+ "parkingBrakeForce": {
288
+ "type": "integer"
289
+ }
290
+ },
291
+ "required": [
292
+ "serviceBrakeForce",
293
+ "secondaryBrakeForce",
294
+ "parkingBrakeForce"
295
+ ],
296
+ "additionalProperties": false
297
+ },
298
+ "brakeForceWheelsUpToHalfLocked": {
299
+ "title": "Brake Force Wheel",
300
+ "type": "object",
301
+ "properties": {
302
+ "serviceBrakeForce": {
303
+ "type": "integer"
304
+ },
305
+ "secondaryBrakeForce": {
306
+ "type": "integer"
307
+ },
308
+ "parkingBrakeForce": {
309
+ "type": "integer"
310
+ }
311
+ },
312
+ "required": [
313
+ "serviceBrakeForce",
314
+ "secondaryBrakeForce",
315
+ "parkingBrakeForce"
316
+ ],
317
+ "additionalProperties": false
318
+ },
319
+ "dtpNumber": {
320
+ "type": "string"
321
+ },
322
+ "loadSensingValve": {
323
+ "type": "boolean"
324
+ },
325
+ "antilockBrakingSystem": {
326
+ "type": "boolean"
327
+ }
328
+ },
329
+ "additionalProperties": false
330
+ },
331
+ "make": {
332
+ "type": "string"
333
+ },
334
+ "model": {
335
+ "type": "string"
336
+ },
337
+ "functionCode": {
338
+ "type": "string"
339
+ },
340
+ "typeUseCode": {
341
+ "type": "string"
342
+ },
343
+ "roadFriendly": {
344
+ "type": "boolean"
345
+ },
346
+ "drawbarCouplingFitted": {
347
+ "type": "boolean"
348
+ },
349
+ "dimensions": {
350
+ "title": "Dimensions Schema",
351
+ "type": "object",
352
+ "properties": {
353
+ "length": {
354
+ "type": "integer"
355
+ },
356
+ "width": {
357
+ "type": "integer"
358
+ },
359
+ "axleSpacing": {
360
+ "type": "array",
361
+ "items": {
362
+ "properties": {
363
+ "axles": {
364
+ "type": "string"
365
+ },
366
+ "value": {
367
+ "type": "integer"
368
+ }
369
+ },
370
+ "required": [
371
+ "axles",
372
+ "value"
373
+ ],
374
+ "additionalProperties": false
375
+ },
376
+ "minItems": 1,
377
+ "maxItems": 1
378
+ }
379
+ },
380
+ "required": [
381
+ "length",
382
+ "width",
383
+ "axleSpacing"
384
+ ],
385
+ "additionalProperties": false
386
+ },
387
+ "notes": {
388
+ "type": "string"
389
+ },
390
+ "adrDetails": {
391
+ "title": "ADR Details Schema",
392
+ "type": "object",
393
+ "properties": {
394
+ "vehicleDetails": {
395
+ "type": "object",
396
+ "properties": {
397
+ "type": {
398
+ "type": "string"
399
+ },
400
+ "approvalDate": {
401
+ "type": "string"
402
+ }
403
+ },
404
+ "additionalProperties": false
405
+ },
406
+ "listStatementApplicable": {
407
+ "type": "boolean"
408
+ },
409
+ "batteryListNumber": {
410
+ "type": "string"
411
+ },
412
+ "permittedDangerousGoods": {
413
+ "type": "array",
414
+ "items": {
415
+ "type": "string"
416
+ }
417
+ },
418
+ "additionalExaminerNotes": {
419
+ "type": "string"
420
+ },
421
+ "applicantDetails": {
422
+ "title": "Applicant Details Schema",
423
+ "type": "object",
424
+ "properties": {
425
+ "name": {
426
+ "type": "string"
427
+ },
428
+ "street": {
429
+ "type": "string"
430
+ },
431
+ "town": {
432
+ "type": "string"
433
+ },
434
+ "city": {
435
+ "type": "string"
436
+ },
437
+ "postcode": {
438
+ "type": "string"
439
+ }
440
+ },
441
+ "additionalProperties": false
442
+ },
443
+ "memosApply": {
444
+ "type": "array",
445
+ "items": {
446
+ "type": "string"
447
+ }
448
+ },
449
+ "additionalNotes": {
450
+ "type": "object",
451
+ "properties": {
452
+ "number": {
453
+ "type": "array",
454
+ "items": {
455
+ "type": "string"
456
+ }
457
+ },
458
+ "guidanceNotes": {
459
+ "type": "array",
460
+ "items": {
461
+ "type": "string"
462
+ }
463
+ }
464
+ },
465
+ "additionalProperties": false
466
+ },
467
+ "adrTypeApprovalNo": {
468
+ "type": "string"
469
+ },
470
+ "compatibilityGroupJ": {
471
+ "type": "boolean"
472
+ },
473
+ "tank": {
474
+ "title": "Tank Schema",
475
+ "type": "object",
476
+ "properties": {
477
+ "tankDetails": {
478
+ "title": "Tank Details Schema",
479
+ "type": "object",
480
+ "properties": {
481
+ "tankManufacturer": {
482
+ "type": "string"
483
+ },
484
+ "tc2Details": {
485
+ "title": "TC2 Details Schema",
486
+ "type": "object",
487
+ "properties": {
488
+ "tc2Type": {
489
+ "type": "string"
490
+ },
491
+ "tc2IntermediateApprovalNo": {
492
+ "type": "string"
493
+ },
494
+ "tc2IntermediateExpiryDate": {
495
+ "type": "string"
496
+ }
497
+ },
498
+ "additionalProperties": false
499
+ },
500
+ "tc3Details": {
501
+ "type": "array",
502
+ "items": {
503
+ "title": "TC3 Details Schema",
504
+ "type": "object",
505
+ "properties": {
506
+ "tc3Type": {
507
+ "type": "string"
508
+ },
509
+ "tc3IntermediateApprovalNo": {
510
+ "type": "string"
511
+ },
512
+ "tc3IntermediateExpiryDate": {
513
+ "type": "string"
514
+ }
515
+ },
516
+ "additionalProperties": false
517
+ }
518
+ },
519
+ "yearOfManufacture": {
520
+ "type": "string"
521
+ },
522
+ "tankCode": {
523
+ "type": "string"
524
+ },
525
+ "specialProvisions": {
526
+ "type": "string"
527
+ },
528
+ "tankManufacturerSerialNo": {
529
+ "type": "string"
530
+ },
531
+ "tankTypeAppNo": {
532
+ "type": "string"
533
+ }
534
+ },
535
+ "additionalProperties": false
536
+ },
537
+ "tankStatement": {
538
+ "title": "Tank Statement Schema",
539
+ "type": "object",
540
+ "properties": {
541
+ "substancesPermitted": {
542
+ "type": "string"
543
+ },
544
+ "statement": {
545
+ "type": "string"
546
+ },
547
+ "productList": {
548
+ "type": "string"
549
+ },
550
+ "productListRefNo": {
551
+ "type": "string"
552
+ },
553
+ "productListUnNo": {
554
+ "type": "array",
555
+ "items": {
556
+ "type": "string"
557
+ }
558
+ }
559
+ },
560
+ "additionalProperties": false
561
+ }
562
+ },
563
+ "additionalProperties": false
564
+ }
565
+ },
566
+ "additionalProperties": false
567
+ },
568
+ "trainGbWeight": {
569
+ "type": "integer"
570
+ },
571
+ "trainDesignWeight": {
572
+ "type": "integer"
573
+ },
574
+ "maxTrainGbWeight": {
575
+ "type": "integer"
576
+ },
577
+ "maxTrainDesignWeight": {
578
+ "type": "integer"
579
+ },
580
+ "euroStandard": {
581
+ "type": "integer"
582
+ },
583
+ "frontAxleTo5thWheelMin": {
584
+ "type": "integer"
585
+ },
586
+ "frontAxleTo5thWheelMax": {
587
+ "type": "integer"
588
+ },
589
+ "frontAxleTo5thWheelCouplingMin": {
590
+ "type": "integer"
591
+ },
592
+ "frontAxleTo5thWheelCouplingMax": {
593
+ "type": "integer"
594
+ },
595
+ "firstUseDate": {
596
+ "type": "string"
597
+ },
598
+ "maxLoadOnCoupling": {
599
+ "type": "integer"
600
+ },
601
+ "suspensionType": {
602
+ "type": "string"
603
+ },
604
+ "couplingType": {
605
+ "type": "string"
606
+ },
607
+ "frontAxleToRearAxle": {
608
+ "type": "integer"
609
+ },
610
+ "rearAxleToRearTrl": {
611
+ "type": "integer"
612
+ },
613
+ "couplingCenterToRearAxleMin": {
614
+ "type": "integer"
615
+ },
616
+ "couplingCenterToRearAxleMax": {
617
+ "type": "integer"
618
+ },
619
+ "couplingCenterToRearTrlMin": {
620
+ "type": "integer"
621
+ },
622
+ "couplingCenterToRearTrlMax": {
623
+ "type": "integer"
624
+ },
625
+ "numberOfWheelsDriven": {
626
+ "type": "integer"
627
+ }
628
+ },
629
+ "additionalProperties": false,
630
+ "required": [
631
+ "bodyType",
632
+ "regnDate",
633
+ "manufactureYear",
634
+ "ntaNumber",
635
+ "conversionRefNo",
636
+ "speedLimiterMrk",
637
+ "tachoExemptMrk",
638
+ "reasonForCreation",
639
+ "statusCode",
640
+ "grossKerbWeight",
641
+ "grossLadenWeight",
642
+ "noOfAxles",
643
+ "brakeCode",
644
+ "vehicleType",
645
+ "euVehicleCategory",
646
+ "axles",
647
+ "vehicleClass",
648
+ "vehicleSubclass",
649
+ "vehicleConfiguration",
650
+ "notes"
651
+ ]
652
+ },
653
+ "testResultsHistory": {
654
+ "type": "array",
655
+ "items": {
656
+ "title": "Test Result Schema",
657
+ "type": "object",
658
+ "properties": {
659
+ "testResultId": {
660
+ "type": "string"
661
+ },
662
+ "testStationName": {
663
+ "type": "string"
664
+ },
665
+ "testStationPNumber": {
666
+ "type": "string"
667
+ },
668
+ "testStationType": {
669
+ "type": "string"
670
+ },
671
+ "testerName": {
672
+ "type": "string"
673
+ },
674
+ "testerStaffId": {
675
+ "type": "string"
676
+ },
677
+ "testerEmailAddress": {
678
+ "type": "string"
679
+ },
680
+ "testStartTimestamp": {
681
+ "type": "string"
682
+ },
683
+ "testEndTimestamp": {
684
+ "type": "string"
685
+ },
686
+ "testStatus": {
687
+ "type": "string"
688
+ },
689
+ "reasonForCancellation": {
690
+ "type": [
691
+ "string",
692
+ "null"
693
+ ]
694
+ },
695
+ "systemNumber": {
696
+ "type": "string"
697
+ },
698
+ "vrm": {
699
+ "type": "string"
700
+ },
701
+ "trailerId": {
702
+ "type": "string"
703
+ },
704
+ "vin": {
705
+ "type": "string"
706
+ },
707
+ "vehicleClass": {
708
+ "title": "Vehicle Class Schema",
709
+ "type": "object",
710
+ "properties": {
711
+ "code": {
712
+ "type": "string"
713
+ },
714
+ "description": {
715
+ "type": "string"
716
+ }
717
+ },
718
+ "additionalProperties": false,
719
+ "required": [
720
+ "code",
721
+ "description"
722
+ ]
723
+ },
724
+ "vehicleSubclass": {
725
+ "type": "array",
726
+ "items": {
727
+ "type": "string"
728
+ }
729
+ },
730
+ "vehicleType": {
731
+ "type": "string"
732
+ },
733
+ "vehicleConfiguration": {
734
+ "type": "string"
735
+ },
736
+ "odometerReading": {
737
+ "type": [
738
+ "number",
739
+ "null"
740
+ ]
741
+ },
742
+ "odometerReadingUnits": {
743
+ "type": [
744
+ "string",
745
+ "null"
746
+ ]
747
+ },
748
+ "preparerId": {
749
+ "type": "string"
750
+ },
751
+ "preparerName": {
752
+ "type": "string"
753
+ },
754
+ "euVehicleCategory": {
755
+ "type": "string"
756
+ },
757
+ "countryOfRegistration": {
758
+ "type": [
759
+ "string",
760
+ "null"
761
+ ]
762
+ },
763
+ "noOfAxles": {
764
+ "type": "integer"
765
+ },
766
+ "numberOfWheelsDriven": {
767
+ "type": "integer"
768
+ },
769
+ "vehicleSize": {
770
+ "type": "string"
771
+ },
772
+ "numberOfSeats": {
773
+ "type": "integer"
774
+ },
775
+ "regnDate": {
776
+ "type": "string"
777
+ },
778
+ "firstUseDate": {
779
+ "type": "string"
780
+ },
781
+ "testTypes": {
782
+ "type": "array",
783
+ "items": {
784
+ "title": "Test Type Schema",
785
+ "type": "object",
786
+ "properties": {
787
+ "testTypeName": {
788
+ "type": "string"
789
+ },
790
+ "name": {
791
+ "type": "string"
792
+ },
793
+ "testTypeId": {
794
+ "type": "string"
795
+ },
796
+ "certificateNumber": {
797
+ "type": [
798
+ "string",
799
+ "null"
800
+ ]
801
+ },
802
+ "secondaryCertificateNumber": {
803
+ "type": [
804
+ "string",
805
+ "null"
806
+ ]
807
+ },
808
+ "testTypeStartTimestamp": {
809
+ "type": [
810
+ "string",
811
+ "null"
812
+ ]
813
+ },
814
+ "testTypeEndTimestamp": {
815
+ "type": [
816
+ "string",
817
+ "null"
818
+ ]
819
+ },
820
+ "testResult": {
821
+ "type": [
822
+ "string",
823
+ "null"
824
+ ]
825
+ },
826
+ "prohibitionIssued": {
827
+ "type": [
828
+ "boolean",
829
+ "null"
830
+ ]
831
+ },
832
+ "reasonForAbandoning": {
833
+ "type": [
834
+ "string",
835
+ "null"
836
+ ]
837
+ },
838
+ "additionalNotesRecorded": {
839
+ "type": [
840
+ "string",
841
+ "null"
842
+ ]
843
+ },
844
+ "additionalCommentsForAbandon": {
845
+ "type": [
846
+ "string",
847
+ "null"
848
+ ]
849
+ },
850
+ "numberOfSeatbeltsFitted": {
851
+ "type": [
852
+ "integer",
853
+ "null"
854
+ ]
855
+ },
856
+ "lastSeatbeltInstallationCheckDate": {
857
+ "type": [
858
+ "string",
859
+ "null"
860
+ ]
861
+ },
862
+ "seatbeltInstallationCheckDate": {
863
+ "type": [
864
+ "boolean",
865
+ "null"
866
+ ]
867
+ },
868
+ "testExpiryDate": {
869
+ "type": "string"
870
+ },
871
+ "modType": {
872
+ "anyOf": [
873
+ {
874
+ "title": "Mod Type Schema",
875
+ "type": "object",
876
+ "properties": {
877
+ "code": {
878
+ "type": "string"
879
+ },
880
+ "description": {
881
+ "type": "string"
882
+ }
883
+ },
884
+ "required": [
885
+ "code",
886
+ "description"
887
+ ],
888
+ "additionalProperties": false
889
+ },
890
+ {
891
+ "type": "string"
892
+ },
893
+ {
894
+ "type": "null"
895
+ }
896
+ ]
897
+ },
898
+ "emissionStandard": {
899
+ "type": "string"
900
+ },
901
+ "fuelType": {
902
+ "type": "string"
903
+ },
904
+ "modificationTypeUsed": {
905
+ "type": "string"
906
+ },
907
+ "smokeTestKLimitApplied": {
908
+ "type": "string"
909
+ },
910
+ "particulateTrapFitted": {
911
+ "type": "string"
912
+ },
913
+ "particulateTrapSerialNumber": {
914
+ "type": "string"
915
+ },
916
+ "defects": {
917
+ "type": [
918
+ "array"
919
+ ],
920
+ "items": {
921
+ "title": "Defect Details Schema",
922
+ "type": "object",
923
+ "properties": {
924
+ "imNumber": {
925
+ "type": "integer"
926
+ },
927
+ "imDescription": {
928
+ "type": "string"
929
+ },
930
+ "additionalInformation": {
931
+ "properties": {
932
+ "location": {
933
+ "title": "Defect Location Schema",
934
+ "type": "object",
935
+ "properties": {
936
+ "vertical": {
937
+ "type": [
938
+ "string",
939
+ "null"
940
+ ]
941
+ },
942
+ "horizontal": {
943
+ "type": [
944
+ "string",
945
+ "null"
946
+ ]
947
+ },
948
+ "lateral": {
949
+ "type": [
950
+ "string",
951
+ "null"
952
+ ]
953
+ },
954
+ "longitudinal": {
955
+ "type": [
956
+ "string",
957
+ "null"
958
+ ]
959
+ },
960
+ "rowNumber": {
961
+ "type": [
962
+ "integer",
963
+ "null"
964
+ ]
965
+ },
966
+ "seatNumber": {
967
+ "type": [
968
+ "integer",
969
+ "null"
970
+ ]
971
+ },
972
+ "axleNumber": {
973
+ "type": [
974
+ "integer",
975
+ "null"
976
+ ]
977
+ }
978
+ },
979
+ "additionalProperties": false
980
+ },
981
+ "notes": {
982
+ "type": "string"
983
+ }
984
+ },
985
+ "additionalProperties": false,
986
+ "required": [
987
+ "location",
988
+ "notes"
989
+ ]
990
+ },
991
+ "itemNumber": {
992
+ "type": "integer"
993
+ },
994
+ "itemDescription": {
995
+ "type": "string"
996
+ },
997
+ "deficiencyRef": {
998
+ "type": "string"
999
+ },
1000
+ "deficiencyId": {
1001
+ "type": [
1002
+ "string",
1003
+ "null"
1004
+ ]
1005
+ },
1006
+ "deficiencySubId": {
1007
+ "type": [
1008
+ "string",
1009
+ "null"
1010
+ ]
1011
+ },
1012
+ "deficiencyCategory": {
1013
+ "type": "string"
1014
+ },
1015
+ "deficiencyText": {
1016
+ "type": [
1017
+ "string",
1018
+ "null"
1019
+ ]
1020
+ },
1021
+ "stdForProhibition": {
1022
+ "type": [
1023
+ "boolean",
1024
+ "null"
1025
+ ]
1026
+ },
1027
+ "prs": {
1028
+ "type": [
1029
+ "boolean",
1030
+ "null"
1031
+ ]
1032
+ },
1033
+ "prohibitionIssued": {
1034
+ "type": [
1035
+ "boolean",
1036
+ "null"
1037
+ ]
1038
+ },
1039
+ "metadata": {
1040
+ "title": "Defect Metadata Schema",
1041
+ "type": "object",
1042
+ "properties": {
1043
+ "category": {
1044
+ "properties": {
1045
+ "additionalInfo": {
1046
+ "title": "Defect Additional Details Metadata Schema",
1047
+ "type": "object",
1048
+ "properties": {
1049
+ "location": {
1050
+ "title": "Defect Location Metadata Schema",
1051
+ "type": "object",
1052
+ "properties": {
1053
+ "vertical": {
1054
+ "anyOf": [
1055
+ {
1056
+ "type": "array",
1057
+ "items": {
1058
+ "type": "string"
1059
+ }
1060
+ },
1061
+ {
1062
+ "type": "null"
1063
+ }
1064
+ ]
1065
+ },
1066
+ "horizontal": {
1067
+ "anyOf": [
1068
+ {
1069
+ "type": "array",
1070
+ "items": {
1071
+ "type": "string"
1072
+ }
1073
+ },
1074
+ {
1075
+ "type": "null"
1076
+ }
1077
+ ]
1078
+ },
1079
+ "lateral": {
1080
+ "anyOf": [
1081
+ {
1082
+ "type": "array",
1083
+ "items": {
1084
+ "type": "string"
1085
+ }
1086
+ },
1087
+ {
1088
+ "type": "null"
1089
+ }
1090
+ ]
1091
+ },
1092
+ "longitudinal": {
1093
+ "anyOf": [
1094
+ {
1095
+ "type": "array",
1096
+ "items": {
1097
+ "type": "string"
1098
+ }
1099
+ },
1100
+ {
1101
+ "type": "null"
1102
+ }
1103
+ ]
1104
+ },
1105
+ "rowNumber": {
1106
+ "anyOf": [
1107
+ {
1108
+ "type": "array",
1109
+ "items": {
1110
+ "type": "number"
1111
+ }
1112
+ },
1113
+ {
1114
+ "type": "null"
1115
+ }
1116
+ ]
1117
+ },
1118
+ "seatNumber": {
1119
+ "anyOf": [
1120
+ {
1121
+ "type": "array",
1122
+ "items": {
1123
+ "type": "integer"
1124
+ }
1125
+ },
1126
+ {
1127
+ "type": "null"
1128
+ }
1129
+ ]
1130
+ },
1131
+ "axleNumber": {
1132
+ "anyOf": [
1133
+ {
1134
+ "type": "array",
1135
+ "items": {
1136
+ "type": "number"
1137
+ }
1138
+ },
1139
+ {
1140
+ "type": "null"
1141
+ }
1142
+ ]
1143
+ }
1144
+ },
1145
+ "additionalProperties": false
1146
+ },
1147
+ "notes": {
1148
+ "type": "boolean"
1149
+ }
1150
+ },
1151
+ "additionalProperties": false,
1152
+ "required": [
1153
+ "location",
1154
+ "notes"
1155
+ ]
1156
+ }
1157
+ },
1158
+ "additionalProperties": false
1159
+ }
1160
+ },
1161
+ "additionalProperties": false,
1162
+ "required": [
1163
+ "category"
1164
+ ]
1165
+ }
1166
+ },
1167
+ "additionalProperties": false,
1168
+ "required": [
1169
+ "imNumber",
1170
+ "imDescription",
1171
+ "additionalInformation",
1172
+ "itemNumber",
1173
+ "itemDescription",
1174
+ "deficiencyRef",
1175
+ "deficiencyId",
1176
+ "deficiencySubId",
1177
+ "deficiencyCategory",
1178
+ "deficiencyText",
1179
+ "stdForProhibition",
1180
+ "prs",
1181
+ "prohibitionIssued",
1182
+ "metadata"
1183
+ ]
1184
+ }
1185
+ },
1186
+ "customDefects": {
1187
+ "type": [
1188
+ "array"
1189
+ ],
1190
+ "items": {
1191
+ "title": "Specialist Custom Defects Schema",
1192
+ "type": "object",
1193
+ "properties": {
1194
+ "referenceNumber": {
1195
+ "type": "string"
1196
+ },
1197
+ "defectName": {
1198
+ "type": "string"
1199
+ },
1200
+ "defectNotes": {
1201
+ "type": "string"
1202
+ },
1203
+ "hasAllMandatoryFields": {
1204
+ "type": "boolean",
1205
+ "description": "FE only"
1206
+ }
1207
+ },
1208
+ "additionalProperties": false,
1209
+ "required": [
1210
+ "referenceNumber",
1211
+ "defectName",
1212
+ "defectNotes"
1213
+ ]
1214
+ }
1215
+ },
1216
+ "completionStatus": {
1217
+ "type": "string"
1218
+ },
1219
+ "testTypeCategoryName": {
1220
+ "type": "string"
1221
+ },
1222
+ "reasons": {
1223
+ "type": "array",
1224
+ "items": {
1225
+ "type": "string"
1226
+ }
1227
+ },
1228
+ "testNumber": {
1229
+ "type": "string"
1230
+ },
1231
+ "linkedIds": {
1232
+ "anyOf": [
1233
+ {
1234
+ "type": "array",
1235
+ "items": {
1236
+ "type": "string"
1237
+ }
1238
+ },
1239
+ {
1240
+ "type": "null"
1241
+ }
1242
+ ]
1243
+ }
1244
+ },
1245
+ "required": [
1246
+ "testTypeName",
1247
+ "name",
1248
+ "testTypeId",
1249
+ "certificateNumber",
1250
+ "secondaryCertificateNumber",
1251
+ "testTypeStartTimestamp",
1252
+ "testTypeEndTimestamp",
1253
+ "testResult",
1254
+ "prohibitionIssued",
1255
+ "reasonForAbandoning",
1256
+ "additionalNotesRecorded",
1257
+ "additionalCommentsForAbandon",
1258
+ "defects"
1259
+ ],
1260
+ "additionalProperties": false
1261
+ }
1262
+ }
1263
+ },
1264
+ "additionalProperties": false,
1265
+ "required": [
1266
+ "testResultId",
1267
+ "testStationName",
1268
+ "testStationPNumber",
1269
+ "testStationType",
1270
+ "testerName",
1271
+ "testerStaffId",
1272
+ "testerEmailAddress",
1273
+ "testStartTimestamp",
1274
+ "testEndTimestamp",
1275
+ "testStatus",
1276
+ "reasonForCancellation",
1277
+ "systemNumber",
1278
+ "vin",
1279
+ "vehicleClass",
1280
+ "vehicleType",
1281
+ "vehicleConfiguration",
1282
+ "preparerId",
1283
+ "preparerName",
1284
+ "euVehicleCategory",
1285
+ "countryOfRegistration",
1286
+ "noOfAxles",
1287
+ "numberOfWheelsDriven",
1288
+ "testTypes"
1289
+ ]
1290
+ }
1291
+ },
1292
+ "countryOfRegistration": {
1293
+ "type": "string"
1294
+ },
1295
+ "euVehicleCategory": {
1296
+ "type": "string"
1297
+ },
1298
+ "odometerReading": {
1299
+ "type": "string"
1300
+ },
1301
+ "odometerMetric": {
1302
+ "type": "string"
1303
+ },
1304
+ "preparerId": {
1305
+ "type": "string"
1306
+ },
1307
+ "preparerName": {
1308
+ "type": "string"
1309
+ },
1310
+ "testTypes": {
1311
+ "type": "array",
1312
+ "items": {
1313
+ "title": "Test Type Schema",
1314
+ "type": "object",
1315
+ "properties": {
1316
+ "testTypeName": {
1317
+ "type": "string"
1318
+ },
1319
+ "name": {
1320
+ "type": "string"
1321
+ },
1322
+ "testTypeId": {
1323
+ "type": "string"
1324
+ },
1325
+ "certificateNumber": {
1326
+ "type": [
1327
+ "string",
1328
+ "null"
1329
+ ]
1330
+ },
1331
+ "secondaryCertificateNumber": {
1332
+ "type": [
1333
+ "string",
1334
+ "null"
1335
+ ]
1336
+ },
1337
+ "testTypeStartTimestamp": {
1338
+ "type": [
1339
+ "string",
1340
+ "null"
1341
+ ]
1342
+ },
1343
+ "testTypeEndTimestamp": {
1344
+ "type": [
1345
+ "string",
1346
+ "null"
1347
+ ]
1348
+ },
1349
+ "testResult": {
1350
+ "type": [
1351
+ "string",
1352
+ "null"
1353
+ ]
1354
+ },
1355
+ "prohibitionIssued": {
1356
+ "type": [
1357
+ "boolean",
1358
+ "null"
1359
+ ]
1360
+ },
1361
+ "reasonForAbandoning": {
1362
+ "type": [
1363
+ "string",
1364
+ "null"
1365
+ ]
1366
+ },
1367
+ "additionalNotesRecorded": {
1368
+ "type": [
1369
+ "string",
1370
+ "null"
1371
+ ]
1372
+ },
1373
+ "additionalCommentsForAbandon": {
1374
+ "type": [
1375
+ "string",
1376
+ "null"
1377
+ ]
1378
+ },
1379
+ "numberOfSeatbeltsFitted": {
1380
+ "type": [
1381
+ "integer",
1382
+ "null"
1383
+ ]
1384
+ },
1385
+ "lastSeatbeltInstallationCheckDate": {
1386
+ "type": [
1387
+ "string",
1388
+ "null"
1389
+ ]
1390
+ },
1391
+ "seatbeltInstallationCheckDate": {
1392
+ "type": [
1393
+ "boolean",
1394
+ "null"
1395
+ ]
1396
+ },
1397
+ "testExpiryDate": {
1398
+ "type": "string"
1399
+ },
1400
+ "modType": {
1401
+ "anyOf": [
1402
+ {
1403
+ "title": "Mod Type Schema",
1404
+ "type": "object",
1405
+ "properties": {
1406
+ "code": {
1407
+ "type": "string"
1408
+ },
1409
+ "description": {
1410
+ "type": "string"
1411
+ }
1412
+ },
1413
+ "required": [
1414
+ "code",
1415
+ "description"
1416
+ ],
1417
+ "additionalProperties": false
1418
+ },
1419
+ {
1420
+ "type": "string"
1421
+ },
1422
+ {
1423
+ "type": "null"
1424
+ }
1425
+ ]
1426
+ },
1427
+ "emissionStandard": {
1428
+ "type": "string"
1429
+ },
1430
+ "fuelType": {
1431
+ "type": "string"
1432
+ },
1433
+ "modificationTypeUsed": {
1434
+ "type": "string"
1435
+ },
1436
+ "smokeTestKLimitApplied": {
1437
+ "type": "string"
1438
+ },
1439
+ "particulateTrapFitted": {
1440
+ "type": "string"
1441
+ },
1442
+ "particulateTrapSerialNumber": {
1443
+ "type": "string"
1444
+ },
1445
+ "defects": {
1446
+ "type": [
1447
+ "array"
1448
+ ],
1449
+ "items": {
1450
+ "title": "Defect Details Schema",
1451
+ "type": "object",
1452
+ "properties": {
1453
+ "imNumber": {
1454
+ "type": "integer"
1455
+ },
1456
+ "imDescription": {
1457
+ "type": "string"
1458
+ },
1459
+ "additionalInformation": {
1460
+ "properties": {
1461
+ "location": {
1462
+ "title": "Defect Location Schema",
1463
+ "type": "object",
1464
+ "properties": {
1465
+ "vertical": {
1466
+ "type": [
1467
+ "string",
1468
+ "null"
1469
+ ]
1470
+ },
1471
+ "horizontal": {
1472
+ "type": [
1473
+ "string",
1474
+ "null"
1475
+ ]
1476
+ },
1477
+ "lateral": {
1478
+ "type": [
1479
+ "string",
1480
+ "null"
1481
+ ]
1482
+ },
1483
+ "longitudinal": {
1484
+ "type": [
1485
+ "string",
1486
+ "null"
1487
+ ]
1488
+ },
1489
+ "rowNumber": {
1490
+ "type": [
1491
+ "integer",
1492
+ "null"
1493
+ ]
1494
+ },
1495
+ "seatNumber": {
1496
+ "type": [
1497
+ "integer",
1498
+ "null"
1499
+ ]
1500
+ },
1501
+ "axleNumber": {
1502
+ "type": [
1503
+ "integer",
1504
+ "null"
1505
+ ]
1506
+ }
1507
+ },
1508
+ "additionalProperties": false
1509
+ },
1510
+ "notes": {
1511
+ "type": "string"
1512
+ }
1513
+ },
1514
+ "additionalProperties": false,
1515
+ "required": [
1516
+ "location",
1517
+ "notes"
1518
+ ]
1519
+ },
1520
+ "itemNumber": {
1521
+ "type": "integer"
1522
+ },
1523
+ "itemDescription": {
1524
+ "type": "string"
1525
+ },
1526
+ "deficiencyRef": {
1527
+ "type": "string"
1528
+ },
1529
+ "deficiencyId": {
1530
+ "type": [
1531
+ "string",
1532
+ "null"
1533
+ ]
1534
+ },
1535
+ "deficiencySubId": {
1536
+ "type": [
1537
+ "string",
1538
+ "null"
1539
+ ]
1540
+ },
1541
+ "deficiencyCategory": {
1542
+ "type": "string"
1543
+ },
1544
+ "deficiencyText": {
1545
+ "type": [
1546
+ "string",
1547
+ "null"
1548
+ ]
1549
+ },
1550
+ "stdForProhibition": {
1551
+ "type": [
1552
+ "boolean",
1553
+ "null"
1554
+ ]
1555
+ },
1556
+ "prs": {
1557
+ "type": [
1558
+ "boolean",
1559
+ "null"
1560
+ ]
1561
+ },
1562
+ "prohibitionIssued": {
1563
+ "type": [
1564
+ "boolean",
1565
+ "null"
1566
+ ]
1567
+ },
1568
+ "metadata": {
1569
+ "title": "Defect Metadata Schema",
1570
+ "type": "object",
1571
+ "properties": {
1572
+ "category": {
1573
+ "properties": {
1574
+ "additionalInfo": {
1575
+ "title": "Defect Additional Details Metadata Schema",
1576
+ "type": "object",
1577
+ "properties": {
1578
+ "location": {
1579
+ "title": "Defect Location Metadata Schema",
1580
+ "type": "object",
1581
+ "properties": {
1582
+ "vertical": {
1583
+ "anyOf": [
1584
+ {
1585
+ "type": "array",
1586
+ "items": {
1587
+ "type": "string"
1588
+ }
1589
+ },
1590
+ {
1591
+ "type": "null"
1592
+ }
1593
+ ]
1594
+ },
1595
+ "horizontal": {
1596
+ "anyOf": [
1597
+ {
1598
+ "type": "array",
1599
+ "items": {
1600
+ "type": "string"
1601
+ }
1602
+ },
1603
+ {
1604
+ "type": "null"
1605
+ }
1606
+ ]
1607
+ },
1608
+ "lateral": {
1609
+ "anyOf": [
1610
+ {
1611
+ "type": "array",
1612
+ "items": {
1613
+ "type": "string"
1614
+ }
1615
+ },
1616
+ {
1617
+ "type": "null"
1618
+ }
1619
+ ]
1620
+ },
1621
+ "longitudinal": {
1622
+ "anyOf": [
1623
+ {
1624
+ "type": "array",
1625
+ "items": {
1626
+ "type": "string"
1627
+ }
1628
+ },
1629
+ {
1630
+ "type": "null"
1631
+ }
1632
+ ]
1633
+ },
1634
+ "rowNumber": {
1635
+ "anyOf": [
1636
+ {
1637
+ "type": "array",
1638
+ "items": {
1639
+ "type": "number"
1640
+ }
1641
+ },
1642
+ {
1643
+ "type": "null"
1644
+ }
1645
+ ]
1646
+ },
1647
+ "seatNumber": {
1648
+ "anyOf": [
1649
+ {
1650
+ "type": "array",
1651
+ "items": {
1652
+ "type": "integer"
1653
+ }
1654
+ },
1655
+ {
1656
+ "type": "null"
1657
+ }
1658
+ ]
1659
+ },
1660
+ "axleNumber": {
1661
+ "anyOf": [
1662
+ {
1663
+ "type": "array",
1664
+ "items": {
1665
+ "type": "number"
1666
+ }
1667
+ },
1668
+ {
1669
+ "type": "null"
1670
+ }
1671
+ ]
1672
+ }
1673
+ },
1674
+ "additionalProperties": false
1675
+ },
1676
+ "notes": {
1677
+ "type": "boolean"
1678
+ }
1679
+ },
1680
+ "additionalProperties": false,
1681
+ "required": [
1682
+ "location",
1683
+ "notes"
1684
+ ]
1685
+ }
1686
+ },
1687
+ "additionalProperties": false
1688
+ }
1689
+ },
1690
+ "additionalProperties": false,
1691
+ "required": [
1692
+ "category"
1693
+ ]
1694
+ }
1695
+ },
1696
+ "additionalProperties": false,
1697
+ "required": [
1698
+ "imNumber",
1699
+ "imDescription",
1700
+ "additionalInformation",
1701
+ "itemNumber",
1702
+ "itemDescription",
1703
+ "deficiencyRef",
1704
+ "deficiencyId",
1705
+ "deficiencySubId",
1706
+ "deficiencyCategory",
1707
+ "deficiencyText",
1708
+ "stdForProhibition",
1709
+ "prs",
1710
+ "prohibitionIssued",
1711
+ "metadata"
1712
+ ]
1713
+ }
1714
+ },
1715
+ "customDefects": {
1716
+ "type": [
1717
+ "array"
1718
+ ],
1719
+ "items": {
1720
+ "title": "Specialist Custom Defects Schema",
1721
+ "type": "object",
1722
+ "properties": {
1723
+ "referenceNumber": {
1724
+ "type": "string"
1725
+ },
1726
+ "defectName": {
1727
+ "type": "string"
1728
+ },
1729
+ "defectNotes": {
1730
+ "type": "string"
1731
+ },
1732
+ "hasAllMandatoryFields": {
1733
+ "type": "boolean",
1734
+ "description": "FE only"
1735
+ }
1736
+ },
1737
+ "additionalProperties": false,
1738
+ "required": [
1739
+ "referenceNumber",
1740
+ "defectName",
1741
+ "defectNotes"
1742
+ ]
1743
+ }
1744
+ },
1745
+ "completionStatus": {
1746
+ "type": "string"
1747
+ },
1748
+ "testTypeCategoryName": {
1749
+ "type": "string"
1750
+ },
1751
+ "reasons": {
1752
+ "type": "array",
1753
+ "items": {
1754
+ "type": "string"
1755
+ }
1756
+ },
1757
+ "testNumber": {
1758
+ "type": "string"
1759
+ },
1760
+ "linkedIds": {
1761
+ "anyOf": [
1762
+ {
1763
+ "type": "array",
1764
+ "items": {
1765
+ "type": "string"
1766
+ }
1767
+ },
1768
+ {
1769
+ "type": "null"
1770
+ }
1771
+ ]
1772
+ }
1773
+ },
1774
+ "required": [
1775
+ "testTypeName",
1776
+ "name",
1777
+ "testTypeId",
1778
+ "certificateNumber",
1779
+ "secondaryCertificateNumber",
1780
+ "testTypeStartTimestamp",
1781
+ "testTypeEndTimestamp",
1782
+ "testResult",
1783
+ "prohibitionIssued",
1784
+ "reasonForAbandoning",
1785
+ "additionalNotesRecorded",
1786
+ "additionalCommentsForAbandon",
1787
+ "defects"
1788
+ ],
1789
+ "additionalProperties": false
1790
+ }
1791
+ },
1792
+ "trailerId": {
1793
+ "description": "trailer only",
1794
+ "type": "string"
1795
+ }
1796
+ },
1797
+ "additionalProperties": false,
1798
+ "required": [
1799
+ "systemNumber",
1800
+ "vrm",
1801
+ "vin",
1802
+ "techRecord"
1803
+ ]
1804
+ }