@insurance-broker/api-client 2.7.0 → 2.9.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.
Files changed (2) hide show
  1. package/dist/schema.d.ts +251 -1
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -39,7 +39,9 @@ export interface paths {
39
39
  *
40
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
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).
42
+ * **A key is honoured for 30 days from the moment the charge was raised, and then stops being honoured.** After that the same key is one this platform has never seen, and the request carrying it raises a fresh charge. Mint a fresh key per intended charge; do not recycle one (#394).
43
+ *
44
+ * **Expiry restores no other protection, and that is not an oversight.** Nothing else prevents a duplicate charge: no natural key on `(policy, amount, due date, description)` exists or can, for the reason above. A repeat of a month-old request therefore raises a second debt.
43
45
  *
44
46
  * **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
47
  *
@@ -3978,6 +3980,10 @@ export interface paths {
3978
3980
  *
3979
3981
  * 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).
3980
3982
  *
3983
+ * `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.
3984
+ *
3985
+ * **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.
3986
+ *
3981
3987
  * Carries identifiers and no names, and not the previous policy's pinned snapshot. Another broker's case, another customer's case and a case that does not exist are one 404, so the route cannot be used to discover which renewals exist.
3982
3988
  */
3983
3989
  get: operations["GetRenewal"];
@@ -4289,6 +4295,86 @@ export interface paths {
4289
4295
  patch?: never;
4290
4296
  trace?: never;
4291
4297
  };
4298
+ "/api/v1/customer/renewals": {
4299
+ parameters: {
4300
+ query?: never;
4301
+ header?: never;
4302
+ path?: never;
4303
+ cookie?: never;
4304
+ };
4305
+ /**
4306
+ * The renewals your broker has raised on your policies, most recent first
4307
+ * @description REN-005. Every renewal of yours, paged by cursor.
4308
+ *
4309
+ * **You are not named in the request.** There is no customer field and no broker field: the list is whoever is signed in, resolved from the session. Another person's renewals are not filtered out of it, they are absent, because a renewal that is not yours is not visible to this route at all.
4310
+ *
4311
+ * **`status` is where your broker's process has got to, not what you said.** Answering a renewal does not move it: your answer is recorded as a fact against the renewal and your broker concludes the case (ADR-0040 section 3).
4312
+ *
4313
+ * **Nothing here says you were reminded.** This platform has no notification channel yet, so there is no unread flag and no reminder date: REN-005's reminder half is unmet and tracked as issue #371.
4314
+ *
4315
+ * `productId` and `insurerId` are identifiers, not names. Read their names from their own routes.
4316
+ */
4317
+ get: operations["ListCustomerRenewals"];
4318
+ put?: never;
4319
+ post?: never;
4320
+ delete?: never;
4321
+ options?: never;
4322
+ head?: never;
4323
+ patch?: never;
4324
+ trace?: never;
4325
+ };
4326
+ "/api/v1/customer/renewals/{id}": {
4327
+ parameters: {
4328
+ query?: never;
4329
+ header?: never;
4330
+ path?: never;
4331
+ cookie?: never;
4332
+ };
4333
+ /**
4334
+ * One of your own renewals, what it still needs, and what you have said about it
4335
+ * @description REN-002, REN-005 and REN-006. The renewal, its checklist, and every answer you have given about it.
4336
+ *
4337
+ * **`enforcedBy` is the field to read before trusting `satisfiedAtUtc`.** A condition nothing on this platform enforces reports `NotBuilt`, so a satisfied condition may mean a rule that does not exist is vacuously satisfied rather than that something happened (ADR-0040 section 4).
4338
+ *
4339
+ * **`answers` is empty if your broker recorded your reconfirmation for you.** Only an answer you gave through this surface appears there, which is what makes it yours.
4340
+ *
4341
+ * A renewal belonging to somebody else and a renewal that does not exist are one 404, so this route cannot be used to discover which renewals exist.
4342
+ */
4343
+ get: operations["GetCustomerRenewal"];
4344
+ put?: never;
4345
+ post?: never;
4346
+ delete?: never;
4347
+ options?: never;
4348
+ head?: never;
4349
+ patch?: never;
4350
+ trace?: never;
4351
+ };
4352
+ "/api/v1/customer/renewals/{id}/responses": {
4353
+ parameters: {
4354
+ query?: never;
4355
+ header?: never;
4356
+ path?: never;
4357
+ cookie?: never;
4358
+ };
4359
+ get?: never;
4360
+ put?: never;
4361
+ /**
4362
+ * Confirm, decline or ask for changes to one of your own renewals
4363
+ * @description REN-005 and REN-003, the customer's half. Send `answer` as one of `Confirmed`, `Declined` or `ChangesRequested`, and the renewal comes back with your answer recorded on it.
4364
+ *
4365
+ * **`Confirmed` names the form submission you answered**, which you make on the customer form routes. It satisfies the renewal's customer-information condition and is refused if the submission is not your own answer to this policy's product form, or if it was made before the renewal was raised - a submission that predates the renewal is your original application and reconfirms nothing.
4366
+ *
4367
+ * **`Declined` and `ChangesRequested` change nothing about your cover.** They are recorded for your broker to act on, they satisfy no condition, and they do not end your policy: concluding a renewal is your broker's act, because it expires cover that is still in force. Either may carry one short `note` saying what needs to change.
4368
+ *
4369
+ * Sending the same answer twice reads the first one back rather than recording it twice, so a lost response or a double tap is safe. You may ask for changes and confirm later; you cannot un-say an answer, and a renewal your broker has already concluded is refused.
4370
+ */
4371
+ post: operations["RespondToCustomerRenewal"];
4372
+ delete?: never;
4373
+ options?: never;
4374
+ head?: never;
4375
+ patch?: never;
4376
+ trace?: never;
4377
+ };
4292
4378
  "/api/v1/policy-documents/download-links/{token}": {
4293
4379
  parameters: {
4294
4380
  query?: never;
@@ -5804,6 +5890,42 @@ export interface components {
5804
5890
  /** Format: date-time */
5805
5891
  withdrawnAtUtc: null | string;
5806
5892
  };
5893
+ CustomerRenewalAnswerResponse: {
5894
+ /** Format: uuid */
5895
+ id: string;
5896
+ answer: string;
5897
+ /** Format: uuid */
5898
+ formSubmissionId: null | string;
5899
+ note: null | string;
5900
+ /** Format: date-time */
5901
+ recordedAtUtc: string;
5902
+ };
5903
+ CustomerRenewalDetailResponse: {
5904
+ renewal: components["schemas"]["CustomerRenewalSummary"];
5905
+ checklist: components["schemas"]["RenewalChecklistItemResponse"][];
5906
+ answers: components["schemas"]["CustomerRenewalAnswerResponse"][];
5907
+ };
5908
+ CustomerRenewalPage: {
5909
+ items: components["schemas"]["CustomerRenewalSummary"][];
5910
+ nextCursor: null | string;
5911
+ };
5912
+ CustomerRenewalSummary: {
5913
+ /** Format: uuid */
5914
+ id: string;
5915
+ status: string;
5916
+ /** Format: uuid */
5917
+ previousPolicyId: string;
5918
+ /** Format: uuid */
5919
+ newPolicyId: null | string;
5920
+ /** Format: uuid */
5921
+ productId: string;
5922
+ /** Format: uuid */
5923
+ insurerId: string;
5924
+ /** Format: date */
5925
+ previousCoverEnd: string;
5926
+ /** Format: date-time */
5927
+ openedAtUtc: string;
5928
+ };
5807
5929
  CustomerResponse: {
5808
5930
  /** Format: uuid */
5809
5931
  id: string;
@@ -7318,6 +7440,7 @@ export interface components {
7318
7440
  /** Format: uuid */
7319
7441
  quoteRequestId: null | string;
7320
7442
  checklist: components["schemas"]["RenewalChecklistItemResponse"][];
7443
+ customerAnswers: components["schemas"]["CustomerRenewalAnswerResponse"][];
7321
7444
  };
7322
7445
  RenewalCasePage: {
7323
7446
  items: components["schemas"]["RenewalCaseSummaryResponse"][];
@@ -7433,6 +7556,12 @@ export interface components {
7433
7556
  /** Format: date */
7434
7557
  incidentOn: string;
7435
7558
  };
7559
+ RespondToRenewalRequest: {
7560
+ answer: null | string;
7561
+ /** Format: uuid */
7562
+ formSubmissionId: null | string;
7563
+ note: null | string;
7564
+ };
7436
7565
  RetentionPeriodResponse: {
7437
7566
  /** Format: int32 */
7438
7567
  amount: number | string;
@@ -17632,6 +17761,127 @@ export interface operations {
17632
17761
  };
17633
17762
  };
17634
17763
  };
17764
+ ListCustomerRenewals: {
17765
+ parameters: {
17766
+ query?: {
17767
+ cursor?: string;
17768
+ limit?: number | string;
17769
+ };
17770
+ header?: never;
17771
+ path?: never;
17772
+ cookie?: never;
17773
+ };
17774
+ requestBody?: never;
17775
+ responses: {
17776
+ /** @description OK */
17777
+ 200: {
17778
+ headers: {
17779
+ [name: string]: unknown;
17780
+ };
17781
+ content: {
17782
+ "application/json": components["schemas"]["CustomerRenewalPage"];
17783
+ };
17784
+ };
17785
+ /** @description Bad Request */
17786
+ 400: {
17787
+ headers: {
17788
+ [name: string]: unknown;
17789
+ };
17790
+ content: {
17791
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
17792
+ };
17793
+ };
17794
+ };
17795
+ };
17796
+ GetCustomerRenewal: {
17797
+ parameters: {
17798
+ query?: never;
17799
+ header?: never;
17800
+ path: {
17801
+ id: string;
17802
+ };
17803
+ cookie?: never;
17804
+ };
17805
+ requestBody?: never;
17806
+ responses: {
17807
+ /** @description OK */
17808
+ 200: {
17809
+ headers: {
17810
+ [name: string]: unknown;
17811
+ };
17812
+ content: {
17813
+ "application/json": components["schemas"]["CustomerRenewalDetailResponse"];
17814
+ };
17815
+ };
17816
+ /** @description Not Found */
17817
+ 404: {
17818
+ headers: {
17819
+ [name: string]: unknown;
17820
+ };
17821
+ content?: never;
17822
+ };
17823
+ };
17824
+ };
17825
+ RespondToCustomerRenewal: {
17826
+ parameters: {
17827
+ query?: never;
17828
+ header?: never;
17829
+ path: {
17830
+ id: string;
17831
+ };
17832
+ cookie?: never;
17833
+ };
17834
+ requestBody: {
17835
+ content: {
17836
+ "application/json": components["schemas"]["RespondToRenewalRequest"];
17837
+ };
17838
+ };
17839
+ responses: {
17840
+ /** @description OK */
17841
+ 200: {
17842
+ headers: {
17843
+ [name: string]: unknown;
17844
+ };
17845
+ content: {
17846
+ "application/json": components["schemas"]["CustomerRenewalDetailResponse"];
17847
+ };
17848
+ };
17849
+ /** @description Bad Request */
17850
+ 400: {
17851
+ headers: {
17852
+ [name: string]: unknown;
17853
+ };
17854
+ content: {
17855
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
17856
+ };
17857
+ };
17858
+ /** @description Not Found */
17859
+ 404: {
17860
+ headers: {
17861
+ [name: string]: unknown;
17862
+ };
17863
+ content?: never;
17864
+ };
17865
+ /** @description Conflict */
17866
+ 409: {
17867
+ headers: {
17868
+ [name: string]: unknown;
17869
+ };
17870
+ content: {
17871
+ "application/problem+json": components["schemas"]["ProblemDetails"];
17872
+ };
17873
+ };
17874
+ /** @description Unprocessable Entity */
17875
+ 422: {
17876
+ headers: {
17877
+ [name: string]: unknown;
17878
+ };
17879
+ content: {
17880
+ "application/problem+json": components["schemas"]["ProblemDetails"];
17881
+ };
17882
+ };
17883
+ };
17884
+ };
17635
17885
  RedeemPolicyDocumentDownloadLink: {
17636
17886
  parameters: {
17637
17887
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "2.7.0",
3
+ "version": "2.9.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,