@trycourier/courier-react-native
Version:
Inbox, Push Notifications, and Preferences for React Native
94 lines • 4.01 kB
TypeScript
import { CourierGetInboxMessageResponse, CourierGetInboxMessagesResponse } from "../models/CourierInboxMessages";
export declare class InboxClient {
readonly clientId: string;
constructor(clientId: string);
/**
* Retrieves messages from the inbox.
* @param props - The properties for getting messages.
* @param props.paginationLimit - Optional. The number of messages to retrieve per page. Defaults to 24.
* @param props.startCursor - Optional. The cursor to start retrieving messages from.
* @returns A promise that resolves with the CourierGetInboxMessagesResponse containing the messages.
*/
getMessages(props: {
paginationLimit?: number;
startCursor?: string;
}): Promise<CourierGetInboxMessagesResponse>;
/**
* Retrieves archived messages from the inbox.
* @param props - The properties for getting archived messages.
* @param props.paginationLimit - Optional. The number of messages to retrieve per page. Defaults to 24.
* @param props.startCursor - Optional. The cursor to start retrieving messages from.
* @returns A promise that resolves with the CourierGetInboxMessagesResponse containing the archived messages.
*/
getArchivedMessages(props: {
paginationLimit?: number;
startCursor?: string;
}): Promise<CourierGetInboxMessagesResponse>;
/**
* Retrieves a specific message by its ID.
* @param props - The properties for getting the message.
* @param props.messageId - The ID of the message to retrieve.
* @returns A promise that resolves with the CourierGetInboxMessageResponse containing the message.
*/
getMessageById(props: {
messageId: String;
}): Promise<CourierGetInboxMessageResponse>;
/**
* Retrieves the count of unread messages in the inbox.
* @returns A promise that resolves with the number of unread messages.
*/
getUnreadMessageCount(): Promise<number>;
/**
* Marks a message as opened.
* @param props - The properties for opening the message.
* @param props.messageId - The ID of the message to mark as opened.
* @returns A promise that resolves with a number indicating the operation result.
*/
open(props: {
messageId: String;
}): Promise<number>;
/**
* Marks a message as read.
* @param props - The properties for reading the message.
* @param props.messageId - The ID of the message to mark as read.
* @returns A promise that resolves with a number indicating the operation result.
*/
read(props: {
messageId: String;
}): Promise<number>;
/**
* Marks a message as unread.
* @param props - The properties for marking the message as unread.
* @param props.messageId - The ID of the message to mark as unread.
* @returns A promise that resolves with a number indicating the operation result.
*/
unread(props: {
messageId: String;
}): Promise<number>;
/**
* Records a click event for a message.
* @param props - The properties for clicking the message.
* @param props.messageId - The ID of the message that was clicked.
* @param props.trackingId - The tracking ID associated with the click event.
* @returns A promise that resolves with a number indicating the operation result.
*/
click(props: {
messageId: String;
trackingId: string;
}): Promise<number>;
/**
* Archives a message.
* @param props - The properties for archiving the message.
* @param props.messageId - The ID of the message to archive.
* @returns A promise that resolves with a number indicating the operation result.
*/
archive(props: {
messageId: String;
}): Promise<number>;
/**
* Marks all messages as read.
* @returns A promise that resolves with a number indicating the operation result.
*/
readAll(): Promise<number>;
}
//# sourceMappingURL=InboxClient.d.ts.map