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;
85 export interface UserView {
90 number_of_posts: number;
92 number_of_comments: number;
93 comment_score: number;
97 export interface CommunityUser {
101 community_id: number;
102 community_name: string;
106 export interface Community {
110 description?: string;
118 creator_name: string;
119 category_name: string;
120 number_of_subscribers: number;
121 number_of_posts: number;
122 number_of_comments: number;
124 subscribed?: boolean;
127 export interface Post {
133 community_id: number;
140 banned_from_community: boolean;
143 creator_name: string;
144 community_name: string;
145 community_removed: boolean;
146 community_deleted: boolean;
147 community_nsfw: boolean;
148 number_of_comments: number;
155 subscribed?: boolean;
160 export interface Comment {
171 community_id: number;
173 banned_from_community: boolean;
174 creator_name: string;
181 user_mention_id?: number; // For mention type
182 recipient_id?: number;
185 export interface Category {
190 export interface Site {
193 description?: string;
197 creator_name: string;
198 number_of_users: number;
199 number_of_posts: number;
200 number_of_comments: number;
201 number_of_communities: number;
204 export enum BanType {
209 export interface FollowCommunityForm {
210 community_id: number;
215 export interface GetFollowedCommunitiesResponse {
217 communities: Array<CommunityUser>;
220 export interface GetUserDetailsForm {
226 community_id?: number;
230 export interface UserDetailsResponse {
233 follows: Array<CommunityUser>;
234 moderates: Array<CommunityUser>;
235 comments: Array<Comment>;
237 admins: Array<UserView>;
240 export interface GetRepliesForm {
244 unread_only: boolean;
248 export interface GetRepliesResponse {
250 replies: Array<Comment>;
253 export interface GetUserMentionsForm {
257 unread_only: boolean;
261 export interface GetUserMentionsResponse {
263 mentions: Array<Comment>;
266 export interface EditUserMentionForm {
267 user_mention_id: number;
272 export interface UserMentionResponse {
277 export interface BanFromCommunityForm {
278 community_id: number;
286 export interface BanFromCommunityResponse {
292 export interface AddModToCommunityForm {
293 community_id: number;
299 export interface TransferCommunityForm {
300 community_id: number;
305 export interface TransferSiteForm {
310 export interface AddModToCommunityResponse {
312 moderators: Array<CommunityUser>;
315 export interface GetModlogForm {
316 mod_user_id?: number;
317 community_id?: number;
322 export interface GetModlogResponse {
324 removed_posts: Array<ModRemovePost>;
325 locked_posts: Array<ModLockPost>;
326 stickied_posts: Array<ModStickyPost>;
327 removed_comments: Array<ModRemoveComment>;
328 removed_communities: Array<ModRemoveCommunity>;
329 banned_from_community: Array<ModBanFromCommunity>;
330 banned: Array<ModBan>;
331 added_to_community: Array<ModAddCommunity>;
332 added: Array<ModAdd>;
335 export interface ModRemovePost {
342 mod_user_name: string;
344 community_id: number;
345 community_name: string;
348 export interface ModLockPost {
354 mod_user_name: string;
356 community_id: number;
357 community_name: string;
360 export interface ModStickyPost {
366 mod_user_name: string;
368 community_id: number;
369 community_name: string;
372 export interface ModRemoveComment {
379 mod_user_name: string;
380 comment_user_id: number;
381 comment_user_name: string;
382 comment_content: string;
385 community_id: number;
386 community_name: string;
389 export interface ModRemoveCommunity {
392 community_id: number;
397 mod_user_name: string;
398 community_name: string;
401 export interface ModBanFromCommunity {
404 other_user_id: number;
405 community_id: number;
410 mod_user_name: string;
411 other_user_name: string;
412 community_name: string;
415 export interface ModBan {
418 other_user_id: number;
423 mod_user_name: string;
424 other_user_name: string;
427 export interface ModAddCommunity {
430 other_user_id: number;
431 community_id: number;
434 mod_user_name: string;
435 other_user_name: string;
436 community_name: string;
439 export interface ModAdd {
442 other_user_id: number;
445 mod_user_name: string;
446 other_user_name: string;
449 export interface LoginForm {
450 username_or_email: string;
454 export interface RegisterForm {
458 password_verify: string;
463 export interface LoginResponse {
468 export interface UserSettingsForm {
471 default_sort_type: SortType;
472 default_listing_type: ListingType;
477 export interface CommunityForm {
480 description?: string;
491 export interface GetCommunityResponse {
493 community: Community;
494 moderators: Array<CommunityUser>;
495 admins: Array<UserView>;
498 export interface CommunityResponse {
500 community: Community;
503 export interface ListCommunitiesForm {
510 export interface ListCommunitiesResponse {
512 communities: Array<Community>;
515 export interface ListCategoriesResponse {
517 categories: Array<Category>;
520 export interface PostForm {
524 community_id: number;
537 export interface PostFormParams {
544 export interface GetPostResponse {
547 comments: Array<Comment>;
548 community: Community;
549 moderators: Array<CommunityUser>;
550 admins: Array<UserView>;
553 export interface SavePostForm {
559 export interface PostResponse {
564 export interface CommentForm {
577 export interface SaveCommentForm {
583 export interface CommentResponse {
588 export interface CommentLikeForm {
595 export interface CommentNode {
597 children?: Array<CommentNode>;
600 export interface GetPostsForm {
605 community_id?: number;
609 export interface GetPostsResponse {
614 export interface CreatePostLikeForm {
620 export interface CreatePostLikeResponse {
625 export interface SiteForm {
627 description?: string;
634 export interface GetSiteResponse {
637 admins: Array<UserView>;
638 banned: Array<UserView>;
642 export interface SiteResponse {
647 export interface BanUserForm {
655 export interface BanUserResponse {
661 export interface AddAdminForm {
667 export interface AddAdminResponse {
669 admins: Array<UserView>;
672 export interface SearchForm {
675 community_id?: number;
681 export interface SearchResponse {
685 comments?: Array<Comment>;
686 communities: Array<Community>;
687 users: Array<UserView>;
690 export interface DeleteAccountForm {
694 export interface PasswordResetForm {
698 export interface PasswordResetResponse {
702 export interface PasswordChangeForm {
705 password_verify: string;