summaryrefslogtreecommitdiffstats
path: root/ui/src/interfaces.ts
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-01-22 16:35:29 -0500
committerDessalines <tyhou13@gmx.com>2020-01-22 16:38:16 -0500
commit253bc3e0afb6adf64b79f334a8bc1f972aa45eba (patch)
treebdbbb36ee59ea4331c7bf7cf89e8ef554eb2d63e /ui/src/interfaces.ts
parenta964b4ce21cc19eb42ae4da1a1aef8bfc0a1df5c (diff)
Adding private messaging, and matrix user ids.
- Fixes #244
Diffstat (limited to 'ui/src/interfaces.ts')
-rw-r--r--ui/src/interfaces.ts55
1 files changed, 55 insertions, 0 deletions
diff --git a/ui/src/interfaces.ts b/ui/src/interfaces.ts
index c21d3d26..fc7d8cb7 100644
--- a/ui/src/interfaces.ts
+++ b/ui/src/interfaces.ts
@@ -38,6 +38,9 @@ export enum UserOperation {
DeleteAccount,
PasswordReset,
PasswordChange,
+ CreatePrivateMessage,
+ EditPrivateMessage,
+ GetPrivateMessages,
}
export enum CommentSortType {
@@ -89,6 +92,7 @@ export interface UserView {
name: string;
avatar?: string;
email?: string;
+ matrix_user_id?: string;
fedi_name: string;
published: string;
number_of_posts: number;
@@ -218,6 +222,21 @@ export interface Site {
enable_nsfw: boolean;
}
+export interface PrivateMessage {
+ id: number;
+ creator_id: number;
+ recipient_id: number;
+ content: string;
+ deleted: boolean;
+ read: boolean;
+ published: string;
+ updated?: string;
+ creator_name: string;
+ creator_avatar?: string;
+ recipient_name: string;
+ recipient_avatar?: string;
+}
+
export enum BanType {
Community,
Site,
@@ -490,6 +509,7 @@ export interface UserSettingsForm {
lang: string;
avatar?: string;
email?: string;
+ matrix_user_id?: string;
new_password?: string;
new_password_verify?: string;
old_password?: string;
@@ -729,3 +749,38 @@ export interface PasswordChangeForm {
password: string;
password_verify: string;
}
+
+export interface PrivateMessageForm {
+ content: string;
+ recipient_id: number;
+ auth?: string;
+}
+
+export interface PrivateMessageFormParams {
+ recipient_id: number;
+}
+
+export interface EditPrivateMessageForm {
+ edit_id: number;
+ content?: string;
+ deleted?: boolean;
+ read?: boolean;
+ auth?: string;
+}
+
+export interface GetPrivateMessagesForm {
+ unread_only: boolean;
+ page?: number;
+ limit?: number;
+ auth?: string;
+}
+
+export interface PrivateMessagesResponse {
+ op: string;
+ messages: Array<PrivateMessage>;
+}
+
+export interface PrivateMessageResponse {
+ op: string;
+ message: PrivateMessage;
+}