gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] branch master updated: Nexus API.


From: gnunet
Subject: [taler-docs] branch master updated: Nexus API.
Date: Sun, 19 Mar 2023 08:41:56 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository docs.

The following commit(s) were added to refs/heads/master by this push:
     new 1e9f24b  Nexus API.
1e9f24b is described below

commit 1e9f24b787371a79d629ae6cf7a685e7b169056c
Author: ms <ms@taler.net>
AuthorDate: Sun Mar 19 08:40:36 2023 +0100

    Nexus API.
    
    Connection types examples.
---
 libeufin/api-common.rst | 15 ++++++++++
 libeufin/api-nexus.rst  | 77 ++++++++++++++++++++++++-------------------------
 2 files changed, 53 insertions(+), 39 deletions(-)

diff --git a/libeufin/api-common.rst b/libeufin/api-common.rst
index 7ec1f09..58ae7e3 100644
--- a/libeufin/api-common.rst
+++ b/libeufin/api-common.rst
@@ -39,6 +39,21 @@ Amounts have the ``$currency:X.Y`` format, where the
 fractional part is optional and may contain at most two
 digits.
 
+Permissions
+^^^^^^^^^^^
+
+This type epresses which permissions for a subject
+apply on a resource.
+
+.. ts:def:: LibeufinPermission
+
+  interface LibeufinPermission {
+    subjectType: string;
+    subjectId: string;
+    resourceType: string;
+    resourceId: string;
+    permissionName: string
+  }
 Fetch params
 ^^^^^^^^^^^^
 
diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst
index e2cb1f1..a052a35 100644
--- a/libeufin/api-nexus.rst
+++ b/libeufin/api-nexus.rst
@@ -160,13 +160,7 @@ The following resource IDs are currently supported:
   .. ts:def:: QueryPermissionsResponse
 
      interface QueryPermissionsResponse {
-       permissions: {
-         subjectType: string;
-         subjectId: string;
-         resourceType: string;
-         resourceId: string;
-         permissionName: string
-       }[];
+       permissions: LibeufinPermission[];
      }
 
 .. http:post:: {nexusbase}/permissions
@@ -179,13 +173,7 @@ The following resource IDs are currently supported:
 
      interface QueryPermissionsResponse {
        action: "grant" | "revoke";
-       permission: {
-         subjectType: string;
-         subjectId: string;
-         resourceType: string;
-         resourceId: string;
-         permissionName: string
-       };
+       permission: LibeufinPermission;
      }
 
    **Response**
@@ -570,8 +558,7 @@ Scheduling API
 Bank Connections
 ----------------
 
-Bank connections connect the local LibEuFin bank account
-to the real bank.
+Bank connections connect the local Nexus bank account to the bank.
 
 .. http:post:: <nexus>/bank-connections
 
@@ -586,6 +573,8 @@ to the real bank.
 
   This type allows the creation of new bank accounts.
 
+  .. _new-conn:
+
   .. ts:def:: NewBankConnection
 
      interface NewBankConnection {
@@ -598,51 +587,61 @@ to the real bank.
        // type of the connection to make: "ebics" for example.
        type: string;
 
-       data: BankConnectionNew;
+       // Strictly dependent from the connection type.
+       data: any;
      }
 
   This type allows to restore a previously made bank connection.
 
-  .. ts:def:: BankConnectionRestoreRequest
+  .. _restore-conn:
+
+  .. ts:def:: BankConnectionRestore
 
-     interface BankConnectionRestoreRequest {
+     interface BankConnectionRestore {
 
        source: "backup";
 
        // connection name.
        name: string;
 
-       // Backup data, as typically returned by the "../export-backup" API.
-       backup: BankConnectionBackup;
+       // Backup data, as typically returned by the
+       // "../export-backup" API.
+       backup: any;
 
        passphrase?: string;
      }
 
+  The following examples show the EBICS types for creating and
+  restoring a connection.
 
-  .. ts:def:: BankConnectionNew
-
-     interface BankConnectionNew {
-
-       // This type is strictly dependent on
-       // the connection being created.  For Ebics,
-       // it will contain the required fields (as strings):
-       // 'ebicsURL', 'userID', 'partnerID', 'hostID', and
-       // the optional 'systemID'.
+  This type is found in the ``data`` field of `NewBankConnection <new-conn_>`_.
 
-       // Other connection types, like 'local' (used for testing
-       // purposes skipping any interaction with the bank service)
-       // and 'fints' are all work in progress!
+  .. ts:def:: EbicsNewConnection
 
-     }
+    interface EbicsNewConnection {
+      userID: string,
+      partnerID: string,
+      hostID: string,
+      ebicsURL: string,
+      systemID?: string
+    }
 
+  This type is found in the ``backup`` field of `BankConnectionRestore 
<restore-conn_>`_.
 
-  .. ts:def:: BankConnectionBackup
+  .. ts:def:: EbicsBackup
 
-     interface BankConnectionBackup {
+    interface EbicsBackup {
+      type: string, // constant to "ebics"
+      userID: string,
+      partnerID: string,
+      hostID: string,
+      ebicsURL: string,
 
-       // The information needed in this type depend entirely
-       // on which connection is being restored.
-     }
+      // The following three values are the EBICS private keys.
+      authBlob: string,
+      encBlob: string,
+      sigBlob: string
+    }
 
   **Response:**
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]