@insurance-broker/api-client 4.17.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 +368 -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;
@@ -3297,6 +3393,26 @@ export interface paths {
3297
3393
  patch?: never;
3298
3394
  trace?: never;
3299
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
+ };
3300
3416
  "/api/v1/tenant": {
3301
3417
  parameters: {
3302
3418
  query?: never;
@@ -6370,6 +6486,10 @@ export interface components {
6370
6486
  name: null | string;
6371
6487
  registrationNumber: null | string;
6372
6488
  };
6489
+ CreatePaymentMethodRequest: {
6490
+ code: string;
6491
+ label: string;
6492
+ };
6373
6493
  CreditNoteLineRequest: {
6374
6494
  kind: string;
6375
6495
  description: string;
@@ -6579,6 +6699,7 @@ export interface components {
6579
6699
  /** Format: date-time */
6580
6700
  recordedAtUtc: string;
6581
6701
  state: string;
6702
+ sourceLabel: string;
6582
6703
  };
6583
6704
  CustomerPolicyDocumentPage: {
6584
6705
  items: components["schemas"]["CustomerPolicyDocumentResponse"][];
@@ -6650,6 +6771,8 @@ export interface components {
6650
6771
  paymentRequirementMetAtUtc: null | string;
6651
6772
  /** Format: uuid */
6652
6773
  paymentEvidenceReference: null | string;
6774
+ productName: null | string;
6775
+ lineOfBusinessName: null | string;
6653
6776
  };
6654
6777
  CustomerPresentedOption: {
6655
6778
  /** Format: uuid */
@@ -7951,6 +8074,17 @@ export interface components {
7951
8074
  setAtUtc: string;
7952
8075
  setBySubjectId: string;
7953
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
+ };
7954
8088
  PaymentPage: {
7955
8089
  items: components["schemas"]["PaymentSummaryResponse"][];
7956
8090
  nextCursor: null | string;
@@ -7974,6 +8108,8 @@ export interface components {
7974
8108
  approvedBySubjectId: null | string;
7975
8109
  /** Format: date-time */
7976
8110
  approvedAtUtc: null | string;
8111
+ /** Format: uuid */
8112
+ paymentMethodId: null | string;
7977
8113
  };
7978
8114
  PaymentReversalResponse: {
7979
8115
  /** Format: uuid */
@@ -8006,6 +8142,8 @@ export interface components {
8006
8142
  /** Format: date-time */
8007
8143
  approvedAtUtc: null | string;
8008
8144
  reversed: boolean;
8145
+ /** Format: uuid */
8146
+ paymentMethodId: null | string;
8009
8147
  };
8010
8148
  PlacedMemberResponse: {
8011
8149
  /** Format: uuid */
@@ -8173,6 +8311,8 @@ export interface components {
8173
8311
  paymentRequirementMetBySubjectId: null | string;
8174
8312
  /** Format: uuid */
8175
8313
  paymentEvidenceReference: null | string;
8314
+ productName: null | string;
8315
+ lineOfBusinessName: null | string;
8176
8316
  };
8177
8317
  PolicyViolationResponse: {
8178
8318
  field: string;
@@ -8536,8 +8676,10 @@ export interface components {
8536
8676
  RecordPaymentRequest: {
8537
8677
  /** Format: double */
8538
8678
  amount: number | string;
8539
- source: string;
8679
+ source?: null | string;
8540
8680
  externalReference: string;
8681
+ /** Format: uuid */
8682
+ paymentMethodId?: null | string;
8541
8683
  };
8542
8684
  RecordPaymentRequirementMetRequest: {
8543
8685
  /** Format: uuid */
@@ -8600,6 +8742,9 @@ export interface components {
8600
8742
  name: null | string;
8601
8743
  registrationNumber: null | string;
8602
8744
  };
8745
+ RelabelPaymentMethodRequest: {
8746
+ label: string;
8747
+ };
8603
8748
  ReleaseLegalHoldRequest: {
8604
8749
  releaseReason: null | string;
8605
8750
  };
@@ -8912,6 +9057,10 @@ export interface components {
8912
9057
  amount: null | number | string;
8913
9058
  unit: null | string;
8914
9059
  };
9060
+ StaffNameResponse: {
9061
+ subjectId: string;
9062
+ displayName: string;
9063
+ };
8915
9064
  StartComparisonSchemaVersionRequest: {
8916
9065
  /** Format: uuid */
8917
9066
  productId: null | string;
@@ -10667,6 +10816,186 @@ export interface operations {
10667
10816
  };
10668
10817
  };
10669
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
+ };
10670
10999
  ListInsurers: {
10671
11000
  parameters: {
10672
11001
  query?: {
@@ -17163,6 +17492,44 @@ export interface operations {
17163
17492
  };
17164
17493
  };
17165
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
+ };
17166
17533
  GetTenantSettings: {
17167
17534
  parameters: {
17168
17535
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "4.17.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,