Added further types and moved types

This commit is contained in:
Jori Lallo
2017-05-03 22:49:50 -07:00
parent 791bf0a32e
commit fe7b69a4a5
7 changed files with 40 additions and 25 deletions

39
frontend/types/index.js Normal file
View File

@@ -0,0 +1,39 @@
// @flow
export type User = {
avatarUrl: string,
id: string,
name: string,
username: string,
};
export type Collection = {
createdAt: string,
description: ?string,
id: string,
name: string,
type: 'atlas' | 'journal',
updatedAt: string,
url: string,
};
export type Document = {
collaborators: Array<User>,
collection: Collection,
createdAt: string,
createdBy: string,
html: string,
id: string,
private: boolean,
team: string,
text: string,
title: string,
updatedAt: string,
updatedBy: string,
url: string,
};
export type Pagination = {
limit: number,
nextPath: string,
offset: number,
};