@planning-inspectorate/data-model 2.51.0 → 2.52.0
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/commitlint.config.js +3 -8
- package/docs/README.md +2 -2
- package/docs/address.md +1 -1
- package/docs/applications-notify-email.md +2 -2
- package/docs/applications-representation-defs-contact.md +93 -0
- package/docs/applications-representation-defs-representationdocument.md +152 -0
- package/docs/applications-representation-defs.md +3 -0
- package/docs/applications-representation.md +41 -41
- package/eslint.config.js +3 -20
- package/load-test/appeals/generate-appeals-messages.js +1 -1
- package/load-test/appeals/run-load-script.js +2 -2
- package/load-test/service-bus-client.js +1 -1
- package/package.json +5 -2
- package/pins_data_model/models/model_address.py +1 -1
- package/pins_data_model/models/model_applications_notify_email.py +1 -1
- package/pins_data_model/models/model_applications_representation.py +2 -2
- package/prettier.config.js +13 -0
- package/schemas/address.schema.json +1 -1
- package/schemas/applications-notify-email.schema.json +1 -1
- package/schemas/applications-representation.schema.json +6 -6
- package/src/index.cjs +1 -1
- package/src/lib/gen-docs.js +1 -1
- package/src/lib/gen-enum-impl.test.js +1 -1
- package/src/lib/gen-enums.js +1 -1
- package/src/lib/gen-types.js +2 -2
- package/src/lib/load.js +1 -1
- package/src/schemas.d.ts +31 -4
- package/tests/appeals/appeal-event.test.js +2 -2
- package/tests/appeals/appeal-has.test.js +2 -2
- package/tests/appeals/appeal-s78.test.js +2 -2
- package/tests/appeals/commands/adverts-questionnaire.test.js +2 -2
- package/tests/appeals/commands/adverts-submission.test.js +2 -2
- package/tests/appeals/commands/appeal-representation-submission.test.js +2 -2
- package/tests/appeals/commands/cas-adverts-questionnaire.test.js +2 -2
- package/tests/appeals/commands/cas-adverts-submission.test.js +2 -2
- package/tests/appeals/commands/enforcement-listed-questionnaire.test.js +2 -2
- package/tests/appeals/commands/enforcement-listed-submission.test.js +2 -2
- package/tests/appeals/commands/enforcement-notice-submission.test.js +2 -2
- package/tests/appeals/commands/enforcement-questionnaire.test.js +2 -2
- package/tests/appeals/commands/has-questionnaire.test.js +2 -2
- package/tests/appeals/commands/has-submission.test.js +2 -2
- package/tests/appeals/commands/ldc-questionnaire.test.js +2 -2
- package/tests/appeals/commands/ldc-submission.test.js +2 -2
- package/tests/appeals/commands/s20-questionnaire.test.js +2 -2
- package/tests/appeals/commands/s78-questionnaire.test.js +2 -2
- package/tests/appeals/commands/s78-submission.test.js +2 -2
- package/tests/appeals/expedited-appeals.test.js +2 -2
- package/tests/schemas.test.js +1 -1
- package/.prettierrc +0 -19
package/commitlint.config.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ignores: [
|
|
5
|
-
(commit) =>
|
|
6
|
-
(commit.startsWith('chore(deps)') || commit.startsWith('chore(deps-dev)')) && commit.includes('dependabot')
|
|
7
|
-
]
|
|
8
|
-
};
|
|
1
|
+
import { commitlintConfig } from '@planning-inspectorate/coding-standards';
|
|
2
|
+
|
|
3
|
+
export default commitlintConfig;
|
package/docs/README.md
CHANGED
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
|
|
85
85
|
* [Untitled object in Appeal S78 Case](./appeal-s78-properties-significantchangesaffectingapplicationlpa-items.md) – `appeal-s78.schema.json#/properties/significantChangesAffectingApplicationLpa/items`
|
|
86
86
|
|
|
87
|
-
* [Untitled object in Casework Representation Schema](./applications-representation-
|
|
87
|
+
* [Untitled object in Casework Representation Schema](./applications-representation-defs-contact.md) – `applications-representation.schema.json#/$defs/contact`
|
|
88
88
|
|
|
89
|
-
* [Untitled object in Casework Representation Schema](./applications-representation-
|
|
89
|
+
* [Untitled object in Casework Representation Schema](./applications-representation-defs-representationdocument.md) – `applications-representation.schema.json#/$defs/representationDocument`
|
|
90
90
|
|
|
91
91
|
* [Untitled object in Crown Development Application](./applications-application-defs-organisation.md) – `applications-application.schema.json#/$defs/organisation`
|
|
92
92
|
|
package/docs/address.md
CHANGED
|
@@ -327,7 +327,7 @@ Some sites may have a postcode, but do not have postal addresses.
|
|
|
327
327
|
|
|
328
328
|
## UPRN
|
|
329
329
|
|
|
330
|
-
The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location
|
|
330
|
+
The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location - e.g., a building, a bus stop, a post box, a feature in the landscape, or a defibrillator - in Great Britain.
|
|
331
331
|
|
|
332
332
|
`UPRN`
|
|
333
333
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
| [email](#email) | `string` | Optional | can be null | [Email Notification Record Schema](applications-notify-email-properties-email.md "applications-notify-email.schema.json#/properties/email") |
|
|
19
19
|
| [contact](#contact) | `array` | Optional | can be null | [Email Notification Record Schema](applications-notify-email-properties-contact.md "applications-notify-email.schema.json#/properties/contact") |
|
|
20
20
|
| [lpaCode](#lpacode) | `string` | Required | cannot be null | [Email Notification Record Schema](applications-notify-email-properties-lpacode.md "applications-notify-email.schema.json#/properties/lpaCode") |
|
|
21
|
-
| [emailStatus](#emailstatus) | `string` |
|
|
21
|
+
| [emailStatus](#emailstatus) | `string` | Required | cannot be null | [Email Notification Record Schema](applications-notify-email-properties-emailstatus.md "applications-notify-email.schema.json#/properties/emailStatus") |
|
|
22
22
|
| [templateId](#templateid) | `string` | Optional | can be null | [Email Notification Record Schema](applications-notify-email-properties-templateid.md "applications-notify-email.schema.json#/properties/templateId") |
|
|
23
23
|
| [templateVersion](#templateversion) | `integer` | Optional | can be null | [Email Notification Record Schema](applications-notify-email-properties-templateversion.md "applications-notify-email.schema.json#/properties/templateVersion") |
|
|
24
24
|
| [body](#body) | `string` | Optional | can be null | [Email Notification Record Schema](applications-notify-email-properties-body.md "applications-notify-email.schema.json#/properties/body") |
|
|
@@ -259,7 +259,7 @@ Outcome of the email (status)
|
|
|
259
259
|
|
|
260
260
|
`emailStatus`
|
|
261
261
|
|
|
262
|
-
* is
|
|
262
|
+
* is required
|
|
263
263
|
|
|
264
264
|
* Type: `string`
|
|
265
265
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
## contact Type
|
|
2
|
+
|
|
3
|
+
`object` ([Details](applications-representation-defs-contact.md))
|
|
4
|
+
|
|
5
|
+
# contact Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
8
|
+
| :---------------------------------------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| [contactId](#contactid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-contact-properties-contactid.md "applications-representation.schema.json#/$defs/contact/properties/contactId") |
|
|
10
|
+
| [contactPreference](#contactpreference) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-contact-properties-contactpreference.md "applications-representation.schema.json#/$defs/contact/properties/contactPreference") |
|
|
11
|
+
| [writtenRepOrgName](#writtenreporgname) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-contact-properties-writtenreporgname.md "applications-representation.schema.json#/$defs/contact/properties/writtenRepOrgName") |
|
|
12
|
+
| [writtenRepJobTitleorRole](#writtenrepjobtitleorrole) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-contact-properties-writtenrepjobtitleorrole.md "applications-representation.schema.json#/$defs/contact/properties/writtenRepJobTitleorRole") |
|
|
13
|
+
|
|
14
|
+
## contactId
|
|
15
|
+
|
|
16
|
+
Source PK for Contact
|
|
17
|
+
|
|
18
|
+
`contactId`
|
|
19
|
+
|
|
20
|
+
* is required
|
|
21
|
+
|
|
22
|
+
* Type: `string`
|
|
23
|
+
|
|
24
|
+
* cannot be null
|
|
25
|
+
|
|
26
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-contact-properties-contactid.md "applications-representation.schema.json#/$defs/contact/properties/contactId")
|
|
27
|
+
|
|
28
|
+
### contactId Type
|
|
29
|
+
|
|
30
|
+
`string`
|
|
31
|
+
|
|
32
|
+
## contactPreference
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
`contactPreference`
|
|
37
|
+
|
|
38
|
+
* is optional
|
|
39
|
+
|
|
40
|
+
* Type: `string`
|
|
41
|
+
|
|
42
|
+
* can be null
|
|
43
|
+
|
|
44
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-contact-properties-contactpreference.md "applications-representation.schema.json#/$defs/contact/properties/contactPreference")
|
|
45
|
+
|
|
46
|
+
### contactPreference Type
|
|
47
|
+
|
|
48
|
+
`string`
|
|
49
|
+
|
|
50
|
+
### contactPreference Constraints
|
|
51
|
+
|
|
52
|
+
**enum**: the value of this property must be equal to one of the following values:
|
|
53
|
+
|
|
54
|
+
| Value | Explanation |
|
|
55
|
+
| :-------- | :---------- |
|
|
56
|
+
| `"email"` | |
|
|
57
|
+
| `"post"` | |
|
|
58
|
+
|
|
59
|
+
## writtenRepOrgName
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
`writtenRepOrgName`
|
|
64
|
+
|
|
65
|
+
* is optional
|
|
66
|
+
|
|
67
|
+
* Type: `string`
|
|
68
|
+
|
|
69
|
+
* can be null
|
|
70
|
+
|
|
71
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-contact-properties-writtenreporgname.md "applications-representation.schema.json#/$defs/contact/properties/writtenRepOrgName")
|
|
72
|
+
|
|
73
|
+
### writtenRepOrgName Type
|
|
74
|
+
|
|
75
|
+
`string`
|
|
76
|
+
|
|
77
|
+
## writtenRepJobTitleorRole
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
`writtenRepJobTitleorRole`
|
|
82
|
+
|
|
83
|
+
* is optional
|
|
84
|
+
|
|
85
|
+
* Type: `string`
|
|
86
|
+
|
|
87
|
+
* can be null
|
|
88
|
+
|
|
89
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-contact-properties-writtenrepjobtitleorrole.md "applications-representation.schema.json#/$defs/contact/properties/writtenRepJobTitleorRole")
|
|
90
|
+
|
|
91
|
+
### writtenRepJobTitleorRole Type
|
|
92
|
+
|
|
93
|
+
`string`
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
## representationDocument Type
|
|
2
|
+
|
|
3
|
+
`object` ([Details](applications-representation-defs-representationdocument.md))
|
|
4
|
+
|
|
5
|
+
# representationDocument Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
8
|
+
| :------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| [id](#id) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-id.md "applications-representation.schema.json#/$defs/representationDocument/properties/id") |
|
|
10
|
+
| [representationId](#representationid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-representationid.md "applications-representation.schema.json#/$defs/representationDocument/properties/representationId") |
|
|
11
|
+
| [itemId](#itemid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-itemid.md "applications-representation.schema.json#/$defs/representationDocument/properties/itemId") |
|
|
12
|
+
| [fileName](#filename) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-filename.md "applications-representation.schema.json#/$defs/representationDocument/properties/fileName") |
|
|
13
|
+
| [redactedItemId](#redacteditemid) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-redacteditemid.md "applications-representation.schema.json#/$defs/representationDocument/properties/redactedItemId") |
|
|
14
|
+
| [redactedFileName](#redactedfilename) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-redactedfilename.md "applications-representation.schema.json#/$defs/representationDocument/properties/redactedFileName") |
|
|
15
|
+
| [status](#status) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-status.md "applications-representation.schema.json#/$defs/representationDocument/properties/status") |
|
|
16
|
+
|
|
17
|
+
## id
|
|
18
|
+
|
|
19
|
+
Source Key for Representation Document
|
|
20
|
+
|
|
21
|
+
`id`
|
|
22
|
+
|
|
23
|
+
* is required
|
|
24
|
+
|
|
25
|
+
* Type: `string`
|
|
26
|
+
|
|
27
|
+
* cannot be null
|
|
28
|
+
|
|
29
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-id.md "applications-representation.schema.json#/$defs/representationDocument/properties/id")
|
|
30
|
+
|
|
31
|
+
### id Type
|
|
32
|
+
|
|
33
|
+
`string`
|
|
34
|
+
|
|
35
|
+
## representationId
|
|
36
|
+
|
|
37
|
+
The representation this relates to
|
|
38
|
+
|
|
39
|
+
`representationId`
|
|
40
|
+
|
|
41
|
+
* is required
|
|
42
|
+
|
|
43
|
+
* Type: `string`
|
|
44
|
+
|
|
45
|
+
* cannot be null
|
|
46
|
+
|
|
47
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-representationid.md "applications-representation.schema.json#/$defs/representationDocument/properties/representationId")
|
|
48
|
+
|
|
49
|
+
### representationId Type
|
|
50
|
+
|
|
51
|
+
`string`
|
|
52
|
+
|
|
53
|
+
## itemId
|
|
54
|
+
|
|
55
|
+
The id of the item in SharePoint
|
|
56
|
+
|
|
57
|
+
`itemId`
|
|
58
|
+
|
|
59
|
+
* is required
|
|
60
|
+
|
|
61
|
+
* Type: `string`
|
|
62
|
+
|
|
63
|
+
* cannot be null
|
|
64
|
+
|
|
65
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-itemid.md "applications-representation.schema.json#/$defs/representationDocument/properties/itemId")
|
|
66
|
+
|
|
67
|
+
### itemId Type
|
|
68
|
+
|
|
69
|
+
`string`
|
|
70
|
+
|
|
71
|
+
## fileName
|
|
72
|
+
|
|
73
|
+
The name of the file
|
|
74
|
+
|
|
75
|
+
`fileName`
|
|
76
|
+
|
|
77
|
+
* is required
|
|
78
|
+
|
|
79
|
+
* Type: `string`
|
|
80
|
+
|
|
81
|
+
* cannot be null
|
|
82
|
+
|
|
83
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-filename.md "applications-representation.schema.json#/$defs/representationDocument/properties/fileName")
|
|
84
|
+
|
|
85
|
+
### fileName Type
|
|
86
|
+
|
|
87
|
+
`string`
|
|
88
|
+
|
|
89
|
+
## redactedItemId
|
|
90
|
+
|
|
91
|
+
The id of the redacted version of the item in sharepoint
|
|
92
|
+
|
|
93
|
+
`redactedItemId`
|
|
94
|
+
|
|
95
|
+
* is optional
|
|
96
|
+
|
|
97
|
+
* Type: `string`
|
|
98
|
+
|
|
99
|
+
* can be null
|
|
100
|
+
|
|
101
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-redacteditemid.md "applications-representation.schema.json#/$defs/representationDocument/properties/redactedItemId")
|
|
102
|
+
|
|
103
|
+
### redactedItemId Type
|
|
104
|
+
|
|
105
|
+
`string`
|
|
106
|
+
|
|
107
|
+
## redactedFileName
|
|
108
|
+
|
|
109
|
+
the name of the redacted file
|
|
110
|
+
|
|
111
|
+
`redactedFileName`
|
|
112
|
+
|
|
113
|
+
* is optional
|
|
114
|
+
|
|
115
|
+
* Type: `string`
|
|
116
|
+
|
|
117
|
+
* can be null
|
|
118
|
+
|
|
119
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-redactedfilename.md "applications-representation.schema.json#/$defs/representationDocument/properties/redactedFileName")
|
|
120
|
+
|
|
121
|
+
### redactedFileName Type
|
|
122
|
+
|
|
123
|
+
`string`
|
|
124
|
+
|
|
125
|
+
## status
|
|
126
|
+
|
|
127
|
+
The status of the document
|
|
128
|
+
|
|
129
|
+
`status`
|
|
130
|
+
|
|
131
|
+
* is required
|
|
132
|
+
|
|
133
|
+
* Type: `string`
|
|
134
|
+
|
|
135
|
+
* cannot be null
|
|
136
|
+
|
|
137
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-status.md "applications-representation.schema.json#/$defs/representationDocument/properties/status")
|
|
138
|
+
|
|
139
|
+
### status Type
|
|
140
|
+
|
|
141
|
+
`string`
|
|
142
|
+
|
|
143
|
+
### status Constraints
|
|
144
|
+
|
|
145
|
+
**enum**: the value of this property must be equal to one of the following values:
|
|
146
|
+
|
|
147
|
+
| Value | Explanation |
|
|
148
|
+
| :------------------ | :---------- |
|
|
149
|
+
| `"Awaiting review"` | |
|
|
150
|
+
| `"Accepted"` | |
|
|
151
|
+
| `"Rejected"` | |
|
|
152
|
+
| `"Withdrawn"` | |
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
| [caseReference](#casereference) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-properties-casereference.md "applications-representation.schema.json#/properties/caseReference") |
|
|
12
12
|
| [caseId](#caseid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-properties-caseid.md "applications-representation.schema.json#/properties/caseId") |
|
|
13
13
|
| [caseType](#casetype) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-properties-casetype.md "applications-representation.schema.json#/properties/caseType") |
|
|
14
|
-
| [representationStatus](#representationstatus) | `string` |
|
|
14
|
+
| [representationStatus](#representationstatus) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-properties-representationstatus.md "applications-representation.schema.json#/properties/representationStatus") |
|
|
15
15
|
| [submittedFor](#submittedfor) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-properties-submittedfor.md "applications-representation.schema.json#/properties/submittedFor") |
|
|
16
16
|
| [submittedByContact](#submittedbycontact) | `array` | Optional | can be null | [Casework Representation Schema](applications-representation-properties-submittedbycontact.md "applications-representation.schema.json#/properties/submittedByContact") |
|
|
17
|
-
| [
|
|
17
|
+
| [submittedByAgent](#submittedbyagent) | `boolean` | Optional | can be null | [Casework Representation Schema](applications-representation-properties-submittedbyagent.md "applications-representation.schema.json#/properties/submittedByAgent") |
|
|
18
18
|
| [submittedByAgentOrgName](#submittedbyagentorgname) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-properties-submittedbyagentorgname.md "applications-representation.schema.json#/properties/submittedByAgentOrgName") |
|
|
19
19
|
| [submittedDate](#submitteddate) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-properties-submitteddate.md "applications-representation.schema.json#/properties/submittedDate") |
|
|
20
20
|
| [submittedReceivedMethod](#submittedreceivedmethod) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-properties-submittedreceivedmethod.md "applications-representation.schema.json#/properties/submittedReceivedMethod") |
|
|
@@ -130,7 +130,7 @@ The type of case this representation is for.
|
|
|
130
130
|
|
|
131
131
|
`representationStatus`
|
|
132
132
|
|
|
133
|
-
* is
|
|
133
|
+
* is required
|
|
134
134
|
|
|
135
135
|
* Type: `string`
|
|
136
136
|
|
|
@@ -188,7 +188,7 @@ The type of case this representation is for.
|
|
|
188
188
|
|
|
189
189
|
* is optional
|
|
190
190
|
|
|
191
|
-
* Type: `object[]` ([Details](applications-representation-
|
|
191
|
+
* Type: `object[]` ([Details](applications-representation-defs-contact.md))
|
|
192
192
|
|
|
193
193
|
* can be null
|
|
194
194
|
|
|
@@ -196,13 +196,13 @@ The type of case this representation is for.
|
|
|
196
196
|
|
|
197
197
|
### submittedByContact Type
|
|
198
198
|
|
|
199
|
-
`object[]` ([Details](applications-representation-
|
|
199
|
+
`object[]` ([Details](applications-representation-defs-contact.md))
|
|
200
200
|
|
|
201
|
-
##
|
|
201
|
+
## submittedByAgent
|
|
202
202
|
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
`
|
|
205
|
+
`submittedByAgent`
|
|
206
206
|
|
|
207
207
|
* is optional
|
|
208
208
|
|
|
@@ -210,9 +210,9 @@ The type of case this representation is for.
|
|
|
210
210
|
|
|
211
211
|
* can be null
|
|
212
212
|
|
|
213
|
-
* defined in: [Casework Representation Schema](applications-representation-properties-
|
|
213
|
+
* defined in: [Casework Representation Schema](applications-representation-properties-submittedbyagent.md "applications-representation.schema.json#/properties/submittedByAgent")
|
|
214
214
|
|
|
215
|
-
###
|
|
215
|
+
### submittedByAgent Type
|
|
216
216
|
|
|
217
217
|
`boolean`
|
|
218
218
|
|
|
@@ -376,7 +376,7 @@ When representation is on behalf of a person/org/group
|
|
|
376
376
|
|
|
377
377
|
* is optional
|
|
378
378
|
|
|
379
|
-
* Type: `object[]` ([Details](applications-representation-
|
|
379
|
+
* Type: `object[]` ([Details](applications-representation-defs-contact.md))
|
|
380
380
|
|
|
381
381
|
* can be null
|
|
382
382
|
|
|
@@ -384,7 +384,7 @@ When representation is on behalf of a person/org/group
|
|
|
384
384
|
|
|
385
385
|
### representedContact Type
|
|
386
386
|
|
|
387
|
-
`object[]` ([Details](applications-representation-
|
|
387
|
+
`object[]` ([Details](applications-representation-defs-contact.md))
|
|
388
388
|
|
|
389
389
|
## representedCategory
|
|
390
390
|
|
|
@@ -566,7 +566,7 @@ Date the representation was withdrawn
|
|
|
566
566
|
|
|
567
567
|
* is optional
|
|
568
568
|
|
|
569
|
-
* Type: `object[]` ([Details](applications-representation-
|
|
569
|
+
* Type: `object[]` ([Details](applications-representation-defs-representationdocument.md))
|
|
570
570
|
|
|
571
571
|
* can be null
|
|
572
572
|
|
|
@@ -574,7 +574,7 @@ Date the representation was withdrawn
|
|
|
574
574
|
|
|
575
575
|
### representationDocuments Type
|
|
576
576
|
|
|
577
|
-
`object[]` ([Details](applications-representation-
|
|
577
|
+
`object[]` ([Details](applications-representation-defs-representationdocument.md))
|
|
578
578
|
|
|
579
579
|
## Additional Properties
|
|
580
580
|
|
|
@@ -587,15 +587,15 @@ Additional properties are allowed and do not have to follow a specific schema
|
|
|
587
587
|
Reference this group by using
|
|
588
588
|
|
|
589
589
|
```json
|
|
590
|
-
{"$ref":"applications-representation.schema.json
|
|
590
|
+
{"$ref":"applications-representation.schema.json#/$defs/contact"}
|
|
591
591
|
```
|
|
592
592
|
|
|
593
|
-
| Property | Type | Required | Nullable | Defined by
|
|
594
|
-
| :---------------------------------------------------- | :------- | :------- | :------------- |
|
|
595
|
-
| [contactId](#contactid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-
|
|
596
|
-
| [contactPreference](#contactpreference) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-
|
|
597
|
-
| [writtenRepOrgName](#writtenreporgname) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-
|
|
598
|
-
| [writtenRepJobTitleorRole](#writtenrepjobtitleorrole) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-
|
|
593
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
594
|
+
| :---------------------------------------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
595
|
+
| [contactId](#contactid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-contact-properties-contactid.md "applications-representation.schema.json#/$defs/contact/properties/contactId") |
|
|
596
|
+
| [contactPreference](#contactpreference) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-contact-properties-contactpreference.md "applications-representation.schema.json#/$defs/contact/properties/contactPreference") |
|
|
597
|
+
| [writtenRepOrgName](#writtenreporgname) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-contact-properties-writtenreporgname.md "applications-representation.schema.json#/$defs/contact/properties/writtenRepOrgName") |
|
|
598
|
+
| [writtenRepJobTitleorRole](#writtenrepjobtitleorrole) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-contact-properties-writtenrepjobtitleorrole.md "applications-representation.schema.json#/$defs/contact/properties/writtenRepJobTitleorRole") |
|
|
599
599
|
|
|
600
600
|
### contactId
|
|
601
601
|
|
|
@@ -609,7 +609,7 @@ Source PK for Contact
|
|
|
609
609
|
|
|
610
610
|
* cannot be null
|
|
611
611
|
|
|
612
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
612
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-contact-properties-contactid.md "applications-representation.schema.json#/$defs/contact/properties/contactId")
|
|
613
613
|
|
|
614
614
|
#### contactId Type
|
|
615
615
|
|
|
@@ -627,7 +627,7 @@ Source PK for Contact
|
|
|
627
627
|
|
|
628
628
|
* can be null
|
|
629
629
|
|
|
630
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
630
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-contact-properties-contactpreference.md "applications-representation.schema.json#/$defs/contact/properties/contactPreference")
|
|
631
631
|
|
|
632
632
|
#### contactPreference Type
|
|
633
633
|
|
|
@@ -654,7 +654,7 @@ Source PK for Contact
|
|
|
654
654
|
|
|
655
655
|
* can be null
|
|
656
656
|
|
|
657
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
657
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-contact-properties-writtenreporgname.md "applications-representation.schema.json#/$defs/contact/properties/writtenRepOrgName")
|
|
658
658
|
|
|
659
659
|
#### writtenRepOrgName Type
|
|
660
660
|
|
|
@@ -672,7 +672,7 @@ Source PK for Contact
|
|
|
672
672
|
|
|
673
673
|
* can be null
|
|
674
674
|
|
|
675
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
675
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-contact-properties-writtenrepjobtitleorrole.md "applications-representation.schema.json#/$defs/contact/properties/writtenRepJobTitleorRole")
|
|
676
676
|
|
|
677
677
|
#### writtenRepJobTitleorRole Type
|
|
678
678
|
|
|
@@ -683,18 +683,18 @@ Source PK for Contact
|
|
|
683
683
|
Reference this group by using
|
|
684
684
|
|
|
685
685
|
```json
|
|
686
|
-
{"$ref":"applications-representation.schema.json
|
|
686
|
+
{"$ref":"applications-representation.schema.json#/$defs/representationDocument"}
|
|
687
687
|
```
|
|
688
688
|
|
|
689
|
-
| Property | Type | Required | Nullable | Defined by
|
|
690
|
-
| :------------------------------------ | :------- | :------- | :------------- |
|
|
691
|
-
| [id](#id-1) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-
|
|
692
|
-
| [representationId](#representationid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-
|
|
693
|
-
| [itemId](#itemid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-
|
|
694
|
-
| [fileName](#filename) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-
|
|
695
|
-
| [redactedItemId](#redacteditemid) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-
|
|
696
|
-
| [redactedFileName](#redactedfilename) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-
|
|
697
|
-
| [status](#status) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-
|
|
689
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
690
|
+
| :------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
691
|
+
| [id](#id-1) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-id.md "applications-representation.schema.json#/$defs/representationDocument/properties/id") |
|
|
692
|
+
| [representationId](#representationid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-representationid.md "applications-representation.schema.json#/$defs/representationDocument/properties/representationId") |
|
|
693
|
+
| [itemId](#itemid) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-itemid.md "applications-representation.schema.json#/$defs/representationDocument/properties/itemId") |
|
|
694
|
+
| [fileName](#filename) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-filename.md "applications-representation.schema.json#/$defs/representationDocument/properties/fileName") |
|
|
695
|
+
| [redactedItemId](#redacteditemid) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-redacteditemid.md "applications-representation.schema.json#/$defs/representationDocument/properties/redactedItemId") |
|
|
696
|
+
| [redactedFileName](#redactedfilename) | `string` | Optional | can be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-redactedfilename.md "applications-representation.schema.json#/$defs/representationDocument/properties/redactedFileName") |
|
|
697
|
+
| [status](#status) | `string` | Required | cannot be null | [Casework Representation Schema](applications-representation-defs-representationdocument-properties-status.md "applications-representation.schema.json#/$defs/representationDocument/properties/status") |
|
|
698
698
|
|
|
699
699
|
### id
|
|
700
700
|
|
|
@@ -708,7 +708,7 @@ Source Key for Representation Document
|
|
|
708
708
|
|
|
709
709
|
* cannot be null
|
|
710
710
|
|
|
711
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
711
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-id.md "applications-representation.schema.json#/$defs/representationDocument/properties/id")
|
|
712
712
|
|
|
713
713
|
#### id Type
|
|
714
714
|
|
|
@@ -726,7 +726,7 @@ The representation this relates to
|
|
|
726
726
|
|
|
727
727
|
* cannot be null
|
|
728
728
|
|
|
729
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
729
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-representationid.md "applications-representation.schema.json#/$defs/representationDocument/properties/representationId")
|
|
730
730
|
|
|
731
731
|
#### representationId Type
|
|
732
732
|
|
|
@@ -744,7 +744,7 @@ The id of the item in SharePoint
|
|
|
744
744
|
|
|
745
745
|
* cannot be null
|
|
746
746
|
|
|
747
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
747
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-itemid.md "applications-representation.schema.json#/$defs/representationDocument/properties/itemId")
|
|
748
748
|
|
|
749
749
|
#### itemId Type
|
|
750
750
|
|
|
@@ -762,7 +762,7 @@ The name of the file
|
|
|
762
762
|
|
|
763
763
|
* cannot be null
|
|
764
764
|
|
|
765
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
765
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-filename.md "applications-representation.schema.json#/$defs/representationDocument/properties/fileName")
|
|
766
766
|
|
|
767
767
|
#### fileName Type
|
|
768
768
|
|
|
@@ -780,7 +780,7 @@ The id of the redacted version of the item in sharepoint
|
|
|
780
780
|
|
|
781
781
|
* can be null
|
|
782
782
|
|
|
783
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
783
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-redacteditemid.md "applications-representation.schema.json#/$defs/representationDocument/properties/redactedItemId")
|
|
784
784
|
|
|
785
785
|
#### redactedItemId Type
|
|
786
786
|
|
|
@@ -798,7 +798,7 @@ the name of the redacted file
|
|
|
798
798
|
|
|
799
799
|
* can be null
|
|
800
800
|
|
|
801
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
801
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-redactedfilename.md "applications-representation.schema.json#/$defs/representationDocument/properties/redactedFileName")
|
|
802
802
|
|
|
803
803
|
#### redactedFileName Type
|
|
804
804
|
|
|
@@ -816,7 +816,7 @@ The status of the document
|
|
|
816
816
|
|
|
817
817
|
* cannot be null
|
|
818
818
|
|
|
819
|
-
* defined in: [Casework Representation Schema](applications-representation-
|
|
819
|
+
* defined in: [Casework Representation Schema](applications-representation-defs-representationdocument-properties-status.md "applications-representation.schema.json#/$defs/representationDocument/properties/status")
|
|
820
820
|
|
|
821
821
|
#### status Type
|
|
822
822
|
|
package/eslint.config.js
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import globals from 'globals';
|
|
1
|
+
import { eslintConfig } from '@planning-inspectorate/coding-standards';
|
|
2
|
+
import { defineConfig } from 'eslint/config';
|
|
4
3
|
|
|
5
|
-
export default
|
|
6
|
-
{
|
|
7
|
-
...js.configs.recommended,
|
|
8
|
-
ignores: ['**/*.cjs', 'node_modules/**']
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
ignores: ['node_modules/**', '**/*.cjs'],
|
|
12
|
-
languageOptions: {
|
|
13
|
-
ecmaVersion: 2025,
|
|
14
|
-
sourceType: 'module',
|
|
15
|
-
globals: {
|
|
16
|
-
...globals.node
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
eslintConfigPrettier
|
|
21
|
-
];
|
|
4
|
+
export default defineConfig(eslintConfig);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { generateAppealsLoadTestMessages } from './generate-appeals-messages.js';
|
|
2
|
-
import { ServiceBusEventClient } from '../service-bus-client.js';
|
|
3
1
|
import { MESSAGE_EVENT_TYPE } from '../../src/enums.js';
|
|
2
|
+
import { ServiceBusEventClient } from '../service-bus-client.js';
|
|
3
|
+
import { generateAppealsLoadTestMessages } from './generate-appeals-messages.js';
|
|
4
4
|
|
|
5
5
|
/** @type {'HAS'|'S78'} */ //@ts-ignore
|
|
6
6
|
const caseType = process.env.APPEALS_LOAD_TEST_CASE_TYPE || 'HAS'; // 'HAS' or 'S78'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planning-inspectorate/data-model",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.52.0",
|
|
4
4
|
"description": "JSON Schemas for the Planning Inspectorate's Data Model",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"@commitlint/cli": "^21.0.0",
|
|
37
37
|
"@commitlint/config-conventional": "^21.0.0",
|
|
38
38
|
"@eslint/js": "^10.0.1",
|
|
39
|
+
"@planning-inspectorate/coding-standards": "^1.1.1",
|
|
39
40
|
"ajv": "^8.17.1",
|
|
40
41
|
"ajv-formats": "^3.0.1",
|
|
41
42
|
"conventional-changelog-conventionalcommits": "^10.2.0",
|
|
@@ -43,10 +44,12 @@
|
|
|
43
44
|
"eslint-config-prettier": "^10.1.5",
|
|
44
45
|
"globals": "^17.3.0",
|
|
45
46
|
"husky": "^9.1.7",
|
|
46
|
-
"json-schema-to-typescript": "^
|
|
47
|
+
"json-schema-to-typescript": "^16.0.0",
|
|
47
48
|
"lint-staged": "^17.0.4",
|
|
48
49
|
"lodash.snakecase": "^4.1.1",
|
|
49
50
|
"prettier": "^3.6.2",
|
|
51
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
52
|
+
"prettier-plugin-prisma": "^5.0.0",
|
|
50
53
|
"rollup": "^4.44.2",
|
|
51
54
|
"semantic-release": "^25.0.1"
|
|
52
55
|
},
|
|
@@ -64,6 +64,6 @@ class PinsAddressSchema(BaseModel):
|
|
|
64
64
|
longitudeWGS84: float | None = Field(None, examples=[-2.6019821])
|
|
65
65
|
UPRN: str | None = Field(None, examples=[100023336956])
|
|
66
66
|
"""
|
|
67
|
-
The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location
|
|
67
|
+
The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location - e.g., a building, a bus stop, a post box, a feature in the landscape, or a defibrillator - in Great Britain.
|
|
68
68
|
"""
|
|
69
69
|
dependentRequired: Any | None = None
|
|
@@ -102,7 +102,7 @@ class EmailNotificationRecordSchema(BaseModel):
|
|
|
102
102
|
"""
|
|
103
103
|
Planning Body code
|
|
104
104
|
"""
|
|
105
|
-
emailStatus: EmailStatus
|
|
105
|
+
emailStatus: EmailStatus = Field(..., examples=["Delivered"])
|
|
106
106
|
"""
|
|
107
107
|
Outcome of the email (status)
|
|
108
108
|
"""
|
|
@@ -151,10 +151,10 @@ class CaseworkRepresentationSchema(BaseModel):
|
|
|
151
151
|
"""
|
|
152
152
|
The type of case this representation is for.
|
|
153
153
|
"""
|
|
154
|
-
representationStatus: RepresentationStatus
|
|
154
|
+
representationStatus: RepresentationStatus
|
|
155
155
|
submittedFor: SubmittedFor
|
|
156
156
|
submittedByContact: list[Contact] | None = None
|
|
157
|
-
|
|
157
|
+
submittedByAgent: bool | None = None
|
|
158
158
|
submittedByAgentOrgName: str | None = None
|
|
159
159
|
submittedDate: AwareDatetime
|
|
160
160
|
submittedReceivedMethod: SubmittedReceivedMethod | None = None
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"UPRN": {
|
|
76
76
|
"type": ["string", "null"],
|
|
77
77
|
"example": 100023336956,
|
|
78
|
-
"description": "The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location
|
|
78
|
+
"description": "The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location - e.g., a building, a bus stop, a post box, a feature in the landscape, or a defibrillator - in Great Britain."
|
|
79
79
|
},
|
|
80
80
|
"dependentRequired": {
|
|
81
81
|
"easting": ["northing"],
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Email Notifications for Casework Projects",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": true,
|
|
8
|
-
"required": ["id", "caseReference", "caseId", "caseType", "
|
|
8
|
+
"required": ["id", "caseReference", "caseId", "caseType", "emailStatus", "lpaCode"],
|
|
9
9
|
"properties": {
|
|
10
10
|
"id": {
|
|
11
11
|
"type": "string",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"caseReference",
|
|
12
12
|
"caseId",
|
|
13
13
|
"caseType",
|
|
14
|
-
"
|
|
14
|
+
"representationStatus",
|
|
15
15
|
"submittedFor",
|
|
16
16
|
"submittedDate",
|
|
17
17
|
"comment"
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"submittedByContact": {
|
|
53
53
|
"type": ["array", "null"],
|
|
54
54
|
"items": {
|
|
55
|
-
"$ref": "
|
|
55
|
+
"$ref": "#/$defs/contact"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"
|
|
58
|
+
"submittedByAgent": {
|
|
59
59
|
"type": ["boolean", "null"]
|
|
60
60
|
},
|
|
61
61
|
"submittedByAgentOrgName": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"representedContact": {
|
|
93
93
|
"type": ["array", "null"],
|
|
94
94
|
"items": {
|
|
95
|
-
"$ref": "
|
|
95
|
+
"$ref": "#/$defs/contact"
|
|
96
96
|
},
|
|
97
97
|
"description": "When representation is on behalf of a person/org/group"
|
|
98
98
|
},
|
|
@@ -134,11 +134,11 @@
|
|
|
134
134
|
"representationDocuments": {
|
|
135
135
|
"type": ["array", "null"],
|
|
136
136
|
"items": {
|
|
137
|
-
"$ref": "
|
|
137
|
+
"$ref": "#/$defs/representationDocument"
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
|
-
"
|
|
141
|
+
"$defs": {
|
|
142
142
|
"contact": {
|
|
143
143
|
"type": "object",
|
|
144
144
|
"required": ["contactId"],
|
package/src/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var path = require('path');
|
|
4
4
|
var url = require('url');
|
|
5
|
-
var promises = require('fs/promises');
|
|
6
5
|
var fs = require('fs');
|
|
6
|
+
var promises = require('fs/promises');
|
|
7
7
|
var jsoncParser = require('jsonc-parser');
|
|
8
8
|
|
|
9
9
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
package/src/lib/gen-docs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import assert from 'node:assert';
|
|
1
2
|
import { describe, it } from 'node:test';
|
|
2
3
|
import { collectEnumProps, generateConstants, generateEnumMap } from './gen-enum-impl.js';
|
|
3
|
-
import assert from 'node:assert';
|
|
4
4
|
|
|
5
5
|
describe('gen-enum-impl', () => {
|
|
6
6
|
describe('generateConstants', () => {
|
package/src/lib/gen-enums.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { loadAllSchemas } from '../index.js';
|
|
4
|
-
import { loadSchema } from './load.js';
|
|
5
4
|
import { collectEnumProps, generateConstants, generateEnumMap } from './gen-enum-impl.js';
|
|
5
|
+
import { loadSchema } from './load.js';
|
|
6
6
|
|
|
7
7
|
const __dirname = import.meta.dirname;
|
|
8
8
|
|
package/src/lib/gen-types.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
|
+
import { compile } from 'json-schema-to-typescript';
|
|
3
|
+
import { generateName } from 'json-schema-to-typescript/dist/src/utils.js';
|
|
2
4
|
import path from 'path';
|
|
3
5
|
import url from 'url';
|
|
4
6
|
import { commandsPath, loadAllSchemas, schemasPath } from '../index.js';
|
|
5
|
-
import { compile } from 'json-schema-to-typescript';
|
|
6
|
-
import { generateName } from 'json-schema-to-typescript/dist/src/utils.js';
|
|
7
7
|
|
|
8
8
|
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
9
9
|
|
package/src/lib/load.js
CHANGED
package/src/schemas.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export interface PINSAddressSchema {
|
|
|
44
44
|
latitudeWGS84?: number | null;
|
|
45
45
|
longitudeWGS84?: number | null;
|
|
46
46
|
/**
|
|
47
|
-
* The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location
|
|
47
|
+
* The Unique Property Reference Number (UPRN) is a unique number (a geocode) for every addressable location - e.g., a building, a bus stop, a post box, a feature in the landscape, or a defibrillator - in Great Britain.
|
|
48
48
|
*/
|
|
49
49
|
UPRN?: string | null;
|
|
50
50
|
dependentRequired?: {
|
|
@@ -2320,7 +2320,7 @@ export interface EmailNotificationRecordSchema {
|
|
|
2320
2320
|
/**
|
|
2321
2321
|
* Outcome of the email (status)
|
|
2322
2322
|
*/
|
|
2323
|
-
emailStatus
|
|
2323
|
+
emailStatus: 'Sending' | 'Delivered' | 'Permanent failure' | 'Temporary failure' | 'Technical failure';
|
|
2324
2324
|
/**
|
|
2325
2325
|
* The id of the template sent in Notify
|
|
2326
2326
|
*/
|
|
@@ -2379,10 +2379,10 @@ export interface CaseworkRepresentationSchema {
|
|
|
2379
2379
|
* The type of case this representation is for.
|
|
2380
2380
|
*/
|
|
2381
2381
|
caseType: string;
|
|
2382
|
-
representationStatus
|
|
2382
|
+
representationStatus: 'Awaiting review' | 'Accepted' | 'Rejected' | 'Withdrawn';
|
|
2383
2383
|
submittedFor: 'Myself' | 'On behalf of another person or an organisation';
|
|
2384
2384
|
submittedByContact?: Contact[] | null;
|
|
2385
|
-
|
|
2385
|
+
submittedByAgent?: boolean | null;
|
|
2386
2386
|
submittedByAgentOrgName?: string | null;
|
|
2387
2387
|
submittedDate: string;
|
|
2388
2388
|
/**
|
|
@@ -3290,6 +3290,9 @@ export interface NSIPProject {
|
|
|
3290
3290
|
* PINS Project email address pubished on website
|
|
3291
3291
|
*/
|
|
3292
3292
|
projectEmailAddress: string | null;
|
|
3293
|
+
/**
|
|
3294
|
+
* Items: Geographical region of UK. Applications can cover multiple regions.
|
|
3295
|
+
*/
|
|
3293
3296
|
regions: (
|
|
3294
3297
|
| 'east_midlands'
|
|
3295
3298
|
| 'eastern'
|
|
@@ -3475,12 +3478,21 @@ export interface NSIPProject {
|
|
|
3475
3478
|
* Maps to [Employee].[EmployeeID]
|
|
3476
3479
|
*/
|
|
3477
3480
|
caseManagerId: string | null;
|
|
3481
|
+
/**
|
|
3482
|
+
* Items: Maps to [Employee].[EmployeeID].
|
|
3483
|
+
*/
|
|
3478
3484
|
nsipOfficerIds: string[];
|
|
3485
|
+
/**
|
|
3486
|
+
* Items: Maps to [Employee].[EmployeeID].
|
|
3487
|
+
*/
|
|
3479
3488
|
nsipAdministrationOfficerIds: string[];
|
|
3480
3489
|
/**
|
|
3481
3490
|
* Maps to [Employee].[EmployeeID]
|
|
3482
3491
|
*/
|
|
3483
3492
|
leadInspectorId: string | null;
|
|
3493
|
+
/**
|
|
3494
|
+
* Items: Maps to [Employee].[EmployeeID]
|
|
3495
|
+
*/
|
|
3484
3496
|
inspectorIds: string[];
|
|
3485
3497
|
/**
|
|
3486
3498
|
* Maps to [Employee].[EmployeeID]
|
|
@@ -3696,26 +3708,38 @@ export interface NSIPProject {
|
|
|
3696
3708
|
estimatedPrelimMeetingDate?: string | null;
|
|
3697
3709
|
/**
|
|
3698
3710
|
* Maps to [Employee].[EmployeeID].
|
|
3711
|
+
*
|
|
3712
|
+
* Items: Maps to [Employee].[EmployeeID].
|
|
3699
3713
|
*/
|
|
3700
3714
|
operationsLeadIds?: string[];
|
|
3701
3715
|
/**
|
|
3702
3716
|
* New NSIP role, Maps to [Employee].[EmployeeID]
|
|
3717
|
+
*
|
|
3718
|
+
* Items: Maps to [Employee].[EmployeeID].
|
|
3703
3719
|
*/
|
|
3704
3720
|
operationsManagerIds?: string[];
|
|
3705
3721
|
/**
|
|
3706
3722
|
* Maps to [Employee].[EmployeeID].
|
|
3723
|
+
*
|
|
3724
|
+
* Items: Maps to [Employee].[EmployeeID].
|
|
3707
3725
|
*/
|
|
3708
3726
|
caseManagerIds?: string[];
|
|
3709
3727
|
/**
|
|
3710
3728
|
* Maps to [Employee].[EmployeeID].
|
|
3729
|
+
*
|
|
3730
|
+
* Items: Maps to [Employee].[EmployeeID].
|
|
3711
3731
|
*/
|
|
3712
3732
|
leadInspectorIds?: string[];
|
|
3713
3733
|
/**
|
|
3714
3734
|
* Maps to [Employee].[EmployeeID].
|
|
3735
|
+
*
|
|
3736
|
+
* Items: Maps to [Employee].[EmployeeID].
|
|
3715
3737
|
*/
|
|
3716
3738
|
environmentalServicesOfficerIds?: string[];
|
|
3717
3739
|
/**
|
|
3718
3740
|
* Maps to [Employee].[EmployeeID].
|
|
3741
|
+
*
|
|
3742
|
+
* Items: Maps to [Employee].[EmployeeID].
|
|
3719
3743
|
*/
|
|
3720
3744
|
legalOfficerIds?: string[];
|
|
3721
3745
|
/**
|
|
@@ -4098,6 +4122,9 @@ export interface S51Advice {
|
|
|
4098
4122
|
adviceDetailsWelsh?: string | null;
|
|
4099
4123
|
status: 'checked' | 'unchecked' | 'readytopublish' | 'published' | 'donotpublish' | null;
|
|
4100
4124
|
redactionStatus: 'unredacted' | 'redacted' | null;
|
|
4125
|
+
/**
|
|
4126
|
+
* Items: Collection of document IDs which are related to the S51 Advice
|
|
4127
|
+
*/
|
|
4101
4128
|
attachmentIds: string[];
|
|
4102
4129
|
[k: string]: unknown;
|
|
4103
4130
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appeal-event.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appeal-has.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appeal-s78.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'lpa-questionnaire.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appellant-submission.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'commands/appeal-representation-submission.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'lpa-questionnaire.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appellant-submission.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'lpa-questionnaire.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appellant-submission.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appellant-submission.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'lpa-questionnaire.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'lpa-questionnaire.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appellant-submission.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'lpa-questionnaire.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appellant-submission.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'lpa-questionnaire.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'lpa-questionnaire.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appellant-submission.schema.json';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert';
|
|
3
1
|
import Ajv from 'ajv';
|
|
4
2
|
import addFormats from 'ajv-formats';
|
|
3
|
+
import assert from 'node:assert';
|
|
4
|
+
import { describe, it } from 'node:test';
|
|
5
5
|
import { loadAllSchemasSync } from '../../src/index.js';
|
|
6
6
|
|
|
7
7
|
const schema = 'appeal-s78.schema.json';
|
package/tests/schemas.test.js
CHANGED
package/.prettierrc
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"printWidth": 120,
|
|
3
|
-
"tabWidth": 2,
|
|
4
|
-
"singleQuote": true,
|
|
5
|
-
"useTabs": true,
|
|
6
|
-
"semi": true,
|
|
7
|
-
"trailingComma": "none",
|
|
8
|
-
"bracketSpacing": true,
|
|
9
|
-
"arrowParens": "always",
|
|
10
|
-
"plugins": [],
|
|
11
|
-
"overrides": [
|
|
12
|
-
{
|
|
13
|
-
"files": "*.json",
|
|
14
|
-
"options": {
|
|
15
|
-
"useTabs": false
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
}
|