From 8e6bf990069b9c3ae033321b5aeb4d46fa6501e6 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 7 Dec 2022 09:06:10 -0300 Subject: no-fix: move pagestate provider to app component and move some common hooks to web-utils --- packages/demobank-ui/src/declaration.d.ts | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'packages/demobank-ui/src/declaration.d.ts') 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; +} -- cgit v1.2.3