2022-01-11 13:51:48 +00:00
|
|
|
import Model from '@nozbe/watermelondb/Model';
|
|
|
|
import { MarkdownAST } from '@rocket.chat/message-parser';
|
|
|
|
|
|
|
|
import { IAttachment } from './IAttachment';
|
2022-03-02 14:18:01 +00:00
|
|
|
import { IMessage, IUserChannel, IUserMention, IUserMessage } from './IMessage';
|
2022-02-16 15:17:25 +00:00
|
|
|
import { IUrl } from './IUrl';
|
2022-01-11 13:51:48 +00:00
|
|
|
|
|
|
|
interface IFileThread {
|
|
|
|
_id: string;
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IThreadResult {
|
2022-02-22 16:01:35 +00:00
|
|
|
id: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
_id: string;
|
|
|
|
rid: string;
|
2022-02-17 00:07:24 +00:00
|
|
|
ts: string | Date;
|
|
|
|
msg?: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
file?: IFileThread;
|
|
|
|
files?: IFileThread[];
|
|
|
|
groupable?: boolean;
|
|
|
|
attachments?: IAttachment[];
|
|
|
|
md?: MarkdownAST;
|
|
|
|
u: IUserMessage;
|
2022-02-22 16:01:35 +00:00
|
|
|
_updatedAt: string | Date;
|
2022-02-17 00:07:24 +00:00
|
|
|
urls?: IUrl[];
|
|
|
|
mentions?: IUserMention[];
|
|
|
|
channels?: IUserChannel[];
|
|
|
|
replies?: string[];
|
|
|
|
tcount?: number;
|
2022-02-25 21:32:03 +00:00
|
|
|
status?: string;
|
2022-02-22 16:01:35 +00:00
|
|
|
tlm?: string | Date;
|
2022-01-11 13:51:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-02 14:18:01 +00:00
|
|
|
export interface IThread extends IMessage {
|
2022-02-16 21:14:28 +00:00
|
|
|
tmsg?: string;
|
2022-03-02 14:18:01 +00:00
|
|
|
draftMessage?: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type TThreadModel = IThread & Model;
|