2017-10-04 17:35:32 +08:00
|
|
|
// @flow
|
2017-10-18 22:14:45 +08:00
|
|
|
import type { Teams$Team } from "flow-typed";
|
2017-10-04 17:35:32 +08:00
|
|
|
|
2017-10-18 19:59:52 +08:00
|
|
|
export type User = {
|
|
|
|
id: number,
|
|
|
|
fullName: string,
|
|
|
|
initials: string,
|
|
|
|
email: string,
|
|
|
|
avatarThumb: string
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Alert = {
|
|
|
|
message: string,
|
|
|
|
type: string,
|
|
|
|
id: number,
|
|
|
|
timeout: number
|
|
|
|
};
|
|
|
|
|
2017-10-30 21:13:36 +08:00
|
|
|
export type ValidationErrorSimple = {|
|
|
|
|
message: string
|
|
|
|
|};
|
|
|
|
|
|
|
|
export type ValidationErrorIntl = {|
|
|
|
|
intl: boolean,
|
|
|
|
messageId: string,
|
|
|
|
values: string
|
|
|
|
|};
|
|
|
|
|
|
|
|
export type ValidationError = ValidationErrorSimple | ValidationErrorIntl;
|
|
|
|
|
|
|
|
export type ValidationErrors = string | Array<string> | Array<ValidationError>;
|
|
|
|
|
2017-10-04 17:35:32 +08:00
|
|
|
export type Activity = {
|
2017-12-14 15:08:08 +08:00
|
|
|
id?: number,
|
2017-10-04 17:35:32 +08:00
|
|
|
message: string,
|
2017-10-18 19:59:52 +08:00
|
|
|
created_at: string
|
|
|
|
};
|
|
|
|
|
|
|
|
export type State = {
|
2017-10-18 22:14:45 +08:00
|
|
|
current_team: Teams$Team,
|
|
|
|
all_teams: Array<Teams$Team>,
|
2017-10-18 19:59:52 +08:00
|
|
|
current_user: User,
|
|
|
|
showLeaveTeamModal: boolean,
|
|
|
|
alerts: Alert
|
|
|
|
};
|