]> Untitled Git - lemmy-ui.git/blob - src/shared/interfaces.ts
Adding a few missing langs. (#325)
[lemmy-ui.git] / src / shared / interfaces.ts
1 import {
2   CommentView,
3   GetSiteResponse,
4   LemmyHttp,
5   PersonMentionView,
6 } from "lemmy-js-client";
7
8 export interface IsoData {
9   path: string;
10   routeData: any[];
11   site_res: GetSiteResponse;
12 }
13
14 export interface ILemmyConfig {
15   wsHost?: string;
16 }
17
18 declare global {
19   interface Window {
20     isoData: IsoData;
21     lemmyConfig?: ILemmyConfig;
22   }
23 }
24
25 export interface InitialFetchRequest {
26   auth: string;
27   path: string;
28   client: LemmyHttp;
29 }
30
31 export interface CommentNode {
32   comment_view: CommentView | PersonMentionView;
33   children?: CommentNode[];
34   depth?: number;
35 }
36
37 export interface PostFormParams {
38   name: string;
39   url?: string;
40   body?: string;
41   community_name?: string;
42   community_id?: number;
43 }
44
45 export enum CommentSortType {
46   Hot,
47   Top,
48   New,
49   Old,
50 }
51
52 export enum CommentViewType {
53   Tree,
54   Chat,
55 }
56
57 export enum DataType {
58   Post,
59   Comment,
60 }
61
62 export enum BanType {
63   Community,
64   Site,
65 }
66
67 export enum PersonDetailsView {
68   Overview,
69   Comments,
70   Posts,
71   Saved,
72 }