@dvsa/cvs-type-definitions 6.3.0 → 7.0.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.
Files changed (67) hide show
  1. package/json-schemas/v1/activity/index.json +53 -8
  2. package/json-schemas/v1/enums/activityType.enum.json +14 -0
  3. package/json-schemas/v1/enums/emissionStandard.enum.json +26 -0
  4. package/json-schemas/v1/enums/fuelType.enum.json +22 -0
  5. package/json-schemas/v1/enums/odometerReadingUnits.enum.json +12 -0
  6. package/json-schemas/v1/enums/sources.enum.json +12 -0
  7. package/json-schemas/v1/enums/testResult.enum.json +16 -0
  8. package/json-schemas/v1/enums/testStationType.enum.json +16 -0
  9. package/json-schemas/v1/enums/testStatus.enum.json +12 -0
  10. package/json-schemas/v1/enums/typeOfTest.enum.json +14 -0
  11. package/json-schemas/v1/enums/waitReason.enum.json +18 -0
  12. package/json-schemas/v1/test/index.json +631 -87
  13. package/json-schemas/v1/test-result/index.json +448 -53
  14. package/json-schemas/v1/test-type/index.json +183 -34
  15. package/json-schemas/v1/vehicle/index.json +631 -87
  16. package/json-schemas/v1/visit/index.json +631 -87
  17. package/json-schemas/v3/tech-record/get/hgv/complete/index.json +1 -2
  18. package/json-schemas/v3/tech-record/get/hgv/skeleton/index.json +1 -2
  19. package/json-schemas/v3/tech-record/get/hgv/testable/index.json +1 -2
  20. package/json-schemas/v3/tech-record/get/trl/complete/index.json +1 -2
  21. package/json-schemas/v3/tech-record/get/trl/skeleton/index.json +1 -2
  22. package/json-schemas/v3/tech-record/get/trl/testable/index.json +1 -2
  23. package/json-schemas/v3/tech-record/put/hgv/complete/index.json +1 -2
  24. package/json-schemas/v3/tech-record/put/hgv/skeleton/index.json +1 -2
  25. package/json-schemas/v3/tech-record/put/hgv/testable/index.json +1 -2
  26. package/json-schemas/v3/tech-record/put/trl/complete/index.json +1 -2
  27. package/json-schemas/v3/tech-record/put/trl/skeleton/index.json +1 -2
  28. package/json-schemas/v3/tech-record/put/trl/testable/index.json +1 -2
  29. package/package.json +1 -1
  30. package/schemas.d.ts +1 -1
  31. package/schemas.js +10 -0
  32. package/types/v1/activity/index.d.ts +26 -6
  33. package/types/v1/enums/activityType.enum.d.ts +10 -0
  34. package/types/v1/enums/activityType.enum.js +15 -0
  35. package/types/v1/enums/activityType.enum.ts +12 -0
  36. package/types/v1/enums/emissionStandard.enum.d.ts +16 -0
  37. package/types/v1/enums/emissionStandard.enum.js +21 -0
  38. package/types/v1/enums/emissionStandard.enum.ts +18 -0
  39. package/types/v1/enums/fuelType.enum.d.ts +14 -0
  40. package/types/v1/enums/fuelType.enum.js +19 -0
  41. package/types/v1/enums/fuelType.enum.ts +16 -0
  42. package/types/v1/enums/odometerReadingUnits.enum.d.ts +9 -0
  43. package/types/v1/enums/odometerReadingUnits.enum.js +14 -0
  44. package/types/v1/enums/odometerReadingUnits.enum.ts +11 -0
  45. package/types/v1/enums/sources.enum.d.ts +9 -0
  46. package/types/v1/enums/sources.enum.js +14 -0
  47. package/types/v1/enums/sources.enum.ts +11 -0
  48. package/types/v1/enums/testResult.enum.d.ts +11 -0
  49. package/types/v1/enums/testResult.enum.js +16 -0
  50. package/types/v1/enums/testResult.enum.ts +13 -0
  51. package/types/v1/enums/testStationType.enum.d.ts +11 -0
  52. package/types/v1/enums/testStationType.enum.js +16 -0
  53. package/types/v1/enums/testStationType.enum.ts +13 -0
  54. package/types/v1/enums/testStatus.enum.d.ts +9 -0
  55. package/types/v1/enums/testStatus.enum.js +14 -0
  56. package/types/v1/enums/testStatus.enum.ts +11 -0
  57. package/types/v1/enums/typeOfTest.enum.d.ts +10 -0
  58. package/types/v1/enums/typeOfTest.enum.js +15 -0
  59. package/types/v1/enums/typeOfTest.enum.ts +12 -0
  60. package/types/v1/enums/waitReason.enum.d.ts +12 -0
  61. package/types/v1/enums/waitReason.enum.js +17 -0
  62. package/types/v1/enums/waitReason.enum.ts +14 -0
  63. package/types/v1/test/index.d.ts +143 -28
  64. package/types/v1/test-result/index.d.ts +143 -28
  65. package/types/v1/test-type/index.d.ts +65 -14
  66. package/types/v1/vehicle/index.d.ts +143 -28
  67. package/types/v1/visit/index.d.ts +143 -28
@@ -5,6 +5,9 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ export type VehicleType = "psv" | "trl" | "hgv" | "car" | "lgv" | "motorcycle";
9
+ export type InspectionType = "basic" | "normal";
10
+
8
11
  export interface VehicleSchema {
9
12
  systemNumber: string;
10
13
  vrm: string;
@@ -220,15 +223,15 @@ export interface TankStatementSchema {
220
223
  }
221
224
  export interface TestResultSchema {
222
225
  testResultId: string;
223
- testStationName: string;
224
- testStationPNumber: string;
225
- testStationType: string;
226
- testerName: string;
226
+ testStationName: string | null;
227
+ testStationPNumber: string | null;
228
+ testStationType: TestStationTypes;
229
+ testerName: string | null;
227
230
  testerStaffId: string;
228
- testerEmailAddress: string;
231
+ testerEmailAddress: string | null;
229
232
  testStartTimestamp: string;
230
233
  testEndTimestamp: string;
231
- testStatus: string;
234
+ testStatus: TestStatus;
232
235
  reasonForCancellation: string | null;
233
236
  systemNumber: string;
234
237
  vrm?: string;
@@ -236,31 +239,51 @@ export interface TestResultSchema {
236
239
  vin: string;
237
240
  vehicleClass: VehicleClassSchema;
238
241
  vehicleSubclass?: string[];
239
- vehicleType: string;
242
+ vehicleType: VehicleType;
240
243
  vehicleConfiguration: string;
241
244
  odometerReading?: number | null;
242
- odometerReadingUnits?: string | null;
243
- preparerId: string;
244
- preparerName: string;
245
- euVehicleCategory: string;
245
+ odometerReadingUnits?: OdometerReadingUnits | null;
246
+ preparerId: string | null;
247
+ preparerName: string | null;
248
+ euVehicleCategory: EUVehicleCategory;
246
249
  countryOfRegistration: string | null;
247
250
  noOfAxles: number;
248
- numberOfWheelsDriven: number;
251
+ numberOfWheelsDriven: number | null;
249
252
  vehicleSize?: string;
250
253
  numberOfSeats?: number;
251
- regnDate?: string;
252
- firstUseDate?: string;
254
+ regnDate?: string | null;
255
+ firstUseDate?: string | null;
253
256
  testTypes: TestTypeSchema[];
257
+ reasonForCreation?: string;
258
+ createdAt?: string | null;
259
+ createdByEmailAddress?: string;
260
+ createdByName?: string;
261
+ createdById?: string;
262
+ lastUpdatedAt?: string | null;
263
+ lastUpdatedByEmailAddress?: string;
264
+ lastUpdatedByName?: string;
265
+ lastUpdatedById?: string;
266
+ shouldEmailCertificate?: string;
267
+ contingencyTestNumber?: string | null;
268
+ typeOfTest?: TypeOfTest;
269
+ source?: TestSources;
270
+ make?: string | null;
271
+ model?: string | null;
272
+ bodyType?: BodyTypeSchema;
254
273
  }
255
274
  export interface TestTypeSchema {
256
- testTypeName: string;
275
+ testTypeName: string | null;
257
276
  name: string;
258
277
  testTypeId: string;
259
278
  certificateNumber: string | null;
260
279
  secondaryCertificateNumber: string | null;
261
280
  testTypeStartTimestamp: string | null;
262
281
  testTypeEndTimestamp: string | null;
263
- testResult: string | null;
282
+ testResult:
283
+ | {
284
+ [k: string]: unknown;
285
+ }
286
+ | TestResults;
264
287
  prohibitionIssued: boolean | null;
265
288
  reasonForAbandoning: string | null;
266
289
  additionalNotesRecorded: string | null;
@@ -269,20 +292,27 @@ export interface TestTypeSchema {
269
292
  lastSeatbeltInstallationCheckDate?: string | null;
270
293
  seatbeltInstallationCheckDate?: boolean | null;
271
294
  testExpiryDate?: string;
295
+ testAnniversaryDate?: string | null;
272
296
  modType?: ModTypeSchema | string | null;
273
- emissionStandard?: string;
274
- fuelType?: string;
275
- modificationTypeUsed?: string;
276
- smokeTestKLimitApplied?: string;
277
- particulateTrapFitted?: string;
278
- particulateTrapSerialNumber?: string;
297
+ emissionStandard?:
298
+ | {
299
+ [k: string]: unknown;
300
+ }
301
+ | EmissionStandards;
302
+ fuelType?:
303
+ | {
304
+ [k: string]: unknown;
305
+ }
306
+ | FuelType;
307
+ modificationTypeUsed?: string | null;
308
+ smokeTestKLimitApplied?: string | null;
309
+ particulateTrapFitted?: string | null;
310
+ particulateTrapSerialNumber?: string | null;
279
311
  defects: DefectDetailsSchema[];
280
- customDefects?: SpecialistCustomDefectsSchema[];
281
- completionStatus?: string;
282
- testTypeCategoryName?: string;
283
- reasons?: string[];
284
- testNumber?: string;
285
- linkedIds?: string[] | null;
312
+ customDefects?: SpecialistCustomDefectsSchema[] | null;
313
+ requiredStandards?: SpecialistCustomDefectsSchemaPut[];
314
+ testNumber?: string | null;
315
+ reapplicationDate?: string | null;
286
316
  }
287
317
  export interface ModTypeSchema {
288
318
  code: string;
@@ -343,3 +373,88 @@ export interface SpecialistCustomDefectsSchema {
343
373
  */
344
374
  hasAllMandatoryFields?: boolean;
345
375
  }
376
+ export interface SpecialistCustomDefectsSchemaPut {
377
+ sectionNumber: string;
378
+ sectionDescription: string;
379
+ additionalNotes?: string | null;
380
+ rsNumber: number;
381
+ requiredStandard: string;
382
+ refCalculation: string;
383
+ additionalInfo: boolean;
384
+ inspectionTypes?: InspectionType[];
385
+ prs: boolean;
386
+ }
387
+ export interface BodyTypeSchema {
388
+ code?: string | null;
389
+ description?: string | null;
390
+ }
391
+
392
+ export enum TestStationTypes {
393
+ ATF = "atf",
394
+ GVTS = "gvts",
395
+ HQ = "hq",
396
+ POTF = "potf"
397
+ }
398
+ export enum TestStatus {
399
+ SUBMITTED = "submitted",
400
+ CANCELLED = "cancelled"
401
+ }
402
+ export enum OdometerReadingUnits {
403
+ KILOMETRES = "kilometres",
404
+ MILES = "miles"
405
+ }
406
+ export enum EUVehicleCategory {
407
+ M1 = "m1",
408
+ M2 = "m2",
409
+ M3 = "m3",
410
+ N1 = "n1",
411
+ N2 = "n2",
412
+ N3 = "n3",
413
+ O1 = "o1",
414
+ O2 = "o2",
415
+ O3 = "o3",
416
+ O4 = "o4",
417
+ L1E_A = "l1e-a",
418
+ l1E = "l1e",
419
+ L2e = "l2e",
420
+ L3E = "l3e",
421
+ L4E = "l4e",
422
+ L5E = "l5e",
423
+ L6E = "l6e",
424
+ L7E = "l7e"
425
+ }
426
+ export enum TestResults {
427
+ PASS = "pass",
428
+ PRS = "prs",
429
+ FAIL = "fail",
430
+ ABANDONED = "abandoned"
431
+ }
432
+ export enum EmissionStandards {
433
+ EURO3_PM = "0.10 g/kWh Euro 3 PM",
434
+ EURO4_PM = "0.03 g/kWh Euro IV PM'",
435
+ EURO3 = "Euro 3",
436
+ EURO4 = "Euro 4",
437
+ EURO5 = "Euro 5",
438
+ EURO6 = "Euro 6",
439
+ EUROV = "Euro V",
440
+ EUROVI = "Euro VI",
441
+ FULL_ELECTRIC = "Full Electric"
442
+ }
443
+ export enum FuelType {
444
+ DIESEL = "diesel",
445
+ GAS_CNG = "gas-cng",
446
+ GAS_LNG = "gas-lng",
447
+ GAS_LPG = "gas-lpg",
448
+ PETROL = "petrol",
449
+ FUEL_CELL = "fuel cell",
450
+ FULL_ELECTRIC = "full electric"
451
+ }
452
+ export enum TypeOfTest {
453
+ CONTINGENCY = "contingency",
454
+ DESK_BASED = "desk-based",
455
+ COMPLETION = "completion"
456
+ }
457
+ export enum TestSources {
458
+ VTM = "vtm",
459
+ VTA = "vta"
460
+ }
@@ -5,6 +5,9 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
+ export type VehicleType = "psv" | "trl" | "hgv" | "car" | "lgv" | "motorcycle";
9
+ export type InspectionType = "basic" | "normal";
10
+
8
11
  export interface VisitSchema {
9
12
  startTime: string;
10
13
  endTime: string;
@@ -241,15 +244,15 @@ export interface TankStatementSchema {
241
244
  }
242
245
  export interface TestResultSchema {
243
246
  testResultId: string;
244
- testStationName: string;
245
- testStationPNumber: string;
246
- testStationType: string;
247
- testerName: string;
247
+ testStationName: string | null;
248
+ testStationPNumber: string | null;
249
+ testStationType: TestStationTypes;
250
+ testerName: string | null;
248
251
  testerStaffId: string;
249
- testerEmailAddress: string;
252
+ testerEmailAddress: string | null;
250
253
  testStartTimestamp: string;
251
254
  testEndTimestamp: string;
252
- testStatus: string;
255
+ testStatus: TestStatus;
253
256
  reasonForCancellation: string | null;
254
257
  systemNumber: string;
255
258
  vrm?: string;
@@ -257,31 +260,51 @@ export interface TestResultSchema {
257
260
  vin: string;
258
261
  vehicleClass: VehicleClassSchema;
259
262
  vehicleSubclass?: string[];
260
- vehicleType: string;
263
+ vehicleType: VehicleType;
261
264
  vehicleConfiguration: string;
262
265
  odometerReading?: number | null;
263
- odometerReadingUnits?: string | null;
264
- preparerId: string;
265
- preparerName: string;
266
- euVehicleCategory: string;
266
+ odometerReadingUnits?: OdometerReadingUnits | null;
267
+ preparerId: string | null;
268
+ preparerName: string | null;
269
+ euVehicleCategory: EUVehicleCategory;
267
270
  countryOfRegistration: string | null;
268
271
  noOfAxles: number;
269
- numberOfWheelsDriven: number;
272
+ numberOfWheelsDriven: number | null;
270
273
  vehicleSize?: string;
271
274
  numberOfSeats?: number;
272
- regnDate?: string;
273
- firstUseDate?: string;
275
+ regnDate?: string | null;
276
+ firstUseDate?: string | null;
274
277
  testTypes: TestTypeSchema[];
278
+ reasonForCreation?: string;
279
+ createdAt?: string | null;
280
+ createdByEmailAddress?: string;
281
+ createdByName?: string;
282
+ createdById?: string;
283
+ lastUpdatedAt?: string | null;
284
+ lastUpdatedByEmailAddress?: string;
285
+ lastUpdatedByName?: string;
286
+ lastUpdatedById?: string;
287
+ shouldEmailCertificate?: string;
288
+ contingencyTestNumber?: string | null;
289
+ typeOfTest?: TypeOfTest;
290
+ source?: TestSources;
291
+ make?: string | null;
292
+ model?: string | null;
293
+ bodyType?: BodyTypeSchema;
275
294
  }
276
295
  export interface TestTypeSchema {
277
- testTypeName: string;
296
+ testTypeName: string | null;
278
297
  name: string;
279
298
  testTypeId: string;
280
299
  certificateNumber: string | null;
281
300
  secondaryCertificateNumber: string | null;
282
301
  testTypeStartTimestamp: string | null;
283
302
  testTypeEndTimestamp: string | null;
284
- testResult: string | null;
303
+ testResult:
304
+ | {
305
+ [k: string]: unknown;
306
+ }
307
+ | TestResults;
285
308
  prohibitionIssued: boolean | null;
286
309
  reasonForAbandoning: string | null;
287
310
  additionalNotesRecorded: string | null;
@@ -290,20 +313,27 @@ export interface TestTypeSchema {
290
313
  lastSeatbeltInstallationCheckDate?: string | null;
291
314
  seatbeltInstallationCheckDate?: boolean | null;
292
315
  testExpiryDate?: string;
316
+ testAnniversaryDate?: string | null;
293
317
  modType?: ModTypeSchema | string | null;
294
- emissionStandard?: string;
295
- fuelType?: string;
296
- modificationTypeUsed?: string;
297
- smokeTestKLimitApplied?: string;
298
- particulateTrapFitted?: string;
299
- particulateTrapSerialNumber?: string;
318
+ emissionStandard?:
319
+ | {
320
+ [k: string]: unknown;
321
+ }
322
+ | EmissionStandards;
323
+ fuelType?:
324
+ | {
325
+ [k: string]: unknown;
326
+ }
327
+ | FuelType;
328
+ modificationTypeUsed?: string | null;
329
+ smokeTestKLimitApplied?: string | null;
330
+ particulateTrapFitted?: string | null;
331
+ particulateTrapSerialNumber?: string | null;
300
332
  defects: DefectDetailsSchema[];
301
- customDefects?: SpecialistCustomDefectsSchema[];
302
- completionStatus?: string;
303
- testTypeCategoryName?: string;
304
- reasons?: string[];
305
- testNumber?: string;
306
- linkedIds?: string[] | null;
333
+ customDefects?: SpecialistCustomDefectsSchema[] | null;
334
+ requiredStandards?: SpecialistCustomDefectsSchemaPut[];
335
+ testNumber?: string | null;
336
+ reapplicationDate?: string | null;
307
337
  }
308
338
  export interface ModTypeSchema {
309
339
  code: string;
@@ -364,3 +394,88 @@ export interface SpecialistCustomDefectsSchema {
364
394
  */
365
395
  hasAllMandatoryFields?: boolean;
366
396
  }
397
+ export interface SpecialistCustomDefectsSchemaPut {
398
+ sectionNumber: string;
399
+ sectionDescription: string;
400
+ additionalNotes?: string | null;
401
+ rsNumber: number;
402
+ requiredStandard: string;
403
+ refCalculation: string;
404
+ additionalInfo: boolean;
405
+ inspectionTypes?: InspectionType[];
406
+ prs: boolean;
407
+ }
408
+ export interface BodyTypeSchema {
409
+ code?: string | null;
410
+ description?: string | null;
411
+ }
412
+
413
+ export enum TestStationTypes {
414
+ ATF = "atf",
415
+ GVTS = "gvts",
416
+ HQ = "hq",
417
+ POTF = "potf"
418
+ }
419
+ export enum TestStatus {
420
+ SUBMITTED = "submitted",
421
+ CANCELLED = "cancelled"
422
+ }
423
+ export enum OdometerReadingUnits {
424
+ KILOMETRES = "kilometres",
425
+ MILES = "miles"
426
+ }
427
+ export enum EUVehicleCategory {
428
+ M1 = "m1",
429
+ M2 = "m2",
430
+ M3 = "m3",
431
+ N1 = "n1",
432
+ N2 = "n2",
433
+ N3 = "n3",
434
+ O1 = "o1",
435
+ O2 = "o2",
436
+ O3 = "o3",
437
+ O4 = "o4",
438
+ L1E_A = "l1e-a",
439
+ l1E = "l1e",
440
+ L2e = "l2e",
441
+ L3E = "l3e",
442
+ L4E = "l4e",
443
+ L5E = "l5e",
444
+ L6E = "l6e",
445
+ L7E = "l7e"
446
+ }
447
+ export enum TestResults {
448
+ PASS = "pass",
449
+ PRS = "prs",
450
+ FAIL = "fail",
451
+ ABANDONED = "abandoned"
452
+ }
453
+ export enum EmissionStandards {
454
+ EURO3_PM = "0.10 g/kWh Euro 3 PM",
455
+ EURO4_PM = "0.03 g/kWh Euro IV PM'",
456
+ EURO3 = "Euro 3",
457
+ EURO4 = "Euro 4",
458
+ EURO5 = "Euro 5",
459
+ EURO6 = "Euro 6",
460
+ EUROV = "Euro V",
461
+ EUROVI = "Euro VI",
462
+ FULL_ELECTRIC = "Full Electric"
463
+ }
464
+ export enum FuelType {
465
+ DIESEL = "diesel",
466
+ GAS_CNG = "gas-cng",
467
+ GAS_LNG = "gas-lng",
468
+ GAS_LPG = "gas-lpg",
469
+ PETROL = "petrol",
470
+ FUEL_CELL = "fuel cell",
471
+ FULL_ELECTRIC = "full electric"
472
+ }
473
+ export enum TypeOfTest {
474
+ CONTINGENCY = "contingency",
475
+ DESK_BASED = "desk-based",
476
+ COMPLETION = "completion"
477
+ }
478
+ export enum TestSources {
479
+ VTM = "vtm",
480
+ VTA = "vta"
481
+ }