2020-12-24 01:58:27 +00:00
|
|
|
import {
|
|
|
|
CommentView,
|
|
|
|
GetSiteResponse,
|
|
|
|
LemmyHttp,
|
|
|
|
UserMentionView,
|
|
|
|
} 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 15:32:07 +00:00
|
|
|
// Lang and theme
|
|
|
|
lang: string;
|
2020-09-07 03:41:46 +00:00
|
|
|
// communities?: ListCommunitiesResponse;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
interface Window {
|
|
|
|
isoData: IsoData;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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 {
|
|
|
|
comment_view: CommentView | UserMentionView;
|
|
|
|
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,
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum UserDetailsView {
|
|
|
|
Overview,
|
|
|
|
Comments,
|
|
|
|
Posts,
|
|
|
|
Saved,
|
|
|
|
}
|