aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/libeufin.ts62
1 files changed, 62 insertions, 0 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
index 18972bdd0..1b393c269 100644
--- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
@@ -704,6 +704,25 @@ export class LibeufinCli {
console.log(stdout);
}
+ async newAnastasisFacade(req: NewAnastasisFacadeReq): Promise<void> {
+ const stdout = await sh(
+ this.globalTestState,
+ "libeufin-cli-new-anastasis-facade",
+ `libeufin-cli facades new-anastasis-facade` +
+ ` --currency ${req.currency}` +
+ ` --facade-name ${req.facadeName}` +
+ ` ${req.connectionName} ${req.accountName}`,
+ {
+ ...process.env,
+ LIBEUFIN_NEXUS_URL: this.cliDetails.nexusUrl,
+ LIBEUFIN_NEXUS_USERNAME: this.cliDetails.user.username,
+ LIBEUFIN_NEXUS_PASSWORD: this.cliDetails.user.password,
+ },
+ );
+ console.log(stdout);
+ }
+
+
async newTalerWireGatewayFacade(req: NewTalerWireGatewayReq): Promise<void> {
const stdout = await sh(
this.globalTestState,
@@ -738,6 +757,13 @@ export class LibeufinCli {
}
}
+interface NewAnastasisFacadeReq {
+ facadeName: string;
+ connectionName: string;
+ accountName: string;
+ currency: string;
+}
+
interface NewTalerWireGatewayReq {
facadeName: string;
connectionName: string;
@@ -892,6 +918,15 @@ export interface CreateEbicsBankConnectionRequest {
systemID?: string;
}
+export interface CreateAnastasisFacadeRequest {
+ name: string;
+ connectionName: string;
+ accountName: string;
+ currency: string;
+ reserveTransferLevel: "report" | "statement" | "notification";
+}
+
+
export interface CreateTalerWireGatewayFacadeRequest {
name: string;
connectionName: string;
@@ -1301,6 +1336,33 @@ export namespace LibeufinNexusApi {
});
}
+ export async function createAnastasisFacade(
+ libeufinNexusService: LibeufinNexusServiceInterface,
+ req: CreateAnastasisFacadeRequest,
+ ) {
+ const baseUrl = libeufinNexusService.baseUrl;
+ let url = new URL("facades", baseUrl);
+ await axios.post(
+ url.href,
+ {
+ name: req.name,
+ type: "anastasis",
+ config: {
+ bankAccount: req.accountName,
+ bankConnection: req.connectionName,
+ currency: req.currency,
+ reserveTransferLevel: req.reserveTransferLevel,
+ },
+ },
+ {
+ auth: {
+ username: "admin",
+ password: "test",
+ },
+ },
+ );
+ }
+
export async function createTwgFacade(
libeufinNexusService: LibeufinNexusServiceInterface,
req: CreateTalerWireGatewayFacadeRequest,