@insurance-broker/api-client 3.1.0 → 4.0.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 +140 -14
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -757,7 +757,12 @@ export interface paths {
757
757
  path?: never;
758
758
  cookie?: never;
759
759
  };
760
- /** The broker's insurer panel, by name. */
760
+ /**
761
+ * The broker's insurer panel, by name.
762
+ * @description Lists the broker's insurers by name, then code. `activeOnly=true` narrows it to the insurers new business may be placed with.
763
+ *
764
+ * **Paged, and the shape changed in client 4.0.0** (issue #506). This answers `{ items, nextCursor }` where it used to answer a bare array capped at two hundred rows, past which the panel could not be walked and a complete list was indistinguishable from a truncated one. Pass `nextCursor` back as `cursor`; a null one means this is the last page. `limit` is a page size, not a cap on the panel.
765
+ */
761
766
  get: operations["ListInsurers"];
762
767
  put?: never;
763
768
  /** Adds an insurer to the broker's panel, active from the start. */
@@ -863,7 +868,12 @@ export interface paths {
863
868
  path?: never;
864
869
  cookie?: never;
865
870
  };
866
- /** The broker's lines of business, in the broker's own ordering. */
871
+ /**
872
+ * The broker's lines of business, in the broker's own ordering.
873
+ * @description Lists the broker's lines of business by their sort order, then name, then key.
874
+ *
875
+ * **Paged, and the shape changed in client 4.0.0** (issue #506). This answers `{ items, nextCursor }` where it used to answer a bare array capped at two hundred rows. Pass `nextCursor` back as `cursor`; a null one means this is the last page. `limit` is a page size, not a cap on the list.
876
+ */
867
877
  get: operations["ListProductCategories"];
868
878
  put?: never;
869
879
  /** Adds a line of business to the broker's catalogue. */
@@ -3915,9 +3925,9 @@ export interface paths {
3915
3925
  *
3916
3926
  * **A payment posting does not do this** (ADR-0042 section 7). If it did, the platform would be asserting that cover began. A person looks at a payment and records that the requirement is discharged: the payment is the evidence, the person is the actor, and the platform is neither. There is no consumer, no sweep and no side effect that reaches this route.
3917
3927
  *
3918
- * **Only a policy in `pendingPayment` can be released, and only once.** Recording it against a policy no gate ever held would write an evidence trail for a requirement that never existed.
3928
+ * **Only a policy in `pendingPayment` can be released, and only once.** Recording it against a policy no gate ever held would write an evidence trail for a requirement that never existed; that is a `409`.
3919
3929
  *
3920
- * **The `paymentId` is recorded and not verified.** The payment lives in another module this one may not read (ADR-0002), so a mistyped identifier is a bad record rather than a refusal - issue #306 carries the contract that would check it.
3930
+ * **The `paymentId` must name an approved payment against a charge for this policy** (PAY-003, ADR-0042 section 7). A payment posts and settles its charge the moment it is recorded, but it releases cover only once a second person has approved it. Anything else is a `422` of type `urn:brokerplatform:problem:unusable-payment-evidence`, with one entry under `violations` whose `code` is `payment-not-this-policys` (no such payment in this broker's books, or one against another policy - deliberately the same answer), `payment-reversed`, or `payment-not-approved`.
3921
3931
  */
3922
3932
  post: operations["RecordPaymentRequirementMet"];
3923
3933
  delete?: never;
@@ -4029,6 +4039,8 @@ export interface paths {
4029
4039
  /**
4030
4040
  * The documents filed against a policy, newest first
4031
4041
  * @description Lists what has been filed against one policy — the policy document itself, certificates, invoices, receipts and correspondence. A document is quarantined the moment it is stored and only a malware scan moves it, so a row whose verdict is not Clean is listed and cannot be downloaded.
4042
+ *
4043
+ * **Paged, and the shape changed in client 4.0.0** (issue #177). This answers `{ items, nextCursor }` where it used to answer a bare array capped at a hundred rows, past which the oldest documents were unreachable. Pass `nextCursor` back as `cursor`; a null one means this is the last page. `limit` is a page size, not a cap on the collection.
4032
4044
  */
4033
4045
  get: operations["ListPolicyDocuments"];
4034
4046
  put?: never;
@@ -5992,10 +6004,18 @@ export interface components {
5992
6004
  validUntil: null | string;
5993
6005
  attributes: null | string;
5994
6006
  };
6007
+ CataloguePageOfInsurerResponse: {
6008
+ items: components["schemas"]["InsurerResponse"][];
6009
+ nextCursor: null | string;
6010
+ };
5995
6011
  CataloguePageOfOfferedProductResponse: {
5996
6012
  items: components["schemas"]["OfferedProductResponse"][];
5997
6013
  nextCursor: null | string;
5998
6014
  };
6015
+ CataloguePageOfProductCategoryResponse: {
6016
+ items: components["schemas"]["ProductCategoryResponse"][];
6017
+ nextCursor: null | string;
6018
+ };
5999
6019
  CataloguePageOfProductResponse: {
6000
6020
  items: components["schemas"]["ProductResponse"][];
6001
6021
  nextCursor: null | string;
@@ -6339,6 +6359,38 @@ export interface components {
6339
6359
  contactDetail: string;
6340
6360
  instruction: string;
6341
6361
  };
6362
+ CustomerFormSubmissionResponse: {
6363
+ /** Format: uuid */
6364
+ id: string;
6365
+ /** Format: uuid */
6366
+ formDefinitionId: string;
6367
+ formDefinitionKey: string;
6368
+ /** Format: uuid */
6369
+ definitionVersionId: string;
6370
+ /** Format: int32 */
6371
+ versionNumber: number | string;
6372
+ versionStatus: string;
6373
+ status: string;
6374
+ /** Format: date */
6375
+ evaluatedAsOf: string;
6376
+ contentHashVerified: boolean;
6377
+ /** Format: int32 */
6378
+ answersSchemaVersion: number | string;
6379
+ /** Format: date-time */
6380
+ createdAtUtc: string;
6381
+ /** Format: date-time */
6382
+ updatedAtUtc: string;
6383
+ /** Format: date-time */
6384
+ submittedAtUtc: null | string;
6385
+ pinnedVersionIsLive: boolean;
6386
+ /** Format: uuid */
6387
+ liveVersionId: null | string;
6388
+ /** Format: int32 */
6389
+ liveVersionNumber: null | number | string;
6390
+ answers: components["schemas"]["CustomerSubmittedAnswerResponse"][];
6391
+ evidence: components["schemas"]["SubmittedEvidenceResponse"][];
6392
+ isSatisfied: boolean;
6393
+ };
6342
6394
  CustomerInsurerOutcomeResponse: {
6343
6395
  /** Format: uuid */
6344
6396
  id: string;
@@ -6638,6 +6690,37 @@ export interface components {
6638
6690
  /** Format: double */
6639
6691
  distanceKm: null | number | string;
6640
6692
  };
6693
+ CustomerSubmissionAttachmentResponse: {
6694
+ /** Format: uuid */
6695
+ id: string;
6696
+ evidenceKey: string;
6697
+ fileName: string;
6698
+ contentType: string;
6699
+ /** Format: int64 */
6700
+ sizeBytes: number | string;
6701
+ contentSha256: string;
6702
+ /** Format: date-time */
6703
+ uploadedAtUtc: string;
6704
+ scanVerdict: string;
6705
+ /** Format: date-time */
6706
+ scannedAtUtc: null | string;
6707
+ classification: null | string;
6708
+ };
6709
+ CustomerSubmittedAnswerResponse: {
6710
+ questionKey: string;
6711
+ label: string;
6712
+ type: string;
6713
+ value: null | components["schemas"]["JsonElement"];
6714
+ source: null | string;
6715
+ /** Format: date-time */
6716
+ atUtc: null | string;
6717
+ visibility: string;
6718
+ failures: string[];
6719
+ options: components["schemas"]["FormQuestionOptionResponse"][];
6720
+ isRequired: boolean;
6721
+ help: null | string;
6722
+ section: null | string;
6723
+ };
6641
6724
  DataClassificationResponse: {
6642
6725
  key: string;
6643
6726
  name: string;
@@ -7683,6 +7766,10 @@ export interface components {
7683
7766
  /** Format: date-time */
7684
7767
  expiresAtUtc: string;
7685
7768
  };
7769
+ PolicyDocumentPage: {
7770
+ items: components["schemas"]["PolicyDocumentResponse"][];
7771
+ nextCursor: null | string;
7772
+ };
7686
7773
  PolicyDocumentResponse: {
7687
7774
  /** Format: uuid */
7688
7775
  id: string;
@@ -9932,6 +10019,7 @@ export interface operations {
9932
10019
  parameters: {
9933
10020
  query?: {
9934
10021
  activeOnly?: boolean;
10022
+ cursor?: string;
9935
10023
  limit?: number | string;
9936
10024
  };
9937
10025
  header?: never;
@@ -9946,7 +10034,16 @@ export interface operations {
9946
10034
  [name: string]: unknown;
9947
10035
  };
9948
10036
  content: {
9949
- "application/json": components["schemas"]["InsurerResponse"][];
10037
+ "application/json": components["schemas"]["CataloguePageOfInsurerResponse"];
10038
+ };
10039
+ };
10040
+ /** @description Bad Request */
10041
+ 400: {
10042
+ headers: {
10043
+ [name: string]: unknown;
10044
+ };
10045
+ content: {
10046
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
9950
10047
  };
9951
10048
  };
9952
10049
  };
@@ -10294,6 +10391,7 @@ export interface operations {
10294
10391
  ListProductCategories: {
10295
10392
  parameters: {
10296
10393
  query?: {
10394
+ cursor?: string;
10297
10395
  limit?: number | string;
10298
10396
  };
10299
10397
  header?: never;
@@ -10308,7 +10406,16 @@ export interface operations {
10308
10406
  [name: string]: unknown;
10309
10407
  };
10310
10408
  content: {
10311
- "application/json": components["schemas"]["ProductCategoryResponse"][];
10409
+ "application/json": components["schemas"]["CataloguePageOfProductCategoryResponse"];
10410
+ };
10411
+ };
10412
+ /** @description Bad Request */
10413
+ 400: {
10414
+ headers: {
10415
+ [name: string]: unknown;
10416
+ };
10417
+ content: {
10418
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
10312
10419
  };
10313
10420
  };
10314
10421
  };
@@ -11520,7 +11627,7 @@ export interface operations {
11520
11627
  [name: string]: unknown;
11521
11628
  };
11522
11629
  content: {
11523
- "application/json": components["schemas"]["FormSubmissionResponse"][];
11630
+ "application/json": components["schemas"]["CustomerFormSubmissionResponse"][];
11524
11631
  };
11525
11632
  };
11526
11633
  };
@@ -11549,7 +11656,7 @@ export interface operations {
11549
11656
  [name: string]: unknown;
11550
11657
  };
11551
11658
  content: {
11552
- "application/json": components["schemas"]["FormSubmissionResponse"];
11659
+ "application/json": components["schemas"]["CustomerFormSubmissionResponse"];
11553
11660
  };
11554
11661
  };
11555
11662
  /** @description Bad Request */
@@ -11598,7 +11705,7 @@ export interface operations {
11598
11705
  [name: string]: unknown;
11599
11706
  };
11600
11707
  content: {
11601
- "application/json": components["schemas"]["FormSubmissionResponse"];
11708
+ "application/json": components["schemas"]["CustomerFormSubmissionResponse"];
11602
11709
  };
11603
11710
  };
11604
11711
  /** @description Not Found */
@@ -11638,7 +11745,7 @@ export interface operations {
11638
11745
  [name: string]: unknown;
11639
11746
  };
11640
11747
  content: {
11641
- "application/json": components["schemas"]["FormSubmissionResponse"];
11748
+ "application/json": components["schemas"]["CustomerFormSubmissionResponse"];
11642
11749
  };
11643
11750
  };
11644
11751
  /** @description Bad Request */
@@ -11700,7 +11807,7 @@ export interface operations {
11700
11807
  [name: string]: unknown;
11701
11808
  };
11702
11809
  content: {
11703
- "application/json": components["schemas"]["FormSubmissionResponse"];
11810
+ "application/json": components["schemas"]["CustomerFormSubmissionResponse"];
11704
11811
  };
11705
11812
  };
11706
11813
  /** @description Not Found */
@@ -11969,7 +12076,7 @@ export interface operations {
11969
12076
  [name: string]: unknown;
11970
12077
  };
11971
12078
  content: {
11972
- "application/json": components["schemas"]["SubmissionAttachmentResponse"];
12079
+ "application/json": components["schemas"]["CustomerSubmissionAttachmentResponse"];
11973
12080
  };
11974
12081
  };
11975
12082
  /** @description Bad Request */
@@ -12038,7 +12145,7 @@ export interface operations {
12038
12145
  [name: string]: unknown;
12039
12146
  };
12040
12147
  content: {
12041
- "application/json": components["schemas"]["SubmissionAttachmentResponse"][];
12148
+ "application/json": components["schemas"]["CustomerSubmissionAttachmentResponse"][];
12042
12149
  };
12043
12150
  };
12044
12151
  /** @description Not Found */
@@ -18084,6 +18191,15 @@ export interface operations {
18084
18191
  "application/problem+json": components["schemas"]["ProblemDetails"];
18085
18192
  };
18086
18193
  };
18194
+ /** @description Unprocessable Entity */
18195
+ 422: {
18196
+ headers: {
18197
+ [name: string]: unknown;
18198
+ };
18199
+ content: {
18200
+ "application/problem+json": components["schemas"]["ProblemDetails"];
18201
+ };
18202
+ };
18087
18203
  };
18088
18204
  };
18089
18205
  GetPolicy: {
@@ -18264,6 +18380,7 @@ export interface operations {
18264
18380
  ListPolicyDocuments: {
18265
18381
  parameters: {
18266
18382
  query?: {
18383
+ cursor?: string;
18267
18384
  limit?: number | string;
18268
18385
  };
18269
18386
  header?: never;
@@ -18280,7 +18397,16 @@ export interface operations {
18280
18397
  [name: string]: unknown;
18281
18398
  };
18282
18399
  content: {
18283
- "application/json": components["schemas"]["PolicyDocumentResponse"][];
18400
+ "application/json": components["schemas"]["PolicyDocumentPage"];
18401
+ };
18402
+ };
18403
+ /** @description Bad Request */
18404
+ 400: {
18405
+ headers: {
18406
+ [name: string]: unknown;
18407
+ };
18408
+ content: {
18409
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
18284
18410
  };
18285
18411
  };
18286
18412
  /** @description Not Found */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "3.1.0",
3
+ "version": "4.0.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,