1 export enum UserOperation {
20 GetFollowedCommunities,
43 export enum CommentSortType {
49 export enum ListingType {
55 export enum SortType {
65 export enum SearchType {
74 export interface User {
80 default_sort_type: SortType;
81 default_listing_type: ListingType;
86 export interface UserView {
93 number_of_posts: number;
95 number_of_comments: number;
96 comment_score: number;
100 export interface CommunityUser {
105 community_id: number;
106 community_name: string;
110 export interface Community {
114 description?: string;
122 creator_name: string;
123 creator_avatar?: string;
124 category_name: string;
125 number_of_subscribers: number;
126 number_of_posts: number;
127 number_of_comments: number;
129 subscribed?: boolean;
132 export interface Post {
138 community_id: number;
145 banned_from_community: boolean;
148 creator_name: string;
149 creator_avatar?: string;
150 community_name: string;
151 community_removed: boolean;
152 community_deleted: boolean;
153 community_nsfw: boolean;
154 number_of_comments: number;
161 subscribed?: boolean;
166 export interface Comment {
177 community_id: number;
179 banned_from_community: boolean;
180 creator_name: string;
181 creator_avatar?: string;
188 user_mention_id?: number; // For mention type
189 recipient_id?: number;
192 export interface Category {
197 export interface Site {
200 description?: string;
204 creator_name: string;
205 number_of_users: number;
206 number_of_posts: number;
207 number_of_comments: number;
208 number_of_communities: number;
209 enable_downvotes: boolean;
210 open_registration: boolean;
211 enable_nsfw: boolean;
214 export enum BanType {
219 export interface FollowCommunityForm {
220 community_id: number;
225 export interface GetFollowedCommunitiesResponse {
227 communities: Array<CommunityUser>;
230 export interface GetUserDetailsForm {
236 community_id?: number;
240 export interface UserDetailsResponse {
243 follows: Array<CommunityUser>;
244 moderates: Array<CommunityUser>;
245 comments: Array<Comment>;
247 admins: Array<UserView>;
250 export interface GetRepliesForm {
254 unread_only: boolean;
258 export interface GetRepliesResponse {
260 replies: Array<Comment>;
263 export interface GetUserMentionsForm {
267 unread_only: boolean;
271 export interface GetUserMentionsResponse {
273 mentions: Array<Comment>;
276 export interface EditUserMentionForm {
277 user_mention_id: number;
282 export interface UserMentionResponse {
287 export interface BanFromCommunityForm {
288 community_id: number;
296 export interface BanFromCommunityResponse {
302 export interface AddModToCommunityForm {
303 community_id: number;
309 export interface TransferCommunityForm {
310 community_id: number;
315 export interface TransferSiteForm {
320 export interface AddModToCommunityResponse {
322 moderators: Array<CommunityUser>;
325 export interface GetModlogForm {
326 mod_user_id?: number;
327 community_id?: number;
332 export interface GetModlogResponse {
334 removed_posts: Array<ModRemovePost>;
335 locked_posts: Array<ModLockPost>;
336 stickied_posts: Array<ModStickyPost>;
337 removed_comments: Array<ModRemoveComment>;
338 removed_communities: Array<ModRemoveCommunity>;
339 banned_from_community: Array<ModBanFromCommunity>;
340 banned: Array<ModBan>;
341 added_to_community: Array<ModAddCommunity>;
342 added: Array<ModAdd>;
345 export interface ModRemovePost {
352 mod_user_name: string;
354 community_id: number;
355 community_name: string;
358 export interface ModLockPost {
364 mod_user_name: string;
366 community_id: number;
367 community_name: string;
370 export interface ModStickyPost {
376 mod_user_name: string;
378 community_id: number;
379 community_name: string;
382 export interface ModRemoveComment {
389 mod_user_name: string;
390 comment_user_id: number;
391 comment_user_name: string;
392 comment_content: string;
395 community_id: number;
396 community_name: string;
399 export interface ModRemoveCommunity {
402 community_id: number;
407 mod_user_name: string;
408 community_name: string;
411 export interface ModBanFromCommunity {
414 other_user_id: number;
415 community_id: number;
420 mod_user_name: string;
421 other_user_name: string;
422 community_name: string;
425 export interface ModBan {
428 other_user_id: number;
433 mod_user_name: string;
434 other_user_name: string;
437 export interface ModAddCommunity {
440 other_user_id: number;
441 community_id: number;
444 mod_user_name: string;
445 other_user_name: string;
446 community_name: string;
449 export interface ModAdd {
452 other_user_id: number;
455 mod_user_name: string;
456 other_user_name: string;
459 export interface LoginForm {
460 username_or_email: string;
464 export interface RegisterForm {
468 password_verify: string;
473 export interface LoginResponse {
478 export interface UserSettingsForm {
481 default_sort_type: SortType;
482 default_listing_type: ListingType;
486 new_password?: string;
487 new_password_verify?: string;
488 old_password?: string;
492 export interface CommunityForm {
495 description?: string;
506 export interface GetCommunityResponse {
508 community: Community;
509 moderators: Array<CommunityUser>;
510 admins: Array<UserView>;
513 export interface CommunityResponse {
515 community: Community;
518 export interface ListCommunitiesForm {
525 export interface ListCommunitiesResponse {
527 communities: Array<Community>;
530 export interface ListCategoriesResponse {
532 categories: Array<Category>;
535 export interface PostForm {
539 community_id: number;
552 export interface PostFormParams {
559 export interface GetPostResponse {
562 comments: Array<Comment>;
563 community: Community;
564 moderators: Array<CommunityUser>;
565 admins: Array<UserView>;
568 export interface SavePostForm {
574 export interface PostResponse {
579 export interface CommentForm {
592 export interface SaveCommentForm {
598 export interface CommentResponse {
603 export interface CommentLikeForm {
610 export interface CommentNode {
612 children?: Array<CommentNode>;
615 export interface GetPostsForm {
620 community_id?: number;
624 export interface GetPostsResponse {
629 export interface CreatePostLikeForm {
635 export interface CreatePostLikeResponse {
640 export interface SiteForm {
642 description?: string;
643 enable_downvotes: boolean;
644 open_registration: boolean;
645 enable_nsfw: boolean;
649 export interface GetSiteResponse {
652 admins: Array<UserView>;
653 banned: Array<UserView>;
657 export interface SiteResponse {
662 export interface BanUserForm {
670 export interface BanUserResponse {
676 export interface AddAdminForm {
682 export interface AddAdminResponse {
684 admins: Array<UserView>;
687 export interface SearchForm {
690 community_id?: number;
696 export interface SearchResponse {
700 comments?: Array<Comment>;
701 communities: Array<Community>;
702 users: Array<UserView>;
705 export interface DeleteAccountForm {
709 export interface PasswordResetForm {
713 export interface PasswordResetResponse {
717 export interface PasswordChangeForm {
720 password_verify: string;