diff --git a/docs/nsip-project-defs-invoice.md b/docs/nsip-project-defs-invoice.md index ebbf460..dd4e928 100644 --- a/docs/nsip-project-defs-invoice.md +++ b/docs/nsip-project-defs-invoice.md @@ -6,9 +6,9 @@ | Property | Type | Required | Nullable | Defined by | | :------------------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [invoiceStage](#invoicestage) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") | +| [invoiceStage](#invoicestage) | `string` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") | | [invoiceNumber](#invoicenumber) | `string` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicenumber.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceNumber") | -| [amountDue](#amountdue) | `number` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") | +| [amountDue](#amountdue) | `number` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") | | [paymentDueDate](#paymentduedate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-paymentduedate.md "nsip-project.schema.json#/$defs/invoice/properties/paymentDueDate") | | [invoicedDate](#invoiceddate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-invoiceddate.md "nsip-project.schema.json#/$defs/invoice/properties/invoicedDate") | | [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 `invoiceStage` -* is optional +* is required * Type: `string` -* can be null +* cannot be null * defined in: [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") @@ -46,7 +46,6 @@ Invoice stage | `"pre_examination"` | | | `"initial_examination"` | | | `"final_examination"` | | -| `null` | | ### invoiceStage Examples @@ -84,11 +83,11 @@ Amount due `amountDue` -* is required +* is optional * Type: `number` -* cannot be null +* can be null * defined in: [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") diff --git a/docs/nsip-project.md b/docs/nsip-project.md index 57a02ec..9fa2308 100644 --- a/docs/nsip-project.md +++ b/docs/nsip-project.md @@ -3783,9 +3783,9 @@ Reference this group by using | Property | Type | Required | Nullable | Defined by | | :------------------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [invoiceStage](#invoicestage) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") | +| [invoiceStage](#invoicestage) | `string` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") | | [invoiceNumber](#invoicenumber) | `string` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-invoicenumber.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceNumber") | -| [amountDue](#amountdue) | `number` | Required | cannot be null | [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") | +| [amountDue](#amountdue) | `number` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") | | [paymentDueDate](#paymentduedate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-paymentduedate.md "nsip-project.schema.json#/$defs/invoice/properties/paymentDueDate") | | [invoicedDate](#invoiceddate) | `string` | Optional | can be null | [NSIP Project](nsip-project-defs-invoice-properties-invoiceddate.md "nsip-project.schema.json#/$defs/invoice/properties/invoicedDate") | | [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 `invoiceStage` -* is optional +* is required * Type: `string` -* can be null +* cannot be null * defined in: [NSIP Project](nsip-project-defs-invoice-properties-invoicestage.md "nsip-project.schema.json#/$defs/invoice/properties/invoiceStage") @@ -3823,7 +3823,6 @@ Invoice stage | `"pre_examination"` | | | `"initial_examination"` | | | `"final_examination"` | | -| `null` | | #### invoiceStage Examples @@ -3861,11 +3860,11 @@ Amount due `amountDue` -* is required +* is optional * Type: `number` -* cannot be null +* can be null * defined in: [NSIP Project](nsip-project-defs-invoice-properties-amountdue.md "nsip-project.schema.json#/$defs/invoice/properties/amountDue") diff --git a/pins_data_model/models/model_appeal_document.py b/pins_data_model/models/model_appeal_document.py index dbe7bd4..108c779 100644 --- a/pins_data_model/models/model_appeal_document.py +++ b/pins_data_model/models/model_appeal_document.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: appeal-document.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:55+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_appeal_event.py b/pins_data_model/models/model_appeal_event.py index 5c7190e..0e92d9a 100644 --- a/pins_data_model/models/model_appeal_event.py +++ b/pins_data_model/models/model_appeal_event.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: appeal-event.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:55+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_appeal_event_estimate.py b/pins_data_model/models/model_appeal_event_estimate.py index a327303..c556e9d 100644 --- a/pins_data_model/models/model_appeal_event_estimate.py +++ b/pins_data_model/models/model_appeal_event_estimate.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: appeal-event-estimate.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:55+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_appeal_has.py b/pins_data_model/models/model_appeal_has.py index e0fc5f0..2196257 100644 --- a/pins_data_model/models/model_appeal_has.py +++ b/pins_data_model/models/model_appeal_has.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: appeal-has.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_appeal_representation.py b/pins_data_model/models/model_appeal_representation.py index 0c1605c..b967ec8 100644 --- a/pins_data_model/models/model_appeal_representation.py +++ b/pins_data_model/models/model_appeal_representation.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: appeal-representation.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_appeal_s78.py b/pins_data_model/models/model_appeal_s78.py index 796477e..8fb977b 100644 --- a/pins_data_model/models/model_appeal_s78.py +++ b/pins_data_model/models/model_appeal_s78.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: appeal-s78.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_dart_response.py b/pins_data_model/models/model_dart_response.py index b998cb1..9e786c1 100644 --- a/pins_data_model/models/model_dart_response.py +++ b/pins_data_model/models/model_dart_response.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: dart-response.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_entraid.py b/pins_data_model/models/model_entraid.py index bd136a4..a4a6bd7 100644 --- a/pins_data_model/models/model_entraid.py +++ b/pins_data_model/models/model_entraid.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: entraid.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_folder.py b/pins_data_model/models/model_folder.py index b18949c..129014c 100644 --- a/pins_data_model/models/model_folder.py +++ b/pins_data_model/models/model_folder.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: folder.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_gettimesheets_response.py b/pins_data_model/models/model_gettimesheets_response.py index 11cfb56..ec88efc 100644 --- a/pins_data_model/models/model_gettimesheets_response.py +++ b/pins_data_model/models/model_gettimesheets_response.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: gettimesheets-response.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_listed_building.py b/pins_data_model/models/model_listed_building.py index fb84f91..851843d 100644 --- a/pins_data_model/models/model_listed_building.py +++ b/pins_data_model/models/model_listed_building.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: listed-building.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_listed_buildings.py b/pins_data_model/models/model_listed_buildings.py index 025b79d..af27fd9 100644 --- a/pins_data_model/models/model_listed_buildings.py +++ b/pins_data_model/models/model_listed_buildings.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: listed-buildings.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_nsip_document.py b/pins_data_model/models/model_nsip_document.py index bc3312b..4560ce6 100644 --- a/pins_data_model/models/model_nsip_document.py +++ b/pins_data_model/models/model_nsip_document.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: nsip-document.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_nsip_exam_timetable.py b/pins_data_model/models/model_nsip_exam_timetable.py index 06d5e2e..a66f9da 100644 --- a/pins_data_model/models/model_nsip_exam_timetable.py +++ b/pins_data_model/models/model_nsip_exam_timetable.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: nsip-exam-timetable.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_nsip_invoice.py b/pins_data_model/models/model_nsip_invoice.py index 8bb2a77..7d633c5 100644 --- a/pins_data_model/models/model_nsip_invoice.py +++ b/pins_data_model/models/model_nsip_invoice.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: nsip-invoice.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_nsip_meeting.py b/pins_data_model/models/model_nsip_meeting.py index 45356f5..cdc0d1d 100644 --- a/pins_data_model/models/model_nsip_meeting.py +++ b/pins_data_model/models/model_nsip_meeting.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: nsip-meeting.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_nsip_project.py b/pins_data_model/models/model_nsip_project.py index 28d1ae4..dbaad74 100644 --- a/pins_data_model/models/model_nsip_project.py +++ b/pins_data_model/models/model_nsip_project.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: nsip-project.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:57+00:00 from __future__ import annotations @@ -352,7 +352,6 @@ class InvoiceStage(Enum): pre_examination = "pre_examination" initial_examination = "initial_examination" final_examination = "final_examination" - NoneType_None = None class Invoice(BaseModel): @@ -363,7 +362,7 @@ class Invoice(BaseModel): model_config = ConfigDict( extra="allow", ) - invoiceStage: InvoiceStage | None = Field(None, examples=["pre_acceptance"]) + invoiceStage: InvoiceStage = Field(..., examples=["pre_acceptance"]) """ Invoice stage """ @@ -371,7 +370,7 @@ class Invoice(BaseModel): """ Invoice number """ - amountDue: float = Field(..., examples=[500]) + amountDue: float | None = Field(None, examples=[500]) """ Amount due """ diff --git a/pins_data_model/models/model_nsip_project_update.py b/pins_data_model/models/model_nsip_project_update.py index a0eb7d5..b8b9f3c 100644 --- a/pins_data_model/models/model_nsip_project_update.py +++ b/pins_data_model/models/model_nsip_project_update.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: nsip-project-update.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:56+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_nsip_representation.py b/pins_data_model/models/model_nsip_representation.py index 1c98478..0989456 100644 --- a/pins_data_model/models/model_nsip_representation.py +++ b/pins_data_model/models/model_nsip_representation.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: nsip-representation.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:57+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_nsip_subscription.py b/pins_data_model/models/model_nsip_subscription.py index 1c4a69f..ff96758 100644 --- a/pins_data_model/models/model_nsip_subscription.py +++ b/pins_data_model/models/model_nsip_subscription.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: nsip-subscription.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:57+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_pins_inspector.py b/pins_data_model/models/model_pins_inspector.py index 454591b..8b3465a 100644 --- a/pins_data_model/models/model_pins_inspector.py +++ b/pins_data_model/models/model_pins_inspector.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: pins-inspector.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:57+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_pins_lpa.py b/pins_data_model/models/model_pins_lpa.py index 4819d98..cc8b480 100644 --- a/pins_data_model/models/model_pins_lpa.py +++ b/pins_data_model/models/model_pins_lpa.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: pins-lpa.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:57+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_s51_advice.py b/pins_data_model/models/model_s51_advice.py index 30c801f..a78cec4 100644 --- a/pins_data_model/models/model_s51_advice.py +++ b/pins_data_model/models/model_s51_advice.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: s51-advice.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:57+00:00 from __future__ import annotations diff --git a/pins_data_model/models/model_service_user.py b/pins_data_model/models/model_service_user.py index 48ec6bc..0fa07cc 100644 --- a/pins_data_model/models/model_service_user.py +++ b/pins_data_model/models/model_service_user.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: service-user.schema.json -# timestamp: 2026-03-06T13:54:17+00:00 +# timestamp: 2026-03-19T10:25:57+00:00 from __future__ import annotations diff --git a/schemas/nsip-project.schema.json b/schemas/nsip-project.schema.json index cde7d81..2224ac1 100644 --- a/schemas/nsip-project.schema.json +++ b/schemas/nsip-project.schema.json @@ -912,12 +912,12 @@ "type": "object", "additionalProperties": true, "description": "An invoice related to the project", - "required": ["invoiceNumber", "amountDue"], + "required": ["invoiceNumber", "invoiceStage"], "properties": { "invoiceStage": { - "type": ["string", "null"], + "type": "string", "description": "Invoice stage", - "enum": ["pre_acceptance", "acceptance", "pre_examination", "initial_examination", "final_examination", null], + "enum": ["pre_acceptance", "acceptance", "pre_examination", "initial_examination", "final_examination"], "examples": ["pre_acceptance"] }, "invoiceNumber": { @@ -926,7 +926,7 @@ "examples": ["1800004419"] }, "amountDue": { - "type": "number", + "type": ["number", "null"], "description": "Amount due", "examples": [500] }, diff --git a/src/schemas.d.ts b/src/schemas.d.ts index 6f453d1..320304a 100644 --- a/src/schemas.d.ts +++ b/src/schemas.d.ts @@ -2986,13 +2986,7 @@ export interface Invoice { /** * Invoice stage */ - invoiceStage?: - | 'pre_acceptance' - | 'acceptance' - | 'pre_examination' - | 'initial_examination' - | 'final_examination' - | null; + invoiceStage: 'pre_acceptance' | 'acceptance' | 'pre_examination' | 'initial_examination' | 'final_examination'; /** * Invoice number */ @@ -3000,7 +2994,7 @@ export interface Invoice { /** * Amount due */ - amountDue: number; + amountDue?: number | null; /** * Payment due date */