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 export interface UserView {
89 number_of_posts: number;
91 number_of_comments: number;
92 comment_score: number;
96 export interface CommunityUser {
100 community_id: number;
101 community_name: string;
105 export interface Community {
109 description?: string;
117 creator_name: string;
118 category_name: string;
119 number_of_subscribers: number;
120 number_of_posts: number;
121 number_of_comments: number;
123 subscribed?: boolean;
126 export interface Post {
132 community_id: number;
139 banned_from_community: boolean;
142 creator_name: string;
143 community_name: string;
144 community_removed: boolean;
145 community_deleted: boolean;
146 community_nsfw: boolean;
147 number_of_comments: number;
154 subscribed?: boolean;
159 export interface Comment {
170 community_id: number;
172 banned_from_community: boolean;
173 creator_name: string;
180 user_mention_id?: number; // For mention type
181 recipient_id?: number;
184 export interface Category {
189 export interface Site {
192 description?: string;
196 creator_name: string;
197 number_of_users: number;
198 number_of_posts: number;
199 number_of_comments: number;
200 number_of_communities: number;
203 export enum BanType {
208 export interface FollowCommunityForm {
209 community_id: number;
214 export interface GetFollowedCommunitiesResponse {
216 communities: Array<CommunityUser>;
219 export interface GetUserDetailsForm {
225 community_id?: number;
229 export interface UserDetailsResponse {
232 follows: Array<CommunityUser>;
233 moderates: Array<CommunityUser>;
234 comments: Array<Comment>;
236 admins: Array<UserView>;
239 export interface GetRepliesForm {
243 unread_only: boolean;
247 export interface GetRepliesResponse {
249 replies: Array<Comment>;
252 export interface GetUserMentionsForm {
256 unread_only: boolean;
260 export interface GetUserMentionsResponse {
262 mentions: Array<Comment>;
265 export interface EditUserMentionForm {
266 user_mention_id: number;
271 export interface UserMentionResponse {
276 export interface BanFromCommunityForm {
277 community_id: number;
285 export interface BanFromCommunityResponse {
291 export interface AddModToCommunityForm {
292 community_id: number;
298 export interface TransferCommunityForm {
299 community_id: number;
304 export interface TransferSiteForm {
309 export interface AddModToCommunityResponse {
311 moderators: Array<CommunityUser>;
314 export interface GetModlogForm {
315 mod_user_id?: number;
316 community_id?: number;
321 export interface GetModlogResponse {
323 removed_posts: Array<ModRemovePost>;
324 locked_posts: Array<ModLockPost>;
325 stickied_posts: Array<ModStickyPost>;
326 removed_comments: Array<ModRemoveComment>;
327 removed_communities: Array<ModRemoveCommunity>;
328 banned_from_community: Array<ModBanFromCommunity>;
329 banned: Array<ModBan>;
330 added_to_community: Array<ModAddCommunity>;
331 added: Array<ModAdd>;
334 export interface ModRemovePost {
341 mod_user_name: string;
343 community_id: number;
344 community_name: string;
347 export interface ModLockPost {
353 mod_user_name: string;
355 community_id: number;
356 community_name: string;
359 export interface ModStickyPost {
365 mod_user_name: string;
367 community_id: number;
368 community_name: string;
371 export interface ModRemoveComment {
378 mod_user_name: string;
379 comment_user_id: number;
380 comment_user_name: string;
381 comment_content: string;
384 community_id: number;
385 community_name: string;
388 export interface ModRemoveCommunity {
391 community_id: number;
396 mod_user_name: string;
397 community_name: string;
400 export interface ModBanFromCommunity {
403 other_user_id: number;
404 community_id: number;
409 mod_user_name: string;
410 other_user_name: string;
411 community_name: string;
414 export interface ModBan {
417 other_user_id: number;
422 mod_user_name: string;
423 other_user_name: string;
426 export interface ModAddCommunity {
429 other_user_id: number;
430 community_id: number;
433 mod_user_name: string;
434 other_user_name: string;
435 community_name: string;
438 export interface ModAdd {
441 other_user_id: number;
444 mod_user_name: string;
445 other_user_name: string;
448 export interface LoginForm {
449 username_or_email: string;
453 export interface RegisterForm {
457 password_verify: string;
462 export interface LoginResponse {
467 export interface UserSettingsForm {
470 default_sort_type: SortType;
471 default_listing_type: ListingType;
475 export interface CommunityForm {
478 description?: string;
489 export interface GetCommunityResponse {
491 community: Community;
492 moderators: Array<CommunityUser>;
493 admins: Array<UserView>;
496 export interface CommunityResponse {
498 community: Community;
501 export interface ListCommunitiesForm {
508 export interface ListCommunitiesResponse {
510 communities: Array<Community>;
513 export interface ListCategoriesResponse {
515 categories: Array<Category>;
518 export interface PostForm {
522 community_id: number;
535 export interface PostFormParams {
542 export interface GetPostResponse {
545 comments: Array<Comment>;
546 community: Community;
547 moderators: Array<CommunityUser>;
548 admins: Array<UserView>;
551 export interface SavePostForm {
557 export interface PostResponse {
562 export interface CommentForm {
575 export interface SaveCommentForm {
581 export interface CommentResponse {
586 export interface CommentLikeForm {
593 export interface CommentNode {
595 children?: Array<CommentNode>;
598 export interface GetPostsForm {
603 community_id?: number;
607 export interface GetPostsResponse {
612 export interface CreatePostLikeForm {
618 export interface CreatePostLikeResponse {
623 export interface SiteForm {
625 description?: string;
632 export interface GetSiteResponse {
635 admins: Array<UserView>;
636 banned: Array<UserView>;
640 export interface SiteResponse {
645 export interface BanUserForm {
653 export interface BanUserResponse {
659 export interface AddAdminForm {
665 export interface AddAdminResponse {
667 admins: Array<UserView>;
670 export interface SearchForm {
673 community_id?: number;
679 export interface SearchResponse {
683 comments?: Array<Comment>;
684 communities: Array<Community>;
685 users: Array<UserView>;
688 export interface DeleteAccountForm {
692 export interface PasswordResetForm {
696 export interface PasswordResetResponse {
700 export interface PasswordChangeForm {
703 password_verify: string;