2022-07-30 13:28:08 +00:00
|
|
|
import { GetSiteResponse, LemmyHttp } from "lemmy-js-client";
|
2020-09-07 03:41:46 +00:00
|
|
|
|
2022-06-21 21:42:29 +00:00
|
|
|
/**
|
|
|
|
* This contains serialized data, it needs to be deserialized before use.
|
|
|
|
*/
|
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 {
|
2023-01-04 16:56:24 +00:00
|
|
|
auth?: string;
|
2020-11-12 21:56:46 +00:00
|
|
|
client: LemmyHttp;
|
2022-06-21 21:42:29 +00:00
|
|
|
path: string;
|
2020-11-12 21:56:46 +00:00
|
|
|
}
|
|
|
|
|
2020-12-24 01:58:27 +00:00
|
|
|
export interface PostFormParams {
|
2023-01-04 16:56:24 +00:00
|
|
|
name?: string;
|
|
|
|
url?: string;
|
|
|
|
body?: string;
|
|
|
|
nameOrId?: string | number;
|
2020-12-24 01:58:27 +00:00
|
|
|
}
|
|
|
|
|
2020-09-06 16:15:25 +00:00
|
|
|
export enum CommentViewType {
|
|
|
|
Tree,
|
2022-07-30 13:28:08 +00:00
|
|
|
Flat,
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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,
|
|
|
|
}
|
2022-06-23 19:44:05 +00:00
|
|
|
|
|
|
|
export enum PurgeType {
|
|
|
|
Person,
|
|
|
|
Community,
|
|
|
|
Post,
|
|
|
|
Comment,
|
|
|
|
}
|