import { NativeEventEmitter } from 'react-native'; import { Inbox, Message } from './leanplum-inbox-types'; /** * Leanplum Inbox Manager */ declare class LeanplumInboxManager extends NativeEventEmitter { /** NativeModule of react-native. */ private readonly nativeModule; /** Listener name used when inbox receive new messages from the server.*/ private static readonly ON_CHANGED_LISTENER; /** Listener name used when forceContentUpdate was called.*/ private static readonly ON_FORCE_CONTENT_UPDATE_LISTENER; /** * Creates an instance of LeanplumInboxManager. * @param nativeModule the NativeModule of react-native */ constructor(nativeModule: any); /** * Returns an instance of Inbox object * @returns inbox. */ inbox(): Promise; /** * Returns the message identifier of the newsfeed message. * @param messageId. * @returns message. */ message(messageId: string): Promise; /** * Read the inbox message, marking it as read and invoking its open action. * @param messageId */ read(messageId: string): void; /** * Read the inbox message, marking it as read without invoking open action. * @param messageId */ markAsRead(messageId: string): void; /** * Remove the inbox message from the inbox. * @param messageId */ remove(messageId: string): void; /** * Register a callback for when the inbox receives new values from the server. * @param callback to be invoked with a message as parameter */ onChanged(callback: (leanplumMessage: Message) => void): void; /** * Register a callback for when the forceContentUpdate was called. * @param callback to be invoked with a message as parameter */ onForceContentUpdate(callback: (leanplumMessage: Message) => void): void; } export declare const LeanplumInbox: LeanplumInboxManager; export {};