@insurance-broker/api-client 1.35.0 → 1.36.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 +353 -0
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -472,6 +472,122 @@ export interface paths {
|
|
|
472
472
|
patch?: never;
|
|
473
473
|
trace?: never;
|
|
474
474
|
};
|
|
475
|
+
"/api/v1/statements": {
|
|
476
|
+
parameters: {
|
|
477
|
+
query?: never;
|
|
478
|
+
header?: never;
|
|
479
|
+
path?: never;
|
|
480
|
+
cookie?: never;
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* List the statements this broker has produced
|
|
484
|
+
* @description Newest period first, paged by cursor. A `customerId` narrows the list to one customer.
|
|
485
|
+
*
|
|
486
|
+
* **`customerId` is a filter and never an authorisation.** The broker whose statements these are comes from the session; naming a customer here selects among this broker's own rows and can reach nobody else's.
|
|
487
|
+
*
|
|
488
|
+
* Rows carry what each statement covers and not its figures: computing every statement's balance to render one page would make a list cost what a year of reading costs.
|
|
489
|
+
*/
|
|
490
|
+
get: operations["ListStatements"];
|
|
491
|
+
put?: never;
|
|
492
|
+
/**
|
|
493
|
+
* Produce a statement of account for a customer
|
|
494
|
+
* @description PAY-011. Records that a statement was produced for one customer, in one currency, over one period that has already finished, and answers its charges, payments, allocations and balances.
|
|
495
|
+
*
|
|
496
|
+
* **The period must have ended.** A statement's figures are computed from the ledger rather than stored, so one covering a day that is still running would answer differently every time it was read - and a statement of account that changes after it has been sent is worse than none.
|
|
497
|
+
*
|
|
498
|
+
* **One currency per statement.** A charge carries its own currency, and a balance in two of them is not a number. A customer owing in two currencies gets two statements.
|
|
499
|
+
*
|
|
500
|
+
* **Nothing about money is stored on the row.** There is no balance column: every figure is derived from the obligations and payments the statement renders, bounded by its period and by the instant it was produced.
|
|
501
|
+
*/
|
|
502
|
+
post: operations["ProduceStatement"];
|
|
503
|
+
delete?: never;
|
|
504
|
+
options?: never;
|
|
505
|
+
head?: never;
|
|
506
|
+
patch?: never;
|
|
507
|
+
trace?: never;
|
|
508
|
+
};
|
|
509
|
+
"/api/v1/statements/{id}": {
|
|
510
|
+
parameters: {
|
|
511
|
+
query?: never;
|
|
512
|
+
header?: never;
|
|
513
|
+
path?: never;
|
|
514
|
+
cookie?: never;
|
|
515
|
+
};
|
|
516
|
+
/**
|
|
517
|
+
* Read one statement, with its lines and figures
|
|
518
|
+
* @description PAY-011's whole sentence: the charges raised in the period, the payments recorded against them, which charge each payment went to, and the balance at either end of it.
|
|
519
|
+
*
|
|
520
|
+
* **`closingBalance` is `openingBalance` plus `charged` less `paid`**, and `charged` is the sum of the `amountOwed` column, so the statement reconciles against its own lines.
|
|
521
|
+
*
|
|
522
|
+
* **Each charge carries `amountOwed` beside `amount`, and the two differ when the charge has concluded.** A charge still outstanding, or one settled by payments on this statement, is owed in full. A charge the broker **cancelled** is owed nothing - it should never have existed, so money paid against it leaves the customer in credit. A charge the broker **wrote off** is owed what was actually paid against it, because a write-off forgives the remainder and never the part that arrived.
|
|
523
|
+
*
|
|
524
|
+
* **Every figure is measured as at `producedAtUtc`.** A charge cancelled or written off after this statement was produced still shows what it was owed at the time, so `status` and `amountOwed` can disagree - and that pair is the record rather than a contradiction. A payment reversed afterwards still stands here for the same reason.
|
|
525
|
+
*/
|
|
526
|
+
get: operations["GetStatement"];
|
|
527
|
+
put?: never;
|
|
528
|
+
post?: never;
|
|
529
|
+
delete?: never;
|
|
530
|
+
options?: never;
|
|
531
|
+
head?: never;
|
|
532
|
+
patch?: never;
|
|
533
|
+
trace?: never;
|
|
534
|
+
};
|
|
535
|
+
"/api/v1/customer/statements": {
|
|
536
|
+
parameters: {
|
|
537
|
+
query?: never;
|
|
538
|
+
header?: never;
|
|
539
|
+
path?: never;
|
|
540
|
+
cookie?: never;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* List the statements of account your broker has produced for you
|
|
544
|
+
* @description PAY-011. Every statement of yours, newest period first, paged by cursor.
|
|
545
|
+
*
|
|
546
|
+
* **You are not named in the request.** There is no customer field and no broker field: the list is whoever is signed in, resolved from the session. Another person's statements are not in it - not filtered out of it, but absent, because a statement that is not yours is not visible to this route at all.
|
|
547
|
+
*
|
|
548
|
+
* Each row says what the statement covers and when it was produced. Its charges, payments and balances are on its own route.
|
|
549
|
+
*
|
|
550
|
+
* **A statement per currency.** A charge carries its own currency and a balance in two of them is not a number, so if you are billed in more than one you have a statement in each.
|
|
551
|
+
*/
|
|
552
|
+
get: operations["ListOwnStatements"];
|
|
553
|
+
put?: never;
|
|
554
|
+
post?: never;
|
|
555
|
+
delete?: never;
|
|
556
|
+
options?: never;
|
|
557
|
+
head?: never;
|
|
558
|
+
patch?: never;
|
|
559
|
+
trace?: never;
|
|
560
|
+
};
|
|
561
|
+
"/api/v1/customer/statements/{id}": {
|
|
562
|
+
parameters: {
|
|
563
|
+
query?: never;
|
|
564
|
+
header?: never;
|
|
565
|
+
path?: never;
|
|
566
|
+
cookie?: never;
|
|
567
|
+
};
|
|
568
|
+
/**
|
|
569
|
+
* Read one of your own statements of account
|
|
570
|
+
* @description PAY-011. What was charged in the period, what you paid, which charge each payment went to, the policies the charges relate to, and what was owed at either end of it.
|
|
571
|
+
*
|
|
572
|
+
* **The balance is worked out from your broker's ledger rather than stored**, and it is measured as at the moment the statement was produced: a charge raised or a payment recorded afterwards is on a later statement, never added to this one. So this answer is the same today as the day it was sent to you.
|
|
573
|
+
*
|
|
574
|
+
* **`closingBalance` is `openingBalance` plus `charged` less `paid`**, and `charged` is the sum of the `amountOwed` column, so you can add the charges up and arrive at the total.
|
|
575
|
+
*
|
|
576
|
+
* **Each charge shows `amountOwed` as well as `amount`.** A charge still owed, or one your payments have settled, is owed in full. A charge your broker **cancelled** is owed nothing, so anything you paid against it counts in your favour. A charge your broker **wrote off** is owed only what you had already paid - the rest was forgiven, and neither of you owes it.
|
|
577
|
+
*
|
|
578
|
+
* A payment that was reversed is listed and does not reduce what is owed, because it happened.
|
|
579
|
+
*
|
|
580
|
+
* A statement that is not yours and one that does not exist are the same answer, because a statement belonging to somebody else is not visible here at all.
|
|
581
|
+
*/
|
|
582
|
+
get: operations["GetOwnStatement"];
|
|
583
|
+
put?: never;
|
|
584
|
+
post?: never;
|
|
585
|
+
delete?: never;
|
|
586
|
+
options?: never;
|
|
587
|
+
head?: never;
|
|
588
|
+
patch?: never;
|
|
589
|
+
trace?: never;
|
|
590
|
+
};
|
|
475
591
|
"/api/v1/insurers": {
|
|
476
592
|
parameters: {
|
|
477
593
|
query?: never;
|
|
@@ -5095,6 +5211,15 @@ export interface components {
|
|
|
5095
5211
|
detail?: null | string;
|
|
5096
5212
|
instance?: null | string;
|
|
5097
5213
|
};
|
|
5214
|
+
ProduceStatementRequest: {
|
|
5215
|
+
/** Format: uuid */
|
|
5216
|
+
customerId: string;
|
|
5217
|
+
currency: string;
|
|
5218
|
+
/** Format: date */
|
|
5219
|
+
periodStart: string;
|
|
5220
|
+
/** Format: date */
|
|
5221
|
+
periodEnd: string;
|
|
5222
|
+
};
|
|
5098
5223
|
ProductCategoryResponse: {
|
|
5099
5224
|
/** Format: uuid */
|
|
5100
5225
|
id: string;
|
|
@@ -5597,6 +5722,78 @@ export interface components {
|
|
|
5597
5722
|
quoteRequestId: null | string;
|
|
5598
5723
|
options: null | components["schemas"]["PresentedOptionRequest"][];
|
|
5599
5724
|
};
|
|
5725
|
+
StatementChargeResponse: {
|
|
5726
|
+
/** Format: uuid */
|
|
5727
|
+
obligationId: string;
|
|
5728
|
+
/** Format: uuid */
|
|
5729
|
+
policyId: string;
|
|
5730
|
+
/** Format: uuid */
|
|
5731
|
+
productId: string;
|
|
5732
|
+
description: string;
|
|
5733
|
+
/** Format: double */
|
|
5734
|
+
amount: number | string;
|
|
5735
|
+
/** Format: double */
|
|
5736
|
+
amountOwed: number | string;
|
|
5737
|
+
/** Format: date */
|
|
5738
|
+
dueOn: string;
|
|
5739
|
+
/** Format: date-time */
|
|
5740
|
+
raisedAtUtc: string;
|
|
5741
|
+
status: string;
|
|
5742
|
+
};
|
|
5743
|
+
StatementPage: {
|
|
5744
|
+
items: components["schemas"]["StatementSummaryResponse"][];
|
|
5745
|
+
nextCursor: null | string;
|
|
5746
|
+
};
|
|
5747
|
+
StatementPaymentResponse: {
|
|
5748
|
+
/** Format: uuid */
|
|
5749
|
+
paymentId: string;
|
|
5750
|
+
/** Format: uuid */
|
|
5751
|
+
obligationId: string;
|
|
5752
|
+
/** Format: double */
|
|
5753
|
+
amount: number | string;
|
|
5754
|
+
source: string;
|
|
5755
|
+
externalReference: string;
|
|
5756
|
+
/** Format: date-time */
|
|
5757
|
+
postedAtUtc: string;
|
|
5758
|
+
isReversed: boolean;
|
|
5759
|
+
};
|
|
5760
|
+
StatementResponse: {
|
|
5761
|
+
/** Format: uuid */
|
|
5762
|
+
id: string;
|
|
5763
|
+
/** Format: uuid */
|
|
5764
|
+
customerId: string;
|
|
5765
|
+
currency: string;
|
|
5766
|
+
/** Format: date */
|
|
5767
|
+
periodStart: string;
|
|
5768
|
+
/** Format: date */
|
|
5769
|
+
periodEnd: string;
|
|
5770
|
+
/** Format: date-time */
|
|
5771
|
+
producedAtUtc: string;
|
|
5772
|
+
/** Format: double */
|
|
5773
|
+
openingBalance: number | string;
|
|
5774
|
+
/** Format: double */
|
|
5775
|
+
charged: number | string;
|
|
5776
|
+
/** Format: double */
|
|
5777
|
+
paid: number | string;
|
|
5778
|
+
/** Format: double */
|
|
5779
|
+
closingBalance: number | string;
|
|
5780
|
+
policyIds: string[];
|
|
5781
|
+
charges: components["schemas"]["StatementChargeResponse"][];
|
|
5782
|
+
payments: components["schemas"]["StatementPaymentResponse"][];
|
|
5783
|
+
};
|
|
5784
|
+
StatementSummaryResponse: {
|
|
5785
|
+
/** Format: uuid */
|
|
5786
|
+
id: string;
|
|
5787
|
+
/** Format: uuid */
|
|
5788
|
+
customerId: string;
|
|
5789
|
+
currency: string;
|
|
5790
|
+
/** Format: date */
|
|
5791
|
+
periodStart: string;
|
|
5792
|
+
/** Format: date */
|
|
5793
|
+
periodEnd: string;
|
|
5794
|
+
/** Format: date-time */
|
|
5795
|
+
producedAtUtc: string;
|
|
5796
|
+
};
|
|
5600
5797
|
SubmissionAttachmentDownloadLinkResponse: {
|
|
5601
5798
|
url: string;
|
|
5602
5799
|
/** Format: date-time */
|
|
@@ -6505,6 +6702,162 @@ export interface operations {
|
|
|
6505
6702
|
};
|
|
6506
6703
|
};
|
|
6507
6704
|
};
|
|
6705
|
+
ListStatements: {
|
|
6706
|
+
parameters: {
|
|
6707
|
+
query?: {
|
|
6708
|
+
customerId?: string;
|
|
6709
|
+
cursor?: string;
|
|
6710
|
+
limit?: number | string;
|
|
6711
|
+
};
|
|
6712
|
+
header?: never;
|
|
6713
|
+
path?: never;
|
|
6714
|
+
cookie?: never;
|
|
6715
|
+
};
|
|
6716
|
+
requestBody?: never;
|
|
6717
|
+
responses: {
|
|
6718
|
+
/** @description OK */
|
|
6719
|
+
200: {
|
|
6720
|
+
headers: {
|
|
6721
|
+
[name: string]: unknown;
|
|
6722
|
+
};
|
|
6723
|
+
content: {
|
|
6724
|
+
"application/json": components["schemas"]["StatementPage"];
|
|
6725
|
+
};
|
|
6726
|
+
};
|
|
6727
|
+
/** @description Bad Request */
|
|
6728
|
+
400: {
|
|
6729
|
+
headers: {
|
|
6730
|
+
[name: string]: unknown;
|
|
6731
|
+
};
|
|
6732
|
+
content: {
|
|
6733
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
6734
|
+
};
|
|
6735
|
+
};
|
|
6736
|
+
};
|
|
6737
|
+
};
|
|
6738
|
+
ProduceStatement: {
|
|
6739
|
+
parameters: {
|
|
6740
|
+
query?: never;
|
|
6741
|
+
header?: never;
|
|
6742
|
+
path?: never;
|
|
6743
|
+
cookie?: never;
|
|
6744
|
+
};
|
|
6745
|
+
requestBody: {
|
|
6746
|
+
content: {
|
|
6747
|
+
"application/json": components["schemas"]["ProduceStatementRequest"];
|
|
6748
|
+
};
|
|
6749
|
+
};
|
|
6750
|
+
responses: {
|
|
6751
|
+
/** @description Created */
|
|
6752
|
+
201: {
|
|
6753
|
+
headers: {
|
|
6754
|
+
[name: string]: unknown;
|
|
6755
|
+
};
|
|
6756
|
+
content: {
|
|
6757
|
+
"application/json": components["schemas"]["StatementResponse"];
|
|
6758
|
+
};
|
|
6759
|
+
};
|
|
6760
|
+
/** @description Bad Request */
|
|
6761
|
+
400: {
|
|
6762
|
+
headers: {
|
|
6763
|
+
[name: string]: unknown;
|
|
6764
|
+
};
|
|
6765
|
+
content: {
|
|
6766
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
6767
|
+
};
|
|
6768
|
+
};
|
|
6769
|
+
};
|
|
6770
|
+
};
|
|
6771
|
+
GetStatement: {
|
|
6772
|
+
parameters: {
|
|
6773
|
+
query?: never;
|
|
6774
|
+
header?: never;
|
|
6775
|
+
path: {
|
|
6776
|
+
id: string;
|
|
6777
|
+
};
|
|
6778
|
+
cookie?: never;
|
|
6779
|
+
};
|
|
6780
|
+
requestBody?: never;
|
|
6781
|
+
responses: {
|
|
6782
|
+
/** @description OK */
|
|
6783
|
+
200: {
|
|
6784
|
+
headers: {
|
|
6785
|
+
[name: string]: unknown;
|
|
6786
|
+
};
|
|
6787
|
+
content: {
|
|
6788
|
+
"application/json": components["schemas"]["StatementResponse"];
|
|
6789
|
+
};
|
|
6790
|
+
};
|
|
6791
|
+
/** @description Not Found */
|
|
6792
|
+
404: {
|
|
6793
|
+
headers: {
|
|
6794
|
+
[name: string]: unknown;
|
|
6795
|
+
};
|
|
6796
|
+
content?: never;
|
|
6797
|
+
};
|
|
6798
|
+
};
|
|
6799
|
+
};
|
|
6800
|
+
ListOwnStatements: {
|
|
6801
|
+
parameters: {
|
|
6802
|
+
query?: {
|
|
6803
|
+
cursor?: string;
|
|
6804
|
+
limit?: number | string;
|
|
6805
|
+
};
|
|
6806
|
+
header?: never;
|
|
6807
|
+
path?: never;
|
|
6808
|
+
cookie?: never;
|
|
6809
|
+
};
|
|
6810
|
+
requestBody?: never;
|
|
6811
|
+
responses: {
|
|
6812
|
+
/** @description OK */
|
|
6813
|
+
200: {
|
|
6814
|
+
headers: {
|
|
6815
|
+
[name: string]: unknown;
|
|
6816
|
+
};
|
|
6817
|
+
content: {
|
|
6818
|
+
"application/json": components["schemas"]["StatementPage"];
|
|
6819
|
+
};
|
|
6820
|
+
};
|
|
6821
|
+
/** @description Bad Request */
|
|
6822
|
+
400: {
|
|
6823
|
+
headers: {
|
|
6824
|
+
[name: string]: unknown;
|
|
6825
|
+
};
|
|
6826
|
+
content: {
|
|
6827
|
+
"application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
|
|
6828
|
+
};
|
|
6829
|
+
};
|
|
6830
|
+
};
|
|
6831
|
+
};
|
|
6832
|
+
GetOwnStatement: {
|
|
6833
|
+
parameters: {
|
|
6834
|
+
query?: never;
|
|
6835
|
+
header?: never;
|
|
6836
|
+
path: {
|
|
6837
|
+
id: string;
|
|
6838
|
+
};
|
|
6839
|
+
cookie?: never;
|
|
6840
|
+
};
|
|
6841
|
+
requestBody?: never;
|
|
6842
|
+
responses: {
|
|
6843
|
+
/** @description OK */
|
|
6844
|
+
200: {
|
|
6845
|
+
headers: {
|
|
6846
|
+
[name: string]: unknown;
|
|
6847
|
+
};
|
|
6848
|
+
content: {
|
|
6849
|
+
"application/json": components["schemas"]["StatementResponse"];
|
|
6850
|
+
};
|
|
6851
|
+
};
|
|
6852
|
+
/** @description Not Found */
|
|
6853
|
+
404: {
|
|
6854
|
+
headers: {
|
|
6855
|
+
[name: string]: unknown;
|
|
6856
|
+
};
|
|
6857
|
+
content?: never;
|
|
6858
|
+
};
|
|
6859
|
+
};
|
|
6860
|
+
};
|
|
6508
6861
|
ListInsurers: {
|
|
6509
6862
|
parameters: {
|
|
6510
6863
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insurance-broker/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.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,
|