import Base, { MaybeRaw } from "../../../../Base"; import { PaginatedResponse, SearchParams } from "../../../../interfaces/global"; import { Message, RecipientType } from "../../../../interfaces/idp/user/Message"; export declare class IdpMessage extends Base { /** * Search all messages of the requesting user. * @returns Paginated response of Message objects */ searchMessages({ filters, sorting, limit, page }: SearchParams, raw?: { raw: R; }): Promise>>; /** * Retrieves a single message by ID. * @param messageId ID of the message * @returns The requested Message object */ getMessage(messageId: string, raw?: { raw: R; }): Promise>; /** * Mark message as read or unread. * * @param messageId ID of the Message object * @returns the updated Message object */ updateMessage(messageId: string, read: boolean, raw?: { raw: R; }): Promise>; /** * Deletes a message of the requesting User. * @param messageId Id of the Message */ deleteMessage(messageId: string, raw?: { raw: R; }): Promise>; /** * Send message to single user or all users of organization or team. * * This is an internal endpoint. * * @param msg Message to send * - to - should be email, orgName or teamName * - recipient - enum type USER, ORGANIZATION or TEAM (by default is USER) * - orgName - should be only specified if recipient===TEAM * - title - title of the message (max 255 characters) * - subject - subject of the message (max 255 characters) * - message - content of the message (max 5000 characters) * @returns the Message object */ sendMessage(msg: { to: string; recipient?: RecipientType; orgName?: string; title?: string; subject?: string; message: string; link?: string; }, raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }