mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 13:05:15 +00:00
Improve auth types
This commit is contained in:
parent
eeeeb352c5
commit
210c7bd692
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user