UNPKG

one

Version:

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

56 lines • 3.61 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 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 setCategory(identifier: string, actions: NotificationAction[], options?: NotificationCategoryOptions): Promise<NotificationCategory>; declare function getCategories(): Promise<NotificationCategory[]>; declare function deleteCategory(identifier: string): Promise<boolean>; 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.native.d.ts.map