@planning-inspectorate/data-model 1.11.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.
Files changed (131) hide show
  1. package/.azure/ci.yml +60 -0
  2. package/.azure/release.yml +57 -0
  3. package/.github/dependabot.yml +11 -0
  4. package/.husky/install.mjs +7 -0
  5. package/.husky/pre-commit +1 -0
  6. package/.prettierignore +11 -0
  7. package/.prettierrc +19 -0
  8. package/LICENSE +21 -0
  9. package/README.md +237 -0
  10. package/commitlint.config.js +8 -0
  11. package/docs/README.md +85 -0
  12. package/docs/appeal-document.md +776 -0
  13. package/docs/appeal-event-estimate.md +108 -0
  14. package/docs/appeal-event.md +404 -0
  15. package/docs/appeal-has.md +1960 -0
  16. package/docs/appeal-representation.md +375 -0
  17. package/docs/appeal-s78.md +3607 -0
  18. package/docs/appeal.md +1879 -0
  19. package/docs/case-schedule.md +8 -0
  20. package/docs/dart-response.md +1413 -0
  21. package/docs/employee.md +70 -0
  22. package/docs/entraid.md +108 -0
  23. package/docs/folder.md +147 -0
  24. package/docs/gettimesheets-response.md +188 -0
  25. package/docs/interested-party.md +284 -0
  26. package/docs/listed-building.md +113 -0
  27. package/docs/listed-buildings.md +113 -0
  28. package/docs/nsip-document.md +966 -0
  29. package/docs/nsip-exam-timetable-defs-event.md +223 -0
  30. package/docs/nsip-exam-timetable-defs-line-item.md +51 -0
  31. package/docs/nsip-exam-timetable-defs.md +3 -0
  32. package/docs/nsip-exam-timetable-submission.md +113 -0
  33. package/docs/nsip-exam-timetable.md +352 -0
  34. package/docs/nsip-project-update.md +163 -0
  35. package/docs/nsip-project.md +2098 -0
  36. package/docs/nsip-representation-defs-attachment.md +133 -0
  37. package/docs/nsip-representation-defs.md +3 -0
  38. package/docs/nsip-representation.md +448 -0
  39. package/docs/nsip-subscription.md +193 -0
  40. package/docs/pins-inspector.md +184 -0
  41. package/docs/pins-lpa.md +260 -0
  42. package/docs/s51-advice.md +460 -0
  43. package/docs/service-user.md +575 -0
  44. package/eslint.config.js +21 -0
  45. package/jsconfig.json +12 -0
  46. package/package.json +55 -0
  47. package/pins_data_model/__init__.py +0 -0
  48. package/pins_data_model/gen_models.py +51 -0
  49. package/pins_data_model/load_schemas.py +51 -0
  50. package/pins_data_model/models/__init__.py +0 -0
  51. package/pins_data_model/models/model_appeal_document.py +294 -0
  52. package/pins_data_model/models/model_appeal_event.py +117 -0
  53. package/pins_data_model/models/model_appeal_event_estimate.py +37 -0
  54. package/pins_data_model/models/model_appeal_has.py +585 -0
  55. package/pins_data_model/models/model_appeal_representation.py +132 -0
  56. package/pins_data_model/models/model_appeal_s78.py +864 -0
  57. package/pins_data_model/models/model_case_schedule.py +11 -0
  58. package/pins_data_model/models/model_dart_response.py +292 -0
  59. package/pins_data_model/models/model_entraid.py +37 -0
  60. package/pins_data_model/models/model_folder.py +56 -0
  61. package/pins_data_model/models/model_gettimesheets_response.py +45 -0
  62. package/pins_data_model/models/model_listed_building.py +33 -0
  63. package/pins_data_model/models/model_listed_buildings.py +33 -0
  64. package/pins_data_model/models/model_nsip_document.py +199 -0
  65. package/pins_data_model/models/model_nsip_exam_timetable.py +90 -0
  66. package/pins_data_model/models/model_nsip_project.py +488 -0
  67. package/pins_data_model/models/model_nsip_project_update.py +60 -0
  68. package/pins_data_model/models/model_nsip_representation.py +83 -0
  69. package/pins_data_model/models/model_nsip_subscription.py +60 -0
  70. package/pins_data_model/models/model_pins_inspector.py +53 -0
  71. package/pins_data_model/models/model_pins_lpa.py +69 -0
  72. package/pins_data_model/models/model_s51_advice.py +109 -0
  73. package/pins_data_model/models/model_service_user.py +121 -0
  74. package/requirements.txt +2 -0
  75. package/schemas/__init__.py +0 -0
  76. package/schemas/appeal-document.schema.json +250 -0
  77. package/schemas/appeal-event-estimate.schema.json +31 -0
  78. package/schemas/appeal-event.schema.json +123 -0
  79. package/schemas/appeal-has.schema.json +576 -0
  80. package/schemas/appeal-representation.schema.json +131 -0
  81. package/schemas/appeal-s78.schema.json +1060 -0
  82. package/schemas/commands/__init__.py +0 -0
  83. package/schemas/commands/appeal-common-submission.schema.json +202 -0
  84. package/schemas/commands/appeal-has-submission.schema.json +82 -0
  85. package/schemas/commands/appeal-representation-submission.schema.json +192 -0
  86. package/schemas/commands/appeal-s78-submission.schema.json +100 -0
  87. package/schemas/commands/appellant-submission.schema.json +164 -0
  88. package/schemas/commands/interested-party.schema.json +80 -0
  89. package/schemas/commands/lpa-questionnaire-common.schema.json +110 -0
  90. package/schemas/commands/lpa-questionnaire-has.schema.json +69 -0
  91. package/schemas/commands/lpa-questionnaire-s78.schema.json +218 -0
  92. package/schemas/commands/lpa-questionnaire.schema.json +125 -0
  93. package/schemas/commands/new-deadline-submission.schema.json +59 -0
  94. package/schemas/commands/nsip-exam-timetable-submission.schema.json +27 -0
  95. package/schemas/commands/register-nsip-subscription.schema.json +32 -0
  96. package/schemas/commands/register-representation.schema.json +51 -0
  97. package/schemas/dart-response.schema.json +350 -0
  98. package/schemas/entraid.schema.json +31 -0
  99. package/schemas/folder.schema.json +49 -0
  100. package/schemas/gettimesheets-response.schema.json +46 -0
  101. package/schemas/listed-building.schema.json +31 -0
  102. package/schemas/listed-buildings.schema.json +31 -0
  103. package/schemas/nsip-document.schema.json +235 -0
  104. package/schemas/nsip-exam-timetable.schema.json +101 -0
  105. package/schemas/nsip-project-update.schema.json +49 -0
  106. package/schemas/nsip-project.schema.json +539 -0
  107. package/schemas/nsip-representation.schema.json +110 -0
  108. package/schemas/nsip-subscription.schema.json +52 -0
  109. package/schemas/pins-inspector.schema.json +47 -0
  110. package/schemas/pins-lpa.schema.json +63 -0
  111. package/schemas/s51-advice.schema.json +113 -0
  112. package/schemas/service-user.schema.json +152 -0
  113. package/setup.py +15 -0
  114. package/src/enums.cjs +632 -0
  115. package/src/enums.d.ts +573 -0
  116. package/src/enums.js +573 -0
  117. package/src/gen-docs.js +34 -0
  118. package/src/gen-enums.js +119 -0
  119. package/src/gen-types.js +70 -0
  120. package/src/index.cjs +746 -0
  121. package/src/index.d.ts +18 -0
  122. package/src/index.js +34 -0
  123. package/src/lib/load.js +78 -0
  124. package/src/schemas.d.ts +4570 -0
  125. package/tests/appeals/appeal-event.test.js +62 -0
  126. package/tests/appeals/commands/appeal-representation-submission.test.js +107 -0
  127. package/tests/appeals/commands/has-questionnaire.test.js +92 -0
  128. package/tests/appeals/commands/has-submission.test.js +113 -0
  129. package/tests/appeals/commands/s78-questionnaire.test.js +96 -0
  130. package/tests/appeals/commands/s78-submission.test.js +119 -0
  131. package/tests/schemas.test.js +97 -0
@@ -0,0 +1,284 @@
1
+ ## interested-party Type
2
+
3
+ `object` ([interested-party](interested-party.md))
4
+
5
+ # interested-party Properties
6
+
7
+ | Property | Type | Required | Nullable | Defined by |
8
+ | :---------------------------------------------- | :-------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
9
+ | [id](#id) | `number` | Optional | cannot be null | [interested-party](interested-party-properties-id.md "interested-party.schema.json#/properties/id") |
10
+ | [interestedPartyNumber](#interestedpartynumber) | `string` | Optional | cannot be null | [interested-party](interested-party-properties-interestedpartynumber.md "interested-party.schema.json#/properties/interestedPartyNumber") |
11
+ | [firstName](#firstname) | `string` | Optional | cannot be null | [interested-party](interested-party-properties-firstname.md "interested-party.schema.json#/properties/firstName") |
12
+ | [lastName](#lastname) | `string` | Optional | cannot be null | [interested-party](interested-party-properties-lastname.md "interested-party.schema.json#/properties/lastName") |
13
+ | [under18](#under18) | `boolean` | Optional | cannot be null | [interested-party](interested-party-properties-under18.md "interested-party.schema.json#/properties/under18") |
14
+ | [organisationName](#organisationname) | `string` | Optional | cannot be null | [interested-party](interested-party-properties-name.md "interested-party.schema.json#/properties/organisationName") |
15
+ | [jobTitle](#jobtitle) | `string` | Optional | cannot be null | [interested-party](interested-party-properties-jobtitle.md "interested-party.schema.json#/properties/jobTitle") |
16
+ | [contactMethod](#contactmethod) | `string` | Optional | cannot be null | [interested-party](interested-party-properties-contactmethod.md "interested-party.schema.json#/properties/contactMethod") |
17
+ | [email](#email) | `string` | Optional | cannot be null | [interested-party](interested-party-properties-email.md "interested-party.schema.json#/properties/email") |
18
+ | [phoneNumber](#phonenumber) | `string` | Optional | cannot be null | [interested-party](interested-party-properties-phonenumber.md "interested-party.schema.json#/properties/phoneNumber") |
19
+ | [address](#address) | `object` | Optional | cannot be null | [interested-party](interested-party-properties-address.md "interested-party.schema.json#/properties/address") |
20
+
21
+ ## id
22
+
23
+
24
+
25
+ `id`
26
+
27
+ * is optional
28
+
29
+ * Type: `number`
30
+
31
+ * cannot be null
32
+
33
+ * defined in: [interested-party](interested-party-properties-id.md "interested-party.schema.json#/properties/id")
34
+
35
+ ### id Type
36
+
37
+ `number`
38
+
39
+ ### id Examples
40
+
41
+ ```json
42
+ 18
43
+ ```
44
+
45
+ ## interestedPartyNumber
46
+
47
+
48
+
49
+ `interestedPartyNumber`
50
+
51
+ * is optional
52
+
53
+ * Type: `string`
54
+
55
+ * cannot be null
56
+
57
+ * defined in: [interested-party](interested-party-properties-interestedpartynumber.md "interested-party.schema.json#/properties/interestedPartyNumber")
58
+
59
+ ### interestedPartyNumber Type
60
+
61
+ `string`
62
+
63
+ ### interestedPartyNumber Examples
64
+
65
+ ```json
66
+ "IP1234"
67
+ ```
68
+
69
+ ## firstName
70
+
71
+
72
+
73
+ `firstName`
74
+
75
+ * is optional
76
+
77
+ * Type: `string`
78
+
79
+ * cannot be null
80
+
81
+ * defined in: [interested-party](interested-party-properties-firstname.md "interested-party.schema.json#/properties/firstName")
82
+
83
+ ### firstName Type
84
+
85
+ `string`
86
+
87
+ ### firstName Examples
88
+
89
+ ```json
90
+ "Alan"
91
+ ```
92
+
93
+ ## lastName
94
+
95
+
96
+
97
+ `lastName`
98
+
99
+ * is optional
100
+
101
+ * Type: `string`
102
+
103
+ * cannot be null
104
+
105
+ * defined in: [interested-party](interested-party-properties-lastname.md "interested-party.schema.json#/properties/lastName")
106
+
107
+ ### lastName Type
108
+
109
+ `string`
110
+
111
+ ### lastName Examples
112
+
113
+ ```json
114
+ "Turing"
115
+ ```
116
+
117
+ ## under18
118
+
119
+
120
+
121
+ `under18`
122
+
123
+ * is optional
124
+
125
+ * Type: `boolean`
126
+
127
+ * cannot be null
128
+
129
+ * defined in: [interested-party](interested-party-properties-under18.md "interested-party.schema.json#/properties/under18")
130
+
131
+ ### under18 Type
132
+
133
+ `boolean`
134
+
135
+ ## organisationName
136
+
137
+
138
+
139
+ `organisationName`
140
+
141
+ * is optional
142
+
143
+ * Type: `string` ([Name](interested-party-properties-name.md))
144
+
145
+ * cannot be null
146
+
147
+ * defined in: [interested-party](interested-party-properties-name.md "interested-party.schema.json#/properties/organisationName")
148
+
149
+ ### organisationName Type
150
+
151
+ `string` ([Name](interested-party-properties-name.md))
152
+
153
+ ### organisationName Constraints
154
+
155
+ **pattern**: the string must match the following regular expression: 
156
+
157
+ ```regexp
158
+ ^.*$
159
+ ```
160
+
161
+ [try pattern](https://regexr.com/?expression=%5E.*%24 "try regular expression with regexr.com")
162
+
163
+ ### organisationName Examples
164
+
165
+ ```json
166
+ "National Highways"
167
+ ```
168
+
169
+ ## jobTitle
170
+
171
+
172
+
173
+ `jobTitle`
174
+
175
+ * is optional
176
+
177
+ * Type: `string`
178
+
179
+ * cannot be null
180
+
181
+ * defined in: [interested-party](interested-party-properties-jobtitle.md "interested-party.schema.json#/properties/jobTitle")
182
+
183
+ ### jobTitle Type
184
+
185
+ `string`
186
+
187
+ ### jobTitle Examples
188
+
189
+ ```json
190
+ "Communications Manager"
191
+ ```
192
+
193
+ ## contactMethod
194
+
195
+
196
+
197
+ `contactMethod`
198
+
199
+ * is optional
200
+
201
+ * Type: `string`
202
+
203
+ * cannot be null
204
+
205
+ * defined in: [interested-party](interested-party-properties-contactmethod.md "interested-party.schema.json#/properties/contactMethod")
206
+
207
+ ### contactMethod Type
208
+
209
+ `string`
210
+
211
+ ### contactMethod Constraints
212
+
213
+ **enum**: the value of this property must be equal to one of the following values:
214
+
215
+ | Value | Explanation |
216
+ | :-------- | :---------- |
217
+ | `"email"` | |
218
+ | `"post"` | |
219
+
220
+ ## email
221
+
222
+
223
+
224
+ `email`
225
+
226
+ * is optional
227
+
228
+ * Type: `string`
229
+
230
+ * cannot be null
231
+
232
+ * defined in: [interested-party](interested-party-properties-email.md "interested-party.schema.json#/properties/email")
233
+
234
+ ### email Type
235
+
236
+ `string`
237
+
238
+ ### email Examples
239
+
240
+ ```json
241
+ "alan.turing@planninginspectorate.gov.uk"
242
+ ```
243
+
244
+ ## phoneNumber
245
+
246
+
247
+
248
+ `phoneNumber`
249
+
250
+ * is optional
251
+
252
+ * Type: `string`
253
+
254
+ * cannot be null
255
+
256
+ * defined in: [interested-party](interested-party-properties-phonenumber.md "interested-party.schema.json#/properties/phoneNumber")
257
+
258
+ ### phoneNumber Type
259
+
260
+ `string`
261
+
262
+ ### phoneNumber Examples
263
+
264
+ ```json
265
+ "0137732432"
266
+ ```
267
+
268
+ ## address
269
+
270
+
271
+
272
+ `address`
273
+
274
+ * is optional
275
+
276
+ * Type: `object` ([Address](interested-party-properties-address.md))
277
+
278
+ * cannot be null
279
+
280
+ * defined in: [interested-party](interested-party-properties-address.md "interested-party.schema.json#/properties/address")
281
+
282
+ ### address Type
283
+
284
+ `object` ([Address](interested-party-properties-address.md))
@@ -0,0 +1,113 @@
1
+ ## Listed Building Type
2
+
3
+ `object` ([Listed Building](listed-building.md))
4
+
5
+ # Listed Building Properties
6
+
7
+ | Property | Type | Required | Nullable | Defined by |
8
+ | :------------------------------------------ | :-------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
9
+ | [entity](#entity) | `integer` | Required | cannot be null | [Listed Building](listed-building-properties-entity.md "listed-building.schema.json#/properties/entity") |
10
+ | [reference](#reference) | `string` | Required | cannot be null | [Listed Building](listed-building-properties-reference.md "listed-building.schema.json#/properties/reference") |
11
+ | [name](#name) | `string` | Required | cannot be null | [Listed Building](listed-building-properties-name.md "listed-building.schema.json#/properties/name") |
12
+ | [listedBuildingGrade](#listedbuildinggrade) | `string` | Required | cannot be null | [Listed Building](listed-building-properties-listedbuildinggrade.md "listed-building.schema.json#/properties/listedBuildingGrade") |
13
+ | Additional Properties | Any | Optional | can be null | |
14
+
15
+ ## entity
16
+
17
+ A unique identifier for the listed building.
18
+
19
+ `entity`
20
+
21
+ * is required
22
+
23
+ * Type: `integer`
24
+
25
+ * cannot be null
26
+
27
+ * defined in: [Listed Building](listed-building-properties-entity.md "listed-building.schema.json#/properties/entity")
28
+
29
+ ### entity Type
30
+
31
+ `integer`
32
+
33
+ ### entity Examples
34
+
35
+ ```json
36
+ "31717222"
37
+ ```
38
+
39
+ ## reference
40
+
41
+ Reference number for the listed buildign
42
+
43
+ `reference`
44
+
45
+ * is required
46
+
47
+ * Type: `string`
48
+
49
+ * cannot be null
50
+
51
+ * defined in: [Listed Building](listed-building-properties-reference.md "listed-building.schema.json#/properties/reference")
52
+
53
+ ### reference Type
54
+
55
+ `string`
56
+
57
+ ### reference Examples
58
+
59
+ ```json
60
+ "1260842"
61
+ ```
62
+
63
+ ## name
64
+
65
+ Name of listed building
66
+
67
+ `name`
68
+
69
+ * is required
70
+
71
+ * Type: `string`
72
+
73
+ * cannot be null
74
+
75
+ * defined in: [Listed Building](listed-building-properties-name.md "listed-building.schema.json#/properties/name")
76
+
77
+ ### name Type
78
+
79
+ `string`
80
+
81
+ ### name Examples
82
+
83
+ ```json
84
+ "41A, NEWBIGGIN"
85
+ ```
86
+
87
+ ## listedBuildingGrade
88
+
89
+ Grade assigned to the listing.
90
+
91
+ `listedBuildingGrade`
92
+
93
+ * is required
94
+
95
+ * Type: `string`
96
+
97
+ * cannot be null
98
+
99
+ * defined in: [Listed Building](listed-building-properties-listedbuildinggrade.md "listed-building.schema.json#/properties/listedBuildingGrade")
100
+
101
+ ### listedBuildingGrade Type
102
+
103
+ `string`
104
+
105
+ ### listedBuildingGrade Examples
106
+
107
+ ```json
108
+ "II"
109
+ ```
110
+
111
+ ## Additional Properties
112
+
113
+ Additional properties are allowed and do not have to follow a specific schema
@@ -0,0 +1,113 @@
1
+ ## Listed Buildings Type
2
+
3
+ `object` ([Listed Buildings](listed-buildings.md))
4
+
5
+ # Listed Buildings Properties
6
+
7
+ | Property | Type | Required | Nullable | Defined by |
8
+ | :------------------------------------------ | :-------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------ |
9
+ | [entity](#entity) | `integer` | Required | cannot be null | [Listed Buildings](listed-buildings-properties-entity.md "listed-buildings.schema.json#/properties/entity") |
10
+ | [reference](#reference) | `string` | Required | cannot be null | [Listed Buildings](listed-buildings-properties-reference.md "listed-buildings.schema.json#/properties/reference") |
11
+ | [name](#name) | `string` | Required | cannot be null | [Listed Buildings](listed-buildings-properties-name.md "listed-buildings.schema.json#/properties/name") |
12
+ | [listedBuildingGrade](#listedbuildinggrade) | `string` | Required | cannot be null | [Listed Buildings](listed-buildings-properties-listedbuildinggrade.md "listed-buildings.schema.json#/properties/listedBuildingGrade") |
13
+ | Additional Properties | Any | Optional | can be null | |
14
+
15
+ ## entity
16
+
17
+ A unique identifier for the listed building.
18
+
19
+ `entity`
20
+
21
+ * is required
22
+
23
+ * Type: `integer`
24
+
25
+ * cannot be null
26
+
27
+ * defined in: [Listed Buildings](listed-buildings-properties-entity.md "listed-buildings.schema.json#/properties/entity")
28
+
29
+ ### entity Type
30
+
31
+ `integer`
32
+
33
+ ### entity Examples
34
+
35
+ ```json
36
+ "31717222"
37
+ ```
38
+
39
+ ## reference
40
+
41
+ Reference number for the listed buildign
42
+
43
+ `reference`
44
+
45
+ * is required
46
+
47
+ * Type: `string`
48
+
49
+ * cannot be null
50
+
51
+ * defined in: [Listed Buildings](listed-buildings-properties-reference.md "listed-buildings.schema.json#/properties/reference")
52
+
53
+ ### reference Type
54
+
55
+ `string`
56
+
57
+ ### reference Examples
58
+
59
+ ```json
60
+ "1260842"
61
+ ```
62
+
63
+ ## name
64
+
65
+ Name of listed building
66
+
67
+ `name`
68
+
69
+ * is required
70
+
71
+ * Type: `string`
72
+
73
+ * cannot be null
74
+
75
+ * defined in: [Listed Buildings](listed-buildings-properties-name.md "listed-buildings.schema.json#/properties/name")
76
+
77
+ ### name Type
78
+
79
+ `string`
80
+
81
+ ### name Examples
82
+
83
+ ```json
84
+ "41A, NEWBIGGIN"
85
+ ```
86
+
87
+ ## listedBuildingGrade
88
+
89
+ Grade assigned to the listing.
90
+
91
+ `listedBuildingGrade`
92
+
93
+ * is required
94
+
95
+ * Type: `string`
96
+
97
+ * cannot be null
98
+
99
+ * defined in: [Listed Buildings](listed-buildings-properties-listedbuildinggrade.md "listed-buildings.schema.json#/properties/listedBuildingGrade")
100
+
101
+ ### listedBuildingGrade Type
102
+
103
+ `string`
104
+
105
+ ### listedBuildingGrade Examples
106
+
107
+ ```json
108
+ "II"
109
+ ```
110
+
111
+ ## Additional Properties
112
+
113
+ Additional properties are allowed and do not have to follow a specific schema