scinote-web/flow-typed/types.js

46 lines
821 B
JavaScript
Raw Normal View History

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
export type User = {
id: number,
fullName: string,
initials: string,
email: string,
avatarThumb: string
};
export type Alert = {
message: string,
type: string,
id: number,
timeout: number
};
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,
created_at: string
};
export type State = {
2017-10-18 22:14:45 +08:00
current_team: Teams$Team,
all_teams: Array<Teams$Team>,
current_user: User,
showLeaveTeamModal: boolean,
alerts: Alert
};