@planning-inspectorate/data-model 1.21.0 → 2.0.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.
- package/.azure/ci.yml +1 -1
- package/.azure/release.yml +1 -1
- package/.releaserc +14 -0
- package/docs/README.md +4 -0
- package/docs/appeal-has.md +30 -49
- package/docs/appeal-s78.md +241 -144
- package/package.json +2 -1
- package/pins_data_model/models/model_appeal_has.py +72 -27
- package/pins_data_model/models/model_appeal_s78.py +95 -8
- package/schemas/appeal-has.schema.json +52 -21
- package/schemas/appeal-s78.schema.json +62 -7
- package/schemas/commands/appeals-components/appeal-advert.submission.schema.json +53 -0
- package/schemas/commands/{appeal-common-submission.schema.json → appeals-components/appeal-common-submission.schema.json} +8 -8
- package/schemas/commands/{appeal-has-submission.schema.json → appeals-components/appeal-has-submission.schema.json} +2 -2
- package/schemas/commands/{appeal-s78-submission.schema.json → appeals-components/appeal-s78-submission.schema.json} +2 -2
- package/schemas/commands/appeals-components/appellant-procedure-preference.schema.json +37 -0
- package/schemas/commands/appeals-components/changed-listed-building-number.schema.json +23 -0
- package/schemas/commands/appeals-components/lpa-procedure-preference.schema.json +28 -0
- package/schemas/commands/{lpa-questionnaire-cas-advert.schema.json → appeals-components/lpa-questionnaire-advert.schema.json} +8 -33
- package/schemas/commands/{lpa-questionnaire-common.schema.json → appeals-components/lpa-questionnaire-common.schema.json} +1 -1
- package/schemas/commands/{lpa-questionnaire-has.schema.json → appeals-components/lpa-questionnaire-has.schema.json} +1 -1
- package/schemas/commands/{lpa-questionnaire-s78.schema.json → appeals-components/lpa-questionnaire-s78.schema.json} +2 -21
- package/schemas/commands/appellant-submission.schema.json +21 -10
- package/schemas/commands/lpa-questionnaire.schema.json +24 -10
- package/src/index.cjs +6 -2
- package/src/index.d.ts +4 -0
- package/src/index.js +5 -2
- package/src/schemas.d.ts +326 -803
- package/tests/appeals/appeal-has.test.js +30 -5
- package/tests/appeals/appeal-s78.test.js +17 -3
- package/tests/appeals/commands/adverts-questionnaire.test.js +1 -0
- package/tests/appeals/commands/adverts-submission.test.js +13 -13
- package/tests/appeals/commands/cas-adverts-submission.test.js +184 -0
- package/tests/appeals/commands/has-submission.test.js +2 -2
- package/tests/appeals/commands/s78-submission.test.js +2 -2
- package/schemas/commands/appeal-advert.submission.schema.json +0 -23
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "commands/appeal-s78-submission.schema.json",
|
|
3
|
+
"$id": "commands/appeals-components/appeal-s78-submission.schema.json",
|
|
4
4
|
"title": "Appellant s78 submission properties",
|
|
5
|
-
"description": "Schema defining any S78 specific properties for
|
|
5
|
+
"description": "Schema defining any S78 specific properties for appeal submissions",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": true,
|
|
8
8
|
"required": [
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "commands/appeals-components/appellant-procedure-preference.schema.json",
|
|
4
|
+
"title": "Appellant procedure preference properties",
|
|
5
|
+
"description": "Schema defining appellant procedure preference properties",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": [
|
|
9
|
+
"appellantProcedurePreference",
|
|
10
|
+
"appellantProcedurePreferenceDetails",
|
|
11
|
+
"appellantProcedurePreferenceDuration",
|
|
12
|
+
"appellantProcedurePreferenceWitnessCount"
|
|
13
|
+
],
|
|
14
|
+
"allOf": [
|
|
15
|
+
{
|
|
16
|
+
"properties": {
|
|
17
|
+
"appellantProcedurePreference": {
|
|
18
|
+
"type": ["string", "null"],
|
|
19
|
+
"enum": ["written", "hearing", "inquiry", null],
|
|
20
|
+
"description": "The procedure preference indicated by the appellant"
|
|
21
|
+
},
|
|
22
|
+
"appellantProcedurePreferenceDetails": {
|
|
23
|
+
"type": ["string", "null"],
|
|
24
|
+
"description": "The procedure details preference indicated by the appellant"
|
|
25
|
+
},
|
|
26
|
+
"appellantProcedurePreferenceDuration": {
|
|
27
|
+
"type": ["number", "null"],
|
|
28
|
+
"description": "The duration of the procedure indicated by the appellant"
|
|
29
|
+
},
|
|
30
|
+
"appellantProcedurePreferenceWitnessCount": {
|
|
31
|
+
"type": ["number", "null"],
|
|
32
|
+
"description": "The number of witnesses in inquiries"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "commands/appeals-components/changed-listed-building-number.schema.json",
|
|
4
|
+
"title": "changed-listed-building-numbers properties",
|
|
5
|
+
"description": "Schema defining changed-listed-building-numbers",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": ["changedListedBuildingNumbers"],
|
|
9
|
+
"allOf": [
|
|
10
|
+
{
|
|
11
|
+
"properties": {
|
|
12
|
+
"changedListedBuildingNumbers": {
|
|
13
|
+
"type": ["array", "null"],
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"examples": ["10023", "17824"]
|
|
17
|
+
},
|
|
18
|
+
"description": "A list of changed listed building IDs from Historic England"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "commands/appeals-components/lpa-procedure-preference.schema.json",
|
|
4
|
+
"title": "LPA procedure preference properties",
|
|
5
|
+
"description": "Schema defining LPA procedure preference properties",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": ["lpaProcedurePreference", "lpaProcedurePreferenceDetails", "lpaProcedurePreferenceDuration"],
|
|
9
|
+
"allOf": [
|
|
10
|
+
{
|
|
11
|
+
"properties": {
|
|
12
|
+
"lpaProcedurePreference": {
|
|
13
|
+
"type": ["string", "null"],
|
|
14
|
+
"enum": ["written", "hearing", "inquiry", null],
|
|
15
|
+
"description": "The procedure preference indicated by the LPA"
|
|
16
|
+
},
|
|
17
|
+
"lpaProcedurePreferenceDetails": {
|
|
18
|
+
"type": ["string", "null"],
|
|
19
|
+
"description": "The procedure details preference indicated by the LPA"
|
|
20
|
+
},
|
|
21
|
+
"lpaProcedurePreferenceDuration": {
|
|
22
|
+
"type": ["number", "null"],
|
|
23
|
+
"description": "The duration of enquiry indicated by the LPA"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "commands/lpa-questionnaire-
|
|
3
|
+
"$id": "commands/appeals-components/lpa-questionnaire-advert.schema.json",
|
|
4
4
|
"title": "LPAQ cas advert submission properties",
|
|
5
|
-
"description": "Schema defining any
|
|
5
|
+
"description": "Schema defining any advert specific properties for LPAQ submissions",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": true,
|
|
8
8
|
"required": [
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
"hasStatutoryConsultees",
|
|
14
14
|
"consultedBodiesDetails",
|
|
15
15
|
"hasEmergingPlan",
|
|
16
|
-
"lpaProcedurePreference",
|
|
17
|
-
"lpaProcedurePreferenceDetails",
|
|
18
|
-
"lpaProcedurePreferenceDuration",
|
|
19
16
|
"isSiteInAreaOfSpecialControlAdverts",
|
|
20
17
|
"wasApplicationRefusedDueToHighwayOrTraffic",
|
|
21
18
|
"didAppellantSubmitCompletePhotosAndPlans"
|
|
@@ -25,18 +22,15 @@
|
|
|
25
22
|
"properties": {
|
|
26
23
|
"affectsScheduledMonument": {
|
|
27
24
|
"type": ["boolean", "null"],
|
|
28
|
-
"description": "Indicates that a scheduled monument is affected"
|
|
29
|
-
"$comment": "Only available in S78 cases"
|
|
25
|
+
"description": "Indicates that a scheduled monument is affected"
|
|
30
26
|
},
|
|
31
27
|
"hasProtectedSpecies": {
|
|
32
28
|
"type": ["boolean", "null"],
|
|
33
|
-
"description": "Indicates the existence of protected species"
|
|
34
|
-
"$comment": "Only available in S78 cases"
|
|
29
|
+
"description": "Indicates the existence of protected species"
|
|
35
30
|
},
|
|
36
31
|
"isAonbNationalLandscape": {
|
|
37
32
|
"type": ["boolean", "null"],
|
|
38
|
-
"description": "Indicates an area of outstanding beauty (National Landscape)"
|
|
39
|
-
"$comment": "Only available in S78 cases"
|
|
33
|
+
"description": "Indicates an area of outstanding beauty (National Landscape)"
|
|
40
34
|
},
|
|
41
35
|
"designatedSitesNames": {
|
|
42
36
|
"type": ["array", "null"],
|
|
@@ -44,13 +38,11 @@
|
|
|
44
38
|
"type": "string",
|
|
45
39
|
"examples": ["SSSI", "cSAC", "SAC", "pSPA", "SPA", "user entered value"]
|
|
46
40
|
},
|
|
47
|
-
"description": "The designated site names"
|
|
48
|
-
"$comment": "Only available in S78 cases"
|
|
41
|
+
"description": "The designated site names"
|
|
49
42
|
},
|
|
50
43
|
"hasStatutoryConsultees": {
|
|
51
44
|
"type": ["boolean", "null"],
|
|
52
|
-
"description": "Indicates statutory consultees"
|
|
53
|
-
"$comment": "Only available in S78 cases"
|
|
45
|
+
"description": "Indicates statutory consultees"
|
|
54
46
|
},
|
|
55
47
|
"consultedBodiesDetails": {
|
|
56
48
|
"type": ["string", "null"],
|
|
@@ -58,24 +50,7 @@
|
|
|
58
50
|
},
|
|
59
51
|
"hasEmergingPlan": {
|
|
60
52
|
"type": ["boolean", "null"],
|
|
61
|
-
"description": "Indicates emerging plans"
|
|
62
|
-
"$comment": "Only available in S78 cases"
|
|
63
|
-
},
|
|
64
|
-
"lpaProcedurePreference": {
|
|
65
|
-
"type": ["string", "null"],
|
|
66
|
-
"enum": ["written", "hearing", "inquiry", null],
|
|
67
|
-
"description": "The procedure preference indicated by the LPA",
|
|
68
|
-
"$comment": "Only available in S78 cases"
|
|
69
|
-
},
|
|
70
|
-
"lpaProcedurePreferenceDetails": {
|
|
71
|
-
"type": ["string", "null"],
|
|
72
|
-
"description": "The procedure details preference indicated by the LPA",
|
|
73
|
-
"$comment": "Only available in S78 cases"
|
|
74
|
-
},
|
|
75
|
-
"lpaProcedurePreferenceDuration": {
|
|
76
|
-
"type": ["number", "null"],
|
|
77
|
-
"description": "The duration of enquiry indicated by the LPA",
|
|
78
|
-
"$comment": "Only available in S78 cases"
|
|
53
|
+
"description": "Indicates emerging plans"
|
|
79
54
|
},
|
|
80
55
|
"isSiteInAreaOfSpecialControlAdverts": {
|
|
81
56
|
"type": ["boolean", "null"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "commands/lpa-questionnaire-common.schema.json",
|
|
3
|
+
"$id": "commands/appeals-components/lpa-questionnaire-common.schema.json",
|
|
4
4
|
"title": "LPAQ common submission properties",
|
|
5
5
|
"description": "Schema defining any properties common across all appeal types for LPAQ submissions",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "commands/lpa-questionnaire-has.schema.json",
|
|
3
|
+
"$id": "commands/appeals-components/lpa-questionnaire-has.schema.json",
|
|
4
4
|
"title": "LPAQ HAS submission properties",
|
|
5
5
|
"description": "Schema defining any HAS specific properties for LPAQ submissions",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "commands/lpa-questionnaire-s78.schema.json",
|
|
3
|
+
"$id": "commands/appeals-components/lpa-questionnaire-s78.schema.json",
|
|
4
4
|
"title": "LPAQ S78 submission properties",
|
|
5
5
|
"description": "Schema defining any S78 specific properties for LPAQ submissions",
|
|
6
6
|
"type": "object",
|
|
@@ -29,10 +29,7 @@
|
|
|
29
29
|
"hasInfrastructureLevy",
|
|
30
30
|
"isInfrastructureLevyFormallyAdopted",
|
|
31
31
|
"infrastructureLevyAdoptedDate",
|
|
32
|
-
"infrastructureLevyExpectedDate"
|
|
33
|
-
"lpaProcedurePreference",
|
|
34
|
-
"lpaProcedurePreferenceDetails",
|
|
35
|
-
"lpaProcedurePreferenceDuration"
|
|
32
|
+
"infrastructureLevyExpectedDate"
|
|
36
33
|
],
|
|
37
34
|
"allOf": [
|
|
38
35
|
{
|
|
@@ -194,22 +191,6 @@
|
|
|
194
191
|
"examples": ["2023-07-27T20:30:00.000Z"],
|
|
195
192
|
"description": "The expected date of the infrastructure levy",
|
|
196
193
|
"$comment": "Only available in S78 cases"
|
|
197
|
-
},
|
|
198
|
-
"lpaProcedurePreference": {
|
|
199
|
-
"type": ["string", "null"],
|
|
200
|
-
"enum": ["written", "hearing", "inquiry", null],
|
|
201
|
-
"description": "The procedure preference indicated by the LPA",
|
|
202
|
-
"$comment": "Only available in S78 cases"
|
|
203
|
-
},
|
|
204
|
-
"lpaProcedurePreferenceDetails": {
|
|
205
|
-
"type": ["string", "null"],
|
|
206
|
-
"description": "The procedure details preference indicated by the LPA",
|
|
207
|
-
"$comment": "Only available in S78 cases"
|
|
208
|
-
},
|
|
209
|
-
"lpaProcedurePreferenceDuration": {
|
|
210
|
-
"type": ["number", "null"],
|
|
211
|
-
"description": "The duration of enquiry indicated by the LPA",
|
|
212
|
-
"$comment": "Only available in S78 cases"
|
|
213
194
|
}
|
|
214
195
|
}
|
|
215
196
|
}
|
|
@@ -17,26 +17,37 @@
|
|
|
17
17
|
"$comment": "Householder + CAS Planning",
|
|
18
18
|
"allOf": [
|
|
19
19
|
{ "properties": { "caseType": { "enum": ["D", "ZP"] } } },
|
|
20
|
-
{ "$ref": "appeal-common-submission.schema.json" },
|
|
21
|
-
{ "$ref": "appeal-has-submission.schema.json" }
|
|
20
|
+
{ "$ref": "appeals-components/appeal-common-submission.schema.json" },
|
|
21
|
+
{ "$ref": "appeals-components/appeal-has-submission.schema.json" }
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"$comment": "S78 + S20",
|
|
26
26
|
"allOf": [
|
|
27
27
|
{ "properties": { "caseType": { "enum": ["W", "Y"] } } },
|
|
28
|
-
{ "$ref": "appeal-common-submission.schema.json" },
|
|
29
|
-
{ "$ref": "appeal-has-submission.schema.json" },
|
|
30
|
-
{ "$ref": "appeal-s78-submission.schema.json" }
|
|
28
|
+
{ "$ref": "appeals-components/appeal-common-submission.schema.json" },
|
|
29
|
+
{ "$ref": "appeals-components/appeal-has-submission.schema.json" },
|
|
30
|
+
{ "$ref": "appeals-components/appeal-s78-submission.schema.json" },
|
|
31
|
+
{ "$ref": "appeals-components/appellant-procedure-preference.schema.json" }
|
|
31
32
|
]
|
|
32
33
|
},
|
|
33
34
|
{
|
|
34
|
-
"$comment": "
|
|
35
|
+
"$comment": "CAS Adverts",
|
|
35
36
|
"allOf": [
|
|
36
|
-
{ "properties": { "caseType": { "enum": ["
|
|
37
|
-
{ "$ref": "appeal-common-submission.schema.json" },
|
|
38
|
-
{ "$ref": "appeal-has-submission.schema.json" },
|
|
39
|
-
{ "$ref": "appeal-advert.submission.schema.json" }
|
|
37
|
+
{ "properties": { "caseType": { "enum": ["ZA"] } } },
|
|
38
|
+
{ "$ref": "appeals-components/appeal-common-submission.schema.json" },
|
|
39
|
+
{ "$ref": "appeals-components/appeal-has-submission.schema.json" },
|
|
40
|
+
{ "$ref": "appeals-components/appeal-advert.submission.schema.json" }
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"$comment": "Adverts",
|
|
45
|
+
"allOf": [
|
|
46
|
+
{ "properties": { "caseType": { "enum": ["H"] } } },
|
|
47
|
+
{ "$ref": "appeals-components/appeal-common-submission.schema.json" },
|
|
48
|
+
{ "$ref": "appeals-components/appeal-has-submission.schema.json" },
|
|
49
|
+
{ "$ref": "appeals-components/appeal-advert.submission.schema.json" },
|
|
50
|
+
{ "$ref": "appeals-components/appellant-procedure-preference.schema.json" }
|
|
40
51
|
]
|
|
41
52
|
}
|
|
42
53
|
]
|
|
@@ -16,26 +16,40 @@
|
|
|
16
16
|
"$comment": "Householder + CAS Planning",
|
|
17
17
|
"allOf": [
|
|
18
18
|
{ "properties": { "caseType": { "enum": ["D", "ZP"] } } },
|
|
19
|
-
{ "$ref": "lpa-questionnaire-common.schema.json" },
|
|
20
|
-
{ "$ref": "lpa-questionnaire-has.schema.json" }
|
|
19
|
+
{ "$ref": "appeals-components/lpa-questionnaire-common.schema.json" },
|
|
20
|
+
{ "$ref": "appeals-components/lpa-questionnaire-has.schema.json" }
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"$comment": "S78 + S20",
|
|
25
25
|
"allOf": [
|
|
26
26
|
{ "properties": { "caseType": { "enum": ["W", "Y"] } } },
|
|
27
|
-
{ "$ref": "lpa-questionnaire-common.schema.json" },
|
|
28
|
-
{ "$ref": "lpa-questionnaire-has.schema.json" },
|
|
29
|
-
{ "$ref": "lpa-questionnaire-s78.schema.json" }
|
|
27
|
+
{ "$ref": "appeals-components/lpa-questionnaire-common.schema.json" },
|
|
28
|
+
{ "$ref": "appeals-components/lpa-questionnaire-has.schema.json" },
|
|
29
|
+
{ "$ref": "appeals-components/lpa-questionnaire-s78.schema.json" },
|
|
30
|
+
{ "$ref": "appeals-components/lpa-procedure-preference.schema.json" },
|
|
31
|
+
{ "$ref": "appeals-components/changed-listed-building-number.schema.json" }
|
|
30
32
|
]
|
|
31
33
|
},
|
|
32
34
|
{
|
|
33
|
-
"$comment": "
|
|
35
|
+
"$comment": "CAS Adverts",
|
|
34
36
|
"allOf": [
|
|
35
|
-
{ "properties": { "caseType": { "enum": ["
|
|
36
|
-
{ "$ref": "lpa-questionnaire-common.schema.json" },
|
|
37
|
-
{ "$ref": "lpa-questionnaire-has.schema.json" },
|
|
38
|
-
{ "$ref": "lpa-
|
|
37
|
+
{ "properties": { "caseType": { "enum": ["ZA"] } } },
|
|
38
|
+
{ "$ref": "appeals-components/lpa-questionnaire-common.schema.json" },
|
|
39
|
+
{ "$ref": "appeals-components/lpa-questionnaire-has.schema.json" },
|
|
40
|
+
{ "$ref": "appeals-components/lpa-procedure-preference.schema.json" },
|
|
41
|
+
{ "$ref": "appeals-components/lpa-questionnaire-advert.schema.json" }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"$comment": "Adverts",
|
|
46
|
+
"allOf": [
|
|
47
|
+
{ "properties": { "caseType": { "enum": ["H"] } } },
|
|
48
|
+
{ "$ref": "appeals-components/lpa-questionnaire-common.schema.json" },
|
|
49
|
+
{ "$ref": "appeals-components/lpa-questionnaire-has.schema.json" },
|
|
50
|
+
{ "$ref": "appeals-components/lpa-questionnaire-advert.schema.json" },
|
|
51
|
+
{ "$ref": "appeals-components/lpa-procedure-preference.schema.json" },
|
|
52
|
+
{ "$ref": "appeals-components/changed-listed-building-number.schema.json" }
|
|
39
53
|
]
|
|
40
54
|
}
|
|
41
55
|
]
|
package/src/index.cjs
CHANGED
|
@@ -753,6 +753,7 @@ const __dirname$1 = path.dirname(url.fileURLToPath((typeof document === 'undefin
|
|
|
753
753
|
|
|
754
754
|
const schemasPath = path.join(__dirname$1, '..', 'schemas');
|
|
755
755
|
const commandsPath = path.join(schemasPath, 'commands');
|
|
756
|
+
const appealsCommandsComponentsPath = path.join(commandsPath, 'appeals-components');
|
|
756
757
|
|
|
757
758
|
/**
|
|
758
759
|
* Load all schemas from schemas and commands folders
|
|
@@ -762,7 +763,8 @@ const commandsPath = path.join(schemasPath, 'commands');
|
|
|
762
763
|
async function loadAllSchemas() {
|
|
763
764
|
return {
|
|
764
765
|
schemas: await loadSchemas(schemasPath),
|
|
765
|
-
commands: await loadSchemas(commandsPath)
|
|
766
|
+
commands: await loadSchemas(commandsPath),
|
|
767
|
+
appealsComponents: await loadSchemas(appealsCommandsComponentsPath)
|
|
766
768
|
};
|
|
767
769
|
}
|
|
768
770
|
|
|
@@ -774,7 +776,8 @@ async function loadAllSchemas() {
|
|
|
774
776
|
function loadAllSchemasSync() {
|
|
775
777
|
return {
|
|
776
778
|
schemas: loadSchemasSync(schemasPath),
|
|
777
|
-
commands: loadSchemasSync(commandsPath)
|
|
779
|
+
commands: loadSchemasSync(commandsPath),
|
|
780
|
+
appealsComponents: loadSchemasSync(appealsCommandsComponentsPath)
|
|
778
781
|
};
|
|
779
782
|
}
|
|
780
783
|
|
|
@@ -848,6 +851,7 @@ exports.NSIP_VIRUS_CHECK_STATUS = NSIP_VIRUS_CHECK_STATUS;
|
|
|
848
851
|
exports.REDACTION_STATUS = REDACTION_STATUS;
|
|
849
852
|
exports.SERVICE_USER_TYPE = SERVICE_USER_TYPE;
|
|
850
853
|
exports.STATUS = STATUS;
|
|
854
|
+
exports.appealsCommandsComponentsPath = appealsCommandsComponentsPath;
|
|
851
855
|
exports.commandsPath = commandsPath;
|
|
852
856
|
exports.loadAllSchemas = loadAllSchemas;
|
|
853
857
|
exports.loadAllSchemasSync = loadAllSchemasSync;
|
package/src/index.d.ts
CHANGED
|
@@ -8,10 +8,14 @@ export interface LoadedSchemas {
|
|
|
8
8
|
commands: {
|
|
9
9
|
[name: string]: any;
|
|
10
10
|
};
|
|
11
|
+
appealsComponents: {
|
|
12
|
+
[name: string]: any;
|
|
13
|
+
};
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
export const schemasPath: string;
|
|
14
17
|
export const commandsPath: string;
|
|
18
|
+
export const appealsComponentsPath: string;
|
|
15
19
|
export function loadAllSchemas(): Promise<LoadedSchemas>;
|
|
16
20
|
export function loadAllSchemasSync(): LoadedSchemas;
|
|
17
21
|
|
package/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export * from './enums.js';
|
|
|
8
8
|
|
|
9
9
|
export const schemasPath = path.join(__dirname, '..', 'schemas');
|
|
10
10
|
export const commandsPath = path.join(schemasPath, 'commands');
|
|
11
|
+
export const appealsCommandsComponentsPath = path.join(commandsPath, 'appeals-components');
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Load all schemas from schemas and commands folders
|
|
@@ -17,7 +18,8 @@ export const commandsPath = path.join(schemasPath, 'commands');
|
|
|
17
18
|
export async function loadAllSchemas() {
|
|
18
19
|
return {
|
|
19
20
|
schemas: await loadSchemas(schemasPath),
|
|
20
|
-
commands: await loadSchemas(commandsPath)
|
|
21
|
+
commands: await loadSchemas(commandsPath),
|
|
22
|
+
appealsComponents: await loadSchemas(appealsCommandsComponentsPath)
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -29,6 +31,7 @@ export async function loadAllSchemas() {
|
|
|
29
31
|
export function loadAllSchemasSync() {
|
|
30
32
|
return {
|
|
31
33
|
schemas: loadSchemasSync(schemasPath),
|
|
32
|
-
commands: loadSchemasSync(commandsPath)
|
|
34
|
+
commands: loadSchemasSync(commandsPath),
|
|
35
|
+
appealsComponents: loadSchemasSync(appealsCommandsComponentsPath)
|
|
33
36
|
};
|
|
34
37
|
}
|