import Base, { MaybeRaw } from "../../../../Base"; import { PaginatedResponse, SearchParams } from "../../../../interfaces/global"; import { Message, MessageLevel, MessageSource, MessageType, 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>; /** * Bulk-update the read status of multiple messages by ID. * * @param ids IDs of the messages to update * @param read Read status to apply to all specified messages * @returns The number of messages that were modified */ bulkReadMessages(ids: string[], read: boolean, raw?: { raw: R; }): Promise>; /** * Set the soft-delete state of a received message. * * @param messageId ID of the Message object * @param deleted Whether the message should be soft-deleted (true) or restored (false) * @returns the updated Message object */ softDeleteMessage(messageId: string, deleted: 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 * - source - the system or service that originated this message * - type - the specific type of message, scoped to its source * - properties - payload specific to the message source and type * - level - severity level of the message (defaults to "info") * - group - optional UUID to group related messages * @returns the Message object */ sendMessage(msg: { to: string; recipient?: RecipientType; orgName?: string; source: MessageSource; type: MessageType; properties: Record; level?: MessageLevel; group?: string; }, raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }