@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,53 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: pins-inspector.schema.json
3
+ # timestamp: 2025-07-16T14:06:09+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from pydantic import BaseModel, ConfigDict
8
+
9
+
10
+ class PinsInspector(BaseModel):
11
+ """
12
+ Inspector attributes as per Horizon. This will be extended with SAP/Entra data
13
+ """
14
+
15
+ model_config = ConfigDict(
16
+ extra="allow",
17
+ )
18
+ horizonId: str
19
+ """
20
+ The PINS-generated unique horizon ID
21
+ """
22
+ firstName: str
23
+ """
24
+ The first name of the inspector
25
+ """
26
+ lastName: str
27
+ """
28
+ The last name of the inspector
29
+ """
30
+ postName: str | None = None
31
+ """
32
+ The post name of the inspector
33
+ """
34
+ organisationName: str | None = None
35
+ """
36
+ The organisation name of the inspector
37
+ """
38
+ title: str | None = None
39
+ """
40
+ The title of the inspector
41
+ """
42
+ salutation: str | None = None
43
+ """
44
+ The salutation of the inspector
45
+ """
46
+ qualifications: str | None = None
47
+ """
48
+ The qualifications of the inspector
49
+ """
50
+ email: str | None = None
51
+ """
52
+ The email address of the inspector
53
+ """
@@ -0,0 +1,69 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: pins-lpa.schema.json
3
+ # timestamp: 2025-07-16T14:06:10+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from pydantic import BaseModel, ConfigDict
8
+
9
+
10
+ class PinsLpa(BaseModel):
11
+ """
12
+ Local Planning Authority (LPA) attributes as per Horizon. This will be extended with ONS data
13
+ """
14
+
15
+ model_config = ConfigDict(
16
+ extra="allow",
17
+ )
18
+ lpaName: str
19
+ """
20
+ The PINS name of the LPA
21
+ """
22
+ organisationType: str | None = None
23
+ """
24
+ The organisation type of the LPA
25
+ """
26
+ pinsLpaCode: str
27
+ """
28
+ The PINS-generated unqiue LPA code
29
+ """
30
+ poBox: str | None = None
31
+ """
32
+ LPA address Post Office Box
33
+ """
34
+ address1: str | None = None
35
+ """
36
+ First line of LPA address
37
+ """
38
+ address2: str | None = None
39
+ """
40
+ Second line of LPA address
41
+ """
42
+ city: str | None = None
43
+ """
44
+ LPA address city or town
45
+ """
46
+ county: str | None = None
47
+ """
48
+ LPA address county
49
+ """
50
+ postcode: str | None = None
51
+ """
52
+ LPA address postcode
53
+ """
54
+ country: str | None = None
55
+ """
56
+ LPA address country
57
+ """
58
+ telephoneNumber: str | None = None
59
+ """
60
+ LPA telephine number
61
+ """
62
+ fax: str | None = None
63
+ """
64
+ LPA fax number
65
+ """
66
+ emailAddress: str | None = None
67
+ """
68
+ LPA email address
69
+ """
@@ -0,0 +1,109 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: s51-advice.schema.json
3
+ # timestamp: 2025-07-16T14:06:09+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+
9
+ from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
10
+
11
+
12
+ class Method(Enum):
13
+ """
14
+ How the enquiry was made
15
+ """
16
+
17
+ phone = "phone"
18
+ email = "email"
19
+ meeting = "meeting"
20
+ post = "post"
21
+ fax = "fax"
22
+ NoneType_None = None
23
+
24
+
25
+ class Status(Enum):
26
+ checked = "checked"
27
+ unchecked = "unchecked"
28
+ readytopublish = "readytopublish"
29
+ published = "published"
30
+ donotpublish = "donotpublish"
31
+ NoneType_None = None
32
+
33
+
34
+ class RedactionStatus(Enum):
35
+ unredacted = "unredacted"
36
+ redacted = "redacted"
37
+ NoneType_None = None
38
+
39
+
40
+ class S51Advice(BaseModel):
41
+ """
42
+ Section 51 Advice schema
43
+ """
44
+
45
+ model_config = ConfigDict(
46
+ extra="allow",
47
+ )
48
+ adviceId: int = Field(..., examples=[1234])
49
+ adviceReference: str = Field(..., examples=["TR0200007-0005"])
50
+ caseId: int | None = Field(..., examples=[1234])
51
+ caseReference: str | None = Field(..., examples=["BC0110002"])
52
+ title: str = Field(
53
+ ...,
54
+ examples=[
55
+ "Advice following issue of decision to accept the application for examination"
56
+ ],
57
+ )
58
+ """
59
+ Title of the advice
60
+ """
61
+ titleWelsh: str | None = None
62
+ """
63
+ Title of the advice in Welsh
64
+ """
65
+ from_: str | None = Field(..., alias="from")
66
+ """
67
+ Who the enquiry is from
68
+ """
69
+ agent: str | None = None
70
+ """
71
+ Who the enquiry is on behalf of
72
+ """
73
+ method: Method
74
+ """
75
+ How the enquiry was made
76
+ """
77
+ enquiryDate: AwareDatetime | None = Field(
78
+ ..., examples=["2023-07-27T20:30:00.000Z"]
79
+ )
80
+ """
81
+ Date the enquiry was made
82
+ """
83
+ enquiryDetails: str | None = None
84
+ """
85
+ Details of the enquiry
86
+ """
87
+ enquiryDetailsWelsh: str | None = None
88
+ """
89
+ Details of the enquiry in Welsh
90
+ """
91
+ adviceGivenBy: str | None = None
92
+ """
93
+ Who issued the advice
94
+ """
95
+ adviceDate: AwareDatetime | None = Field(..., examples=["2023-07-27T20:30:00.000Z"])
96
+ """
97
+ Date the advice was given
98
+ """
99
+ adviceDetails: str | None = None
100
+ """
101
+ Details of the advice
102
+ """
103
+ adviceDetailsWelsh: str | None = None
104
+ """
105
+ Details of the advice in Welsh
106
+ """
107
+ status: Status
108
+ redactionStatus: RedactionStatus
109
+ attachmentIds: list[str]
@@ -0,0 +1,121 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: service-user.schema.json
3
+ # timestamp: 2025-07-16T14:06:10+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+
9
+ from pydantic import BaseModel, ConfigDict, Field
10
+
11
+
12
+ class ServiceUserType(Enum):
13
+ """
14
+ Type or category of the service user.
15
+ """
16
+
17
+ Applicant = "Applicant"
18
+ Appellant = "Appellant"
19
+ Agent = "Agent"
20
+ Rule6Party = "Rule6Party"
21
+ InterestedParty = "InterestedParty"
22
+ RepresentationContact = "RepresentationContact"
23
+ Subscriber = "Subscriber"
24
+
25
+
26
+ class ServiceUser(BaseModel):
27
+ """
28
+ Service User of the planning inspectorate. Also contains role information by combining serviceUserType and caseReference.
29
+ """
30
+
31
+ model_config = ConfigDict(
32
+ extra="allow",
33
+ )
34
+ id: str = Field(..., examples=["12345"])
35
+ """
36
+ A unique identifier for the entity.
37
+ """
38
+ salutation: str | None = Field(..., examples=["Mr"])
39
+ """
40
+ A formal greeting, e.g., Mr, Mrs, Ms.
41
+ """
42
+ firstName: str | None = Field(..., examples=["John"])
43
+ """
44
+ The first name of the individual.
45
+ """
46
+ lastName: str | None = Field(..., examples=["Doe"])
47
+ """
48
+ The last name of the individual.
49
+ """
50
+ addressLine1: str | None = Field(..., examples=["123 Elm Street"])
51
+ """
52
+ The first line of the address.
53
+ """
54
+ addressLine2: str | None = Field(..., examples=["Apt 4B"])
55
+ """
56
+ The second line of the address, usually includes suite or apartment number.
57
+ """
58
+ addressTown: str | None = Field(..., examples=["Springfield"])
59
+ """
60
+ The town or city of the address.
61
+ """
62
+ addressCounty: str | None = Field(..., examples=["Hampshire"])
63
+ """
64
+ The county in which the town or city is located.
65
+ """
66
+ postcode: str | None = Field(..., examples=["M12 4AF"])
67
+ """
68
+ The postal code for the address.
69
+ """
70
+ addressCountry: str | None = Field(..., examples=["United Kingdom"])
71
+ """
72
+ The country of the address.
73
+ """
74
+ organisation: str | None = Field(..., examples=["Tech Corp"])
75
+ """
76
+ The name of the organisation associated with the individual.
77
+ """
78
+ organisationType: str | None = Field(..., examples=["Private Company"])
79
+ """
80
+ The type or nature of the organisation.
81
+ """
82
+ role: str | None = Field(..., examples=["Agent"])
83
+ """
84
+ The individual's role or position within the organisation.
85
+ """
86
+ telephoneNumber: str | None = Field(..., examples=["+447123456789"])
87
+ """
88
+ The primary telephone contact number.
89
+ """
90
+ otherPhoneNumber: str | None = Field(..., examples=["+447123456789"])
91
+ """
92
+ An alternate or secondary phone number.
93
+ """
94
+ faxNumber: str | None = Field(..., examples=["+447123456789"])
95
+ """
96
+ A fax contact number.
97
+ """
98
+ emailAddress: str | None = Field(..., examples=["john.doe@example.com"])
99
+ """
100
+ The primary email address for contact.
101
+ """
102
+ webAddress: str | None = Field(..., examples=["https://www.example.com"])
103
+ """
104
+ Website address or URL.
105
+ """
106
+ serviceUserType: ServiceUserType
107
+ """
108
+ Type or category of the service user.
109
+ """
110
+ caseReference: str = Field(..., examples=["BC0510001"])
111
+ """
112
+ Reference number for a particular case or incident.
113
+ """
114
+ sourceSystem: str = Field(..., examples=["ODT", "Horizon"])
115
+ """
116
+ The originating system from where the data was sourced.
117
+ """
118
+ sourceSuid: str = Field(..., examples=["12345"])
119
+ """
120
+ Unique identifier from the source system.
121
+ """
@@ -0,0 +1,2 @@
1
+ datamodel-code-generator==0.25.2
2
+ jsonc-parser==1.1.0
File without changes
@@ -0,0 +1,250 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "appeal-document.schema.json",
4
+ "title": "Appeal Document",
5
+ "description": "Schema defining the metadata for appeal documents",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "documentId",
10
+ "caseId",
11
+ "caseReference",
12
+ "version",
13
+ "filename",
14
+ "originalFilename",
15
+ "size",
16
+ "mime",
17
+ "documentURI",
18
+ "publishedDocumentURI",
19
+ "virusCheckStatus",
20
+ "fileMD5",
21
+ "dateCreated",
22
+ "dateReceived",
23
+ "datePublished",
24
+ "lastModified",
25
+ "caseType",
26
+ "redactedStatus",
27
+ "documentType",
28
+ "sourceSystem",
29
+ "origin",
30
+ "owner",
31
+ "author",
32
+ "description",
33
+ "caseStage",
34
+ "horizonFolderId"
35
+ ],
36
+ "properties": {
37
+ "documentId": {
38
+ "type": "string",
39
+ "examples": ["4547fec8-16b2-47bb-836d-4d0baac04079"],
40
+ "description": "The unique identifier for the document"
41
+ },
42
+ "caseId": {
43
+ "type": ["integer", "null"],
44
+ "examples": [1200],
45
+ "description": "Internal case identifier"
46
+ },
47
+ "caseReference": {
48
+ "type": "string",
49
+ "examples": ["7002471"],
50
+ "description": "External case identifier"
51
+ },
52
+ "version": {
53
+ "type": "integer",
54
+ "examples": [1],
55
+ "description": "A document can have multiple versions, and this indicates the latest version"
56
+ },
57
+ "filename": {
58
+ "type": "string",
59
+ "examples": ["filename.pdf"],
60
+ "description": "Current stored name of the document"
61
+ },
62
+ "originalFilename": {
63
+ "type": "string",
64
+ "examples": ["original_filename.pdf"],
65
+ "description": "Original name of document"
66
+ },
67
+ "size": {
68
+ "type": "integer",
69
+ "examples": [23452],
70
+ "description": "The file size, in bytes"
71
+ },
72
+ "mime": {
73
+ "type": ["string"],
74
+ "examples": ["application/pdf"],
75
+ "description": "The mime type for the current version of the file"
76
+ },
77
+ "documentURI": {
78
+ "type": "string",
79
+ "examples": [
80
+ "https://custom-domain.gov.uk/container-name/appeal/7002471/4547fec8-16b2-47bb-836d-4d0baac04079/v1/filename.pdf"
81
+ ],
82
+ "description": "The internal location of the document",
83
+ "$comment": "This property contains blob storage info (domain, container), caseReference, version and filename"
84
+ },
85
+ "publishedDocumentURI": {
86
+ "type": ["string", "null"],
87
+ "examples": [
88
+ "https://custom-domain.gov.uk/container-name/appeal/7002471/4547fec8-16b2-47bb-836d-4d0baac04079/v1/filename.pdf"
89
+ ],
90
+ "description": "The location of the published document, will be null if the datePublished is not set"
91
+ },
92
+ "virusCheckStatus": {
93
+ "type": ["string", "null"],
94
+ "enum": ["not_scanned", "scanned", "affected", null],
95
+ "description": "Indicates the virus check status for the current document"
96
+ },
97
+ "fileMD5": {
98
+ "type": ["string", "null"],
99
+ "examples": ["b1946ac92492d2347c6235b4d2611184"],
100
+ "description": "A MD5 hash to check the validity of the file"
101
+ },
102
+ "dateCreated": {
103
+ "type": "string",
104
+ "format": "date-time",
105
+ "examples": ["2023-07-27T20:30:00.000Z"],
106
+ "description": "The creation date for the document"
107
+ },
108
+ "dateReceived": {
109
+ "type": ["string", "null"],
110
+ "format": "date-time",
111
+ "examples": ["2023-07-27T20:30:00.000Z"],
112
+ "description": "The date the document was received",
113
+ "$comment": "This is a manually entered date to indicate documents exchanged manually"
114
+ },
115
+ "datePublished": {
116
+ "type": ["string", "null"],
117
+ "format": "date-time",
118
+ "examples": ["2023-07-27T20:30:00.000Z"],
119
+ "description": "The date the document was published"
120
+ },
121
+ "lastModified": {
122
+ "type": ["string", "null"],
123
+ "format": "date-time",
124
+ "examples": ["2023-07-27T20:30:00.000Z"],
125
+ "description": "The last update date for the document"
126
+ },
127
+ "caseType": {
128
+ "type": ["string", "null"],
129
+ "enum": ["C", "D", "F", "G", "H", "L", "Q", "S", "V", "W", "X", "Y", "Z", "ZA", "ZP", null],
130
+ "description": "The internal code for an appeal type, e.g. Householder (D)"
131
+ },
132
+ "redactedStatus": {
133
+ "type": ["string", "null"],
134
+ "enum": ["not_redacted", "redacted", "no_redaction_required", null],
135
+ "description": "Indicates the redaction status for the document"
136
+ },
137
+ "documentType": {
138
+ "type": ["string", "null"],
139
+ "enum": [
140
+ "appellantCaseCorrespondence",
141
+ "appellantCaseWithdrawalLetter",
142
+ "appellantCostsApplication",
143
+ "appellantCostsCorrespondence",
144
+ "appellantCostsWithdrawal",
145
+ "appellantStatement",
146
+ "applicationDecisionLetter",
147
+ "changedDescription",
148
+ "originalApplicationForm",
149
+ "whoNotified",
150
+ "whoNotifiedSiteNotice",
151
+ "whoNotifiedLetterToNeighbours",
152
+ "whoNotifiedPressAdvert",
153
+ "conservationMap",
154
+ "lpaCaseCorrespondence",
155
+ "lpaCostsApplication",
156
+ "lpaCostsCorrespondence",
157
+ "lpaCostsWithdrawal",
158
+ "otherPartyRepresentations",
159
+ "planningOfficerReport",
160
+ "appellantCostsDecisionLetter",
161
+ "lpaCostsDecisionLetter",
162
+ "caseDecisionLetter",
163
+ "crossTeamCorrespondence",
164
+ "inspectorCorrespondence",
165
+ "mainPartyCorrespondence",
166
+ "uncategorised",
167
+ "designAccessStatement",
168
+ "plansDrawings",
169
+ "newPlansDrawings",
170
+ "planningObligation",
171
+ "ownershipCertificate",
172
+ "otherNewDocuments",
173
+ "statementCommonGround",
174
+ "communityInfrastructureLevy",
175
+ "supplementaryPlanning",
176
+ "otherRelevantPolicies",
177
+ "emergingPlan",
178
+ "developmentPlanPolicies",
179
+ "consultationResponses",
180
+ "eiaEnvironmentalStatement",
181
+ "eiaScreeningDirection",
182
+ "eiaScreeningOpinion",
183
+ "eiaScopingOpinion",
184
+ "definitiveMapStatement",
185
+ "treePreservationPlan",
186
+ "interestedPartyComment",
187
+ "lpaStatement",
188
+ "rule6Statement",
189
+ "appellantFinalComment",
190
+ "lpaFinalComment",
191
+ "appellantProofOfEvidence",
192
+ "appellantWitnessesEvidence",
193
+ "lpaProofOfEvidence",
194
+ "lpaWitnessesEvidence",
195
+ "rule6ProofOfEvidence",
196
+ "rule6WitnessesEvidence",
197
+ "environmentalAssessment",
198
+ "appealNotification",
199
+ "historicEnglandConsultation",
200
+ null
201
+ ],
202
+ "description": "The type of document, used for exchange, migrations and consumption from the appeal back-office system"
203
+ },
204
+ "sourceSystem": {
205
+ "type": ["string", "null"],
206
+ "enum": ["back-office-appeals", "horizon", "acp", "sharepoint", null],
207
+ "description": "The system mastering the metadata for the current document"
208
+ },
209
+ "origin": {
210
+ "type": ["string", "null"],
211
+ "enum": ["pins", "citizen", "lpa", "ogd", null],
212
+ "description": "Indicates where the documents originates from"
213
+ },
214
+ "owner": {
215
+ "type": ["string", "null"],
216
+ "description": "Owner of the current document"
217
+ },
218
+ "author": {
219
+ "type": ["string", "null"],
220
+ "description": "Name of person who authored document"
221
+ },
222
+ "description": {
223
+ "type": ["string", "null"],
224
+ "description": "A custom description for the document"
225
+ },
226
+ "caseStage": {
227
+ "type": ["string", "null"],
228
+ "enum": [
229
+ "appellant-case",
230
+ "lpa-questionnaire",
231
+ "statements",
232
+ "third-party-comments",
233
+ "evidence",
234
+ "witnesses",
235
+ "final-comments",
236
+ "appeal-decision",
237
+ "costs",
238
+ "internal",
239
+ null
240
+ ],
241
+ "description": "The stage in the appeal process that has created the document",
242
+ "$comment": "This could be useful to reduce the number of document types, allowing the same type to be reused across stages"
243
+ },
244
+ "horizonFolderId": {
245
+ "type": ["string", "null"],
246
+ "description": "The folder ID containing the document in Horizon",
247
+ "$comment": "Used for legacy / migrations"
248
+ }
249
+ }
250
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "appeal-event-estimate.schema.json",
4
+ "title": "Appeal Event Estimate",
5
+ "description": "All event estimates belong to a case. A case has only one event estimate.",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["id", "caseReference", "preparationTime", "sittingTime", "reportingTime"],
9
+ "properties": {
10
+ "id": {
11
+ "type": "integer",
12
+ "description": "The unique identifier within the Back Office."
13
+ },
14
+ "caseReference": {
15
+ "type": "string",
16
+ "description": "The case reference the event estimate belongs to."
17
+ },
18
+ "preparationTime": {
19
+ "type": ["number", "null"],
20
+ "description": "Estimated inspector time (days) to prepare for event."
21
+ },
22
+ "sittingTime": {
23
+ "type": ["number", "null"],
24
+ "description": "Estimated inspector time (days) for event."
25
+ },
26
+ "reportingTime": {
27
+ "type": ["number", "null"],
28
+ "description": "Estimated inspector time (days) for event reporting."
29
+ }
30
+ }
31
+ }