taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 8b37ab93263939c4fadda30753f1809d816cf825
parent 357ace656c4275b331274dc8fef054515ddb91cc
Author: Antoine A <>
Date:   Tue, 24 Oct 2023 09:38:10 +0000

Better /monitor response type

Diffstat:
Mcore/api-corebank.rst | 40+++++++++++++++++++++++++++++++---------
1 file changed, 31 insertions(+), 9 deletions(-)

diff --git 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