declare const messageTypes: readonly ["text", "audio", "video", "link"]; export type MessageType = (typeof messageTypes)[number]; declare const historyTypes: readonly ["view", "edit"]; export type HistoryType = (typeof historyTypes)[number]; declare const durationUnits: readonly ["ms", "s", "m", "h"]; export type DurationUnit = (typeof durationUnits)[number]; declare class Message { uid: string; type: MessageType; chat: string; sentBy: string; repliedTo?: string; deleted: boolean; deletedAt?: Date; deletedBy?: string; createdAt: Date; history: { type: HistoryType; user: string; extra: { [key: string]: any; }; date: Date; }[]; constructor(data?: Partial); wasViewedBy(userUid: string): boolean; clone(): Message; static isMessage(obj: any): obj is Message; } declare class TextMessage extends Message { type: "text"; text: string; attachments?: { filename: string; extension: string; mimetype: string; size: number; path: string; url: string; }[]; constructor(data?: Partial); clone(): TextMessage; static isTextMessage(obj: any): obj is TextMessage; } declare class AudioMessage extends Message { type: "audio"; audio: { url: string; duration: number; unit: DurationUnit; }; constructor(data?: Partial); clone(): AudioMessage; static isAudioMessage(obj: any): obj is AudioMessage; } declare class VideoMessage extends Message { type: "video"; video: { url: string; duration: number; unit: DurationUnit; }; constructor(data?: Partial); clone(): VideoMessage; static isVideoMessage(obj: any): obj is VideoMessage; } export default Message; export { TextMessage, AudioMessage, VideoMessage };