@insurance-broker/api-client 2.5.0 → 2.7.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 +35 -1
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -34,6 +34,16 @@ export interface paths {
|
|
|
34
34
|
* The **payer is not a field** either. An obligation is owed by whoever owns the policy, so a customer identifier here could only ever agree or be wrong (ADR-0042 §3).
|
|
35
35
|
*
|
|
36
36
|
* A **due date in the past is accepted**: a book carried across from another system arrives already in arrears, and refusing that would make a migrated debt unrepresentable.
|
|
37
|
+
*
|
|
38
|
+
* **`idempotencyKey` is optional, and it is the only thing that makes a retry safe.** Without one, a double-tapped button, a client retry after a timeout or two officers recording the same instalment each raise a separate debt — and that is correct, because two identical instalments falling due on one day is legitimate and nothing about `(policy, amount, due date, description)` can be made unique.
|
|
39
|
+
*
|
|
40
|
+
* With one: a repeat carrying a key already used **returns the original charge and the same `201 Created` with the same `Location`**, so an honest retry is indistinguishable from a first call and no second debt exists. A repeat carrying that key with a **different** policy, amount, due date or description is a `409` and raises nothing.
|
|
41
|
+
*
|
|
42
|
+
* **A key is honoured for as long as the charge it raised is kept, and nothing sweeps keys.** It is stored on the obligation rather than in a store of its own. Mint a fresh key per intended charge; do not recycle one (#394).
|
|
43
|
+
*
|
|
44
|
+
* **What a key does not do**: it assumes the retrying client owns it. Two people at two desks recording the same instalment invent two keys, and both charges are raised (ADR-0042 §19).
|
|
45
|
+
*
|
|
46
|
+
* **Two different things answer `409` here.** A key collision is settled — retrying it can only fail again — and carries no `retryable` marker. The group's concurrency conflict is the other one and says it is retryable. Branch on that, not on the status.
|
|
37
47
|
*/
|
|
38
48
|
post: operations["RaiseObligation"];
|
|
39
49
|
delete?: never;
|
|
@@ -2484,7 +2494,12 @@ export interface paths {
|
|
|
2484
2494
|
path?: never;
|
|
2485
2495
|
cookie?: never;
|
|
2486
2496
|
};
|
|
2487
|
-
/**
|
|
2497
|
+
/**
|
|
2498
|
+
* The account this broker holds for the signed-in customer.
|
|
2499
|
+
* @description **A `403` here is usually not an error.** `urn:brokerplatform:problem:customer-not-attached` means this sign-in has never been linked to a broker — the ordinary state of a customer who has registered but not yet redeemed an invitation, and the cue to show onboarding rather than a failure. A `403` *without* that type is an ordinary refusal and must not be read as onboarding: it is what a caller whose broker may not transact receives, and what a caller whose account the broker has suspended or closed receives.
|
|
2500
|
+
*
|
|
2501
|
+
* **The `404` is retained for compatibility and is not the unattached state.** It means the caller holds the permission and the record is gone, which cannot happen through this API today; a client keying its onboarding branch on `404` will never reach it.
|
|
2502
|
+
*/
|
|
2488
2503
|
get: operations["GetOwnCustomerAccount"];
|
|
2489
2504
|
put?: never;
|
|
2490
2505
|
post?: never;
|
|
@@ -7184,6 +7199,7 @@ export interface components {
|
|
|
7184
7199
|
/** Format: date */
|
|
7185
7200
|
dueOn: string;
|
|
7186
7201
|
description: string;
|
|
7202
|
+
idempotencyKey?: null | string;
|
|
7187
7203
|
};
|
|
7188
7204
|
RaiseOutstandingItemRequest: {
|
|
7189
7205
|
awaitedFrom: null | string;
|
|
@@ -7854,6 +7870,15 @@ export interface operations {
|
|
|
7854
7870
|
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
7855
7871
|
};
|
|
7856
7872
|
};
|
|
7873
|
+
/** @description Conflict */
|
|
7874
|
+
409: {
|
|
7875
|
+
headers: {
|
|
7876
|
+
[name: string]: unknown;
|
|
7877
|
+
};
|
|
7878
|
+
content: {
|
|
7879
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
7880
|
+
};
|
|
7881
|
+
};
|
|
7857
7882
|
};
|
|
7858
7883
|
};
|
|
7859
7884
|
GetObligation: {
|
|
@@ -13257,6 +13282,15 @@ export interface operations {
|
|
|
13257
13282
|
"application/json": components["schemas"]["OwnCustomerAccountResponse"];
|
|
13258
13283
|
};
|
|
13259
13284
|
};
|
|
13285
|
+
/** @description Forbidden */
|
|
13286
|
+
403: {
|
|
13287
|
+
headers: {
|
|
13288
|
+
[name: string]: unknown;
|
|
13289
|
+
};
|
|
13290
|
+
content: {
|
|
13291
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
13292
|
+
};
|
|
13293
|
+
};
|
|
13260
13294
|
/** @description Not Found */
|
|
13261
13295
|
404: {
|
|
13262
13296
|
headers: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.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,
|