@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,375 @@
1
+ ## Appeal Representation Type
2
+
3
+ `object` ([Appeal Representation](appeal-representation.md))
4
+
5
+ # Appeal Representation Properties
6
+
7
+ | Property | Type | Required | Nullable | Defined by |
8
+ | :------------------------------------------------------------------ | :-------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
+ | [representationId](#representationid) | `string` | Required | cannot be null | [Appeal Representation](appeal-representation-properties-representationid.md "appeal-representation.schema.json#/properties/representationId") |
10
+ | [caseId](#caseid) | `integer` | Required | can be null | [Appeal Representation](appeal-representation-properties-caseid.md "appeal-representation.schema.json#/properties/caseId") |
11
+ | [caseReference](#casereference) | `string` | Required | cannot be null | [Appeal Representation](appeal-representation-properties-casereference.md "appeal-representation.schema.json#/properties/caseReference") |
12
+ | [representationStatus](#representationstatus) | `string` | Required | can be null | [Appeal Representation](appeal-representation-properties-representationstatus.md "appeal-representation.schema.json#/properties/representationStatus") |
13
+ | [originalRepresentation](#originalrepresentation) | `string` | Required | can be null | [Appeal Representation](appeal-representation-properties-originalrepresentation.md "appeal-representation.schema.json#/properties/originalRepresentation") |
14
+ | [redacted](#redacted) | `boolean` | Required | can be null | [Appeal Representation](appeal-representation-properties-redacted.md "appeal-representation.schema.json#/properties/redacted") |
15
+ | [redactedRepresentation](#redactedrepresentation) | `string` | Required | can be null | [Appeal Representation](appeal-representation-properties-redactedrepresentation.md "appeal-representation.schema.json#/properties/redactedRepresentation") |
16
+ | [redactedBy](#redactedby) | `string` | Required | can be null | [Appeal Representation](appeal-representation-properties-redactedby.md "appeal-representation.schema.json#/properties/redactedBy") |
17
+ | [invalidOrIncompleteDetails](#invalidorincompletedetails) | `array` | Required | can be null | [Appeal Representation](appeal-representation-properties-invalidorincompletedetails.md "appeal-representation.schema.json#/properties/invalidOrIncompleteDetails") |
18
+ | [otherInvalidOrIncompleteDetails](#otherinvalidorincompletedetails) | `array` | Required | can be null | [Appeal Representation](appeal-representation-properties-otherinvalidorincompletedetails.md "appeal-representation.schema.json#/properties/otherInvalidOrIncompleteDetails") |
19
+ | [source](#source) | `string` | Required | can be null | [Appeal Representation](appeal-representation-properties-source.md "appeal-representation.schema.json#/properties/source") |
20
+ | [serviceUserId](#serviceuserid) | `string` | Required | can be null | [Appeal Representation](appeal-representation-properties-serviceuserid.md "appeal-representation.schema.json#/properties/serviceUserId") |
21
+ | [representationType](#representationtype) | `string` | Required | can be null | [Appeal Representation](appeal-representation-properties-representationtype.md "appeal-representation.schema.json#/properties/representationType") |
22
+ | [dateReceived](#datereceived) | `string` | Required | cannot be null | [Appeal Representation](appeal-representation-properties-datereceived.md "appeal-representation.schema.json#/properties/dateReceived") |
23
+ | [documentIds](#documentids) | `array` | Required | cannot be null | [Appeal Representation](appeal-representation-properties-documentids.md "appeal-representation.schema.json#/properties/documentIds") |
24
+ | Additional Properties | Any | Optional | can be null | |
25
+
26
+ ## representationId
27
+
28
+ The unique identifier for the representation
29
+
30
+ > This is a composite key with the caseReference and a representation counter
31
+
32
+ `representationId`
33
+
34
+ * is required
35
+
36
+ * Type: `string`
37
+
38
+ * cannot be null
39
+
40
+ * defined in: [Appeal Representation](appeal-representation-properties-representationid.md "appeal-representation.schema.json#/properties/representationId")
41
+
42
+ ### representationId Type
43
+
44
+ `string`
45
+
46
+ ### representationId Examples
47
+
48
+ ```json
49
+ "7000000-1"
50
+ ```
51
+
52
+ ## caseId
53
+
54
+ Internal case identifier
55
+
56
+ `caseId`
57
+
58
+ * is required
59
+
60
+ * Type: `integer`
61
+
62
+ * can be null
63
+
64
+ * defined in: [Appeal Representation](appeal-representation-properties-caseid.md "appeal-representation.schema.json#/properties/caseId")
65
+
66
+ ### caseId Type
67
+
68
+ `integer`
69
+
70
+ ### caseId Examples
71
+
72
+ ```json
73
+ 1200
74
+ ```
75
+
76
+ ## caseReference
77
+
78
+ External case identifier
79
+
80
+ `caseReference`
81
+
82
+ * is required
83
+
84
+ * Type: `string`
85
+
86
+ * cannot be null
87
+
88
+ * defined in: [Appeal Representation](appeal-representation-properties-casereference.md "appeal-representation.schema.json#/properties/caseReference")
89
+
90
+ ### caseReference Type
91
+
92
+ `string`
93
+
94
+ ### caseReference Examples
95
+
96
+ ```json
97
+ "7002471"
98
+ ```
99
+
100
+ ## representationStatus
101
+
102
+ Status of the representation
103
+
104
+ > BO workflow should validate or withdraw a representation.Enumerated list expected to change.
105
+
106
+ `representationStatus`
107
+
108
+ * is required
109
+
110
+ * Type: `string`
111
+
112
+ * can be null
113
+
114
+ * defined in: [Appeal Representation](appeal-representation-properties-representationstatus.md "appeal-representation.schema.json#/properties/representationStatus")
115
+
116
+ ### representationStatus Type
117
+
118
+ `string`
119
+
120
+ ### representationStatus Constraints
121
+
122
+ **enum**: the value of this property must be equal to one of the following values:
123
+
124
+ | Value | Explanation |
125
+ | :--------------------- | :---------- |
126
+ | `"awaiting_review"` | |
127
+ | `"referred"` | |
128
+ | `"valid"` | |
129
+ | `"invalid"` | |
130
+ | `"invalid_incomplete"` | |
131
+ | `"published"` | |
132
+ | `"archived"` | |
133
+ | `"draft"` | |
134
+ | `"withdrawn"` | |
135
+ | `null` | |
136
+
137
+ ## originalRepresentation
138
+
139
+ The original representation
140
+
141
+ `originalRepresentation`
142
+
143
+ * is required
144
+
145
+ * Type: `string`
146
+
147
+ * can be null
148
+
149
+ * defined in: [Appeal Representation](appeal-representation-properties-originalrepresentation.md "appeal-representation.schema.json#/properties/originalRepresentation")
150
+
151
+ ### originalRepresentation Type
152
+
153
+ `string`
154
+
155
+ ## redacted
156
+
157
+ Indicates if the representation is redacted
158
+
159
+ `redacted`
160
+
161
+ * is required
162
+
163
+ * Type: `boolean`
164
+
165
+ * can be null
166
+
167
+ * defined in: [Appeal Representation](appeal-representation-properties-redacted.md "appeal-representation.schema.json#/properties/redacted")
168
+
169
+ ### redacted Type
170
+
171
+ `boolean`
172
+
173
+ ## redactedRepresentation
174
+
175
+ The redacted version of the representation
176
+
177
+ `redactedRepresentation`
178
+
179
+ * is required
180
+
181
+ * Type: `string`
182
+
183
+ * can be null
184
+
185
+ * defined in: [Appeal Representation](appeal-representation-properties-redactedrepresentation.md "appeal-representation.schema.json#/properties/redactedRepresentation")
186
+
187
+ ### redactedRepresentation Type
188
+
189
+ `string`
190
+
191
+ ## redactedBy
192
+
193
+ Unique identifier for the case team member that performed the redaction
194
+
195
+ > This is the user in Entra ID
196
+
197
+ `redactedBy`
198
+
199
+ * is required
200
+
201
+ * Type: `string`
202
+
203
+ * can be null
204
+
205
+ * defined in: [Appeal Representation](appeal-representation-properties-redactedby.md "appeal-representation.schema.json#/properties/redactedBy")
206
+
207
+ ### redactedBy Type
208
+
209
+ `string`
210
+
211
+ ## invalidOrIncompleteDetails
212
+
213
+ A list of reasons why the representation has been marked as invalid or incomplete.
214
+
215
+ > The list will contain items only if the status is `invalid` or `invalid_incomplete`
216
+
217
+ `invalidOrIncompleteDetails`
218
+
219
+ * is required
220
+
221
+ * Type: `string[]`
222
+
223
+ * can be null
224
+
225
+ * defined in: [Appeal Representation](appeal-representation-properties-invalidorincompletedetails.md "appeal-representation.schema.json#/properties/invalidOrIncompleteDetails")
226
+
227
+ ### invalidOrIncompleteDetails Type
228
+
229
+ `string[]`
230
+
231
+ ## otherInvalidOrIncompleteDetails
232
+
233
+ A list of free text reasons why the representation has been marked as invalid or incomplete
234
+
235
+ > The list will contain items only if the status is `invalid` or `invalid_incomplete` and if invalidOrIncompleteDetails list includes 'other\_reason'
236
+
237
+ `otherInvalidOrIncompleteDetails`
238
+
239
+ * is required
240
+
241
+ * Type: `string[]`
242
+
243
+ * can be null
244
+
245
+ * defined in: [Appeal Representation](appeal-representation-properties-otherinvalidorincompletedetails.md "appeal-representation.schema.json#/properties/otherInvalidOrIncompleteDetails")
246
+
247
+ ### otherInvalidOrIncompleteDetails Type
248
+
249
+ `string[]`
250
+
251
+ ## source
252
+
253
+ Source of the representation (citizen or LPA)
254
+
255
+ `source`
256
+
257
+ * is required
258
+
259
+ * Type: `string`
260
+
261
+ * can be null
262
+
263
+ * defined in: [Appeal Representation](appeal-representation-properties-source.md "appeal-representation.schema.json#/properties/source")
264
+
265
+ ### source Type
266
+
267
+ `string`
268
+
269
+ ### source Constraints
270
+
271
+ **enum**: the value of this property must be equal to one of the following values:
272
+
273
+ | Value | Explanation |
274
+ | :---------- | :---------- |
275
+ | `"lpa"` | |
276
+ | `"citizen"` | |
277
+ | `null` | |
278
+
279
+ ## serviceUserId
280
+
281
+ Service User Id of the person or organisation making the representation
282
+
283
+ `serviceUserId`
284
+
285
+ * is required
286
+
287
+ * Type: `string`
288
+
289
+ * can be null
290
+
291
+ * defined in: [Appeal Representation](appeal-representation-properties-serviceuserid.md "appeal-representation.schema.json#/properties/serviceUserId")
292
+
293
+ ### serviceUserId Type
294
+
295
+ `string`
296
+
297
+ ## representationType
298
+
299
+ The type of representation
300
+
301
+ `representationType`
302
+
303
+ * is required
304
+
305
+ * Type: `string`
306
+
307
+ * can be null
308
+
309
+ * defined in: [Appeal Representation](appeal-representation-properties-representationtype.md "appeal-representation.schema.json#/properties/representationType")
310
+
311
+ ### representationType Type
312
+
313
+ `string`
314
+
315
+ ### representationType Constraints
316
+
317
+ **enum**: the value of this property must be equal to one of the following values:
318
+
319
+ | Value | Explanation |
320
+ | :------------------ | :---------- |
321
+ | `"statement"` | |
322
+ | `"comment"` | |
323
+ | `"final_comment"` | |
324
+ | `"proofs_evidence"` | |
325
+ | `null` | |
326
+
327
+ ## dateReceived
328
+
329
+
330
+
331
+ `dateReceived`
332
+
333
+ * is required
334
+
335
+ * Type: `string`
336
+
337
+ * cannot be null
338
+
339
+ * defined in: [Appeal Representation](appeal-representation-properties-datereceived.md "appeal-representation.schema.json#/properties/dateReceived")
340
+
341
+ ### dateReceived Type
342
+
343
+ `string`
344
+
345
+ ### dateReceived Constraints
346
+
347
+ **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")
348
+
349
+ ### dateReceived Examples
350
+
351
+ ```json
352
+ "2023-07-27T20:30:00.000Z"
353
+ ```
354
+
355
+ ## documentIds
356
+
357
+ An array of documentIds
358
+
359
+ `documentIds`
360
+
361
+ * is required
362
+
363
+ * Type: `string[]`
364
+
365
+ * cannot be null
366
+
367
+ * defined in: [Appeal Representation](appeal-representation-properties-documentids.md "appeal-representation.schema.json#/properties/documentIds")
368
+
369
+ ### documentIds Type
370
+
371
+ `string[]`
372
+
373
+ ## Additional Properties
374
+
375
+ Additional properties are allowed and do not have to follow a specific schema