@insurance-broker/api-client 4.16.0 → 4.20.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 +444 -1
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -298,6 +298,8 @@ export interface paths {
298
298
  * **A refusal is recorded, not merely returned.** Every attempt is written before the posting is tried, so a refused duplicate is findable in the reconciliation history read below.
299
299
  *
300
300
  * The currency is **not** a field: it is the obligation's, held by a foreign key rather than by this handler. Nil is refused — a payment of nothing is nothing having arrived.
301
+ *
302
+ * **Name a payment method or type a source, exactly one** (#530). `paymentMethodId` is one of this broker's active payment methods: its code becomes the payment's `source`, and customers see the method's label. `source` alone is free text, as before, and customers see it as typed. Both, neither, a retired method or another broker's method are refused with `400` and nothing is recorded.
301
303
  */
302
304
  post: operations["RecordPayment"];
303
305
  delete?: never;
@@ -690,6 +692,8 @@ export interface paths {
690
692
  * **No `asOf`**, unlike the charges list: a payment was recorded at an instant this row holds, and nothing about this list moves at midnight.
691
693
  *
692
694
  * **Each payment names the one charge it was recorded against**, and the policy that charge is owed under.
695
+ *
696
+ * **Show `sourceLabel`, not `source`.** `sourceLabel` is never null. It is your broker's current wording for the payment method the money came through, or, for a payment your broker recorded as free text, that text as typed. `source` is kept for older apps and may be a code.
693
697
  */
694
698
  get: operations["ListOwnPayments"];
695
699
  put?: never;
@@ -750,6 +754,98 @@ export interface paths {
750
754
  patch?: never;
751
755
  trace?: never;
752
756
  };
757
+ "/api/v1/payment-methods": {
758
+ parameters: {
759
+ query?: never;
760
+ header?: never;
761
+ path?: never;
762
+ cookie?: never;
763
+ };
764
+ /**
765
+ * The ways this broker's customers pay, with the words customers read
766
+ * @description #530. Every payment method this broker has configured, active and retired, by label. A payment is recorded against an active one by its `id`; its `code` becomes the payment's `source` and its `label` is what customers see.
767
+ *
768
+ * **A retired method stays on this list**, because it still labels the payments recorded against it. It cannot be chosen for a new payment.
769
+ *
770
+ * The platform ships no payment method: which banks, services and counters a broker takes money through is the broker's own configuration.
771
+ */
772
+ get: operations["ListPaymentMethods"];
773
+ put?: never;
774
+ /**
775
+ * Add a way this broker's customers pay
776
+ * @description #530. `code` is a stable identifier — lower-case letters, digits and hyphens, at most 40 characters — unique within this broker and never changed. `label` is what customers read, at most 80 characters, and can be changed later.
777
+ *
778
+ * **A code is never reused**, even after its method is retired, because payments recorded against the method carry it as their `source`. A code already taken is `409`.
779
+ */
780
+ post: operations["CreatePaymentMethod"];
781
+ delete?: never;
782
+ options?: never;
783
+ head?: never;
784
+ patch?: never;
785
+ trace?: never;
786
+ };
787
+ "/api/v1/payment-methods/{id}": {
788
+ parameters: {
789
+ query?: never;
790
+ header?: never;
791
+ path?: never;
792
+ cookie?: never;
793
+ };
794
+ /**
795
+ * Read one of this broker's payment methods
796
+ * @description Another broker's method answers `404`, exactly as one that does not exist: the tenant filter removes it before the read runs.
797
+ */
798
+ get: operations["GetPaymentMethod"];
799
+ put?: never;
800
+ post?: never;
801
+ delete?: never;
802
+ options?: never;
803
+ head?: never;
804
+ patch?: never;
805
+ trace?: never;
806
+ };
807
+ "/api/v1/payment-methods/{id}/label": {
808
+ parameters: {
809
+ query?: never;
810
+ header?: never;
811
+ path?: never;
812
+ cookie?: never;
813
+ };
814
+ get?: never;
815
+ /**
816
+ * Change what customers read for a payment method
817
+ * @description #530. **The label is read when a customer's payment is shown, not copied onto the payment**, so the new wording reaches every payment already recorded against this method, and no payment changes. A retired method can be relabelled too, because it still labels its payments.
818
+ *
819
+ * **`409` here is only the platform's concurrency conflict**: another write changed this method after it was read. The body is `urn:brokerplatform:problem:concurrency-conflict` with `retryable: true`; read the method again and retry.
820
+ */
821
+ put: operations["RelabelPaymentMethod"];
822
+ post?: never;
823
+ delete?: never;
824
+ options?: never;
825
+ head?: never;
826
+ patch?: never;
827
+ trace?: never;
828
+ };
829
+ "/api/v1/payment-methods/{id}/retirement": {
830
+ parameters: {
831
+ query?: never;
832
+ header?: never;
833
+ path?: never;
834
+ cookie?: never;
835
+ };
836
+ get?: never;
837
+ put?: never;
838
+ /**
839
+ * Stop a payment method being chosen for new payments
840
+ * @description #530. **One-way.** A retired method cannot be chosen when recording a payment, keeps labelling the payments already recorded against it, and keeps its code, which is never given to another method. Retiring one already retired is `409`. A `409` can also be the platform's concurrency conflict, with `retryable: true`, when another write changed the method after it was read.
841
+ */
842
+ post: operations["RetirePaymentMethod"];
843
+ delete?: never;
844
+ options?: never;
845
+ head?: never;
846
+ patch?: never;
847
+ trace?: never;
848
+ };
753
849
  "/api/v1/insurers": {
754
850
  parameters: {
755
851
  query?: never;
@@ -1207,6 +1303,30 @@ export interface paths {
1207
1303
  patch?: never;
1208
1304
  trace?: never;
1209
1305
  };
1306
+ "/api/v1/form-submissions/for-customer": {
1307
+ parameters: {
1308
+ query?: never;
1309
+ header?: never;
1310
+ path?: never;
1311
+ cookie?: never;
1312
+ };
1313
+ get?: never;
1314
+ put?: never;
1315
+ /**
1316
+ * Starts answering a form for a named customer, pinning the version that is live now.
1317
+ * @description Starts a submission of the named form that belongs to the named customer — the broker taking a quotation by telephone. Answer and submit it through the ordinary staff routes. It is marked `enteredBy: Staff`, the customer sees it in their own list, and a quote request may be raised against it once it is submitted. It reconfirms a renewal only if the customer enters every answer and submits it themselves (REN-003).
1318
+ *
1319
+ * **A `400` on `customerId` is one answer** for a customer this broker does not have, whether the identifier belongs to another broker or to nobody.
1320
+ *
1321
+ * **A `409` here is a settled fact, and `type` says which.** `urn:brokerplatform:problem:draft-already-open` means this customer already has a draft of this form open, named in `submissionId`; continue that one. `urn:brokerplatform:problem:product-not-open-to-new-business` means the product is not open to new business, or no longer exists. `urn:brokerplatform:problem:form-has-no-live-version` means no version of this form is published.
1322
+ */
1323
+ post: operations["StartFormSubmissionForCustomer"];
1324
+ delete?: never;
1325
+ options?: never;
1326
+ head?: never;
1327
+ patch?: never;
1328
+ trace?: never;
1329
+ };
1210
1330
  "/api/v1/form-submissions/{id}": {
1211
1331
  parameters: {
1212
1332
  query?: never;
@@ -3273,6 +3393,26 @@ export interface paths {
3273
3393
  patch?: never;
3274
3394
  trace?: never;
3275
3395
  };
3396
+ "/api/v1/staff": {
3397
+ parameters: {
3398
+ query?: never;
3399
+ header?: never;
3400
+ path?: never;
3401
+ cookie?: never;
3402
+ };
3403
+ /**
3404
+ * The names of this broker's people, for the subject identifiers asked about.
3405
+ * @description Repeat `ids` once per subject identifier, up to 50. Each subject that belongs to one of this broker's memberships comes back with the name the identity provider last gave for them; any other subject is simply absent, whichever broker it belongs to. Names are personal data.
3406
+ */
3407
+ get: operations["ResolveStaffNames"];
3408
+ put?: never;
3409
+ post?: never;
3410
+ delete?: never;
3411
+ options?: never;
3412
+ head?: never;
3413
+ patch?: never;
3414
+ trace?: never;
3415
+ };
3276
3416
  "/api/v1/tenant": {
3277
3417
  parameters: {
3278
3418
  query?: never;
@@ -6346,6 +6486,10 @@ export interface components {
6346
6486
  name: null | string;
6347
6487
  registrationNumber: null | string;
6348
6488
  };
6489
+ CreatePaymentMethodRequest: {
6490
+ code: string;
6491
+ label: string;
6492
+ };
6349
6493
  CreditNoteLineRequest: {
6350
6494
  kind: string;
6351
6495
  description: string;
@@ -6488,6 +6632,7 @@ export interface components {
6488
6632
  answers: components["schemas"]["CustomerSubmittedAnswerResponse"][];
6489
6633
  evidence: components["schemas"]["SubmittedEvidenceResponse"][];
6490
6634
  isSatisfied: boolean;
6635
+ enteredBy: string;
6491
6636
  };
6492
6637
  CustomerInsurerOutcomeResponse: {
6493
6638
  /** Format: uuid */
@@ -6554,6 +6699,7 @@ export interface components {
6554
6699
  /** Format: date-time */
6555
6700
  recordedAtUtc: string;
6556
6701
  state: string;
6702
+ sourceLabel: string;
6557
6703
  };
6558
6704
  CustomerPolicyDocumentPage: {
6559
6705
  items: components["schemas"]["CustomerPolicyDocumentResponse"][];
@@ -6625,6 +6771,8 @@ export interface components {
6625
6771
  paymentRequirementMetAtUtc: null | string;
6626
6772
  /** Format: uuid */
6627
6773
  paymentEvidenceReference: null | string;
6774
+ productName: null | string;
6775
+ lineOfBusinessName: null | string;
6628
6776
  };
6629
6777
  CustomerPresentedOption: {
6630
6778
  /** Format: uuid */
@@ -7244,6 +7392,9 @@ export interface components {
7244
7392
  answers: components["schemas"]["SubmittedAnswerResponse"][];
7245
7393
  evidence: components["schemas"]["SubmittedEvidenceResponse"][];
7246
7394
  isSatisfied: boolean;
7395
+ /** Format: uuid */
7396
+ customerId: null | string;
7397
+ enteredBy: string;
7247
7398
  };
7248
7399
  FormTeamRequest: {
7249
7400
  code: string;
@@ -7923,6 +8074,17 @@ export interface components {
7923
8074
  setAtUtc: string;
7924
8075
  setBySubjectId: string;
7925
8076
  };
8077
+ PaymentMethodResponse: {
8078
+ /** Format: uuid */
8079
+ id: string;
8080
+ code: string;
8081
+ label: string;
8082
+ active: boolean;
8083
+ /** Format: date-time */
8084
+ createdAtUtc: string;
8085
+ /** Format: date-time */
8086
+ retiredAtUtc: null | string;
8087
+ };
7926
8088
  PaymentPage: {
7927
8089
  items: components["schemas"]["PaymentSummaryResponse"][];
7928
8090
  nextCursor: null | string;
@@ -7946,6 +8108,8 @@ export interface components {
7946
8108
  approvedBySubjectId: null | string;
7947
8109
  /** Format: date-time */
7948
8110
  approvedAtUtc: null | string;
8111
+ /** Format: uuid */
8112
+ paymentMethodId: null | string;
7949
8113
  };
7950
8114
  PaymentReversalResponse: {
7951
8115
  /** Format: uuid */
@@ -7978,6 +8142,8 @@ export interface components {
7978
8142
  /** Format: date-time */
7979
8143
  approvedAtUtc: null | string;
7980
8144
  reversed: boolean;
8145
+ /** Format: uuid */
8146
+ paymentMethodId: null | string;
7981
8147
  };
7982
8148
  PlacedMemberResponse: {
7983
8149
  /** Format: uuid */
@@ -8145,6 +8311,8 @@ export interface components {
8145
8311
  paymentRequirementMetBySubjectId: null | string;
8146
8312
  /** Format: uuid */
8147
8313
  paymentEvidenceReference: null | string;
8314
+ productName: null | string;
8315
+ lineOfBusinessName: null | string;
8148
8316
  };
8149
8317
  PolicyViolationResponse: {
8150
8318
  field: string;
@@ -8508,8 +8676,10 @@ export interface components {
8508
8676
  RecordPaymentRequest: {
8509
8677
  /** Format: double */
8510
8678
  amount: number | string;
8511
- source: string;
8679
+ source?: null | string;
8512
8680
  externalReference: string;
8681
+ /** Format: uuid */
8682
+ paymentMethodId?: null | string;
8513
8683
  };
8514
8684
  RecordPaymentRequirementMetRequest: {
8515
8685
  /** Format: uuid */
@@ -8572,6 +8742,9 @@ export interface components {
8572
8742
  name: null | string;
8573
8743
  registrationNumber: null | string;
8574
8744
  };
8745
+ RelabelPaymentMethodRequest: {
8746
+ label: string;
8747
+ };
8575
8748
  ReleaseLegalHoldRequest: {
8576
8749
  releaseReason: null | string;
8577
8750
  };
@@ -8884,6 +9057,10 @@ export interface components {
8884
9057
  amount: null | number | string;
8885
9058
  unit: null | string;
8886
9059
  };
9060
+ StaffNameResponse: {
9061
+ subjectId: string;
9062
+ displayName: string;
9063
+ };
8887
9064
  StartComparisonSchemaVersionRequest: {
8888
9065
  /** Format: uuid */
8889
9066
  productId: null | string;
@@ -8894,6 +9071,12 @@ export interface components {
8894
9071
  /** Format: uuid */
8895
9072
  copyFromVersionId: null | string;
8896
9073
  };
9074
+ StartFormSubmissionForCustomerRequest: {
9075
+ /** Format: uuid */
9076
+ formDefinitionId: null | string;
9077
+ /** Format: uuid */
9078
+ customerId: null | string;
9079
+ };
8897
9080
  StartFormSubmissionRequest: {
8898
9081
  /** Format: uuid */
8899
9082
  formDefinitionId: null | string;
@@ -10633,6 +10816,186 @@ export interface operations {
10633
10816
  };
10634
10817
  };
10635
10818
  };
10819
+ ListPaymentMethods: {
10820
+ parameters: {
10821
+ query?: never;
10822
+ header?: never;
10823
+ path?: never;
10824
+ cookie?: never;
10825
+ };
10826
+ requestBody?: never;
10827
+ responses: {
10828
+ /** @description OK */
10829
+ 200: {
10830
+ headers: {
10831
+ [name: string]: unknown;
10832
+ };
10833
+ content: {
10834
+ "application/json": components["schemas"]["PaymentMethodResponse"][];
10835
+ };
10836
+ };
10837
+ };
10838
+ };
10839
+ CreatePaymentMethod: {
10840
+ parameters: {
10841
+ query?: never;
10842
+ header?: never;
10843
+ path?: never;
10844
+ cookie?: never;
10845
+ };
10846
+ requestBody: {
10847
+ content: {
10848
+ "application/json": components["schemas"]["CreatePaymentMethodRequest"];
10849
+ };
10850
+ };
10851
+ responses: {
10852
+ /** @description Created */
10853
+ 201: {
10854
+ headers: {
10855
+ [name: string]: unknown;
10856
+ };
10857
+ content: {
10858
+ "application/json": components["schemas"]["PaymentMethodResponse"];
10859
+ };
10860
+ };
10861
+ /** @description Bad Request */
10862
+ 400: {
10863
+ headers: {
10864
+ [name: string]: unknown;
10865
+ };
10866
+ content: {
10867
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
10868
+ };
10869
+ };
10870
+ /** @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. */
10871
+ 409: {
10872
+ headers: {
10873
+ [name: string]: unknown;
10874
+ };
10875
+ content: {
10876
+ "application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
10877
+ };
10878
+ };
10879
+ };
10880
+ };
10881
+ GetPaymentMethod: {
10882
+ parameters: {
10883
+ query?: never;
10884
+ header?: never;
10885
+ path: {
10886
+ id: string;
10887
+ };
10888
+ cookie?: never;
10889
+ };
10890
+ requestBody?: never;
10891
+ responses: {
10892
+ /** @description OK */
10893
+ 200: {
10894
+ headers: {
10895
+ [name: string]: unknown;
10896
+ };
10897
+ content: {
10898
+ "application/json": components["schemas"]["PaymentMethodResponse"];
10899
+ };
10900
+ };
10901
+ /** @description Not Found */
10902
+ 404: {
10903
+ headers: {
10904
+ [name: string]: unknown;
10905
+ };
10906
+ content?: never;
10907
+ };
10908
+ };
10909
+ };
10910
+ RelabelPaymentMethod: {
10911
+ parameters: {
10912
+ query?: never;
10913
+ header?: never;
10914
+ path: {
10915
+ id: string;
10916
+ };
10917
+ cookie?: never;
10918
+ };
10919
+ requestBody: {
10920
+ content: {
10921
+ "application/json": components["schemas"]["RelabelPaymentMethodRequest"];
10922
+ };
10923
+ };
10924
+ responses: {
10925
+ /** @description OK */
10926
+ 200: {
10927
+ headers: {
10928
+ [name: string]: unknown;
10929
+ };
10930
+ content: {
10931
+ "application/json": components["schemas"]["PaymentMethodResponse"];
10932
+ };
10933
+ };
10934
+ /** @description Bad Request */
10935
+ 400: {
10936
+ headers: {
10937
+ [name: string]: unknown;
10938
+ };
10939
+ content: {
10940
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
10941
+ };
10942
+ };
10943
+ /** @description Not Found */
10944
+ 404: {
10945
+ headers: {
10946
+ [name: string]: unknown;
10947
+ };
10948
+ content?: never;
10949
+ };
10950
+ /** @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. */
10951
+ 409: {
10952
+ headers: {
10953
+ [name: string]: unknown;
10954
+ };
10955
+ content: {
10956
+ "application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
10957
+ };
10958
+ };
10959
+ };
10960
+ };
10961
+ RetirePaymentMethod: {
10962
+ parameters: {
10963
+ query?: never;
10964
+ header?: never;
10965
+ path: {
10966
+ id: string;
10967
+ };
10968
+ cookie?: never;
10969
+ };
10970
+ requestBody?: never;
10971
+ responses: {
10972
+ /** @description OK */
10973
+ 200: {
10974
+ headers: {
10975
+ [name: string]: unknown;
10976
+ };
10977
+ content: {
10978
+ "application/json": components["schemas"]["PaymentMethodResponse"];
10979
+ };
10980
+ };
10981
+ /** @description Not Found */
10982
+ 404: {
10983
+ headers: {
10984
+ [name: string]: unknown;
10985
+ };
10986
+ content?: never;
10987
+ };
10988
+ /** @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. */
10989
+ 409: {
10990
+ headers: {
10991
+ [name: string]: unknown;
10992
+ };
10993
+ content: {
10994
+ "application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
10995
+ };
10996
+ };
10997
+ };
10998
+ };
10636
10999
  ListInsurers: {
10637
11000
  parameters: {
10638
11001
  query?: {
@@ -12092,6 +12455,48 @@ export interface operations {
12092
12455
  };
12093
12456
  };
12094
12457
  };
12458
+ StartFormSubmissionForCustomer: {
12459
+ parameters: {
12460
+ query?: never;
12461
+ header?: never;
12462
+ path?: never;
12463
+ cookie?: never;
12464
+ };
12465
+ requestBody: {
12466
+ content: {
12467
+ "application/json": components["schemas"]["StartFormSubmissionForCustomerRequest"];
12468
+ };
12469
+ };
12470
+ responses: {
12471
+ /** @description Created */
12472
+ 201: {
12473
+ headers: {
12474
+ [name: string]: unknown;
12475
+ };
12476
+ content: {
12477
+ "application/json": components["schemas"]["FormSubmissionResponse"];
12478
+ };
12479
+ };
12480
+ /** @description Bad Request */
12481
+ 400: {
12482
+ headers: {
12483
+ [name: string]: unknown;
12484
+ };
12485
+ content: {
12486
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
12487
+ };
12488
+ };
12489
+ /** @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. */
12490
+ 409: {
12491
+ headers: {
12492
+ [name: string]: unknown;
12493
+ };
12494
+ content: {
12495
+ "application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
12496
+ };
12497
+ };
12498
+ };
12499
+ };
12095
12500
  GetFormSubmission: {
12096
12501
  parameters: {
12097
12502
  query?: never;
@@ -17087,6 +17492,44 @@ export interface operations {
17087
17492
  };
17088
17493
  };
17089
17494
  };
17495
+ ResolveStaffNames: {
17496
+ parameters: {
17497
+ query?: {
17498
+ ids?: string[];
17499
+ };
17500
+ header?: never;
17501
+ path?: never;
17502
+ cookie?: never;
17503
+ };
17504
+ requestBody?: never;
17505
+ responses: {
17506
+ /** @description OK */
17507
+ 200: {
17508
+ headers: {
17509
+ [name: string]: unknown;
17510
+ };
17511
+ content: {
17512
+ "application/json": components["schemas"]["StaffNameResponse"][];
17513
+ };
17514
+ };
17515
+ /** @description Bad Request */
17516
+ 400: {
17517
+ headers: {
17518
+ [name: string]: unknown;
17519
+ };
17520
+ content: {
17521
+ "application/problem+json": components["schemas"]["ProblemDetails"];
17522
+ };
17523
+ };
17524
+ /** @description Forbidden */
17525
+ 403: {
17526
+ headers: {
17527
+ [name: string]: unknown;
17528
+ };
17529
+ content?: never;
17530
+ };
17531
+ };
17532
+ };
17090
17533
  GetTenantSettings: {
17091
17534
  parameters: {
17092
17535
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "4.16.0",
3
+ "version": "4.20.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,