@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,479 @@
1
+ {
2
+ "title": "Test Type Schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "testTypeName": {
6
+ "type": "string"
7
+ },
8
+ "name": {
9
+ "type": "string"
10
+ },
11
+ "testTypeId": {
12
+ "type": "string"
13
+ },
14
+ "certificateNumber": {
15
+ "type": [
16
+ "string",
17
+ "null"
18
+ ]
19
+ },
20
+ "secondaryCertificateNumber": {
21
+ "type": [
22
+ "string",
23
+ "null"
24
+ ]
25
+ },
26
+ "testTypeStartTimestamp": {
27
+ "type": [
28
+ "string",
29
+ "null"
30
+ ]
31
+ },
32
+ "testTypeEndTimestamp": {
33
+ "type": [
34
+ "string",
35
+ "null"
36
+ ]
37
+ },
38
+ "testResult": {
39
+ "type": [
40
+ "string",
41
+ "null"
42
+ ]
43
+ },
44
+ "prohibitionIssued": {
45
+ "type": [
46
+ "boolean",
47
+ "null"
48
+ ]
49
+ },
50
+ "reasonForAbandoning": {
51
+ "type": [
52
+ "string",
53
+ "null"
54
+ ]
55
+ },
56
+ "additionalNotesRecorded": {
57
+ "type": [
58
+ "string",
59
+ "null"
60
+ ]
61
+ },
62
+ "additionalCommentsForAbandon": {
63
+ "type": [
64
+ "string",
65
+ "null"
66
+ ]
67
+ },
68
+ "numberOfSeatbeltsFitted": {
69
+ "type": [
70
+ "integer",
71
+ "null"
72
+ ]
73
+ },
74
+ "lastSeatbeltInstallationCheckDate": {
75
+ "type": [
76
+ "string",
77
+ "null"
78
+ ]
79
+ },
80
+ "seatbeltInstallationCheckDate": {
81
+ "type": [
82
+ "boolean",
83
+ "null"
84
+ ]
85
+ },
86
+ "testExpiryDate": {
87
+ "type": "string"
88
+ },
89
+ "modType": {
90
+ "anyOf": [
91
+ {
92
+ "title": "Mod Type Schema",
93
+ "type": "object",
94
+ "properties": {
95
+ "code": {
96
+ "type": "string"
97
+ },
98
+ "description": {
99
+ "type": "string"
100
+ }
101
+ },
102
+ "required": [
103
+ "code",
104
+ "description"
105
+ ],
106
+ "additionalProperties": false
107
+ },
108
+ {
109
+ "type": "string"
110
+ },
111
+ {
112
+ "type": "null"
113
+ }
114
+ ]
115
+ },
116
+ "emissionStandard": {
117
+ "type": "string"
118
+ },
119
+ "fuelType": {
120
+ "type": "string"
121
+ },
122
+ "modificationTypeUsed": {
123
+ "type": "string"
124
+ },
125
+ "smokeTestKLimitApplied": {
126
+ "type": "string"
127
+ },
128
+ "particulateTrapFitted": {
129
+ "type": "string"
130
+ },
131
+ "particulateTrapSerialNumber": {
132
+ "type": "string"
133
+ },
134
+ "defects": {
135
+ "type": [
136
+ "array"
137
+ ],
138
+ "items": {
139
+ "title": "Defect Details Schema",
140
+ "type": "object",
141
+ "properties": {
142
+ "imNumber": {
143
+ "type": "integer"
144
+ },
145
+ "imDescription": {
146
+ "type": "string"
147
+ },
148
+ "additionalInformation": {
149
+ "properties": {
150
+ "location": {
151
+ "title": "Defect Location Schema",
152
+ "type": "object",
153
+ "properties": {
154
+ "vertical": {
155
+ "type": [
156
+ "string",
157
+ "null"
158
+ ]
159
+ },
160
+ "horizontal": {
161
+ "type": [
162
+ "string",
163
+ "null"
164
+ ]
165
+ },
166
+ "lateral": {
167
+ "type": [
168
+ "string",
169
+ "null"
170
+ ]
171
+ },
172
+ "longitudinal": {
173
+ "type": [
174
+ "string",
175
+ "null"
176
+ ]
177
+ },
178
+ "rowNumber": {
179
+ "type": [
180
+ "integer",
181
+ "null"
182
+ ]
183
+ },
184
+ "seatNumber": {
185
+ "type": [
186
+ "integer",
187
+ "null"
188
+ ]
189
+ },
190
+ "axleNumber": {
191
+ "type": [
192
+ "integer",
193
+ "null"
194
+ ]
195
+ }
196
+ },
197
+ "additionalProperties": false
198
+ },
199
+ "notes": {
200
+ "type": "string"
201
+ }
202
+ },
203
+ "additionalProperties": false,
204
+ "required": [
205
+ "location",
206
+ "notes"
207
+ ]
208
+ },
209
+ "itemNumber": {
210
+ "type": "integer"
211
+ },
212
+ "itemDescription": {
213
+ "type": "string"
214
+ },
215
+ "deficiencyRef": {
216
+ "type": "string"
217
+ },
218
+ "deficiencyId": {
219
+ "type": [
220
+ "string",
221
+ "null"
222
+ ]
223
+ },
224
+ "deficiencySubId": {
225
+ "type": [
226
+ "string",
227
+ "null"
228
+ ]
229
+ },
230
+ "deficiencyCategory": {
231
+ "type": "string"
232
+ },
233
+ "deficiencyText": {
234
+ "type": [
235
+ "string",
236
+ "null"
237
+ ]
238
+ },
239
+ "stdForProhibition": {
240
+ "type": [
241
+ "boolean",
242
+ "null"
243
+ ]
244
+ },
245
+ "prs": {
246
+ "type": [
247
+ "boolean",
248
+ "null"
249
+ ]
250
+ },
251
+ "prohibitionIssued": {
252
+ "type": [
253
+ "boolean",
254
+ "null"
255
+ ]
256
+ },
257
+ "metadata": {
258
+ "title": "Defect Metadata Schema",
259
+ "type": "object",
260
+ "properties": {
261
+ "category": {
262
+ "properties": {
263
+ "additionalInfo": {
264
+ "title": "Defect Additional Details Metadata Schema",
265
+ "type": "object",
266
+ "properties": {
267
+ "location": {
268
+ "title": "Defect Location Metadata Schema",
269
+ "type": "object",
270
+ "properties": {
271
+ "vertical": {
272
+ "anyOf": [
273
+ {
274
+ "type": "array",
275
+ "items": {
276
+ "type": "string"
277
+ }
278
+ },
279
+ {
280
+ "type": "null"
281
+ }
282
+ ]
283
+ },
284
+ "horizontal": {
285
+ "anyOf": [
286
+ {
287
+ "type": "array",
288
+ "items": {
289
+ "type": "string"
290
+ }
291
+ },
292
+ {
293
+ "type": "null"
294
+ }
295
+ ]
296
+ },
297
+ "lateral": {
298
+ "anyOf": [
299
+ {
300
+ "type": "array",
301
+ "items": {
302
+ "type": "string"
303
+ }
304
+ },
305
+ {
306
+ "type": "null"
307
+ }
308
+ ]
309
+ },
310
+ "longitudinal": {
311
+ "anyOf": [
312
+ {
313
+ "type": "array",
314
+ "items": {
315
+ "type": "string"
316
+ }
317
+ },
318
+ {
319
+ "type": "null"
320
+ }
321
+ ]
322
+ },
323
+ "rowNumber": {
324
+ "anyOf": [
325
+ {
326
+ "type": "array",
327
+ "items": {
328
+ "type": "number"
329
+ }
330
+ },
331
+ {
332
+ "type": "null"
333
+ }
334
+ ]
335
+ },
336
+ "seatNumber": {
337
+ "anyOf": [
338
+ {
339
+ "type": "array",
340
+ "items": {
341
+ "type": "integer"
342
+ }
343
+ },
344
+ {
345
+ "type": "null"
346
+ }
347
+ ]
348
+ },
349
+ "axleNumber": {
350
+ "anyOf": [
351
+ {
352
+ "type": "array",
353
+ "items": {
354
+ "type": "number"
355
+ }
356
+ },
357
+ {
358
+ "type": "null"
359
+ }
360
+ ]
361
+ }
362
+ },
363
+ "additionalProperties": false
364
+ },
365
+ "notes": {
366
+ "type": "boolean"
367
+ }
368
+ },
369
+ "additionalProperties": false,
370
+ "required": [
371
+ "location",
372
+ "notes"
373
+ ]
374
+ }
375
+ },
376
+ "additionalProperties": false
377
+ }
378
+ },
379
+ "additionalProperties": false,
380
+ "required": [
381
+ "category"
382
+ ]
383
+ }
384
+ },
385
+ "additionalProperties": false,
386
+ "required": [
387
+ "imNumber",
388
+ "imDescription",
389
+ "additionalInformation",
390
+ "itemNumber",
391
+ "itemDescription",
392
+ "deficiencyRef",
393
+ "deficiencyId",
394
+ "deficiencySubId",
395
+ "deficiencyCategory",
396
+ "deficiencyText",
397
+ "stdForProhibition",
398
+ "prs",
399
+ "prohibitionIssued",
400
+ "metadata"
401
+ ]
402
+ }
403
+ },
404
+ "customDefects": {
405
+ "type": [
406
+ "array"
407
+ ],
408
+ "items": {
409
+ "title": "Specialist Custom Defects Schema",
410
+ "type": "object",
411
+ "properties": {
412
+ "referenceNumber": {
413
+ "type": "string"
414
+ },
415
+ "defectName": {
416
+ "type": "string"
417
+ },
418
+ "defectNotes": {
419
+ "type": "string"
420
+ },
421
+ "hasAllMandatoryFields": {
422
+ "type": "boolean",
423
+ "description": "FE only"
424
+ }
425
+ },
426
+ "additionalProperties": false,
427
+ "required": [
428
+ "referenceNumber",
429
+ "defectName",
430
+ "defectNotes"
431
+ ]
432
+ }
433
+ },
434
+ "completionStatus": {
435
+ "type": "string"
436
+ },
437
+ "testTypeCategoryName": {
438
+ "type": "string"
439
+ },
440
+ "reasons": {
441
+ "type": "array",
442
+ "items": {
443
+ "type": "string"
444
+ }
445
+ },
446
+ "testNumber": {
447
+ "type": "string"
448
+ },
449
+ "linkedIds": {
450
+ "anyOf": [
451
+ {
452
+ "type": "array",
453
+ "items": {
454
+ "type": "string"
455
+ }
456
+ },
457
+ {
458
+ "type": "null"
459
+ }
460
+ ]
461
+ }
462
+ },
463
+ "required": [
464
+ "testTypeName",
465
+ "name",
466
+ "testTypeId",
467
+ "certificateNumber",
468
+ "secondaryCertificateNumber",
469
+ "testTypeStartTimestamp",
470
+ "testTypeEndTimestamp",
471
+ "testResult",
472
+ "prohibitionIssued",
473
+ "reasonForAbandoning",
474
+ "additionalNotesRecorded",
475
+ "additionalCommentsForAbandon",
476
+ "defects"
477
+ ],
478
+ "additionalProperties": false
479
+ }