diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-26 14:20:18 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-26 14:20:18 -0300 |
commit | 03d3cce8274fcbf6fb9cb8be03e867136f196c5d (patch) | |
tree | 4358ce334c9cccf95755271dbdca46f3eb7787d0 /packages/merchant-backoffice-ui/src/declaration.d.ts | |
parent | 982fc51a97389ef8863de806dab496b0fe2102c6 (diff) | |
download | wallet-core-03d3cce8274fcbf6fb9cb8be03e867136f196c5d.tar.gz wallet-core-03d3cce8274fcbf6fb9cb8be03e867136f196c5d.tar.bz2 wallet-core-03d3cce8274fcbf6fb9cb8be03e867136f196c5d.zip |
fix #6363, breaking with merchant backend that accounts implemented
Diffstat (limited to 'packages/merchant-backoffice-ui/src/declaration.d.ts')
-rw-r--r-- | packages/merchant-backoffice-ui/src/declaration.d.ts | 55 |
1 files changed, 48 insertions, 7 deletions
diff --git a/packages/merchant-backoffice-ui/src/declaration.d.ts b/packages/merchant-backoffice-ui/src/declaration.d.ts index b21af32d1..58e14a114 100644 --- a/packages/merchant-backoffice-ui/src/declaration.d.ts +++ b/packages/merchant-backoffice-ui/src/declaration.d.ts @@ -262,15 +262,45 @@ export namespace MerchantBackend { // header. token?: string; } + type FacadeCredentials = NoFacadeCredentials | BasicAuthFacadeCredentials; + + interface NoFacadeCredentials { + type: "none"; + } + + interface BasicAuthFacadeCredentials { + type: "basic"; + + // Username to use to authenticate + username: string; + + // Password to use to authenticate + password: string; + } + + interface MerchantBankAccount { + // The payto:// URI where the wallet will send coins. + payto_uri: string; + + // Optional base URL for a facade where the + // merchant backend can see incoming wire + // transfers to reconcile its accounting + // with that of the exchange. Used by + // taler-merchant-wirewatch. + credit_facade_url?: string; + + // Credentials for accessing the credit facade. + credit_facade_credentials?: FacadeCredentials; + } //POST /private/instances interface InstanceConfigurationMessage { - // The URI where the wallet will send coins. A merchant may have + // Bank accounts of the merchant. A merchant may have // multiple accounts, thus this is an array. Note that by - // removing URIs from this list the respective account is set to + // removing accounts from this list the respective account is set to // inactive and thus unavailable for new contracts, but preserved // in the database as existing offers and contracts may still refer // to it. - payto_uris: string[]; + accounts: MerchantBankAccount[]; // Name of the merchant instance to create (will become $INSTANCE). id: string; @@ -326,10 +356,11 @@ export namespace MerchantBackend { // PATCH /private/instances/$INSTANCE interface InstanceReconfigurationMessage { - // The URI where the wallet will send coins. A merchant may have - // multiple accounts, thus this is an array. Note that by - // removing URIs from this list - payto_uris: string[]; + // Bank accounts of the merchant. A merchant may have + // multiple accounts, thus this is an array. Note that removing + // URIs from this list deactivates the specified accounts + // (they will no longer be used for future contracts). + accounts: MerchantBankAccount[]; // Merchant name corresponding to this instance. name: string; @@ -491,6 +522,16 @@ export namespace MerchantBackend { // salt used to compute h_wire salt: HashCode; + // URL from where the merchant can download information + // about incoming wire transfers to this account. + credit_facade_url?: string; + + // Credentials to use when accessing the credit facade. + // Never returned on a GET (as this may be somewhat + // sensitive data). Can be set in POST + // or PATCH requests to update (or delete) credentials. + credit_facade_credentials?: FacadeCredentials; + // true if this account is active, // false if it is historic. active: boolean; |