@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,125 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/lpa-questionnaire.schema.json",
4
+ "title": "LPA Questionnaire Command",
5
+ "description": "Schema defining the data produced by the Front-Office when an LPA Questionnaire is submitted",
6
+ "$comment": "This is a combination of an LPA Questionnaire and Documents",
7
+ "type": "object",
8
+ "additionalProperties": true,
9
+ "required": ["casedata", "documents"],
10
+ "properties": {
11
+ "casedata": {
12
+ "type": "object",
13
+ "additionalProperties": true,
14
+ "anyOf": [
15
+ {
16
+ "allOf": [
17
+ { "$comment": "backwards compatibility for no case type, when removed can update allOf to oneOf" },
18
+ { "not": { "required": ["caseType"] } },
19
+ { "$ref": "lpa-questionnaire-has.schema.json" }
20
+ ]
21
+ },
22
+ {
23
+ "allOf": [{ "properties": { "caseType": { "const": "W" } } }, { "$ref": "lpa-questionnaire-s78.schema.json" }]
24
+ },
25
+ {
26
+ "allOf": [{ "properties": { "caseType": { "const": "Y" } } }, { "$ref": "lpa-questionnaire-s78.schema.json" }]
27
+ },
28
+ {
29
+ "allOf": [{ "properties": { "caseType": { "const": "D" } } }, { "$ref": "lpa-questionnaire-has.schema.json" }]
30
+ }
31
+ ]
32
+ },
33
+ "documents": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": true,
38
+ "properties": {
39
+ "documentId": {
40
+ "type": "string",
41
+ "examples": ["4547fec8-16b2-47bb-836d-4d0baac04079"],
42
+ "description": "The unique identifier for the document"
43
+ },
44
+ "filename": {
45
+ "type": "string",
46
+ "examples": ["filename.pdf"],
47
+ "description": "Current stored name of the document"
48
+ },
49
+ "originalFilename": {
50
+ "type": "string",
51
+ "examples": ["original_filename.pdf"],
52
+ "description": "Original name of document"
53
+ },
54
+ "size": {
55
+ "type": "integer",
56
+ "examples": [23452],
57
+ "description": "The file size, in bytes"
58
+ },
59
+ "mime": {
60
+ "type": ["string"],
61
+ "examples": ["application/pdf"],
62
+ "description": "The mime type for the current version of the file"
63
+ },
64
+ "documentURI": {
65
+ "type": "string",
66
+ "examples": [
67
+ "https://custom-domain.gov.uk/container-name/appeal/7002471/4547fec8-16b2-47bb-836d-4d0baac04079/v1/filename.pdf"
68
+ ],
69
+ "description": "The internal location of the document",
70
+ "$comment": "This property contains blob storage info (domain, container), caseReference, version and filename"
71
+ },
72
+ "dateCreated": {
73
+ "type": "string",
74
+ "format": "date-time",
75
+ "examples": ["2023-07-27T20:30:00.000Z"],
76
+ "description": "The creation date for the document"
77
+ },
78
+ "documentType": {
79
+ "type": ["string", "null"],
80
+ "enum": [
81
+ "whoNotified",
82
+ "whoNotifiedSiteNotice",
83
+ "whoNotifiedLetterToNeighbours",
84
+ "whoNotifiedPressAdvert",
85
+ "conservationMap",
86
+ "lpaCaseCorrespondence",
87
+ "lpaCostsApplication",
88
+ "lpaCostsCorrespondence",
89
+ "lpaCostsWithdrawal",
90
+ "otherPartyRepresentations",
91
+ "planningOfficerReport",
92
+ "plansDrawings",
93
+ "developmentPlanPolicies",
94
+ "supplementaryPlanning",
95
+ "emergingPlan",
96
+ "appealNotification",
97
+ null,
98
+ "otherRelevantPolicies",
99
+ "treePreservationPlan",
100
+ "consultationResponses",
101
+ "eiaEnvironmentalStatement",
102
+ "eiaScreeningDirection",
103
+ "eiaScreeningOpinion",
104
+ "eiaScopingOpinion",
105
+ "communityInfrastructureLevy",
106
+ "definitiveMapStatement",
107
+ "historicEnglandConsultation"
108
+ ],
109
+ "description": "The type of document, used for exchange, migrations and consumption from the appeal back-office system"
110
+ }
111
+ },
112
+ "required": [
113
+ "documentId",
114
+ "filename",
115
+ "originalFilename",
116
+ "size",
117
+ "mime",
118
+ "documentURI",
119
+ "dateCreated",
120
+ "documentType"
121
+ ]
122
+ }
123
+ }
124
+ }
125
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/new-deadline-submission.schema.json",
4
+ "title": "new-deadline-submission",
5
+ "description": "A command to deliver metadata about a new document submission added to a deadline",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["caseReference", "name", "email", "deadline", "submissionType", "blobGuid", "documentName"],
9
+ "properties": {
10
+ "caseReference": {
11
+ "type": "string",
12
+ "description": "The unique reference of the case"
13
+ },
14
+ "name": {
15
+ "type": "string",
16
+ "description": "The name of the FO user who made the submission"
17
+ },
18
+ "email": {
19
+ "type": "string",
20
+ "format": "email",
21
+ "description": "The email address of the FO user who made the submission"
22
+ },
23
+ "interestedParty": {
24
+ "type": "boolean",
25
+ "description": "Was the submission made by an interested party on behalf of someone else?"
26
+ },
27
+ "interestedPartyReference": {
28
+ "type": "string",
29
+ "description": "Only necessary if `interestedParty` is true"
30
+ },
31
+ "deadline": {
32
+ "type": "string",
33
+ "description": "The name of the deadline which the submission was made against"
34
+ },
35
+ "submissionType": {
36
+ "type": "string",
37
+ "description": "The name of the deadline line item the submission was made against"
38
+ },
39
+ "sensitiveData": {
40
+ "type": "boolean",
41
+ "description": "Does the submission contain sensitive data?"
42
+ },
43
+ "lateSubmission": {
44
+ "type": "boolean"
45
+ },
46
+ "submissionId": {
47
+ "type": "string",
48
+ "description": "ID of the submission in the database"
49
+ },
50
+ "blobGuid": {
51
+ "type": "string",
52
+ "description": "The GUID of the blob in storage"
53
+ },
54
+ "documentName": {
55
+ "type": "string",
56
+ "description": "The file name of the document in blob storage"
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/nsip-exam-timetable-submission.schema.json",
4
+ "title": "nsip-exam-timetable-submission",
5
+ "description": "Result of processing a new exam timetable submission",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["status", "deadline", "submissionType", "blobGuid", "documentName"],
9
+ "properties": {
10
+ "status": {
11
+ "type": "string",
12
+ "enum": ["SUCCESS", "VIRUS_DETECTED", "FAILURE"]
13
+ },
14
+ "deadline": {
15
+ "type": "string"
16
+ },
17
+ "submissionType": {
18
+ "type": "string"
19
+ },
20
+ "blobGuid": {
21
+ "type": "string"
22
+ },
23
+ "documentName": {
24
+ "type": "string"
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/register-nsip-subscription.schema.json",
4
+ "title": "register-nsip-subscription",
5
+ "description": "A command to register an NSIP subscription with the back office",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["emailSubscriber"],
9
+ "properties": {
10
+ "__additionalProperties__": {
11
+ "type": "object",
12
+ "description": "Properties in additionalProperties in the Service Bus message. Not present in the message body.",
13
+ "properties": {
14
+ "type": {
15
+ "type": "string",
16
+ "enum": ["Create", "Delete"]
17
+ }
18
+ }
19
+ },
20
+ "nsipSubscription": {
21
+ "$ref": "nsip-subscription.schema.json"
22
+ },
23
+ "subscriptionTypes": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "string",
27
+ "enum": ["allUpdates", "applicationSubmitted", "applicationDecided", "registrationOpen"]
28
+ },
29
+ "description": "Which update(s) does the subscriber want to get notified of. Note nsipSubscription.subscriptionType is ignored."
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/register-representation.schema.json",
4
+ "title": "Register Representation",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "referenceId",
9
+ "caseReference",
10
+ "originalRepresentation",
11
+ "representationFrom",
12
+ "registerFor",
13
+ "represented"
14
+ ],
15
+ "properties": {
16
+ "referenceId": {
17
+ "type": "string",
18
+ "description": "registration identification number"
19
+ },
20
+ "caseReference": {
21
+ "type": "string",
22
+ "description": "The unique reference of the case"
23
+ },
24
+ "representationType": {
25
+ "type": "string",
26
+ "description": "Type of representation"
27
+ },
28
+ "originalRepresentation": {
29
+ "type": "string"
30
+ },
31
+ "representationFrom": {
32
+ "type": "string",
33
+ "enum": ["PERSON", "ORGANISATION", "AGENT"]
34
+ },
35
+ "registerFor": {
36
+ "type": "string",
37
+ "enum": ["PERSON", "ORGANISATION", "FAMILY_GROUP"]
38
+ },
39
+ "represented": {
40
+ "$ref": "commands/interested-party.schema.json",
41
+ "description": "Person or organisation being represented"
42
+ },
43
+ "representative": {
44
+ "$ref": "commands/interested-party.schema.json",
45
+ "description": "Person or organisation submitting representation in the case of Agent representationFrom"
46
+ },
47
+ "dateReceived": {
48
+ "type": "string"
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,350 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "dart-response.schema.json",
4
+ "title": "DaRT API response",
5
+ "description": "Schema defining the data returned by the DaRT API",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["caseReference", "applicationReference"],
9
+ "properties": {
10
+ "caseId": {
11
+ "type": "integer",
12
+ "examples": ["2744"],
13
+ "description": "Internal case identifier"
14
+ },
15
+ "caseReference": {
16
+ "type": "integer",
17
+ "examples": ["6002744"],
18
+ "description": "External case identifier"
19
+ },
20
+ "caseStatus": {
21
+ "type": "string",
22
+ "examples": ["lpa_questionnaire"],
23
+ "description": "The processing state for the case"
24
+ },
25
+ "caseType": {
26
+ "type": "string",
27
+ "examples": ["w"],
28
+ "description": "The internal code for a type of case"
29
+ },
30
+ "caseProcedure": {
31
+ "type": ["string", "null"],
32
+ "examples": ["W"],
33
+ "description": "The type of procedure for the case"
34
+ },
35
+ "lpaCode": {
36
+ "type": ["string", "null"],
37
+ "examples": ["DORS"],
38
+ "description": "PINS internal code for LPA"
39
+ },
40
+ "lpaName": {
41
+ "type": ["string", "null"],
42
+ "examples": ["example"],
43
+ "description": "Name of the LPA"
44
+ },
45
+ "allocationLevel": {
46
+ "type": ["string", "null"],
47
+ "examples": ["H"],
48
+ "description": "A case level used for allocation purposes"
49
+ },
50
+ "allocationBand": {
51
+ "type": ["string", "null"],
52
+ "examples": ["1"],
53
+ "description": "A band used for allocation purposes"
54
+ },
55
+ "caseSpecialisms": {
56
+ "type": ["array", "null"],
57
+ "items": {
58
+ "type": "string"
59
+ },
60
+ "examples": ["General allocation", "Housing orders", "Waste"],
61
+ "description": "A list of case specialisms for allocation purposes"
62
+ },
63
+ "caseSubmittedDate": {
64
+ "type": "string",
65
+ "examples": ["025-01-02T16:20:07.753Z"],
66
+ "description": "The date the case was submitted by the appellant"
67
+ },
68
+ "caseCreatedDate": {
69
+ "type": "string",
70
+ "examples": ["025-01-02T16:20:07.753Z"],
71
+ "description": "The date the case was received"
72
+ },
73
+ "caseUpdatedDate": {
74
+ "type": "string",
75
+ "examples": ["025-01-02T16:20:07.753Z"],
76
+ "description": "The date the case was last updated in the back-office"
77
+ },
78
+ "caseValidDate": {
79
+ "type": ["string", "null"],
80
+ "examples": ["025-01-02T16:20:07.753Z"],
81
+ "description": "The date since when the case was considered valid"
82
+ },
83
+ "caseValidationDate": {
84
+ "type": ["string", "null"],
85
+ "examples": ["025-01-02T16:20:07.753Z"],
86
+ "description": "The date the case was validated in the back-office"
87
+ },
88
+ "caseValidationOutcome": {
89
+ "type": ["string", "null"],
90
+ "examples": ["valid"],
91
+ "description": "The outcome of the validation action"
92
+ },
93
+ "caseValidationInvalidDetails": {
94
+ "type": ["array", "null"],
95
+ "items": {
96
+ "type": "string"
97
+ },
98
+ "examples": [
99
+ "Appeal has not been submitted on time",
100
+ "Documents have not been submitted on time",
101
+ "Other: scddsfv"
102
+ ],
103
+ "description": "A list of reasons why the appeal is invalid",
104
+ "$comment": "The list will contain items only if the caseValidationOutcome is invalid"
105
+ },
106
+ "caseValidationIncompleteDetails": {
107
+ "type": ["array", "null"],
108
+ "items": {
109
+ "type": "string"
110
+ },
111
+ "examples": [
112
+ "Appellant name is not the same on the application form and appeal form",
113
+ "LPA's decision notice is missing"
114
+ ],
115
+ "description": "A list of reasons why the appeal is incomplete",
116
+ "$comment": "The list will contain items only if the caseValidationOutcome is incomplete"
117
+ },
118
+ "caseExtensionDate": {
119
+ "type": ["string", "null"],
120
+ "examples": ["2025-01-10T00:00:00.000Z"],
121
+ "description": "When the validation outcome is incomplete, an extension may be granted to provide missing information"
122
+ },
123
+ "caseStartedDate": {
124
+ "type": ["string", "null"],
125
+ "examples": ["2025-01-10T00:00:00.000Z"],
126
+ "description": "A date indicating when the case was started, resulting in the creation of a timetable"
127
+ },
128
+ "casePublishedDate": {
129
+ "type": ["string", "null"],
130
+ "examples": ["2025-01-10T00:00:00.000Z"],
131
+ "description": "A date indicating when the case was published"
132
+ },
133
+ "linkedCaseStatus": {
134
+ "type": ["string", "null"],
135
+ "examples": ["child"],
136
+ "description": "Indicates if the case is linked, and the type of relationship"
137
+ },
138
+ "leadCaseReference": {
139
+ "type": ["string", "null"],
140
+ "examples": ["6002745"],
141
+ "description": "The reference of the lead case, if the case is a child case"
142
+ },
143
+ "caseWithdrawnDate": {
144
+ "type": ["string", "null"],
145
+ "examples": ["2025-01-10T00:00:00.000Z"],
146
+ "description": "The date the case was withdrawn by the appellant"
147
+ },
148
+ "caseTransferredDate": {
149
+ "type": ["string", "null"],
150
+ "examples": ["2025-01-10T00:00:00.000Z"],
151
+ "description": "The date the case was transferred to a new case of a different type"
152
+ },
153
+ "transferredCaseClosedDate": {
154
+ "type": ["string", "null"],
155
+ "examples": ["2025-01-10T00:00:00.000Z"],
156
+ "description": "The date the case was closed and the appellant requested to resubmit"
157
+ },
158
+ "caseDecisionOutcomeDate": {
159
+ "type": ["string", "null"],
160
+ "examples": ["2025-01-10T00:00:00.000Z"],
161
+ "description": "The date of the case decision"
162
+ },
163
+ "caseDecisionPublishedDate": {
164
+ "type": ["string", "null"],
165
+ "examples": ["2025-01-10T00:00:00.000Z"],
166
+ "description": "The date the case decision was published"
167
+ },
168
+ "caseDecisionOutcome": {
169
+ "type": ["string", "null"],
170
+ "examples": ["allowed"],
171
+ "description": "The final outcome for the decision"
172
+ },
173
+ "caseCompletedDate": {
174
+ "type": ["string", "null"],
175
+ "examples": ["2025-01-10T00:00:00.000Z"],
176
+ "description": "The date the case decision letter"
177
+ },
178
+ "enforcementNotice": {
179
+ "type": ["boolean", "null"],
180
+ "description": "Indicates if an enforcement notice is the reason for the appeal"
181
+ },
182
+ "applicationReference": {
183
+ "type": "string",
184
+ "examples": ["21824/APP/0/203130"],
185
+ "description": "The unique identifier of the LPA application"
186
+ },
187
+ "applicationDate": {
188
+ "type": "string",
189
+ "examples": ["2025-01-10T00:00:00.000Z"],
190
+ "description": "The date of the original LPA application"
191
+ },
192
+ "applicationDecision": {
193
+ "type": "string",
194
+ "examples": ["refused"],
195
+ "description": "The outcome of the original LPA decision"
196
+ },
197
+ "lpaDecisionDate": {
198
+ "type": ["string", "null"],
199
+ "examples": ["2025-01-10T00:00:00.000Z"],
200
+ "description": "The date of the original LPA decision"
201
+ },
202
+ "caseSubmissionDueDate": {
203
+ "type": ["string", "null"],
204
+ "examples": ["2025-01-10T00:00:00.000Z"],
205
+ "description": "The statutory deadline for submitting an appeal from the original LPA decision date"
206
+ },
207
+ "siteAddressLine1": {
208
+ "type": ["string", "null"],
209
+ "examples": ["21 The Pavement"],
210
+ "description": "First line of case site address"
211
+ },
212
+ "siteAddressLine2": {
213
+ "type": ["string", "null"],
214
+ "examples": ["Shotesham Road"],
215
+ "description": "Second line of case site address"
216
+ },
217
+ "siteAddressTown": {
218
+ "type": ["string", "null"],
219
+ "examples": ["Bristol"],
220
+ "description": "Town / City of the site address"
221
+ },
222
+ "siteAddressCounty": {
223
+ "type": ["string", "null"],
224
+ "examples": ["Wandsworth"],
225
+ "description": "County of the site address"
226
+ },
227
+ "siteAddressPostcode": {
228
+ "type": ["string", "null"],
229
+ "examples": ["SW4 0HY"],
230
+ "description": "Postal code of the site address"
231
+ },
232
+ "isCorrectAppealType": {
233
+ "type": ["boolean", "null"],
234
+ "examples": ["True"],
235
+ "description": "Indicates if the LPA considers the appeal type appropriate"
236
+ },
237
+ "originalDevelopmentDescription": {
238
+ "type": ["string", "null"],
239
+ "examples": ["Replacement of an existing gate to access the property"],
240
+ "description": "The original description of the development, as provided by the appellant"
241
+ },
242
+ "changedDevelopmentDescription": {
243
+ "type": ["boolean", "null"],
244
+ "examples": ["True"],
245
+ "description": "Indicates that the LPA has changed the development description"
246
+ },
247
+ "newConditionDetails": {
248
+ "type": ["string", "null"],
249
+ "examples": ["example"],
250
+ "description": "Since the original application, a number of things have changed."
251
+ },
252
+ "nearbyCaseReferences": {
253
+ "type": ["array", "null"],
254
+ "items": {
255
+ "type": "string",
256
+ "examples": ["6000456", "8004567"]
257
+ },
258
+ "description": "A list of related case references known to the appellant and the LPA"
259
+ },
260
+ "neighbouringSiteAddresses": {
261
+ "type": ["array", "null"],
262
+ "items": {
263
+ "type": "object",
264
+ "additionalProperties": true,
265
+ "properties": {
266
+ "neighbouringSiteAddressLine1": {
267
+ "type": ["string", "null"],
268
+ "examples": ["96 The Avenue"],
269
+ "description": "First line of address of the neighbouring site"
270
+ },
271
+ "neighbouringSiteAddressLine2": {
272
+ "type": ["string", "null"],
273
+ "description": "Second line of address of the neighbouring site"
274
+ },
275
+ "neighbouringSiteAddressTown": {
276
+ "type": ["string", "null"],
277
+ "examples": ["Maidstone"],
278
+ "description": "Town / City of the neighbouring site address"
279
+ },
280
+ "neighbouringSiteAddressCounty": {
281
+ "type": ["string", "null"],
282
+ "examples": ["Kent"],
283
+ "description": "County of the neighbouring site address"
284
+ },
285
+ "neighbouringSiteAddressPostcode": {
286
+ "type": ["string", "null"],
287
+ "examples": ["MD21 5XY"],
288
+ "description": "Postal code of the neighbouring site address"
289
+ }
290
+ },
291
+ "required": [
292
+ "neighbouringSiteAddressLine1",
293
+ "neighbouringSiteAddressLine2",
294
+ "neighbouringSiteAddressTown",
295
+ "neighbouringSiteAddressCounty",
296
+ "neighbouringSiteAddressPostcode"
297
+ ]
298
+ },
299
+ "description": "A list of neighbouring site addresses"
300
+ },
301
+ "affectedListedBuildingNumbers": {
302
+ "type": ["array", "null"],
303
+ "items": {
304
+ "type": "string",
305
+ "examples": ["10023", "17824"]
306
+ },
307
+ "description": "A list of affected listed building IDs from Historic England"
308
+ },
309
+ "appellantCostsAppliedFor": {
310
+ "type": ["boolean", "null"],
311
+ "examples": ["True"],
312
+ "description": "Indicates if the appellant has applied for costs"
313
+ },
314
+ "lpaCostsAppliedFor": {
315
+ "type": ["boolean", "null"],
316
+ "examples": ["False"],
317
+ "description": "Indicates if the LPA has applied for costs"
318
+ },
319
+ "appellantName": {
320
+ "type": "string",
321
+ "examples": ["example"],
322
+ "description": "Name of the appellant"
323
+ },
324
+ "typeOfEvent": {
325
+ "type": ["string", "null"],
326
+ "examples": ["site_visit_access_required"],
327
+ "description": "The type of event"
328
+ },
329
+ "startDateOfTheEvent": {
330
+ "type": ["string", "null"],
331
+ "examples": ["2025-01-10T00:00:00.000Z"],
332
+ "description": "Event start date and time"
333
+ },
334
+ "inspectorName": {
335
+ "type": ["string", "null"],
336
+ "examples": ["In Spector"],
337
+ "description": "Name of inspector allocated to case"
338
+ },
339
+ "caseOfficerName": {
340
+ "type": ["string", "null"],
341
+ "examples": ["example"],
342
+ "description": "name of case officer assigned to case"
343
+ },
344
+ "inspectorQualifications": {
345
+ "type": ["string", "null"],
346
+ "examples": ["example"],
347
+ "description": "The qualifications of the inspector"
348
+ }
349
+ }
350
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "entraid.schema.json",
4
+ "title": "Entra ID User Objects",
5
+ "description": "A list of users from EntraID ",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["id", "employeeId", "givenName", "surname", "userPrincipalName"],
9
+ "properties": {
10
+ "employeeId": {
11
+ "type": ["string"],
12
+ "description": "The employee's unique identifier"
13
+ },
14
+ "id": {
15
+ "type": ["string"],
16
+ "description": "The unique identifier within the EntraID"
17
+ },
18
+ "givenName": {
19
+ "type": ["string"],
20
+ "description": "The employee's given name"
21
+ },
22
+ "surname": {
23
+ "type": ["string"],
24
+ "description": "The employee's surname"
25
+ },
26
+ "userPrincipalName": {
27
+ "type": ["string"],
28
+ "description": "The employee's email address"
29
+ }
30
+ }
31
+ }