scinote-web/flow-typed/types.js
2017-12-28 15:13:39 +01:00

48 lines
857 B
JavaScript

// @flow
import type { Teams$Team } from "flow-typed";
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>;
export type Activity = {
id: number,
message: string,
created_at: string,
project?: string,
task?: string
};
export type State = {
current_team: Teams$Team,
all_teams: Array<Teams$Team>,
current_user: User,
showLeaveTeamModal: boolean,
alerts: Alert
};