Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor(cb2-9718): update vehicleType and inspectionType to use enums #138

Merged
merged 7 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"title": "Inspection Type",
"type": "string",
"tsEnumNames":[
"basic",
"normal"
],
"enum":[
"basic",
"normal"
Expand Down
4 changes: 2 additions & 2 deletions json-definitions/iva/defects/get/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"items": {
"anyOf": [
{
"$ref": "../../../v3/tech-record/enums/vehicleType.ignore.json"
"$ref": "../../../v3/tech-record/enums/vehicleType.enum.json"
}
]
}
Expand Down Expand Up @@ -66,7 +66,7 @@
"items": {
"anyOf": [
{
"$ref": "../enums/inspectionType.ignore.json"
"$ref": "../enums/inspectionType.enum.json"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"title": "Vehicle Type",
"type": "string",
"tsEnumNames":[
"psv",
"trl",
"hgv",
"car",
"lgv",
"motorcycle"
],
"enum":[
"psv",
"trl",
Expand Down
2 changes: 1 addition & 1 deletion json-definitions/v3/tech-record/get/search/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"$ref": "../../enums/statusCode.ignore.json"
},
"techRecord_vehicleType": {
"$ref": "../../enums/vehicleType.ignore.json"
"$ref": "../../enums/vehicleType.enum.json"
},
"createdTimestamp": {
"type": "string"
Expand Down
12 changes: 12 additions & 0 deletions json-schemas/iva/defects/enums/inspectionType.enum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"title": "Inspection Type",
"type": "string",
"tsEnumNames": [
"basic",
"normal"
],
"enum": [
"basic",
"normal"
]
}
12 changes: 12 additions & 0 deletions json-schemas/iva/defects/get/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
{
"title": "Vehicle Type",
"type": "string",
"tsEnumNames": [
"psv",
"trl",
"hgv",
"car",
"lgv",
"motorcycle"
],
"enum": [
"psv",
"trl",
Expand Down Expand Up @@ -130,6 +138,10 @@
{
"title": "Inspection Type",
"type": "string",
"tsEnumNames": [
"basic",
"normal"
],
"enum": [
"basic",
"normal"
Expand Down
20 changes: 20 additions & 0 deletions json-schemas/v3/tech-record/enums/vehicleType.enum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"title": "Vehicle Type",
"type": "string",
"tsEnumNames": [
"psv",
"trl",
"hgv",
"car",
"lgv",
"motorcycle"
],
"enum": [
"psv",
"trl",
"hgv",
"car",
"lgv",
"motorcycle"
]
}
8 changes: 8 additions & 0 deletions json-schemas/v3/tech-record/get/search/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
"techRecord_vehicleType": {
"title": "Vehicle Type",
"type": "string",
"tsEnumNames": [
"psv",
"trl",
"hgv",
"car",
"lgv",
"motorcycle"
],
"enum": [
"psv",
"trl",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dvsa/cvs-type-definitions",
"version": "3.3.3",
"version": "3.5.0",
"description": "type definitions for cvs vta and vtm applications",
"main": "index.js",
"repository": {
Expand Down
2 changes: 2 additions & 0 deletions schemas.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -22,6 +23,7 @@ export const schemas = [
"v3/tech-record/enums/tyreUseCodeTrl.enum.json",
"v3/tech-record/enums/vehicleClassDescription.enum.json",
"v3/tech-record/enums/vehicleClassDescriptionPSV.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",
Expand Down
11 changes: 11 additions & 0 deletions types/iva/defects/enums/inspectionType.enum.ts
Original file line number Diff line number Diff line change
@@ -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"
}
15 changes: 12 additions & 3 deletions types/iva/defects/get/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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",
Expand All @@ -42,3 +47,7 @@ export enum EUVehicleCategory {
L6E = "l6e",
L7E = "l7e"
}
export enum InspectionType {
basic = "basic",
normal = "normal"
}
15 changes: 15 additions & 0 deletions types/v3/tech-record/enums/vehicleType.enum.ts
Original file line number Diff line number Diff line change
@@ -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"
}
10 changes: 9 additions & 1 deletion types/v3/tech-record/get/search/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

export type StatusCode = "provisional" | "current" | "archived";
export type VehicleType = "psv" | "trl" | "hgv" | "car" | "lgv" | "motorcycle";

export interface TechRecordSearchSchema {
primaryVrm?: string;
Expand All @@ -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"
}