@insurance-broker/api-client 1.8.0 → 1.10.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 +242 -0
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -1847,6 +1847,30 @@ export interface paths {
1847
1847
  patch?: never;
1848
1848
  trace?: never;
1849
1849
  };
1850
+ "/api/v1/renewals": {
1851
+ parameters: {
1852
+ query?: never;
1853
+ header?: never;
1854
+ path?: never;
1855
+ cookie?: never;
1856
+ };
1857
+ /**
1858
+ * List this broker's renewals in one of REN-008's four views
1859
+ * @description REN-008. One of four views, named by `view`: `upcoming` and `overdue` are the live cases split by whether the previous cover end has passed the day the page was measured against, and `lost` and `completed` are the two terminal outcomes. Optionally narrowed by product, insurer or assigned staff member, which is REN-008's grouping. Paged by cursor, oldest previous-cover-end first.
1860
+ *
1861
+ * **"Overdue" is not a status.** No row stores it: it is computed per request from the case's previous cover end against today, and the day used is returned as `asOf` so a page saying twelve are overdue also says what overdue was measured from.
1862
+ *
1863
+ * Carries identifiers and no names. A product's name lives in the catalogue, a person's in identity and access, and a customer's in CRM, so a client joins those surfaces itself. A cancelled renewal appears in none of the four views - REN-008 names four and cancelled is not one of them (issue #220).
1864
+ */
1865
+ get: operations["ListRenewals"];
1866
+ put?: never;
1867
+ post?: never;
1868
+ delete?: never;
1869
+ options?: never;
1870
+ head?: never;
1871
+ patch?: never;
1872
+ trace?: never;
1873
+ };
1850
1874
  "/api/v1/renewals/{id}/customer-information": {
1851
1875
  parameters: {
1852
1876
  query?: never;
@@ -1907,6 +1931,54 @@ export interface paths {
1907
1931
  patch?: never;
1908
1932
  trace?: never;
1909
1933
  };
1934
+ "/api/v1/renewals/{id}/completion": {
1935
+ parameters: {
1936
+ query?: never;
1937
+ header?: never;
1938
+ path?: never;
1939
+ cookie?: never;
1940
+ };
1941
+ get?: never;
1942
+ put?: never;
1943
+ /**
1944
+ * Complete a renewal: open the successor policy and supersede the previous cover
1945
+ * @description REN-007. The phase's exit criterion. Opens a policy from the acceptance this renewal's quote request already carries, links it to the case, and moves the previous policy to renewed with the instant its successor took over - all in one transaction, so the case's status, the link, the new policy and the previous policy's stamp commit together or not at all. Takes no body: the quote request is the one on the case, so this cannot be pointed at a different acceptance.
1946
+ *
1947
+ * The successor is created proposed and nothing here binds cover (BR-005). It becomes active only when an insurer's confirmation is recorded against it, through the policy routes - so the renewal's insurer-confirmation condition is still outstanding after this, and so is approval where a broker requires it. REN-005's customer-facing renewal surface is untouched.
1948
+ *
1949
+ * Refused if the customer has not accepted, if the renewal never went to market, if nothing has been accepted on the quote request it names, or if the previous policy never went into force - cover that was never in force cannot be renewed, and such a renewal is concluded as lost instead. Completing twice reads back the first result rather than making a second policy.
1950
+ */
1951
+ post: operations["CompleteRenewal"];
1952
+ delete?: never;
1953
+ options?: never;
1954
+ head?: never;
1955
+ patch?: never;
1956
+ trace?: never;
1957
+ };
1958
+ "/api/v1/renewals/{id}/loss": {
1959
+ parameters: {
1960
+ query?: never;
1961
+ header?: never;
1962
+ path?: never;
1963
+ cookie?: never;
1964
+ };
1965
+ get?: never;
1966
+ put?: never;
1967
+ /**
1968
+ * Conclude a renewal that produced no replacement cover
1969
+ * @description REN-008. Records that this renewal ended without a successor - the customer went elsewhere, the insurer declined, or nobody acted before the cover ended - and expires the previous policy where its cover was in force. This is the door ADR-0035 names for the expired status: a renewal process concluding without replacement. Nothing sweeps a policy there.
1970
+ *
1971
+ * A previous policy that never went into force is left exactly where it stands, which is the correct outcome and not an error: cover that was never in force did not expire. The response says which of the two happened.
1972
+ *
1973
+ * It creates no policy, satisfies no outstanding condition and withdraws none - a condition still outstanding when the renewal was given up stays outstanding, because that is what happened. Concluding twice reads back the first result. Refused only if the case has already concluded some other way.
1974
+ */
1975
+ post: operations["LoseRenewal"];
1976
+ delete?: never;
1977
+ options?: never;
1978
+ head?: never;
1979
+ patch?: never;
1980
+ trace?: never;
1981
+ };
1910
1982
  "/api/v1/customer/policy-documents": {
1911
1983
  parameters: {
1912
1984
  query?: never;
@@ -3731,6 +3803,47 @@ export interface components {
3731
3803
  RenameFormDefinitionRequest: {
3732
3804
  name: null | string;
3733
3805
  };
3806
+ RenewalCasePage: {
3807
+ items: components["schemas"]["RenewalCaseSummaryResponse"][];
3808
+ nextCursor: null | string;
3809
+ /** Format: date */
3810
+ asOf: string;
3811
+ };
3812
+ RenewalCaseSummaryResponse: {
3813
+ /** Format: uuid */
3814
+ id: string;
3815
+ status: string;
3816
+ /** Format: uuid */
3817
+ customerId: null | string;
3818
+ /** Format: uuid */
3819
+ previousPolicyId: string;
3820
+ /** Format: uuid */
3821
+ newPolicyId: null | string;
3822
+ /** Format: uuid */
3823
+ productId: string;
3824
+ /** Format: uuid */
3825
+ insurerId: string;
3826
+ assignedToSubjectId: null | string;
3827
+ /** Format: date */
3828
+ previousCoverEnd: string;
3829
+ /** Format: date-time */
3830
+ openedAtUtc: string;
3831
+ };
3832
+ RenewalCompletionResponse: {
3833
+ /** Format: uuid */
3834
+ renewalCaseId: string;
3835
+ status: string;
3836
+ /** Format: uuid */
3837
+ quoteRequestId: string;
3838
+ /** Format: uuid */
3839
+ newPolicyId: string;
3840
+ newPolicyStatus: string;
3841
+ /** Format: uuid */
3842
+ previousPolicyId: string;
3843
+ previousPolicyStatus: string;
3844
+ /** Format: date-time */
3845
+ previousPolicyRenewedAtUtc: null | string;
3846
+ };
3734
3847
  RenewalCustomerInformationResponse: {
3735
3848
  /** Format: uuid */
3736
3849
  renewalCaseId: string;
@@ -3766,6 +3879,14 @@ export interface components {
3766
3879
  changedAtUtc: null | string;
3767
3880
  changedBySubjectId: null | string;
3768
3881
  };
3882
+ RenewalLossResponse: {
3883
+ /** Format: uuid */
3884
+ renewalCaseId: string;
3885
+ status: string;
3886
+ /** Format: uuid */
3887
+ previousPolicyId: string;
3888
+ previousPolicyStatus: string;
3889
+ };
3769
3890
  RenewalTermsResponse: {
3770
3891
  /** Format: uuid */
3771
3892
  renewalCaseId: string;
@@ -8897,6 +9018,42 @@ export interface operations {
8897
9018
  };
8898
9019
  };
8899
9020
  };
9021
+ ListRenewals: {
9022
+ parameters: {
9023
+ query?: {
9024
+ view?: string;
9025
+ productId?: string;
9026
+ insurerId?: string;
9027
+ assignedToSubjectId?: string;
9028
+ cursor?: string;
9029
+ limit?: number | string;
9030
+ };
9031
+ header?: never;
9032
+ path?: never;
9033
+ cookie?: never;
9034
+ };
9035
+ requestBody?: never;
9036
+ responses: {
9037
+ /** @description OK */
9038
+ 200: {
9039
+ headers: {
9040
+ [name: string]: unknown;
9041
+ };
9042
+ content: {
9043
+ "application/json": components["schemas"]["RenewalCasePage"];
9044
+ };
9045
+ };
9046
+ /** @description Bad Request */
9047
+ 400: {
9048
+ headers: {
9049
+ [name: string]: unknown;
9050
+ };
9051
+ content: {
9052
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
9053
+ };
9054
+ };
9055
+ };
9056
+ };
8900
9057
  RecordRenewalCustomerInformation: {
8901
9058
  parameters: {
8902
9059
  query?: never;
@@ -9064,6 +9221,91 @@ export interface operations {
9064
9221
  };
9065
9222
  };
9066
9223
  };
9224
+ CompleteRenewal: {
9225
+ parameters: {
9226
+ query?: never;
9227
+ header?: never;
9228
+ path: {
9229
+ id: string;
9230
+ };
9231
+ cookie?: never;
9232
+ };
9233
+ requestBody?: never;
9234
+ responses: {
9235
+ /** @description OK */
9236
+ 200: {
9237
+ headers: {
9238
+ [name: string]: unknown;
9239
+ };
9240
+ content: {
9241
+ "application/json": components["schemas"]["RenewalCompletionResponse"];
9242
+ };
9243
+ };
9244
+ /** @description Not Found */
9245
+ 404: {
9246
+ headers: {
9247
+ [name: string]: unknown;
9248
+ };
9249
+ content?: never;
9250
+ };
9251
+ /** @description Conflict */
9252
+ 409: {
9253
+ headers: {
9254
+ [name: string]: unknown;
9255
+ };
9256
+ content: {
9257
+ "application/problem+json": components["schemas"]["ProblemDetails"];
9258
+ };
9259
+ };
9260
+ /** @description Unprocessable Entity */
9261
+ 422: {
9262
+ headers: {
9263
+ [name: string]: unknown;
9264
+ };
9265
+ content: {
9266
+ "application/problem+json": components["schemas"]["ProblemDetails"];
9267
+ };
9268
+ };
9269
+ };
9270
+ };
9271
+ LoseRenewal: {
9272
+ parameters: {
9273
+ query?: never;
9274
+ header?: never;
9275
+ path: {
9276
+ id: string;
9277
+ };
9278
+ cookie?: never;
9279
+ };
9280
+ requestBody?: never;
9281
+ responses: {
9282
+ /** @description OK */
9283
+ 200: {
9284
+ headers: {
9285
+ [name: string]: unknown;
9286
+ };
9287
+ content: {
9288
+ "application/json": components["schemas"]["RenewalLossResponse"];
9289
+ };
9290
+ };
9291
+ /** @description Not Found */
9292
+ 404: {
9293
+ headers: {
9294
+ [name: string]: unknown;
9295
+ };
9296
+ content?: never;
9297
+ };
9298
+ /** @description Conflict */
9299
+ 409: {
9300
+ headers: {
9301
+ [name: string]: unknown;
9302
+ };
9303
+ content: {
9304
+ "application/problem+json": components["schemas"]["ProblemDetails"];
9305
+ };
9306
+ };
9307
+ };
9308
+ };
9067
9309
  ListCustomerPolicyDocuments: {
9068
9310
  parameters: {
9069
9311
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "1.8.0",
3
+ "version": "1.10.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,