@insurance-broker/api-client 5.18.0 → 5.20.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/README.md +20 -0
- package/dist/schema.d.ts +158 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,26 @@ package only describes the shapes it carries.
|
|
|
27
27
|
Nothing here is written by hand except the entry point. The types come from the backend's committed
|
|
28
28
|
`docs/api/openapi.json`, and the backend's own CI fails if the two drift apart.
|
|
29
29
|
|
|
30
|
+
## Responses the per-route types do not list
|
|
31
|
+
|
|
32
|
+
**Any customer-realm route can answer `401` with problem type
|
|
33
|
+
`urn:brokerplatform:problem:session-revoked`**, not only the routes whose description mentions it.
|
|
34
|
+
The platform's tenant resolution produces this answer before a route runs, so the generated types do
|
|
35
|
+
not list it on each operation. It means the customer signed out every session
|
|
36
|
+
(`POST /api/v1/customer-account/sessions/revocation`) after this session was authenticated.
|
|
37
|
+
|
|
38
|
+
- Do **not** answer it by refreshing. The identity provider will issue a new token, and the API will
|
|
39
|
+
refuse it in the same way.
|
|
40
|
+
- Do **not** answer it with a `prompt=login` sign-in on its own. On a device that still holds the
|
|
41
|
+
identity provider's session cookie, that re-authenticates the *same* session and re-admits every
|
|
42
|
+
refresh token copied from it.
|
|
43
|
+
- Do this instead:
|
|
44
|
+
1. End the identity provider's session with RP-initiated logout and `id_token_hint`.
|
|
45
|
+
2. Discard the stored tokens.
|
|
46
|
+
3. Sign in again.
|
|
47
|
+
|
|
48
|
+
The backend's ADR-0049 has the reasoning, including the 2026-10-11 amendment.
|
|
49
|
+
|
|
30
50
|
## Versioning
|
|
31
51
|
|
|
32
52
|
Semantic versioning against the **contract**, not against this file:
|
package/dist/schema.d.ts
CHANGED
|
@@ -3009,6 +3009,32 @@ export interface paths {
|
|
|
3009
3009
|
patch?: never;
|
|
3010
3010
|
trace?: never;
|
|
3011
3011
|
};
|
|
3012
|
+
"/api/v1/customer-account/sessions/revocation": {
|
|
3013
|
+
parameters: {
|
|
3014
|
+
query?: never;
|
|
3015
|
+
header?: never;
|
|
3016
|
+
path?: never;
|
|
3017
|
+
cookie?: never;
|
|
3018
|
+
};
|
|
3019
|
+
get?: never;
|
|
3020
|
+
put?: never;
|
|
3021
|
+
/**
|
|
3022
|
+
* Signs the customer out of every session they have established, including this one.
|
|
3023
|
+
* @description **Every sign-in this customer established up to now stops working against this API on its next request — including the one making this call.** That is the stolen-device remedy (SEC-012): a phone that is lost keeps a session the customer cannot reach, and this ends what that session can do here without needing the phone.
|
|
3024
|
+
*
|
|
3025
|
+
* **What a client must do afterwards.** Every request from a session established before the returned `revokedAtUtc` (plus a few seconds' clock allowance) is answered `401` with problem type `urn:brokerplatform:problem:session-revoked` — on any customer route, not only this one. **Do not refresh in answer to it**: the identity provider will issue a new token and that token will be refused the same way, because it belongs to the same sign-in. **Do not answer it with a `prompt=login` sign-in alone either**: on a device that still holds the identity provider's session cookie, that re-authenticates the *same* session and re-admits every refresh token copied from it. End the identity provider's session first (RP-initiated logout with `id_token_hint`), discard the stored tokens, then sign in.
|
|
3026
|
+
*
|
|
3027
|
+
* **Tell the customer to change their password, and to secure their email account.** Signing out does not stop somebody who knows the password from signing in again, and a password can be reset through the email address.
|
|
3028
|
+
*
|
|
3029
|
+
* **What it does not do yet.** It does not end the sessions at the identity provider, list them, or end one and keep the others; those need the isolated identity-management component ADR-0049 describes. A `409` means the caller is acting for an organisation: sessions belong to the person, so act personally to revoke them.
|
|
3030
|
+
*/
|
|
3031
|
+
post: operations["RevokeOwnCustomerSessions"];
|
|
3032
|
+
delete?: never;
|
|
3033
|
+
options?: never;
|
|
3034
|
+
head?: never;
|
|
3035
|
+
patch?: never;
|
|
3036
|
+
trace?: never;
|
|
3037
|
+
};
|
|
3012
3038
|
"/api/v1/customer-account/redemption": {
|
|
3013
3039
|
parameters: {
|
|
3014
3040
|
query?: never;
|
|
@@ -4753,6 +4779,8 @@ export interface paths {
|
|
|
4753
4779
|
*
|
|
4754
4780
|
* Every condition is resolved onto every case, so `approval` is present with `isRequired` false rather than absent. Read `isRequired` instead of assuming: a broker's configuration moves the flag, not the row (ADR-0040 section 4).
|
|
4755
4781
|
*
|
|
4782
|
+
* **One row is the exception, and it is never the customer's.** `BrokerRecordedInformation` appears only where you recorded what the customer told you (#228). It is owed by the broker, enforced by `ExternalRecord`, and its `recordedFrom` says how you heard; `brokerRecordedInformationBySubjectId` says who recorded it. It satisfies nothing else: the customer's `CustomerInformation` row reads exactly as it would without it.
|
|
4783
|
+
*
|
|
4756
4784
|
* `customerAnswers` is what the customer said through their own app (REN-005): confirm, decline or request changes, oldest first, with the short note they may attach to the last two. It is empty on a renewal the customer has not answered, and empty for ever on one only you ever touched - a reconfirmation you recorded on their behalf satisfies the condition and is not one of their answers.
|
|
4757
4785
|
*
|
|
4758
4786
|
* **A decline does not conclude anything.** It satisfies no condition and moves no status, so the checklist still reads outstanding and owed by the customer; what changed is that you can now see they answered. Concluding the renewal is still yours, on the loss route.
|
|
@@ -4788,6 +4816,32 @@ export interface paths {
|
|
|
4788
4816
|
patch?: never;
|
|
4789
4817
|
trace?: never;
|
|
4790
4818
|
};
|
|
4819
|
+
"/api/v1/renewals/{id}/broker-recorded-information": {
|
|
4820
|
+
parameters: {
|
|
4821
|
+
query?: never;
|
|
4822
|
+
header?: never;
|
|
4823
|
+
path?: never;
|
|
4824
|
+
cookie?: never;
|
|
4825
|
+
};
|
|
4826
|
+
get?: never;
|
|
4827
|
+
/**
|
|
4828
|
+
* Record that the customer told you their details still stand
|
|
4829
|
+
* @description #228. Records that the customer told you, by telephone, in person, by email or by letter, that the details the renewal rests on still stand. It adds a separate checklist row, `BrokerRecordedInformation`, owed by the broker, enforced by `ExternalRecord`, and carrying `recordedFrom`. That row reads "recorded by the broker from a telephone call" rather than plain "satisfied".
|
|
4830
|
+
*
|
|
4831
|
+
* **It does not satisfy the customer's own `CustomerInformation` condition, and it never will.** REN-003 asks the customer to confirm their own details. That row stays outstanding and owed by the customer, so the checklist keeps showing that the customer never confirmed anything here. If the customer answers for themselves later, through `customer-information` or their own app, their row is satisfied as usual and both facts stay on the renewal.
|
|
4832
|
+
*
|
|
4833
|
+
* **A `409` here is a settled fact, and `type` says which.** `urn:brokerplatform:problem:customer-already-confirmed` means the customer confirmed for themselves, so there is nothing for a broker's record to stand in for. `urn:brokerplatform:problem:renewal-concluded` means the renewal has concluded. `urn:brokerplatform:problem:broker-record-already-made` means a broker already recorded it with a different channel; it is recorded once. `urn:brokerplatform:problem:concurrency-conflict` means somebody wrote first; read again and retry.
|
|
4834
|
+
*
|
|
4835
|
+
* Recording the same channel again reads back what is stored. Records no free text: what the customer said belongs in their CRM record, where it can be corrected.
|
|
4836
|
+
*/
|
|
4837
|
+
put: operations["RecordRenewalBrokerRecordedInformation"];
|
|
4838
|
+
post?: never;
|
|
4839
|
+
delete?: never;
|
|
4840
|
+
options?: never;
|
|
4841
|
+
head?: never;
|
|
4842
|
+
patch?: never;
|
|
4843
|
+
trace?: never;
|
|
4844
|
+
};
|
|
4791
4845
|
"/api/v1/renewals/{id}/quote-request": {
|
|
4792
4846
|
parameters: {
|
|
4793
4847
|
query?: never;
|
|
@@ -7212,6 +7266,10 @@ export interface components {
|
|
|
7212
7266
|
/** Format: double */
|
|
7213
7267
|
distanceKm: null | number | string;
|
|
7214
7268
|
};
|
|
7269
|
+
CustomerSessionRevocationResponse: {
|
|
7270
|
+
/** Format: date-time */
|
|
7271
|
+
revokedAtUtc: string;
|
|
7272
|
+
};
|
|
7215
7273
|
CustomerSubmissionAttachmentResponse: {
|
|
7216
7274
|
/** Format: uuid */
|
|
7217
7275
|
id: string;
|
|
@@ -9082,6 +9140,9 @@ export interface components {
|
|
|
9082
9140
|
answers: null | components["schemas"]["JsonElement"];
|
|
9083
9141
|
source: null | string;
|
|
9084
9142
|
};
|
|
9143
|
+
RecordBrokerRecordedInformationRequest: {
|
|
9144
|
+
channel: null | string;
|
|
9145
|
+
};
|
|
9085
9146
|
RecordClaimFormRequest: {
|
|
9086
9147
|
/** Format: uuid */
|
|
9087
9148
|
submissionId: string;
|
|
@@ -9200,6 +9261,14 @@ export interface components {
|
|
|
9200
9261
|
name: string;
|
|
9201
9262
|
legalName: null | string;
|
|
9202
9263
|
};
|
|
9264
|
+
RenewalBrokerRecordedInformationResponse: {
|
|
9265
|
+
/** Format: uuid */
|
|
9266
|
+
renewalCaseId: string;
|
|
9267
|
+
channel: string;
|
|
9268
|
+
recordedBySubjectId: string;
|
|
9269
|
+
/** Format: date-time */
|
|
9270
|
+
recordedAtUtc: string;
|
|
9271
|
+
};
|
|
9203
9272
|
RenewalCaseDetailResponse: {
|
|
9204
9273
|
case: components["schemas"]["RenewalCaseSummaryResponse"];
|
|
9205
9274
|
/** Format: uuid */
|
|
@@ -9209,6 +9278,7 @@ export interface components {
|
|
|
9209
9278
|
quoteRequestId: null | string;
|
|
9210
9279
|
checklist: components["schemas"]["RenewalChecklistItemResponse"][];
|
|
9211
9280
|
customerAnswers: components["schemas"]["CustomerRenewalAnswerResponse"][];
|
|
9281
|
+
brokerRecordedInformationBySubjectId: null | string;
|
|
9212
9282
|
};
|
|
9213
9283
|
RenewalCasePage: {
|
|
9214
9284
|
items: components["schemas"]["RenewalCaseSummaryResponse"][];
|
|
@@ -9244,6 +9314,7 @@ export interface components {
|
|
|
9244
9314
|
isRequired: boolean;
|
|
9245
9315
|
/** Format: date-time */
|
|
9246
9316
|
satisfiedAtUtc: null | string;
|
|
9317
|
+
recordedFrom: null | string;
|
|
9247
9318
|
};
|
|
9248
9319
|
RenewalClockViolationResponse: {
|
|
9249
9320
|
milestone: string;
|
|
@@ -16627,6 +16698,42 @@ export interface operations {
|
|
|
16627
16698
|
};
|
|
16628
16699
|
};
|
|
16629
16700
|
};
|
|
16701
|
+
RevokeOwnCustomerSessions: {
|
|
16702
|
+
parameters: {
|
|
16703
|
+
query?: never;
|
|
16704
|
+
header?: {
|
|
16705
|
+
/** @description The organisation to act for: one of the identifiers GET /api/v1/customer/contexts lists. Omit it, or send it empty, to act for your own account; there is no mode in which it becomes mandatory. A value you hold no active membership of, or one that is not an organisation identifier, is refused with 403 naming nothing, and never quietly treated as your own account. */
|
|
16706
|
+
"X-Broker-Acting-For"?: components["parameters"]["ActingFor"];
|
|
16707
|
+
};
|
|
16708
|
+
path?: never;
|
|
16709
|
+
cookie?: never;
|
|
16710
|
+
};
|
|
16711
|
+
requestBody?: never;
|
|
16712
|
+
responses: {
|
|
16713
|
+
/** @description OK */
|
|
16714
|
+
200: {
|
|
16715
|
+
headers: {
|
|
16716
|
+
/** @description The party this request actually acted for. Present, carrying the organisation identifier, when it acted for an organisation; absent when it acted for your own account. It mirrors the request header, so it can be sent back unchanged. Compare it with what you meant to send: it is the only way to see that a request you meant for an organisation was made personally. */
|
|
16717
|
+
"X-Broker-Acting-For"?: string;
|
|
16718
|
+
[name: string]: unknown;
|
|
16719
|
+
};
|
|
16720
|
+
content: {
|
|
16721
|
+
"application/json": components["schemas"]["CustomerSessionRevocationResponse"];
|
|
16722
|
+
};
|
|
16723
|
+
};
|
|
16724
|
+
/** @description Conflict. A type of urn:brokerplatform:problem:concurrency-conflict means someone else changed the record first and nothing was written: read it again and decide again. Any other type is a conflict this operation decided itself, and retrying it unchanged will not help. */
|
|
16725
|
+
409: {
|
|
16726
|
+
headers: {
|
|
16727
|
+
/** @description The party this request actually acted for. Present, carrying the organisation identifier, when it acted for an organisation; absent when it acted for your own account. It mirrors the request header, so it can be sent back unchanged. Compare it with what you meant to send: it is the only way to see that a request you meant for an organisation was made personally. */
|
|
16728
|
+
"X-Broker-Acting-For"?: string;
|
|
16729
|
+
[name: string]: unknown;
|
|
16730
|
+
};
|
|
16731
|
+
content: {
|
|
16732
|
+
"application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
|
|
16733
|
+
};
|
|
16734
|
+
};
|
|
16735
|
+
};
|
|
16736
|
+
};
|
|
16630
16737
|
RedeemCustomerInvitation: {
|
|
16631
16738
|
parameters: {
|
|
16632
16739
|
query?: never;
|
|
@@ -21246,6 +21353,57 @@ export interface operations {
|
|
|
21246
21353
|
};
|
|
21247
21354
|
};
|
|
21248
21355
|
};
|
|
21356
|
+
RecordRenewalBrokerRecordedInformation: {
|
|
21357
|
+
parameters: {
|
|
21358
|
+
query?: never;
|
|
21359
|
+
header?: never;
|
|
21360
|
+
path: {
|
|
21361
|
+
id: string;
|
|
21362
|
+
};
|
|
21363
|
+
cookie?: never;
|
|
21364
|
+
};
|
|
21365
|
+
requestBody: {
|
|
21366
|
+
content: {
|
|
21367
|
+
"application/json": components["schemas"]["RecordBrokerRecordedInformationRequest"];
|
|
21368
|
+
};
|
|
21369
|
+
};
|
|
21370
|
+
responses: {
|
|
21371
|
+
/** @description OK */
|
|
21372
|
+
200: {
|
|
21373
|
+
headers: {
|
|
21374
|
+
[name: string]: unknown;
|
|
21375
|
+
};
|
|
21376
|
+
content: {
|
|
21377
|
+
"application/json": components["schemas"]["RenewalBrokerRecordedInformationResponse"];
|
|
21378
|
+
};
|
|
21379
|
+
};
|
|
21380
|
+
/** @description Bad Request */
|
|
21381
|
+
400: {
|
|
21382
|
+
headers: {
|
|
21383
|
+
[name: string]: unknown;
|
|
21384
|
+
};
|
|
21385
|
+
content: {
|
|
21386
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
21387
|
+
};
|
|
21388
|
+
};
|
|
21389
|
+
/** @description Not Found */
|
|
21390
|
+
404: {
|
|
21391
|
+
headers: {
|
|
21392
|
+
[name: string]: unknown;
|
|
21393
|
+
};
|
|
21394
|
+
content?: never;
|
|
21395
|
+
};
|
|
21396
|
+
/** @description Conflict. A type of urn:brokerplatform:problem:concurrency-conflict means someone else changed the record first and nothing was written: read it again and decide again. Any other type is a conflict this operation decided itself, and retrying it unchanged will not help. */
|
|
21397
|
+
409: {
|
|
21398
|
+
headers: {
|
|
21399
|
+
[name: string]: unknown;
|
|
21400
|
+
};
|
|
21401
|
+
content: {
|
|
21402
|
+
"application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
|
|
21403
|
+
};
|
|
21404
|
+
};
|
|
21405
|
+
};
|
|
21406
|
+
};
|
|
21249
21407
|
RecordRenewalQuoteRequest: {
|
|
21250
21408
|
parameters: {
|
|
21251
21409
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.20.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,
|