@dvsa/des-scheduling-config 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/scheduling-schema.d.ts +1165 -0
- package/build/scheduling-schema.js +93 -0
- package/package.json +5 -3
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -20
- package/.github/workflows/ci.yaml +0 -13
- package/.github/workflows/publish.yaml +0 -15
- package/.github/workflows/security.yaml +0 -9
- package/.husky/pre-commit +0 -4
- package/.husky/pre-push +0 -4
- package/.idea/des-scheduling-config.iml +0 -8
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.npm-version +0 -1
- package/src/schemas/scheduling-schema.ts +0 -112
- package/tsconfig.json +0 -26
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScheduleBookings = void 0;
|
|
4
|
+
var mysql_core_1 = require("drizzle-orm/mysql-core");
|
|
5
|
+
exports.ScheduleBookings = (0, mysql_core_1.mysqlTable)('bookings', {
|
|
6
|
+
created_date: (0, mysql_core_1.datetime)('created_date').notNull(),
|
|
7
|
+
last_updated_date: (0, mysql_core_1.datetime)('last_updated_date').notNull(),
|
|
8
|
+
booking_reference: (0, mysql_core_1.varchar)('booking_reference', { length: 50 }).notNull().primaryKey(),
|
|
9
|
+
marked_for_deletion: (0, mysql_core_1.tinyint)('marked_for_deletion'),
|
|
10
|
+
dsp_created_date: (0, mysql_core_1.datetime)('dsp_created_date').notNull(),
|
|
11
|
+
dsp_last_updated_date: (0, mysql_core_1.datetime)('dsp_last_updated_date').notNull(),
|
|
12
|
+
examiner_staff_number: (0, mysql_core_1.varchar)('examiner_staff_number', { length: 50 }).notNull(),
|
|
13
|
+
examiner_title: (0, mysql_core_1.varchar)('examiner_title', { length: 50 }).notNull(),
|
|
14
|
+
examiner_first_name: (0, mysql_core_1.varchar)('examiner_first_name', { length: 100 }).notNull(),
|
|
15
|
+
examiner_second_name: (0, mysql_core_1.varchar)('examiner_second_name', { length: 100 }).notNull(),
|
|
16
|
+
examiner_third_name: (0, mysql_core_1.varchar)('examiner_third_name', { length: 100 }).notNull(),
|
|
17
|
+
examiner_last_name: (0, mysql_core_1.varchar)('examiner_last_name', { length: 100 }).notNull(),
|
|
18
|
+
testslot_start: (0, mysql_core_1.datetime)('testslot_start').notNull(),
|
|
19
|
+
slot_id: (0, mysql_core_1.bigint)('slot_id', { mode: 'bigint' }).notNull(),
|
|
20
|
+
testslot_duration_minutes: (0, mysql_core_1.int)('testslot_duration_minutes').notNull(),
|
|
21
|
+
testslot_vehicle_type_code: (0, mysql_core_1.mysqlEnum)('testslot_vehicle_type_code', [
|
|
22
|
+
'L',
|
|
23
|
+
'C',
|
|
24
|
+
'B',
|
|
25
|
+
'T',
|
|
26
|
+
'A2',
|
|
27
|
+
'A3',
|
|
28
|
+
'V4',
|
|
29
|
+
'B1',
|
|
30
|
+
'B2',
|
|
31
|
+
'O',
|
|
32
|
+
'LM',
|
|
33
|
+
'BE',
|
|
34
|
+
'TC',
|
|
35
|
+
'SC'
|
|
36
|
+
]).notNull(),
|
|
37
|
+
testslot_vehicle_slot_type_code: (0, mysql_core_1.int)('testslot_vehicle_slot_type_code'),
|
|
38
|
+
testcentre_name: (0, mysql_core_1.varchar)('testcentre_name', { length: 255 }).notNull(),
|
|
39
|
+
testcentre_cost_code: (0, mysql_core_1.varchar)('testcentre_cost_code', { length: 50 }).notNull(),
|
|
40
|
+
candidate_title: (0, mysql_core_1.varchar)('candidate_title', { length: 50 }).notNull(),
|
|
41
|
+
candidate_first_name: (0, mysql_core_1.varchar)('candidate_first_name', { length: 100 }).notNull(),
|
|
42
|
+
candidate_second_name: (0, mysql_core_1.varchar)('candidate_second_name', { length: 100 }).notNull(),
|
|
43
|
+
candidate_third_name: (0, mysql_core_1.varchar)('candidate_third_name', { length: 100 }).notNull(),
|
|
44
|
+
candidate_last_name: (0, mysql_core_1.varchar)('candidate_last_name', { length: 100 }).notNull(),
|
|
45
|
+
candidate_driver_number: (0, mysql_core_1.varchar)('candidate_driver_number', { length: 50 }).notNull(),
|
|
46
|
+
candidate_date_of_birth: (0, mysql_core_1.datetime)('candidate_date_of_birth').notNull(),
|
|
47
|
+
candidate_gender: (0, mysql_core_1.mysqlEnum)('candidate_gender', ['M', 'F']).notNull(),
|
|
48
|
+
candidate_address_line1: (0, mysql_core_1.varchar)('candidate_address_line1', { length: 255 }).notNull(),
|
|
49
|
+
candidate_address_line2: (0, mysql_core_1.varchar)('candidate_address_line2', { length: 255 }).notNull(),
|
|
50
|
+
candidate_address_line3: (0, mysql_core_1.varchar)('candidate_address_line3', { length: 255 }).notNull(),
|
|
51
|
+
candidate_address_line4: (0, mysql_core_1.varchar)('candidate_address_line4', { length: 255 }).notNull(),
|
|
52
|
+
candidate_address_line5: (0, mysql_core_1.varchar)('candidate_address_line5', { length: 255 }).notNull(),
|
|
53
|
+
candidate_postcode: (0, mysql_core_1.varchar)('candidate_postcode', { length: 20 }).notNull(),
|
|
54
|
+
candidate_primary_telephone: (0, mysql_core_1.varchar)('candidate_primary_telephone', { length: 50 }).notNull(),
|
|
55
|
+
candidate_secondary_telephone: (0, mysql_core_1.varchar)('candidate_secondary_telephone', { length: 50 }).notNull(),
|
|
56
|
+
candidate_mobile_telephone: (0, mysql_core_1.varchar)('candidate_mobile_telephone', { length: 50 }).notNull(),
|
|
57
|
+
candidate_email_address: (0, mysql_core_1.varchar)('candidate_email_address', { length: 255 }).notNull(),
|
|
58
|
+
candidate_prn: (0, mysql_core_1.int)('candidate_prn'),
|
|
59
|
+
candidate_previous_adi_tests: (0, mysql_core_1.int)('candidate_previous_adi_tests'),
|
|
60
|
+
candidate_ethnicity_code: (0, mysql_core_1.varchar)('candidate_ethnicity_code', { length: 5 }),
|
|
61
|
+
application_welsh_test: (0, mysql_core_1.tinyint)('application_welsh_test').notNull(),
|
|
62
|
+
application_extended_test: (0, mysql_core_1.tinyint)('application_extended_test').notNull(),
|
|
63
|
+
application_meeting_place: (0, mysql_core_1.varchar)('application_meeting_place', { length: 255 }).notNull(),
|
|
64
|
+
application_progressive_access: (0, mysql_core_1.tinyint)('application_progressive_access').notNull(),
|
|
65
|
+
application_special_needs: (0, mysql_core_1.text)('application_special_needs').notNull(),
|
|
66
|
+
application_special_needs_ext_test: (0, mysql_core_1.tinyint)('application_special_needs_ext_test').notNull(),
|
|
67
|
+
application_special_needs_code: (0, mysql_core_1.mysqlEnum)('application_special_needs_code', ['NONE', 'YES', 'EXTRA']).notNull(),
|
|
68
|
+
application_entitlement_check: (0, mysql_core_1.tinyint)('application_entitlement_check').notNull(),
|
|
69
|
+
application_fit_marker: (0, mysql_core_1.tinyint)('application_fit_marker').notNull(),
|
|
70
|
+
application_fit_case_number: (0, mysql_core_1.varchar)('application_fit_case_number', { length: 50 }).notNull(),
|
|
71
|
+
application_category_entitlement_check: (0, mysql_core_1.tinyint)('application_category_entitlement_check').notNull(),
|
|
72
|
+
application_vehicle_seats: (0, mysql_core_1.int)('application_vehicle_seats'),
|
|
73
|
+
application_vehicle_height_m: (0, mysql_core_1.decimal)('application_vehicle_height_m', { precision: 5, scale: 2 }),
|
|
74
|
+
application_vehicle_width_m: (0, mysql_core_1.decimal)('application_vehicle_width_m', { precision: 5, scale: 2 }),
|
|
75
|
+
application_vehicle_length_m: (0, mysql_core_1.decimal)('application_vehicle_length_m', { precision: 5, scale: 2 }),
|
|
76
|
+
application_test_category: (0, mysql_core_1.varchar)('application_test_category', { length: 10 }).notNull(),
|
|
77
|
+
application_vehicle_gearbox: (0, mysql_core_1.mysqlEnum)('application_vehicle_gearbox', [
|
|
78
|
+
'Manual',
|
|
79
|
+
'Semi-Automatic',
|
|
80
|
+
'Automatic',
|
|
81
|
+
]).notNull(),
|
|
82
|
+
previous_cancellation: (0, mysql_core_1.json)('previous_cancellation').$type(),
|
|
83
|
+
business_id: (0, mysql_core_1.int)('business_id'),
|
|
84
|
+
business_name: (0, mysql_core_1.varchar)('business_name', { length: 255 }),
|
|
85
|
+
business_address_line1: (0, mysql_core_1.varchar)('business_address_line1', { length: 255 }),
|
|
86
|
+
business_address_line2: (0, mysql_core_1.varchar)('business_address_line2', { length: 255 }),
|
|
87
|
+
business_address_line3: (0, mysql_core_1.varchar)('business_address_line3', { length: 255 }),
|
|
88
|
+
business_address_line4: (0, mysql_core_1.varchar)('business_address_line4', { length: 255 }),
|
|
89
|
+
business_address_line5: (0, mysql_core_1.varchar)('business_address_line5', { length: 255 }),
|
|
90
|
+
business_postcode: (0, mysql_core_1.varchar)('business_postcode', { length: 20 }),
|
|
91
|
+
business_telephone: (0, mysql_core_1.varchar)('business_telephone', { length: 50 }),
|
|
92
|
+
examiner_visiting: (0, mysql_core_1.tinyint)('examiner_visiting'),
|
|
93
|
+
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvsa/des-scheduling-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "The config for the DES schedulng table",
|
|
5
|
-
"main": "index.js",
|
|
6
5
|
"scripts": {
|
|
7
6
|
"clean": "rimraf build artefacts dist lib application domain framework",
|
|
8
7
|
"lint": "eslint -c .eslintrc.js --ext .ts src",
|
|
@@ -21,5 +20,8 @@
|
|
|
21
20
|
"rimraf": "^6.1.2",
|
|
22
21
|
"ts-node": "^10.9.2",
|
|
23
22
|
"typescript": "^5.9.3"
|
|
24
|
-
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"build/**"
|
|
26
|
+
]
|
|
25
27
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Description and relevant Jira numbers
|
|
2
|
-
|
|
3
|
-
## Pull Request checklist
|
|
4
|
-
|
|
5
|
-
- [ ] [WIP] tag removed from PR title
|
|
6
|
-
- [ ] PR has an understandable description
|
|
7
|
-
|
|
8
|
-
## Git feature branch checklist
|
|
9
|
-
|
|
10
|
-
- [ ] branch name comply with our branching strategy
|
|
11
|
-
- [ ] git branch contains relevant JIRA ticket number
|
|
12
|
-
- [ ] branch rebased against the latest develop
|
|
13
|
-
|
|
14
|
-
## Sign off process checklist
|
|
15
|
-
|
|
16
|
-
- [ ] Code has been tested manually
|
|
17
|
-
- [ ] Tested by QA
|
|
18
|
-
- [ ] PO's approval
|
|
19
|
-
- [ ] Reviewers selected in Github
|
|
20
|
-
- [ ] PR link added to JIRA
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
name: Publish package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- develop
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
publish:
|
|
10
|
-
uses: dvsa/des-workflow-actions/.github/workflows/publish-package.yaml@main
|
|
11
|
-
with:
|
|
12
|
-
WORKING_DIRECTORY: '.'
|
|
13
|
-
PACKAGE_NAME: '@dvsa/mes-microservice-common'
|
|
14
|
-
secrets:
|
|
15
|
-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
package/.husky/pre-commit
DELETED
package/.husky/pre-push
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$" />
|
|
5
|
-
<orderEntry type="inheritedJdk" />
|
|
6
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
7
|
-
</component>
|
|
8
|
-
</module>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/des-scheduling-config.iml" filepath="$PROJECT_DIR$/.idea/des-scheduling-config.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/vcs.xml
DELETED
package/.npm-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
10.1.0
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
varchar,
|
|
3
|
-
int,
|
|
4
|
-
tinyint,
|
|
5
|
-
decimal,
|
|
6
|
-
text,
|
|
7
|
-
json,
|
|
8
|
-
datetime,
|
|
9
|
-
mysqlEnum,
|
|
10
|
-
bigint, mysqlTable,
|
|
11
|
-
} from 'drizzle-orm/mysql-core';
|
|
12
|
-
|
|
13
|
-
export const ScheduleBookings = mysqlTable(
|
|
14
|
-
'bookings',
|
|
15
|
-
{
|
|
16
|
-
created_date: datetime('created_date').notNull(),
|
|
17
|
-
last_updated_date: datetime('last_updated_date').notNull(),
|
|
18
|
-
booking_reference: varchar('booking_reference', {length: 50}).notNull().primaryKey(),
|
|
19
|
-
|
|
20
|
-
marked_for_deletion: tinyint('marked_for_deletion'),
|
|
21
|
-
dsp_created_date: datetime('dsp_created_date').notNull(),
|
|
22
|
-
dsp_last_updated_date: datetime('dsp_last_updated_date').notNull(),
|
|
23
|
-
|
|
24
|
-
examiner_staff_number: varchar('examiner_staff_number', {length: 50}).notNull(),
|
|
25
|
-
examiner_title: varchar('examiner_title', {length: 50}).notNull(),
|
|
26
|
-
examiner_first_name: varchar('examiner_first_name', {length: 100}).notNull(),
|
|
27
|
-
examiner_second_name: varchar('examiner_second_name', {length: 100}).notNull(),
|
|
28
|
-
examiner_third_name: varchar('examiner_third_name', {length: 100}).notNull(),
|
|
29
|
-
examiner_last_name: varchar('examiner_last_name', {length: 100}).notNull(),
|
|
30
|
-
|
|
31
|
-
testslot_start: datetime('testslot_start').notNull(),
|
|
32
|
-
slot_id: bigint('slot_id', {mode: 'bigint'}).notNull(),
|
|
33
|
-
testslot_duration_minutes: int('testslot_duration_minutes').notNull(),
|
|
34
|
-
testslot_vehicle_type_code: mysqlEnum('testslot_vehicle_type_code', [
|
|
35
|
-
'L',
|
|
36
|
-
'C',
|
|
37
|
-
'B',
|
|
38
|
-
'T',
|
|
39
|
-
'A2',
|
|
40
|
-
'A3',
|
|
41
|
-
'V4',
|
|
42
|
-
'B1',
|
|
43
|
-
'B2',
|
|
44
|
-
'O',
|
|
45
|
-
'LM',
|
|
46
|
-
'BE',
|
|
47
|
-
'TC',
|
|
48
|
-
'SC']).notNull(),
|
|
49
|
-
testslot_vehicle_slot_type_code: int('testslot_vehicle_slot_type_code'),
|
|
50
|
-
|
|
51
|
-
testcentre_name: varchar('testcentre_name', {length: 255}).notNull(),
|
|
52
|
-
testcentre_cost_code: varchar('testcentre_cost_code', {length: 50}).notNull(),
|
|
53
|
-
|
|
54
|
-
candidate_title: varchar('candidate_title', {length: 50}).notNull(),
|
|
55
|
-
candidate_first_name: varchar('candidate_first_name', {length: 100}).notNull(),
|
|
56
|
-
candidate_second_name: varchar('candidate_second_name', {length: 100}).notNull(),
|
|
57
|
-
candidate_third_name: varchar('candidate_third_name', {length: 100}).notNull(),
|
|
58
|
-
candidate_last_name: varchar('candidate_last_name', {length: 100}).notNull(),
|
|
59
|
-
candidate_driver_number: varchar('candidate_driver_number', {length: 50}).notNull(),
|
|
60
|
-
candidate_date_of_birth: datetime('candidate_date_of_birth').notNull(),
|
|
61
|
-
candidate_gender: mysqlEnum('candidate_gender', ['M', 'F']).notNull(),
|
|
62
|
-
candidate_address_line1: varchar('candidate_address_line1', {length: 255}).notNull(),
|
|
63
|
-
candidate_address_line2: varchar('candidate_address_line2', {length: 255}).notNull(),
|
|
64
|
-
candidate_address_line3: varchar('candidate_address_line3', {length: 255}).notNull(),
|
|
65
|
-
candidate_address_line4: varchar('candidate_address_line4', {length: 255}).notNull(),
|
|
66
|
-
candidate_address_line5: varchar('candidate_address_line5', {length: 255}).notNull(),
|
|
67
|
-
candidate_postcode: varchar('candidate_postcode', {length: 20}).notNull(),
|
|
68
|
-
candidate_primary_telephone: varchar('candidate_primary_telephone', {length: 50}).notNull(),
|
|
69
|
-
candidate_secondary_telephone: varchar('candidate_secondary_telephone', {length: 50}).notNull(),
|
|
70
|
-
candidate_mobile_telephone: varchar('candidate_mobile_telephone', {length: 50}).notNull(),
|
|
71
|
-
candidate_email_address: varchar('candidate_email_address', {length: 255}).notNull(),
|
|
72
|
-
candidate_prn: int('candidate_prn'),
|
|
73
|
-
candidate_previous_adi_tests: int('candidate_previous_adi_tests'),
|
|
74
|
-
candidate_ethnicity_code: varchar('candidate_ethnicity_code', {length: 5}),
|
|
75
|
-
|
|
76
|
-
application_welsh_test: tinyint('application_welsh_test').notNull(),
|
|
77
|
-
application_extended_test: tinyint('application_extended_test').notNull(),
|
|
78
|
-
application_meeting_place: varchar('application_meeting_place', {length: 255}).notNull(),
|
|
79
|
-
application_progressive_access: tinyint('application_progressive_access').notNull(),
|
|
80
|
-
application_special_needs: text('application_special_needs').notNull(),
|
|
81
|
-
application_special_needs_ext_test: tinyint('application_special_needs_ext_test').notNull(),
|
|
82
|
-
application_special_needs_code: mysqlEnum('application_special_needs_code', ['NONE', 'YES', 'EXTRA']).notNull(),
|
|
83
|
-
application_entitlement_check: tinyint('application_entitlement_check').notNull(),
|
|
84
|
-
application_fit_marker: tinyint('application_fit_marker').notNull(),
|
|
85
|
-
application_fit_case_number: varchar('application_fit_case_number', {length: 50}).notNull(),
|
|
86
|
-
application_category_entitlement_check: tinyint('application_category_entitlement_check').notNull(),
|
|
87
|
-
application_vehicle_seats: int('application_vehicle_seats'),
|
|
88
|
-
application_vehicle_height_m: decimal('application_vehicle_height_m', {precision: 5, scale: 2}),
|
|
89
|
-
application_vehicle_width_m: decimal('application_vehicle_width_m', {precision: 5, scale: 2}),
|
|
90
|
-
application_vehicle_length_m: decimal('application_vehicle_length_m', {precision: 5, scale: 2}),
|
|
91
|
-
application_test_category: varchar('application_test_category', {length: 10}).notNull(),
|
|
92
|
-
application_vehicle_gearbox: mysqlEnum('application_vehicle_gearbox',
|
|
93
|
-
[
|
|
94
|
-
'Manual',
|
|
95
|
-
'Semi-Automatic',
|
|
96
|
-
'Automatic',
|
|
97
|
-
]).notNull(),
|
|
98
|
-
|
|
99
|
-
previous_cancellation: json('previous_cancellation').$type<string[]>(),
|
|
100
|
-
business_id: int('business_id'),
|
|
101
|
-
business_name: varchar('business_name', {length: 255}),
|
|
102
|
-
business_address_line1: varchar('business_address_line1', {length: 255}),
|
|
103
|
-
business_address_line2: varchar('business_address_line2', {length: 255}),
|
|
104
|
-
business_address_line3: varchar('business_address_line3', {length: 255}),
|
|
105
|
-
business_address_line4: varchar('business_address_line4', {length: 255}),
|
|
106
|
-
business_address_line5: varchar('business_address_line5', {length: 255}),
|
|
107
|
-
business_postcode: varchar('business_postcode', {length: 20}),
|
|
108
|
-
business_telephone: varchar('business_telephone', {length: 50}),
|
|
109
|
-
|
|
110
|
-
examiner_visiting: tinyint('examiner_visiting'),
|
|
111
|
-
},
|
|
112
|
-
);
|
package/tsconfig.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "./build",
|
|
4
|
-
"strict": true,
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"allowJs": false,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"lib": [
|
|
9
|
-
"es6",
|
|
10
|
-
"es2017",
|
|
11
|
-
"dom"
|
|
12
|
-
],
|
|
13
|
-
"target": "es5",
|
|
14
|
-
"types": [
|
|
15
|
-
"node",
|
|
16
|
-
],
|
|
17
|
-
"experimentalDecorators": true,
|
|
18
|
-
"emitDecoratorMetadata": true
|
|
19
|
-
},
|
|
20
|
-
"include": [
|
|
21
|
-
"./src/**/*",
|
|
22
|
-
],
|
|
23
|
-
"exclude": [
|
|
24
|
-
"node_modules"
|
|
25
|
-
]
|
|
26
|
-
}
|