diff options
author | Antoine A <> | 2023-10-24 09:38:10 +0000 |
---|---|---|
committer | Antoine A <> | 2023-10-24 09:38:22 +0000 |
commit | 8b37ab93263939c4fadda30753f1809d816cf825 (patch) | |
tree | dd75f51e908aa72c56e4a00eab3e050a2fbe718c /core | |
parent | 357ace656c4275b331274dc8fef054515ddb91cc (diff) | |
download | docs-8b37ab93263939c4fadda30753f1809d816cf825.tar.gz docs-8b37ab93263939c4fadda30753f1809d816cf825.tar.bz2 docs-8b37ab93263939c4fadda30753f1809d816cf825.zip |
Better /monitor response type
Diffstat (limited to 'core')
-rw-r--r-- | core/api-corebank.rst | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/core/api-corebank.rst b/core/api-corebank.rst index 15e91537..e1df169e 100644 --- a/core/api-corebank.rst +++ b/core/api-corebank.rst @@ -1043,35 +1043,57 @@ Monitor factors to serve different views to their users. .. ts:def:: MonitorResponse + + // Union discriminated by the "type" field. + type MonitorResponse = + | MonitorJustPayouts + | MonitorWithCashout; - interface MonitorResponse { + .. ts:def:: MonitorJustPayouts + + // Monitoring stats when conversion is not supported + interface MonitorJustPayouts { + type: "just-payouts"; + + // This number identifies how many payments were made by a + // Taler exchange to a merchant bank account in the internal + // currency, in the timeframe specified in the request. + talerPayoutCount: number; + + // This amount accounts the overall *internal* currency that + // has been paid by a Taler exchange to a merchant internal + // bank account, in the timeframe specified in the request. + talerPayoutInternalVolume: Amount; + } + + .. ts:def:: MonitorWithCashout + + // Monitoring stats when conversion is supported + interface MonitorWithCashout { + type: "with-cashout"; // This number identifies how many cashin operations // took place in the timeframe specified in the request. // This number corresponds to how many withdrawals have // been initiated by a wallet owner. Note: wallet owners // are NOT required to be customers of the libeufin-bank. - // Only present if conversion is supported - cashinCount?: number; + cashinCount: number; // This amount accounts how much external currency has been // spent to withdraw Taler coins in the internal currency. // The exact amount of internal currency being created can be // calculated using the advertised conversion rates. - // Only present if conversion is supported - cashinExternalVolume?: Amount; + cashinExternalVolume: Amount; // This number identifies how many cashout operations were // confirmed in the timeframe speficied in the request. - // Only present if conversion is supported - cashoutCount?: number; + cashoutCount: number; // This amount corresponds to how much *external* currency was // paid by the libeufin-bank administrator to fulfill all the // confirmed cashouts related to the timeframe specified in the // request. - // Only present if conversion is supported - cashoutExternalVolume?: Amount; + cashoutExternalVolume: Amount; // This number identifies how many payments were made by a // Taler exchange to a merchant bank account in the internal |