import type { IMessage, IRoom, MessageAttachment, IReadReceiptWithUser, OtrSystemMessages, MessageUrl, IThreadMainMessage } from '@rocket.chat/core-typings'; import type { PaginatedRequest } from '../helpers/PaginatedRequest'; type ChatSendMessage = { message: Partial; previewUrls?: string[]; }; export declare const isChatSendMessageProps: import("ajv").ValidateFunction; type ChatFollowMessage = { mid: IMessage['_id']; }; export declare const isChatFollowMessageProps: import("ajv").ValidateFunction; type ChatUnfollowMessage = { mid: IMessage['_id']; }; export declare const isChatUnfollowMessageProps: import("ajv").ValidateFunction; type ChatGetMessage = { msgId: IMessage['_id']; }; export declare const isChatGetMessageProps: import("ajv").ValidateFunction; type ChatStarMessage = { messageId: IMessage['_id']; }; export declare const isChatStarMessageProps: import("ajv").ValidateFunction; type ChatUnstarMessage = { messageId: IMessage['_id']; }; export declare const isChatUnstarMessageProps: import("ajv").ValidateFunction; type ChatUnpinMessage = { messageId: IMessage['_id']; }; export declare const isChatUnpinMessageProps: import("ajv").ValidateFunction; type ChatGetDiscussions = PaginatedRequest<{ roomId: IRoom['_id']; text?: string; }>; export declare const isChatGetDiscussionsProps: import("ajv").ValidateFunction; type ChatReportMessage = { messageId: IMessage['_id']; description: string; }; export declare const isChatReportMessageProps: import("ajv").ValidateFunction; type ChatGetThreadsList = PaginatedRequest<{ rid: IRoom['_id']; type?: 'unread' | 'following'; text?: string; fields?: string; }>; export declare const isChatGetThreadsListProps: import("ajv").ValidateFunction; type ChatSyncThreadsList = { rid: IRoom['_id']; updatedSince: string; }; export declare const isChatSyncThreadsListProps: import("ajv").ValidateFunction; type ChatDelete = { msgId: IMessage['_id']; roomId: IRoom['_id']; asUser?: boolean; }; export declare const isChatDeleteProps: import("ajv").ValidateFunction; type ChatReact = { emoji: string; messageId: IMessage['_id']; shouldReact?: boolean; } | { reaction: string; messageId: IMessage['_id']; shouldReact?: boolean; }; export declare const isChatReactProps: import("ajv").ValidateFunction; /** * The param `ignore` cannot be boolean, since this is a GET method. Use strings 'true' or 'false' instead. * @param {string} ignore */ type ChatIgnoreUser = { rid: string; userId: string; ignore: string; }; export declare const isChatIgnoreUserProps: import("ajv").ValidateFunction; type ChatSearch = PaginatedRequest<{ roomId: IRoom['_id']; searchText: string; }>; export declare const isChatSearchProps: import("ajv").ValidateFunction; type ChatUpdate = { roomId: IRoom['_id']; msgId: string; text: string; previewUrls?: string[]; customFields: IMessage['customFields']; }; export declare const isChatUpdateProps: import("ajv").ValidateFunction; type ChatGetMessageReadReceipts = { messageId: IMessage['_id']; }; export declare const isChatGetMessageReadReceiptsProps: import("ajv").ValidateFunction; type GetStarredMessages = { roomId: IRoom['_id']; count?: number; offset?: number; sort?: string; }; export declare const isChatGetStarredMessagesProps: import("ajv").ValidateFunction; type GetPinnedMessages = { roomId: IRoom['_id']; count?: number; offset?: number; sort?: string; }; export declare const isChatGetPinnedMessagesProps: import("ajv").ValidateFunction; type GetMentionedMessages = { roomId: IRoom['_id']; count?: number; offset?: number; sort?: string; }; export declare const isChatGetMentionedMessagesProps: import("ajv").ValidateFunction; type ChatSyncMessages = { roomId: IRoom['_id']; lastUpdate?: string; count?: number; next?: string; previous?: string; type?: 'UPDATED' | 'DELETED'; }; export declare const isChatSyncMessagesProps: import("ajv").ValidateFunction; type ChatSyncThreadMessages = PaginatedRequest<{ tmid: string; updatedSince: string; }>; export declare const isChatSyncThreadMessagesProps: import("ajv").ValidateFunction; type ChatGetThreadMessages = PaginatedRequest<{ tmid: string; }>; export declare const isChatGetThreadMessagesProps: import("ajv").ValidateFunction; type ChatGetDeletedMessages = PaginatedRequest<{ roomId: IRoom['_id']; since: string; }>; export declare const isChatGetDeletedMessagesProps: import("ajv").ValidateFunction; type ChatPostMessage = { roomId: string | string[]; text?: string; alias?: string; emoji?: string; avatar?: string; attachments?: MessageAttachment[]; customFields?: IMessage['customFields']; } | { channel: string | string[]; text?: string; alias?: string; emoji?: string; avatar?: string; attachments?: MessageAttachment[]; customFields?: IMessage['customFields']; }; export declare const isChatPostMessageProps: import("ajv").ValidateFunction; type ChatGetURLPreview = { roomId: IRoom['_id']; url: string; }; export declare const isChatGetURLPreviewProps: import("ajv").ValidateFunction; type ChatOTR = { roomId: string; type: OtrSystemMessages; }; export declare const isChatOTRProps: import("ajv").ValidateFunction; export type ChatEndpoints = { '/v1/chat.sendMessage': { POST: (params: ChatSendMessage) => { message: IMessage; }; }; '/v1/chat.getMessage': { GET: (params: ChatGetMessage) => { message: IMessage; }; }; '/v1/chat.followMessage': { POST: (params: ChatFollowMessage) => void; }; '/v1/chat.unfollowMessage': { POST: (params: ChatUnfollowMessage) => void; }; '/v1/chat.starMessage': { POST: (params: ChatStarMessage) => void; }; '/v1/chat.unStarMessage': { POST: (params: ChatUnstarMessage) => void; }; '/v1/chat.unPinMessage': { POST: (params: ChatUnpinMessage) => void; }; '/v1/chat.reportMessage': { POST: (params: ChatReportMessage) => void; }; '/v1/chat.getDiscussions': { GET: (params: ChatGetDiscussions) => { messages: IMessage[]; total: number; }; }; '/v1/chat.getThreadsList': { GET: (params: ChatGetThreadsList) => { threads: IThreadMainMessage[]; total: number; }; }; '/v1/chat.syncThreadsList': { GET: (params: ChatSyncThreadsList) => { threads: { update: IMessage[]; remove: IMessage[]; }; }; }; '/v1/chat.delete': { POST: (params: ChatDelete) => { _id: string; ts: string; message: Pick; }; }; '/v1/chat.react': { POST: (params: ChatReact) => void; }; '/v1/chat.ignoreUser': { GET: (params: ChatIgnoreUser) => void; }; '/v1/chat.search': { GET: (params: ChatSearch) => { messages: IMessage[]; }; }; '/v1/chat.update': { POST: (params: ChatUpdate) => { message: IMessage; }; }; '/v1/chat.getMessageReadReceipts': { GET: (params: ChatGetMessageReadReceipts) => { receipts: IReadReceiptWithUser[]; }; }; '/v1/chat.getStarredMessages': { GET: (params: GetStarredMessages) => { messages: IMessage[]; count: number; offset: number; total: number; }; }; '/v1/chat.getPinnedMessages': { GET: (params: GetPinnedMessages) => { messages: IMessage[]; count: number; offset: number; total: number; }; }; '/v1/chat.getMentionedMessages': { GET: (params: GetMentionedMessages) => { messages: IMessage[]; count: number; offset: number; total: number; }; }; '/v1/chat.syncMessages': { GET: (params: ChatSyncMessages) => { result: { updated: IMessage[]; deleted: IMessage[]; cursor: { next: string | null; previous: string | null; }; }; }; }; '/v1/chat.postMessage': { POST: (params: ChatPostMessage) => { ts: number; channel: IRoom; message: IMessage; }; }; '/v1/chat.syncThreadMessages': { GET: (params: ChatSyncThreadMessages) => { messages: { update: IMessage[]; remove: IMessage[]; }; }; }; '/v1/chat.getThreadMessages': { GET: (params: ChatGetThreadMessages) => { messages: IMessage[]; count: number; offset: number; total: number; }; }; '/v1/chat.getDeletedMessages': { GET: (params: ChatGetDeletedMessages) => { messages: IMessage[]; count: number; offset: number; total: number; }; }; '/v1/chat.otr': { POST: (params: ChatOTR) => void; }; '/v1/chat.getURLPreview': { GET: (params: ChatGetURLPreview) => { urlPreview: MessageUrl; }; }; }; export {}; //# sourceMappingURL=chat.d.ts.map