aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/merchant-api-types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-util/src/merchant-api-types.ts')
-rw-r--r--packages/taler-util/src/merchant-api-types.ts35
1 files changed, 35 insertions, 0 deletions
diff --git a/packages/taler-util/src/merchant-api-types.ts b/packages/taler-util/src/merchant-api-types.ts
index 9f00173f2..ce30aa054 100644
--- a/packages/taler-util/src/merchant-api-types.ts
+++ b/packages/taler-util/src/merchant-api-types.ts
@@ -47,6 +47,7 @@ import {
WireAccount,
codecForWireAccount,
codecForList,
+ HashCodeString,
} from "@gnu-taler/taler-util";
export interface MerchantPostOrderRequest {
@@ -384,3 +385,37 @@ export const codecForMerchantReserveCreateConfirmation =
.property("accounts", codecForList(codecForWireAccount()))
.property("reserve_pub", codecForString())
.build("MerchantReserveCreateConfirmation");
+
+export interface AccountAddDetails {
+ // payto:// URI of the account.
+ payto_uri: string;
+
+ // 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.
+ // To really delete credentials, set them to the type: "none".
+ credit_facade_credentials?: FacadeCredentials;
+}
+
+export type FacadeCredentials =
+ | NoFacadeCredentials
+ | BasicAuthFacadeCredentials;
+
+export interface NoFacadeCredentials {
+ type: "none";
+}
+
+export interface BasicAuthFacadeCredentials {
+ type: "basic";
+
+ // Username to use to authenticate
+ username: string;
+
+ // Password to use to authenticate
+ password: string;
+}