@insurance-broker/api-client 5.52.0 → 5.54.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 +359 -56
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -3939,7 +3939,12 @@ export interface paths {
3939
3939
  };
3940
3940
  get?: never;
3941
3941
  put?: never;
3942
- /** Records where one of this broker's people works and which desk they sit on. */
3942
+ /**
3943
+ * Records where one of this broker's people works and which desk they sit on.
3944
+ * @description A caller may place only a member every one of whose permission keys the caller holds, and may not place themselves.
3945
+ *
3946
+ * **Refusals.** `400`: no branch or team of this broker has that identifier (`GET /api/v1/branches` and `GET /api/v1/teams` list them). `403` `urn:brokerplatform:problem:permissions-beyond-caller`: the member holds a permission the caller does not; a `403` with no body means the caller does not hold `identity.members.manage`. `404` with no body: no member of this broker has that identifier. `409` `urn:brokerplatform:problem:member-self-administration`: the member is the caller (`isCaller` is true on them in `GET /api/v1/members`), and another administrator must place them. `409` `urn:brokerplatform:problem:member-revoked`: the member's access has been revoked. Problem details are written for the person using the screen and name no route.
3947
+ */
3943
3948
  post: operations["PlaceMember"];
3944
3949
  delete?: never;
3945
3950
  options?: never;
@@ -3956,13 +3961,15 @@ export interface paths {
3956
3961
  };
3957
3962
  /**
3958
3963
  * This broker's memberships, with status, roles and placement, oldest first.
3959
- * @description Paged by an opaque cursor: pass `nextCursor` back as `cursor` until it is null. `limit` is 25 by default and at most 100; zero or less means the default. `status` narrows the list to `Invited`, `Active`, `Suspended` or `Revoked`. A revoked member whose name has been erased comes back as "Former member of staff". Names are personal data.
3964
+ * @description Paged by an opaque cursor: pass `nextCursor` back as `cursor` until it is null. `limit` is 25 by default and at most 100; zero or less means the default. `status` narrows the list to `Invited`, `Active`, `Suspended` or `Revoked`. A revoked member whose name has been erased comes back as "Former member of staff". Names are personal data. Each role carries the permission keys it grants, so a client can tell which roles the caller may give or take, and `isCaller` marks the caller's own live membership, which the caller may not change, place or revoke.
3960
3965
  */
3961
3966
  get: operations["ListMembers"];
3962
3967
  put?: never;
3963
3968
  /**
3964
3969
  * Gives a person with a staff account access to this broker, holding the named roles.
3965
- * @description The subject must name an account that already exists in the staff realm; this platform does not create staff accounts. The membership is active at once, as the platform's own grant is: there is no acceptance step. At least one role is required, and each must hold only permissions the caller holds. A person who already has a live membership of this broker is refused 409.
3970
+ * @description The subject must name an account that already exists in the staff realm; this platform does not create staff accounts. The membership is active at once, as the platform's own grant is: there is no acceptance step. At least one role is required, and each must hold only permissions the caller holds.
3971
+ *
3972
+ * **Refusals.** A role identifier this broker does not have is a `400` validation problem against `roleIds`; `GET /api/v1/roles` lists the roles it has. A role holding a permission the caller does not hold is `403` `urn:brokerplatform:problem:permissions-beyond-caller`; a `403` with no body means the caller does not hold `identity.members.manage`. A person who already has a live membership of this broker is `409` `urn:brokerplatform:problem:already-a-member`: change what they hold with `PUT` or `DELETE /api/v1/members/{membershipId}/roles/{roleId}` instead. Problem details are written for the person using the screen and name no route.
3966
3973
  */
3967
3974
  post: operations["InviteMember"];
3968
3975
  delete?: never;
@@ -3983,6 +3990,8 @@ export interface paths {
3983
3990
  /**
3984
3991
  * Withdraws a member of staff's access to this broker permanently. Terminal.
3985
3992
  * @description Every request from that person to this broker that starts after the revocation commits is refused; one already past authorization completes. Their identity-provider account is not changed. Revoking a membership that is already revoked answers it as it stands and changes nothing. A caller may not revoke their own membership. A revoked membership cannot be restored.
3993
+ *
3994
+ * **Typed refusals.** `403` `urn:brokerplatform:problem:permissions-beyond-caller`: the member holds a permission the caller does not; a `403` with no body means the caller does not hold `identity.members.manage`. `409` `urn:brokerplatform:problem:member-self-administration`: the member is the caller (`isCaller` is true on them in `GET /api/v1/members`), and another administrator must do it.
3986
3995
  */
3987
3996
  post: operations["RevokeMembership"];
3988
3997
  delete?: never;
@@ -4002,12 +4011,16 @@ export interface paths {
4002
4011
  /**
4003
4012
  * Gives a member of staff one of this broker's roles. Idempotent.
4004
4013
  * @description The member can do what the role grants from their next request onward. The role must hold only permissions the caller holds. A caller may not change their own roles, and a revoked membership's roles are not changed. Assigning a role the member already holds answers the member as they stand and writes nothing.
4014
+ *
4015
+ * **Refusals, each with its own `type`.** `404` `urn:brokerplatform:problem:member-not-found`: no member of this broker has that identifier (`GET /api/v1/members` lists them). `404` `urn:brokerplatform:problem:role-not-found`: no role of this broker has that identifier (`GET /api/v1/roles` lists them). `403` `urn:brokerplatform:problem:permissions-beyond-caller`: the role holds a permission the caller does not; a `403` with no body means the caller does not hold `identity.members.manage`. `409` `urn:brokerplatform:problem:member-self-administration`: the member is the caller (`isCaller` is true on them), and another administrator must make the change. `409` `urn:brokerplatform:problem:member-revoked`: the member's access has been revoked, so their roles are a record. Problem details are written for the person using the screen and name no route.
4005
4016
  */
4006
4017
  put: operations["AssignMemberRole"];
4007
4018
  post?: never;
4008
4019
  /**
4009
4020
  * Takes one of this broker's roles away from a member of staff. Idempotent.
4010
4021
  * @description The member can no longer do what only that role granted from their next request onward. The role must hold only permissions the caller holds: a caller may not take away what they could not have given. A caller may not change their own roles, and a revoked membership's roles are not changed. Removing a role the member does not hold answers the member as they stand and writes nothing.
4022
+ *
4023
+ * **Refusals, each with its own `type`.** `404` `urn:brokerplatform:problem:member-not-found`: no member of this broker has that identifier (`GET /api/v1/members` lists them). `404` `urn:brokerplatform:problem:role-not-found`: no role of this broker has that identifier (`GET /api/v1/roles` lists them). `403` `urn:brokerplatform:problem:permissions-beyond-caller`: the role holds a permission the caller does not; a `403` with no body means the caller does not hold `identity.members.manage`. `409` `urn:brokerplatform:problem:member-self-administration`: the member is the caller (`isCaller` is true on them), and another administrator must make the change. `409` `urn:brokerplatform:problem:member-revoked`: the member's access has been revoked, so their roles are a record. Problem details are written for the person using the screen and name no route.
4011
4024
  */
4012
4025
  delete: operations["RemoveMemberRole"];
4013
4026
  options?: never;
@@ -5057,6 +5070,109 @@ export interface paths {
5057
5070
  patch?: never;
5058
5071
  trace?: never;
5059
5072
  };
5073
+ "/api/v1/policies/outstanding-items/overdue": {
5074
+ parameters: {
5075
+ query?: never;
5076
+ header?: never;
5077
+ path?: never;
5078
+ cookie?: never;
5079
+ };
5080
+ /**
5081
+ * Read what is overdue across this broker's policies
5082
+ * @description POL-007. Every outstanding item, on any of this broker's policies, that has not been satisfied and was due before today. **Most overdue first**: due date ascending, ties broken by identifier.
5083
+ *
5084
+ * `awaitedFrom` narrows it to `Insurer` or `Customer`, so the insurer chasing and the customer chasing can be worked separately.
5085
+ *
5086
+ * **Overdue is computed, never stored.** Today is UTC's day, read on each request and reported as `asOf` on every page. A walk that crosses midnight loses nothing: the items that become overdue at midnight are due on the latest day in the list, so they join the end of the walk.
5087
+ *
5088
+ * Paged by cursor (ADR-0031): pass `nextCursor` back as `cursor` until it is null. `limit` is 25 by default and at most 100. A cursor this list did not issue is a `400`.
5089
+ */
5090
+ get: operations["ListOverduePolicyOutstandingItems"];
5091
+ put?: never;
5092
+ post?: never;
5093
+ delete?: never;
5094
+ options?: never;
5095
+ head?: never;
5096
+ patch?: never;
5097
+ trace?: never;
5098
+ };
5099
+ "/api/v1/policy-documents/download-links/{token}": {
5100
+ parameters: {
5101
+ query?: never;
5102
+ header?: never;
5103
+ path?: never;
5104
+ cookie?: never;
5105
+ };
5106
+ /** Redeems a short-lived download link and streams the policy document it names. */
5107
+ get: operations["RedeemPolicyDocumentDownloadLink"];
5108
+ put?: never;
5109
+ post?: never;
5110
+ delete?: never;
5111
+ options?: never;
5112
+ head?: never;
5113
+ patch?: never;
5114
+ trace?: never;
5115
+ };
5116
+ "/api/v1/policies/{id}/outstanding-items": {
5117
+ parameters: {
5118
+ query?: never;
5119
+ header?: never;
5120
+ path?: never;
5121
+ cookie?: never;
5122
+ };
5123
+ /**
5124
+ * Read what a policy is or was waiting on
5125
+ * @description POL-007. Everything recorded as outstanding on this policy, newest raised first.
5126
+ *
5127
+ * `outstanding=true` narrows it to what is still being waited on and `outstanding=false` to what has been satisfied. Absent, the whole history comes back. Not paged: the set is bounded by how many things one policy waited on.
5128
+ *
5129
+ * **Staff only.** Nothing here is shown to the customer.
5130
+ */
5131
+ get: operations["ListPolicyOutstandingItems"];
5132
+ put?: never;
5133
+ /**
5134
+ * Record that a policy is waiting on the insurer or the customer
5135
+ * @description POL-007. Records what this policy is waiting on, which side owes it, and the day it is due.
5136
+ *
5137
+ * **This creates a row and never changes the policy's status.** A policy waiting on a certificate is still `Active`.
5138
+ *
5139
+ * **What is outstanding is your own words**, not a code from a list. The side is `Insurer` or `Customer`. `dueOn` is required and may be in the past.
5140
+ *
5141
+ * **Nothing about an item can be edited afterwards.** A wrong item is satisfied and the right one raised; a moved deadline is a new item, because the old one was missed.
5142
+ *
5143
+ * Refused with 409 when the policy has been renewed: its successor is where the work is.
5144
+ */
5145
+ post: operations["RaisePolicyOutstandingItem"];
5146
+ delete?: never;
5147
+ options?: never;
5148
+ head?: never;
5149
+ patch?: never;
5150
+ trace?: never;
5151
+ };
5152
+ "/api/v1/policies/{id}/outstanding-items/{itemId}/satisfaction": {
5153
+ parameters: {
5154
+ query?: never;
5155
+ header?: never;
5156
+ path?: never;
5157
+ cookie?: never;
5158
+ };
5159
+ get?: never;
5160
+ put?: never;
5161
+ /**
5162
+ * Record that what a policy was waiting on has arrived
5163
+ * @description POL-007. Marks one outstanding item satisfied, naming you and the instant.
5164
+ *
5165
+ * **Allowed after the policy has been renewed**: something can arrive late, and the record may not be made to deny it.
5166
+ *
5167
+ * A second satisfaction is refused with 409 naming who dealt with it, and so is the second of two racing each other.
5168
+ */
5169
+ post: operations["SatisfyPolicyOutstandingItem"];
5170
+ delete?: never;
5171
+ options?: never;
5172
+ head?: never;
5173
+ patch?: never;
5174
+ trace?: never;
5175
+ };
5060
5176
  "/api/v1/policies/{id}/documents/{kind}": {
5061
5177
  parameters: {
5062
5178
  query?: never;
@@ -5853,23 +5969,6 @@ export interface paths {
5853
5969
  patch?: never;
5854
5970
  trace?: never;
5855
5971
  };
5856
- "/api/v1/policy-documents/download-links/{token}": {
5857
- parameters: {
5858
- query?: never;
5859
- header?: never;
5860
- path?: never;
5861
- cookie?: never;
5862
- };
5863
- /** Redeems a short-lived download link and streams the policy document it names. */
5864
- get: operations["RedeemPolicyDocumentDownloadLink"];
5865
- put?: never;
5866
- post?: never;
5867
- delete?: never;
5868
- options?: never;
5869
- head?: never;
5870
- patch?: never;
5871
- trace?: never;
5872
- };
5873
5972
  "/api/v1/quote-requests": {
5874
5973
  parameters: {
5875
5974
  query?: never;
@@ -9047,12 +9146,14 @@ export interface components {
9047
9146
  branchId: null | string;
9048
9147
  /** Format: uuid */
9049
9148
  teamId: null | string;
9149
+ isCaller: boolean;
9050
9150
  };
9051
9151
  MemberRoleResponse: {
9052
9152
  /** Format: uuid */
9053
9153
  roleId: string;
9054
9154
  key: string;
9055
9155
  name: string;
9156
+ permissionKeys: string[];
9056
9157
  };
9057
9158
  MissingTemplateValueResponse: {
9058
9159
  key: string;
@@ -9264,6 +9365,29 @@ export interface components {
9264
9365
  /** Format: int32 */
9265
9366
  attempts: number;
9266
9367
  };
9368
+ OverduePolicyOutstandingItemPage: {
9369
+ items: components["schemas"]["OverduePolicyOutstandingItemResponse"][];
9370
+ nextCursor: null | string;
9371
+ /** Format: date */
9372
+ asOf: string;
9373
+ };
9374
+ OverduePolicyOutstandingItemResponse: {
9375
+ /** Format: uuid */
9376
+ id: string;
9377
+ /** Format: uuid */
9378
+ policyId: string;
9379
+ /** Format: uuid */
9380
+ customerId: string;
9381
+ awaitedFrom: string;
9382
+ description: string;
9383
+ /** Format: date */
9384
+ dueOn: string;
9385
+ raisedBySubjectId: string;
9386
+ /** Format: date-time */
9387
+ raisedAtUtc: string;
9388
+ productName: null | string;
9389
+ insurerReference: null | string;
9390
+ };
9267
9391
  OverrideEntitlementRequest: {
9268
9392
  featureKey: null | string;
9269
9393
  value: null | string;
@@ -9644,6 +9768,25 @@ export interface components {
9644
9768
  PolicyImportUpload: {
9645
9769
  file: components["schemas"]["IFormFile"];
9646
9770
  };
9771
+ PolicyOutstandingItemResponse: {
9772
+ /** Format: uuid */
9773
+ id: string;
9774
+ /** Format: uuid */
9775
+ policyId: string;
9776
+ /** Format: uuid */
9777
+ customerId: string;
9778
+ awaitedFrom: string;
9779
+ description: string;
9780
+ /** Format: date */
9781
+ dueOn: string;
9782
+ raisedBySubjectId: string;
9783
+ /** Format: date-time */
9784
+ raisedAtUtc: string;
9785
+ satisfiedBySubjectId: null | string;
9786
+ /** Format: date-time */
9787
+ satisfiedAtUtc: null | string;
9788
+ isOutstanding: boolean;
9789
+ };
9647
9790
  PolicyPage: {
9648
9791
  items: components["schemas"]["PolicyResponse"][];
9649
9792
  nextCursor: null | string;
@@ -10043,6 +10186,12 @@ export interface components {
10043
10186
  awaitedFrom: null | string;
10044
10187
  description: null | string;
10045
10188
  };
10189
+ RaisePolicyOutstandingItemRequest: {
10190
+ awaitedFrom: string;
10191
+ description: string;
10192
+ /** Format: date */
10193
+ dueOn: null | string;
10194
+ };
10046
10195
  RaiseQuoteRequestRequest: {
10047
10196
  /** Format: uuid */
10048
10197
  formSubmissionId: null | string;
@@ -23138,6 +23287,196 @@ export interface operations {
23138
23287
  };
23139
23288
  };
23140
23289
  };
23290
+ ListOverduePolicyOutstandingItems: {
23291
+ parameters: {
23292
+ query?: {
23293
+ awaitedFrom?: string;
23294
+ cursor?: string;
23295
+ limit?: number | string;
23296
+ };
23297
+ header?: never;
23298
+ path?: never;
23299
+ cookie?: never;
23300
+ };
23301
+ requestBody?: never;
23302
+ responses: {
23303
+ /** @description OK */
23304
+ 200: {
23305
+ headers: {
23306
+ [name: string]: unknown;
23307
+ };
23308
+ content: {
23309
+ "application/json": components["schemas"]["OverduePolicyOutstandingItemPage"];
23310
+ };
23311
+ };
23312
+ /** @description Bad Request */
23313
+ 400: {
23314
+ headers: {
23315
+ [name: string]: unknown;
23316
+ };
23317
+ content: {
23318
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
23319
+ };
23320
+ };
23321
+ };
23322
+ };
23323
+ RedeemPolicyDocumentDownloadLink: {
23324
+ parameters: {
23325
+ query?: never;
23326
+ header?: never;
23327
+ path: {
23328
+ token: string;
23329
+ };
23330
+ cookie?: never;
23331
+ };
23332
+ requestBody?: never;
23333
+ responses: {
23334
+ /** @description OK */
23335
+ 200: {
23336
+ headers: {
23337
+ [name: string]: unknown;
23338
+ };
23339
+ content?: never;
23340
+ };
23341
+ /** @description Not Found */
23342
+ 404: {
23343
+ headers: {
23344
+ [name: string]: unknown;
23345
+ };
23346
+ content?: never;
23347
+ };
23348
+ /** @description Conflict */
23349
+ 409: {
23350
+ headers: {
23351
+ [name: string]: unknown;
23352
+ };
23353
+ content: {
23354
+ "application/problem+json": components["schemas"]["ProblemDetails"];
23355
+ };
23356
+ };
23357
+ };
23358
+ };
23359
+ ListPolicyOutstandingItems: {
23360
+ parameters: {
23361
+ query?: {
23362
+ outstanding?: boolean;
23363
+ };
23364
+ header?: never;
23365
+ path: {
23366
+ id: string;
23367
+ };
23368
+ cookie?: never;
23369
+ };
23370
+ requestBody?: never;
23371
+ responses: {
23372
+ /** @description OK */
23373
+ 200: {
23374
+ headers: {
23375
+ [name: string]: unknown;
23376
+ };
23377
+ content: {
23378
+ "application/json": components["schemas"]["PolicyOutstandingItemResponse"][];
23379
+ };
23380
+ };
23381
+ /** @description Not Found */
23382
+ 404: {
23383
+ headers: {
23384
+ [name: string]: unknown;
23385
+ };
23386
+ content?: never;
23387
+ };
23388
+ };
23389
+ };
23390
+ RaisePolicyOutstandingItem: {
23391
+ parameters: {
23392
+ query?: never;
23393
+ header?: never;
23394
+ path: {
23395
+ id: string;
23396
+ };
23397
+ cookie?: never;
23398
+ };
23399
+ requestBody: {
23400
+ content: {
23401
+ "application/json": components["schemas"]["RaisePolicyOutstandingItemRequest"];
23402
+ };
23403
+ };
23404
+ responses: {
23405
+ /** @description Created */
23406
+ 201: {
23407
+ headers: {
23408
+ [name: string]: unknown;
23409
+ };
23410
+ content: {
23411
+ "application/json": components["schemas"]["PolicyOutstandingItemResponse"];
23412
+ };
23413
+ };
23414
+ /** @description Bad Request */
23415
+ 400: {
23416
+ headers: {
23417
+ [name: string]: unknown;
23418
+ };
23419
+ content: {
23420
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
23421
+ };
23422
+ };
23423
+ /** @description Not Found */
23424
+ 404: {
23425
+ headers: {
23426
+ [name: string]: unknown;
23427
+ };
23428
+ content?: never;
23429
+ };
23430
+ /** @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. */
23431
+ 409: {
23432
+ headers: {
23433
+ [name: string]: unknown;
23434
+ };
23435
+ content: {
23436
+ "application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
23437
+ };
23438
+ };
23439
+ };
23440
+ };
23441
+ SatisfyPolicyOutstandingItem: {
23442
+ parameters: {
23443
+ query?: never;
23444
+ header?: never;
23445
+ path: {
23446
+ id: string;
23447
+ itemId: string;
23448
+ };
23449
+ cookie?: never;
23450
+ };
23451
+ requestBody?: never;
23452
+ responses: {
23453
+ /** @description OK */
23454
+ 200: {
23455
+ headers: {
23456
+ [name: string]: unknown;
23457
+ };
23458
+ content: {
23459
+ "application/json": components["schemas"]["PolicyOutstandingItemResponse"];
23460
+ };
23461
+ };
23462
+ /** @description Not Found */
23463
+ 404: {
23464
+ headers: {
23465
+ [name: string]: unknown;
23466
+ };
23467
+ content?: never;
23468
+ };
23469
+ /** @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. */
23470
+ 409: {
23471
+ headers: {
23472
+ [name: string]: unknown;
23473
+ };
23474
+ content: {
23475
+ "application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
23476
+ };
23477
+ };
23478
+ };
23479
+ };
23141
23480
  UploadPolicyDocument: {
23142
23481
  parameters: {
23143
23482
  query?: never;
@@ -24857,42 +25196,6 @@ export interface operations {
24857
25196
  };
24858
25197
  };
24859
25198
  };
24860
- RedeemPolicyDocumentDownloadLink: {
24861
- parameters: {
24862
- query?: never;
24863
- header?: never;
24864
- path: {
24865
- token: string;
24866
- };
24867
- cookie?: never;
24868
- };
24869
- requestBody?: never;
24870
- responses: {
24871
- /** @description OK */
24872
- 200: {
24873
- headers: {
24874
- [name: string]: unknown;
24875
- };
24876
- content?: never;
24877
- };
24878
- /** @description Not Found */
24879
- 404: {
24880
- headers: {
24881
- [name: string]: unknown;
24882
- };
24883
- content?: never;
24884
- };
24885
- /** @description Conflict */
24886
- 409: {
24887
- headers: {
24888
- [name: string]: unknown;
24889
- };
24890
- content: {
24891
- "application/problem+json": components["schemas"]["ProblemDetails"];
24892
- };
24893
- };
24894
- };
24895
- };
24896
25199
  ListQuoteRequests: {
24897
25200
  parameters: {
24898
25201
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "5.52.0",
3
+ "version": "5.54.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,