import type { PluginListenerHandle } from '@capacitor/core'; import type { AirshipPluginWrapper } from './AirshipPlugin'; import type { InboxMessage, DisplayMessageCenterEvent, MessageCenterUpdatedEvent } from './types'; /** * Airship Message Center */ export declare class AirshipMessageCenter { private readonly plugin; constructor(plugin: AirshipPluginWrapper); /** * Gets the unread count. * @returns A promise with the result. */ getUnreadCount(): Promise; /** * Gets the inbox messages. * @returns A promise with the result. */ getMessages(): Promise; /** * Marks a message as read. * @param messageId The message Id. * @returns A promise. Will reject if the message is not * found or if takeOff is not called. */ markMessageRead(messageId: string): Promise; /** * Deletes a message. * @param messageId The message Id. * @returns A promise. Will reject if the message is not * found or if takeOff is not called. */ deleteMessage(messageId: string): Promise; /** * Dismisses the OOTB message center if displayed. * @returns A promise. */ dismiss(): Promise; /** * Requests to display the Message Center. * * Will either emit an event to display the * Message Center if auto launch message center * is disabled, or display the OOTB message center. * @param messageId Optional message Id. * @returns A promise. */ display(messageId?: string): Promise; /** * Overlays the message view. Should be used to display the actual * message body in a custom Message Center. * * @param messageId The message Id. * @returns A promise. */ showMessageView(messageId: string): Promise; /** * Overlays the message center regardless if auto launch Message Center is enabled or not. * * @param messageId Optional message Id. * @returns A promise. */ showMessageCenter(messageId?: string): Promise; /** * Refreshes the messages. * @returns A promise. Will reject if the list fails to refresh or if * takeOff is not called yet. */ refreshMessages(): Promise; /** * Enables or disables showing the OOTB UI when requested to display by either * `display` or by a notification with a Message Center action. * @param autoLaunch true to show OOTB UI, false to emit events. */ setAutoLaunchDefaultMessageCenter(autoLaunch: boolean): Promise; /** * Adds a display message center listener. */ onDisplay(listener: (event: DisplayMessageCenterEvent) => void): Promise; /** * Adds a message center list updated listener. */ onUpdated(listener: (event: MessageCenterUpdatedEvent) => void): Promise; }