summaryrefslogtreecommitdiff
path: root/libeufin
diff options
context:
space:
mode:
authorms <ms@taler.net>2023-03-19 08:40:36 +0100
committerms <ms@taler.net>2023-03-19 08:40:36 +0100
commit1e9f24b787371a79d629ae6cf7a685e7b169056c (patch)
tree2ae0c00dccfc75b55c555e544119774b351f9f55 /libeufin
parent119ca9b47895f41750bfaebf27f3a5cfbd387f6a (diff)
downloaddocs-1e9f24b787371a79d629ae6cf7a685e7b169056c.tar.gz
docs-1e9f24b787371a79d629ae6cf7a685e7b169056c.tar.bz2
docs-1e9f24b787371a79d629ae6cf7a685e7b169056c.zip
Nexus API.
Connection types examples.
Diffstat (limited to 'libeufin')
-rw-r--r--libeufin/api-common.rst15
-rw-r--r--libeufin/api-nexus.rst77
2 files changed, 53 insertions, 39 deletions
diff --git a/libeufin/api-common.rst b/libeufin/api-common.rst
index 7ec1f09c..58ae7e37 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 e2cb1f1f..a052a35e 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:**