2017-09-10 19:31:54 -07:00
|
|
|
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;
|
2017-09-20 14:25:27 -07:00
|
|
|
userSetting: null | {
|
2017-09-10 19:31:54 -07:00
|
|
|
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;
|
|
|
|
}
|