1 export enum UserOperation {
20 GetFollowedCommunities,
39 export enum CommentSortType {
45 export enum ListingType {
51 export enum SortType {
61 export enum SearchType {
70 export interface User {
78 export interface UserView {
83 number_of_posts: number;
85 number_of_comments: number;
86 comment_score: number;
90 export interface CommunityUser {
95 community_name: string;
99 export interface Community {
103 description?: string;
111 creator_name: string;
112 category_name: string;
113 number_of_subscribers: number;
114 number_of_posts: number;
115 number_of_comments: number;
117 subscribed?: boolean;
120 export interface Post {
126 community_id: number;
133 banned_from_community: boolean;
136 creator_name: string;
137 community_name: string;
138 community_removed: boolean;
139 community_deleted: boolean;
140 community_nsfw: boolean;
141 number_of_comments: number;
148 subscribed?: boolean;
153 export interface Comment {
164 community_id: number;
166 banned_from_community: boolean;
167 creator_name: string;
176 export interface Category {
181 export interface Site {
184 description?: string;
188 creator_name: string;
189 number_of_users: number;
190 number_of_posts: number;
191 number_of_comments: number;
192 number_of_communities: number;
195 export enum BanType {
200 export interface FollowCommunityForm {
201 community_id: number;
206 export interface GetFollowedCommunitiesResponse {
208 communities: Array<CommunityUser>;
211 export interface GetUserDetailsForm {
217 community_id?: number;
221 export interface UserDetailsResponse {
224 follows: Array<CommunityUser>;
225 moderates: Array<CommunityUser>;
226 comments: Array<Comment>;
228 admins: Array<UserView>;
231 export interface GetRepliesForm {
232 sort: string; // TODO figure this one out
235 unread_only: boolean;
239 export interface GetRepliesResponse {
241 replies: Array<Comment>;
244 export interface BanFromCommunityForm {
245 community_id: number;
253 export interface BanFromCommunityResponse {
259 export interface AddModToCommunityForm {
260 community_id: number;
266 export interface TransferCommunityForm {
267 community_id: number;
272 export interface TransferSiteForm {
277 export interface AddModToCommunityResponse {
279 moderators: Array<CommunityUser>;
282 export interface GetModlogForm {
283 mod_user_id?: number;
284 community_id?: number;
289 export interface GetModlogResponse {
291 removed_posts: Array<ModRemovePost>;
292 locked_posts: Array<ModLockPost>;
293 stickied_posts: Array<ModStickyPost>;
294 removed_comments: Array<ModRemoveComment>;
295 removed_communities: Array<ModRemoveCommunity>;
296 banned_from_community: Array<ModBanFromCommunity>;
297 banned: Array<ModBan>;
298 added_to_community: Array<ModAddCommunity>;
299 added: Array<ModAdd>;
302 export interface ModRemovePost {
309 mod_user_name: string;
311 community_id: number;
312 community_name: string;
315 export interface ModLockPost {
321 mod_user_name: string;
323 community_id: number;
324 community_name: string;
327 export interface ModStickyPost {
333 mod_user_name: string;
335 community_id: number;
336 community_name: string;
339 export interface ModRemoveComment {
346 mod_user_name: string;
347 comment_user_id: number;
348 comment_user_name: string;
349 comment_content: string;
352 community_id: number;
353 community_name: string;
356 export interface ModRemoveCommunity {
359 community_id: number;
364 mod_user_name: string;
365 community_name: string;
368 export interface ModBanFromCommunity {
371 other_user_id: number;
372 community_id: number;
377 mod_user_name: string;
378 other_user_name: string;
379 community_name: string;
382 export interface ModBan {
385 other_user_id: number;
390 mod_user_name: string;
391 other_user_name: string;
394 export interface ModAddCommunity {
397 other_user_id: number;
398 community_id: number;
401 mod_user_name: string;
402 other_user_name: string;
403 community_name: string;
406 export interface ModAdd {
409 other_user_id: number;
412 mod_user_name: string;
413 other_user_name: string;
416 export interface LoginForm {
417 username_or_email: string;
421 export interface RegisterForm {
425 password_verify: string;
430 export interface LoginResponse {
435 export interface UserSettingsForm {
441 export interface CommunityForm {
444 description?: string;
455 export interface GetCommunityResponse {
457 community: Community;
458 moderators: Array<CommunityUser>;
459 admins: Array<UserView>;
462 export interface CommunityResponse {
464 community: Community;
467 export interface ListCommunitiesForm {
474 export interface ListCommunitiesResponse {
476 communities: Array<Community>;
479 export interface ListCategoriesResponse {
481 categories: Array<Category>;
484 export interface PostForm {
488 community_id: number;
501 export interface PostFormParams {
508 export interface GetPostResponse {
511 comments: Array<Comment>;
512 community: Community;
513 moderators: Array<CommunityUser>;
514 admins: Array<UserView>;
517 export interface SavePostForm {
523 export interface PostResponse {
528 export interface CommentForm {
541 export interface SaveCommentForm {
547 export interface CommentResponse {
552 export interface CommentLikeForm {
559 export interface CommentNode {
561 children?: Array<CommentNode>;
564 export interface GetPostsForm {
569 community_id?: number;
573 export interface GetPostsResponse {
578 export interface CreatePostLikeForm {
584 export interface CreatePostLikeResponse {
589 export interface SiteForm {
591 description?: string;
598 export interface GetSiteResponse {
601 admins: Array<UserView>;
602 banned: Array<UserView>;
606 export interface SiteResponse {
611 export interface BanUserForm {
619 export interface BanUserResponse {
625 export interface AddAdminForm {
631 export interface AddAdminResponse {
633 admins: Array<UserView>;
636 export interface SearchForm {
639 community_id?: number;
645 export interface SearchResponse {
649 comments?: Array<Comment>;
650 communities: Array<Community>;
651 users: Array<UserView>;
654 export interface DeleteAccountForm {