1 export enum UserOperation {
20 GetFollowedCommunities,
41 export enum CommentSortType {
47 export enum ListingType {
53 export enum SortType {
63 export enum SearchType {
72 export interface User {
80 export interface UserView {
85 number_of_posts: number;
87 number_of_comments: number;
88 comment_score: number;
92 export interface CommunityUser {
97 community_name: string;
101 export interface Community {
105 description?: string;
113 creator_name: string;
114 category_name: string;
115 number_of_subscribers: number;
116 number_of_posts: number;
117 number_of_comments: number;
119 subscribed?: boolean;
122 export interface Post {
128 community_id: number;
135 banned_from_community: boolean;
138 creator_name: string;
139 community_name: string;
140 community_removed: boolean;
141 community_deleted: boolean;
142 community_nsfw: boolean;
143 number_of_comments: number;
150 subscribed?: boolean;
155 export interface Comment {
166 community_id: number;
168 banned_from_community: boolean;
169 creator_name: string;
176 user_mention_id?: number; // For mention type
177 recipient_id?: number;
180 export interface Category {
185 export interface Site {
188 description?: string;
192 creator_name: string;
193 number_of_users: number;
194 number_of_posts: number;
195 number_of_comments: number;
196 number_of_communities: number;
199 export enum BanType {
204 export interface FollowCommunityForm {
205 community_id: number;
210 export interface GetFollowedCommunitiesResponse {
212 communities: Array<CommunityUser>;
215 export interface GetUserDetailsForm {
221 community_id?: number;
225 export interface UserDetailsResponse {
228 follows: Array<CommunityUser>;
229 moderates: Array<CommunityUser>;
230 comments: Array<Comment>;
232 admins: Array<UserView>;
235 export interface GetRepliesForm {
239 unread_only: boolean;
243 export interface GetRepliesResponse {
245 replies: Array<Comment>;
248 export interface GetUserMentionsForm {
252 unread_only: boolean;
256 export interface GetUserMentionsResponse {
258 mentions: Array<Comment>;
261 export interface EditUserMentionForm {
262 user_mention_id: number;
267 export interface UserMentionResponse {
272 export interface BanFromCommunityForm {
273 community_id: number;
281 export interface BanFromCommunityResponse {
287 export interface AddModToCommunityForm {
288 community_id: number;
294 export interface TransferCommunityForm {
295 community_id: number;
300 export interface TransferSiteForm {
305 export interface AddModToCommunityResponse {
307 moderators: Array<CommunityUser>;
310 export interface GetModlogForm {
311 mod_user_id?: number;
312 community_id?: number;
317 export interface GetModlogResponse {
319 removed_posts: Array<ModRemovePost>;
320 locked_posts: Array<ModLockPost>;
321 stickied_posts: Array<ModStickyPost>;
322 removed_comments: Array<ModRemoveComment>;
323 removed_communities: Array<ModRemoveCommunity>;
324 banned_from_community: Array<ModBanFromCommunity>;
325 banned: Array<ModBan>;
326 added_to_community: Array<ModAddCommunity>;
327 added: Array<ModAdd>;
330 export interface ModRemovePost {
337 mod_user_name: string;
339 community_id: number;
340 community_name: string;
343 export interface ModLockPost {
349 mod_user_name: string;
351 community_id: number;
352 community_name: string;
355 export interface ModStickyPost {
361 mod_user_name: string;
363 community_id: number;
364 community_name: string;
367 export interface ModRemoveComment {
374 mod_user_name: string;
375 comment_user_id: number;
376 comment_user_name: string;
377 comment_content: string;
380 community_id: number;
381 community_name: string;
384 export interface ModRemoveCommunity {
387 community_id: number;
392 mod_user_name: string;
393 community_name: string;
396 export interface ModBanFromCommunity {
399 other_user_id: number;
400 community_id: number;
405 mod_user_name: string;
406 other_user_name: string;
407 community_name: string;
410 export interface ModBan {
413 other_user_id: number;
418 mod_user_name: string;
419 other_user_name: string;
422 export interface ModAddCommunity {
425 other_user_id: number;
426 community_id: number;
429 mod_user_name: string;
430 other_user_name: string;
431 community_name: string;
434 export interface ModAdd {
437 other_user_id: number;
440 mod_user_name: string;
441 other_user_name: string;
444 export interface LoginForm {
445 username_or_email: string;
449 export interface RegisterForm {
453 password_verify: string;
458 export interface LoginResponse {
463 export interface UserSettingsForm {
469 export interface CommunityForm {
472 description?: string;
483 export interface GetCommunityResponse {
485 community: Community;
486 moderators: Array<CommunityUser>;
487 admins: Array<UserView>;
490 export interface CommunityResponse {
492 community: Community;
495 export interface ListCommunitiesForm {
502 export interface ListCommunitiesResponse {
504 communities: Array<Community>;
507 export interface ListCategoriesResponse {
509 categories: Array<Category>;
512 export interface PostForm {
516 community_id: number;
529 export interface PostFormParams {
536 export interface GetPostResponse {
539 comments: Array<Comment>;
540 community: Community;
541 moderators: Array<CommunityUser>;
542 admins: Array<UserView>;
545 export interface SavePostForm {
551 export interface PostResponse {
556 export interface CommentForm {
569 export interface SaveCommentForm {
575 export interface CommentResponse {
580 export interface CommentLikeForm {
587 export interface CommentNode {
589 children?: Array<CommentNode>;
592 export interface GetPostsForm {
597 community_id?: number;
601 export interface GetPostsResponse {
606 export interface CreatePostLikeForm {
612 export interface CreatePostLikeResponse {
617 export interface SiteForm {
619 description?: string;
626 export interface GetSiteResponse {
629 admins: Array<UserView>;
630 banned: Array<UserView>;
634 export interface SiteResponse {
639 export interface BanUserForm {
647 export interface BanUserResponse {
653 export interface AddAdminForm {
659 export interface AddAdminResponse {
661 admins: Array<UserView>;
664 export interface SearchForm {
667 community_id?: number;
673 export interface SearchResponse {
677 comments?: Array<Comment>;
678 communities: Array<Community>;
679 users: Array<UserView>;
682 export interface DeleteAccountForm {