@trycourier/courier-react-native
Version:
Inbox, Push Notifications, and Preferences for React Native
39 lines • 1.9 kB
TypeScript
import { CourierUserPreferences, CourierUserPreferencesChannel, CourierUserPreferencesStatus, CourierUserPreferencesTopic } from "../models/CourierUserPreferences";
export declare class PreferenceClient {
readonly clientId: string;
constructor(clientId: string);
/**
* Retrieves user preferences.
* @param props - Optional properties for pagination.
* @param props.paginationCursor - Optional cursor for pagination.
* @returns A promise that resolves with CourierUserPreferences containing user preference items and paging information.
*/
getUserPreferences(props?: {
paginationCursor?: string;
}): Promise<CourierUserPreferences>;
/**
* Retrieves user preference for a specific topic.
* @param props - Properties for getting the user preference topic.
* @param props.topicId - The ID of the topic to retrieve preferences for.
* @returns A promise that resolves with CourierUserPreferencesTopic containing the topic preference details.
*/
getUserPreferenceTopic(props: {
topicId: string;
}): Promise<CourierUserPreferencesTopic>;
/**
* Updates user preference for a specific topic.
* @param props - Properties for updating the user preference topic.
* @param props.topicId - The ID of the topic to update preferences for.
* @param props.status - The new status for the topic preference.
* @param props.hasCustomRouting - Whether the topic has custom routing.
* @param props.customRouting - Array of custom routing channels.
* @returns A promise that resolves when the update is complete.
*/
putUserPreferenceTopic(props: {
topicId: string;
status: CourierUserPreferencesStatus;
hasCustomRouting: boolean;
customRouting: CourierUserPreferencesChannel[];
}): Promise<void>;
}
//# sourceMappingURL=PreferenceClient.d.ts.map