@insurance-broker/api-client 1.33.0 → 1.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.
- package/dist/schema.d.ts +361 -0
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -74,6 +74,34 @@ export interface paths {
|
|
|
74
74
|
patch?: never;
|
|
75
75
|
trace?: never;
|
|
76
76
|
};
|
|
77
|
+
"/api/v1/obligations/{id}/write-off": {
|
|
78
|
+
parameters: {
|
|
79
|
+
query?: never;
|
|
80
|
+
header?: never;
|
|
81
|
+
path?: never;
|
|
82
|
+
cookie?: never;
|
|
83
|
+
};
|
|
84
|
+
get?: never;
|
|
85
|
+
put?: never;
|
|
86
|
+
/**
|
|
87
|
+
* Forgive a debt that will not be collected
|
|
88
|
+
* @description PAY-002, and ADR-0042 section 12's anchoring event. Records that a **real** debt will not be collected, with the reason on the record.
|
|
89
|
+
*
|
|
90
|
+
* **This is not a cancellation.** Cancelling says the charge should never have existed; writing off says it should have been paid and will not be. A broker asking "how much did we forgive" needs the two apart, so they are separate acts with separate audit actions.
|
|
91
|
+
*
|
|
92
|
+
* **The reason is required and is the broker's own words.** This platform declares no vocabulary of write-off reasons, because why a debt is forgiven is a broker's collections policy rather than a platform's.
|
|
93
|
+
*
|
|
94
|
+
* **It is why an obligation nobody will chase is not kept for ever.** An unsettled charge has no retention anchor and is therefore kept (ADR-0038 section 2); writing one off is the event that starts its clock.
|
|
95
|
+
*
|
|
96
|
+
* Refused on a charge that has already concluded — a settled one was paid and a cancelled one was never owed — rather than silently re-stamping an anchor.
|
|
97
|
+
*/
|
|
98
|
+
post: operations["WriteOffObligation"];
|
|
99
|
+
delete?: never;
|
|
100
|
+
options?: never;
|
|
101
|
+
head?: never;
|
|
102
|
+
patch?: never;
|
|
103
|
+
trace?: never;
|
|
104
|
+
};
|
|
77
105
|
"/api/v1/invoices": {
|
|
78
106
|
parameters: {
|
|
79
107
|
query?: never;
|
|
@@ -148,6 +176,40 @@ export interface paths {
|
|
|
148
176
|
patch?: never;
|
|
149
177
|
trace?: never;
|
|
150
178
|
};
|
|
179
|
+
"/api/v1/invoices/{id}/credit-notes": {
|
|
180
|
+
parameters: {
|
|
181
|
+
query?: never;
|
|
182
|
+
header?: never;
|
|
183
|
+
path?: never;
|
|
184
|
+
cookie?: never;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* The corrections issued against an invoice
|
|
188
|
+
* @description Oldest first, each with its lines. **The invoice's own figures are unchanged by any of them** - what a customer was demanded and what has since been credited are two separate records, which is what BR-010 asks for.
|
|
189
|
+
*
|
|
190
|
+
* There is no paging: an invoice's corrections are a handful of records by nature.
|
|
191
|
+
*/
|
|
192
|
+
get: operations["ListCreditNotes"];
|
|
193
|
+
put?: never;
|
|
194
|
+
/**
|
|
195
|
+
* Correct an issued invoice with a credit note
|
|
196
|
+
* @description BR-010 and ADR-0042 section 8. **A correction to an issued invoice is a new record and never an edit** - "a separate record referencing the invoice it corrects, with its own lines and its own document. Never an edit, never a negative line on the original."
|
|
197
|
+
*
|
|
198
|
+
* **It arrives complete.** Unlike an invoice there is no draft and no route to add a line: a correction is a decision already taken, so it is immutable from the moment it is written.
|
|
199
|
+
*
|
|
200
|
+
* **Every amount is positive.** A credit is carried by the *kind* of record rather than by the sign of a number, so the original invoice's figures are untouched and byte-identical afterwards.
|
|
201
|
+
*
|
|
202
|
+
* **It may not credit more than the invoice demanded**, counting what earlier credit notes already credit. Crediting past the demand is a payment out rather than a correction, and a refund is its own record (WRK-004, Phase 2).
|
|
203
|
+
*
|
|
204
|
+
* Refused against a **draft** invoice: a draft was never demanded of anybody, so it is discarded rather than credited.
|
|
205
|
+
*/
|
|
206
|
+
post: operations["IssueCreditNote"];
|
|
207
|
+
delete?: never;
|
|
208
|
+
options?: never;
|
|
209
|
+
head?: never;
|
|
210
|
+
patch?: never;
|
|
211
|
+
trace?: never;
|
|
212
|
+
};
|
|
151
213
|
"/api/v1/invoices/{id}/discarding": {
|
|
152
214
|
parameters: {
|
|
153
215
|
query?: never;
|
|
@@ -320,6 +382,38 @@ export interface paths {
|
|
|
320
382
|
patch?: never;
|
|
321
383
|
trace?: never;
|
|
322
384
|
};
|
|
385
|
+
"/api/v1/payments/{id}/reversal": {
|
|
386
|
+
parameters: {
|
|
387
|
+
query?: never;
|
|
388
|
+
header?: never;
|
|
389
|
+
path?: never;
|
|
390
|
+
cookie?: never;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* The reversal against a payment, if there is one
|
|
394
|
+
* @description `404` when the payment has not been reversed, which is the ordinary case — a reversal is a correction and most payments never need one.
|
|
395
|
+
*
|
|
396
|
+
* **At most one exists**, which a unique index guarantees rather than a handler, so this route answers a single record and never a list.
|
|
397
|
+
*/
|
|
398
|
+
get: operations["GetPaymentReversal"];
|
|
399
|
+
put?: never;
|
|
400
|
+
/**
|
|
401
|
+
* Record that a payment's money did not arrive after all
|
|
402
|
+
* @description BR-010 and ADR-0042 section 8. **A posted payment is never edited** — a mistake is a reversal record and the original stays. That is also what keeps the phase's exit criterion safe: if a posting could be edited its external reference could be edited, and the unique index would stop guaranteeing that the same money cannot be recorded twice.
|
|
403
|
+
*
|
|
404
|
+
* **It reverses the whole payment.** There is no amount to supply: a partial reversal would be a way to edit a figure by degrees, and money that arrived for the wrong amount was already refused at recording.
|
|
405
|
+
*
|
|
406
|
+
* **Once per payment.** A second attempt is a `409` and is not retryable — a unique index refuses it, so a race and an ordinary re-run read identically.
|
|
407
|
+
*
|
|
408
|
+
* **It does not re-open the charge the payment settled**, and that is deliberate rather than an oversight. A retention anchor once stamped is never moved (ADR-0038), and `Settled` records that the payments covered the debt at a knowable instant — which stayed true of that instant. What a broker owes after a reversal is collected by raising the charge again, which leaves both facts on the ledger instead of one row that has quietly changed its mind. The reversal appears in the payment's own history, which is the read a finance officer explains a payment from.
|
|
409
|
+
*/
|
|
410
|
+
post: operations["ReversePayment"];
|
|
411
|
+
delete?: never;
|
|
412
|
+
options?: never;
|
|
413
|
+
head?: never;
|
|
414
|
+
patch?: never;
|
|
415
|
+
trace?: never;
|
|
416
|
+
};
|
|
323
417
|
"/api/v1/payments/{id}/evidence/{evidenceId}/content": {
|
|
324
418
|
parameters: {
|
|
325
419
|
query?: never;
|
|
@@ -4039,6 +4133,38 @@ export interface components {
|
|
|
4039
4133
|
name: null | string;
|
|
4040
4134
|
registrationNumber: null | string;
|
|
4041
4135
|
};
|
|
4136
|
+
CreditNoteLineRequest: {
|
|
4137
|
+
kind: string;
|
|
4138
|
+
description: string;
|
|
4139
|
+
/** Format: double */
|
|
4140
|
+
amount: number | string;
|
|
4141
|
+
};
|
|
4142
|
+
CreditNoteLineResponse: {
|
|
4143
|
+
/** Format: uuid */
|
|
4144
|
+
id: string;
|
|
4145
|
+
/** Format: int32 */
|
|
4146
|
+
ordinal: number | string;
|
|
4147
|
+
kind: string;
|
|
4148
|
+
description: string;
|
|
4149
|
+
/** Format: double */
|
|
4150
|
+
amount: number | string;
|
|
4151
|
+
};
|
|
4152
|
+
CreditNoteResponse: {
|
|
4153
|
+
/** Format: uuid */
|
|
4154
|
+
id: string;
|
|
4155
|
+
/** Format: uuid */
|
|
4156
|
+
invoiceId: string;
|
|
4157
|
+
/** Format: uuid */
|
|
4158
|
+
customerId: string;
|
|
4159
|
+
/** Format: double */
|
|
4160
|
+
totalAmount: number | string;
|
|
4161
|
+
currency: string;
|
|
4162
|
+
reason: string;
|
|
4163
|
+
/** Format: date-time */
|
|
4164
|
+
issuedAtUtc: string;
|
|
4165
|
+
issuedBySubjectId: string;
|
|
4166
|
+
lines: components["schemas"]["CreditNoteLineResponse"][];
|
|
4167
|
+
};
|
|
4042
4168
|
CustomerClaimPage: {
|
|
4043
4169
|
items: components["schemas"]["ClaimResponse"][];
|
|
4044
4170
|
nextCursor: null | string;
|
|
@@ -4553,6 +4679,10 @@ export interface components {
|
|
|
4553
4679
|
retentionAnchorAtUtc: null | string;
|
|
4554
4680
|
lines: components["schemas"]["InvoiceLineResponse"][];
|
|
4555
4681
|
};
|
|
4682
|
+
IssueCreditNoteRequest: {
|
|
4683
|
+
reason: string;
|
|
4684
|
+
lines: components["schemas"]["CreditNoteLineRequest"][];
|
|
4685
|
+
};
|
|
4556
4686
|
IssuedCustomerInvitationResponse: {
|
|
4557
4687
|
/** Format: uuid */
|
|
4558
4688
|
id: string;
|
|
@@ -4641,6 +4771,7 @@ export interface components {
|
|
|
4641
4771
|
raisedAtUtc: string;
|
|
4642
4772
|
/** Format: date-time */
|
|
4643
4773
|
retentionAnchorAtUtc: null | string;
|
|
4774
|
+
writeOffReason: null | string;
|
|
4644
4775
|
};
|
|
4645
4776
|
OfferedFormResponse: {
|
|
4646
4777
|
/** Format: uuid */
|
|
@@ -4798,6 +4929,19 @@ export interface components {
|
|
|
4798
4929
|
/** Format: date-time */
|
|
4799
4930
|
approvedAtUtc: null | string;
|
|
4800
4931
|
};
|
|
4932
|
+
PaymentReversalResponse: {
|
|
4933
|
+
/** Format: uuid */
|
|
4934
|
+
id: string;
|
|
4935
|
+
/** Format: uuid */
|
|
4936
|
+
paymentId: string;
|
|
4937
|
+
/** Format: double */
|
|
4938
|
+
amount: number | string;
|
|
4939
|
+
currency: string;
|
|
4940
|
+
reason: string;
|
|
4941
|
+
/** Format: date-time */
|
|
4942
|
+
reversedAtUtc: string;
|
|
4943
|
+
reversedBySubjectId: string;
|
|
4944
|
+
};
|
|
4801
4945
|
PlaceLegalHoldRequest: {
|
|
4802
4946
|
moduleName: null | string;
|
|
4803
4947
|
entityType: null | string;
|
|
@@ -5377,6 +5521,9 @@ export interface components {
|
|
|
5377
5521
|
updatedAtUtc: null | string;
|
|
5378
5522
|
setBySubjectId: null | string;
|
|
5379
5523
|
};
|
|
5524
|
+
ReversePaymentRequest: {
|
|
5525
|
+
reason: string;
|
|
5526
|
+
};
|
|
5380
5527
|
ReviseComparisonSchemaBodyRequest: {
|
|
5381
5528
|
body: null | string;
|
|
5382
5529
|
/** Format: int32 */
|
|
@@ -5551,6 +5698,9 @@ export interface components {
|
|
|
5551
5698
|
WriteClaimNoteRequest: {
|
|
5552
5699
|
body: string;
|
|
5553
5700
|
};
|
|
5701
|
+
WriteOffObligationRequest: {
|
|
5702
|
+
reason: string;
|
|
5703
|
+
};
|
|
5554
5704
|
};
|
|
5555
5705
|
responses: never;
|
|
5556
5706
|
parameters: never;
|
|
@@ -5660,6 +5810,57 @@ export interface operations {
|
|
|
5660
5810
|
};
|
|
5661
5811
|
};
|
|
5662
5812
|
};
|
|
5813
|
+
WriteOffObligation: {
|
|
5814
|
+
parameters: {
|
|
5815
|
+
query?: never;
|
|
5816
|
+
header?: never;
|
|
5817
|
+
path: {
|
|
5818
|
+
id: string;
|
|
5819
|
+
};
|
|
5820
|
+
cookie?: never;
|
|
5821
|
+
};
|
|
5822
|
+
requestBody: {
|
|
5823
|
+
content: {
|
|
5824
|
+
"application/json": components["schemas"]["WriteOffObligationRequest"];
|
|
5825
|
+
};
|
|
5826
|
+
};
|
|
5827
|
+
responses: {
|
|
5828
|
+
/** @description OK */
|
|
5829
|
+
200: {
|
|
5830
|
+
headers: {
|
|
5831
|
+
[name: string]: unknown;
|
|
5832
|
+
};
|
|
5833
|
+
content: {
|
|
5834
|
+
"application/json": components["schemas"]["ObligationResponse"];
|
|
5835
|
+
};
|
|
5836
|
+
};
|
|
5837
|
+
/** @description Bad Request */
|
|
5838
|
+
400: {
|
|
5839
|
+
headers: {
|
|
5840
|
+
[name: string]: unknown;
|
|
5841
|
+
};
|
|
5842
|
+
content: {
|
|
5843
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
5844
|
+
};
|
|
5845
|
+
};
|
|
5846
|
+
/** @description Not Found */
|
|
5847
|
+
404: {
|
|
5848
|
+
headers: {
|
|
5849
|
+
[name: string]: unknown;
|
|
5850
|
+
};
|
|
5851
|
+
content?: never;
|
|
5852
|
+
};
|
|
5853
|
+
/** @description Conflict */
|
|
5854
|
+
409: {
|
|
5855
|
+
headers: {
|
|
5856
|
+
[name: string]: unknown;
|
|
5857
|
+
};
|
|
5858
|
+
content: {
|
|
5859
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
5860
|
+
};
|
|
5861
|
+
};
|
|
5862
|
+
};
|
|
5863
|
+
};
|
|
5663
5864
|
DraftInvoice: {
|
|
5664
5865
|
parameters: {
|
|
5665
5866
|
query?: never;
|
|
@@ -5782,6 +5983,86 @@ export interface operations {
|
|
|
5782
5983
|
};
|
|
5783
5984
|
};
|
|
5784
5985
|
};
|
|
5986
|
+
ListCreditNotes: {
|
|
5987
|
+
parameters: {
|
|
5988
|
+
query?: never;
|
|
5989
|
+
header?: never;
|
|
5990
|
+
path: {
|
|
5991
|
+
id: string;
|
|
5992
|
+
};
|
|
5993
|
+
cookie?: never;
|
|
5994
|
+
};
|
|
5995
|
+
requestBody?: never;
|
|
5996
|
+
responses: {
|
|
5997
|
+
/** @description OK */
|
|
5998
|
+
200: {
|
|
5999
|
+
headers: {
|
|
6000
|
+
[name: string]: unknown;
|
|
6001
|
+
};
|
|
6002
|
+
content: {
|
|
6003
|
+
"application/json": components["schemas"]["CreditNoteResponse"][];
|
|
6004
|
+
};
|
|
6005
|
+
};
|
|
6006
|
+
/** @description Not Found */
|
|
6007
|
+
404: {
|
|
6008
|
+
headers: {
|
|
6009
|
+
[name: string]: unknown;
|
|
6010
|
+
};
|
|
6011
|
+
content?: never;
|
|
6012
|
+
};
|
|
6013
|
+
};
|
|
6014
|
+
};
|
|
6015
|
+
IssueCreditNote: {
|
|
6016
|
+
parameters: {
|
|
6017
|
+
query?: never;
|
|
6018
|
+
header?: never;
|
|
6019
|
+
path: {
|
|
6020
|
+
id: string;
|
|
6021
|
+
};
|
|
6022
|
+
cookie?: never;
|
|
6023
|
+
};
|
|
6024
|
+
requestBody: {
|
|
6025
|
+
content: {
|
|
6026
|
+
"application/json": components["schemas"]["IssueCreditNoteRequest"];
|
|
6027
|
+
};
|
|
6028
|
+
};
|
|
6029
|
+
responses: {
|
|
6030
|
+
/** @description Created */
|
|
6031
|
+
201: {
|
|
6032
|
+
headers: {
|
|
6033
|
+
[name: string]: unknown;
|
|
6034
|
+
};
|
|
6035
|
+
content: {
|
|
6036
|
+
"application/json": components["schemas"]["CreditNoteResponse"];
|
|
6037
|
+
};
|
|
6038
|
+
};
|
|
6039
|
+
/** @description Bad Request */
|
|
6040
|
+
400: {
|
|
6041
|
+
headers: {
|
|
6042
|
+
[name: string]: unknown;
|
|
6043
|
+
};
|
|
6044
|
+
content: {
|
|
6045
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
6046
|
+
};
|
|
6047
|
+
};
|
|
6048
|
+
/** @description Not Found */
|
|
6049
|
+
404: {
|
|
6050
|
+
headers: {
|
|
6051
|
+
[name: string]: unknown;
|
|
6052
|
+
};
|
|
6053
|
+
content?: never;
|
|
6054
|
+
};
|
|
6055
|
+
/** @description Conflict */
|
|
6056
|
+
409: {
|
|
6057
|
+
headers: {
|
|
6058
|
+
[name: string]: unknown;
|
|
6059
|
+
};
|
|
6060
|
+
content: {
|
|
6061
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
6062
|
+
};
|
|
6063
|
+
};
|
|
6064
|
+
};
|
|
6065
|
+
};
|
|
5785
6066
|
DiscardInvoice: {
|
|
5786
6067
|
parameters: {
|
|
5787
6068
|
query?: never;
|
|
@@ -6025,6 +6306,86 @@ export interface operations {
|
|
|
6025
6306
|
};
|
|
6026
6307
|
};
|
|
6027
6308
|
};
|
|
6309
|
+
GetPaymentReversal: {
|
|
6310
|
+
parameters: {
|
|
6311
|
+
query?: never;
|
|
6312
|
+
header?: never;
|
|
6313
|
+
path: {
|
|
6314
|
+
id: string;
|
|
6315
|
+
};
|
|
6316
|
+
cookie?: never;
|
|
6317
|
+
};
|
|
6318
|
+
requestBody?: never;
|
|
6319
|
+
responses: {
|
|
6320
|
+
/** @description OK */
|
|
6321
|
+
200: {
|
|
6322
|
+
headers: {
|
|
6323
|
+
[name: string]: unknown;
|
|
6324
|
+
};
|
|
6325
|
+
content: {
|
|
6326
|
+
"application/json": components["schemas"]["PaymentReversalResponse"];
|
|
6327
|
+
};
|
|
6328
|
+
};
|
|
6329
|
+
/** @description Not Found */
|
|
6330
|
+
404: {
|
|
6331
|
+
headers: {
|
|
6332
|
+
[name: string]: unknown;
|
|
6333
|
+
};
|
|
6334
|
+
content?: never;
|
|
6335
|
+
};
|
|
6336
|
+
};
|
|
6337
|
+
};
|
|
6338
|
+
ReversePayment: {
|
|
6339
|
+
parameters: {
|
|
6340
|
+
query?: never;
|
|
6341
|
+
header?: never;
|
|
6342
|
+
path: {
|
|
6343
|
+
id: string;
|
|
6344
|
+
};
|
|
6345
|
+
cookie?: never;
|
|
6346
|
+
};
|
|
6347
|
+
requestBody: {
|
|
6348
|
+
content: {
|
|
6349
|
+
"application/json": components["schemas"]["ReversePaymentRequest"];
|
|
6350
|
+
};
|
|
6351
|
+
};
|
|
6352
|
+
responses: {
|
|
6353
|
+
/** @description Created */
|
|
6354
|
+
201: {
|
|
6355
|
+
headers: {
|
|
6356
|
+
[name: string]: unknown;
|
|
6357
|
+
};
|
|
6358
|
+
content: {
|
|
6359
|
+
"application/json": components["schemas"]["PaymentReversalResponse"];
|
|
6360
|
+
};
|
|
6361
|
+
};
|
|
6362
|
+
/** @description Bad Request */
|
|
6363
|
+
400: {
|
|
6364
|
+
headers: {
|
|
6365
|
+
[name: string]: unknown;
|
|
6366
|
+
};
|
|
6367
|
+
content: {
|
|
6368
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
6369
|
+
};
|
|
6370
|
+
};
|
|
6371
|
+
/** @description Not Found */
|
|
6372
|
+
404: {
|
|
6373
|
+
headers: {
|
|
6374
|
+
[name: string]: unknown;
|
|
6375
|
+
};
|
|
6376
|
+
content?: never;
|
|
6377
|
+
};
|
|
6378
|
+
/** @description Conflict */
|
|
6379
|
+
409: {
|
|
6380
|
+
headers: {
|
|
6381
|
+
[name: string]: unknown;
|
|
6382
|
+
};
|
|
6383
|
+
content: {
|
|
6384
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
6385
|
+
};
|
|
6386
|
+
};
|
|
6387
|
+
};
|
|
6388
|
+
};
|
|
6028
6389
|
DownloadPaymentEvidence: {
|
|
6029
6390
|
parameters: {
|
|
6030
6391
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"description": "Generated TypeScript client for the Insurance Broker Platform API. Do not edit by hand: regenerate with scripts/update-api-contract.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|