verdnatura-chat/app/definitions/IThread.ts

45 lines
926 B
TypeScript
Raw Normal View History

import Model from '@nozbe/watermelondb/Model';
import { MarkdownAST } from '@rocket.chat/message-parser';
import { IAttachment } from './IAttachment';
import { IMessage, IUserChannel, IUserMention, IUserMessage } from './IMessage';
import { IUrl } from './IUrl';
interface IFileThread {
_id: string;
name: string;
type: string;
}
export interface IThreadResult {
id: string;
_id: string;
rid: string;
ts: string | Date;
msg?: string;
file?: IFileThread;
files?: IFileThread[];
groupable?: boolean;
attachments?: IAttachment[];
md?: MarkdownAST;
u: IUserMessage;
_updatedAt: string | Date;
urls?: IUrl[];
mentions?: IUserMention[];
channels?: IUserChannel[];
replies?: string[];
tcount?: number;
status?: number;
tlm?: string | Date;
}
export interface IThread extends IMessage {
tmsg?: string;
draftMessage?: string;
}
2022-11-29 13:58:57 +00:00
export type TThreadModel = IThread &
Model & {
asPlain: () => IThread;
};