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;
84 show_avatars: boolean;
87 export interface UserView {
94 number_of_posts: number;
96 number_of_comments: number;
97 comment_score: number;
99 show_avatars: boolean;
100 send_notifications_to_email: boolean;
103 export interface CommunityUser {
108 community_id: number;
109 community_name: string;
113 export interface Community {
117 description?: string;
125 creator_name: string;
126 creator_avatar?: string;
127 category_name: string;
128 number_of_subscribers: number;
129 number_of_posts: number;
130 number_of_comments: number;
132 subscribed?: boolean;
135 export interface Post {
141 community_id: number;
148 banned_from_community: boolean;
151 creator_name: string;
152 creator_avatar?: string;
153 community_name: string;
154 community_removed: boolean;
155 community_deleted: boolean;
156 community_nsfw: boolean;
157 number_of_comments: number;
164 subscribed?: boolean;
169 export interface Comment {
180 community_id: number;
182 banned_from_community: boolean;
183 creator_name: string;
184 creator_avatar?: string;
191 user_mention_id?: number; // For mention type
192 recipient_id?: number;
195 export interface Category {
200 export interface Site {
203 description?: string;
207 creator_name: string;
208 number_of_users: number;
209 number_of_posts: number;
210 number_of_comments: number;
211 number_of_communities: number;
212 enable_downvotes: boolean;
213 open_registration: boolean;
214 enable_nsfw: boolean;
217 export enum BanType {
222 export interface FollowCommunityForm {
223 community_id: number;
228 export interface GetFollowedCommunitiesResponse {
230 communities: Array<CommunityUser>;
233 export interface GetUserDetailsForm {
239 community_id?: number;
243 export interface UserDetailsResponse {
246 follows: Array<CommunityUser>;
247 moderates: Array<CommunityUser>;
248 comments: Array<Comment>;
250 admins: Array<UserView>;
253 export interface GetRepliesForm {
257 unread_only: boolean;
261 export interface GetRepliesResponse {
263 replies: Array<Comment>;
266 export interface GetUserMentionsForm {
270 unread_only: boolean;
274 export interface GetUserMentionsResponse {
276 mentions: Array<Comment>;
279 export interface EditUserMentionForm {
280 user_mention_id: number;
285 export interface UserMentionResponse {
290 export interface BanFromCommunityForm {
291 community_id: number;
299 export interface BanFromCommunityResponse {
305 export interface AddModToCommunityForm {
306 community_id: number;
312 export interface TransferCommunityForm {
313 community_id: number;
318 export interface TransferSiteForm {
323 export interface AddModToCommunityResponse {
325 moderators: Array<CommunityUser>;
328 export interface GetModlogForm {
329 mod_user_id?: number;
330 community_id?: number;
335 export interface GetModlogResponse {
337 removed_posts: Array<ModRemovePost>;
338 locked_posts: Array<ModLockPost>;
339 stickied_posts: Array<ModStickyPost>;
340 removed_comments: Array<ModRemoveComment>;
341 removed_communities: Array<ModRemoveCommunity>;
342 banned_from_community: Array<ModBanFromCommunity>;
343 banned: Array<ModBan>;
344 added_to_community: Array<ModAddCommunity>;
345 added: Array<ModAdd>;
348 export interface ModRemovePost {
355 mod_user_name: string;
357 community_id: number;
358 community_name: string;
361 export interface ModLockPost {
367 mod_user_name: string;
369 community_id: number;
370 community_name: string;
373 export interface ModStickyPost {
379 mod_user_name: string;
381 community_id: number;
382 community_name: string;
385 export interface ModRemoveComment {
392 mod_user_name: string;
393 comment_user_id: number;
394 comment_user_name: string;
395 comment_content: string;
398 community_id: number;
399 community_name: string;
402 export interface ModRemoveCommunity {
405 community_id: number;
410 mod_user_name: string;
411 community_name: string;
414 export interface ModBanFromCommunity {
417 other_user_id: number;
418 community_id: number;
423 mod_user_name: string;
424 other_user_name: string;
425 community_name: string;
428 export interface ModBan {
431 other_user_id: number;
436 mod_user_name: string;
437 other_user_name: string;
440 export interface ModAddCommunity {
443 other_user_id: number;
444 community_id: number;
447 mod_user_name: string;
448 other_user_name: string;
449 community_name: string;
452 export interface ModAdd {
455 other_user_id: number;
458 mod_user_name: string;
459 other_user_name: string;
462 export interface LoginForm {
463 username_or_email: string;
467 export interface RegisterForm {
471 password_verify: string;
476 export interface LoginResponse {
481 export interface UserSettingsForm {
484 default_sort_type: SortType;
485 default_listing_type: ListingType;
489 new_password?: string;
490 new_password_verify?: string;
491 old_password?: string;
492 show_avatars: boolean;
493 send_notifications_to_email: boolean;
497 export interface CommunityForm {
500 description?: string;
511 export interface GetCommunityResponse {
513 community: Community;
514 moderators: Array<CommunityUser>;
515 admins: Array<UserView>;
518 export interface CommunityResponse {
520 community: Community;
523 export interface ListCommunitiesForm {
530 export interface ListCommunitiesResponse {
532 communities: Array<Community>;
535 export interface ListCategoriesResponse {
537 categories: Array<Category>;
540 export interface PostForm {
544 community_id: number;
557 export interface PostFormParams {
564 export interface GetPostResponse {
567 comments: Array<Comment>;
568 community: Community;
569 moderators: Array<CommunityUser>;
570 admins: Array<UserView>;
573 export interface SavePostForm {
579 export interface PostResponse {
584 export interface CommentForm {
597 export interface SaveCommentForm {
603 export interface CommentResponse {
608 export interface CommentLikeForm {
615 export interface CommentNode {
617 children?: Array<CommentNode>;
620 export interface GetPostsForm {
625 community_id?: number;
629 export interface GetPostsResponse {
634 export interface CreatePostLikeForm {
640 export interface CreatePostLikeResponse {
645 export interface SiteForm {
647 description?: string;
648 enable_downvotes: boolean;
649 open_registration: boolean;
650 enable_nsfw: boolean;
654 export interface GetSiteResponse {
657 admins: Array<UserView>;
658 banned: Array<UserView>;
662 export interface SiteResponse {
667 export interface BanUserForm {
675 export interface BanUserResponse {
681 export interface AddAdminForm {
687 export interface AddAdminResponse {
689 admins: Array<UserView>;
692 export interface SearchForm {
695 community_id?: number;
701 export interface SearchResponse {
705 comments?: Array<Comment>;
706 communities: Array<Community>;
707 users: Array<UserView>;
710 export interface DeleteAccountForm {
714 export interface PasswordResetForm {
718 export interface PasswordResetResponse {
722 export interface PasswordChangeForm {
725 password_verify: string;