@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,460 @@
1
+ ## S51 Advice Type
2
+
3
+ `object` ([S51 Advice](s51-advice.md))
4
+
5
+ # S51 Advice Properties
6
+
7
+ | Property | Type | Required | Nullable | Defined by |
8
+ | :------------------------------------------ | :-------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------ |
9
+ | [adviceId](#adviceid) | `integer` | Required | cannot be null | [S51 Advice](s51-advice-properties-adviceid.md "s51-advice.schema.json#/properties/adviceId") |
10
+ | [adviceReference](#advicereference) | `string` | Required | cannot be null | [S51 Advice](s51-advice-properties-advicereference.md "s51-advice.schema.json#/properties/adviceReference") |
11
+ | [caseId](#caseid) | `integer` | Required | can be null | [S51 Advice](s51-advice-properties-caseid.md "s51-advice.schema.json#/properties/caseId") |
12
+ | [caseReference](#casereference) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-casereference.md "s51-advice.schema.json#/properties/caseReference") |
13
+ | [title](#title) | `string` | Required | cannot be null | [S51 Advice](s51-advice-properties-title.md "s51-advice.schema.json#/properties/title") |
14
+ | [titleWelsh](#titlewelsh) | `string` | Optional | can be null | [S51 Advice](s51-advice-properties-titlewelsh.md "s51-advice.schema.json#/properties/titleWelsh") |
15
+ | [from](#from) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-from.md "s51-advice.schema.json#/properties/from") |
16
+ | [agent](#agent) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-agent.md "s51-advice.schema.json#/properties/agent") |
17
+ | [method](#method) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-method.md "s51-advice.schema.json#/properties/method") |
18
+ | [enquiryDate](#enquirydate) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-enquirydate.md "s51-advice.schema.json#/properties/enquiryDate") |
19
+ | [enquiryDetails](#enquirydetails) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-enquirydetails.md "s51-advice.schema.json#/properties/enquiryDetails") |
20
+ | [enquiryDetailsWelsh](#enquirydetailswelsh) | `string` | Optional | can be null | [S51 Advice](s51-advice-properties-enquirydetailswelsh.md "s51-advice.schema.json#/properties/enquiryDetailsWelsh") |
21
+ | [adviceGivenBy](#advicegivenby) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-advicegivenby.md "s51-advice.schema.json#/properties/adviceGivenBy") |
22
+ | [adviceDate](#advicedate) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-advicedate.md "s51-advice.schema.json#/properties/adviceDate") |
23
+ | [adviceDetails](#advicedetails) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-advicedetails.md "s51-advice.schema.json#/properties/adviceDetails") |
24
+ | [adviceDetailsWelsh](#advicedetailswelsh) | `string` | Optional | can be null | [S51 Advice](s51-advice-properties-advicedetailswelsh.md "s51-advice.schema.json#/properties/adviceDetailsWelsh") |
25
+ | [status](#status) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-status.md "s51-advice.schema.json#/properties/status") |
26
+ | [redactionStatus](#redactionstatus) | `string` | Required | can be null | [S51 Advice](s51-advice-properties-redactionstatus.md "s51-advice.schema.json#/properties/redactionStatus") |
27
+ | [attachmentIds](#attachmentids) | `array` | Required | cannot be null | [S51 Advice](s51-advice-properties-attachmentids.md "s51-advice.schema.json#/properties/attachmentIds") |
28
+ | Additional Properties | Any | Optional | can be null | |
29
+
30
+ ## adviceId
31
+
32
+
33
+
34
+ `adviceId`
35
+
36
+ * is required
37
+
38
+ * Type: `integer`
39
+
40
+ * cannot be null
41
+
42
+ * defined in: [S51 Advice](s51-advice-properties-adviceid.md "s51-advice.schema.json#/properties/adviceId")
43
+
44
+ ### adviceId Type
45
+
46
+ `integer`
47
+
48
+ ### adviceId Examples
49
+
50
+ ```json
51
+ 1234
52
+ ```
53
+
54
+ ## adviceReference
55
+
56
+
57
+
58
+ `adviceReference`
59
+
60
+ * is required
61
+
62
+ * Type: `string`
63
+
64
+ * cannot be null
65
+
66
+ * defined in: [S51 Advice](s51-advice-properties-advicereference.md "s51-advice.schema.json#/properties/adviceReference")
67
+
68
+ ### adviceReference Type
69
+
70
+ `string`
71
+
72
+ ### adviceReference Examples
73
+
74
+ ```json
75
+ "TR0200007-0005"
76
+ ```
77
+
78
+ ## caseId
79
+
80
+
81
+
82
+ `caseId`
83
+
84
+ * is required
85
+
86
+ * Type: `integer`
87
+
88
+ * can be null
89
+
90
+ * defined in: [S51 Advice](s51-advice-properties-caseid.md "s51-advice.schema.json#/properties/caseId")
91
+
92
+ ### caseId Type
93
+
94
+ `integer`
95
+
96
+ ### caseId Examples
97
+
98
+ ```json
99
+ 1234
100
+ ```
101
+
102
+ ## caseReference
103
+
104
+
105
+
106
+ `caseReference`
107
+
108
+ * is required
109
+
110
+ * Type: `string`
111
+
112
+ * can be null
113
+
114
+ * defined in: [S51 Advice](s51-advice-properties-casereference.md "s51-advice.schema.json#/properties/caseReference")
115
+
116
+ ### caseReference Type
117
+
118
+ `string`
119
+
120
+ ### caseReference Examples
121
+
122
+ ```json
123
+ "BC0110002"
124
+ ```
125
+
126
+ ## title
127
+
128
+ Title of the advice
129
+
130
+ `title`
131
+
132
+ * is required
133
+
134
+ * Type: `string`
135
+
136
+ * cannot be null
137
+
138
+ * defined in: [S51 Advice](s51-advice-properties-title.md "s51-advice.schema.json#/properties/title")
139
+
140
+ ### title Type
141
+
142
+ `string`
143
+
144
+ ### title Examples
145
+
146
+ ```json
147
+ "Advice following issue of decision to accept the application for examination"
148
+ ```
149
+
150
+ ## titleWelsh
151
+
152
+ Title of the advice in Welsh
153
+
154
+ `titleWelsh`
155
+
156
+ * is optional
157
+
158
+ * Type: `string`
159
+
160
+ * can be null
161
+
162
+ * defined in: [S51 Advice](s51-advice-properties-titlewelsh.md "s51-advice.schema.json#/properties/titleWelsh")
163
+
164
+ ### titleWelsh Type
165
+
166
+ `string`
167
+
168
+ ## from
169
+
170
+ Who the enquiry is from
171
+
172
+ `from`
173
+
174
+ * is required
175
+
176
+ * Type: `string`
177
+
178
+ * can be null
179
+
180
+ * defined in: [S51 Advice](s51-advice-properties-from.md "s51-advice.schema.json#/properties/from")
181
+
182
+ ### from Type
183
+
184
+ `string`
185
+
186
+ ## agent
187
+
188
+ Who the enquiry is on behalf of
189
+
190
+ `agent`
191
+
192
+ * is required
193
+
194
+ * Type: `string`
195
+
196
+ * can be null
197
+
198
+ * defined in: [S51 Advice](s51-advice-properties-agent.md "s51-advice.schema.json#/properties/agent")
199
+
200
+ ### agent Type
201
+
202
+ `string`
203
+
204
+ ## method
205
+
206
+ How the enquiry was made
207
+
208
+ `method`
209
+
210
+ * is required
211
+
212
+ * Type: `string`
213
+
214
+ * can be null
215
+
216
+ * defined in: [S51 Advice](s51-advice-properties-method.md "s51-advice.schema.json#/properties/method")
217
+
218
+ ### method Type
219
+
220
+ `string`
221
+
222
+ ### method Constraints
223
+
224
+ **enum**: the value of this property must be equal to one of the following values:
225
+
226
+ | Value | Explanation |
227
+ | :---------- | :---------- |
228
+ | `"phone"` | |
229
+ | `"email"` | |
230
+ | `"meeting"` | |
231
+ | `"post"` | |
232
+ | `"fax"` | |
233
+ | `null` | |
234
+
235
+ ## enquiryDate
236
+
237
+ Date the enquiry was made
238
+
239
+ `enquiryDate`
240
+
241
+ * is required
242
+
243
+ * Type: `string`
244
+
245
+ * can be null
246
+
247
+ * defined in: [S51 Advice](s51-advice-properties-enquirydate.md "s51-advice.schema.json#/properties/enquiryDate")
248
+
249
+ ### enquiryDate Type
250
+
251
+ `string`
252
+
253
+ ### enquiryDate Constraints
254
+
255
+ **date time**: the string must be a date time string, according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339 "check the specification")
256
+
257
+ ### enquiryDate Examples
258
+
259
+ ```json
260
+ "2023-07-27T20:30:00.000Z"
261
+ ```
262
+
263
+ ## enquiryDetails
264
+
265
+ Details of the enquiry
266
+
267
+ `enquiryDetails`
268
+
269
+ * is required
270
+
271
+ * Type: `string`
272
+
273
+ * can be null
274
+
275
+ * defined in: [S51 Advice](s51-advice-properties-enquirydetails.md "s51-advice.schema.json#/properties/enquiryDetails")
276
+
277
+ ### enquiryDetails Type
278
+
279
+ `string`
280
+
281
+ ## enquiryDetailsWelsh
282
+
283
+ Details of the enquiry in Welsh
284
+
285
+ `enquiryDetailsWelsh`
286
+
287
+ * is optional
288
+
289
+ * Type: `string`
290
+
291
+ * can be null
292
+
293
+ * defined in: [S51 Advice](s51-advice-properties-enquirydetailswelsh.md "s51-advice.schema.json#/properties/enquiryDetailsWelsh")
294
+
295
+ ### enquiryDetailsWelsh Type
296
+
297
+ `string`
298
+
299
+ ## adviceGivenBy
300
+
301
+ Who issued the advice
302
+
303
+ `adviceGivenBy`
304
+
305
+ * is required
306
+
307
+ * Type: `string`
308
+
309
+ * can be null
310
+
311
+ * defined in: [S51 Advice](s51-advice-properties-advicegivenby.md "s51-advice.schema.json#/properties/adviceGivenBy")
312
+
313
+ ### adviceGivenBy Type
314
+
315
+ `string`
316
+
317
+ ## adviceDate
318
+
319
+ Date the advice was given
320
+
321
+ `adviceDate`
322
+
323
+ * is required
324
+
325
+ * Type: `string`
326
+
327
+ * can be null
328
+
329
+ * defined in: [S51 Advice](s51-advice-properties-advicedate.md "s51-advice.schema.json#/properties/adviceDate")
330
+
331
+ ### adviceDate Type
332
+
333
+ `string`
334
+
335
+ ### adviceDate Constraints
336
+
337
+ **date time**: the string must be a date time string, according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339 "check the specification")
338
+
339
+ ### adviceDate Examples
340
+
341
+ ```json
342
+ "2023-07-27T20:30:00.000Z"
343
+ ```
344
+
345
+ ## adviceDetails
346
+
347
+ Details of the advice
348
+
349
+ `adviceDetails`
350
+
351
+ * is required
352
+
353
+ * Type: `string`
354
+
355
+ * can be null
356
+
357
+ * defined in: [S51 Advice](s51-advice-properties-advicedetails.md "s51-advice.schema.json#/properties/adviceDetails")
358
+
359
+ ### adviceDetails Type
360
+
361
+ `string`
362
+
363
+ ## adviceDetailsWelsh
364
+
365
+ Details of the advice in Welsh
366
+
367
+ `adviceDetailsWelsh`
368
+
369
+ * is optional
370
+
371
+ * Type: `string`
372
+
373
+ * can be null
374
+
375
+ * defined in: [S51 Advice](s51-advice-properties-advicedetailswelsh.md "s51-advice.schema.json#/properties/adviceDetailsWelsh")
376
+
377
+ ### adviceDetailsWelsh Type
378
+
379
+ `string`
380
+
381
+ ## status
382
+
383
+
384
+
385
+ `status`
386
+
387
+ * is required
388
+
389
+ * Type: `string`
390
+
391
+ * can be null
392
+
393
+ * defined in: [S51 Advice](s51-advice-properties-status.md "s51-advice.schema.json#/properties/status")
394
+
395
+ ### status Type
396
+
397
+ `string`
398
+
399
+ ### status Constraints
400
+
401
+ **enum**: the value of this property must be equal to one of the following values:
402
+
403
+ | Value | Explanation |
404
+ | :----------------- | :---------- |
405
+ | `"checked"` | |
406
+ | `"unchecked"` | |
407
+ | `"readytopublish"` | |
408
+ | `"published"` | |
409
+ | `"donotpublish"` | |
410
+ | `null` | |
411
+
412
+ ## redactionStatus
413
+
414
+
415
+
416
+ `redactionStatus`
417
+
418
+ * is required
419
+
420
+ * Type: `string`
421
+
422
+ * can be null
423
+
424
+ * defined in: [S51 Advice](s51-advice-properties-redactionstatus.md "s51-advice.schema.json#/properties/redactionStatus")
425
+
426
+ ### redactionStatus Type
427
+
428
+ `string`
429
+
430
+ ### redactionStatus Constraints
431
+
432
+ **enum**: the value of this property must be equal to one of the following values:
433
+
434
+ | Value | Explanation |
435
+ | :------------- | :---------- |
436
+ | `"unredacted"` | |
437
+ | `"redacted"` | |
438
+ | `null` | |
439
+
440
+ ## attachmentIds
441
+
442
+
443
+
444
+ `attachmentIds`
445
+
446
+ * is required
447
+
448
+ * Type: `string[]`
449
+
450
+ * cannot be null
451
+
452
+ * defined in: [S51 Advice](s51-advice-properties-attachmentids.md "s51-advice.schema.json#/properties/attachmentIds")
453
+
454
+ ### attachmentIds Type
455
+
456
+ `string[]`
457
+
458
+ ## Additional Properties
459
+
460
+ Additional properties are allowed and do not have to follow a specific schema