@insurance-broker/api-client 1.36.0 → 1.37.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 +160 -1
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -11,7 +11,19 @@ export interface paths {
|
|
|
11
11
|
path?: never;
|
|
12
12
|
cookie?: never;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* List what this broker is owed, what is overdue, and what has concluded
|
|
16
|
+
* @description PAY-002. Five views over one collection, oldest due date first, paged by cursor: `owed`, `overdue`, `settled`, `written-off` and `cancelled`. A `customerId` or a `policyId` narrows any of them.
|
|
17
|
+
*
|
|
18
|
+
* **Nothing stores `overdue`.** A charge is overdue when its due date is before the day the page was measured against and its balance is above nil, computed as the page is read (ADR-0042 section 9, section 14). The day is returned as `asOf` on every page, so a page saying nine charges are overdue also says what overdue meant when it said so.
|
|
19
|
+
*
|
|
20
|
+
* **One walk is measured against one day.** `asOf` is read from the clock on the first page and carried inside the cursor, so a walk crossing UTC midnight cannot lose the tie group it is inside. A walk resumed the next morning therefore serves the previous day's buckets: compare `asOf` with your own clock and start a new walk without a cursor.
|
|
21
|
+
*
|
|
22
|
+
* **`balance` is not always `amount` less `paid`.** A cancelled charge is owed nothing, so money paid against one leaves the customer in credit; a written-off charge is owed what actually arrived and no more, because a write-off forgives the remainder rather than the part that was paid. The same rule the customer's statement uses.
|
|
23
|
+
*
|
|
24
|
+
* **`customerId` and `policyId` are filters and never authorisation.** The broker whose charges these are comes from the session; naming a customer here selects among this broker's own rows and can reach nobody else's.
|
|
25
|
+
*/
|
|
26
|
+
get: operations["ListObligations"];
|
|
15
27
|
put?: never;
|
|
16
28
|
/**
|
|
17
29
|
* Record what a customer owes against one of their policies
|
|
@@ -306,6 +318,34 @@ export interface paths {
|
|
|
306
318
|
patch?: never;
|
|
307
319
|
trace?: never;
|
|
308
320
|
};
|
|
321
|
+
"/api/v1/payments": {
|
|
322
|
+
parameters: {
|
|
323
|
+
query?: never;
|
|
324
|
+
header?: never;
|
|
325
|
+
path?: never;
|
|
326
|
+
cookie?: never;
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* List the money this broker has recorded, most recent first
|
|
330
|
+
* @description PAY-005. The payments this broker has recorded, ordered by when they posted, paged by cursor. A `customerId` or an `obligationId` narrows the list.
|
|
331
|
+
*
|
|
332
|
+
* **There is no `asOf` here, unlike `GET /obligations`.** Nothing in this list's predicate reads the clock - a payment posted at an instant the row records - so a member reporting when the page was measured would read as a freshness guarantee while guaranteeing nothing.
|
|
333
|
+
*
|
|
334
|
+
* **A reversed payment stays on the list** and carries `reversed: true`. Money that arrived and was sent back is a fact a reconciliation has to see, and a reversal is its own record rather than an edit to this one (ADR-0042 section 8).
|
|
335
|
+
*
|
|
336
|
+
* **Rows carry no subject identifiers.** Who recorded a payment and who approved it is the separation-of-duties record and it is on the payment itself, so a page-sized read cannot enumerate a broker's finance staff.
|
|
337
|
+
*
|
|
338
|
+
* **`customerId` and `obligationId` are filters and never authorisation.** The broker whose payments these are comes from the session.
|
|
339
|
+
*/
|
|
340
|
+
get: operations["ListPayments"];
|
|
341
|
+
put?: never;
|
|
342
|
+
post?: never;
|
|
343
|
+
delete?: never;
|
|
344
|
+
options?: never;
|
|
345
|
+
head?: never;
|
|
346
|
+
patch?: never;
|
|
347
|
+
trace?: never;
|
|
348
|
+
};
|
|
309
349
|
"/api/v1/payments/{id}": {
|
|
310
350
|
parameters: {
|
|
311
351
|
query?: never;
|
|
@@ -4867,6 +4907,12 @@ export interface components {
|
|
|
4867
4907
|
/** Format: date */
|
|
4868
4908
|
incidentOn: string;
|
|
4869
4909
|
};
|
|
4910
|
+
ObligationPage: {
|
|
4911
|
+
items: components["schemas"]["ObligationSummaryResponse"][];
|
|
4912
|
+
nextCursor: null | string;
|
|
4913
|
+
/** Format: date */
|
|
4914
|
+
asOf: string;
|
|
4915
|
+
};
|
|
4870
4916
|
ObligationResponse: {
|
|
4871
4917
|
/** Format: uuid */
|
|
4872
4918
|
id: string;
|
|
@@ -4889,6 +4935,27 @@ export interface components {
|
|
|
4889
4935
|
retentionAnchorAtUtc: null | string;
|
|
4890
4936
|
writeOffReason: null | string;
|
|
4891
4937
|
};
|
|
4938
|
+
ObligationSummaryResponse: {
|
|
4939
|
+
/** Format: uuid */
|
|
4940
|
+
id: string;
|
|
4941
|
+
/** Format: uuid */
|
|
4942
|
+
customerId: string;
|
|
4943
|
+
/** Format: uuid */
|
|
4944
|
+
policyId: string;
|
|
4945
|
+
/** Format: uuid */
|
|
4946
|
+
productId: string;
|
|
4947
|
+
/** Format: double */
|
|
4948
|
+
amount: number | string;
|
|
4949
|
+
/** Format: double */
|
|
4950
|
+
paid: number | string;
|
|
4951
|
+
/** Format: double */
|
|
4952
|
+
balance: number | string;
|
|
4953
|
+
currency: string;
|
|
4954
|
+
/** Format: date */
|
|
4955
|
+
dueOn: string;
|
|
4956
|
+
description: string;
|
|
4957
|
+
status: string;
|
|
4958
|
+
};
|
|
4892
4959
|
OfferedFormResponse: {
|
|
4893
4960
|
/** Format: uuid */
|
|
4894
4961
|
id: string;
|
|
@@ -5025,6 +5092,10 @@ export interface components {
|
|
|
5025
5092
|
PaymentEvidenceUpload: {
|
|
5026
5093
|
file: components["schemas"]["IFormFile"];
|
|
5027
5094
|
};
|
|
5095
|
+
PaymentPage: {
|
|
5096
|
+
items: components["schemas"]["PaymentSummaryResponse"][];
|
|
5097
|
+
nextCursor: null | string;
|
|
5098
|
+
};
|
|
5028
5099
|
PaymentResponse: {
|
|
5029
5100
|
/** Format: uuid */
|
|
5030
5101
|
id: string;
|
|
@@ -5058,6 +5129,25 @@ export interface components {
|
|
|
5058
5129
|
reversedAtUtc: string;
|
|
5059
5130
|
reversedBySubjectId: string;
|
|
5060
5131
|
};
|
|
5132
|
+
PaymentSummaryResponse: {
|
|
5133
|
+
/** Format: uuid */
|
|
5134
|
+
id: string;
|
|
5135
|
+
/** Format: uuid */
|
|
5136
|
+
obligationId: string;
|
|
5137
|
+
/** Format: uuid */
|
|
5138
|
+
customerId: string;
|
|
5139
|
+
/** Format: double */
|
|
5140
|
+
amount: number | string;
|
|
5141
|
+
currency: string;
|
|
5142
|
+
source: string;
|
|
5143
|
+
externalReference: string;
|
|
5144
|
+
status: string;
|
|
5145
|
+
/** Format: date-time */
|
|
5146
|
+
postedAtUtc: string;
|
|
5147
|
+
/** Format: date-time */
|
|
5148
|
+
approvedAtUtc: null | string;
|
|
5149
|
+
reversed: boolean;
|
|
5150
|
+
};
|
|
5061
5151
|
PlaceLegalHoldRequest: {
|
|
5062
5152
|
moduleName: null | string;
|
|
5063
5153
|
entityType: null | string;
|
|
@@ -5907,6 +5997,41 @@ export interface components {
|
|
|
5907
5997
|
}
|
|
5908
5998
|
export type $defs = Record<string, never>;
|
|
5909
5999
|
export interface operations {
|
|
6000
|
+
ListObligations: {
|
|
6001
|
+
parameters: {
|
|
6002
|
+
query?: {
|
|
6003
|
+
view?: string;
|
|
6004
|
+
customerId?: string;
|
|
6005
|
+
policyId?: string;
|
|
6006
|
+
cursor?: string;
|
|
6007
|
+
limit?: number | string;
|
|
6008
|
+
};
|
|
6009
|
+
header?: never;
|
|
6010
|
+
path?: never;
|
|
6011
|
+
cookie?: never;
|
|
6012
|
+
};
|
|
6013
|
+
requestBody?: never;
|
|
6014
|
+
responses: {
|
|
6015
|
+
/** @description OK */
|
|
6016
|
+
200: {
|
|
6017
|
+
headers: {
|
|
6018
|
+
[name: string]: unknown;
|
|
6019
|
+
};
|
|
6020
|
+
content: {
|
|
6021
|
+
"application/json": components["schemas"]["ObligationPage"];
|
|
6022
|
+
};
|
|
6023
|
+
};
|
|
6024
|
+
/** @description Bad Request */
|
|
6025
|
+
400: {
|
|
6026
|
+
headers: {
|
|
6027
|
+
[name: string]: unknown;
|
|
6028
|
+
};
|
|
6029
|
+
content: {
|
|
6030
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
6031
|
+
};
|
|
6032
|
+
};
|
|
6033
|
+
};
|
|
6034
|
+
};
|
|
5910
6035
|
RaiseObligation: {
|
|
5911
6036
|
parameters: {
|
|
5912
6037
|
query?: never;
|
|
@@ -6407,6 +6532,40 @@ export interface operations {
|
|
|
6407
6532
|
};
|
|
6408
6533
|
};
|
|
6409
6534
|
};
|
|
6535
|
+
ListPayments: {
|
|
6536
|
+
parameters: {
|
|
6537
|
+
query?: {
|
|
6538
|
+
customerId?: string;
|
|
6539
|
+
obligationId?: string;
|
|
6540
|
+
cursor?: string;
|
|
6541
|
+
limit?: number | string;
|
|
6542
|
+
};
|
|
6543
|
+
header?: never;
|
|
6544
|
+
path?: never;
|
|
6545
|
+
cookie?: never;
|
|
6546
|
+
};
|
|
6547
|
+
requestBody?: never;
|
|
6548
|
+
responses: {
|
|
6549
|
+
/** @description OK */
|
|
6550
|
+
200: {
|
|
6551
|
+
headers: {
|
|
6552
|
+
[name: string]: unknown;
|
|
6553
|
+
};
|
|
6554
|
+
content: {
|
|
6555
|
+
"application/json": components["schemas"]["PaymentPage"];
|
|
6556
|
+
};
|
|
6557
|
+
};
|
|
6558
|
+
/** @description Bad Request */
|
|
6559
|
+
400: {
|
|
6560
|
+
headers: {
|
|
6561
|
+
[name: string]: unknown;
|
|
6562
|
+
};
|
|
6563
|
+
content: {
|
|
6564
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
6565
|
+
};
|
|
6566
|
+
};
|
|
6567
|
+
};
|
|
6568
|
+
};
|
|
6410
6569
|
GetPayment: {
|
|
6411
6570
|
parameters: {
|
|
6412
6571
|
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.37.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,
|