@dvsa/cvs-type-definitions 12.1.1 → 12.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/json-schemas/v1/defect-details/index.json +65 -0
- package/json-schemas/v1/test/index.json +6 -0
- package/json-schemas/v1/test-result/index.json +6 -0
- package/json-schemas/v1/test-result-test-type/index.json +65 -0
- package/json-schemas/v1/vehicle/index.json +6 -0
- package/json-schemas/v1/visit/index.json +6 -0
- package/package.json +1 -1
- package/types/v1/defect-details/index.d.ts +16 -0
- package/types/v1/test/index.d.ts +1 -0
- package/types/v1/test-result/index.d.ts +1 -0
- package/types/v1/test-result-test-type/index.d.ts +15 -0
- package/types/v1/vehicle/index.d.ts +1 -0
- package/types/v1/visit/index.d.ts +1 -0
|
@@ -243,6 +243,71 @@
|
|
|
243
243
|
"required": [
|
|
244
244
|
"category"
|
|
245
245
|
]
|
|
246
|
+
},
|
|
247
|
+
"media": {
|
|
248
|
+
"type": "array",
|
|
249
|
+
"items": {
|
|
250
|
+
"title": "Media Schema",
|
|
251
|
+
"type": "object",
|
|
252
|
+
"additionalProperties": false,
|
|
253
|
+
"anyOf": [
|
|
254
|
+
{
|
|
255
|
+
"title": "Image Schema",
|
|
256
|
+
"type": "object",
|
|
257
|
+
"properties": {
|
|
258
|
+
"type": {
|
|
259
|
+
"const": "image"
|
|
260
|
+
},
|
|
261
|
+
"path": {
|
|
262
|
+
"type": "string"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"additionalProperties": false,
|
|
266
|
+
"required": [
|
|
267
|
+
"type",
|
|
268
|
+
"path"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"title": "Video Schema",
|
|
273
|
+
"type": "object",
|
|
274
|
+
"properties": {
|
|
275
|
+
"type": {
|
|
276
|
+
"const": "video"
|
|
277
|
+
},
|
|
278
|
+
"path": {
|
|
279
|
+
"type": "string"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"additionalProperties": false,
|
|
283
|
+
"required": [
|
|
284
|
+
"type",
|
|
285
|
+
"path"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"title": "Fail Reason Schema",
|
|
290
|
+
"type": "object",
|
|
291
|
+
"properties": {
|
|
292
|
+
"type": {
|
|
293
|
+
"const": "failReason"
|
|
294
|
+
},
|
|
295
|
+
"path": {
|
|
296
|
+
"type": "string"
|
|
297
|
+
},
|
|
298
|
+
"reason": {
|
|
299
|
+
"type": "string"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"additionalProperties": false,
|
|
303
|
+
"required": [
|
|
304
|
+
"type",
|
|
305
|
+
"path",
|
|
306
|
+
"reason"
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
}
|
|
246
311
|
}
|
|
247
312
|
},
|
|
248
313
|
"additionalProperties": false,
|
|
@@ -1677,6 +1677,12 @@
|
|
|
1677
1677
|
"required": [
|
|
1678
1678
|
"category"
|
|
1679
1679
|
]
|
|
1680
|
+
},
|
|
1681
|
+
"media": {
|
|
1682
|
+
"type": "array",
|
|
1683
|
+
"items": {
|
|
1684
|
+
"$ref": "#/properties/vehicles/items/properties/testResultsHistory/items/properties/media/items"
|
|
1685
|
+
}
|
|
1680
1686
|
}
|
|
1681
1687
|
},
|
|
1682
1688
|
"additionalProperties": false,
|
|
@@ -480,6 +480,71 @@
|
|
|
480
480
|
"required": [
|
|
481
481
|
"category"
|
|
482
482
|
]
|
|
483
|
+
},
|
|
484
|
+
"media": {
|
|
485
|
+
"type": "array",
|
|
486
|
+
"items": {
|
|
487
|
+
"title": "Media Schema",
|
|
488
|
+
"type": "object",
|
|
489
|
+
"additionalProperties": false,
|
|
490
|
+
"anyOf": [
|
|
491
|
+
{
|
|
492
|
+
"title": "Image Schema",
|
|
493
|
+
"type": "object",
|
|
494
|
+
"properties": {
|
|
495
|
+
"type": {
|
|
496
|
+
"const": "image"
|
|
497
|
+
},
|
|
498
|
+
"path": {
|
|
499
|
+
"type": "string"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"additionalProperties": false,
|
|
503
|
+
"required": [
|
|
504
|
+
"type",
|
|
505
|
+
"path"
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"title": "Video Schema",
|
|
510
|
+
"type": "object",
|
|
511
|
+
"properties": {
|
|
512
|
+
"type": {
|
|
513
|
+
"const": "video"
|
|
514
|
+
},
|
|
515
|
+
"path": {
|
|
516
|
+
"type": "string"
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"additionalProperties": false,
|
|
520
|
+
"required": [
|
|
521
|
+
"type",
|
|
522
|
+
"path"
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"title": "Fail Reason Schema",
|
|
527
|
+
"type": "object",
|
|
528
|
+
"properties": {
|
|
529
|
+
"type": {
|
|
530
|
+
"const": "failReason"
|
|
531
|
+
},
|
|
532
|
+
"path": {
|
|
533
|
+
"type": "string"
|
|
534
|
+
},
|
|
535
|
+
"reason": {
|
|
536
|
+
"type": "string"
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"additionalProperties": false,
|
|
540
|
+
"required": [
|
|
541
|
+
"type",
|
|
542
|
+
"path",
|
|
543
|
+
"reason"
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
]
|
|
547
|
+
}
|
|
483
548
|
}
|
|
484
549
|
},
|
|
485
550
|
"additionalProperties": false,
|
|
@@ -1649,6 +1649,12 @@
|
|
|
1649
1649
|
"required": [
|
|
1650
1650
|
"category"
|
|
1651
1651
|
]
|
|
1652
|
+
},
|
|
1653
|
+
"media": {
|
|
1654
|
+
"type": "array",
|
|
1655
|
+
"items": {
|
|
1656
|
+
"$ref": "#/properties/testResultsHistory/items/properties/media/items"
|
|
1657
|
+
}
|
|
1652
1658
|
}
|
|
1653
1659
|
},
|
|
1654
1660
|
"additionalProperties": false,
|
|
@@ -1710,6 +1710,12 @@
|
|
|
1710
1710
|
"required": [
|
|
1711
1711
|
"category"
|
|
1712
1712
|
]
|
|
1713
|
+
},
|
|
1714
|
+
"media": {
|
|
1715
|
+
"type": "array",
|
|
1716
|
+
"items": {
|
|
1717
|
+
"$ref": "#/properties/tests/items/properties/vehicles/items/properties/testResultsHistory/items/properties/media/items"
|
|
1718
|
+
}
|
|
1713
1719
|
}
|
|
1714
1720
|
},
|
|
1715
1721
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
export type MediaSchema = ImageSchema | VideoSchema | FailReasonSchema;
|
|
9
|
+
|
|
8
10
|
export interface DefectDetailsSchema {
|
|
9
11
|
imNumber: number;
|
|
10
12
|
imDescription: string;
|
|
@@ -23,6 +25,7 @@ export interface DefectDetailsSchema {
|
|
|
23
25
|
prs: boolean | null;
|
|
24
26
|
prohibitionIssued: boolean | null;
|
|
25
27
|
metadata: DefectMetadataSchema;
|
|
28
|
+
media?: MediaSchema[];
|
|
26
29
|
}
|
|
27
30
|
export interface DefectLocationSchema {
|
|
28
31
|
vertical?: string | null;
|
|
@@ -51,3 +54,16 @@ export interface DefectLocationMetadataSchema {
|
|
|
51
54
|
seatNumber?: number[] | null;
|
|
52
55
|
axleNumber?: number[] | null;
|
|
53
56
|
}
|
|
57
|
+
export interface ImageSchema {
|
|
58
|
+
type: "image";
|
|
59
|
+
path: string;
|
|
60
|
+
}
|
|
61
|
+
export interface VideoSchema {
|
|
62
|
+
type: "video";
|
|
63
|
+
path: string;
|
|
64
|
+
}
|
|
65
|
+
export interface FailReasonSchema {
|
|
66
|
+
type: "failReason";
|
|
67
|
+
path: string;
|
|
68
|
+
reason: string;
|
|
69
|
+
}
|
package/types/v1/test/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
export type MediaSchema = ImageSchema | VideoSchema | FailReasonSchema;
|
|
8
9
|
export type InspectionType = "basic" | "normal";
|
|
9
10
|
|
|
10
11
|
export interface TestResultTestTypeSchema {
|
|
@@ -70,6 +71,7 @@ export interface DefectDetailsSchema {
|
|
|
70
71
|
prs: boolean | null;
|
|
71
72
|
prohibitionIssued: boolean | null;
|
|
72
73
|
metadata: DefectMetadataSchema;
|
|
74
|
+
media?: MediaSchema[];
|
|
73
75
|
}
|
|
74
76
|
export interface DefectLocationSchema {
|
|
75
77
|
vertical?: string | null;
|
|
@@ -98,6 +100,19 @@ export interface DefectLocationMetadataSchema {
|
|
|
98
100
|
seatNumber?: number[] | null;
|
|
99
101
|
axleNumber?: number[] | null;
|
|
100
102
|
}
|
|
103
|
+
export interface ImageSchema {
|
|
104
|
+
type: "image";
|
|
105
|
+
path: string;
|
|
106
|
+
}
|
|
107
|
+
export interface VideoSchema {
|
|
108
|
+
type: "video";
|
|
109
|
+
path: string;
|
|
110
|
+
}
|
|
111
|
+
export interface FailReasonSchema {
|
|
112
|
+
type: "failReason";
|
|
113
|
+
path: string;
|
|
114
|
+
reason: string;
|
|
115
|
+
}
|
|
101
116
|
export interface SpecialistCustomDefectsSchema {
|
|
102
117
|
referenceNumber: string;
|
|
103
118
|
defectName: string;
|