]> Untitled Git - lemmy.git/blobdiff - ui/src/interfaces.ts
Merge branch 'dev' into federation
[lemmy.git] / ui / src / interfaces.ts
index b9842516167733e345d4cb4ec11364b022c5ff19..12430836c45d1b0ad9f95f550bdc4a6d1ea2e210 100644 (file)
@@ -43,6 +43,8 @@ export enum UserOperation {
   GetPrivateMessages,
   UserJoin,
   GetComments,
+  GetSiteConfig,
+  SaveSiteConfig,
 }
 
 export enum CommentSortType {
@@ -724,6 +726,19 @@ export interface SiteForm {
   auth?: string;
 }
 
+export interface GetSiteConfig {
+  auth?: string;
+}
+
+export interface GetSiteConfigResponse {
+  config_hjson: string;
+}
+
+export interface SiteConfigForm {
+  config_hjson: string;
+  auth?: string;
+}
+
 export interface GetSiteResponse {
   site: Site;
   admins: Array<UserView>;
@@ -871,7 +886,8 @@ export type MessageType =
   | PasswordChangeForm
   | PrivateMessageForm
   | EditPrivateMessageForm
-  | GetPrivateMessagesForm;
+  | GetPrivateMessagesForm
+  | SiteConfigForm;
 
 type ResponseType =
   | SiteResponse
@@ -893,7 +909,8 @@ type ResponseType =
   | BanUserResponse
   | AddAdminResponse
   | PrivateMessageResponse
-  | PrivateMessagesResponse;
+  | PrivateMessagesResponse
+  | GetSiteConfigResponse;
 
 export interface WebSocketResponse {
   op: UserOperation;