@insurance-broker/api-client 5.0.1 → 5.2.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 +163 -4
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -846,6 +846,56 @@ export interface paths {
846
846
  patch?: never;
847
847
  trace?: never;
848
848
  };
849
+ "/api/v1/payment-methods/free-text-sources": {
850
+ parameters: {
851
+ query?: never;
852
+ header?: never;
853
+ path?: never;
854
+ cookie?: never;
855
+ };
856
+ /**
857
+ * The free-text sources that still have payments with no payment method
858
+ * @description #568. Every distinct free-text `source` this broker's payments carry with no payment method, and how many payments carry it, most first, then by the text compared character by character. **At most 200**, the most frequent; `moreExist` says whether there are others, which come into the list as these are mapped. Each one is shown to customers as typed until it is mapped to a method with `POST /payment-methods/{id}/source-mappings`. Spellings are listed separately because a mapping matches the text exactly.
859
+ */
860
+ get: operations["ListFreeTextPaymentSources"];
861
+ put?: never;
862
+ post?: never;
863
+ delete?: never;
864
+ options?: never;
865
+ head?: never;
866
+ patch?: never;
867
+ trace?: never;
868
+ };
869
+ "/api/v1/payment-methods/{id}/source-mappings": {
870
+ parameters: {
871
+ query?: never;
872
+ header?: never;
873
+ path?: never;
874
+ cookie?: never;
875
+ };
876
+ get?: never;
877
+ put?: never;
878
+ /**
879
+ * Say which payment method the payments with a free-text source came through
880
+ * @description #568. Every payment of this broker whose `source` is exactly the given text (after trimming, case as typed) and that names no payment method is given this method. Customers then see the method's label for those payments as `sourceLabel`. **The stored `source` is not changed**, and no amount or reference is.
881
+ *
882
+ * **A payment is never moved between methods.** Payments with this source that already name this method are counted in `alreadyMapped`, and those naming another method in `mappedToAnotherMethod`; neither is changed.
883
+ *
884
+ * **A payment whose reference the method already holds is skipped** and listed in `skipped` with the payment that holds it, because mapping it would put the same reference against the method twice. The method holds a reference through a payment recorded against it, one mapped to it, or a free-text payment typed exactly as its code: the last is cautious, because such a payment is in the method's duplicate space under §5's index. `skippedCount` is the full count and `skipped` lists at most 200, earliest first. The rest are still mapped.
885
+ *
886
+ * **Idempotent.** Repeating the request maps nothing more and answers `mapped: 0`. Only payments that exist when the request runs are mapped: a payment recorded later with the same text is not, until the mapping is requested again.
887
+ *
888
+ * **A mapping cannot be undone yet** (#588): check the source and the method before sending it.
889
+ *
890
+ * A retired method is `409`. A statement already produced keeps the wording it was produced with. A `409` can also be the platform's concurrency conflict, with `retryable: true`, when another write changed one of the payments while it was being mapped.
891
+ */
892
+ post: operations["MapFreeTextPaymentSource"];
893
+ delete?: never;
894
+ options?: never;
895
+ head?: never;
896
+ patch?: never;
897
+ trace?: never;
898
+ };
849
899
  "/api/v1/insurers": {
850
900
  parameters: {
851
901
  query?: never;
@@ -6607,12 +6657,13 @@ export interface components {
6607
6657
  /** Format: uuid */
6608
6658
  formDefinitionId: string;
6609
6659
  formDefinitionKey: string;
6660
+ formName: string;
6610
6661
  /** Format: uuid */
6611
6662
  definitionVersionId: string;
6612
6663
  /** Format: int32 */
6613
6664
  versionNumber: number | string;
6614
- versionStatus: string;
6615
- status: string;
6665
+ versionStatus: components["schemas"]["FormVersionStatus"];
6666
+ status: components["schemas"]["SubmissionStatus"];
6616
6667
  /** Format: date */
6617
6668
  evaluatedAsOf: string;
6618
6669
  contentHashVerified: boolean;
@@ -7365,12 +7416,13 @@ export interface components {
7365
7416
  /** Format: uuid */
7366
7417
  formDefinitionId: string;
7367
7418
  formDefinitionKey: string;
7419
+ formName: string;
7368
7420
  /** Format: uuid */
7369
7421
  definitionVersionId: string;
7370
7422
  /** Format: int32 */
7371
7423
  versionNumber: number | string;
7372
- versionStatus: string;
7373
- status: string;
7424
+ versionStatus: components["schemas"]["FormVersionStatus"];
7425
+ status: components["schemas"]["SubmissionStatus"];
7374
7426
  /** Format: date */
7375
7427
  evaluatedAsOf: string;
7376
7428
  contentHashVerified: boolean;
@@ -7427,6 +7479,15 @@ export interface components {
7427
7479
  };
7428
7480
  /** @enum {string} */
7429
7481
  FormVersionStatus: "Draft" | "Published" | "Retired";
7482
+ FreeTextPaymentSourceResponse: {
7483
+ source: string;
7484
+ /** Format: int32 */
7485
+ payments: number | string;
7486
+ };
7487
+ FreeTextPaymentSourcesResponse: {
7488
+ sources: components["schemas"]["FreeTextPaymentSourceResponse"][];
7489
+ moreExist: boolean;
7490
+ };
7430
7491
  GenerateDocumentRequest: {
7431
7492
  format: null | string;
7432
7493
  };
@@ -7777,6 +7838,9 @@ export interface components {
7777
7838
  /** Format: date-time */
7778
7839
  publishedAtUtc: string;
7779
7840
  };
7841
+ MapPaymentSourceRequest: {
7842
+ source: string;
7843
+ };
7780
7844
  MissingTemplateValueResponse: {
7781
7845
  key: string;
7782
7846
  /** @description Which refusal this is, as a stable name from a closed set. Key grouping, counting and translation on this, never on message. A new code is additive; renaming one is a break. */
@@ -8124,6 +8188,20 @@ export interface components {
8124
8188
  reversedAtUtc: string;
8125
8189
  reversedBySubjectId: string;
8126
8190
  };
8191
+ PaymentSourceMappingResponse: {
8192
+ /** Format: uuid */
8193
+ paymentMethodId: string;
8194
+ source: string;
8195
+ /** Format: int32 */
8196
+ mapped: number | string;
8197
+ /** Format: int32 */
8198
+ alreadyMapped: number | string;
8199
+ /** Format: int32 */
8200
+ mappedToAnotherMethod: number | string;
8201
+ /** Format: int32 */
8202
+ skippedCount: number | string;
8203
+ skipped: components["schemas"]["SkippedPaymentResponse"][];
8204
+ };
8127
8205
  PaymentSummaryResponse: {
8128
8206
  /** Format: uuid */
8129
8207
  id: string;
@@ -9099,6 +9177,13 @@ export interface components {
9099
9177
  amount: null | number | string;
9100
9178
  unit: null | string;
9101
9179
  };
9180
+ SkippedPaymentResponse: {
9181
+ /** Format: uuid */
9182
+ paymentId: string;
9183
+ externalReference: string;
9184
+ /** Format: uuid */
9185
+ conflictingPaymentId: string;
9186
+ };
9102
9187
  StaffNameResponse: {
9103
9188
  subjectId: string;
9104
9189
  displayName: string;
@@ -9166,6 +9251,7 @@ export interface components {
9166
9251
  /** Format: date-time */
9167
9252
  postedAtUtc: string;
9168
9253
  isReversed: boolean;
9254
+ sourceLabel: string;
9169
9255
  };
9170
9256
  StatementResponse: {
9171
9257
  /** Format: uuid */
@@ -9229,6 +9315,8 @@ export interface components {
9229
9315
  SubmissionAttachmentUpload: {
9230
9316
  file: components["schemas"]["IFormFile"];
9231
9317
  };
9318
+ /** @enum {string} */
9319
+ SubmissionStatus: "Draft" | "Submitted";
9232
9320
  SubmitFormSubmissionRequest: {
9233
9321
  idempotencyKey: null | string;
9234
9322
  };
@@ -11060,6 +11148,77 @@ export interface operations {
11060
11148
  };
11061
11149
  };
11062
11150
  };
11151
+ ListFreeTextPaymentSources: {
11152
+ parameters: {
11153
+ query?: never;
11154
+ header?: never;
11155
+ path?: never;
11156
+ cookie?: never;
11157
+ };
11158
+ requestBody?: never;
11159
+ responses: {
11160
+ /** @description OK */
11161
+ 200: {
11162
+ headers: {
11163
+ [name: string]: unknown;
11164
+ };
11165
+ content: {
11166
+ "application/json": components["schemas"]["FreeTextPaymentSourcesResponse"];
11167
+ };
11168
+ };
11169
+ };
11170
+ };
11171
+ MapFreeTextPaymentSource: {
11172
+ parameters: {
11173
+ query?: never;
11174
+ header?: never;
11175
+ path: {
11176
+ id: string;
11177
+ };
11178
+ cookie?: never;
11179
+ };
11180
+ requestBody: {
11181
+ content: {
11182
+ "application/json": components["schemas"]["MapPaymentSourceRequest"];
11183
+ };
11184
+ };
11185
+ responses: {
11186
+ /** @description OK */
11187
+ 200: {
11188
+ headers: {
11189
+ [name: string]: unknown;
11190
+ };
11191
+ content: {
11192
+ "application/json": components["schemas"]["PaymentSourceMappingResponse"];
11193
+ };
11194
+ };
11195
+ /** @description Bad Request */
11196
+ 400: {
11197
+ headers: {
11198
+ [name: string]: unknown;
11199
+ };
11200
+ content: {
11201
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
11202
+ };
11203
+ };
11204
+ /** @description Not Found */
11205
+ 404: {
11206
+ headers: {
11207
+ [name: string]: unknown;
11208
+ };
11209
+ content?: never;
11210
+ };
11211
+ /** @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. */
11212
+ 409: {
11213
+ headers: {
11214
+ [name: string]: unknown;
11215
+ };
11216
+ content: {
11217
+ "application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
11218
+ };
11219
+ };
11220
+ };
11221
+ };
11063
11222
  ListInsurers: {
11064
11223
  parameters: {
11065
11224
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "5.0.1",
3
+ "version": "5.2.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,