Improve auth types

This commit is contained in:
Matthias 2022-12-10 08:19:26 +01:00
parent eeeeb352c5
commit 210c7bd692

View File

@ -1,3 +1,6 @@
/**
* Payload the user enters, which is required for login.
*/
export interface AuthPayload { export interface AuthPayload {
botName: string; botName: string;
url: string; url: string;
@ -5,11 +8,13 @@ export interface AuthPayload {
password: string; password: string;
} }
/** Response from the API */
export interface AuthResponse { export interface AuthResponse {
access_token?: string; access_token?: string;
refresh_token?: string; refresh_token?: string;
} }
/** Stored Authentication */
export interface AuthStorage { export interface AuthStorage {
botName: string; botName: string;
apiUrl: string; apiUrl: string;
@ -19,6 +24,7 @@ export interface AuthStorage {
autoRefresh: boolean; autoRefresh: boolean;
} }
/** Auth Storage container */
export interface AuthStorageMulti { export interface AuthStorageMulti {
[key: string]: AuthStorage; [key: string]: AuthStorage;
} }