scinote-web/flow-typed/types.js

58 lines
1,019 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 = {
2018-01-06 00:08:00 +08:00
id: number,
2017-10-04 17:35:32 +08:00
message: string,
2017-12-14 21:02:40 +08:00
createdAt: string,
timezone: string,
2018-01-05 16:59:08 +08:00
project: string,
task: string
};
export type Notification = {
id: number,
title: string,
message: string,
typeOf: string,
createdAt: string,
avatarThumb: ?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
};