vn-verdnaturachat/app/definitions/IThread.ts

79 lines
1.6 KiB
TypeScript
Raw Normal View History

import Model from '@nozbe/watermelondb/Model';
import { MarkdownAST } from '@rocket.chat/message-parser';
import { IAttachment } from './IAttachment';
import { IEditedBy, IUserChannel, IUserMention, IUserMessage } from './IMessage';
import { IReaction } from './IReaction';
import { SubscriptionType } from './ISubscription';
export interface IUrl {
title: string;
description: string;
image: string;
url: string;
}
interface IFileThread {
_id: string;
name: string;
type: string;
}
export interface IThreadResult {
_id: string;
rid: string;
ts: string;
msg: string;
file?: IFileThread;
files?: IFileThread[];
groupable?: boolean;
attachments?: IAttachment[];
md?: MarkdownAST;
u: IUserMessage;
_updatedAt: string;
urls: IUrl[];
mentions: IUserMention[];
channels: IUserChannel[];
replies: string[];
tcount: number;
tlm: string;
}
export interface IThread {
id: string;
msg?: string;
t?: SubscriptionType;
rid?: string;
_updatedAt?: Date;
ts?: Date;
u?: IUserMessage;
alias?: string;
parseUrls?: boolean;
groupable?: boolean;
avatar?: string;
emoji?: string;
attachments?: IAttachment[];
urls?: IUrl[];
status?: number;
pinned?: boolean;
starred?: boolean;
editedBy?: IEditedBy;
reactions?: IReaction[];
role?: string;
drid?: string;
2022-01-17 14:18:32 +00:00
dcount?: number | string;
dlm?: number;
tmid?: string;
2022-01-17 14:18:32 +00:00
tcount?: number | string;
2022-01-17 20:15:58 +00:00
tlm?: string;
replies?: string[];
mentions?: IUserMention[];
channels?: IUserChannel[];
unread?: boolean;
autoTranslate?: boolean;
translations?: any;
e2e?: string;
}
export type TThreadModel = IThread & Model;