1 import { CommentView, GetSiteResponse } from "lemmy-js-client";
2 import type { ParsedQs } from "qs";
3 import { RequestState, WrappedLemmyHttp } from "./services/HttpService";
4 import { ErrorPageData } from "./utils";
7 * This contains serialized data, it needs to be deserialized before use.
9 export interface IsoData<T extends Record<string, RequestState<any>> = any> {
12 site_res: GetSiteResponse;
13 errorPageData?: ErrorPageData;
16 export type IsoDataOptionalSite<
17 T extends Record<string, RequestState<any>> = any
18 > = Partial<IsoData<T>> &
19 Pick<IsoData<T>, Exclude<keyof IsoData<T>, "site_res">>;
21 export interface ILemmyConfig {
28 lemmyConfig?: ILemmyConfig;
32 export interface InitialFetchRequest<T extends ParsedQs = ParsedQs> {
34 client: WrappedLemmyHttp;
37 site: GetSiteResponse;
40 export interface PostFormParams {
46 export enum CommentViewType {
51 export enum DataType {
61 export enum PersonDetailsView {
62 Overview = "Overview",
63 Comments = "Comments",
68 export enum PurgeType {
75 export enum VoteType {
80 export interface CommentNodeI {
81 comment_view: CommentView;
82 children: Array<CommentNodeI>;