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

Merge Prod Release into Master #110

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/build_hash.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build hash and deploy to S3
run-name: "${{ github.actor }} - ${{ github.ref_name }} - ${{ github.run_id }} 🚀"
run-name: '${{ github.actor }} - ${{ github.ref_name }} - ${{ github.run_id }} 🚀'

on:
workflow_dispatch:
Expand Down
7,574 changes: 5,034 additions & 2,540 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.632.0",
"@aws-sdk/lib-dynamodb": "^3.632.0",
"@dvsa/cvs-type-definitions": "7.4.0",
"@smithy/smithy-client": "^2.5.0",
"aws-lambda": "^1.0.7",
"aws-sdk": "^2.1325.0",
"aws-xray-sdk": "^3.4.1",
"aws-xray-sdk": "^3.6.0",
"date-fns": "^2.29.3",
"joi": "^14.3.1",
"joi": "17.13.3",
"moment": "2.29.4",
"node-yaml": "4.0.1",
"path-parser": "^6.1.0",
"reflect-metadata": "^0.1.13",
"serverless-dynamodb": "0.2.45",
"ts-node-register": "^1.0.0",
"uuid": "^9.0.0"
},
Expand All @@ -51,7 +53,7 @@
"@types/express-serve-static-core": "4.17.20",
"@types/jest": "^24.0.21",
"@types/jest-plugin-context": "^2.9.2",
"@types/joi": "^14.3.4",
"@types/joi": "^17.2.3",
"@types/lambda-tester": "^3.6.0",
"@types/lodash": "4.14.121",
"@types/node": "^14.18.16",
Expand All @@ -60,14 +62,16 @@
"@types/uuid": "^3.4.6",
"audit-filter": "^0.5.0",
"aws-lambda-mock-context": "^3.2.1",
"aws-sdk-client-mock": "^4.0.0",
"husky": "7.0.4",
"jest": "^29.4.3",
"jest-plugin-context": "^2.9.0",
"jest-sonar-reporter": "^2.0.0",
"lambda-tester": "^4.0.1",
"prettier": "^2.8.4",
"serverless": "3.28.1",
"serverless-offline": "^12.0.4",
"serverless-dynamodb": "0.2.45",
"serverless-offline": "^13.3.4",
"serverless-plugin-tracing": "2.0.0",
"serverless-plugin-typescript": "2.1.4",
"sonarqube-scanner": "3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/getDBPid.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!/bin/sh

# Config of port is done at the moment in serverless.yml and script handled for us
lsof -i:8005 | awk '{print $2}' | grep -v '^PID'
lsof -i:8005 | awk '{print $2}' | tail -1
13 changes: 0 additions & 13 deletions src/assets/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,3 @@ export enum QUERY_PARAMS {
TESTER_STAFF_ID = 'testerStaffId',
END_TIME = 'endTime'
}

export enum ActivityType {
VISIT = 'visit',
WAIT = 'wait',
UNACCOUNTABLE_TIME = 'unaccountable time'
}

export enum StationType {
ATF = 'atf',
GVTS = 'gvts',
HQ = 'hq',
POTF = 'potf'
}
47 changes: 0 additions & 47 deletions src/models/Activity.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/models/ActivitySchema.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/models/ActivityUpdateSchema.ts

This file was deleted.

8 changes: 8 additions & 0 deletions src/models/IActivityParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface IActivityParams {
fromStartTime: string;
toStartTime: string;
activityType?: string;
testStationPNumber?: string;
testerStaffId?: string;
isOpen?: boolean;
}
24 changes: 24 additions & 0 deletions src/models/validators/ActivityCreated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Joi from 'joi';
import { ActivityType } from '@dvsa/cvs-type-definitions/types/v1/enums/activityType.enum';
import { WaitReason } from '@dvsa/cvs-type-definitions/types/v1/enums/waitReason.enum';
import { TestStationTypes } from '@dvsa/cvs-type-definitions/types/v1/enums/testStationType.enum';

export const ActivityCreated = Joi.object().keys({
parentId: Joi.string().optional(),
activityType: Joi.string().valid(...Object.values(ActivityType)).required(),
testStationName: Joi.string().required(),
testStationPNumber: Joi.string().required(),
testStationEmail: Joi.string().email().required().allow(''),
testStationType: Joi.string().valid(...Object.values(TestStationTypes)).required(),
testerName: Joi.string().min(1).max(60).required(),
testerStaffId: Joi.string().required(),
testerEmail: Joi.any().when('activityType', {
is: ActivityType.VISIT,
then: Joi.string().email().required(),
otherwise: Joi.any().forbidden()
}),
startTime: Joi.string().optional(),
endTime: Joi.string().optional().allow(null),
waitReason: Joi.array().items(Joi.string().valid(...Object.values(WaitReason))).optional(),
notes: Joi.string().allow(null)
});
8 changes: 8 additions & 0 deletions src/models/validators/ActivityUpdated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Joi from 'joi';
import { WaitReason } from '@dvsa/cvs-type-definitions/types/v1/enums/waitReason.enum';

export const ActivityUpdated = Joi.object().keys({
id: Joi.string().required(),
waitReason: Joi.array().items(Joi.string().valid(...Object.values(WaitReason))).required(),
notes: Joi.string().allow(null)
});
Loading
Loading