@insurance-broker/api-client 1.47.0 → 1.48.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.
Files changed (2) hide show
  1. package/dist/schema.d.ts +167 -0
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -628,6 +628,66 @@ export interface paths {
628
628
  patch?: never;
629
629
  trace?: never;
630
630
  };
631
+ "/api/v1/customer/charges": {
632
+ parameters: {
633
+ query?: never;
634
+ header?: never;
635
+ path?: never;
636
+ cookie?: never;
637
+ };
638
+ /**
639
+ * See what you owe, and what you have already covered
640
+ * @description PAY-002, PAY-005. Every charge your broker has raised against your policies, oldest due date first, paged by cursor.
641
+ *
642
+ * **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 charges are not in it - not filtered out of it, but absent.
643
+ *
644
+ * **This is a live position, not a statement.** Nothing here was produced for you in advance: the figures and the state on each row are worked out as this answer is written, so it can change between one request and the next. A statement is the other thing - a document your broker produced deliberately, for a period, fixed at the moment they produced it - and it is on `/api/v1/customer/statements`.
645
+ *
646
+ * **`state` is one of `due`, `overdue`, `paid` and `closed`**, and nothing stores it. A charge is `overdue` when its due date is before the day this page was measured against and something is still owed on it; that day is returned as `asOf`, so you can bucket the page against your own clock without asking again. `closed` means the charge has finished and nothing further is owed on it.
647
+ *
648
+ * **One walk is measured against one day.** `asOf` is read from the clock on the first page and carried inside the cursor, so a walk crossing UTC midnight stays consistent. A walk resumed the next morning therefore serves the previous day's buckets: compare `asOf` with your own clock and start a new walk without a cursor.
649
+ *
650
+ * **`balance` is not always `amount` less `paid`.** 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 had already arrived, because the rest was forgiven. The same rule your statement uses, so the two cannot disagree.
651
+ *
652
+ * **There is no total.** What you owe overall is a sum across a whole book and across currencies, which is what a statement is for.
653
+ */
654
+ get: operations["ListOwnCharges"];
655
+ put?: never;
656
+ post?: never;
657
+ delete?: never;
658
+ options?: never;
659
+ head?: never;
660
+ patch?: never;
661
+ trace?: never;
662
+ };
663
+ "/api/v1/customer/payments": {
664
+ parameters: {
665
+ query?: never;
666
+ header?: never;
667
+ path?: never;
668
+ cookie?: never;
669
+ };
670
+ /**
671
+ * See the payments your broker has recorded from you
672
+ * @description PAY-005. Every payment recorded against your charges, most recently recorded first, paged by cursor.
673
+ *
674
+ * **Recorded, not taken.** This platform does not collect money: a payment here is your broker writing down that money reached them somewhere else - a bank, a mobile-money service, a counter - with the reference it arrived under. **There is no route here that pays anything**, deliberately.
675
+ *
676
+ * **`state` is `received` or `returned`.** `received` means your broker has recorded the money and it counts against what you owe. `returned` means a reversal was recorded afterwards - the money did not arrive after all, or went back - so it no longer counts. A returned payment stays on this list rather than disappearing from it, because it happened.
677
+ *
678
+ * **No `asOf`**, unlike the charges list: a payment was recorded at an instant this row holds, and nothing about this list moves at midnight.
679
+ *
680
+ * **Each payment names the one charge it was recorded against**, and the policy that charge is owed under.
681
+ */
682
+ get: operations["ListOwnPayments"];
683
+ put?: never;
684
+ post?: never;
685
+ delete?: never;
686
+ options?: never;
687
+ head?: never;
688
+ patch?: never;
689
+ trace?: never;
690
+ };
631
691
  "/api/v1/exports/obligations": {
632
692
  parameters: {
633
693
  query?: never;
@@ -5307,6 +5367,29 @@ export interface components {
5307
5367
  issuedBySubjectId: string;
5308
5368
  lines: components["schemas"]["CreditNoteLineResponse"][];
5309
5369
  };
5370
+ CustomerChargePageResponse: {
5371
+ items: components["schemas"]["CustomerChargeResponse"][];
5372
+ nextCursor: null | string;
5373
+ /** Format: date */
5374
+ asOf: string;
5375
+ };
5376
+ CustomerChargeResponse: {
5377
+ /** Format: uuid */
5378
+ id: string;
5379
+ /** Format: uuid */
5380
+ policyId: string;
5381
+ /** Format: double */
5382
+ amount: number | string;
5383
+ /** Format: double */
5384
+ paid: number | string;
5385
+ /** Format: double */
5386
+ balance: number | string;
5387
+ currency: string;
5388
+ /** Format: date */
5389
+ dueOn: string;
5390
+ description: string;
5391
+ state: string;
5392
+ };
5310
5393
  CustomerClaimPage: {
5311
5394
  items: components["schemas"]["ClaimResponse"][];
5312
5395
  nextCursor: null | string;
@@ -5340,6 +5423,26 @@ export interface components {
5340
5423
  /** Format: date-time */
5341
5424
  revokedAtUtc: null | string;
5342
5425
  };
5426
+ CustomerPaymentPageResponse: {
5427
+ items: components["schemas"]["CustomerPaymentResponse"][];
5428
+ nextCursor: null | string;
5429
+ };
5430
+ CustomerPaymentResponse: {
5431
+ /** Format: uuid */
5432
+ id: string;
5433
+ /** Format: uuid */
5434
+ chargeId: string;
5435
+ /** Format: uuid */
5436
+ policyId: string;
5437
+ /** Format: double */
5438
+ amount: number | string;
5439
+ currency: string;
5440
+ source: string;
5441
+ externalReference: string;
5442
+ /** Format: date-time */
5443
+ recordedAtUtc: string;
5444
+ state: string;
5445
+ };
5343
5446
  CustomerPresentedQuoteResponse: {
5344
5447
  /** Format: uuid */
5345
5448
  presentationVersionId: string;
@@ -8411,6 +8514,70 @@ export interface operations {
8411
8514
  };
8412
8515
  };
8413
8516
  };
8517
+ ListOwnCharges: {
8518
+ parameters: {
8519
+ query?: {
8520
+ cursor?: string;
8521
+ limit?: number | string;
8522
+ };
8523
+ header?: never;
8524
+ path?: never;
8525
+ cookie?: never;
8526
+ };
8527
+ requestBody?: never;
8528
+ responses: {
8529
+ /** @description OK */
8530
+ 200: {
8531
+ headers: {
8532
+ [name: string]: unknown;
8533
+ };
8534
+ content: {
8535
+ "application/json": components["schemas"]["CustomerChargePageResponse"];
8536
+ };
8537
+ };
8538
+ /** @description Bad Request */
8539
+ 400: {
8540
+ headers: {
8541
+ [name: string]: unknown;
8542
+ };
8543
+ content: {
8544
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
8545
+ };
8546
+ };
8547
+ };
8548
+ };
8549
+ ListOwnPayments: {
8550
+ parameters: {
8551
+ query?: {
8552
+ cursor?: string;
8553
+ limit?: number | string;
8554
+ };
8555
+ header?: never;
8556
+ path?: never;
8557
+ cookie?: never;
8558
+ };
8559
+ requestBody?: never;
8560
+ responses: {
8561
+ /** @description OK */
8562
+ 200: {
8563
+ headers: {
8564
+ [name: string]: unknown;
8565
+ };
8566
+ content: {
8567
+ "application/json": components["schemas"]["CustomerPaymentPageResponse"];
8568
+ };
8569
+ };
8570
+ /** @description Bad Request */
8571
+ 400: {
8572
+ headers: {
8573
+ [name: string]: unknown;
8574
+ };
8575
+ content: {
8576
+ "application/problem+json": components["schemas"]["HttpValidationProblemDetails"];
8577
+ };
8578
+ };
8579
+ };
8580
+ };
8414
8581
  ExportObligations: {
8415
8582
  parameters: {
8416
8583
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "1.47.0",
3
+ "version": "1.48.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,