@planning-inspectorate/data-model 2.42.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.
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/data-model",
3
- "version": "2.42.0",
3
+ "version": "2.43.0",
4
4
  "description": "JSON Schemas for the Planning Inspectorate's Data Model",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -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
  )
@@ -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": {
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
  */
@@ -4497,6 +4501,10 @@ export type LPAQHASSubmissionProperties = {
4497
4501
  * A statement provided by the LPA, unused?
4498
4502
  */
4499
4503
  lpaStatement?: string | null;
4504
+ /**
4505
+ * Free text response from LPA listing documents used to drive their decision
4506
+ */
4507
+ listOfDocumentsBeforeDecision?: string | null;
4500
4508
  /**
4501
4509
  * Significant changes affecting the application as reported by the LPA
4502
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' }];