@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
File without changes
@@ -0,0 +1,202 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/appeal-common-submission.schema.json",
4
+ "title": "Appellant common submission properties",
5
+ "description": "Schema defining any properties common across all appeal types for appeal submissions",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "submissionId",
10
+ "caseProcedure",
11
+ "lpaCode",
12
+ "caseSubmittedDate",
13
+ "enforcementNotice",
14
+ "applicationReference",
15
+ "applicationDate",
16
+ "applicationDecision",
17
+ "applicationDecisionDate",
18
+ "caseSubmissionDueDate",
19
+ "siteAddressLine1",
20
+ "siteAddressLine2",
21
+ "siteAddressTown",
22
+ "siteAddressCounty",
23
+ "siteAddressPostcode",
24
+ "siteAccessDetails",
25
+ "siteSafetyDetails",
26
+ "neighbouringSiteAddresses",
27
+ "nearbyCaseReferences"
28
+ ],
29
+ "properties": {
30
+ "submissionId": {
31
+ "type": "string",
32
+ "format": "uuid",
33
+ "examples": ["7f45748c-2342-4b59-b934-ad6183e8d834"],
34
+ "description": "Case submission id - link to draft submission created by appellant"
35
+ },
36
+ "caseProcedure": {
37
+ "type": "string",
38
+ "enum": ["written", "hearing", "inquiry"],
39
+ "description": "The type of procedure for the appeal"
40
+ },
41
+ "lpaCode": {
42
+ "type": "string",
43
+ "examples": ["Q9999"],
44
+ "description": "A unique identifier for the Local Planning Authority",
45
+ "$comment": "Uses the internal PINS code identifying LPAs"
46
+ },
47
+ "caseSubmittedDate": {
48
+ "type": "string",
49
+ "format": "date-time",
50
+ "examples": ["2023-07-27T20:30:00.000Z"],
51
+ "description": "The date the appeal was submitted by the appellant"
52
+ },
53
+ "enforcementNotice": {
54
+ "type": ["boolean", "null"],
55
+ "description": "Indicates if an enforcement notice is the reason for the appeal"
56
+ },
57
+ "applicationReference": {
58
+ "type": "string",
59
+ "examples": ["43010/APP/1/290572"],
60
+ "description": "The unique identifier of the LPA application"
61
+ },
62
+ "applicationDate": {
63
+ "type": "string",
64
+ "format": "date-time",
65
+ "examples": ["2023-07-27T20:30:00.000Z"],
66
+ "description": "The date of the original LPA application"
67
+ },
68
+ "applicationDecision": {
69
+ "type": "string",
70
+ "enum": ["granted", "refused", "not_received"],
71
+ "description": "The outcome of the original LPA decision"
72
+ },
73
+ "applicationDecisionDate": {
74
+ "type": ["string", "null"],
75
+ "format": "date-time",
76
+ "examples": ["2023-07-27T20:30:00.000Z"],
77
+ "description": "The date of the original LPA decision"
78
+ },
79
+ "caseSubmissionDueDate": {
80
+ "type": ["string", "null"],
81
+ "format": "date-time",
82
+ "examples": ["2023-07-27T20:30:00.000Z"],
83
+ "description": "The statutory deadline for submitting an appeal from the original LPA decision date",
84
+ "$comment": "Calculated from the applicationDecisionDate"
85
+ },
86
+ "siteAddressLine1": {
87
+ "type": "string",
88
+ "examples": ["96 The Avenue"],
89
+ "description": "First line of address for the appeal site"
90
+ },
91
+ "siteAddressLine2": {
92
+ "type": ["string", "null"],
93
+ "description": "Second line of address for the appeal site"
94
+ },
95
+ "siteAddressTown": {
96
+ "type": "string",
97
+ "examples": ["Maidstone"],
98
+ "description": "Town / City of the site address"
99
+ },
100
+ "siteAddressCounty": {
101
+ "type": ["string", "null"],
102
+ "examples": ["Kent"],
103
+ "description": "County of the site address"
104
+ },
105
+ "siteAddressPostcode": {
106
+ "type": "string",
107
+ "examples": ["MD21 5XY"],
108
+ "description": "Postal code of the site address"
109
+ },
110
+ "siteAccessDetails": {
111
+ "type": ["array", "null"],
112
+ "items": {
113
+ "type": "string",
114
+ "examples": ["The site is accessible through the small gate on the left of the property"]
115
+ },
116
+ "description": "Provided information on site accessibility"
117
+ },
118
+ "siteSafetyDetails": {
119
+ "type": ["array", "null"],
120
+ "items": {
121
+ "type": "string",
122
+ "examples": ["There is an aggressive dog in the property"]
123
+ },
124
+ "description": "Provided information on site health and safety"
125
+ },
126
+ "neighbouringSiteAddresses": {
127
+ "type": ["array", "null"],
128
+ "items": {
129
+ "type": "object",
130
+ "additionalProperties": true,
131
+ "properties": {
132
+ "neighbouringSiteAddressLine1": {
133
+ "type": "string",
134
+ "examples": ["96 The Avenue"],
135
+ "description": "First line of address of the site"
136
+ },
137
+ "neighbouringSiteAddressLine2": {
138
+ "type": ["string", "null"],
139
+ "description": "Second line of address of the site"
140
+ },
141
+ "neighbouringSiteAddressTown": {
142
+ "type": "string",
143
+ "examples": ["Maidstone"],
144
+ "description": "Town / City of the site address"
145
+ },
146
+ "neighbouringSiteAddressCounty": {
147
+ "type": ["string", "null"],
148
+ "examples": ["Kent"],
149
+ "description": "County of the site address"
150
+ },
151
+ "neighbouringSiteAddressPostcode": {
152
+ "type": "string",
153
+ "examples": ["MD21 5XY"],
154
+ "description": "Postal code of the site address"
155
+ },
156
+ "neighbouringSiteAccessDetails": {
157
+ "type": ["string", "null"],
158
+ "examples": ["Ongoing road works at this address"],
159
+ "description": "Provided information on site accessibility on this address"
160
+ },
161
+ "neighbouringSiteSafetyDetails": {
162
+ "type": ["string", "null"],
163
+ "examples": ["Ongoing road works at this address"],
164
+ "description": "Provided information on site health and safety on this address"
165
+ }
166
+ },
167
+ "required": [
168
+ "neighbouringSiteAddressLine1",
169
+ "neighbouringSiteAddressLine2",
170
+ "neighbouringSiteAddressTown",
171
+ "neighbouringSiteAddressCounty",
172
+ "neighbouringSiteAddressPostcode",
173
+ "neighbouringSiteAccessDetails",
174
+ "neighbouringSiteSafetyDetails"
175
+ ]
176
+ },
177
+ "description": "A list of neighbouring site addresses"
178
+ },
179
+ "nearbyCaseReferences": {
180
+ "type": ["array", "null"],
181
+ "items": {
182
+ "type": "string",
183
+ "examples": ["6000456", "8004567"]
184
+ },
185
+ "description": "A list of related case references known to the appellant and the LPA"
186
+ },
187
+ "typeOfPlanningApplication": {
188
+ "type": ["string", "null"],
189
+ "enum": [
190
+ "full-appeal",
191
+ "householder-planning",
192
+ "outline-planning",
193
+ "prior-approval",
194
+ "reserved-matters",
195
+ "removal-or-variation-of-conditions",
196
+ "listed-building",
197
+ "minor-commercial-development",
198
+ null
199
+ ]
200
+ }
201
+ }
202
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/appeal-has-submission.schema.json",
4
+ "title": "Appellant HAS submission properties",
5
+ "description": "Schema defining any HAS specific properties for submissions",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "isGreenBelt",
10
+ "siteAreaSquareMetres",
11
+ "floorSpaceSquareMetres",
12
+ "ownsAllLand",
13
+ "ownsSomeLand",
14
+ "knowsOtherOwners",
15
+ "knowsAllOwners",
16
+ "advertisedAppeal",
17
+ "ownersInformed",
18
+ "originalDevelopmentDescription",
19
+ "changedDevelopmentDescription",
20
+ "appellantCostsAppliedFor"
21
+ ],
22
+ "allOf": [
23
+ { "$ref": "appeal-common-submission.schema.json" },
24
+ {
25
+ "properties": {
26
+ "isGreenBelt": {
27
+ "type": ["boolean", "null"],
28
+ "description": "Indicates if the site is in a green belt"
29
+ },
30
+ "siteAreaSquareMetres": {
31
+ "type": ["number", "null"],
32
+ "examples": [45.7],
33
+ "description": "The site area, in square meters"
34
+ },
35
+ "floorSpaceSquareMetres": {
36
+ "type": ["number", "null"],
37
+ "examples": [3.5],
38
+ "description": "The floor space, in square meters"
39
+ },
40
+ "ownsAllLand": {
41
+ "type": ["boolean", "null"],
42
+ "description": "Indicates if the appellant has complete ownership of the site"
43
+ },
44
+ "ownsSomeLand": {
45
+ "type": ["boolean", "null"],
46
+ "description": "Indicates if the appellant has partial ownership of the site"
47
+ },
48
+ "knowsOtherOwners": {
49
+ "type": ["string", "null"],
50
+ "enum": ["Yes", "No", "Some", null],
51
+ "description": "Indicates if the appellant knows other owners of the site"
52
+ },
53
+ "knowsAllOwners": {
54
+ "type": ["string", "null"],
55
+ "enum": ["Yes", "No", "Some", null],
56
+ "description": "Indicates if the appellant knows all owners of the site"
57
+ },
58
+ "advertisedAppeal": {
59
+ "type": ["boolean", "null"],
60
+ "description": "Indicates if the appellant has advertised the appeal to the LPA decision"
61
+ },
62
+ "ownersInformed": {
63
+ "type": ["boolean", "null"],
64
+ "description": "Indicates if the appellant has informed other owners of the site"
65
+ },
66
+ "originalDevelopmentDescription": {
67
+ "type": ["string", "null"],
68
+ "examples": ["Replacement of an existing gate to access the property"],
69
+ "description": "The original description of the development, as provided by the appellant"
70
+ },
71
+ "changedDevelopmentDescription": {
72
+ "type": ["boolean", "null"],
73
+ "description": "Indicates that the LPA has changed the development description"
74
+ },
75
+ "appellantCostsAppliedFor": {
76
+ "type": ["boolean", "null"],
77
+ "description": "Indicates if the appellant has applied for costs"
78
+ }
79
+ }
80
+ }
81
+ ]
82
+ }
@@ -0,0 +1,192 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/appeal-representation-submission.schema.json",
4
+ "title": "appeal representation submission",
5
+ "description": "Schema defining the data produced by the Front-Office when a representation is created on an appeal",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["caseReference", "representationSubmittedDate", "representation", "representationType", "documents"],
9
+ "oneOf": [{ "required": ["serviceUserId"] }, { "required": ["lpaCode"] }, { "required": ["newUser"] }],
10
+ "properties": {
11
+ "caseReference": {
12
+ "type": "string",
13
+ "examples": ["7002471"],
14
+ "description": "External case identifier"
15
+ },
16
+ "representationSubmittedDate": {
17
+ "type": ["string", "null"],
18
+ "format": "date-time",
19
+ "examples": ["2023-07-27T20:30:00.000Z"],
20
+ "description": "The date the representation was submitted"
21
+ },
22
+ "representationType": {
23
+ "type": "string",
24
+ "enum": ["statement", "comment", "final_comment", "proofs_evidence", null],
25
+ "description": "The type of representation"
26
+ },
27
+ "representation": {
28
+ "type": ["string", "null"],
29
+ "description": "The original representation"
30
+ },
31
+ "documents": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "additionalProperties": true,
36
+ "properties": {
37
+ "documentId": {
38
+ "type": "string",
39
+ "examples": ["4547fec8-16b2-47bb-836d-4d0baac04079"],
40
+ "description": "The unique identifier for the document"
41
+ },
42
+ "filename": {
43
+ "type": "string",
44
+ "examples": ["filename.pdf"],
45
+ "description": "Current stored name of the document"
46
+ },
47
+ "originalFilename": {
48
+ "type": "string",
49
+ "examples": ["original_filename.pdf"],
50
+ "description": "Original name of document"
51
+ },
52
+ "size": {
53
+ "type": "integer",
54
+ "examples": [23452],
55
+ "description": "The file size, in bytes"
56
+ },
57
+ "mime": {
58
+ "type": ["string"],
59
+ "examples": ["application/pdf"],
60
+ "description": "The mime type for the current version of the file"
61
+ },
62
+ "documentURI": {
63
+ "type": "string",
64
+ "examples": [
65
+ "https://custom-domain.gov.uk/container-name/appeal/7002471/4547fec8-16b2-47bb-836d-4d0baac04079/v1/filename.pdf"
66
+ ],
67
+ "description": "The internal location of the document",
68
+ "$comment": "This property contains blob storage info (domain, container), caseReference, version and filename"
69
+ },
70
+ "dateCreated": {
71
+ "type": "string",
72
+ "format": "date-time",
73
+ "examples": ["2023-07-27T20:30:00.000Z"],
74
+ "description": "The creation date for the document"
75
+ },
76
+ "documentType": {
77
+ "type": ["string", "null"],
78
+ "enum": [
79
+ "interestedPartyComment",
80
+ "lpaStatement",
81
+ "rule6Statement",
82
+ "appellantFinalComment",
83
+ "lpaFinalComment",
84
+ "appellantProofOfEvidence",
85
+ "appellantWitnessesEvidence",
86
+ "lpaProofOfEvidence",
87
+ "lpaWitnessesEvidence",
88
+ "rule6ProofOfEvidence",
89
+ "rule6WitnessesEvidence",
90
+ null
91
+ ],
92
+ "description": "The type of document, used for exchange, migrations and consumption from the appeal back-office system"
93
+ }
94
+ },
95
+ "required": [
96
+ "documentId",
97
+ "filename",
98
+ "originalFilename",
99
+ "size",
100
+ "mime",
101
+ "documentURI",
102
+ "dateCreated",
103
+ "documentType"
104
+ ]
105
+ }
106
+ },
107
+ "serviceUserId": {
108
+ "type": ["string", "null"],
109
+ "description": "Service User Id of the person or organisation making the representation"
110
+ },
111
+ "lpaCode": {
112
+ "type": ["string", "null"],
113
+ "examples": ["Q9999"],
114
+ "description": "A unique identifier for the Local Planning Authority",
115
+ "$comment": "Uses the internal PINS code identifying LPAs"
116
+ },
117
+ "newUser": {
118
+ "type": "object",
119
+ "additionalProperties": true,
120
+ "required": [
121
+ "salutation",
122
+ "firstName",
123
+ "lastName",
124
+ "emailAddress",
125
+ "telephoneNumber",
126
+ "organisation",
127
+ "serviceUserType"
128
+ ],
129
+ "properties": {
130
+ "salutation": {
131
+ "type": ["string", "null"],
132
+ "description": "A formal greeting, e.g., Mr, Mrs, Ms.",
133
+ "examples": ["Mr"]
134
+ },
135
+ "firstName": {
136
+ "type": ["string", "null"],
137
+ "description": "The first name of the individual.",
138
+ "examples": ["John"]
139
+ },
140
+ "lastName": {
141
+ "type": ["string", "null"],
142
+ "description": "The last name of the individual.",
143
+ "examples": ["Doe"]
144
+ },
145
+ "emailAddress": {
146
+ "type": ["string", "null"],
147
+ "description": "The primary email address for contact.",
148
+ "examples": ["john.doe@example.com"]
149
+ },
150
+ "telephoneNumber": {
151
+ "type": ["string", "null"],
152
+ "description": "The primary telephone contact number.",
153
+ "examples": ["+447123456789"]
154
+ },
155
+ "organisation": {
156
+ "type": ["string", "null"],
157
+ "description": "The name of the organisation associated with the individual.",
158
+ "examples": ["Tech Corp"]
159
+ },
160
+ "serviceUserType": {
161
+ "type": "string",
162
+ "description": "Type or category of the service user.",
163
+ "enum": ["InterestedParty"]
164
+ },
165
+ "addressLine1": {
166
+ "type": "string",
167
+ "examples": ["96 The Avenue"],
168
+ "description": "First line of address of the user making the representation"
169
+ },
170
+ "addressLine2": {
171
+ "type": ["string", "null"],
172
+ "description": "Second line of address of the user making the representation"
173
+ },
174
+ "addressTown": {
175
+ "type": "string",
176
+ "examples": ["Maidstone"],
177
+ "description": "Town / City of the user making the representation"
178
+ },
179
+ "addressCounty": {
180
+ "type": ["string", "null"],
181
+ "examples": ["Kent"],
182
+ "description": "County of the user making the representation"
183
+ },
184
+ "addressPostcode": {
185
+ "type": "string",
186
+ "examples": ["MD21 5XY"],
187
+ "description": "Postal code of the user making the representation"
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
@@ -0,0 +1,100 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "commands/appeal-s78-submission.schema.json",
4
+ "title": "Appellant s78 submission properties",
5
+ "description": "Schema defining any S78 specific properties for questionnaire submissions",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "agriculturalHolding",
10
+ "tenantAgriculturalHolding",
11
+ "otherTenantsAgriculturalHolding",
12
+ "informedTenantsAgriculturalHolding",
13
+ "appellantProcedurePreference",
14
+ "appellantProcedurePreferenceDetails",
15
+ "appellantProcedurePreferenceDuration",
16
+ "appellantProcedurePreferenceWitnessCount",
17
+ "planningObligation",
18
+ "statusPlanningObligation",
19
+ "developmentType"
20
+ ],
21
+ "allOf": [
22
+ { "$ref": "appeal-has-submission.schema.json" },
23
+ {
24
+ "properties": {
25
+ "agriculturalHolding": {
26
+ "type": ["boolean", "null"],
27
+ "description": "Indicates if the site is an agricultural holding",
28
+ "$comment": "Only available in S78 cases"
29
+ },
30
+ "tenantAgriculturalHolding": {
31
+ "type": ["boolean", "null"],
32
+ "description": "Indicates if the site is a tenant agricultural holding",
33
+ "$comment": "Only available in S78 cases"
34
+ },
35
+ "otherTenantsAgriculturalHolding": {
36
+ "type": ["boolean", "null"],
37
+ "description": "Indicates if the site is an agricultural holding with other tenants",
38
+ "$comment": "Only available in S78 cases"
39
+ },
40
+ "informedTenantsAgriculturalHolding": {
41
+ "type": ["boolean", "null"],
42
+ "description": "If the site is an agricultural holding, indicates tenants are informed",
43
+ "$comment": "Only available in S78 cases"
44
+ },
45
+ "appellantProcedurePreference": {
46
+ "type": ["string", "null"],
47
+ "enum": ["written", "hearing", "inquiry", null],
48
+ "description": "The procedure preference indicated by the appellant",
49
+ "$comment": "Only available in S78 cases"
50
+ },
51
+ "appellantProcedurePreferenceDetails": {
52
+ "type": ["string", "null"],
53
+ "description": "The procedure details preference indicated by the appellant",
54
+ "$comment": "Only available in S78 cases"
55
+ },
56
+ "appellantProcedurePreferenceDuration": {
57
+ "type": ["number", "null"],
58
+ "description": "The duration of the procedure indicated by the appellant",
59
+ "$comment": "Only available in S78 cases"
60
+ },
61
+ "appellantProcedurePreferenceWitnessCount": {
62
+ "type": ["number", "null"],
63
+ "description": "The number of witnesses in inquiries",
64
+ "$comment": "Only available in S78 cases"
65
+ },
66
+ "planningObligation": {
67
+ "type": ["boolean", "null"],
68
+ "description": "Indicates the existence of a planning obligation",
69
+ "$comment": "Only available in S78 cases"
70
+ },
71
+ "statusPlanningObligation": {
72
+ "type": ["string", "null"],
73
+ "description": "The planning obligation information, if available",
74
+ "$comment": "Only available in S78 cases"
75
+ },
76
+ "developmentType": {
77
+ "type": ["string", "null"],
78
+ "enum": [
79
+ "householder",
80
+ "change-of-use",
81
+ "major-dwellings",
82
+ "major-industry-storage",
83
+ "major-offices",
84
+ "major-retail-services",
85
+ "major-traveller-caravan",
86
+ "mineral-workings",
87
+ "minor-dwellings",
88
+ "minor-industry-storage",
89
+ "minor-offices",
90
+ "minor-retail-services",
91
+ "minor-traveller-caravan",
92
+ "other-major",
93
+ "other-minor",
94
+ null
95
+ ]
96
+ }
97
+ }
98
+ }
99
+ ]
100
+ }