From 079312895b3bdc6b934ca51a377cf44419306e8d Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 15 Dec 2022 09:54:03 -0800 Subject: [PATCH] Add missing types to PushNotificationIOS Summary: Adds some types referenced on the React Native webpage that aren't part of the typings. Changelog: [General][Fixed] - Add missing types to PushNotificationIOS Reviewed By: christophpurrer Differential Revision: D42040583 fbshipit-source-id: be7b86a02e30b99231f3ab35afc3222954f41cf0 --- .../PushNotificationIOS.d.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts b/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts index 5926c7878c3694..364bd8aa01edbf 100644 --- a/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +++ b/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts @@ -49,6 +49,11 @@ export interface PushNotification { */ getData(): Object; + /** + * Gets the thread ID on the notif + */ + getThreadId(): string; + /** * iOS Only * Signifies remote notification handling is complete @@ -135,6 +140,21 @@ export interface PushNotificationIOSStatic { */ cancelAllLocalNotifications(): void; + /** + * Remove all delivered notifications from Notification Center. + */ + removeAllDeliveredNotifications(): void; + + /** + * Provides you with a list of the app’s notifications that are still displayed in Notification Center. + */ + getDeliveredNotifications(callback: (notifications: Object[]) => void): void; + + /** + * Removes the specified notifications from Notification Center + */ + removeDeliveredNotifications(identifiers: string[]): void; + /** * Cancel local notifications. * Optionally restricts the set of canceled notifications to those notifications whose userInfo fields match the corresponding fields in the userInfo argument.