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 {
78 default_sort_type: SortType;
79 default_listing_type: ListingType;
82 export interface UserView {
87 number_of_posts: number;
89 number_of_comments: number;
90 comment_score: number;
94 export interface CommunityUser {
99 community_name: string;
103 export interface Community {
107 description?: string;
115 creator_name: string;
116 category_name: string;
117 number_of_subscribers: number;
118 number_of_posts: number;
119 number_of_comments: number;
121 subscribed?: boolean;
124 export interface Post {
130 community_id: number;
137 banned_from_community: boolean;
140 creator_name: string;
141 community_name: string;
142 community_removed: boolean;
143 community_deleted: boolean;
144 community_nsfw: boolean;
145 number_of_comments: number;
152 subscribed?: boolean;
157 export interface Comment {
168 community_id: number;
170 banned_from_community: boolean;
171 creator_name: string;
178 user_mention_id?: number; // For mention type
179 recipient_id?: number;
182 export interface Category {
187 export interface Site {
190 description?: string;
194 creator_name: string;
195 number_of_users: number;
196 number_of_posts: number;
197 number_of_comments: number;
198 number_of_communities: number;
201 export enum BanType {
206 export interface FollowCommunityForm {
207 community_id: number;
212 export interface GetFollowedCommunitiesResponse {
214 communities: Array<CommunityUser>;
217 export interface GetUserDetailsForm {
223 community_id?: number;
227 export interface UserDetailsResponse {
230 follows: Array<CommunityUser>;
231 moderates: Array<CommunityUser>;
232 comments: Array<Comment>;
234 admins: Array<UserView>;
237 export interface GetRepliesForm {
241 unread_only: boolean;
245 export interface GetRepliesResponse {
247 replies: Array<Comment>;
250 export interface GetUserMentionsForm {
254 unread_only: boolean;
258 export interface GetUserMentionsResponse {
260 mentions: Array<Comment>;
263 export interface EditUserMentionForm {
264 user_mention_id: number;
269 export interface UserMentionResponse {
274 export interface BanFromCommunityForm {
275 community_id: number;
283 export interface BanFromCommunityResponse {
289 export interface AddModToCommunityForm {
290 community_id: number;
296 export interface TransferCommunityForm {
297 community_id: number;
302 export interface TransferSiteForm {
307 export interface AddModToCommunityResponse {
309 moderators: Array<CommunityUser>;
312 export interface GetModlogForm {
313 mod_user_id?: number;
314 community_id?: number;
319 export interface GetModlogResponse {
321 removed_posts: Array<ModRemovePost>;
322 locked_posts: Array<ModLockPost>;
323 stickied_posts: Array<ModStickyPost>;
324 removed_comments: Array<ModRemoveComment>;
325 removed_communities: Array<ModRemoveCommunity>;
326 banned_from_community: Array<ModBanFromCommunity>;
327 banned: Array<ModBan>;
328 added_to_community: Array<ModAddCommunity>;
329 added: Array<ModAdd>;
332 export interface ModRemovePost {
339 mod_user_name: string;
341 community_id: number;
342 community_name: string;
345 export interface ModLockPost {
351 mod_user_name: string;
353 community_id: number;
354 community_name: string;
357 export interface ModStickyPost {
363 mod_user_name: string;
365 community_id: number;
366 community_name: string;
369 export interface ModRemoveComment {
376 mod_user_name: string;
377 comment_user_id: number;
378 comment_user_name: string;
379 comment_content: string;
382 community_id: number;
383 community_name: string;
386 export interface ModRemoveCommunity {
389 community_id: number;
394 mod_user_name: string;
395 community_name: string;
398 export interface ModBanFromCommunity {
401 other_user_id: number;
402 community_id: number;
407 mod_user_name: string;
408 other_user_name: string;
409 community_name: string;
412 export interface ModBan {
415 other_user_id: number;
420 mod_user_name: string;
421 other_user_name: string;
424 export interface ModAddCommunity {
427 other_user_id: number;
428 community_id: number;
431 mod_user_name: string;
432 other_user_name: string;
433 community_name: string;
436 export interface ModAdd {
439 other_user_id: number;
442 mod_user_name: string;
443 other_user_name: string;
446 export interface LoginForm {
447 username_or_email: string;
451 export interface RegisterForm {
455 password_verify: string;
460 export interface LoginResponse {
465 export interface UserSettingsForm {
468 default_sort_type: SortType;
469 default_listing_type: ListingType;
473 export interface CommunityForm {
476 description?: string;
487 export interface GetCommunityResponse {
489 community: Community;
490 moderators: Array<CommunityUser>;
491 admins: Array<UserView>;
494 export interface CommunityResponse {
496 community: Community;
499 export interface ListCommunitiesForm {
506 export interface ListCommunitiesResponse {
508 communities: Array<Community>;
511 export interface ListCategoriesResponse {
513 categories: Array<Category>;
516 export interface PostForm {
520 community_id: number;
533 export interface PostFormParams {
540 export interface GetPostResponse {
543 comments: Array<Comment>;
544 community: Community;
545 moderators: Array<CommunityUser>;
546 admins: Array<UserView>;
549 export interface SavePostForm {
555 export interface PostResponse {
560 export interface CommentForm {
573 export interface SaveCommentForm {
579 export interface CommentResponse {
584 export interface CommentLikeForm {
591 export interface CommentNode {
593 children?: Array<CommentNode>;
596 export interface GetPostsForm {
601 community_id?: number;
605 export interface GetPostsResponse {
610 export interface CreatePostLikeForm {
616 export interface CreatePostLikeResponse {
621 export interface SiteForm {
623 description?: string;
630 export interface GetSiteResponse {
633 admins: Array<UserView>;
634 banned: Array<UserView>;
638 export interface SiteResponse {
643 export interface BanUserForm {
651 export interface BanUserResponse {
657 export interface AddAdminForm {
663 export interface AddAdminResponse {
665 admins: Array<UserView>;
668 export interface SearchForm {
671 community_id?: number;
677 export interface SearchResponse {
681 comments?: Array<Comment>;
682 communities: Array<Community>;
683 users: Array<UserView>;
686 export interface DeleteAccountForm {