/* * Copyright (c) 2016-present Invertase Limited */ import type { TurboModule } from 'react-native'; import { TurboModuleRegistry } from 'react-native'; export interface Spec extends TurboModule { // Constants (Android only; iOS returns 0) getConstants(): { ANDROID_API_LEVEL: number }; // ─── Shared ─────────────────────────────────────────────────────────────── cancelAllNotifications(): Promise; cancelDisplayedNotifications(): Promise; cancelTriggerNotifications(): Promise; cancelAllNotificationsWithIds( ids: Array, notificationType: number, tag: string | null, ): Promise; getDisplayedNotifications(): Promise>; getTriggerNotifications(): Promise>; getTriggerNotificationIds(): Promise>; displayNotification(notification: Object): Promise; createTriggerNotification(notification: Object, trigger: Object): Promise; requestPermission(permissions: Object): Promise; getNotificationSettings(): Promise; getInitialNotification(): Promise; // ─── Android-only ───────────────────────────────────────────────────────── createChannel(channelMap: Object): Promise; createChannels(channelsArray: Array): Promise; createChannelGroup(channelGroupMap: Object): Promise; createChannelGroups(channelGroupsArray: Array): Promise; deleteChannel(channelId: string): Promise; deleteChannelGroup(channelGroupId: string): Promise; getChannel(channelId: string): Promise; getChannels(): Promise>; getChannelGroup(channelGroupId: string): Promise; getChannelGroups(): Promise>; isChannelCreated(channelId: string): Promise; isChannelBlocked(channelId: string): Promise; openAlarmPermissionSettings(): Promise; openNotificationSettings(channelId: string | null): Promise; openBatteryOptimizationSettings(): Promise; isBatteryOptimizationEnabled(): Promise; getPowerManagerInfo(): Promise; openPowerManagerSettings(): Promise; stopForegroundService(): Promise; prewarmForegroundService(): Promise; hideNotificationDrawer(): void; addListener(eventName: string): void; removeListeners(count: number): void; // ─── iOS-only ───────────────────────────────────────────────────────────── cancelNotification(notificationId: string): Promise; cancelDisplayedNotification(notificationId: string): Promise; cancelTriggerNotification(notificationId: string): Promise; cancelDisplayedNotificationsWithIds(ids: Array): Promise; cancelTriggerNotificationsWithIds(ids: Array): Promise; getNotificationCategories(): Promise>; setNotificationCategories(categories: Array): Promise; setBadgeCount(count: number): Promise; getBadgeCount(): Promise; incrementBadgeCount(incrementBy: number): Promise; decrementBadgeCount(decrementBy: number): Promise; setNotificationConfig(config: Object): Promise; } export default TurboModuleRegistry.getEnforcing('NotifeeApiModule');