diff --git a/json-definitions/iva/defects/enums/inspectionType.ignore.json b/json-definitions/iva/defects/enums/inspectionType.enum.json similarity index 65% rename from json-definitions/iva/defects/enums/inspectionType.ignore.json rename to json-definitions/iva/defects/enums/inspectionType.enum.json index b433660a..ebbfa2b1 100644 --- a/json-definitions/iva/defects/enums/inspectionType.ignore.json +++ b/json-definitions/iva/defects/enums/inspectionType.enum.json @@ -1,6 +1,10 @@ { "title": "Inspection Type", "type": "string", + "tsEnumNames":[ + "basic", + "normal" + ], "enum":[ "basic", "normal" diff --git a/json-definitions/iva/defects/get/index.json b/json-definitions/iva/defects/get/index.json index ebbc4f9c..4ad49f59 100644 --- a/json-definitions/iva/defects/get/index.json +++ b/json-definitions/iva/defects/get/index.json @@ -21,7 +21,7 @@ "items": { "anyOf": [ { - "$ref": "../../../v3/tech-record/enums/vehicleType.ignore.json" + "$ref": "../../../v3/tech-record/enums/vehicleType.enum.json" } ] } @@ -66,7 +66,7 @@ "items": { "anyOf": [ { - "$ref": "../enums/inspectionType.ignore.json" + "$ref": "../enums/inspectionType.enum.json" } ] } diff --git a/json-definitions/v3/tech-record/enums/vehicleType.ignore.json b/json-definitions/v3/tech-record/enums/vehicleType.enum.json similarity index 59% rename from json-definitions/v3/tech-record/enums/vehicleType.ignore.json rename to json-definitions/v3/tech-record/enums/vehicleType.enum.json index 23e8f792..a519b594 100644 --- a/json-definitions/v3/tech-record/enums/vehicleType.ignore.json +++ b/json-definitions/v3/tech-record/enums/vehicleType.enum.json @@ -1,6 +1,14 @@ { "title": "Vehicle Type", "type": "string", + "tsEnumNames":[ + "psv", + "trl", + "hgv", + "car", + "lgv", + "motorcycle" + ], "enum":[ "psv", "trl", diff --git a/json-definitions/v3/tech-record/get/search/index.json b/json-definitions/v3/tech-record/get/search/index.json index c781fe27..84601c80 100644 --- a/json-definitions/v3/tech-record/get/search/index.json +++ b/json-definitions/v3/tech-record/get/search/index.json @@ -21,7 +21,7 @@ "$ref": "../../enums/statusCode.ignore.json" }, "techRecord_vehicleType": { - "$ref": "../../enums/vehicleType.ignore.json" + "$ref": "../../enums/vehicleType.enum.json" }, "createdTimestamp": { "type": "string" diff --git a/json-schemas/iva/defects/enums/inspectionType.enum.json b/json-schemas/iva/defects/enums/inspectionType.enum.json new file mode 100644 index 00000000..ba9cc5f3 --- /dev/null +++ b/json-schemas/iva/defects/enums/inspectionType.enum.json @@ -0,0 +1,12 @@ +{ + "title": "Inspection Type", + "type": "string", + "tsEnumNames": [ + "basic", + "normal" + ], + "enum": [ + "basic", + "normal" + ] +} \ No newline at end of file diff --git a/json-schemas/iva/defects/get/index.json b/json-schemas/iva/defects/get/index.json index 6636f02a..ad41bbe1 100644 --- a/json-schemas/iva/defects/get/index.json +++ b/json-schemas/iva/defects/get/index.json @@ -27,6 +27,14 @@ { "title": "Vehicle Type", "type": "string", + "tsEnumNames": [ + "psv", + "trl", + "hgv", + "car", + "lgv", + "motorcycle" + ], "enum": [ "psv", "trl", @@ -130,6 +138,10 @@ { "title": "Inspection Type", "type": "string", + "tsEnumNames": [ + "basic", + "normal" + ], "enum": [ "basic", "normal" diff --git a/json-schemas/v3/tech-record/enums/vehicleType.enum.json b/json-schemas/v3/tech-record/enums/vehicleType.enum.json new file mode 100644 index 00000000..a184aecf --- /dev/null +++ b/json-schemas/v3/tech-record/enums/vehicleType.enum.json @@ -0,0 +1,20 @@ +{ + "title": "Vehicle Type", + "type": "string", + "tsEnumNames": [ + "psv", + "trl", + "hgv", + "car", + "lgv", + "motorcycle" + ], + "enum": [ + "psv", + "trl", + "hgv", + "car", + "lgv", + "motorcycle" + ] +} \ No newline at end of file diff --git a/json-schemas/v3/tech-record/get/search/index.json b/json-schemas/v3/tech-record/get/search/index.json index 623cb347..ce763744 100644 --- a/json-schemas/v3/tech-record/get/search/index.json +++ b/json-schemas/v3/tech-record/get/search/index.json @@ -29,6 +29,14 @@ "techRecord_vehicleType": { "title": "Vehicle Type", "type": "string", + "tsEnumNames": [ + "psv", + "trl", + "hgv", + "car", + "lgv", + "motorcycle" + ], "enum": [ "psv", "trl", diff --git a/package-lock.json b/package-lock.json index fb5626d7..3fef94c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dvsa/cvs-type-definitions", - "version": "3.4.0", + "version": "3.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@dvsa/cvs-type-definitions", - "version": "3.4.0", + "version": "3.5.0", "license": "ISC", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 8ed2392a..eded740b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dvsa/cvs-type-definitions", - "version": "3.4.0", + "version": "3.5.0", "description": "type definitions for cvs vta and vtm applications", "main": "index.js", "repository": { diff --git a/schemas.ts b/schemas.ts index 4901aaf0..a7429902 100644 --- a/schemas.ts +++ b/schemas.ts @@ -1,4 +1,5 @@ export const schemas = [ + "iva/defects/enums/inspectionType.enum.json", "iva/defects/get/index.json", "v1/activity/index.json", "v1/defect-category-reference-data/index.json", @@ -25,6 +26,7 @@ export const schemas = [ "v3/tech-record/enums/vehicleConfigurationHgvPsv.enum.json", "v3/tech-record/enums/vehicleConfigurationLightVehicle.enum.json", "v3/tech-record/enums/vehicleConfigurationTrl.enum.json", + "v3/tech-record/enums/vehicleType.enum.json", "v3/tech-record/get/car/complete/index.json", "v3/tech-record/get/car/skeleton/index.json", "v3/tech-record/get/hgv/complete/index.json", diff --git a/types/iva/defects/enums/inspectionType.enum.ts b/types/iva/defects/enums/inspectionType.enum.ts new file mode 100644 index 00000000..0ad3b891 --- /dev/null +++ b/types/iva/defects/enums/inspectionType.enum.ts @@ -0,0 +1,11 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export enum InspectionType { + basic = "basic", + normal = "normal" +} diff --git a/types/iva/defects/get/index.d.ts b/types/iva/defects/get/index.d.ts index 14790efd..1ad24817 100644 --- a/types/iva/defects/get/index.d.ts +++ b/types/iva/defects/get/index.d.ts @@ -5,9 +5,6 @@ * and run json-schema-to-typescript to regenerate this file. */ -export type VehicleType = "psv" | "trl" | "hgv" | "car" | "lgv" | "motorcycle"; -export type InspectionType = "basic" | "normal"; - export interface DefectGETIVA { sectionNumber: string; sectionDescription: string; @@ -22,6 +19,14 @@ export interface DefectGETIVA { }[]; } +export enum VehicleType { + psv = "psv", + trl = "trl", + hgv = "hgv", + car = "car", + lgv = "lgv", + motorcycle = "motorcycle" +} export enum EUVehicleCategory { M1 = "m1", M2 = "m2", @@ -42,3 +47,7 @@ export enum EUVehicleCategory { L6E = "l6e", L7E = "l7e" } +export enum InspectionType { + basic = "basic", + normal = "normal" +} diff --git a/types/v3/tech-record/enums/vehicleType.enum.ts b/types/v3/tech-record/enums/vehicleType.enum.ts new file mode 100644 index 00000000..20e07e59 --- /dev/null +++ b/types/v3/tech-record/enums/vehicleType.enum.ts @@ -0,0 +1,15 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export enum VehicleType { + psv = "psv", + trl = "trl", + hgv = "hgv", + car = "car", + lgv = "lgv", + motorcycle = "motorcycle" +} diff --git a/types/v3/tech-record/get/search/index.d.ts b/types/v3/tech-record/get/search/index.d.ts index e7663f6c..6c051a67 100644 --- a/types/v3/tech-record/get/search/index.d.ts +++ b/types/v3/tech-record/get/search/index.d.ts @@ -6,7 +6,6 @@ */ export type StatusCode = "provisional" | "current" | "archived"; -export type VehicleType = "psv" | "trl" | "hgv" | "car" | "lgv" | "motorcycle"; export interface TechRecordSearchSchema { primaryVrm?: string; @@ -24,3 +23,12 @@ export interface TechRecordSearchSchema { techRecord_reasonForCreation?: string; techRecord_createdByName?: string; } + +export enum VehicleType { + psv = "psv", + trl = "trl", + hgv = "hgv", + car = "car", + lgv = "lgv", + motorcycle = "motorcycle" +}