1 export enum UserOperation {
20 GetFollowedCommunities,
46 export enum CommentSortType {
52 export enum ListingType {
58 export enum SortType {
68 export enum SearchType {
77 export interface User {
83 default_sort_type: SortType;
84 default_listing_type: ListingType;
87 show_avatars: boolean;
90 export interface UserView {
95 matrix_user_id?: string;
98 number_of_posts: number;
100 number_of_comments: number;
101 comment_score: number;
103 show_avatars: boolean;
104 send_notifications_to_email: boolean;
107 export interface CommunityUser {
112 community_id: number;
113 community_name: string;
117 export interface Community {
121 description?: string;
129 creator_name: string;
130 creator_avatar?: string;
131 category_name: string;
132 number_of_subscribers: number;
133 number_of_posts: number;
134 number_of_comments: number;
136 subscribed?: boolean;
139 export interface Post {
145 community_id: number;
152 banned_from_community: boolean;
155 creator_name: string;
156 creator_avatar?: string;
157 community_name: string;
158 community_removed: boolean;
159 community_deleted: boolean;
160 community_nsfw: boolean;
161 number_of_comments: number;
168 subscribed?: boolean;
171 upvoteLoading?: boolean;
172 downvoteLoading?: boolean;
175 export interface Comment {
186 community_id: number;
188 banned_from_community: boolean;
189 creator_name: string;
190 creator_avatar?: string;
197 user_mention_id?: number; // For mention type
198 recipient_id?: number;
199 upvoteLoading?: boolean;
200 downvoteLoading?: boolean;
203 export interface Category {
208 export interface Site {
211 description?: string;
215 creator_name: string;
216 number_of_users: number;
217 number_of_posts: number;
218 number_of_comments: number;
219 number_of_communities: number;
220 enable_downvotes: boolean;
221 open_registration: boolean;
222 enable_nsfw: boolean;
225 export interface PrivateMessage {
228 recipient_id: number;
234 creator_name: string;
235 creator_avatar?: string;
236 recipient_name: string;
237 recipient_avatar?: string;
240 export enum BanType {
245 export interface FollowCommunityForm {
246 community_id: number;
251 export interface GetFollowedCommunitiesResponse {
253 communities: Array<CommunityUser>;
256 export interface GetUserDetailsForm {
262 community_id?: number;
266 export interface UserDetailsResponse {
269 follows: Array<CommunityUser>;
270 moderates: Array<CommunityUser>;
271 comments: Array<Comment>;
273 admins: Array<UserView>;
276 export interface GetRepliesForm {
280 unread_only: boolean;
284 export interface GetRepliesResponse {
286 replies: Array<Comment>;
289 export interface GetUserMentionsForm {
293 unread_only: boolean;
297 export interface GetUserMentionsResponse {
299 mentions: Array<Comment>;
302 export interface EditUserMentionForm {
303 user_mention_id: number;
308 export interface UserMentionResponse {
313 export interface BanFromCommunityForm {
314 community_id: number;
322 export interface BanFromCommunityResponse {
328 export interface AddModToCommunityForm {
329 community_id: number;
335 export interface TransferCommunityForm {
336 community_id: number;
341 export interface TransferSiteForm {
346 export interface AddModToCommunityResponse {
348 moderators: Array<CommunityUser>;
351 export interface GetModlogForm {
352 mod_user_id?: number;
353 community_id?: number;
358 export interface GetModlogResponse {
360 removed_posts: Array<ModRemovePost>;
361 locked_posts: Array<ModLockPost>;
362 stickied_posts: Array<ModStickyPost>;
363 removed_comments: Array<ModRemoveComment>;
364 removed_communities: Array<ModRemoveCommunity>;
365 banned_from_community: Array<ModBanFromCommunity>;
366 banned: Array<ModBan>;
367 added_to_community: Array<ModAddCommunity>;
368 added: Array<ModAdd>;
371 export interface ModRemovePost {
378 mod_user_name: string;
380 community_id: number;
381 community_name: string;
384 export interface ModLockPost {
390 mod_user_name: string;
392 community_id: number;
393 community_name: string;
396 export interface ModStickyPost {
402 mod_user_name: string;
404 community_id: number;
405 community_name: string;
408 export interface ModRemoveComment {
415 mod_user_name: string;
416 comment_user_id: number;
417 comment_user_name: string;
418 comment_content: string;
421 community_id: number;
422 community_name: string;
425 export interface ModRemoveCommunity {
428 community_id: number;
433 mod_user_name: string;
434 community_name: string;
437 export interface ModBanFromCommunity {
440 other_user_id: number;
441 community_id: number;
446 mod_user_name: string;
447 other_user_name: string;
448 community_name: string;
451 export interface ModBan {
454 other_user_id: number;
459 mod_user_name: string;
460 other_user_name: string;
463 export interface ModAddCommunity {
466 other_user_id: number;
467 community_id: number;
470 mod_user_name: string;
471 other_user_name: string;
472 community_name: string;
475 export interface ModAdd {
478 other_user_id: number;
481 mod_user_name: string;
482 other_user_name: string;
485 export interface LoginForm {
486 username_or_email: string;
490 export interface RegisterForm {
494 password_verify: string;
499 export interface LoginResponse {
504 export interface UserSettingsForm {
507 default_sort_type: SortType;
508 default_listing_type: ListingType;
512 matrix_user_id?: string;
513 new_password?: string;
514 new_password_verify?: string;
515 old_password?: string;
516 show_avatars: boolean;
517 send_notifications_to_email: boolean;
521 export interface CommunityForm {
524 description?: string;
535 export interface GetCommunityResponse {
537 community: Community;
538 moderators: Array<CommunityUser>;
539 admins: Array<UserView>;
542 export interface CommunityResponse {
544 community: Community;
547 export interface ListCommunitiesForm {
554 export interface ListCommunitiesResponse {
556 communities: Array<Community>;
559 export interface ListCategoriesResponse {
561 categories: Array<Category>;
564 export interface PostForm {
568 community_id: number;
581 export interface PostFormParams {
588 export interface GetPostResponse {
591 comments: Array<Comment>;
592 community: Community;
593 moderators: Array<CommunityUser>;
594 admins: Array<UserView>;
597 export interface SavePostForm {
603 export interface PostResponse {
608 export interface CommentForm {
621 export interface SaveCommentForm {
627 export interface CommentResponse {
632 export interface CommentLikeForm {
639 export interface CommentNode {
641 children?: Array<CommentNode>;
644 export interface GetPostsForm {
649 community_id?: number;
653 export interface GetPostsResponse {
658 export interface CreatePostLikeForm {
664 export interface CreatePostLikeResponse {
669 export interface SiteForm {
671 description?: string;
672 enable_downvotes: boolean;
673 open_registration: boolean;
674 enable_nsfw: boolean;
678 export interface GetSiteResponse {
681 admins: Array<UserView>;
682 banned: Array<UserView>;
686 export interface SiteResponse {
691 export interface BanUserForm {
699 export interface BanUserResponse {
705 export interface AddAdminForm {
711 export interface AddAdminResponse {
713 admins: Array<UserView>;
716 export interface SearchForm {
719 community_id?: number;
726 export interface SearchResponse {
730 comments?: Array<Comment>;
731 communities: Array<Community>;
732 users: Array<UserView>;
735 export interface DeleteAccountForm {
739 export interface PasswordResetForm {
743 export interface PasswordResetResponse {
747 export interface PasswordChangeForm {
750 password_verify: string;
753 export interface PrivateMessageForm {
755 recipient_id: number;
759 export interface PrivateMessageFormParams {
760 recipient_id: number;
763 export interface EditPrivateMessageForm {
771 export interface GetPrivateMessagesForm {
772 unread_only: boolean;
778 export interface PrivateMessagesResponse {
780 messages: Array<PrivateMessage>;
783 export interface PrivateMessageResponse {
785 message: PrivateMessage;