@insurance-broker/api-client 5.24.0 → 5.25.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 +278 -0
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -4635,6 +4635,71 @@ export interface paths {
|
|
|
4635
4635
|
patch?: never;
|
|
4636
4636
|
trace?: never;
|
|
4637
4637
|
};
|
|
4638
|
+
"/api/v1/policies/imports": {
|
|
4639
|
+
parameters: {
|
|
4640
|
+
query?: never;
|
|
4641
|
+
header?: never;
|
|
4642
|
+
path?: never;
|
|
4643
|
+
cookie?: never;
|
|
4644
|
+
};
|
|
4645
|
+
/**
|
|
4646
|
+
* This broker's policy import runs, newest first
|
|
4647
|
+
* @description Paged by cursor, newest first (ADR-0031): pass `nextCursor` back as `cursor` until it is null. A cursor this list did not issue is a `400`.
|
|
4648
|
+
*/
|
|
4649
|
+
get: operations["ListPolicyImports"];
|
|
4650
|
+
put?: never;
|
|
4651
|
+
/**
|
|
4652
|
+
* Uploads a file of policies to validate and import
|
|
4653
|
+
* @description Reads a CSV file of policies carried across from a previous system and stages every row as a new import run, answering `202` with the run in status `Staged`. Nothing is written to the policy records: each row is validated against the rules `POST /policies/imported` applies, and the whole file is committed later, all of it or none (ADR-0051).
|
|
4654
|
+
*
|
|
4655
|
+
* **The file.** One `multipart/form-data` file part. UTF-8 (a leading byte-order mark is tolerated), comma-delimited, RFC 4180 quoting, a header row naming `legacy_source`, `legacy_reference`, `customer_legacy_source`, `customer_legacy_reference`, `product_key`, `insurer_code` and `status`, and optionally `cover_start`, `cover_end`, `premium_amount`, `premium_currency`, `insurer_reference`, `insurer_confirmed_on` and `import_notes`, each at most once. Up to 50 further columns named `legacy.` followed by the previous system's own field name become the row's legacy metadata. Nothing else. Dates are `yyyy-MM-dd`; the premium is a plain decimal with a `.` point. The customer is named by the legacy pair it was imported under, the product by its key and the insurer by its code. At most 10,000 data rows and 5 MiB by default.
|
|
4656
|
+
*
|
|
4657
|
+
* **Refusals.** `413` when the file is larger than this broker accepts. `400` when the body is not multipart, and `400` with problem type `urn:brokerplatform:problem:import-file-refused` when the file cannot be read — invalid UTF-8, a NUL or other control character, a duplicate, unknown or missing header, more than 50 `legacy.` columns, a record whose field count differs from the header's, a misplaced or unclosed quote, more rows than allowed, no rows, or an unusable file name. That problem carries `fault` (`invalid-encoding`, `control-character`, `no-header`, `duplicate-header`, `unknown-column`, `missing-column`, `too-many-legacy-columns`, `field-count`, `misplaced-quote`, `unterminated-quote`, `too-many-rows`, `no-rows`, `no-file-part` or `file-name`) and, when the fault is on a line, `line`; its message names the line and never repeats the file's content. **A refused file creates no run.** `409` with problem type `urn:brokerplatform:problem:import-run-in-progress` when this broker already has a policy import staged, validated or committing — one at a time. `429` when this broker has used its policy upload budget: every admitted upload counts, including refused ones.
|
|
4658
|
+
*/
|
|
4659
|
+
post: operations["UploadPolicyImport"];
|
|
4660
|
+
delete?: never;
|
|
4661
|
+
options?: never;
|
|
4662
|
+
head?: never;
|
|
4663
|
+
patch?: never;
|
|
4664
|
+
trace?: never;
|
|
4665
|
+
};
|
|
4666
|
+
"/api/v1/policies/imports/{id}": {
|
|
4667
|
+
parameters: {
|
|
4668
|
+
query?: never;
|
|
4669
|
+
header?: never;
|
|
4670
|
+
path?: never;
|
|
4671
|
+
cookie?: never;
|
|
4672
|
+
};
|
|
4673
|
+
/** One policy import run: its status, counts and who did what when */
|
|
4674
|
+
get: operations["GetPolicyImport"];
|
|
4675
|
+
put?: never;
|
|
4676
|
+
post?: never;
|
|
4677
|
+
delete?: never;
|
|
4678
|
+
options?: never;
|
|
4679
|
+
head?: never;
|
|
4680
|
+
patch?: never;
|
|
4681
|
+
trace?: never;
|
|
4682
|
+
};
|
|
4683
|
+
"/api/v1/policies/imports/{id}/rows": {
|
|
4684
|
+
parameters: {
|
|
4685
|
+
query?: never;
|
|
4686
|
+
header?: never;
|
|
4687
|
+
path?: never;
|
|
4688
|
+
cookie?: never;
|
|
4689
|
+
};
|
|
4690
|
+
/**
|
|
4691
|
+
* A policy import run's rows, in file order
|
|
4692
|
+
* @description Each row's line number in the file, its outcome, the policy it created once committed, and every reason it was refused — a column (`legacy.*` for the legacy columns taken together), a stable code and a fixed sentence, never a value from the file. The codes are those of `POST /policies/imported` (`required`, `too-long`, `invalid-format`, `premium-incomplete`, `premium-negative`, `cover-period-inverted`, `status-not-importable`, `evidence-required`, `evidence-not-allowed`, `legacy-metadata-too-large`, `unknown-customer`, `unknown-product`, `unknown-insurer`, `already-imported`) and two of a file's own: `invalid-character` and `duplicate-in-file`. Filter with `outcome` (`Pending`, `Accepted` or `Refused`). Paged by cursor in file order (ADR-0031). `404` when the run is not this broker's.
|
|
4693
|
+
*/
|
|
4694
|
+
get: operations["ListPolicyImportRows"];
|
|
4695
|
+
put?: never;
|
|
4696
|
+
post?: never;
|
|
4697
|
+
delete?: never;
|
|
4698
|
+
options?: never;
|
|
4699
|
+
head?: never;
|
|
4700
|
+
patch?: never;
|
|
4701
|
+
trace?: never;
|
|
4702
|
+
};
|
|
4638
4703
|
"/api/v1/policies/payment-gates": {
|
|
4639
4704
|
parameters: {
|
|
4640
4705
|
query?: never;
|
|
@@ -9000,6 +9065,54 @@ export interface components {
|
|
|
9000
9065
|
PolicyDocumentUpload: {
|
|
9001
9066
|
file: components["schemas"]["IFormFile"];
|
|
9002
9067
|
};
|
|
9068
|
+
PolicyImportRowPage: {
|
|
9069
|
+
items: components["schemas"]["PolicyImportRowResponse"][];
|
|
9070
|
+
nextCursor: null | string;
|
|
9071
|
+
};
|
|
9072
|
+
PolicyImportRowReason: {
|
|
9073
|
+
column: string;
|
|
9074
|
+
code: string;
|
|
9075
|
+
message: string;
|
|
9076
|
+
};
|
|
9077
|
+
PolicyImportRowResponse: {
|
|
9078
|
+
/** Format: int32 */
|
|
9079
|
+
lineNumber: number;
|
|
9080
|
+
outcome: string;
|
|
9081
|
+
/** Format: uuid */
|
|
9082
|
+
policyId: null | string;
|
|
9083
|
+
reasons: components["schemas"]["PolicyImportRowReason"][];
|
|
9084
|
+
};
|
|
9085
|
+
PolicyImportRunPage: {
|
|
9086
|
+
items: components["schemas"]["PolicyImportRunResponse"][];
|
|
9087
|
+
nextCursor: null | string;
|
|
9088
|
+
};
|
|
9089
|
+
PolicyImportRunResponse: {
|
|
9090
|
+
/** Format: uuid */
|
|
9091
|
+
id: string;
|
|
9092
|
+
status: string;
|
|
9093
|
+
fileName: string;
|
|
9094
|
+
/** Format: int32 */
|
|
9095
|
+
rowCount: number;
|
|
9096
|
+
/** Format: int32 */
|
|
9097
|
+
acceptedCount: null | number;
|
|
9098
|
+
/** Format: int32 */
|
|
9099
|
+
refusedCount: null | number;
|
|
9100
|
+
/** Format: int32 */
|
|
9101
|
+
committedCount: null | number;
|
|
9102
|
+
submittedBySubjectId: string;
|
|
9103
|
+
/** Format: date-time */
|
|
9104
|
+
stagedAtUtc: string;
|
|
9105
|
+
/** Format: date-time */
|
|
9106
|
+
validatedAtUtc: null | string;
|
|
9107
|
+
commitRequestedBySubjectId: null | string;
|
|
9108
|
+
/** Format: date-time */
|
|
9109
|
+
commitRequestedAtUtc: null | string;
|
|
9110
|
+
/** Format: date-time */
|
|
9111
|
+
concludedAtUtc: null | string;
|
|
9112
|
+
};
|
|
9113
|
+
PolicyImportUpload: {
|
|
9114
|
+
file: components["schemas"]["IFormFile"];
|
|
9115
|
+
};
|
|
9003
9116
|
PolicyPage: {
|
|
9004
9117
|
items: components["schemas"]["PolicyResponse"][];
|
|
9005
9118
|
nextCursor: null | string;
|
|
@@ -21250,6 +21363,171 @@ export interface operations {
|
|
|
21250
21363
|
};
|
|
21251
21364
|
};
|
|
21252
21365
|
};
|
|
21366
|
+
ListPolicyImports: {
|
|
21367
|
+
parameters: {
|
|
21368
|
+
query?: {
|
|
21369
|
+
cursor?: string;
|
|
21370
|
+
limit?: number | string;
|
|
21371
|
+
};
|
|
21372
|
+
header?: never;
|
|
21373
|
+
path?: never;
|
|
21374
|
+
cookie?: never;
|
|
21375
|
+
};
|
|
21376
|
+
requestBody?: never;
|
|
21377
|
+
responses: {
|
|
21378
|
+
/** @description OK */
|
|
21379
|
+
200: {
|
|
21380
|
+
headers: {
|
|
21381
|
+
[name: string]: unknown;
|
|
21382
|
+
};
|
|
21383
|
+
content: {
|
|
21384
|
+
"application/json": components["schemas"]["PolicyImportRunPage"];
|
|
21385
|
+
};
|
|
21386
|
+
};
|
|
21387
|
+
/** @description Bad Request */
|
|
21388
|
+
400: {
|
|
21389
|
+
headers: {
|
|
21390
|
+
[name: string]: unknown;
|
|
21391
|
+
};
|
|
21392
|
+
content: {
|
|
21393
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
21394
|
+
};
|
|
21395
|
+
};
|
|
21396
|
+
};
|
|
21397
|
+
};
|
|
21398
|
+
UploadPolicyImport: {
|
|
21399
|
+
parameters: {
|
|
21400
|
+
query?: never;
|
|
21401
|
+
header?: never;
|
|
21402
|
+
path?: never;
|
|
21403
|
+
cookie?: never;
|
|
21404
|
+
};
|
|
21405
|
+
requestBody: {
|
|
21406
|
+
content: {
|
|
21407
|
+
"multipart/form-data": components["schemas"]["PolicyImportUpload"];
|
|
21408
|
+
};
|
|
21409
|
+
};
|
|
21410
|
+
responses: {
|
|
21411
|
+
/** @description Accepted */
|
|
21412
|
+
202: {
|
|
21413
|
+
headers: {
|
|
21414
|
+
[name: string]: unknown;
|
|
21415
|
+
};
|
|
21416
|
+
content: {
|
|
21417
|
+
"application/json": components["schemas"]["PolicyImportRunResponse"];
|
|
21418
|
+
};
|
|
21419
|
+
};
|
|
21420
|
+
/** @description Bad Request */
|
|
21421
|
+
400: {
|
|
21422
|
+
headers: {
|
|
21423
|
+
[name: string]: unknown;
|
|
21424
|
+
};
|
|
21425
|
+
content: {
|
|
21426
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
21427
|
+
};
|
|
21428
|
+
};
|
|
21429
|
+
/** @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. */
|
|
21430
|
+
409: {
|
|
21431
|
+
headers: {
|
|
21432
|
+
[name: string]: unknown;
|
|
21433
|
+
};
|
|
21434
|
+
content: {
|
|
21435
|
+
"application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
|
|
21436
|
+
};
|
|
21437
|
+
};
|
|
21438
|
+
/** @description Payload Too Large */
|
|
21439
|
+
413: {
|
|
21440
|
+
headers: {
|
|
21441
|
+
[name: string]: unknown;
|
|
21442
|
+
};
|
|
21443
|
+
content: {
|
|
21444
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
21445
|
+
};
|
|
21446
|
+
};
|
|
21447
|
+
/** @description Too Many Requests (ADR-0051). Your organisation has used its budget of import uploads for this kind of record in the last day; every admitted upload counts, including ones refused because the file could not be read. Nothing was read and no import was started. budget is always tenant. Wait the number of seconds in Retry-After (also in retryAfterSeconds) before trying again. */
|
|
21448
|
+
429: {
|
|
21449
|
+
headers: {
|
|
21450
|
+
/** @description Whole seconds to wait before retrying; at least 1. */
|
|
21451
|
+
"Retry-After": number;
|
|
21452
|
+
[name: string]: unknown;
|
|
21453
|
+
};
|
|
21454
|
+
content: {
|
|
21455
|
+
"application/problem+json": components["schemas"]["RateLimitedProblem"];
|
|
21456
|
+
};
|
|
21457
|
+
};
|
|
21458
|
+
};
|
|
21459
|
+
};
|
|
21460
|
+
GetPolicyImport: {
|
|
21461
|
+
parameters: {
|
|
21462
|
+
query?: never;
|
|
21463
|
+
header?: never;
|
|
21464
|
+
path: {
|
|
21465
|
+
id: string;
|
|
21466
|
+
};
|
|
21467
|
+
cookie?: never;
|
|
21468
|
+
};
|
|
21469
|
+
requestBody?: never;
|
|
21470
|
+
responses: {
|
|
21471
|
+
/** @description OK */
|
|
21472
|
+
200: {
|
|
21473
|
+
headers: {
|
|
21474
|
+
[name: string]: unknown;
|
|
21475
|
+
};
|
|
21476
|
+
content: {
|
|
21477
|
+
"application/json": components["schemas"]["PolicyImportRunResponse"];
|
|
21478
|
+
};
|
|
21479
|
+
};
|
|
21480
|
+
/** @description Not Found */
|
|
21481
|
+
404: {
|
|
21482
|
+
headers: {
|
|
21483
|
+
[name: string]: unknown;
|
|
21484
|
+
};
|
|
21485
|
+
content?: never;
|
|
21486
|
+
};
|
|
21487
|
+
};
|
|
21488
|
+
};
|
|
21489
|
+
ListPolicyImportRows: {
|
|
21490
|
+
parameters: {
|
|
21491
|
+
query?: {
|
|
21492
|
+
outcome?: string;
|
|
21493
|
+
cursor?: string;
|
|
21494
|
+
limit?: number | string;
|
|
21495
|
+
};
|
|
21496
|
+
header?: never;
|
|
21497
|
+
path: {
|
|
21498
|
+
id: string;
|
|
21499
|
+
};
|
|
21500
|
+
cookie?: never;
|
|
21501
|
+
};
|
|
21502
|
+
requestBody?: never;
|
|
21503
|
+
responses: {
|
|
21504
|
+
/** @description OK */
|
|
21505
|
+
200: {
|
|
21506
|
+
headers: {
|
|
21507
|
+
[name: string]: unknown;
|
|
21508
|
+
};
|
|
21509
|
+
content: {
|
|
21510
|
+
"application/json": components["schemas"]["PolicyImportRowPage"];
|
|
21511
|
+
};
|
|
21512
|
+
};
|
|
21513
|
+
/** @description Bad Request */
|
|
21514
|
+
400: {
|
|
21515
|
+
headers: {
|
|
21516
|
+
[name: string]: unknown;
|
|
21517
|
+
};
|
|
21518
|
+
content: {
|
|
21519
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
21520
|
+
};
|
|
21521
|
+
};
|
|
21522
|
+
/** @description Not Found */
|
|
21523
|
+
404: {
|
|
21524
|
+
headers: {
|
|
21525
|
+
[name: string]: unknown;
|
|
21526
|
+
};
|
|
21527
|
+
content?: never;
|
|
21528
|
+
};
|
|
21529
|
+
};
|
|
21530
|
+
};
|
|
21253
21531
|
ReadPaymentGates: {
|
|
21254
21532
|
parameters: {
|
|
21255
21533
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.25.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,
|