@planning-inspectorate/data-model 2.33.0 → 2.35.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 (35) hide show
  1. package/docs/nsip-document.md +1 -0
  2. package/docs/nsip-project-defs-invoice.md +6 -7
  3. package/docs/nsip-project.md +6 -7
  4. package/package.json +1 -1
  5. package/pins_data_model/models/model_appeal_document.py +1 -1
  6. package/pins_data_model/models/model_appeal_event.py +1 -1
  7. package/pins_data_model/models/model_appeal_event_estimate.py +1 -1
  8. package/pins_data_model/models/model_appeal_has.py +1 -1
  9. package/pins_data_model/models/model_appeal_representation.py +1 -1
  10. package/pins_data_model/models/model_appeal_s78.py +1 -1
  11. package/pins_data_model/models/model_dart_response.py +1 -1
  12. package/pins_data_model/models/model_entraid.py +1 -1
  13. package/pins_data_model/models/model_folder.py +1 -1
  14. package/pins_data_model/models/model_gettimesheets_response.py +1 -1
  15. package/pins_data_model/models/model_listed_building.py +1 -1
  16. package/pins_data_model/models/model_listed_buildings.py +1 -1
  17. package/pins_data_model/models/model_nsip_document.py +2 -1
  18. package/pins_data_model/models/model_nsip_exam_timetable.py +1 -1
  19. package/pins_data_model/models/model_nsip_invoice.py +1 -1
  20. package/pins_data_model/models/model_nsip_meeting.py +1 -1
  21. package/pins_data_model/models/model_nsip_project.py +3 -4
  22. package/pins_data_model/models/model_nsip_project_update.py +1 -1
  23. package/pins_data_model/models/model_nsip_representation.py +1 -1
  24. package/pins_data_model/models/model_nsip_subscription.py +1 -1
  25. package/pins_data_model/models/model_pins_inspector.py +1 -1
  26. package/pins_data_model/models/model_pins_lpa.py +1 -1
  27. package/pins_data_model/models/model_s51_advice.py +1 -1
  28. package/pins_data_model/models/model_service_user.py +1 -1
  29. package/schemas/nsip-document.schema.json +1 -0
  30. package/schemas/nsip-project.schema.json +4 -4
  31. package/src/enums.cjs +1 -0
  32. package/src/enums.d.ts +1 -0
  33. package/src/enums.js +1 -0
  34. package/src/index.cjs +1 -0
  35. package/src/schemas.d.ts +3 -8
@@ -562,6 +562,7 @@ The location of the published document. Only applicable to documents which are p
562
562
  | `"unpublished"` | |
563
563
  | `"unpublishing"` | |
564
564
  | `"awaiting_upload"` | |
565
+ | `"invalid"` | |
565
566
  | `null` | |
566
567
 
567
568
  ## datePublished
@@ -6,9 +6,9 @@
6
6
 
7
7
  | Property | Type | Required | Nullable | Defined by |
8
8
  | :------------------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
- | [invoiceStage](#invoicestage) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") |
9
+ | [invoiceStage](#invoicestage) | `string` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") |
10
10
  | [invoiceNumber](#invoicenumber) | `string` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicenumber.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceNumber") |
11
- | [amountDue](#amountdue) | `number` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") |
11
+ | [amountDue](#amountdue) | `number` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") |
12
12
  | [paymentDueDate](#paymentduedate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-paymentduedate.md "nsip-project.schema.json#/$defs/invoice/properties/paymentDueDate") |
13
13
  | [invoicedDate](#invoiceddate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-invoiceddate.md "nsip-project.schema.json#/$defs/invoice/properties/invoicedDate") |
14
14
  | [paymentDate](#paymentdate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-paymentdate.md "nsip-project.schema.json#/$defs/invoice/properties/paymentDate") |
@@ -23,11 +23,11 @@ Invoice stage
23
23
 
24
24
  `invoiceStage`
25
25
 
26
- * is optional
26
+ * is required
27
27
 
28
28
  * Type: `string`
29
29
 
30
- * can be null
30
+ * cannot be null
31
31
 
32
32
  * defined in: [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage")
33
33
 
@@ -46,7 +46,6 @@ Invoice stage
46
46
  | `"pre_examination"` | |
47
47
  | `"initial_examination"` | |
48
48
  | `"final_examination"` | |
49
- | `null` | |
50
49
 
51
50
  ### invoiceStage Examples
52
51
 
@@ -84,11 +83,11 @@ Amount due
84
83
 
85
84
  `amountDue`
86
85
 
87
- * is required
86
+ * is optional
88
87
 
89
88
  * Type: `number`
90
89
 
91
- * cannot be null
90
+ * can be null
92
91
 
93
92
  * defined in: [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue")
94
93
 
@@ -3783,9 +3783,9 @@ Reference this group by using
3783
3783
 
3784
3784
  | Property | Type | Required | Nullable | Defined by |
3785
3785
  | :------------------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
3786
- | [invoiceStage](#invoicestage) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") |
3786
+ | [invoiceStage](#invoicestage) | `string` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") |
3787
3787
  | [invoiceNumber](#invoicenumber) | `string` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicenumber.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceNumber") |
3788
- | [amountDue](#amountdue) | `number` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") |
3788
+ | [amountDue](#amountdue) | `number` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") |
3789
3789
  | [paymentDueDate](#paymentduedate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-paymentduedate.md "nsip-project.schema.json#/$defs/invoice/properties/paymentDueDate") |
3790
3790
  | [invoicedDate](#invoiceddate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-invoiceddate.md "nsip-project.schema.json#/$defs/invoice/properties/invoicedDate") |
3791
3791
  | [paymentDate](#paymentdate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-paymentdate.md "nsip-project.schema.json#/$defs/invoice/properties/paymentDate") |
@@ -3800,11 +3800,11 @@ Invoice stage
3800
3800
 
3801
3801
  `invoiceStage`
3802
3802
 
3803
- * is optional
3803
+ * is required
3804
3804
 
3805
3805
  * Type: `string`
3806
3806
 
3807
- * can be null
3807
+ * cannot be null
3808
3808
 
3809
3809
  * defined in: [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage")
3810
3810
 
@@ -3823,7 +3823,6 @@ Invoice stage
3823
3823
  | `"pre_examination"` | |
3824
3824
  | `"initial_examination"` | |
3825
3825
  | `"final_examination"` | |
3826
- | `null` | |
3827
3826
 
3828
3827
  #### invoiceStage Examples
3829
3828
 
@@ -3861,11 +3860,11 @@ Amount due
3861
3860
 
3862
3861
  `amountDue`
3863
3862
 
3864
- * is required
3863
+ * is optional
3865
3864
 
3866
3865
  * Type: `number`
3867
3866
 
3868
- * cannot be null
3867
+ * can be null
3869
3868
 
3870
3869
  * defined in: [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue")
3871
3870
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/data-model",
3
- "version": "2.33.0",
3
+ "version": "2.35.0",
4
4
  "description": "JSON Schemas for the Planning Inspectorate's Data Model",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-document.schema.json
3
- # timestamp: 2026-04-22T14:15:03+00:00
3
+ # timestamp: 2026-04-27T09:12:35+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-event.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:35+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-event-estimate.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:35+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-has.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:35+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-representation.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:35+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: appeal-s78.schema.json
3
- # timestamp: 2026-04-22T14:15:03+00:00
3
+ # timestamp: 2026-04-27T09:12:35+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: dart-response.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: entraid.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: folder.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: gettimesheets-response.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: listed-building.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: listed-buildings.schema.json
3
- # timestamp: 2026-04-22T14:15:03+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: nsip-document.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -45,6 +45,7 @@ class PublishedStatus(Enum):
45
45
  unpublished = "unpublished"
46
46
  unpublishing = "unpublishing"
47
47
  awaiting_upload = "awaiting_upload"
48
+ invalid = "invalid"
48
49
  NoneType_None = None
49
50
 
50
51
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: nsip-exam-timetable.schema.json
3
- # timestamp: 2026-04-22T14:15:03+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: nsip-invoice.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: nsip-meeting.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: nsip-project.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -352,7 +352,6 @@ class InvoiceStage(Enum):
352
352
  pre_examination = "pre_examination"
353
353
  initial_examination = "initial_examination"
354
354
  final_examination = "final_examination"
355
- NoneType_None = None
356
355
 
357
356
 
358
357
  class Invoice(BaseModel):
@@ -363,7 +362,7 @@ class Invoice(BaseModel):
363
362
  model_config = ConfigDict(
364
363
  extra="allow",
365
364
  )
366
- invoiceStage: InvoiceStage | None = Field(None, examples=["pre_acceptance"])
365
+ invoiceStage: InvoiceStage = Field(..., examples=["pre_acceptance"])
367
366
  """
368
367
  Invoice stage
369
368
  """
@@ -371,7 +370,7 @@ class Invoice(BaseModel):
371
370
  """
372
371
  Invoice number
373
372
  """
374
- amountDue: float = Field(..., examples=[500])
373
+ amountDue: float | None = Field(None, examples=[500])
375
374
  """
376
375
  Amount due
377
376
  """
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: nsip-project-update.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: nsip-representation.schema.json
3
- # timestamp: 2026-04-22T14:15:03+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: nsip-subscription.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: pins-inspector.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: pins-lpa.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: s51-advice.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: service-user.schema.json
3
- # timestamp: 2026-04-22T14:15:02+00:00
3
+ # timestamp: 2026-04-27T09:12:36+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -154,6 +154,7 @@
154
154
  "unpublished",
155
155
  "unpublishing",
156
156
  "awaiting_upload",
157
+ "invalid",
157
158
  null
158
159
  ]
159
160
  },
@@ -912,12 +912,12 @@
912
912
  "type": "object",
913
913
  "additionalProperties": true,
914
914
  "description": "An invoice related to the project",
915
- "required": ["invoiceNumber", "amountDue"],
915
+ "required": ["invoiceNumber", "invoiceStage"],
916
916
  "properties": {
917
917
  "invoiceStage": {
918
- "type": ["string", "null"],
918
+ "type": "string",
919
919
  "description": "Invoice stage",
920
- "enum": ["pre_acceptance", "acceptance", "pre_examination", "initial_examination", "final_examination", null],
920
+ "enum": ["pre_acceptance", "acceptance", "pre_examination", "initial_examination", "final_examination"],
921
921
  "examples": ["pre_acceptance"]
922
922
  },
923
923
  "invoiceNumber": {
@@ -926,7 +926,7 @@
926
926
  "examples": ["1800004419"]
927
927
  },
928
928
  "amountDue": {
929
- "type": "number",
929
+ "type": ["number", "null"],
930
930
  "description": "Amount due",
931
931
  "examples": [500]
932
932
  },
package/src/enums.cjs CHANGED
@@ -640,6 +640,7 @@ const NSIP_PUBLISHED_STATUS = Object.freeze({
640
640
  AWAITING_UPLOAD: 'awaiting_upload',
641
641
  CHECKED: 'checked',
642
642
  DO_NOT_PUBLISH: 'do_not_publish',
643
+ INVALID: 'invalid',
643
644
  NOT_CHECKED: 'not_checked',
644
645
  PUBLISHED: 'published',
645
646
  PUBLISHING: 'publishing',
package/src/enums.d.ts CHANGED
@@ -638,6 +638,7 @@ export const NSIP_PUBLISHED_STATUS = {
638
638
  AWAITING_UPLOAD: 'awaiting_upload',
639
639
  CHECKED: 'checked',
640
640
  DO_NOT_PUBLISH: 'do_not_publish',
641
+ INVALID: 'invalid',
641
642
  NOT_CHECKED: 'not_checked',
642
643
  PUBLISHED: 'published',
643
644
  PUBLISHING: 'publishing',
package/src/enums.js CHANGED
@@ -638,6 +638,7 @@ export const NSIP_PUBLISHED_STATUS = Object.freeze({
638
638
  AWAITING_UPLOAD: 'awaiting_upload',
639
639
  CHECKED: 'checked',
640
640
  DO_NOT_PUBLISH: 'do_not_publish',
641
+ INVALID: 'invalid',
641
642
  NOT_CHECKED: 'not_checked',
642
643
  PUBLISHED: 'published',
643
644
  PUBLISHING: 'publishing',
package/src/index.cjs CHANGED
@@ -721,6 +721,7 @@ const NSIP_PUBLISHED_STATUS = Object.freeze({
721
721
  AWAITING_UPLOAD: 'awaiting_upload',
722
722
  CHECKED: 'checked',
723
723
  DO_NOT_PUBLISH: 'do_not_publish',
724
+ INVALID: 'invalid',
724
725
  NOT_CHECKED: 'not_checked',
725
726
  PUBLISHED: 'published',
726
727
  PUBLISHING: 'publishing',
package/src/schemas.d.ts CHANGED
@@ -2212,6 +2212,7 @@ export interface NSIPDocument {
2212
2212
  | 'unpublished'
2213
2213
  | 'unpublishing'
2214
2214
  | 'awaiting_upload'
2215
+ | 'invalid'
2215
2216
  | null;
2216
2217
  datePublished: string | null;
2217
2218
  documentType: string | null;
@@ -3033,13 +3034,7 @@ export interface Invoice {
3033
3034
  /**
3034
3035
  * Invoice stage
3035
3036
  */
3036
- invoiceStage?:
3037
- | 'pre_acceptance'
3038
- | 'acceptance'
3039
- | 'pre_examination'
3040
- | 'initial_examination'
3041
- | 'final_examination'
3042
- | null;
3037
+ invoiceStage: 'pre_acceptance' | 'acceptance' | 'pre_examination' | 'initial_examination' | 'final_examination';
3043
3038
  /**
3044
3039
  * Invoice number
3045
3040
  */
@@ -3047,7 +3042,7 @@ export interface Invoice {
3047
3042
  /**
3048
3043
  * Amount due
3049
3044
  */
3050
- amountDue: number;
3045
+ amountDue?: number | null;
3051
3046
  /**
3052
3047
  * Payment due date
3053
3048
  */