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;
169 export interface Comment {
180 community_id: number;
182 banned_from_community: boolean;
183 creator_name: string;
184 creator_avatar?: string;
191 user_mention_id?: number; // For mention type
192 recipient_id?: number;
195 export interface Category {
200 export interface Site {
203 description?: string;
207 creator_name: string;
208 number_of_users: number;
209 number_of_posts: number;
210 number_of_comments: number;
211 number_of_communities: number;
212 enable_downvotes: boolean;
213 open_registration: boolean;
214 enable_nsfw: boolean;
217 export enum BanType {
222 export interface FollowCommunityForm {
223 community_id: number;
228 export interface GetFollowedCommunitiesResponse {
229 communities: Array<CommunityUser>;
232 export interface GetUserDetailsForm {
238 community_id?: number;
242 export interface UserDetailsResponse {
244 follows: Array<CommunityUser>;
245 moderates: Array<CommunityUser>;
246 comments: Array<Comment>;
248 admins: Array<UserView>;
251 export interface GetRepliesForm {
255 unread_only: boolean;
259 export interface GetRepliesResponse {
260 replies: Array<Comment>;
263 export interface GetUserMentionsForm {
267 unread_only: boolean;
271 export interface GetUserMentionsResponse {
272 mentions: Array<Comment>;
275 export interface EditUserMentionForm {
276 user_mention_id: number;
281 export interface UserMentionResponse {
285 export interface BanFromCommunityForm {
286 community_id: number;
294 export interface BanFromCommunityResponse {
299 export interface AddModToCommunityForm {
300 community_id: number;
306 export interface TransferCommunityForm {
307 community_id: number;
312 export interface TransferSiteForm {
317 export interface AddModToCommunityResponse {
318 moderators: Array<CommunityUser>;
321 export interface GetModlogForm {
322 mod_user_id?: number;
323 community_id?: number;
328 export interface GetModlogResponse {
329 removed_posts: Array<ModRemovePost>;
330 locked_posts: Array<ModLockPost>;
331 stickied_posts: Array<ModStickyPost>;
332 removed_comments: Array<ModRemoveComment>;
333 removed_communities: Array<ModRemoveCommunity>;
334 banned_from_community: Array<ModBanFromCommunity>;
335 banned: Array<ModBan>;
336 added_to_community: Array<ModAddCommunity>;
337 added: Array<ModAdd>;
340 export interface ModRemovePost {
347 mod_user_name: string;
349 community_id: number;
350 community_name: string;
353 export interface ModLockPost {
359 mod_user_name: string;
361 community_id: number;
362 community_name: string;
365 export interface ModStickyPost {
371 mod_user_name: string;
373 community_id: number;
374 community_name: string;
377 export interface ModRemoveComment {
384 mod_user_name: string;
385 comment_user_id: number;
386 comment_user_name: string;
387 comment_content: string;
390 community_id: number;
391 community_name: string;
394 export interface ModRemoveCommunity {
397 community_id: number;
402 mod_user_name: string;
403 community_name: string;
406 export interface ModBanFromCommunity {
409 other_user_id: number;
410 community_id: number;
415 mod_user_name: string;
416 other_user_name: string;
417 community_name: string;
420 export interface ModBan {
423 other_user_id: number;
428 mod_user_name: string;
429 other_user_name: string;
432 export interface ModAddCommunity {
435 other_user_id: number;
436 community_id: number;
439 mod_user_name: string;
440 other_user_name: string;
441 community_name: string;
444 export interface ModAdd {
447 other_user_id: number;
450 mod_user_name: string;
451 other_user_name: string;
454 export interface LoginForm {
455 username_or_email: string;
459 export interface RegisterForm {
463 password_verify: string;
468 export interface LoginResponse {
472 export interface UserSettingsForm {
475 default_sort_type: SortType;
476 default_listing_type: ListingType;
480 new_password?: string;
481 new_password_verify?: string;
482 old_password?: string;
483 show_avatars: boolean;
484 send_notifications_to_email: boolean;
488 export interface CommunityForm {
491 description?: string;
502 export interface GetCommunityResponse {
503 community: Community;
504 moderators: Array<CommunityUser>;
505 admins: Array<UserView>;
508 export interface CommunityResponse {
509 community: Community;
512 export interface ListCommunitiesForm {
519 export interface ListCommunitiesResponse {
520 communities: Array<Community>;
523 export interface ListCategoriesResponse {
524 categories: Array<Category>;
527 export interface PostForm {
531 community_id: number;
544 export interface PostFormParams {
551 export interface GetPostResponse {
553 comments: Array<Comment>;
554 community: Community;
555 moderators: Array<CommunityUser>;
556 admins: Array<UserView>;
559 export interface SavePostForm {
565 export interface PostResponse {
569 export interface CommentForm {
582 export interface SaveCommentForm {
588 export interface CommentResponse {
592 export interface CommentLikeForm {
599 export interface CommentNode {
601 children?: Array<CommentNode>;
604 export interface GetPostsForm {
609 community_id?: number;
613 export interface GetPostsResponse {
617 export interface CreatePostLikeForm {
623 export interface CreatePostLikeResponse {
627 export interface SiteForm {
629 description?: string;
630 enable_downvotes: boolean;
631 open_registration: boolean;
632 enable_nsfw: boolean;
636 export interface GetSiteResponse {
638 admins: Array<UserView>;
639 banned: Array<UserView>;
643 export interface SiteResponse {
647 export interface BanUserForm {
655 export interface BanUserResponse {
660 export interface AddAdminForm {
666 export interface AddAdminResponse {
667 admins: Array<UserView>;
670 export interface SearchForm {
673 community_id?: number;
679 export interface SearchResponse {
682 comments?: Array<Comment>;
683 communities: Array<Community>;
684 users: Array<UserView>;
687 export interface DeleteAccountForm {
691 export interface PasswordResetForm {
695 // export interface PasswordResetResponse {
698 export interface PasswordChangeForm {
701 password_verify: string;
706 | GetFollowedCommunitiesResponse
707 | ListCommunitiesResponse
709 | CreatePostLikeResponse
711 | GetUserMentionsResponse
712 | ListCategoriesResponse
715 | UserMentionResponse
719 | BanFromCommunityResponse
720 | AddModToCommunityResponse
724 export interface WebSocketResponse {
730 export interface WebSocketJsonResponse {