2020-12-24 01:58:27 +00:00
|
|
|
import {
|
|
|
|
CommentView,
|
|
|
|
GetSiteResponse,
|
|
|
|
LemmyHttp,
|
2021-03-15 18:09:31 +00:00
|
|
|
PersonMentionView,
|
2021-02-22 02:39:04 +00:00
|
|
|
} from "lemmy-js-client";
|
2020-09-07 03:41:46 +00:00
|
|
|
|
|
|
|
export interface IsoData {
|
|
|
|
path: string;
|
|
|
|
routeData: any[];
|
2020-12-24 01:58:27 +00:00
|
|
|
site_res: GetSiteResponse;
|
2020-09-07 03:41:46 +00:00
|
|
|
}
|
|
|
|
|
2021-02-12 17:54:35 +00:00
|
|
|
export interface ILemmyConfig {
|
|
|
|
wsHost?: string;
|
|
|
|
}
|
|
|
|
|
2020-09-07 03:41:46 +00:00
|
|
|
declare global {
|
|
|
|
interface Window {
|
|
|
|
isoData: IsoData;
|
2021-02-12 17:54:35 +00:00
|
|
|
lemmyConfig?: ILemmyConfig;
|
2020-09-07 03:41:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-12 21:56:46 +00:00
|
|
|
export interface InitialFetchRequest {
|
|
|
|
auth: string;
|
|
|
|
path: string;
|
|
|
|
client: LemmyHttp;
|
|
|
|
}
|
|
|
|
|
2020-12-24 01:58:27 +00:00
|
|
|
export interface CommentNode {
|
2021-03-15 18:09:31 +00:00
|
|
|
comment_view: CommentView | PersonMentionView;
|
2020-12-24 01:58:27 +00:00
|
|
|
children?: CommentNode[];
|
|
|
|
depth?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface PostFormParams {
|
|
|
|
name: string;
|
|
|
|
url?: string;
|
|
|
|
body?: string;
|
|
|
|
community_name?: string;
|
|
|
|
community_id?: number;
|
|
|
|
}
|
|
|
|
|
2020-09-06 16:15:25 +00:00
|
|
|
export enum CommentSortType {
|
|
|
|
Hot,
|
|
|
|
Top,
|
|
|
|
New,
|
|
|
|
Old,
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum CommentViewType {
|
|
|
|
Tree,
|
|
|
|
Chat,
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum DataType {
|
|
|
|
Post,
|
|
|
|
Comment,
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum BanType {
|
|
|
|
Community,
|
|
|
|
Site,
|
|
|
|
}
|
|
|
|
|
2021-03-15 18:09:31 +00:00
|
|
|
export enum PersonDetailsView {
|
2020-09-06 16:15:25 +00:00
|
|
|
Overview,
|
|
|
|
Comments,
|
|
|
|
Posts,
|
|
|
|
Saved,
|
|
|
|
}
|