Skip to content

Commit

Permalink
feat(CB2-13178): use type definitions type instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Searle committed Aug 13, 2024
1 parent e5a4dcb commit d81e7b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@aws-sdk/client-dynamodb-streams": "3.577.0",
"@aws-sdk/client-secrets-manager": "3.565.0",
"@aws-sdk/util-dynamodb": "3.577.0",
"@dvsa/cvs-type-definitions": "^7.4.0",
"@types/lambda-tester": "4.0.3",
"aws-xray-sdk": "3.6.0",
"date-fns": "3.6.0",
Expand Down
7 changes: 3 additions & 4 deletions src/models/test-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import {
} from './shared-enums';
import { DynamoDbImage, parseStringArray } from '../services/dynamodb-images';
import { debugLog } from '../services/logger';
import {TestStationTypes} from "@dvsa/cvs-type-definitions/types/v1/enums/testStationType.enum";

export type TestVersion = 'current' | 'archived';

export type TestStationType = 'atf' | 'gvts' | 'hq' | 'vef';

export type TestStatus = 'submitted' | 'cancelled';

export type OdometerReadingUnits = 'kilometres' | 'miles';
Expand All @@ -37,7 +36,7 @@ export interface TestResult {
shouldEmailCertificate?: string;
testStationName?: string;
testStationPNumber?: string;
testStationType?: TestStationType;
testStationType?: TestStationTypes;
testerName?: string;
testerStaffId?: string;
testResultId?: string;
Expand Down Expand Up @@ -98,7 +97,7 @@ export const parseTestResult = (image: DynamoDbImage): TestResult => ({
shouldEmailCertificate: image.getString('shouldEmailCertificate'),
testStationName: image.getString('testStationName'),
testStationPNumber: image.getString('testStationPNumber'),
testStationType: image.getString('testStationType') as TestStationType,
testStationType: image.getString('testStationType') as TestStationTypes,
testerName: image.getString('testerName'),
testerStaffId: image.getString('testerStaffId'),
testResultId: image.getString('testResultId'),
Expand Down

0 comments on commit d81e7b2

Please sign in to comment.