]> Untitled Git - lemmy-ui.git/blobdiff - src/shared/interfaces.ts
First pass at v2_api
[lemmy-ui.git] / src / shared / interfaces.ts
index df083b9bcfad9267399989645c190e5c59b6210a..116f5d150323f89ee5f61f0b48507568157fd085 100644 (file)
@@ -1,9 +1,14 @@
-import { GetSiteResponse, LemmyHttp } from 'lemmy-js-client';
+import {
+  CommentView,
+  GetSiteResponse,
+  LemmyHttp,
+  UserMentionView,
+} from 'lemmy-js-client';
 
 export interface IsoData {
   path: string;
   routeData: any[];
-  site: GetSiteResponse;
+  site_res: GetSiteResponse;
   // Lang and theme
   lang: string;
   // communities?: ListCommunitiesResponse;
@@ -21,6 +26,20 @@ export interface InitialFetchRequest {
   client: LemmyHttp;
 }
 
+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;
+}
+
 export enum CommentSortType {
   Hot,
   Top,