UNPKG

2.13 kBTypeScriptView Raw
1import { EventSubscription } from 'fbemitter';
2import { Notification, LocalNotification, Channel, ActionType, LocalNotificationId } from './Notifications.types';
3export declare function emitNotification(notification: any): void;
4declare const _default: {
5 _setInitialNotification(notification: Notification): void;
6 createCategoryAsync(categoryId: string, actions: ActionType[], previewPlaceholder?: string | undefined): Promise<void>;
7 deleteCategoryAsync(categoryId: string): Promise<void>;
8 getExpoPushTokenAsync(): Promise<string>;
9 getDevicePushTokenAsync: (config: {
10 gcmSenderId?: string;
11 }) => Promise<{
12 type: string;
13 data: string;
14 }>;
15 createChannelAndroidAsync(id: string, channel: Channel): Promise<void>;
16 deleteChannelAndroidAsync(id: string): Promise<void>;
17 presentLocalNotificationAsync(notification: LocalNotification): Promise<LocalNotificationId>;
18 scheduleLocalNotificationAsync(notification: LocalNotification, options?: {
19 time?: Date | number;
20 repeat?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
21 intervalMs?: number;
22 }): Promise<LocalNotificationId>;
23 dismissNotificationAsync(notificationId: LocalNotificationId): Promise<void>;
24 dismissAllNotificationsAsync(): Promise<void>;
25 cancelScheduledNotificationAsync(notificationId: LocalNotificationId): Promise<void>;
26 cancelAllScheduledNotificationsAsync(): Promise<void>;
27 addListener(listener: (notification: Notification) => unknown): EventSubscription;
28 getBadgeNumberAsync(): Promise<number>;
29 setBadgeNumberAsync(number: number): Promise<void>;
30 scheduleNotificationWithCalendarAsync(notification: LocalNotification, options?: {
31 year?: number;
32 month?: number;
33 hour?: number;
34 day?: number;
35 minute?: number;
36 second?: number;
37 weekDay?: number;
38 repeat?: boolean;
39 }): Promise<string>;
40 scheduleNotificationWithTimerAsync(notification: LocalNotification, options: {
41 interval: number;
42 repeat?: boolean;
43 }): Promise<string>;
44};
45export default _default;