GetPrivateMessages,
UserJoin,
GetComments,
+ GetSiteConfig,
+ SaveSiteConfig,
}
export enum CommentSortType {
lang: string;
avatar?: string;
show_avatars: boolean;
+ unreadCount?: number;
}
export interface UserView {
id: number;
+ actor_id: string;
name: string;
avatar?: string;
email?: string;
matrix_user_id?: string;
- fedi_name: string;
+ bio?: string;
+ local: boolean;
published: string;
number_of_posts: number;
post_score: number;
export interface CommunityUser {
id: number;
user_id: number;
+ user_actor_id: string;
+ user_local: boolean;
user_name: string;
avatar?: string;
community_id: number;
+ community_actor_id: string;
+ community_local: boolean;
community_name: string;
published: string;
}
export interface Community {
id: number;
+ actor_id: string;
+ local: boolean;
name: string;
title: string;
description?: string;
nsfw: boolean;
published: string;
updated?: string;
+ creator_actor_id: string;
+ creator_local: boolean;
+ last_refreshed_at: string;
creator_name: string;
creator_avatar?: string;
category_name: string;
deleted: boolean;
locked: boolean;
stickied: boolean;
+ embed_title?: string;
+ embed_description?: string;
+ embed_html?: string;
+ thumbnail_url?: string;
+ ap_id: string;
+ local: boolean;
nsfw: boolean;
banned: boolean;
banned_from_community: boolean;
published: string;
updated?: string;
+ creator_actor_id: string;
+ creator_local: boolean;
creator_name: string;
creator_avatar?: string;
+ community_actor_id: string;
+ community_local: boolean;
community_name: string;
community_removed: boolean;
community_deleted: boolean;
export interface Comment {
id: number;
+ ap_id: string;
+ local: boolean;
creator_id: number;
post_id: number;
parent_id?: number;
published: string;
updated?: string;
community_id: number;
+ community_actor_id: string;
+ community_local: boolean;
community_name: string;
banned: boolean;
banned_from_community: boolean;
+ creator_actor_id: string;
+ creator_local: boolean;
creator_name: string;
creator_avatar?: string;
score: number;
saved?: boolean;
user_mention_id?: number; // For mention type
recipient_id?: number;
+ recipient_actor_id?: string;
+ recipient_local?: boolean;
+ depth?: number;
}
export interface Category {
auth?: string;
}
+export interface GetSiteConfig {
+ auth?: string;
+}
+
+export interface GetSiteConfigResponse {
+ config_hjson: string;
+}
+
+export interface SiteConfigForm {
+ config_hjson: string;
+ auth?: string;
+}
+
export interface GetSiteResponse {
site: Site;
admins: Array<UserView>;
| PasswordChangeForm
| PrivateMessageForm
| EditPrivateMessageForm
- | GetPrivateMessagesForm;
+ | GetPrivateMessagesForm
+ | SiteConfigForm;
type ResponseType =
| SiteResponse
| BanUserResponse
| AddAdminResponse
| PrivateMessageResponse
- | PrivateMessagesResponse;
+ | PrivateMessagesResponse
+ | GetSiteConfigResponse;
export interface WebSocketResponse {
op: UserOperation;