cleanup, re-organize
This commit is contained in:
+37
-1
@@ -1 +1,37 @@
|
|||||||
// this file is responsible for managing chats and chat messages. objects are delegated to objectModel.ts.
|
// this file is responsible for managing chats and chat messages. objects are delegated to objectModel.ts.
|
||||||
|
|
||||||
|
// types
|
||||||
|
export interface ChatMessage {
|
||||||
|
dataVersion: "v2";
|
||||||
|
|
||||||
|
channel: string;
|
||||||
|
sender: string;
|
||||||
|
body: string;
|
||||||
|
dateSent: string;
|
||||||
|
|
||||||
|
stringifiedObject?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChatObject {
|
||||||
|
dataVersion: "v2";
|
||||||
|
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
|
||||||
|
contentVersions: { [key: string]: MessageObjectContent };
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MessageObjectContent {
|
||||||
|
dataVersion: "v2";
|
||||||
|
|
||||||
|
id: string;
|
||||||
|
creationDate: string;
|
||||||
|
|
||||||
|
noteText?: string;
|
||||||
|
priority?: number;
|
||||||
|
category?: string;
|
||||||
|
status?: string;
|
||||||
|
date?: string;
|
||||||
|
time?: string;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
export interface ChatMessage {
|
|
||||||
dataVersion: "v2";
|
|
||||||
|
|
||||||
channel: string;
|
|
||||||
sender: string;
|
|
||||||
body: string;
|
|
||||||
dateSent: string;
|
|
||||||
|
|
||||||
stringifiedObject?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ChatObject {
|
|
||||||
dataVersion: "v2";
|
|
||||||
|
|
||||||
id: string;
|
|
||||||
title: string;
|
|
||||||
|
|
||||||
contentVersions: { [key: string]: MessageObjectContent };
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MessageObjectContent {
|
|
||||||
dataVersion: "v2";
|
|
||||||
|
|
||||||
id: string;
|
|
||||||
creationDate: string;
|
|
||||||
|
|
||||||
noteText?: string;
|
|
||||||
priority?: number;
|
|
||||||
category?: string;
|
|
||||||
status?: string;
|
|
||||||
date?: string;
|
|
||||||
time?: string;
|
|
||||||
}
|
|
||||||
@@ -57,6 +57,7 @@ export default class ConnectionModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// types
|
||||||
export interface ConnectionModelConfiguration {
|
export interface ConnectionModelConfiguration {
|
||||||
connectionChangeHandler: () => void;
|
connectionChangeHandler: () => void;
|
||||||
messageHandler: (data: Message) => void;
|
messageHandler: (data: Message) => void;
|
||||||
|
|||||||
Reference in New Issue
Block a user