mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-27 03:19:51 +00:00
39 lines
730 B
TypeScript
39 lines
730 B
TypeScript
import { ApiStatus } from 'wherehows-web/utils/api';
|
|
|
|
/**
|
|
* Describes the interface for the user json returned
|
|
* from the current user endpoint
|
|
*/
|
|
export interface IUser {
|
|
departmentNum: number;
|
|
email: string;
|
|
id: number;
|
|
name: string;
|
|
userName: string;
|
|
userSetting: null | {
|
|
defaultWatch: string;
|
|
detailDefaultView: string;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Describes the current user endpoint response
|
|
*/
|
|
export interface ICurrentUserResponse {
|
|
user: IUser;
|
|
status: ApiStatus;
|
|
}
|
|
|
|
export interface IAuthenticationData {
|
|
username: string;
|
|
uuid: string;
|
|
}
|
|
|
|
/**
|
|
* Describes the return shape for the authenticate endpoint
|
|
*/
|
|
export interface IAuthenticateResponse {
|
|
data: IAuthenticationData;
|
|
status: ApiStatus;
|
|
}
|