@planning-inspectorate/data-model 2.41.0 → 2.43.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/docs/appeal-has.md +19 -0
- package/docs/nsip-invoice.md +19 -20
- package/package.json +1 -1
- package/pins_data_model/models/model_appeal_has.py +8 -0
- package/pins_data_model/models/model_nsip_invoice.py +8 -9
- package/schemas/appeal-has.schema.json +4 -0
- package/schemas/commands/appeals-components/lpa-questionnaire-has.schema.json +4 -0
- package/schemas/nsip-invoice.schema.json +4 -16
- package/src/schemas.d.ts +17 -15
- package/tests/appeals/appeal-has.test.js +17 -1
package/docs/appeal-has.md
CHANGED
|
@@ -45,6 +45,7 @@ any of
|
|
|
45
45
|
| [lpaQuestionnaireValidationOutcomeDate](#lpaquestionnairevalidationoutcomedate) | `string` | Required | can be null | [Appeal HAS Case](appeal-has-properties-lpaquestionnairevalidationoutcomedate.md "appeal-has.schema.json#/properties/lpaQuestionnaireValidationOutcomeDate") |
|
|
46
46
|
| [lpaQuestionnaireValidationDetails](#lpaquestionnairevalidationdetails) | `array` | Required | can be null | [Appeal HAS Case](appeal-has-properties-lpaquestionnairevalidationdetails.md "appeal-has.schema.json#/properties/lpaQuestionnaireValidationDetails") |
|
|
47
47
|
| [lpaStatement](#lpastatement) | `string` | Required | can be null | [Appeal HAS Case](appeal-has-properties-lpastatement.md "appeal-has.schema.json#/properties/lpaStatement") |
|
|
48
|
+
| [listOfDocumentsBeforeDecision](#listofdocumentsbeforedecision) | `string` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-listofdocumentsbeforedecision.md "appeal-has.schema.json#/properties/listOfDocumentsBeforeDecision") |
|
|
48
49
|
| [caseWithdrawnDate](#casewithdrawndate) | `string` | Required | can be null | [Appeal HAS Case](appeal-has-properties-casewithdrawndate.md "appeal-has.schema.json#/properties/caseWithdrawnDate") |
|
|
49
50
|
| [caseTransferredDate](#casetransferreddate) | `string` | Required | can be null | [Appeal HAS Case](appeal-has-properties-casetransferreddate.md "appeal-has.schema.json#/properties/caseTransferredDate") |
|
|
50
51
|
| [transferredCaseClosedDate](#transferredcasecloseddate) | `string` | Required | can be null | [Appeal HAS Case](appeal-has-properties-transferredcasecloseddate.md "appeal-has.schema.json#/properties/transferredCaseClosedDate") |
|
|
@@ -1025,6 +1026,24 @@ A statement provided by the LPA
|
|
|
1025
1026
|
"We refused the application because of ..."
|
|
1026
1027
|
```
|
|
1027
1028
|
|
|
1029
|
+
## listOfDocumentsBeforeDecision
|
|
1030
|
+
|
|
1031
|
+
Free text response from LPA listing documents used to drive their decision
|
|
1032
|
+
|
|
1033
|
+
`listOfDocumentsBeforeDecision`
|
|
1034
|
+
|
|
1035
|
+
* is optional
|
|
1036
|
+
|
|
1037
|
+
* Type: `string`
|
|
1038
|
+
|
|
1039
|
+
* can be null
|
|
1040
|
+
|
|
1041
|
+
* defined in: [Appeal HAS Case](appeal-has-properties-listofdocumentsbeforedecision.md "appeal-has.schema.json#/properties/listOfDocumentsBeforeDecision")
|
|
1042
|
+
|
|
1043
|
+
### listOfDocumentsBeforeDecision Type
|
|
1044
|
+
|
|
1045
|
+
`string`
|
|
1046
|
+
|
|
1028
1047
|
## caseWithdrawnDate
|
|
1029
1048
|
|
|
1030
1049
|
The date the appeal was withdrawn by the appellant
|
package/docs/nsip-invoice.md
CHANGED
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
| Property | Type | Required | Nullable | Defined by |
|
|
8
8
|
| :------------------------------------------------ | :-------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------ |
|
|
9
9
|
| [caseId](#caseid) | `integer` | Required | cannot be null | [NSIP Invoice](nsip-invoice-properties-caseid.md "nsip-invoice.schema.json#/properties/caseId") |
|
|
10
|
-
| [caseReference](#casereference) | `string` |
|
|
11
|
-
| [invoiceStage](#invoicestage) | `string` | Required |
|
|
10
|
+
| [caseReference](#casereference) | `string` | Optional | can be null | [NSIP Invoice](nsip-invoice-properties-casereference.md "nsip-invoice.schema.json#/properties/caseReference") |
|
|
11
|
+
| [invoiceStage](#invoicestage) | `string` | Required | cannot be null | [NSIP Invoice](nsip-invoice-properties-invoicestage.md "nsip-invoice.schema.json#/properties/invoiceStage") |
|
|
12
12
|
| [invoiceNumber](#invoicenumber) | `string` | Required | cannot be null | [NSIP Invoice](nsip-invoice-properties-invoicenumber.md "nsip-invoice.schema.json#/properties/invoiceNumber") |
|
|
13
|
-
| [amountDue](#amountdue) | `number` |
|
|
14
|
-
| [paymentDueDate](#paymentduedate) | `string` |
|
|
15
|
-
| [invoicedDate](#invoiceddate) | `string` |
|
|
16
|
-
| [paymentDate](#paymentdate) | `string` |
|
|
17
|
-
| [refundCreditNoteNumber](#refundcreditnotenumber) | `string` |
|
|
18
|
-
| [refundAmount](#refundamount) | `number` |
|
|
19
|
-
| [refundIssueDate](#refundissuedate) | `string` |
|
|
13
|
+
| [amountDue](#amountdue) | `number` | Optional | can be null | [NSIP Invoice](nsip-invoice-properties-amountdue.md "nsip-invoice.schema.json#/properties/amountDue") |
|
|
14
|
+
| [paymentDueDate](#paymentduedate) | `string` | Optional | can be null | [NSIP Invoice](nsip-invoice-properties-paymentduedate.md "nsip-invoice.schema.json#/properties/paymentDueDate") |
|
|
15
|
+
| [invoicedDate](#invoiceddate) | `string` | Optional | can be null | [NSIP Invoice](nsip-invoice-properties-invoiceddate.md "nsip-invoice.schema.json#/properties/invoicedDate") |
|
|
16
|
+
| [paymentDate](#paymentdate) | `string` | Optional | can be null | [NSIP Invoice](nsip-invoice-properties-paymentdate.md "nsip-invoice.schema.json#/properties/paymentDate") |
|
|
17
|
+
| [refundCreditNoteNumber](#refundcreditnotenumber) | `string` | Optional | can be null | [NSIP Invoice](nsip-invoice-properties-refundcreditnotenumber.md "nsip-invoice.schema.json#/properties/refundCreditNoteNumber") |
|
|
18
|
+
| [refundAmount](#refundamount) | `number` | Optional | can be null | [NSIP Invoice](nsip-invoice-properties-refundamount.md "nsip-invoice.schema.json#/properties/refundAmount") |
|
|
19
|
+
| [refundIssueDate](#refundissuedate) | `string` | Optional | can be null | [NSIP Invoice](nsip-invoice-properties-refundissuedate.md "nsip-invoice.schema.json#/properties/refundIssueDate") |
|
|
20
20
|
| Additional Properties | Any | Optional | can be null | |
|
|
21
21
|
|
|
22
22
|
## caseId
|
|
@@ -49,7 +49,7 @@ The unique identifier within the Back Office. This is not the same as the case r
|
|
|
49
49
|
|
|
50
50
|
`caseReference`
|
|
51
51
|
|
|
52
|
-
* is
|
|
52
|
+
* is optional
|
|
53
53
|
|
|
54
54
|
* Type: `string`
|
|
55
55
|
|
|
@@ -77,7 +77,7 @@ Invoice stage
|
|
|
77
77
|
|
|
78
78
|
* Type: `string`
|
|
79
79
|
|
|
80
|
-
*
|
|
80
|
+
* cannot be null
|
|
81
81
|
|
|
82
82
|
* defined in: [NSIP Invoice](nsip-invoice-properties-invoicestage.md "nsip-invoice.schema.json#/properties/invoiceStage")
|
|
83
83
|
|
|
@@ -96,7 +96,6 @@ Invoice stage
|
|
|
96
96
|
| `"pre_examination"` | |
|
|
97
97
|
| `"initial_examination"` | |
|
|
98
98
|
| `"final_examination"` | |
|
|
99
|
-
| `null` | |
|
|
100
99
|
|
|
101
100
|
### invoiceStage Examples
|
|
102
101
|
|
|
@@ -134,11 +133,11 @@ Amount due
|
|
|
134
133
|
|
|
135
134
|
`amountDue`
|
|
136
135
|
|
|
137
|
-
* is
|
|
136
|
+
* is optional
|
|
138
137
|
|
|
139
138
|
* Type: `number`
|
|
140
139
|
|
|
141
|
-
*
|
|
140
|
+
* can be null
|
|
142
141
|
|
|
143
142
|
* defined in: [NSIP Invoice](nsip-invoice-properties-amountdue.md "nsip-invoice.schema.json#/properties/amountDue")
|
|
144
143
|
|
|
@@ -158,7 +157,7 @@ Payment due date
|
|
|
158
157
|
|
|
159
158
|
`paymentDueDate`
|
|
160
159
|
|
|
161
|
-
* is
|
|
160
|
+
* is optional
|
|
162
161
|
|
|
163
162
|
* Type: `string`
|
|
164
163
|
|
|
@@ -186,7 +185,7 @@ Invoiced date
|
|
|
186
185
|
|
|
187
186
|
`invoicedDate`
|
|
188
187
|
|
|
189
|
-
* is
|
|
188
|
+
* is optional
|
|
190
189
|
|
|
191
190
|
* Type: `string`
|
|
192
191
|
|
|
@@ -214,7 +213,7 @@ Date of payment
|
|
|
214
213
|
|
|
215
214
|
`paymentDate`
|
|
216
215
|
|
|
217
|
-
* is
|
|
216
|
+
* is optional
|
|
218
217
|
|
|
219
218
|
* Type: `string`
|
|
220
219
|
|
|
@@ -242,7 +241,7 @@ Refund credit note number
|
|
|
242
241
|
|
|
243
242
|
`refundCreditNoteNumber`
|
|
244
243
|
|
|
245
|
-
* is
|
|
244
|
+
* is optional
|
|
246
245
|
|
|
247
246
|
* Type: `string`
|
|
248
247
|
|
|
@@ -266,7 +265,7 @@ Amount refunded
|
|
|
266
265
|
|
|
267
266
|
`refundAmount`
|
|
268
267
|
|
|
269
|
-
* is
|
|
268
|
+
* is optional
|
|
270
269
|
|
|
271
270
|
* Type: `number`
|
|
272
271
|
|
|
@@ -290,7 +289,7 @@ Refund issue date
|
|
|
290
289
|
|
|
291
290
|
`refundIssueDate`
|
|
292
291
|
|
|
293
|
-
* is
|
|
292
|
+
* is optional
|
|
294
293
|
|
|
295
294
|
* Type: `string`
|
|
296
295
|
|
package/package.json
CHANGED
|
@@ -464,6 +464,10 @@ class AppealHasCase1(BaseModel):
|
|
|
464
464
|
"""
|
|
465
465
|
A statement provided by the LPA
|
|
466
466
|
"""
|
|
467
|
+
listOfDocumentsBeforeDecision: str | None = None
|
|
468
|
+
"""
|
|
469
|
+
Free text response from LPA listing documents used to drive their decision
|
|
470
|
+
"""
|
|
467
471
|
caseWithdrawnDate: AwareDatetime | None = Field(
|
|
468
472
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
469
473
|
)
|
|
@@ -970,6 +974,10 @@ class AppealHasCase2(BaseModel):
|
|
|
970
974
|
"""
|
|
971
975
|
A statement provided by the LPA
|
|
972
976
|
"""
|
|
977
|
+
listOfDocumentsBeforeDecision: str | None = None
|
|
978
|
+
"""
|
|
979
|
+
Free text response from LPA listing documents used to drive their decision
|
|
980
|
+
"""
|
|
973
981
|
caseWithdrawnDate: AwareDatetime | None = Field(
|
|
974
982
|
..., examples=["2023-07-27T20:30:00.000Z"]
|
|
975
983
|
)
|
|
@@ -18,7 +18,6 @@ class InvoiceStage(Enum):
|
|
|
18
18
|
pre_examination = "pre_examination"
|
|
19
19
|
initial_examination = "initial_examination"
|
|
20
20
|
final_examination = "final_examination"
|
|
21
|
-
NoneType_None = None
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
class NsipInvoice(BaseModel):
|
|
@@ -33,7 +32,7 @@ class NsipInvoice(BaseModel):
|
|
|
33
32
|
"""
|
|
34
33
|
The unique identifier within the Back Office. This is not the same as the case reference
|
|
35
34
|
"""
|
|
36
|
-
caseReference: str | None = Field(
|
|
35
|
+
caseReference: str | None = Field(None, examples=["BC0510001"])
|
|
37
36
|
invoiceStage: InvoiceStage = Field(..., examples=["pre_acceptance"])
|
|
38
37
|
"""
|
|
39
38
|
Invoice stage
|
|
@@ -42,38 +41,38 @@ class NsipInvoice(BaseModel):
|
|
|
42
41
|
"""
|
|
43
42
|
Invoice number
|
|
44
43
|
"""
|
|
45
|
-
amountDue: float = Field(
|
|
44
|
+
amountDue: float | None = Field(None, examples=[500])
|
|
46
45
|
"""
|
|
47
46
|
Amount due
|
|
48
47
|
"""
|
|
49
48
|
paymentDueDate: AwareDatetime | None = Field(
|
|
50
|
-
|
|
49
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
51
50
|
)
|
|
52
51
|
"""
|
|
53
52
|
Payment due date
|
|
54
53
|
"""
|
|
55
54
|
invoicedDate: AwareDatetime | None = Field(
|
|
56
|
-
|
|
55
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
57
56
|
)
|
|
58
57
|
"""
|
|
59
58
|
Invoiced date
|
|
60
59
|
"""
|
|
61
60
|
paymentDate: AwareDatetime | None = Field(
|
|
62
|
-
|
|
61
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
63
62
|
)
|
|
64
63
|
"""
|
|
65
64
|
Date of payment
|
|
66
65
|
"""
|
|
67
|
-
refundCreditNoteNumber: str | None = Field(
|
|
66
|
+
refundCreditNoteNumber: str | None = Field(None, examples=["1800004419"])
|
|
68
67
|
"""
|
|
69
68
|
Refund credit note number
|
|
70
69
|
"""
|
|
71
|
-
refundAmount: float | None = Field(
|
|
70
|
+
refundAmount: float | None = Field(None, examples=[200])
|
|
72
71
|
"""
|
|
73
72
|
Amount refunded
|
|
74
73
|
"""
|
|
75
74
|
refundIssueDate: AwareDatetime | None = Field(
|
|
76
|
-
|
|
75
|
+
None, examples=["2023-07-27T20:30:00.000Z"]
|
|
77
76
|
)
|
|
78
77
|
"""
|
|
79
78
|
Refund issue date
|
|
@@ -314,6 +314,10 @@
|
|
|
314
314
|
"examples": ["We refused the application because of ..."],
|
|
315
315
|
"description": "A statement provided by the LPA"
|
|
316
316
|
},
|
|
317
|
+
"listOfDocumentsBeforeDecision": {
|
|
318
|
+
"type": ["string", "null"],
|
|
319
|
+
"description": "Free text response from LPA listing documents used to drive their decision"
|
|
320
|
+
},
|
|
317
321
|
"caseWithdrawnDate": {
|
|
318
322
|
"type": ["string", "null"],
|
|
319
323
|
"format": "date-time",
|
|
@@ -57,6 +57,10 @@
|
|
|
57
57
|
"examples": ["We refused the application because of ..."],
|
|
58
58
|
"description": "A statement provided by the LPA, unused?"
|
|
59
59
|
},
|
|
60
|
+
"listOfDocumentsBeforeDecision": {
|
|
61
|
+
"type": ["string", "null"],
|
|
62
|
+
"description": "Free text response from LPA listing documents used to drive their decision"
|
|
63
|
+
},
|
|
60
64
|
"significantChangesAffectingApplicationLpa": {
|
|
61
65
|
"type": ["array", "null"],
|
|
62
66
|
"items": {
|
|
@@ -5,19 +5,7 @@
|
|
|
5
5
|
"description": "NSIP Standalone Invoice Schema for ODW Curated layer",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": true,
|
|
8
|
-
"required": [
|
|
9
|
-
"caseId",
|
|
10
|
-
"caseReference",
|
|
11
|
-
"invoiceStage",
|
|
12
|
-
"invoiceNumber",
|
|
13
|
-
"amountDue",
|
|
14
|
-
"paymentDueDate",
|
|
15
|
-
"invoicedDate",
|
|
16
|
-
"paymentDate",
|
|
17
|
-
"refundCreditNoteNumber",
|
|
18
|
-
"refundAmount",
|
|
19
|
-
"refundIssueDate"
|
|
20
|
-
],
|
|
8
|
+
"required": ["caseId", "invoiceStage", "invoiceNumber"],
|
|
21
9
|
"properties": {
|
|
22
10
|
"caseId": {
|
|
23
11
|
"type": "integer",
|
|
@@ -29,9 +17,9 @@
|
|
|
29
17
|
"examples": ["BC0510001"]
|
|
30
18
|
},
|
|
31
19
|
"invoiceStage": {
|
|
32
|
-
"type":
|
|
20
|
+
"type": "string",
|
|
33
21
|
"description": "Invoice stage",
|
|
34
|
-
"enum": ["pre_acceptance", "acceptance", "pre_examination", "initial_examination", "final_examination"
|
|
22
|
+
"enum": ["pre_acceptance", "acceptance", "pre_examination", "initial_examination", "final_examination"],
|
|
35
23
|
"examples": ["pre_acceptance"]
|
|
36
24
|
},
|
|
37
25
|
"invoiceNumber": {
|
|
@@ -40,7 +28,7 @@
|
|
|
40
28
|
"examples": ["1800004419"]
|
|
41
29
|
},
|
|
42
30
|
"amountDue": {
|
|
43
|
-
"type": "number",
|
|
31
|
+
"type": ["number", "null"],
|
|
44
32
|
"description": "Amount due",
|
|
45
33
|
"examples": [500]
|
|
46
34
|
},
|
package/src/schemas.d.ts
CHANGED
|
@@ -485,6 +485,10 @@ export type AppealHASCase = (GridReference | SiteAddress) & {
|
|
|
485
485
|
* A statement provided by the LPA
|
|
486
486
|
*/
|
|
487
487
|
lpaStatement: string | null;
|
|
488
|
+
/**
|
|
489
|
+
* Free text response from LPA listing documents used to drive their decision
|
|
490
|
+
*/
|
|
491
|
+
listOfDocumentsBeforeDecision?: string | null;
|
|
488
492
|
/**
|
|
489
493
|
* The date the appeal was withdrawn by the appellant
|
|
490
494
|
*/
|
|
@@ -2411,17 +2415,11 @@ export interface NSIPInvoice {
|
|
|
2411
2415
|
* The unique identifier within the Back Office. This is not the same as the case reference
|
|
2412
2416
|
*/
|
|
2413
2417
|
caseId: number;
|
|
2414
|
-
caseReference
|
|
2418
|
+
caseReference?: string | null;
|
|
2415
2419
|
/**
|
|
2416
2420
|
* Invoice stage
|
|
2417
2421
|
*/
|
|
2418
|
-
invoiceStage:
|
|
2419
|
-
| 'pre_acceptance'
|
|
2420
|
-
| 'acceptance'
|
|
2421
|
-
| 'pre_examination'
|
|
2422
|
-
| 'initial_examination'
|
|
2423
|
-
| 'final_examination'
|
|
2424
|
-
| null;
|
|
2422
|
+
invoiceStage: 'pre_acceptance' | 'acceptance' | 'pre_examination' | 'initial_examination' | 'final_examination';
|
|
2425
2423
|
/**
|
|
2426
2424
|
* Invoice number
|
|
2427
2425
|
*/
|
|
@@ -2429,31 +2427,31 @@ export interface NSIPInvoice {
|
|
|
2429
2427
|
/**
|
|
2430
2428
|
* Amount due
|
|
2431
2429
|
*/
|
|
2432
|
-
amountDue
|
|
2430
|
+
amountDue?: number | null;
|
|
2433
2431
|
/**
|
|
2434
2432
|
* Payment due date
|
|
2435
2433
|
*/
|
|
2436
|
-
paymentDueDate
|
|
2434
|
+
paymentDueDate?: string | null;
|
|
2437
2435
|
/**
|
|
2438
2436
|
* Invoiced date
|
|
2439
2437
|
*/
|
|
2440
|
-
invoicedDate
|
|
2438
|
+
invoicedDate?: string | null;
|
|
2441
2439
|
/**
|
|
2442
2440
|
* Date of payment
|
|
2443
2441
|
*/
|
|
2444
|
-
paymentDate
|
|
2442
|
+
paymentDate?: string | null;
|
|
2445
2443
|
/**
|
|
2446
2444
|
* Refund credit note number
|
|
2447
2445
|
*/
|
|
2448
|
-
refundCreditNoteNumber
|
|
2446
|
+
refundCreditNoteNumber?: string | null;
|
|
2449
2447
|
/**
|
|
2450
2448
|
* Amount refunded
|
|
2451
2449
|
*/
|
|
2452
|
-
refundAmount
|
|
2450
|
+
refundAmount?: number | null;
|
|
2453
2451
|
/**
|
|
2454
2452
|
* Refund issue date
|
|
2455
2453
|
*/
|
|
2456
|
-
refundIssueDate
|
|
2454
|
+
refundIssueDate?: string | null;
|
|
2457
2455
|
[k: string]: unknown;
|
|
2458
2456
|
}
|
|
2459
2457
|
|
|
@@ -4503,6 +4501,10 @@ export type LPAQHASSubmissionProperties = {
|
|
|
4503
4501
|
* A statement provided by the LPA, unused?
|
|
4504
4502
|
*/
|
|
4505
4503
|
lpaStatement?: string | null;
|
|
4504
|
+
/**
|
|
4505
|
+
* Free text response from LPA listing documents used to drive their decision
|
|
4506
|
+
*/
|
|
4507
|
+
listOfDocumentsBeforeDecision?: string | null;
|
|
4506
4508
|
/**
|
|
4507
4509
|
* Significant changes affecting the application as reported by the LPA
|
|
4508
4510
|
*/
|
|
@@ -180,7 +180,8 @@ const appealHas = {
|
|
|
180
180
|
{ value: 'adopted-a-new-local-plan', comment: 'Plan adopted last month' },
|
|
181
181
|
{ value: 'other', comment: 'General policy shift' }
|
|
182
182
|
],
|
|
183
|
-
significantChangesAffectingApplicationLpa: null
|
|
183
|
+
significantChangesAffectingApplicationLpa: null,
|
|
184
|
+
listOfDocumentsBeforeDecision: null
|
|
184
185
|
};
|
|
185
186
|
|
|
186
187
|
describe(schema, () => {
|
|
@@ -279,6 +280,7 @@ describe(schema, () => {
|
|
|
279
280
|
test.reasonForAppealAppellant = null;
|
|
280
281
|
test.significantChangesAffectingApplicationAppellant = null;
|
|
281
282
|
test.significantChangesAffectingApplicationLpa = null;
|
|
283
|
+
test.listOfDocumentsBeforeDecision = null;
|
|
282
284
|
const validationResult = ajv.validate(schema, test);
|
|
283
285
|
if (!validationResult) {
|
|
284
286
|
console.error(ajv.errors);
|
|
@@ -286,6 +288,20 @@ describe(schema, () => {
|
|
|
286
288
|
assert.strictEqual(validationResult, true);
|
|
287
289
|
});
|
|
288
290
|
|
|
291
|
+
it('should allow listOfDocumentsBeforeDecision to be a string', () => {
|
|
292
|
+
const test = structuredClone(appealHas);
|
|
293
|
+
test.listOfDocumentsBeforeDecision = 'doc1, doc2, doc3';
|
|
294
|
+
const validationResult = ajv.validate(schema, test);
|
|
295
|
+
assert.strictEqual(validationResult, true);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
it('should allow listOfDocumentsBeforeDecision to be missing (optional)', () => {
|
|
299
|
+
const test = structuredClone(appealHas);
|
|
300
|
+
delete test.listOfDocumentsBeforeDecision;
|
|
301
|
+
const validationResult = ajv.validate(schema, test);
|
|
302
|
+
assert.strictEqual(validationResult, true);
|
|
303
|
+
});
|
|
304
|
+
|
|
289
305
|
it('should enforce enum for significantChangesAffectingApplication', () => {
|
|
290
306
|
const test = structuredClone(appealHas);
|
|
291
307
|
test.significantChangesAffectingApplicationAppellant = [{ value: 'invalid-enum-value', comment: 'some comment' }];
|