Anastasis facade tooling.
This commit is contained in:
parent
ec713f04b8
commit
daf9dc507e
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user