@insurance-broker/api-client 1.32.0 → 1.33.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 +267 -1
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -255,7 +255,7 @@ export interface paths {
|
|
|
255
255
|
* Read one payment
|
|
256
256
|
* @description Another broker's payment and another customer's are invisible here rather than refused: the tenant and owner query filters remove them before the read runs, so all three cases answer the same `404` (ADR-0008, ADR-0030).
|
|
257
257
|
*
|
|
258
|
-
*
|
|
258
|
+
* **`approvedBySubjectId` and `approvedAtUtc` are null until somebody approves**, which is the ordinary state of a payment just recorded. Approval is a separate act on its own route and never a status: the status set is untouched by it.
|
|
259
259
|
*/
|
|
260
260
|
get: operations["GetPayment"];
|
|
261
261
|
put?: never;
|
|
@@ -292,6 +292,92 @@ export interface paths {
|
|
|
292
292
|
patch?: never;
|
|
293
293
|
trace?: never;
|
|
294
294
|
};
|
|
295
|
+
"/api/v1/payments/{id}/approval": {
|
|
296
|
+
parameters: {
|
|
297
|
+
query?: never;
|
|
298
|
+
header?: never;
|
|
299
|
+
path?: never;
|
|
300
|
+
cookie?: never;
|
|
301
|
+
};
|
|
302
|
+
get?: never;
|
|
303
|
+
put?: never;
|
|
304
|
+
/**
|
|
305
|
+
* Approve a payment somebody else recorded
|
|
306
|
+
* @description PAY-003's second half. Records that somebody accepted responsibility for a payment another person wrote down.
|
|
307
|
+
*
|
|
308
|
+
* **The subject who recorded the payment cannot approve it.** That is refused here and again by a check constraint, so it holds over a data fix, an import and a restored backup as well as over this route (ADR-0042 section 15, step 9.6's amendment).
|
|
309
|
+
*
|
|
310
|
+
* **A payment with no evidence a scan has passed cannot be approved.** File the bank slip first and wait for the scan; only a `Clean` verdict counts, which is the rule step 6.7 already applies to a form's evidence checklist.
|
|
311
|
+
*
|
|
312
|
+
* **Approval is an act and not a status.** The payment's status set is untouched: collapsing the two would make *"recorded but not yet approved"* and *"the money is definitely there"* the same value.
|
|
313
|
+
*
|
|
314
|
+
* There is no un-approval. A payment approved in error is corrected by a reversal, which is step 9.7's, for the reason BR-010 gives about every financially significant record.
|
|
315
|
+
*/
|
|
316
|
+
post: operations["ApprovePayment"];
|
|
317
|
+
delete?: never;
|
|
318
|
+
options?: never;
|
|
319
|
+
head?: never;
|
|
320
|
+
patch?: never;
|
|
321
|
+
trace?: never;
|
|
322
|
+
};
|
|
323
|
+
"/api/v1/payments/{id}/evidence/{evidenceId}/content": {
|
|
324
|
+
parameters: {
|
|
325
|
+
query?: never;
|
|
326
|
+
header?: never;
|
|
327
|
+
path?: never;
|
|
328
|
+
cookie?: never;
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* Take a copy of a document filed against a payment
|
|
332
|
+
* @description PAY-003. Streams one file back, and only when the malware scan has passed it.
|
|
333
|
+
*
|
|
334
|
+
* **A `409` here is about the scan and not about the request.** `urn:brokerplatform:problem:document-scan-pending` means wait and ask again; `document-infected` and `document-unscannable` mean this file will never be served and another must be filed. The `type` is what tells them apart — all three are 409 so that a client branching on status alone still behaves safely.
|
|
335
|
+
*
|
|
336
|
+
* **The response is verified as it is written.** If the store no longer holds what was filed, the transfer is aborted rather than completed over bytes nobody can vouch for.
|
|
337
|
+
*/
|
|
338
|
+
get: operations["DownloadPaymentEvidence"];
|
|
339
|
+
put?: never;
|
|
340
|
+
post?: never;
|
|
341
|
+
delete?: never;
|
|
342
|
+
options?: never;
|
|
343
|
+
head?: never;
|
|
344
|
+
patch?: never;
|
|
345
|
+
trace?: never;
|
|
346
|
+
};
|
|
347
|
+
"/api/v1/payments/{id}/evidence": {
|
|
348
|
+
parameters: {
|
|
349
|
+
query?: never;
|
|
350
|
+
header?: never;
|
|
351
|
+
path?: never;
|
|
352
|
+
cookie?: never;
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* What has been filed against a payment
|
|
356
|
+
* @description PAY-003. Every file filed against the payment, oldest first, with its scan verdict.
|
|
357
|
+
*
|
|
358
|
+
* **A row here is not a file that can be served.** The verdict is what decides that, and only `Clean` is downloadable — so a client renders the others as being checked, refused or unreadable rather than offering a link that will answer 409.
|
|
359
|
+
*
|
|
360
|
+
* There is no paging. A payment's evidence is a handful of files by nature.
|
|
361
|
+
*/
|
|
362
|
+
get: operations["ListPaymentEvidence"];
|
|
363
|
+
put?: never;
|
|
364
|
+
/**
|
|
365
|
+
* File a document supporting a recorded payment
|
|
366
|
+
* @description PAY-003. Stores one file against a payment — a bank slip, a statement line, a remittance advice, a counter receipt.
|
|
367
|
+
*
|
|
368
|
+
* **The file is quarantined the moment it is stored and only a malware scan moves it**, so a client that has just uploaded should say the file is being checked rather than that it is ready. Nothing but a `Clean` verdict is ever served back.
|
|
369
|
+
*
|
|
370
|
+
* **The type is taken from the file's own bytes, never from the part header.** A part declaring one thing and holding another is refused rather than believed.
|
|
371
|
+
*
|
|
372
|
+
* **A payment cannot be approved until at least one of its files is `Clean`**, which is the other half of PAY-003 and the reason this route exists.
|
|
373
|
+
*/
|
|
374
|
+
post: operations["UploadPaymentEvidence"];
|
|
375
|
+
delete?: never;
|
|
376
|
+
options?: never;
|
|
377
|
+
head?: never;
|
|
378
|
+
patch?: never;
|
|
379
|
+
trace?: never;
|
|
380
|
+
};
|
|
295
381
|
"/api/v1/insurers": {
|
|
296
382
|
parameters: {
|
|
297
383
|
query?: never;
|
|
@@ -4672,6 +4758,26 @@ export interface components {
|
|
|
4672
4758
|
/** Format: uuid */
|
|
4673
4759
|
paymentAttemptId: null | string;
|
|
4674
4760
|
};
|
|
4761
|
+
PaymentEvidenceResponse: {
|
|
4762
|
+
/** Format: uuid */
|
|
4763
|
+
id: string;
|
|
4764
|
+
/** Format: uuid */
|
|
4765
|
+
paymentId: string;
|
|
4766
|
+
fileName: string;
|
|
4767
|
+
contentType: string;
|
|
4768
|
+
/** Format: int64 */
|
|
4769
|
+
sizeBytes: number | string;
|
|
4770
|
+
contentSha256: string;
|
|
4771
|
+
/** Format: date-time */
|
|
4772
|
+
uploadedAtUtc: string;
|
|
4773
|
+
uploadedBySubjectId: string;
|
|
4774
|
+
scanVerdict: string;
|
|
4775
|
+
/** Format: date-time */
|
|
4776
|
+
scannedAtUtc: null | string;
|
|
4777
|
+
};
|
|
4778
|
+
PaymentEvidenceUpload: {
|
|
4779
|
+
file: components["schemas"]["IFormFile"];
|
|
4780
|
+
};
|
|
4675
4781
|
PaymentResponse: {
|
|
4676
4782
|
/** Format: uuid */
|
|
4677
4783
|
id: string;
|
|
@@ -4688,6 +4794,9 @@ export interface components {
|
|
|
4688
4794
|
recordedBySubjectId: string;
|
|
4689
4795
|
/** Format: date-time */
|
|
4690
4796
|
postedAtUtc: string;
|
|
4797
|
+
approvedBySubjectId: null | string;
|
|
4798
|
+
/** Format: date-time */
|
|
4799
|
+
approvedAtUtc: null | string;
|
|
4691
4800
|
};
|
|
4692
4801
|
PlaceLegalHoldRequest: {
|
|
4693
4802
|
moduleName: null | string;
|
|
@@ -5878,6 +5987,163 @@ export interface operations {
|
|
|
5878
5987
|
};
|
|
5879
5988
|
};
|
|
5880
5989
|
};
|
|
5990
|
+
ApprovePayment: {
|
|
5991
|
+
parameters: {
|
|
5992
|
+
query?: never;
|
|
5993
|
+
header?: never;
|
|
5994
|
+
path: {
|
|
5995
|
+
id: string;
|
|
5996
|
+
};
|
|
5997
|
+
cookie?: never;
|
|
5998
|
+
};
|
|
5999
|
+
requestBody?: never;
|
|
6000
|
+
responses: {
|
|
6001
|
+
/** @description OK */
|
|
6002
|
+
200: {
|
|
6003
|
+
headers: {
|
|
6004
|
+
[name: string]: unknown;
|
|
6005
|
+
};
|
|
6006
|
+
content: {
|
|
6007
|
+
"application/json": components["schemas"]["PaymentResponse"];
|
|
6008
|
+
};
|
|
6009
|
+
};
|
|
6010
|
+
/** @description Not Found */
|
|
6011
|
+
404: {
|
|
6012
|
+
headers: {
|
|
6013
|
+
[name: string]: unknown;
|
|
6014
|
+
};
|
|
6015
|
+
content?: never;
|
|
6016
|
+
};
|
|
6017
|
+
/** @description Conflict */
|
|
6018
|
+
409: {
|
|
6019
|
+
headers: {
|
|
6020
|
+
[name: string]: unknown;
|
|
6021
|
+
};
|
|
6022
|
+
content: {
|
|
6023
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
6024
|
+
};
|
|
6025
|
+
};
|
|
6026
|
+
};
|
|
6027
|
+
};
|
|
6028
|
+
DownloadPaymentEvidence: {
|
|
6029
|
+
parameters: {
|
|
6030
|
+
query?: never;
|
|
6031
|
+
header?: never;
|
|
6032
|
+
path: {
|
|
6033
|
+
id: string;
|
|
6034
|
+
evidenceId: string;
|
|
6035
|
+
};
|
|
6036
|
+
cookie?: never;
|
|
6037
|
+
};
|
|
6038
|
+
requestBody?: never;
|
|
6039
|
+
responses: {
|
|
6040
|
+
/** @description OK */
|
|
6041
|
+
200: {
|
|
6042
|
+
headers: {
|
|
6043
|
+
[name: string]: unknown;
|
|
6044
|
+
};
|
|
6045
|
+
content?: never;
|
|
6046
|
+
};
|
|
6047
|
+
/** @description Not Found */
|
|
6048
|
+
404: {
|
|
6049
|
+
headers: {
|
|
6050
|
+
[name: string]: unknown;
|
|
6051
|
+
};
|
|
6052
|
+
content?: never;
|
|
6053
|
+
};
|
|
6054
|
+
/** @description Conflict */
|
|
6055
|
+
409: {
|
|
6056
|
+
headers: {
|
|
6057
|
+
[name: string]: unknown;
|
|
6058
|
+
};
|
|
6059
|
+
content: {
|
|
6060
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
6061
|
+
};
|
|
6062
|
+
};
|
|
6063
|
+
};
|
|
6064
|
+
};
|
|
6065
|
+
ListPaymentEvidence: {
|
|
6066
|
+
parameters: {
|
|
6067
|
+
query?: never;
|
|
6068
|
+
header?: never;
|
|
6069
|
+
path: {
|
|
6070
|
+
id: string;
|
|
6071
|
+
};
|
|
6072
|
+
cookie?: never;
|
|
6073
|
+
};
|
|
6074
|
+
requestBody?: never;
|
|
6075
|
+
responses: {
|
|
6076
|
+
/** @description OK */
|
|
6077
|
+
200: {
|
|
6078
|
+
headers: {
|
|
6079
|
+
[name: string]: unknown;
|
|
6080
|
+
};
|
|
6081
|
+
content: {
|
|
6082
|
+
"application/json": components["schemas"]["PaymentEvidenceResponse"][];
|
|
6083
|
+
};
|
|
6084
|
+
};
|
|
6085
|
+
/** @description Not Found */
|
|
6086
|
+
404: {
|
|
6087
|
+
headers: {
|
|
6088
|
+
[name: string]: unknown;
|
|
6089
|
+
};
|
|
6090
|
+
content?: never;
|
|
6091
|
+
};
|
|
6092
|
+
};
|
|
6093
|
+
};
|
|
6094
|
+
UploadPaymentEvidence: {
|
|
6095
|
+
parameters: {
|
|
6096
|
+
query?: never;
|
|
6097
|
+
header?: {
|
|
6098
|
+
"X-Document-Sha256"?: string;
|
|
6099
|
+
};
|
|
6100
|
+
path: {
|
|
6101
|
+
id: string;
|
|
6102
|
+
};
|
|
6103
|
+
cookie?: never;
|
|
6104
|
+
};
|
|
6105
|
+
requestBody: {
|
|
6106
|
+
content: {
|
|
6107
|
+
"multipart/form-data": components["schemas"]["PaymentEvidenceUpload"];
|
|
6108
|
+
};
|
|
6109
|
+
};
|
|
6110
|
+
responses: {
|
|
6111
|
+
/** @description Created */
|
|
6112
|
+
201: {
|
|
6113
|
+
headers: {
|
|
6114
|
+
[name: string]: unknown;
|
|
6115
|
+
};
|
|
6116
|
+
content: {
|
|
6117
|
+
"application/json": components["schemas"]["PaymentEvidenceResponse"];
|
|
6118
|
+
};
|
|
6119
|
+
};
|
|
6120
|
+
/** @description Bad Request */
|
|
6121
|
+
400: {
|
|
6122
|
+
headers: {
|
|
6123
|
+
[name: string]: unknown;
|
|
6124
|
+
};
|
|
6125
|
+
content: {
|
|
6126
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
6127
|
+
};
|
|
6128
|
+
};
|
|
6129
|
+
/** @description Not Found */
|
|
6130
|
+
404: {
|
|
6131
|
+
headers: {
|
|
6132
|
+
[name: string]: unknown;
|
|
6133
|
+
};
|
|
6134
|
+
content?: never;
|
|
6135
|
+
};
|
|
6136
|
+
/** @description Payload Too Large */
|
|
6137
|
+
413: {
|
|
6138
|
+
headers: {
|
|
6139
|
+
[name: string]: unknown;
|
|
6140
|
+
};
|
|
6141
|
+
content: {
|
|
6142
|
+
"application/problem+json": components["schemas"]["ProblemDetails"];
|
|
6143
|
+
};
|
|
6144
|
+
};
|
|
6145
|
+
};
|
|
6146
|
+
};
|
|
5881
6147
|
ListInsurers: {
|
|
5882
6148
|
parameters: {
|
|
5883
6149
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.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,
|