@insurance-broker/api-client 2.7.0 → 2.8.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 +248 -0
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -3978,6 +3978,10 @@ export interface paths {
3978
3978
  *
3979
3979
  * 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
3980
  *
3981
+ * `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.
3982
+ *
3983
+ * **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.
3984
+ *
3981
3985
  * 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
3986
  */
3983
3987
  get: operations["GetRenewal"];
@@ -4289,6 +4293,86 @@ export interface paths {
4289
4293
  patch?: never;
4290
4294
  trace?: never;
4291
4295
  };
4296
+ "/api/v1/customer/renewals": {
4297
+ parameters: {
4298
+ query?: never;
4299
+ header?: never;
4300
+ path?: never;
4301
+ cookie?: never;
4302
+ };
4303
+ /**
4304
+ * The renewals your broker has raised on your policies, most recent first
4305
+ * @description REN-005. Every renewal of yours, paged by cursor.
4306
+ *
4307
+ * **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.
4308
+ *
4309
+ * **`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).
4310
+ *
4311
+ * **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.
4312
+ *
4313
+ * `productId` and `insurerId` are identifiers, not names. Read their names from their own routes.
4314
+ */
4315
+ get: operations["ListCustomerRenewals"];
4316
+ put?: never;
4317
+ post?: never;
4318
+ delete?: never;
4319
+ options?: never;
4320
+ head?: never;
4321
+ patch?: never;
4322
+ trace?: never;
4323
+ };
4324
+ "/api/v1/customer/renewals/{id}": {
4325
+ parameters: {
4326
+ query?: never;
4327
+ header?: never;
4328
+ path?: never;
4329
+ cookie?: never;
4330
+ };
4331
+ /**
4332
+ * One of your own renewals, what it still needs, and what you have said about it
4333
+ * @description REN-002, REN-005 and REN-006. The renewal, its checklist, and every answer you have given about it.
4334
+ *
4335
+ * **`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).
4336
+ *
4337
+ * **`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.
4338
+ *
4339
+ * 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.
4340
+ */
4341
+ get: operations["GetCustomerRenewal"];
4342
+ put?: never;
4343
+ post?: never;
4344
+ delete?: never;
4345
+ options?: never;
4346
+ head?: never;
4347
+ patch?: never;
4348
+ trace?: never;
4349
+ };
4350
+ "/api/v1/customer/renewals/{id}/responses": {
4351
+ parameters: {
4352
+ query?: never;
4353
+ header?: never;
4354
+ path?: never;
4355
+ cookie?: never;
4356
+ };
4357
+ get?: never;
4358
+ put?: never;
4359
+ /**
4360
+ * Confirm, decline or ask for changes to one of your own renewals
4361
+ * @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.
4362
+ *
4363
+ * **`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.
4364
+ *
4365
+ * **`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.
4366
+ *
4367
+ * 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.
4368
+ */
4369
+ post: operations["RespondToCustomerRenewal"];
4370
+ delete?: never;
4371
+ options?: never;
4372
+ head?: never;
4373
+ patch?: never;
4374
+ trace?: never;
4375
+ };
4292
4376
  "/api/v1/policy-documents/download-links/{token}": {
4293
4377
  parameters: {
4294
4378
  query?: never;
@@ -5804,6 +5888,42 @@ export interface components {
5804
5888
  /** Format: date-time */
5805
5889
  withdrawnAtUtc: null | string;
5806
5890
  };
5891
+ CustomerRenewalAnswerResponse: {
5892
+ /** Format: uuid */
5893
+ id: string;
5894
+ answer: string;
5895
+ /** Format: uuid */
5896
+ formSubmissionId: null | string;
5897
+ note: null | string;
5898
+ /** Format: date-time */
5899
+ recordedAtUtc: string;
5900
+ };
5901
+ CustomerRenewalDetailResponse: {
5902
+ renewal: components["schemas"]["CustomerRenewalSummary"];
5903
+ checklist: components["schemas"]["RenewalChecklistItemResponse"][];
5904
+ answers: components["schemas"]["CustomerRenewalAnswerResponse"][];
5905
+ };
5906
+ CustomerRenewalPage: {
5907
+ items: components["schemas"]["CustomerRenewalSummary"][];
5908
+ nextCursor: null | string;
5909
+ };
5910
+ CustomerRenewalSummary: {
5911
+ /** Format: uuid */
5912
+ id: string;
5913
+ status: string;
5914
+ /** Format: uuid */
5915
+ previousPolicyId: string;
5916
+ /** Format: uuid */
5917
+ newPolicyId: null | string;
5918
+ /** Format: uuid */
5919
+ productId: string;
5920
+ /** Format: uuid */
5921
+ insurerId: string;
5922
+ /** Format: date */
5923
+ previousCoverEnd: string;
5924
+ /** Format: date-time */
5925
+ openedAtUtc: string;
5926
+ };
5807
5927
  CustomerResponse: {
5808
5928
  /** Format: uuid */
5809
5929
  id: string;
@@ -7318,6 +7438,7 @@ export interface components {
7318
7438
  /** Format: uuid */
7319
7439
  quoteRequestId: null | string;
7320
7440
  checklist: components["schemas"]["RenewalChecklistItemResponse"][];
7441
+ customerAnswers: components["schemas"]["CustomerRenewalAnswerResponse"][];
7321
7442
  };
7322
7443
  RenewalCasePage: {
7323
7444
  items: components["schemas"]["RenewalCaseSummaryResponse"][];
@@ -7433,6 +7554,12 @@ export interface components {
7433
7554
  /** Format: date */
7434
7555
  incidentOn: string;
7435
7556
  };
7557
+ RespondToRenewalRequest: {
7558
+ answer: null | string;
7559
+ /** Format: uuid */
7560
+ formSubmissionId: null | string;
7561
+ note: null | string;
7562
+ };
7436
7563
  RetentionPeriodResponse: {
7437
7564
  /** Format: int32 */
7438
7565
  amount: number | string;
@@ -17632,6 +17759,127 @@ export interface operations {
17632
17759
  };
17633
17760
  };
17634
17761
  };
17762
+ ListCustomerRenewals: {
17763
+ parameters: {
17764
+ query?: {
17765
+ cursor?: string;
17766
+ limit?: number | string;
17767
+ };
17768
+ header?: never;
17769
+ path?: never;
17770
+ cookie?: never;
17771
+ };
17772
+ requestBody?: never;
17773
+ responses: {
17774
+ /** @description OK */
17775
+ 200: {
17776
+ headers: {
17777
+ [name: string]: unknown;
17778
+ };
17779
+ content: {
17780
+ "application/json": components["schemas"]["CustomerRenewalPage"];
17781
+ };
17782
+ };
17783
+ /** @description Bad Request */
17784
+ 400: {
17785
+ headers: {
17786
+ [name: string]: unknown;
17787
+ };
17788
+ content: {
17789
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
17790
+ };
17791
+ };
17792
+ };
17793
+ };
17794
+ GetCustomerRenewal: {
17795
+ parameters: {
17796
+ query?: never;
17797
+ header?: never;
17798
+ path: {
17799
+ id: string;
17800
+ };
17801
+ cookie?: never;
17802
+ };
17803
+ requestBody?: never;
17804
+ responses: {
17805
+ /** @description OK */
17806
+ 200: {
17807
+ headers: {
17808
+ [name: string]: unknown;
17809
+ };
17810
+ content: {
17811
+ "application/json": components["schemas"]["CustomerRenewalDetailResponse"];
17812
+ };
17813
+ };
17814
+ /** @description Not Found */
17815
+ 404: {
17816
+ headers: {
17817
+ [name: string]: unknown;
17818
+ };
17819
+ content?: never;
17820
+ };
17821
+ };
17822
+ };
17823
+ RespondToCustomerRenewal: {
17824
+ parameters: {
17825
+ query?: never;
17826
+ header?: never;
17827
+ path: {
17828
+ id: string;
17829
+ };
17830
+ cookie?: never;
17831
+ };
17832
+ requestBody: {
17833
+ content: {
17834
+ "application/json": components["schemas"]["RespondToRenewalRequest"];
17835
+ };
17836
+ };
17837
+ responses: {
17838
+ /** @description OK */
17839
+ 200: {
17840
+ headers: {
17841
+ [name: string]: unknown;
17842
+ };
17843
+ content: {
17844
+ "application/json": components["schemas"]["CustomerRenewalDetailResponse"];
17845
+ };
17846
+ };
17847
+ /** @description Bad Request */
17848
+ 400: {
17849
+ headers: {
17850
+ [name: string]: unknown;
17851
+ };
17852
+ content: {
17853
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
17854
+ };
17855
+ };
17856
+ /** @description Not Found */
17857
+ 404: {
17858
+ headers: {
17859
+ [name: string]: unknown;
17860
+ };
17861
+ content?: never;
17862
+ };
17863
+ /** @description Conflict */
17864
+ 409: {
17865
+ headers: {
17866
+ [name: string]: unknown;
17867
+ };
17868
+ content: {
17869
+ "application/problem+json": components["schemas"]["ProblemDetails"];
17870
+ };
17871
+ };
17872
+ /** @description Unprocessable Entity */
17873
+ 422: {
17874
+ headers: {
17875
+ [name: string]: unknown;
17876
+ };
17877
+ content: {
17878
+ "application/problem+json": components["schemas"]["ProblemDetails"];
17879
+ };
17880
+ };
17881
+ };
17882
+ };
17635
17883
  RedeemPolicyDocumentDownloadLink: {
17636
17884
  parameters: {
17637
17885
  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.8.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,