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;
167 upvoteLoading?: boolean;
168 downvoteLoading?: boolean;
171 export interface Comment {
182 community_id: number;
184 banned_from_community: boolean;
185 creator_name: string;
186 creator_avatar?: string;
193 user_mention_id?: number; // For mention type
194 recipient_id?: number;
195 upvoteLoading?: boolean;
196 downvoteLoading?: boolean;
199 export interface Category {
204 export interface Site {
207 description?: string;
211 creator_name: string;
212 number_of_users: number;
213 number_of_posts: number;
214 number_of_comments: number;
215 number_of_communities: number;
216 enable_downvotes: boolean;
217 open_registration: boolean;
218 enable_nsfw: boolean;
221 export enum BanType {
226 export interface FollowCommunityForm {
227 community_id: number;
232 export interface GetFollowedCommunitiesResponse {
234 communities: Array<CommunityUser>;
237 export interface GetUserDetailsForm {
243 community_id?: number;
247 export interface UserDetailsResponse {
250 follows: Array<CommunityUser>;
251 moderates: Array<CommunityUser>;
252 comments: Array<Comment>;
254 admins: Array<UserView>;
257 export interface GetRepliesForm {
261 unread_only: boolean;
265 export interface GetRepliesResponse {
267 replies: Array<Comment>;
270 export interface GetUserMentionsForm {
274 unread_only: boolean;
278 export interface GetUserMentionsResponse {
280 mentions: Array<Comment>;
283 export interface EditUserMentionForm {
284 user_mention_id: number;
289 export interface UserMentionResponse {
294 export interface BanFromCommunityForm {
295 community_id: number;
303 export interface BanFromCommunityResponse {
309 export interface AddModToCommunityForm {
310 community_id: number;
316 export interface TransferCommunityForm {
317 community_id: number;
322 export interface TransferSiteForm {
327 export interface AddModToCommunityResponse {
329 moderators: Array<CommunityUser>;
332 export interface GetModlogForm {
333 mod_user_id?: number;
334 community_id?: number;
339 export interface GetModlogResponse {
341 removed_posts: Array<ModRemovePost>;
342 locked_posts: Array<ModLockPost>;
343 stickied_posts: Array<ModStickyPost>;
344 removed_comments: Array<ModRemoveComment>;
345 removed_communities: Array<ModRemoveCommunity>;
346 banned_from_community: Array<ModBanFromCommunity>;
347 banned: Array<ModBan>;
348 added_to_community: Array<ModAddCommunity>;
349 added: Array<ModAdd>;
352 export interface ModRemovePost {
359 mod_user_name: string;
361 community_id: number;
362 community_name: string;
365 export interface ModLockPost {
371 mod_user_name: string;
373 community_id: number;
374 community_name: string;
377 export interface ModStickyPost {
383 mod_user_name: string;
385 community_id: number;
386 community_name: string;
389 export interface ModRemoveComment {
396 mod_user_name: string;
397 comment_user_id: number;
398 comment_user_name: string;
399 comment_content: string;
402 community_id: number;
403 community_name: string;
406 export interface ModRemoveCommunity {
409 community_id: number;
414 mod_user_name: string;
415 community_name: string;
418 export interface ModBanFromCommunity {
421 other_user_id: number;
422 community_id: number;
427 mod_user_name: string;
428 other_user_name: string;
429 community_name: string;
432 export interface ModBan {
435 other_user_id: number;
440 mod_user_name: string;
441 other_user_name: string;
444 export interface ModAddCommunity {
447 other_user_id: number;
448 community_id: number;
451 mod_user_name: string;
452 other_user_name: string;
453 community_name: string;
456 export interface ModAdd {
459 other_user_id: number;
462 mod_user_name: string;
463 other_user_name: string;
466 export interface LoginForm {
467 username_or_email: string;
471 export interface RegisterForm {
475 password_verify: string;
480 export interface LoginResponse {
485 export interface UserSettingsForm {
488 default_sort_type: SortType;
489 default_listing_type: ListingType;
493 new_password?: string;
494 new_password_verify?: string;
495 old_password?: string;
496 show_avatars: boolean;
497 send_notifications_to_email: boolean;
501 export interface CommunityForm {
504 description?: string;
515 export interface GetCommunityResponse {
517 community: Community;
518 moderators: Array<CommunityUser>;
519 admins: Array<UserView>;
522 export interface CommunityResponse {
524 community: Community;
527 export interface ListCommunitiesForm {
534 export interface ListCommunitiesResponse {
536 communities: Array<Community>;
539 export interface ListCategoriesResponse {
541 categories: Array<Category>;
544 export interface PostForm {
548 community_id: number;
561 export interface PostFormParams {
568 export interface GetPostResponse {
571 comments: Array<Comment>;
572 community: Community;
573 moderators: Array<CommunityUser>;
574 admins: Array<UserView>;
577 export interface SavePostForm {
583 export interface PostResponse {
588 export interface CommentForm {
601 export interface SaveCommentForm {
607 export interface CommentResponse {
612 export interface CommentLikeForm {
619 export interface CommentNode {
621 children?: Array<CommentNode>;
624 export interface GetPostsForm {
629 community_id?: number;
633 export interface GetPostsResponse {
638 export interface CreatePostLikeForm {
644 export interface CreatePostLikeResponse {
649 export interface SiteForm {
651 description?: string;
652 enable_downvotes: boolean;
653 open_registration: boolean;
654 enable_nsfw: boolean;
658 export interface GetSiteResponse {
661 admins: Array<UserView>;
662 banned: Array<UserView>;
666 export interface SiteResponse {
671 export interface BanUserForm {
679 export interface BanUserResponse {
685 export interface AddAdminForm {
691 export interface AddAdminResponse {
693 admins: Array<UserView>;
696 export interface SearchForm {
699 community_id?: number;
706 export interface SearchResponse {
710 comments?: Array<Comment>;
711 communities: Array<Community>;
712 users: Array<UserView>;
715 export interface DeleteAccountForm {
719 export interface PasswordResetForm {
723 export interface PasswordResetResponse {
727 export interface PasswordChangeForm {
730 password_verify: string;