From 5fb9905d1c3d9e2881cf5461a6fdfe315cbb3f88 Mon Sep 17 00:00:00 2001 From: Jem <0x0xJem@gmail.com> Date: Fri, 18 Oct 2024 12:50:42 +0400 Subject: [PATCH] Update OpenAPI schema --- src/generated/coolerLoans.ts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/generated/coolerLoans.ts b/src/generated/coolerLoans.ts index c2a76cd3d..19d354aa4 100644 --- a/src/generated/coolerLoans.ts +++ b/src/generated/coolerLoans.ts @@ -15,6 +15,14 @@ export type GetSnapshots200 = { records?: Snapshot[]; }; +export type GetSnapshotsOrderBy = (typeof GetSnapshotsOrderBy)[keyof typeof GetSnapshotsOrderBy]; + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const GetSnapshotsOrderBy = { + ASC: "ASC", + DESC: "DESC", +} as const; + export type GetSnapshotsParams = { /** * The start date (YYYY-MM-DD) of the loan period @@ -27,7 +35,7 @@ export type GetSnapshotsParams = { /** * The order in which to return the snapshots. ASC or DESC */ - orderBy?: string; + orderBy?: GetSnapshotsOrderBy; }; /** @@ -108,9 +116,19 @@ export type Snapshot = { clearinghouses: SnapshotClearinghousesItem[]; /** Totals for the Clearinghouses at the time of the snapshot. */ clearinghouseTotals: SnapshotClearinghouseTotals; + /** Quantity of collateral reclaimed on this date. */ + collateralClaimedQuantity: number; + /** USD value of collateral claimed on this date. */ + collateralClaimedValue: number; /** Quantity of collateral deposited across all Coolers */ collateralDeposited: number; - /** Income from collateral reclaimed on this date. */ + /** USD value of the income recognised from claiming the loan's collateral. + +As collateral is returned to the borrower as they repay the loan principal, the collateral at any point in time covers the principal outstanding. + +The income is therefore calculated as: + +collateralValueAtClaim - principalOutstanding */ collateralIncome: number; /** Principal due for each expiry bucket. */ expiryBuckets: SnapshotExpiryBuckets;