aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/declaration.d.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-12-07 09:06:10 -0300
committerSebastian <sebasjm@gmail.com>2022-12-07 16:08:14 -0300
commit8e6bf990069b9c3ae033321b5aeb4d46fa6501e6 (patch)
treefea00d6b97e4d351eadc1e36feeddb4bc9e55816 /packages/demobank-ui/src/declaration.d.ts
parent2dc3eb0ddd7efe4fd63a51a3aa9b36863d9a1fcb (diff)
downloadwallet-core-8e6bf990069b9c3ae033321b5aeb4d46fa6501e6.tar.xz
no-fix: move pagestate provider to app component and move some common hooks to web-utils
Diffstat (limited to 'packages/demobank-ui/src/declaration.d.ts')
-rw-r--r--packages/demobank-ui/src/declaration.d.ts49
1 files changed, 49 insertions, 0 deletions
diff --git a/packages/demobank-ui/src/declaration.d.ts b/packages/demobank-ui/src/declaration.d.ts
index 00b3d41d5..084686bd2 100644
--- a/packages/demobank-ui/src/declaration.d.ts
+++ b/packages/demobank-ui/src/declaration.d.ts
@@ -18,3 +18,52 @@ declare module "jed" {
const x: any;
export = x;
}
+
+/**********************************************
+ * Type definitions for states and API calls. *
+ *********************************************/
+
+/**
+ * Has the information to reach and
+ * authenticate at the bank's backend.
+ */
+interface BackendStateType {
+ url?: string;
+ username?: string;
+ password?: string;
+}
+
+/**
+ * Request body of POST /transactions.
+ *
+ * If the amount appears twice: both as a Payto parameter and
+ * in the JSON dedicate field, the one on the Payto URI takes
+ * precedence.
+ */
+interface TransactionRequestType {
+ paytoUri: string;
+ amount?: string; // with currency.
+}
+
+/**
+ * Request body of /register.
+ */
+interface CredentialsRequestType {
+ username?: string;
+ password?: string;
+ repeatPassword?: string;
+}
+
+/**
+ * Request body of /register.
+ */
+// interface LoginRequestType {
+// username: string;
+// password: string;
+// }
+
+interface WireTransferRequestType {
+ iban?: string;
+ subject?: string;
+ amount?: string;
+}