UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

56 lines • 3.62 kB
import type { DevicePushToken, Notification, NotificationAction, NotificationCategory, NotificationCategoryOptions, NotificationChannel, NotificationChannelInput, NotificationHandlerInput, NotificationPermissionRequest, NotificationPermissionResponse, NotificationResponse, NotificationScheduleInput, NotificationSubscription, ScheduledNotification } from './types'; export type * from './types'; declare function getPermissions(): Promise<NotificationPermissionResponse>; declare function requestPermissions(_options?: NotificationPermissionRequest): Promise<NotificationPermissionResponse>; declare function setCategory(identifier: string, actions: NotificationAction[], options?: NotificationCategoryOptions): Promise<NotificationCategory>; declare function getCategories(): Promise<NotificationCategory[]>; declare function deleteCategory(identifier: string): Promise<boolean>; declare function getBadgeCount(): Promise<number>; declare function setBadgeCount(_count: number): Promise<boolean>; declare function setChannel(_channelId: string, channel: NotificationChannelInput): Promise<NotificationChannel | null>; declare function getChannel(_channelId: string): Promise<NotificationChannel | null>; declare function getChannels(): Promise<NotificationChannel[]>; declare function deleteChannel(_channelId: string): Promise<void>; declare function addReceivedListener(_listener: (notification: Notification) => void): NotificationSubscription; declare function addResponseReceivedListener(_listener: (response: NotificationResponse) => void): NotificationSubscription; declare function getDevicePushToken(): Promise<DevicePushToken>; declare function addPushTokenListener(_listener: (token: DevicePushToken) => void): NotificationSubscription; declare function setHandler(_handler: NotificationHandlerInput | null): void; declare function getLastResponse(): NotificationResponse | null; declare function clearLastResponse(): void; declare function schedule(_request: NotificationScheduleInput): Promise<string>; declare function cancelScheduled(_identifier: string): Promise<void>; declare function cancelAllScheduled(): Promise<void>; declare function getAllScheduled(): Promise<ScheduledNotification[]>; declare function getPresented(): Promise<Notification[]>; declare function dismiss(_identifier: string): Promise<void>; declare function dismissAll(): Promise<void>; export declare const Notifications: Readonly<{ getPermissions: typeof getPermissions; requestPermissions: typeof requestPermissions; getBadgeCount: typeof getBadgeCount; setBadgeCount: typeof setBadgeCount; setCategory: typeof setCategory; getCategories: typeof getCategories; deleteCategory: typeof deleteCategory; setChannel: typeof setChannel; getChannel: typeof getChannel; getChannels: typeof getChannels; deleteChannel: typeof deleteChannel; addReceivedListener: typeof addReceivedListener; addResponseReceivedListener: typeof addResponseReceivedListener; getDevicePushToken: typeof getDevicePushToken; addPushTokenListener: typeof addPushTokenListener; setHandler: typeof setHandler; getLastResponse: typeof getLastResponse; clearLastResponse: typeof clearLastResponse; schedule: typeof schedule; cancelScheduled: typeof cancelScheduled; cancelAllScheduled: typeof cancelAllScheduled; getAllScheduled: typeof getAllScheduled; getPresented: typeof getPresented; dismiss: typeof dismiss; dismissAll: typeof dismissAll; DEFAULT_ACTION_IDENTIFIER: "expo.modules.notifications.actions.DEFAULT"; }>; //# sourceMappingURL=index.d.ts.map