@insurance-broker/api-client 5.3.0 → 5.4.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.
- package/dist/schema.d.ts +186 -2
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -879,13 +879,13 @@ export interface paths {
|
|
|
879
879
|
* Say which payment method the payments with a free-text source came through
|
|
880
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
881
|
*
|
|
882
|
-
* **A
|
|
882
|
+
* **A mapping never moves a payment 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
883
|
*
|
|
884
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
885
|
*
|
|
886
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
887
|
*
|
|
888
|
-
* **A mapping
|
|
888
|
+
* **A mapping can be undone** with `POST /payment-methods/{id}/source-mappings/removal`, or pointed at another method with `POST /payment-methods/{id}/source-mappings/correction` (#588). A payment with this source that names this method through a mapping not marked as one (made by an API instance from before #588) is marked by this request, so it can then be corrected; it is counted in `alreadyMapped`.
|
|
889
889
|
*
|
|
890
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
891
|
*/
|
|
@@ -896,6 +896,56 @@ export interface paths {
|
|
|
896
896
|
patch?: never;
|
|
897
897
|
trace?: never;
|
|
898
898
|
};
|
|
899
|
+
"/api/v1/payment-methods/{id}/source-mappings/removal": {
|
|
900
|
+
parameters: {
|
|
901
|
+
query?: never;
|
|
902
|
+
header?: never;
|
|
903
|
+
path?: never;
|
|
904
|
+
cookie?: never;
|
|
905
|
+
};
|
|
906
|
+
get?: never;
|
|
907
|
+
put?: never;
|
|
908
|
+
/**
|
|
909
|
+
* Undo a mapping: show the payments with a free-text source as typed again
|
|
910
|
+
* @description #588. Every payment of this broker whose `source` is exactly the given text (after trimming, case as typed) and that **a mapping** gave this method goes back to naming no method. Customers see the source as typed again, and the source returns to `GET /payment-methods/free-text-sources`. No amount, source or reference changes.
|
|
911
|
+
*
|
|
912
|
+
* **A payment recorded against this method is never changed**: its method is part of what was recorded. Such payments with this text (possible only when the text is the method's own code) are counted in `recordedAgainstMethod`. A payment recorded against the wrong method is corrected by a reversal. A payment that names this method through a mapping not marked as one (made by an API instance from before #588, possible only when the text is not the method's code) is counted in `notYetCorrectable` and left alone: map the source to this method again, which marks it, and then undo.
|
|
913
|
+
*
|
|
914
|
+
* **Idempotent.** Repeating the request answers `unmapped: 0` and records nothing. A retired method can be unmapped from. A statement already produced keeps the wording it was produced with. A `409` is the platform's concurrency conflict, with `retryable: true`, when another write changed one of the payments while this ran.
|
|
915
|
+
*/
|
|
916
|
+
post: operations["UnmapFreeTextPaymentSource"];
|
|
917
|
+
delete?: never;
|
|
918
|
+
options?: never;
|
|
919
|
+
head?: never;
|
|
920
|
+
patch?: never;
|
|
921
|
+
trace?: never;
|
|
922
|
+
};
|
|
923
|
+
"/api/v1/payment-methods/{id}/source-mappings/correction": {
|
|
924
|
+
parameters: {
|
|
925
|
+
query?: never;
|
|
926
|
+
header?: never;
|
|
927
|
+
path?: never;
|
|
928
|
+
cookie?: never;
|
|
929
|
+
};
|
|
930
|
+
get?: never;
|
|
931
|
+
put?: never;
|
|
932
|
+
/**
|
|
933
|
+
* Correct a mapping: say the payments with a free-text source came through another method
|
|
934
|
+
* @description #588. Every payment of this broker whose `source` is exactly the given text and that **a mapping** gave this method is given `paymentMethodId` instead, in one step. Customers then see that method's label. No amount, source or reference changes, and a payment recorded against this method is never moved (counted in `recordedAgainstMethod`). A payment mapped by an API instance from before #588 is counted in `notYetCorrectable` and left alone until the source is mapped to this method again.
|
|
935
|
+
*
|
|
936
|
+
* `paymentMethodId` must be another active method of this broker: the same method, an unknown or another broker's method is `400` on `PaymentMethodId`, and a retired one is `409`. The method in the route may be retired.
|
|
937
|
+
*
|
|
938
|
+
* **All or nothing.** If the target method already holds the reference of any of the payments (a payment recorded against it, one mapped to it, or a free-text payment typed exactly as its code), nothing is moved and the answer is `409` `urn:brokerplatform:problem:payment-source-remap-collision`, which is not retryable, with `collisionCount`. **`collisions` is present only when the caller also holds `billing.payments.read`**: up to 200 entries naming each payment, its reference and the payment holding it. Undo the mapping instead and map the source to the target: the mapping maps the rest and lists those it skips.
|
|
939
|
+
*
|
|
940
|
+
* **Idempotent.** Repeating the request answers `remapped: 0` and records nothing. A statement already produced keeps the wording it was produced with. A `409` can also be the platform's concurrency conflict, `urn:brokerplatform:problem:concurrency-conflict` with `retryable: true`: another write changed one of the payments while this ran, or something other than this API's recording route wrote a payment against the target method between this request's read and its save. Send it again; a retry reports any collision.
|
|
941
|
+
*/
|
|
942
|
+
post: operations["RemapFreeTextPaymentSource"];
|
|
943
|
+
delete?: never;
|
|
944
|
+
options?: never;
|
|
945
|
+
head?: never;
|
|
946
|
+
patch?: never;
|
|
947
|
+
trace?: never;
|
|
948
|
+
};
|
|
899
949
|
"/api/v1/insurers": {
|
|
900
950
|
parameters: {
|
|
901
951
|
query?: never;
|
|
@@ -8207,6 +8257,30 @@ export interface components {
|
|
|
8207
8257
|
skippedCount: number | string;
|
|
8208
8258
|
skipped: components["schemas"]["SkippedPaymentResponse"][];
|
|
8209
8259
|
};
|
|
8260
|
+
PaymentSourceRemappingResponse: {
|
|
8261
|
+
/** Format: uuid */
|
|
8262
|
+
fromPaymentMethodId: string;
|
|
8263
|
+
/** Format: uuid */
|
|
8264
|
+
paymentMethodId: string;
|
|
8265
|
+
source: string;
|
|
8266
|
+
/** Format: int32 */
|
|
8267
|
+
remapped: number | string;
|
|
8268
|
+
/** Format: int32 */
|
|
8269
|
+
recordedAgainstMethod: number | string;
|
|
8270
|
+
/** Format: int32 */
|
|
8271
|
+
notYetCorrectable: number | string;
|
|
8272
|
+
};
|
|
8273
|
+
PaymentSourceUnmappingResponse: {
|
|
8274
|
+
/** Format: uuid */
|
|
8275
|
+
paymentMethodId: string;
|
|
8276
|
+
source: string;
|
|
8277
|
+
/** Format: int32 */
|
|
8278
|
+
unmapped: number | string;
|
|
8279
|
+
/** Format: int32 */
|
|
8280
|
+
recordedAgainstMethod: number | string;
|
|
8281
|
+
/** Format: int32 */
|
|
8282
|
+
notYetCorrectable: number | string;
|
|
8283
|
+
};
|
|
8210
8284
|
PaymentSummaryResponse: {
|
|
8211
8285
|
/** Format: uuid */
|
|
8212
8286
|
id: string;
|
|
@@ -8873,6 +8947,11 @@ export interface components {
|
|
|
8873
8947
|
ReleaseLegalHoldRequest: {
|
|
8874
8948
|
releaseReason: null | string;
|
|
8875
8949
|
};
|
|
8950
|
+
RemapPaymentSourceRequest: {
|
|
8951
|
+
source: string;
|
|
8952
|
+
/** Format: uuid */
|
|
8953
|
+
paymentMethodId: string;
|
|
8954
|
+
};
|
|
8876
8955
|
RenameFormDefinitionRequest: {
|
|
8877
8956
|
name: null | string;
|
|
8878
8957
|
};
|
|
@@ -9509,6 +9588,9 @@ export interface components {
|
|
|
9509
9588
|
/** @description The reason. One, because the caller named one submission; still an array. */
|
|
9510
9589
|
violations: components["schemas"]["RenewalConfirmationViolationResponse"][];
|
|
9511
9590
|
};
|
|
9591
|
+
UnmapPaymentSourceRequest: {
|
|
9592
|
+
source: string;
|
|
9593
|
+
};
|
|
9512
9594
|
/** @description RFC 9457 problem answered when a policy cannot be opened because the quote request it names has no acceptance behind it (ADR-0028). Go back to the quote; nothing about this request will help. */
|
|
9513
9595
|
UnplaceableQuoteProblem: {
|
|
9514
9596
|
/**
|
|
@@ -11224,6 +11306,108 @@ export interface operations {
|
|
|
11224
11306
|
};
|
|
11225
11307
|
};
|
|
11226
11308
|
};
|
|
11309
|
+
UnmapFreeTextPaymentSource: {
|
|
11310
|
+
parameters: {
|
|
11311
|
+
query?: never;
|
|
11312
|
+
header?: never;
|
|
11313
|
+
path: {
|
|
11314
|
+
id: string;
|
|
11315
|
+
};
|
|
11316
|
+
cookie?: never;
|
|
11317
|
+
};
|
|
11318
|
+
requestBody: {
|
|
11319
|
+
content: {
|
|
11320
|
+
"application/json": components["schemas"]["UnmapPaymentSourceRequest"];
|
|
11321
|
+
};
|
|
11322
|
+
};
|
|
11323
|
+
responses: {
|
|
11324
|
+
/** @description OK */
|
|
11325
|
+
200: {
|
|
11326
|
+
headers: {
|
|
11327
|
+
[name: string]: unknown;
|
|
11328
|
+
};
|
|
11329
|
+
content: {
|
|
11330
|
+
"application/json": components["schemas"]["PaymentSourceUnmappingResponse"];
|
|
11331
|
+
};
|
|
11332
|
+
};
|
|
11333
|
+
/** @description Bad Request */
|
|
11334
|
+
400: {
|
|
11335
|
+
headers: {
|
|
11336
|
+
[name: string]: unknown;
|
|
11337
|
+
};
|
|
11338
|
+
content: {
|
|
11339
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
11340
|
+
};
|
|
11341
|
+
};
|
|
11342
|
+
/** @description Not Found */
|
|
11343
|
+
404: {
|
|
11344
|
+
headers: {
|
|
11345
|
+
[name: string]: unknown;
|
|
11346
|
+
};
|
|
11347
|
+
content?: never;
|
|
11348
|
+
};
|
|
11349
|
+
/** @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. */
|
|
11350
|
+
409: {
|
|
11351
|
+
headers: {
|
|
11352
|
+
[name: string]: unknown;
|
|
11353
|
+
};
|
|
11354
|
+
content: {
|
|
11355
|
+
"application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
|
|
11356
|
+
};
|
|
11357
|
+
};
|
|
11358
|
+
};
|
|
11359
|
+
};
|
|
11360
|
+
RemapFreeTextPaymentSource: {
|
|
11361
|
+
parameters: {
|
|
11362
|
+
query?: never;
|
|
11363
|
+
header?: never;
|
|
11364
|
+
path: {
|
|
11365
|
+
id: string;
|
|
11366
|
+
};
|
|
11367
|
+
cookie?: never;
|
|
11368
|
+
};
|
|
11369
|
+
requestBody: {
|
|
11370
|
+
content: {
|
|
11371
|
+
"application/json": components["schemas"]["RemapPaymentSourceRequest"];
|
|
11372
|
+
};
|
|
11373
|
+
};
|
|
11374
|
+
responses: {
|
|
11375
|
+
/** @description OK */
|
|
11376
|
+
200: {
|
|
11377
|
+
headers: {
|
|
11378
|
+
[name: string]: unknown;
|
|
11379
|
+
};
|
|
11380
|
+
content: {
|
|
11381
|
+
"application/json": components["schemas"]["PaymentSourceRemappingResponse"];
|
|
11382
|
+
};
|
|
11383
|
+
};
|
|
11384
|
+
/** @description Bad Request */
|
|
11385
|
+
400: {
|
|
11386
|
+
headers: {
|
|
11387
|
+
[name: string]: unknown;
|
|
11388
|
+
};
|
|
11389
|
+
content: {
|
|
11390
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
11391
|
+
};
|
|
11392
|
+
};
|
|
11393
|
+
/** @description Not Found */
|
|
11394
|
+
404: {
|
|
11395
|
+
headers: {
|
|
11396
|
+
[name: string]: unknown;
|
|
11397
|
+
};
|
|
11398
|
+
content?: never;
|
|
11399
|
+
};
|
|
11400
|
+
/** @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. */
|
|
11401
|
+
409: {
|
|
11402
|
+
headers: {
|
|
11403
|
+
[name: string]: unknown;
|
|
11404
|
+
};
|
|
11405
|
+
content: {
|
|
11406
|
+
"application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
|
|
11407
|
+
};
|
|
11408
|
+
};
|
|
11409
|
+
};
|
|
11410
|
+
};
|
|
11227
11411
|
ListInsurers: {
|
|
11228
11412
|
parameters: {
|
|
11229
11413
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.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,
|