@planning-inspectorate/data-model 1.21.0 → 1.22.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 (33) hide show
  1. package/docs/README.md +4 -0
  2. package/docs/appeal-has.md +30 -49
  3. package/docs/appeal-s78.md +241 -144
  4. package/package.json +1 -1
  5. package/pins_data_model/models/model_appeal_has.py +72 -27
  6. package/pins_data_model/models/model_appeal_s78.py +95 -8
  7. package/schemas/appeal-has.schema.json +52 -21
  8. package/schemas/appeal-s78.schema.json +62 -7
  9. package/schemas/commands/appeals-components/appeal-advert.submission.schema.json +53 -0
  10. package/schemas/commands/{appeal-common-submission.schema.json → appeals-components/appeal-common-submission.schema.json} +8 -8
  11. package/schemas/commands/{appeal-has-submission.schema.json → appeals-components/appeal-has-submission.schema.json} +2 -2
  12. package/schemas/commands/{appeal-s78-submission.schema.json → appeals-components/appeal-s78-submission.schema.json} +2 -2
  13. package/schemas/commands/appeals-components/appellant-procedure-preference.schema.json +37 -0
  14. package/schemas/commands/appeals-components/changed-listed-building-number.schema.json +23 -0
  15. package/schemas/commands/appeals-components/lpa-procedure-preference.schema.json +28 -0
  16. package/schemas/commands/{lpa-questionnaire-cas-advert.schema.json → appeals-components/lpa-questionnaire-advert.schema.json} +8 -33
  17. package/schemas/commands/{lpa-questionnaire-common.schema.json → appeals-components/lpa-questionnaire-common.schema.json} +1 -1
  18. package/schemas/commands/{lpa-questionnaire-has.schema.json → appeals-components/lpa-questionnaire-has.schema.json} +1 -1
  19. package/schemas/commands/{lpa-questionnaire-s78.schema.json → appeals-components/lpa-questionnaire-s78.schema.json} +2 -21
  20. package/schemas/commands/appellant-submission.schema.json +21 -10
  21. package/schemas/commands/lpa-questionnaire.schema.json +24 -10
  22. package/src/index.cjs +6 -2
  23. package/src/index.d.ts +4 -0
  24. package/src/index.js +5 -2
  25. package/src/schemas.d.ts +326 -803
  26. package/tests/appeals/appeal-has.test.js +30 -5
  27. package/tests/appeals/appeal-s78.test.js +17 -3
  28. package/tests/appeals/commands/adverts-questionnaire.test.js +1 -0
  29. package/tests/appeals/commands/adverts-submission.test.js +13 -13
  30. package/tests/appeals/commands/cas-adverts-submission.test.js +184 -0
  31. package/tests/appeals/commands/has-submission.test.js +2 -2
  32. package/tests/appeals/commands/s78-submission.test.js +2 -2
  33. package/schemas/commands/appeal-advert.submission.schema.json +0 -23
package/docs/README.md CHANGED
@@ -52,8 +52,12 @@
52
52
 
53
53
  * [Untitled object in Appeal HAS Case](./appeal-has-properties-neighbouringsiteaddresses-items.md) – `appeal-has.schema.json#/properties/neighbouringSiteAddresses/items`
54
54
 
55
+ * [Untitled object in Appeal HAS Case](./appeal-has-properties-advertdetails-items.md) – `appeal-has.schema.json#/properties/advertDetails/items`
56
+
55
57
  * [Untitled object in Appeal S78 Case](./appeal-s78-properties-neighbouringsiteaddresses-items.md) – `appeal-s78.schema.json#/properties/neighbouringSiteAddresses/items`
56
58
 
59
+ * [Untitled object in Appeal S78 Case](./appeal-s78-properties-advertdetails-items.md) – `appeal-s78.schema.json#/properties/advertDetails/items`
60
+
57
61
  * [Untitled object in DaRT API response](./dart-response-properties-neighbouringsiteaddresses-items.md) – `dart-response.schema.json#/properties/neighbouringSiteAddresses/items`
58
62
 
59
63
  * [Untitled object in Examination Timetable](./nsip-exam-timetable-defs-event.md) – `nsip-exam-timetable.schema.json#/$defs/event`
@@ -111,11 +111,10 @@ any of
111
111
  | [siteGridReferenceEasting](#sitegridreferenceeasting) | `string` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-sitegridreferenceeasting.md "appeal-has.schema.json#/properties/siteGridReferenceEasting") |
112
112
  | [siteGridReferenceNorthing](#sitegridreferencenorthing) | `string` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-sitegridreferencenorthing.md "appeal-has.schema.json#/properties/siteGridReferenceNorthing") |
113
113
  | [hasLandownersPermission](#haslandownerspermission) | `boolean` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-haslandownerspermission.md "appeal-has.schema.json#/properties/hasLandownersPermission") |
114
- | [isAdvertInPosition](#isadvertinposition) | `boolean` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-isadvertinposition.md "appeal-has.schema.json#/properties/isAdvertInPosition") |
115
- | [isSiteInAreaOfSpecialControlAdverts](#issiteinareaofspecialcontroladverts) | `boolean` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-issiteinareaofspecialcontroladverts.md "appeal-has.schema.json#/properties/isSiteInAreaOfSpecialControlAdverts") |
116
114
  | [wasApplicationRefusedDueToHighwayOrTraffic](#wasapplicationrefusedduetohighwayortraffic) | `boolean` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-wasapplicationrefusedduetohighwayortraffic.md "appeal-has.schema.json#/properties/wasApplicationRefusedDueToHighwayOrTraffic") |
117
115
  | [didAppellantSubmitCompletePhotosAndPlans](#didappellantsubmitcompletephotosandplans) | `boolean` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-didappellantsubmitcompletephotosandplans.md "appeal-has.schema.json#/properties/didAppellantSubmitCompletePhotosAndPlans") |
118
- | [advertType](#adverttype) | `string` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-adverttype.md "appeal-has.schema.json#/properties/advertType") |
116
+ | [isSiteInAreaOfSpecialControlAdverts](#issiteinareaofspecialcontroladverts) | `boolean` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-issiteinareaofspecialcontroladverts.md "appeal-has.schema.json#/properties/isSiteInAreaOfSpecialControlAdverts") |
117
+ | [advertDetails](#advertdetails) | `array` | Optional | can be null | [Appeal HAS Case](appeal-has-properties-advertdetails.md "appeal-has.schema.json#/properties/advertDetails") |
119
118
  | Additional Properties | Any | Optional | can be null | |
120
119
 
121
120
  ## caseId
@@ -2487,10 +2486,10 @@ Indicates if the appellant has applied for costs
2487
2486
  **pattern**: the string must match the following regular expression: 
2488
2487
 
2489
2488
  ```regexp
2490
- ^\d{6}$
2489
+ ^\d{6,7}$
2491
2490
  ```
2492
2491
 
2493
- [try pattern](https://regexr.com/?expression=%5E%5Cd%7B6%7D%24 "try regular expression with regexr.com")
2492
+ [try pattern](https://regexr.com/?expression=%5E%5Cd%7B6%2C7%7D%24 "try regular expression with regexr.com")
2494
2493
 
2495
2494
  ### siteGridReferenceEasting Examples
2496
2495
 
@@ -2521,10 +2520,10 @@ Indicates if the appellant has applied for costs
2521
2520
  **pattern**: the string must match the following regular expression: 
2522
2521
 
2523
2522
  ```regexp
2524
- ^\d{6}$
2523
+ ^\d{6,7}$
2525
2524
  ```
2526
2525
 
2527
- [try pattern](https://regexr.com/?expression=%5E%5Cd%7B6%7D%24 "try regular expression with regexr.com")
2526
+ [try pattern](https://regexr.com/?expression=%5E%5Cd%7B6%2C7%7D%24 "try regular expression with regexr.com")
2528
2527
 
2529
2528
  ### siteGridReferenceNorthing Examples
2530
2529
 
@@ -2534,7 +2533,7 @@ Indicates if the appellant has applied for costs
2534
2533
 
2535
2534
  ## hasLandownersPermission
2536
2535
 
2537
- Indicates if the appellant has land owners permission
2536
+ Does the appellant have the landowners permission
2538
2537
 
2539
2538
  `hasLandownersPermission`
2540
2539
 
@@ -2550,29 +2549,11 @@ Indicates if the appellant has land owners permission
2550
2549
 
2551
2550
  `boolean`
2552
2551
 
2553
- ## isAdvertInPosition
2554
-
2555
- Indicates if the advert is already in position
2556
-
2557
- `isAdvertInPosition`
2558
-
2559
- * is optional
2560
-
2561
- * Type: `boolean`
2562
-
2563
- * can be null
2564
-
2565
- * defined in: [Appeal HAS Case](appeal-has-properties-isadvertinposition.md "appeal-has.schema.json#/properties/isAdvertInPosition")
2566
-
2567
- ### isAdvertInPosition Type
2568
-
2569
- `boolean`
2570
-
2571
- ## isSiteInAreaOfSpecialControlAdverts
2552
+ ## wasApplicationRefusedDueToHighwayOrTraffic
2572
2553
 
2573
- Indicates if the site is in an area of special control for adverts
2554
+ Did the LPA refuse the application because of highway or traffic public safety?
2574
2555
 
2575
- `isSiteInAreaOfSpecialControlAdverts`
2556
+ `wasApplicationRefusedDueToHighwayOrTraffic`
2576
2557
 
2577
2558
  * is optional
2578
2559
 
@@ -2580,17 +2561,17 @@ Indicates if the site is in an area of special control for adverts
2580
2561
 
2581
2562
  * can be null
2582
2563
 
2583
- * defined in: [Appeal HAS Case](appeal-has-properties-issiteinareaofspecialcontroladverts.md "appeal-has.schema.json#/properties/isSiteInAreaOfSpecialControlAdverts")
2564
+ * defined in: [Appeal HAS Case](appeal-has-properties-wasapplicationrefusedduetohighwayortraffic.md "appeal-has.schema.json#/properties/wasApplicationRefusedDueToHighwayOrTraffic")
2584
2565
 
2585
- ### isSiteInAreaOfSpecialControlAdverts Type
2566
+ ### wasApplicationRefusedDueToHighwayOrTraffic Type
2586
2567
 
2587
2568
  `boolean`
2588
2569
 
2589
- ## wasApplicationRefusedDueToHighwayOrTraffic
2570
+ ## didAppellantSubmitCompletePhotosAndPlans
2590
2571
 
2591
- Indicates if the application was refused because of highway or traffic public safety?
2572
+ Did the appellant submit complete photos and plans?
2592
2573
 
2593
- `wasApplicationRefusedDueToHighwayOrTraffic`
2574
+ `didAppellantSubmitCompletePhotosAndPlans`
2594
2575
 
2595
2576
  * is optional
2596
2577
 
@@ -2598,17 +2579,17 @@ Indicates if the application was refused because of highway or traffic public sa
2598
2579
 
2599
2580
  * can be null
2600
2581
 
2601
- * defined in: [Appeal HAS Case](appeal-has-properties-wasapplicationrefusedduetohighwayortraffic.md "appeal-has.schema.json#/properties/wasApplicationRefusedDueToHighwayOrTraffic")
2582
+ * defined in: [Appeal HAS Case](appeal-has-properties-didappellantsubmitcompletephotosandplans.md "appeal-has.schema.json#/properties/didAppellantSubmitCompletePhotosAndPlans")
2602
2583
 
2603
- ### wasApplicationRefusedDueToHighwayOrTraffic Type
2584
+ ### didAppellantSubmitCompletePhotosAndPlans Type
2604
2585
 
2605
2586
  `boolean`
2606
2587
 
2607
- ## didAppellantSubmitCompletePhotosAndPlans
2588
+ ## isSiteInAreaOfSpecialControlAdverts
2608
2589
 
2609
- Indicates if the appellant submitted complete and accurate photographs and plans
2590
+ Is the site in an area of special control of advertisements?
2610
2591
 
2611
- `didAppellantSubmitCompletePhotosAndPlans`
2592
+ `isSiteInAreaOfSpecialControlAdverts`
2612
2593
 
2613
2594
  * is optional
2614
2595
 
@@ -2616,31 +2597,31 @@ Indicates if the appellant submitted complete and accurate photographs and plans
2616
2597
 
2617
2598
  * can be null
2618
2599
 
2619
- * defined in: [Appeal HAS Case](appeal-has-properties-didappellantsubmitcompletephotosandplans.md "appeal-has.schema.json#/properties/didAppellantSubmitCompletePhotosAndPlans")
2600
+ * defined in: [Appeal HAS Case](appeal-has-properties-issiteinareaofspecialcontroladverts.md "appeal-has.schema.json#/properties/isSiteInAreaOfSpecialControlAdverts")
2620
2601
 
2621
- ### didAppellantSubmitCompletePhotosAndPlans Type
2602
+ ### isSiteInAreaOfSpecialControlAdverts Type
2622
2603
 
2623
2604
  `boolean`
2624
2605
 
2625
- ## advertType
2626
-
2606
+ ## advertDetails
2627
2607
 
2608
+ A list of advertisements for the appeal
2628
2609
 
2629
- > Pick from a TBD list of reference data for advert type
2610
+ > Also available on CAS Adverts (ZA) cases
2630
2611
 
2631
- `advertType`
2612
+ `advertDetails`
2632
2613
 
2633
2614
  * is optional
2634
2615
 
2635
- * Type: `string`
2616
+ * Type: `object[]` ([Details](appeal-has-properties-advertdetails-items.md))
2636
2617
 
2637
2618
  * can be null
2638
2619
 
2639
- * defined in: [Appeal HAS Case](appeal-has-properties-adverttype.md "appeal-has.schema.json#/properties/advertType")
2620
+ * defined in: [Appeal HAS Case](appeal-has-properties-advertdetails.md "appeal-has.schema.json#/properties/advertDetails")
2640
2621
 
2641
- ### advertType Type
2622
+ ### advertDetails Type
2642
2623
 
2643
- `string`
2624
+ `object[]` ([Details](appeal-has-properties-advertdetails-items.md))
2644
2625
 
2645
2626
  ## Additional Properties
2646
2627