From 3248eb2873fb526eb5ec3397bd143e52407ba724 Mon Sep 17 00:00:00 2001 From: Nathan Brown Date: Tue, 29 Oct 2024 11:19:25 +0000 Subject: [PATCH] minor(cb2-13894): add month of manufacture to TRLs (#182) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../enums/manufactureMonth.ignore.json | 18 +++++++++++++ .../tech-record/get/trl/complete/index.json | 10 ++++++++ .../tech-record/get/trl/skeleton/index.json | 10 ++++++++ .../tech-record/get/trl/testable/index.json | 10 ++++++++ .../tech-record/put/trl/complete/index.json | 10 ++++++++ .../tech-record/put/trl/skeleton/index.json | 10 ++++++++ .../tech-record/put/trl/testable/index.json | 10 ++++++++ .../tech-record/get/trl/complete/index.json | 25 +++++++++++++++++++ .../tech-record/get/trl/skeleton/index.json | 25 +++++++++++++++++++ .../tech-record/get/trl/testable/index.json | 25 +++++++++++++++++++ .../tech-record/put/trl/complete/index.json | 25 +++++++++++++++++++ .../tech-record/put/trl/skeleton/index.json | 25 +++++++++++++++++++ .../tech-record/put/trl/testable/index.json | 25 +++++++++++++++++++ package-lock.json | 4 +-- package.json | 2 +- tests/resources/data/trlComplete.json | 1 + tests/resources/data/trlSkeleton.json | 3 ++- tests/resources/data/trlTestable.json | 1 + .../tech-record/get/trl/complete/index.d.ts | 14 +++++++++++ .../tech-record/get/trl/skeleton/index.d.ts | 14 +++++++++++ .../tech-record/get/trl/testable/index.d.ts | 14 +++++++++++ .../tech-record/put/trl/complete/index.d.ts | 14 +++++++++++ .../tech-record/put/trl/skeleton/index.d.ts | 14 +++++++++++ .../tech-record/put/trl/testable/index.d.ts | 14 +++++++++++ 24 files changed, 319 insertions(+), 4 deletions(-) create mode 100644 json-definitions/v3/tech-record/enums/manufactureMonth.ignore.json diff --git a/json-definitions/v3/tech-record/enums/manufactureMonth.ignore.json b/json-definitions/v3/tech-record/enums/manufactureMonth.ignore.json new file mode 100644 index 00000000..708ef9cc --- /dev/null +++ b/json-definitions/v3/tech-record/enums/manufactureMonth.ignore.json @@ -0,0 +1,18 @@ +{ + "title": "Months", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] +} \ No newline at end of file diff --git a/json-definitions/v3/tech-record/get/trl/complete/index.json b/json-definitions/v3/tech-record/get/trl/complete/index.json index c356b8f1..91b42484 100644 --- a/json-definitions/v3/tech-record/get/trl/complete/index.json +++ b/json-definitions/v3/tech-record/get/trl/complete/index.json @@ -743,6 +743,16 @@ "type": "string", "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "$ref": "../../../enums/manufactureMonth.ignore.json" + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-definitions/v3/tech-record/get/trl/skeleton/index.json b/json-definitions/v3/tech-record/get/trl/skeleton/index.json index 5a6f5b2b..43668758 100644 --- a/json-definitions/v3/tech-record/get/trl/skeleton/index.json +++ b/json-definitions/v3/tech-record/get/trl/skeleton/index.json @@ -784,6 +784,16 @@ ], "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "$ref": "../../../enums/manufactureMonth.ignore.json" + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-definitions/v3/tech-record/get/trl/testable/index.json b/json-definitions/v3/tech-record/get/trl/testable/index.json index 9d491a95..dc3d5749 100644 --- a/json-definitions/v3/tech-record/get/trl/testable/index.json +++ b/json-definitions/v3/tech-record/get/trl/testable/index.json @@ -780,6 +780,16 @@ ], "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "$ref": "../../../enums/manufactureMonth.ignore.json" + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-definitions/v3/tech-record/put/trl/complete/index.json b/json-definitions/v3/tech-record/put/trl/complete/index.json index 8096807c..42af8a5e 100644 --- a/json-definitions/v3/tech-record/put/trl/complete/index.json +++ b/json-definitions/v3/tech-record/put/trl/complete/index.json @@ -723,6 +723,16 @@ "type": "string", "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "$ref": "../../../enums/manufactureMonth.ignore.json" + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-definitions/v3/tech-record/put/trl/skeleton/index.json b/json-definitions/v3/tech-record/put/trl/skeleton/index.json index cfe508f3..11d4f327 100644 --- a/json-definitions/v3/tech-record/put/trl/skeleton/index.json +++ b/json-definitions/v3/tech-record/put/trl/skeleton/index.json @@ -758,6 +758,16 @@ ], "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "$ref": "../../../enums/manufactureMonth.ignore.json" + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-definitions/v3/tech-record/put/trl/testable/index.json b/json-definitions/v3/tech-record/put/trl/testable/index.json index 8af54212..e2b27c62 100644 --- a/json-definitions/v3/tech-record/put/trl/testable/index.json +++ b/json-definitions/v3/tech-record/put/trl/testable/index.json @@ -760,6 +760,16 @@ ], "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "$ref": "../../../enums/manufactureMonth.ignore.json" + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-schemas/v3/tech-record/get/trl/complete/index.json b/json-schemas/v3/tech-record/get/trl/complete/index.json index e99be1fb..0f740d40 100644 --- a/json-schemas/v3/tech-record/get/trl/complete/index.json +++ b/json-schemas/v3/tech-record/get/trl/complete/index.json @@ -908,6 +908,31 @@ "type": "string", "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "title": "Months", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-schemas/v3/tech-record/get/trl/skeleton/index.json b/json-schemas/v3/tech-record/get/trl/skeleton/index.json index 3213e633..30eeab7f 100644 --- a/json-schemas/v3/tech-record/get/trl/skeleton/index.json +++ b/json-schemas/v3/tech-record/get/trl/skeleton/index.json @@ -949,6 +949,31 @@ ], "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "title": "Months", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-schemas/v3/tech-record/get/trl/testable/index.json b/json-schemas/v3/tech-record/get/trl/testable/index.json index 4051ce9c..33d8183e 100644 --- a/json-schemas/v3/tech-record/get/trl/testable/index.json +++ b/json-schemas/v3/tech-record/get/trl/testable/index.json @@ -945,6 +945,31 @@ ], "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "title": "Months", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-schemas/v3/tech-record/put/trl/complete/index.json b/json-schemas/v3/tech-record/put/trl/complete/index.json index 26023964..eea935d4 100644 --- a/json-schemas/v3/tech-record/put/trl/complete/index.json +++ b/json-schemas/v3/tech-record/put/trl/complete/index.json @@ -888,6 +888,31 @@ "type": "string", "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "title": "Months", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-schemas/v3/tech-record/put/trl/skeleton/index.json b/json-schemas/v3/tech-record/put/trl/skeleton/index.json index 019cce0b..6339ae2b 100644 --- a/json-schemas/v3/tech-record/put/trl/skeleton/index.json +++ b/json-schemas/v3/tech-record/put/trl/skeleton/index.json @@ -923,6 +923,31 @@ ], "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "title": "Months", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/json-schemas/v3/tech-record/put/trl/testable/index.json b/json-schemas/v3/tech-record/put/trl/testable/index.json index efbb55dd..09cc3024 100644 --- a/json-schemas/v3/tech-record/put/trl/testable/index.json +++ b/json-schemas/v3/tech-record/put/trl/testable/index.json @@ -925,6 +925,31 @@ ], "maxLength": 50 }, + "techRecord_manufactureMonth": { + "anyOf": [ + { + "title": "Months", + "type": "string", + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + { + "type": "null" + } + ] + }, "techRecord_manufactureYear": { "anyOf": [ { diff --git a/package-lock.json b/package-lock.json index 67e9c03b..370f4bd5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dvsa/cvs-type-definitions", - "version": "7.5.1", + "version": "7.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@dvsa/cvs-type-definitions", - "version": "7.5.1", + "version": "7.6.0", "license": "ISC", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 4e890492..dc641301 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dvsa/cvs-type-definitions", - "version": "7.5.1", + "version": "7.6.0", "description": "type definitions for cvs vta and vtm applications", "main": "index.js", "repository": { diff --git a/tests/resources/data/trlComplete.json b/tests/resources/data/trlComplete.json index f5528f13..e0d3368b 100644 --- a/tests/resources/data/trlComplete.json +++ b/tests/resources/data/trlComplete.json @@ -46,6 +46,7 @@ "techRecord_loadSensingValve": false, "techRecord_make": "Isuzu", "techRecord_manufactureYear": 2018, + "techRecord_manufactureMonth": "January", "techRecord_maxLoadOnCoupling": 7000, "techRecord_model": "F06", "techRecord_noOfAxles": 2, diff --git a/tests/resources/data/trlSkeleton.json b/tests/resources/data/trlSkeleton.json index e65b2a32..21bd09aa 100644 --- a/tests/resources/data/trlSkeleton.json +++ b/tests/resources/data/trlSkeleton.json @@ -44,6 +44,7 @@ "techRecord_letterOfAuth": null, "techRecord_make": "A PL", "techRecord_manufactureYear": null, + "techRecord_manufactureMonth": null, "techRecord_manufacturerDetails": null, "techRecord_maxLoadOnCoupling": null, "techRecord_microfilm_microfilmDocumentType": "Tempo 100 Sp Ord", @@ -202,4 +203,4 @@ "trailerId": "C530005", "vin": "9080977997" } -] +] \ No newline at end of file diff --git a/tests/resources/data/trlTestable.json b/tests/resources/data/trlTestable.json index 78d80914..f252b0d6 100644 --- a/tests/resources/data/trlTestable.json +++ b/tests/resources/data/trlTestable.json @@ -34,6 +34,7 @@ "techRecord_lastUpdatedAt": null, "techRecord_make": null, "techRecord_manufactureYear": 2021, + "techRecord_manufactureMonth": "April", "techRecord_maxTrainDesignWeight": 0, "techRecord_maxTrainGbWeight": 0, "techRecord_model": "model1", diff --git a/types/v3/tech-record/get/trl/complete/index.d.ts b/types/v3/tech-record/get/trl/complete/index.d.ts index 34b22e2a..e8f033c8 100644 --- a/types/v3/tech-record/get/trl/complete/index.d.ts +++ b/types/v3/tech-record/get/trl/complete/index.d.ts @@ -18,6 +18,19 @@ export type FrameDescription = | "U section"; export type LetterTypes = "trailer acceptance" | "trailer rejection"; export type ParagraphIds = 3 | 4 | 5 | 6 | 7; +export type Months = + | "January" + | "February" + | "March" + | "April" + | "May" + | "June" + | "July" + | "August" + | "September" + | "October" + | "November" + | "December"; export type MicrofilmDocumentType = | "PSV Miscellaneous" | "AAT - Trailer Annual Test" @@ -194,6 +207,7 @@ export interface TechRecordGETTRLComplete { techRecord_letterOfAuth_paragraphId?: null | ParagraphIds; techRecord_letterOfAuth_letterIssuer?: string | null; techRecord_make: string; + techRecord_manufactureMonth?: Months | null; techRecord_manufactureYear?: number | null; techRecord_manufacturerDetails?: string | null; techRecord_maxLoadOnCoupling: number; diff --git a/types/v3/tech-record/get/trl/skeleton/index.d.ts b/types/v3/tech-record/get/trl/skeleton/index.d.ts index 3078f7d0..79baf004 100644 --- a/types/v3/tech-record/get/trl/skeleton/index.d.ts +++ b/types/v3/tech-record/get/trl/skeleton/index.d.ts @@ -18,6 +18,19 @@ export type FrameDescription = | "U section"; export type LetterTypes = "trailer acceptance" | "trailer rejection"; export type ParagraphIds = 3 | 4 | 5 | 6 | 7; +export type Months = + | "January" + | "February" + | "March" + | "April" + | "May" + | "June" + | "July" + | "August" + | "September" + | "October" + | "November" + | "December"; export type MicrofilmDocumentType = | "PSV Miscellaneous" | "AAT - Trailer Annual Test" @@ -197,6 +210,7 @@ export interface TechRecordGETTRLSkeleton { techRecord_letterOfAuth_paragraphId?: null | ParagraphIds; techRecord_letterOfAuth_letterIssuer?: string | null; techRecord_make?: string | null; + techRecord_manufactureMonth?: Months | null; techRecord_manufactureYear?: number | null; techRecord_manufacturerDetails?: string | null; techRecord_maxLoadOnCoupling?: number | null; diff --git a/types/v3/tech-record/get/trl/testable/index.d.ts b/types/v3/tech-record/get/trl/testable/index.d.ts index 1ae3a581..273858e9 100644 --- a/types/v3/tech-record/get/trl/testable/index.d.ts +++ b/types/v3/tech-record/get/trl/testable/index.d.ts @@ -18,6 +18,19 @@ export type FrameDescription = | "U section"; export type LetterTypes = "trailer acceptance" | "trailer rejection"; export type ParagraphIds = 3 | 4 | 5 | 6 | 7; +export type Months = + | "January" + | "February" + | "March" + | "April" + | "May" + | "June" + | "July" + | "August" + | "September" + | "October" + | "November" + | "December"; export type MicrofilmDocumentType = | "PSV Miscellaneous" | "AAT - Trailer Annual Test" @@ -197,6 +210,7 @@ export interface TechRecordGETTRLTestable { techRecord_letterOfAuth_paragraphId?: null | ParagraphIds; techRecord_letterOfAuth_letterIssuer?: string | null; techRecord_make?: string | null; + techRecord_manufactureMonth?: Months | null; techRecord_manufactureYear?: number | null; techRecord_manufacturerDetails?: string | null; techRecord_maxLoadOnCoupling?: number | null; diff --git a/types/v3/tech-record/put/trl/complete/index.d.ts b/types/v3/tech-record/put/trl/complete/index.d.ts index 78389c71..ead270c9 100644 --- a/types/v3/tech-record/put/trl/complete/index.d.ts +++ b/types/v3/tech-record/put/trl/complete/index.d.ts @@ -18,6 +18,19 @@ export type FrameDescription = | "U section"; export type LetterTypes = "trailer acceptance" | "trailer rejection"; export type ParagraphIds = 3 | 4 | 5 | 6 | 7; +export type Months = + | "January" + | "February" + | "March" + | "April" + | "May" + | "June" + | "July" + | "August" + | "September" + | "October" + | "November" + | "December"; export type MicrofilmDocumentType = | "PSV Miscellaneous" | "AAT - Trailer Annual Test" @@ -189,6 +202,7 @@ export interface TechRecordPUTTRLComplete { techRecord_letterOfAuth_paragraphId?: null | ParagraphIds; techRecord_letterOfAuth_letterIssuer?: string | null; techRecord_make: string; + techRecord_manufactureMonth?: Months | null; techRecord_manufactureYear?: number | null; techRecord_manufacturerDetails?: string | null; techRecord_maxLoadOnCoupling: number; diff --git a/types/v3/tech-record/put/trl/skeleton/index.d.ts b/types/v3/tech-record/put/trl/skeleton/index.d.ts index 633881a7..af350c03 100644 --- a/types/v3/tech-record/put/trl/skeleton/index.d.ts +++ b/types/v3/tech-record/put/trl/skeleton/index.d.ts @@ -18,6 +18,19 @@ export type FrameDescription = | "U section"; export type LetterTypes = "trailer acceptance" | "trailer rejection"; export type ParagraphIds = 3 | 4 | 5 | 6 | 7; +export type Months = + | "January" + | "February" + | "March" + | "April" + | "May" + | "June" + | "July" + | "August" + | "September" + | "October" + | "November" + | "December"; export type MicrofilmDocumentType = | "PSV Miscellaneous" | "AAT - Trailer Annual Test" @@ -192,6 +205,7 @@ export interface TechRecordPUTTRLSkeleton { techRecord_letterOfAuth_paragraphId?: null | ParagraphIds; techRecord_letterOfAuth_letterIssuer?: string | null; techRecord_make?: string | null; + techRecord_manufactureMonth?: Months | null; techRecord_manufactureYear?: number | null; techRecord_manufacturerDetails?: string | null; techRecord_maxLoadOnCoupling?: number | null; diff --git a/types/v3/tech-record/put/trl/testable/index.d.ts b/types/v3/tech-record/put/trl/testable/index.d.ts index 3e485edc..94b69d16 100644 --- a/types/v3/tech-record/put/trl/testable/index.d.ts +++ b/types/v3/tech-record/put/trl/testable/index.d.ts @@ -18,6 +18,19 @@ export type FrameDescription = | "U section"; export type LetterTypes = "trailer acceptance" | "trailer rejection"; export type ParagraphIds = 3 | 4 | 5 | 6 | 7; +export type Months = + | "January" + | "February" + | "March" + | "April" + | "May" + | "June" + | "July" + | "August" + | "September" + | "October" + | "November" + | "December"; export type MicrofilmDocumentType = | "PSV Miscellaneous" | "AAT - Trailer Annual Test" @@ -192,6 +205,7 @@ export interface TechRecordPUTTRLTestable { techRecord_letterOfAuth_paragraphId?: null | ParagraphIds; techRecord_letterOfAuth_letterIssuer?: string | null; techRecord_make?: string | null; + techRecord_manufactureMonth?: Months | null; techRecord_manufactureYear?: number | null; techRecord_manufacturerDetails?: string | null; techRecord_maxLoadOnCoupling?: number | null;