Feliday-UI/src/shared/interfaces.ts

73 lines
991 B
TypeScript
Raw Normal View History

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";
export interface IsoData {
path: string;
routeData: any[];
2020-12-24 01:58:27 +00:00
site_res: GetSiteResponse;
}
export interface ILemmyConfig {
wsHost?: string;
}
declare global {
interface Window {
isoData: IsoData;
lemmyConfig?: ILemmyConfig;
}
}
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;
}
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 {
Overview,
Comments,
Posts,
Saved,
}