@planning-inspectorate/data-model 2.41.0 → 2.42.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/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
|
@@ -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
|
|
@@ -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
|
@@ -2411,17 +2411,11 @@ export interface NSIPInvoice {
|
|
|
2411
2411
|
* The unique identifier within the Back Office. This is not the same as the case reference
|
|
2412
2412
|
*/
|
|
2413
2413
|
caseId: number;
|
|
2414
|
-
caseReference
|
|
2414
|
+
caseReference?: string | null;
|
|
2415
2415
|
/**
|
|
2416
2416
|
* Invoice stage
|
|
2417
2417
|
*/
|
|
2418
|
-
invoiceStage:
|
|
2419
|
-
| 'pre_acceptance'
|
|
2420
|
-
| 'acceptance'
|
|
2421
|
-
| 'pre_examination'
|
|
2422
|
-
| 'initial_examination'
|
|
2423
|
-
| 'final_examination'
|
|
2424
|
-
| null;
|
|
2418
|
+
invoiceStage: 'pre_acceptance' | 'acceptance' | 'pre_examination' | 'initial_examination' | 'final_examination';
|
|
2425
2419
|
/**
|
|
2426
2420
|
* Invoice number
|
|
2427
2421
|
*/
|
|
@@ -2429,31 +2423,31 @@ export interface NSIPInvoice {
|
|
|
2429
2423
|
/**
|
|
2430
2424
|
* Amount due
|
|
2431
2425
|
*/
|
|
2432
|
-
amountDue
|
|
2426
|
+
amountDue?: number | null;
|
|
2433
2427
|
/**
|
|
2434
2428
|
* Payment due date
|
|
2435
2429
|
*/
|
|
2436
|
-
paymentDueDate
|
|
2430
|
+
paymentDueDate?: string | null;
|
|
2437
2431
|
/**
|
|
2438
2432
|
* Invoiced date
|
|
2439
2433
|
*/
|
|
2440
|
-
invoicedDate
|
|
2434
|
+
invoicedDate?: string | null;
|
|
2441
2435
|
/**
|
|
2442
2436
|
* Date of payment
|
|
2443
2437
|
*/
|
|
2444
|
-
paymentDate
|
|
2438
|
+
paymentDate?: string | null;
|
|
2445
2439
|
/**
|
|
2446
2440
|
* Refund credit note number
|
|
2447
2441
|
*/
|
|
2448
|
-
refundCreditNoteNumber
|
|
2442
|
+
refundCreditNoteNumber?: string | null;
|
|
2449
2443
|
/**
|
|
2450
2444
|
* Amount refunded
|
|
2451
2445
|
*/
|
|
2452
|
-
refundAmount
|
|
2446
|
+
refundAmount?: number | null;
|
|
2453
2447
|
/**
|
|
2454
2448
|
* Refund issue date
|
|
2455
2449
|
*/
|
|
2456
|
-
refundIssueDate
|
|
2450
|
+
refundIssueDate?: string | null;
|
|
2457
2451
|
[k: string]: unknown;
|
|
2458
2452
|
}
|
|
2459
2453
|
|