summaryrefslogtreecommitdiffstats
path: root/ui/src/interfaces.ts
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-04-23 15:05:50 -0700
committerDessalines <tyhou13@gmx.com>2019-04-23 15:05:50 -0700
commit7cba618587db4a825f71e6d8f867fbc27ede491e (patch)
tree111202d1a63fc9524ae1e15aaaa7cd153f5bae41 /ui/src/interfaces.ts
parentee60e25bc41a1c7f42fbf9c90fbe52579c663149 (diff)
Adding a search page
- Fixes # 70
Diffstat (limited to 'ui/src/interfaces.ts')
-rw-r--r--ui/src/interfaces.ts21
1 files changed, 20 insertions, 1 deletions
diff --git a/ui/src/interfaces.ts b/ui/src/interfaces.ts
index ec111719..05987fe3 100644
--- a/ui/src/interfaces.ts
+++ b/ui/src/interfaces.ts
@@ -1,5 +1,5 @@
export enum UserOperation {
- Login, Register, CreateCommunity, CreatePost, ListCommunities, ListCategories, GetPost, GetCommunity, CreateComment, EditComment, SaveComment, CreateCommentLike, GetPosts, CreatePostLike, EditPost, SavePost, EditCommunity, FollowCommunity, GetFollowedCommunities, GetUserDetails, GetReplies, GetModlog, BanFromCommunity, AddModToCommunity, CreateSite, EditSite, GetSite, AddAdmin, BanUser
+ Login, Register, CreateCommunity, CreatePost, ListCommunities, ListCategories, GetPost, GetCommunity, CreateComment, EditComment, SaveComment, CreateCommentLike, GetPosts, CreatePostLike, EditPost, SavePost, EditCommunity, FollowCommunity, GetFollowedCommunities, GetUserDetails, GetReplies, GetModlog, BanFromCommunity, AddModToCommunity, CreateSite, EditSite, GetSite, AddAdmin, BanUser, Search
}
export enum CommentSortType {
@@ -14,6 +14,10 @@ export enum SortType {
Hot, New, TopDay, TopWeek, TopMonth, TopYear, TopAll
}
+export enum SearchType {
+ Both, Comments, Posts
+}
+
export interface User {
id: number;
iss: string;
@@ -517,3 +521,18 @@ export interface AddAdminResponse {
op: string;
admins: Array<UserView>;
}
+
+export interface SearchForm {
+ q: string;
+ type_: string;
+ community_id?: number;
+ sort: string;
+ page?: number;
+ limit?: number;
+}
+
+export interface SearchResponse {
+ op: string;
+ posts?: Array<Post>;
+ comments?: Array<Comment>;
+}