From 00416a79f21f0d9b910dcf508a856a45562119d2 Mon Sep 17 00:00:00 2001 From: MS Date: Tue, 27 Oct 2020 16:21:28 +0100 Subject: reword nexus API --- libeufin/api-nexus.rst | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index 1d35a4ff..6d8ecdbe 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -265,23 +265,41 @@ to the real bank. **Request:** + This request can accept two formats, depending on whether a + new bank connection is being made, or a connection backup is + being restored. + + + This type allows the creation of new bank accounts. + .. ts:def:: NewBankConnection + + interface NewBankConnection { + + source: string; // only "new" allowed + + // connection name. + name: string; + + // type of the connection to make: "ebics" for example. + type: string; + + data: BankConnectionNew; + } + + This type allows to restore a previously made bank connection. .. ts:def:: BankConnectionRestoreRequest interface BankConnectionRestoreRequest { - source: "new" | "backup"; - + source: "backup"; + + // connection name. name: string; - type: string; // "ebics" for example. - // Restore a previous connection. Take precedence - // over the 'new' field. - backup?: BankConnectionBackup; + + // Backup data, as typically returned by the "../export-backup" API. + backup: BankConnectionBackup; passphrase?: string; - - // Data to create a fresh bank connection without - // restoring any backup. - data?: BankConnectionNew; } @@ -307,8 +325,7 @@ to the real bank. interface BankConnectionBackup { // The information needed in this type depend entirely - // on which connectionis being restored. - + // on which connection is being restored. } **Response:** -- cgit v1.2.3