This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/app/types/index.js

61 lines
1.1 KiB
JavaScript
Raw Normal View History

2017-05-04 05:49:50 +00:00
// @flow
import { type Location } from "react-router-dom";
2020-11-09 08:01:50 +00:00
import theme from "shared/styles/theme";
import Document from "models/Document";
2020-11-09 08:01:50 +00:00
export type Theme = typeof theme;
export type LocationWithState = Location & {
state: {
[key: string]: string,
},
};
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",
timeout?: number,
reoccurring?: number,
action?: {
text: string,
onClick: () => void,
},
|};
2018-05-31 19:07:49 +00:00
export type FetchOptions = {
prefetch?: boolean,
revisionId?: string,
shareId?: string,
force?: boolean,
2017-05-12 00:23:56 +00:00
};
export type NavigationNode = {|
id: string,
title: string,
url: string,
2018-07-01 02:19:37 +00:00
children: NavigationNode[],
|};
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 = {|
2017-12-04 00:50:50 +00:00
limit?: number,
offset?: number,
sort?: string,
direction?: "ASC" | "DESC",
|};
2017-12-04 00:50:50 +00:00
export type SearchResult = {
ranking: number,
context: string,
document: Document,
};