2017-05-04 05:49:50 +00:00
|
|
|
// @flow
|
2018-12-05 06:24:30 +00:00
|
|
|
import Document from 'models/Document';
|
2018-09-30 04:24:07 +00:00
|
|
|
|
2018-05-31 19:07:49 +00:00
|
|
|
export type Toast = {
|
2019-01-10 06:41:06 +00:00
|
|
|
id: string,
|
|
|
|
createdAt: string,
|
2018-05-31 19:07:49 +00:00
|
|
|
message: string,
|
|
|
|
type: 'warning' | 'error' | 'info' | 'success',
|
2019-04-18 02:11:23 +00:00
|
|
|
timeout?: number,
|
|
|
|
action?: {
|
|
|
|
text: string,
|
|
|
|
onClick: () => void,
|
|
|
|
},
|
2018-05-31 19:07:49 +00:00
|
|
|
};
|
|
|
|
|
2018-12-05 06:24:30 +00:00
|
|
|
export type FetchOptions = {
|
|
|
|
prefetch?: boolean,
|
|
|
|
revisionId?: string,
|
|
|
|
shareId?: string,
|
|
|
|
force?: boolean,
|
2017-05-12 00:23:56 +00:00
|
|
|
};
|
|
|
|
|
2017-05-13 22:36:06 +00:00
|
|
|
export type NavigationNode = {
|
|
|
|
id: string,
|
|
|
|
title: string,
|
|
|
|
url: string,
|
2018-07-01 02:19:37 +00:00
|
|
|
children: NavigationNode[],
|
2017-05-13 22:36:06 +00:00
|
|
|
};
|
|
|
|
|
2017-12-04 00:50:50 +00:00
|
|
|
// Pagination response in an API call
|
2017-05-04 05:49:50 +00:00
|
|
|
export type Pagination = {
|
|
|
|
limit: number,
|
|
|
|
nextPath: string,
|
|
|
|
offset: number,
|
|
|
|
};
|
2017-05-12 00:23:56 +00:00
|
|
|
|
2017-12-04 00:50:50 +00:00
|
|
|
// Pagination request params
|
|
|
|
export type PaginationParams = {
|
|
|
|
limit?: number,
|
|
|
|
offset?: number,
|
|
|
|
sort?: string,
|
|
|
|
direction?: 'ASC' | 'DESC',
|
|
|
|
};
|
|
|
|
|
2018-08-05 01:32:56 +00:00
|
|
|
export type SearchResult = {
|
|
|
|
ranking: number,
|
|
|
|
context: string,
|
|
|
|
document: Document,
|
|
|
|
};
|