lemmy-ui/src/shared/interfaces.ts

64 lines
891 B
TypeScript
Raw Normal View History

import { GetSiteResponse, LemmyHttp } from "lemmy-js-client";
/**
* This contains serialized data, it needs to be deserialized before use.
*/
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;
client: LemmyHttp;
path: string;
}
2020-12-24 01:58:27 +00:00
export interface PostFormParams {
name?: string;
url?: string;
body?: string;
nameOrId?: string | number;
2020-12-24 01:58:27 +00:00
}
export enum CommentViewType {
Tree,
Flat,
}
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,
}
export enum PurgeType {
Person,
Community,
Post,
Comment,
}