@insurance-broker/api-client 5.22.0 → 5.23.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 +279 -1
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -3187,6 +3187,71 @@ export interface paths {
|
|
|
3187
3187
|
patch?: never;
|
|
3188
3188
|
trace?: never;
|
|
3189
3189
|
};
|
|
3190
|
+
"/api/v1/customers/imports": {
|
|
3191
|
+
parameters: {
|
|
3192
|
+
query?: never;
|
|
3193
|
+
header?: never;
|
|
3194
|
+
path?: never;
|
|
3195
|
+
cookie?: never;
|
|
3196
|
+
};
|
|
3197
|
+
/**
|
|
3198
|
+
* This broker's customer import runs, newest first
|
|
3199
|
+
* @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`.
|
|
3200
|
+
*/
|
|
3201
|
+
get: operations["ListCustomerImports"];
|
|
3202
|
+
put?: never;
|
|
3203
|
+
/**
|
|
3204
|
+
* Uploads a file of customers to validate and import
|
|
3205
|
+
* @description Reads a CSV file of customers and stages every row as a new import run, answering `202` with the run in status `Staged`. Nothing is written to the customer records: each row is validated, and the whole file is committed later, all of it or none (ADR-0051).
|
|
3206
|
+
*
|
|
3207
|
+
* **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 `full_name`, `email`, `legacy_source` and `legacy_reference`, and optionally `phone`, each at most once and nothing else. At most 10,000 data rows and 5 MiB by default. `legacy_reference` is the previous system's record key, never an identity-document number.
|
|
3208
|
+
*
|
|
3209
|
+
* **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, 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`, `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 customer import staged, validated or committing — one at a time. `429` when this broker has used its upload budget: every admitted upload counts, including refused ones.
|
|
3210
|
+
*/
|
|
3211
|
+
post: operations["UploadCustomerImport"];
|
|
3212
|
+
delete?: never;
|
|
3213
|
+
options?: never;
|
|
3214
|
+
head?: never;
|
|
3215
|
+
patch?: never;
|
|
3216
|
+
trace?: never;
|
|
3217
|
+
};
|
|
3218
|
+
"/api/v1/customers/imports/{id}": {
|
|
3219
|
+
parameters: {
|
|
3220
|
+
query?: never;
|
|
3221
|
+
header?: never;
|
|
3222
|
+
path?: never;
|
|
3223
|
+
cookie?: never;
|
|
3224
|
+
};
|
|
3225
|
+
/** One customer import run: its status, counts and who did what when */
|
|
3226
|
+
get: operations["GetCustomerImport"];
|
|
3227
|
+
put?: never;
|
|
3228
|
+
post?: never;
|
|
3229
|
+
delete?: never;
|
|
3230
|
+
options?: never;
|
|
3231
|
+
head?: never;
|
|
3232
|
+
patch?: never;
|
|
3233
|
+
trace?: never;
|
|
3234
|
+
};
|
|
3235
|
+
"/api/v1/customers/imports/{id}/rows": {
|
|
3236
|
+
parameters: {
|
|
3237
|
+
query?: never;
|
|
3238
|
+
header?: never;
|
|
3239
|
+
path?: never;
|
|
3240
|
+
cookie?: never;
|
|
3241
|
+
};
|
|
3242
|
+
/**
|
|
3243
|
+
* A customer import run's rows, in file order
|
|
3244
|
+
* @description Each row's line number in the file, its outcome, the customer it created once committed, and every reason it was refused — a column, a stable code and a fixed sentence, never a value from the 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.
|
|
3245
|
+
*/
|
|
3246
|
+
get: operations["ListCustomerImportRows"];
|
|
3247
|
+
put?: never;
|
|
3248
|
+
post?: never;
|
|
3249
|
+
delete?: never;
|
|
3250
|
+
options?: never;
|
|
3251
|
+
head?: never;
|
|
3252
|
+
patch?: never;
|
|
3253
|
+
trace?: never;
|
|
3254
|
+
};
|
|
3190
3255
|
"/api/v1/organisations": {
|
|
3191
3256
|
parameters: {
|
|
3192
3257
|
query?: never;
|
|
@@ -7077,6 +7142,54 @@ export interface components {
|
|
|
7077
7142
|
isSatisfied: boolean;
|
|
7078
7143
|
enteredBy: string;
|
|
7079
7144
|
};
|
|
7145
|
+
CustomerImportRowPage: {
|
|
7146
|
+
items: components["schemas"]["CustomerImportRowResponse"][];
|
|
7147
|
+
nextCursor: null | string;
|
|
7148
|
+
};
|
|
7149
|
+
CustomerImportRowReason: {
|
|
7150
|
+
column: string;
|
|
7151
|
+
code: string;
|
|
7152
|
+
message: string;
|
|
7153
|
+
};
|
|
7154
|
+
CustomerImportRowResponse: {
|
|
7155
|
+
/** Format: int32 */
|
|
7156
|
+
lineNumber: number;
|
|
7157
|
+
outcome: string;
|
|
7158
|
+
/** Format: uuid */
|
|
7159
|
+
customerId: null | string;
|
|
7160
|
+
reasons: components["schemas"]["CustomerImportRowReason"][];
|
|
7161
|
+
};
|
|
7162
|
+
CustomerImportRunPage: {
|
|
7163
|
+
items: components["schemas"]["CustomerImportRunResponse"][];
|
|
7164
|
+
nextCursor: null | string;
|
|
7165
|
+
};
|
|
7166
|
+
CustomerImportRunResponse: {
|
|
7167
|
+
/** Format: uuid */
|
|
7168
|
+
id: string;
|
|
7169
|
+
status: string;
|
|
7170
|
+
fileName: string;
|
|
7171
|
+
/** Format: int32 */
|
|
7172
|
+
rowCount: number;
|
|
7173
|
+
/** Format: int32 */
|
|
7174
|
+
acceptedCount: null | number;
|
|
7175
|
+
/** Format: int32 */
|
|
7176
|
+
refusedCount: null | number;
|
|
7177
|
+
/** Format: int32 */
|
|
7178
|
+
committedCount: null | number;
|
|
7179
|
+
submittedBySubjectId: string;
|
|
7180
|
+
/** Format: date-time */
|
|
7181
|
+
stagedAtUtc: string;
|
|
7182
|
+
/** Format: date-time */
|
|
7183
|
+
validatedAtUtc: null | string;
|
|
7184
|
+
commitRequestedBySubjectId: null | string;
|
|
7185
|
+
/** Format: date-time */
|
|
7186
|
+
commitRequestedAtUtc: null | string;
|
|
7187
|
+
/** Format: date-time */
|
|
7188
|
+
concludedAtUtc: null | string;
|
|
7189
|
+
};
|
|
7190
|
+
CustomerImportUpload: {
|
|
7191
|
+
file: components["schemas"]["IFormFile"];
|
|
7192
|
+
};
|
|
7080
7193
|
CustomerInsurerOutcomeResponse: {
|
|
7081
7194
|
/** Format: uuid */
|
|
7082
7195
|
id: string;
|
|
@@ -9229,7 +9342,7 @@ export interface components {
|
|
|
9229
9342
|
/** Format: uuid */
|
|
9230
9343
|
formSubmissionId: null | string;
|
|
9231
9344
|
};
|
|
9232
|
-
/** @description RFC 9457 problem answered when a request to render, produce or export was refused because a rate limit's budget is spent (ADR-0050). Nothing was done. Branch on type, not on title or detail, which are human-readable and not fixed. */
|
|
9345
|
+
/** @description RFC 9457 problem answered when a request to render, produce or export, or to upload an import file, was refused because a rate limit's budget is spent (ADR-0050, ADR-0051). Nothing was done. Branch on type, not on title or detail, which are human-readable and not fixed. */
|
|
9233
9346
|
RateLimitedProblem: {
|
|
9234
9347
|
/**
|
|
9235
9348
|
* @description Identifies the problem kind. A stable URN; it is not promised to resolve.
|
|
@@ -17176,6 +17289,171 @@ export interface operations {
|
|
|
17176
17289
|
};
|
|
17177
17290
|
};
|
|
17178
17291
|
};
|
|
17292
|
+
ListCustomerImports: {
|
|
17293
|
+
parameters: {
|
|
17294
|
+
query?: {
|
|
17295
|
+
cursor?: string;
|
|
17296
|
+
limit?: number | string;
|
|
17297
|
+
};
|
|
17298
|
+
header?: never;
|
|
17299
|
+
path?: never;
|
|
17300
|
+
cookie?: never;
|
|
17301
|
+
};
|
|
17302
|
+
requestBody?: never;
|
|
17303
|
+
responses: {
|
|
17304
|
+
/** @description OK */
|
|
17305
|
+
200: {
|
|
17306
|
+
headers: {
|
|
17307
|
+
[name: string]: unknown;
|
|
17308
|
+
};
|
|
17309
|
+
content: {
|
|
17310
|
+
"application/json": components["schemas"]["CustomerImportRunPage"];
|
|
17311
|
+
};
|
|
17312
|
+
};
|
|
17313
|
+
/** @description Bad Request */
|
|
17314
|
+
400: {
|
|
17315
|
+
headers: {
|
|
17316
|
+
[name: string]: unknown;
|
|
17317
|
+
};
|
|
17318
|
+
content: {
|
|
17319
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
17320
|
+
};
|
|
17321
|
+
};
|
|
17322
|
+
};
|
|
17323
|
+
};
|
|
17324
|
+
UploadCustomerImport: {
|
|
17325
|
+
parameters: {
|
|
17326
|
+
query?: never;
|
|
17327
|
+
header?: never;
|
|
17328
|
+
path?: never;
|
|
17329
|
+
cookie?: never;
|
|
17330
|
+
};
|
|
17331
|
+
requestBody: {
|
|
17332
|
+
content: {
|
|
17333
|
+
"multipart/form-data": components["schemas"]["CustomerImportUpload"];
|
|
17334
|
+
};
|
|
17335
|
+
};
|
|
17336
|
+
responses: {
|
|
17337
|
+
/** @description Accepted */
|
|
17338
|
+
202: {
|
|
17339
|
+
headers: {
|
|
17340
|
+
[name: string]: unknown;
|
|
17341
|
+
};
|
|
17342
|
+
content: {
|
|
17343
|
+
"application/json": components["schemas"]["CustomerImportRunResponse"];
|
|
17344
|
+
};
|
|
17345
|
+
};
|
|
17346
|
+
/** @description Bad Request */
|
|
17347
|
+
400: {
|
|
17348
|
+
headers: {
|
|
17349
|
+
[name: string]: unknown;
|
|
17350
|
+
};
|
|
17351
|
+
content: {
|
|
17352
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
17353
|
+
};
|
|
17354
|
+
};
|
|
17355
|
+
/** @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. */
|
|
17356
|
+
409: {
|
|
17357
|
+
headers: {
|
|
17358
|
+
[name: string]: unknown;
|
|
17359
|
+
};
|
|
17360
|
+
content: {
|
|
17361
|
+
"application/problem+json": components["schemas"]["ConcurrencyConflictProblem"] | components["schemas"]["ProblemDetails"];
|
|
17362
|
+
};
|
|
17363
|
+
};
|
|
17364
|
+
/** @description Payload Too Large */
|
|
17365
|
+
413: {
|
|
17366
|
+
headers: {
|
|
17367
|
+
[name: string]: unknown;
|
|
17368
|
+
};
|
|
17369
|
+
content: {
|
|
17370
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
17371
|
+
};
|
|
17372
|
+
};
|
|
17373
|
+
/** @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. */
|
|
17374
|
+
429: {
|
|
17375
|
+
headers: {
|
|
17376
|
+
/** @description Whole seconds to wait before retrying; at least 1. */
|
|
17377
|
+
"Retry-After": number;
|
|
17378
|
+
[name: string]: unknown;
|
|
17379
|
+
};
|
|
17380
|
+
content: {
|
|
17381
|
+
"application/problem+json": components["schemas"]["RateLimitedProblem"];
|
|
17382
|
+
};
|
|
17383
|
+
};
|
|
17384
|
+
};
|
|
17385
|
+
};
|
|
17386
|
+
GetCustomerImport: {
|
|
17387
|
+
parameters: {
|
|
17388
|
+
query?: never;
|
|
17389
|
+
header?: never;
|
|
17390
|
+
path: {
|
|
17391
|
+
id: string;
|
|
17392
|
+
};
|
|
17393
|
+
cookie?: never;
|
|
17394
|
+
};
|
|
17395
|
+
requestBody?: never;
|
|
17396
|
+
responses: {
|
|
17397
|
+
/** @description OK */
|
|
17398
|
+
200: {
|
|
17399
|
+
headers: {
|
|
17400
|
+
[name: string]: unknown;
|
|
17401
|
+
};
|
|
17402
|
+
content: {
|
|
17403
|
+
"application/json": components["schemas"]["CustomerImportRunResponse"];
|
|
17404
|
+
};
|
|
17405
|
+
};
|
|
17406
|
+
/** @description Not Found */
|
|
17407
|
+
404: {
|
|
17408
|
+
headers: {
|
|
17409
|
+
[name: string]: unknown;
|
|
17410
|
+
};
|
|
17411
|
+
content?: never;
|
|
17412
|
+
};
|
|
17413
|
+
};
|
|
17414
|
+
};
|
|
17415
|
+
ListCustomerImportRows: {
|
|
17416
|
+
parameters: {
|
|
17417
|
+
query?: {
|
|
17418
|
+
outcome?: string;
|
|
17419
|
+
cursor?: string;
|
|
17420
|
+
limit?: number | string;
|
|
17421
|
+
};
|
|
17422
|
+
header?: never;
|
|
17423
|
+
path: {
|
|
17424
|
+
id: string;
|
|
17425
|
+
};
|
|
17426
|
+
cookie?: never;
|
|
17427
|
+
};
|
|
17428
|
+
requestBody?: never;
|
|
17429
|
+
responses: {
|
|
17430
|
+
/** @description OK */
|
|
17431
|
+
200: {
|
|
17432
|
+
headers: {
|
|
17433
|
+
[name: string]: unknown;
|
|
17434
|
+
};
|
|
17435
|
+
content: {
|
|
17436
|
+
"application/json": components["schemas"]["CustomerImportRowPage"];
|
|
17437
|
+
};
|
|
17438
|
+
};
|
|
17439
|
+
/** @description Bad Request */
|
|
17440
|
+
400: {
|
|
17441
|
+
headers: {
|
|
17442
|
+
[name: string]: unknown;
|
|
17443
|
+
};
|
|
17444
|
+
content: {
|
|
17445
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
17446
|
+
};
|
|
17447
|
+
};
|
|
17448
|
+
/** @description Not Found */
|
|
17449
|
+
404: {
|
|
17450
|
+
headers: {
|
|
17451
|
+
[name: string]: unknown;
|
|
17452
|
+
};
|
|
17453
|
+
content?: never;
|
|
17454
|
+
};
|
|
17455
|
+
};
|
|
17456
|
+
};
|
|
17179
17457
|
ListOrganisations: {
|
|
17180
17458
|
parameters: {
|
|
17181
17459
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.23.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,
|