expo-notifications 0.30.1 → 0.30.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/notifications/notifications/categories/serializers/ExpoNotificationsCategoriesSerializer.java +2 -0
- package/android/src/main/java/expo/modules/notifications/tokens/PushTokenModule.kt +4 -5
- package/build/BackgroundNotificationTasksModule.d.ts.map +1 -1
- package/build/BadgeModule.d.ts.map +1 -1
- package/build/BadgeModule.native.d.ts.map +1 -1
- package/build/BadgeModule.web.js.map +1 -1
- package/build/DevicePushTokenAutoRegistration.fx.js.map +1 -1
- package/build/NotificationChannelGroupManager.d.ts.map +1 -1
- package/build/NotificationChannelManager.d.ts.map +1 -1
- package/build/NotificationPermissions.d.ts.map +1 -1
- package/build/NotificationPermissions.js +1 -0
- package/build/NotificationPermissions.js.map +1 -1
- package/build/NotificationPermissionsModule.d.ts.map +1 -1
- package/build/NotificationPermissionsModule.js.map +1 -1
- package/build/NotificationPresenterModule.d.ts.map +1 -1
- package/build/NotificationScheduler.d.ts.map +1 -1
- package/build/Notifications.types.d.ts +1 -0
- package/build/Notifications.types.d.ts.map +1 -1
- package/build/Notifications.types.js.map +1 -1
- package/build/NotificationsEmitter.js.map +1 -1
- package/build/NotificationsEmitterModule.d.ts.map +1 -1
- package/build/NotificationsEmitterModule.js.map +1 -1
- package/build/NotificationsHandler.d.ts.map +1 -1
- package/build/NotificationsHandler.js +1 -0
- package/build/NotificationsHandler.js.map +1 -1
- package/build/NotificationsHandlerModule.d.ts.map +1 -1
- package/build/NotificationsHandlerModule.js.map +1 -1
- package/build/PushTokenManager.d.ts.map +1 -1
- package/build/PushTokenManager.js.map +1 -1
- package/build/ServerRegistrationModule.d.ts.map +1 -1
- package/build/ServerRegistrationModule.web.d.ts.map +1 -1
- package/build/ServerRegistrationModule.web.js.map +1 -1
- package/build/TokenEmitter.js +1 -2
- package/build/TokenEmitter.js.map +1 -1
- package/build/cancelAllScheduledNotificationsAsync.js.map +1 -1
- package/build/cancelScheduledNotificationAsync.js.map +1 -1
- package/build/deleteNotificationCategoryAsync.js.map +1 -1
- package/build/deleteNotificationChannelAsync.android.js.map +1 -1
- package/build/deleteNotificationChannelGroupAsync.android.js.map +1 -1
- package/build/dismissAllNotificationsAsync.js.map +1 -1
- package/build/dismissNotificationAsync.js.map +1 -1
- package/build/getAllScheduledNotificationsAsync.js.map +1 -1
- package/build/getBadgeCountAsync.js.map +1 -1
- package/build/getDevicePushTokenAsync.js.map +1 -1
- package/build/getDevicePushTokenAsync.web.js.map +1 -1
- package/build/getExpoPushTokenAsync.js.map +1 -1
- package/build/getNextTriggerDateAsync.js.map +1 -1
- package/build/getNotificationCategoriesAsync.js.map +1 -1
- package/build/getNotificationChannelAsync.android.js.map +1 -1
- package/build/getNotificationChannelGroupAsync.android.js.map +1 -1
- package/build/getNotificationChannelGroupsAsync.android.js.map +1 -1
- package/build/getNotificationChannelsAsync.android.js.map +1 -1
- package/build/getPresentedNotificationsAsync.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/registerTaskAsync.js.map +1 -1
- package/build/scheduleNotificationAsync.js +1 -1
- package/build/scheduleNotificationAsync.js.map +1 -1
- package/build/setBadgeCountAsync.js +2 -1
- package/build/setBadgeCountAsync.js.map +1 -1
- package/build/setNotificationCategoryAsync.js.map +1 -1
- package/build/setNotificationChannelAsync.android.js.map +1 -1
- package/build/setNotificationChannelGroupAsync.android.js.map +1 -1
- package/build/unregisterForNotificationsAsync.js.map +1 -1
- package/build/unregisterTaskAsync.js.map +1 -1
- package/build/useLastNotificationResponse.d.ts.map +1 -1
- package/build/useLastNotificationResponse.js.map +1 -1
- package/build/utils/mapNotificationResponse.d.ts +12 -12
- package/build/utils/mapNotificationResponse.d.ts.map +1 -1
- package/build/utils/mapNotificationResponse.js +1 -0
- package/build/utils/mapNotificationResponse.js.map +1 -1
- package/build/utils/updateDevicePushTokenAsync.js +3 -3
- package/build/utils/updateDevicePushTokenAsync.js.map +1 -1
- package/build/warnOfExpoGoPushUsage.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/EXNotifications/Notifications/Records.swift +3 -12
- package/ios/EXNotifications/Notifications/Scheduling/SchedulerModule.swift +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.30.1/expo.modules.notifications-0.30.1-sources.jar → 0.30.3/expo.modules.notifications-0.30.3-sources.jar} +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3-sources.jar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3-sources.jar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3-sources.jar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3-sources.jar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.30.1/expo.modules.notifications-0.30.1.aar → 0.30.3/expo.modules.notifications-0.30.3.aar} +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.30.1/expo.modules.notifications-0.30.1.module → 0.30.3/expo.modules.notifications-0.30.3.module} +22 -22
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.30.1/expo.modules.notifications-0.30.1.pom → 0.30.3/expo.modules.notifications-0.30.3.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.3/expo.modules.notifications-0.30.3.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha512 +1 -1
- package/package.json +6 -6
- package/plugin/build/withNotificationsAndroid.d.ts +2 -2
- package/plugin/build/withNotificationsAndroid.js +6 -6
- package/plugin/build/withNotificationsIOS.js +2 -2
- package/src/NotificationPermissions.ts +4 -2
- package/src/Notifications.types.ts +1 -0
- package/src/NotificationsHandler.ts +2 -1
- package/src/TokenEmitter.ts +3 -3
- package/src/setBadgeCountAsync.ts +2 -2
- package/src/utils/mapNotificationResponse.ts +1 -0
- package/src/utils/updateDevicePushTokenAsync.ts +3 -3
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1-sources.jar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1-sources.jar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1-sources.jar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1-sources.jar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.1/expo.modules.notifications-0.30.1.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.30.3 — 2025-04-14
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 0.30.2 — 2025-04-09
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- [Android] Defer calling `addTokenListener` until `OnCreate`. ([#36052](https://github.com/expo/expo/pull/36052) by [@alanjhughes](https://github.com/alanjhughes))
|
|
22
|
+
|
|
13
23
|
## 0.30.1 — 2025-04-08
|
|
14
24
|
|
|
15
25
|
_This version does not introduce any user-facing changes._
|
|
@@ -18,6 +28,7 @@ _This version does not introduce any user-facing changes._
|
|
|
18
28
|
|
|
19
29
|
### 🐛 Bug fixes
|
|
20
30
|
|
|
31
|
+
- improve notification response handling ([#36027](https://github.com/expo/expo/pull/36027) by [@vonovak](https://github.com/vonovak))
|
|
21
32
|
- remove unneeded Long conversions on Android ([#35976](https://github.com/expo/expo/pull/35976) by [@vonovak](https://github.com/vonovak))
|
|
22
33
|
- [post-swift-conversion] fix data serialization ([#35975](https://github.com/expo/expo/pull/35975) by [@vonovak](https://github.com/vonovak))
|
|
23
34
|
- simplify push token event management ([#35944](https://github.com/expo/expo/pull/35944) by [@vonovak](https://github.com/vonovak))
|
package/android/build.gradle
CHANGED
|
@@ -5,13 +5,13 @@ plugins {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
group = 'host.exp.exponent'
|
|
8
|
-
version = '0.30.
|
|
8
|
+
version = '0.30.3'
|
|
9
9
|
|
|
10
10
|
android {
|
|
11
11
|
namespace "expo.modules.notifications"
|
|
12
12
|
defaultConfig {
|
|
13
13
|
versionCode 21
|
|
14
|
-
versionName '0.30.
|
|
14
|
+
versionName '0.30.3'
|
|
15
15
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -60,6 +60,8 @@ public class ExpoNotificationsCategoriesSerializer implements NotificationsCateg
|
|
|
60
60
|
Bundle serializedTextInputOptions = new Bundle();
|
|
61
61
|
serializedTextInputOptions.putString("placeholder", ((TextInputNotificationAction) action).getPlaceholder());
|
|
62
62
|
serializedAction.putBundle("textInput", serializedTextInputOptions);
|
|
63
|
+
} else {
|
|
64
|
+
serializedAction.putBundle("textInput", null);
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
return serializedAction;
|
|
@@ -13,11 +13,6 @@ private const val REGISTRATION_FAIL_CODE = "E_REGISTRATION_FAILED"
|
|
|
13
13
|
private const val UNREGISTER_FOR_NOTIFICATIONS_FAIL_CODE = "E_UNREGISTER_FOR_NOTIFICATIONS_FAILED"
|
|
14
14
|
|
|
15
15
|
class PushTokenModule : Module(), FirebaseTokenListener {
|
|
16
|
-
|
|
17
|
-
init {
|
|
18
|
-
addTokenListener(this@PushTokenModule)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
16
|
/**
|
|
22
17
|
* Callback called when [FirebaseMessagingDelegate] gets notified of a new token.
|
|
23
18
|
* Emits a [NEW_TOKEN_EVENT_NAME] event.
|
|
@@ -38,6 +33,10 @@ class PushTokenModule : Module(), FirebaseTokenListener {
|
|
|
38
33
|
|
|
39
34
|
Events("onDevicePushToken")
|
|
40
35
|
|
|
36
|
+
OnCreate {
|
|
37
|
+
addTokenListener(this@PushTokenModule)
|
|
38
|
+
}
|
|
39
|
+
|
|
41
40
|
/**
|
|
42
41
|
* Fetches Firebase push token and resolves the promise.
|
|
43
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundNotificationTasksModule.d.ts","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.ts"],"names":[],"mappings":";gCACoC,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"BackgroundNotificationTasksModule.d.ts","sourceRoot":"","sources":["../src/BackgroundNotificationTasksModule.ts"],"names":[],"mappings":";gCACoC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;kCAGpB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;;AAJ5D,wBAOE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeModule.d.ts","sourceRoot":"","sources":["../src/BadgeModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"BadgeModule.d.ts","sourceRoot":"","sources":["../src/BadgeModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;wBAK7C,WAAW;AAHhB,wBAGiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeModule.native.d.ts","sourceRoot":"","sources":["../src/BadgeModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"BadgeModule.native.d.ts","sourceRoot":"","sources":["../src/BadgeModule.native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;wBAY7C,WAAW;AARhB,wBAQiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeModule.web.js","sourceRoot":"","sources":["../src/BadgeModule.web.ts"],"names":[],"mappings":"AAEA,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B,MAAM,WAAW,GAAgB;IAC/B,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAC7B,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,kBAAkB,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QAChD,uEAAuE;QACvE,kFAAkF;QAClF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"BadgeModule.web.js","sourceRoot":"","sources":["../src/BadgeModule.web.ts"],"names":[],"mappings":"AAEA,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B,MAAM,WAAW,GAAgB;IAC/B,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAC7B,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,kBAAkB,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QAChD,uEAAuE;QACvE,kFAAkF;QAClF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjC,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;YACnB,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;QACD,iBAAiB,GAAG,UAAU,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { BadgeModule } from './BadgeModule.types';\n\nlet lastSetBadgeCount = 0;\n\nconst badgeModule: BadgeModule = {\n addListener: () => {},\n removeListeners: () => {},\n getBadgeCountAsync: async () => {\n return lastSetBadgeCount;\n },\n setBadgeCountAsync: async (badgeCount, options) => {\n // If this module is loaded in SSR (NextJS), we can't modify the badge.\n // It also can't load the badgin module, that instantly invokes methods on window.\n if (typeof window === 'undefined') {\n return false;\n }\n const badgin = require('badgin');\n if (badgeCount > 0) {\n badgin.set(badgeCount, options);\n } else {\n badgin.clear();\n }\n lastSetBadgeCount = badgeCount;\n return true;\n },\n};\n\nexport default badgeModule;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevicePushTokenAutoRegistration.fx.js","sourceRoot":"","sources":["../src/DevicePushTokenAutoRegistration.fx.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,0BAA0B,IAAI,oCAAoC,EAAE,MAAM,oCAAoC,CAAC;AAExH,IAAI,mBAAmB,GAA2B,IAAI,CAAC;AACvD,KAAK,UAAU,oBAAoB,CAAC,KAAsB;IACxD,+BAA+B;IAC/B,mBAAmB,EAAE,KAAK,EAAE,CAAC;IAC7B,mBAAmB,GAAG,IAAI,eAAe,EAAE,CAAC;IAC5C,OAAO,MAAM,oCAAoC,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACvF,CAAC;AASD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,qCAAqC,CAAC,OAAgB;IAC1E,uDAAuD;IACvD,gCAAgC;IAChC,mBAAmB,EAAE,KAAK,EAAE,CAAC;IAE7B,IAAI,CAAC,wBAAwB,CAAC,wBAAwB,EAAE;
|
|
1
|
+
{"version":3,"file":"DevicePushTokenAutoRegistration.fx.js","sourceRoot":"","sources":["../src/DevicePushTokenAutoRegistration.fx.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,uBAAuB,MAAM,2BAA2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 'abort-controller/polyfill';\nimport { UnavailabilityError } from 'expo-modules-core';\n\nimport ServerRegistrationModule from './ServerRegistrationModule';\nimport { addPushTokenListener } from './TokenEmitter';\nimport { DevicePushToken } from './Tokens.types';\nimport getDevicePushTokenAsync from './getDevicePushTokenAsync';\nimport { updateDevicePushTokenAsync as updateDevicePushTokenAsyncWithSignal } from './utils/updateDevicePushTokenAsync';\n\nlet lastAbortController: AbortController | null = null;\nasync function updatePushTokenAsync(token: DevicePushToken) {\n // Abort current update process\n lastAbortController?.abort();\n lastAbortController = new AbortController();\n return await updateDevicePushTokenAsyncWithSignal(lastAbortController.signal, token);\n}\n\n/**\n * Encapsulates device server registration data\n */\nexport type DevicePushTokenRegistration = {\n isEnabled: boolean;\n};\n\n/**\n * @hidden - the comment is misleading and the purpose of the function needs to be reevaluated\n *\n * Sets the registration information so that the device push token gets pushed\n * to the given registration endpoint\n * @param enabled\n */\nexport async function setAutoServerRegistrationEnabledAsync(enabled: boolean) {\n // We are overwriting registration, so we shouldn't let\n // any pending request complete.\n lastAbortController?.abort();\n\n if (!ServerRegistrationModule.setRegistrationInfoAsync) {\n throw new UnavailabilityError('ServerRegistrationModule', 'setRegistrationInfoAsync');\n }\n\n await ServerRegistrationModule.setRegistrationInfoAsync(\n enabled ? JSON.stringify({ isEnabled: enabled }) : null\n );\n}\n\n// note(Chmiela): This function is exported only for testing purposes.\nexport async function __handlePersistedRegistrationInfoAsync(\n registrationInfo: string | null | undefined\n) {\n if (!registrationInfo) {\n // No registration info, nothing to do\n return;\n }\n\n let registration: DevicePushTokenRegistration | null = null;\n try {\n registration = JSON.parse(registrationInfo);\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while fetching registration information for auto token updates.',\n e\n );\n }\n\n if (!registration?.isEnabled) {\n // Registration is invalid or not enabled, nothing more to do\n return;\n }\n\n try {\n // Since the registration is enabled, fetching a \"new\" device token\n // shouldn't be a problem.\n const latestDevicePushToken = await getDevicePushTokenAsync();\n await updatePushTokenAsync(latestDevicePushToken);\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while updating server registration with latest device push token.',\n e\n );\n }\n}\n\nif (ServerRegistrationModule.getRegistrationInfoAsync) {\n // A global scope (to get all the updates) device push token\n // subscription, never cleared.\n addPushTokenListener(async (token) => {\n try {\n // Before updating the push token on server we always check if we should\n // Since modules can't change their method availability while running, we\n // can assert it's defined.\n const registrationInfo = await ServerRegistrationModule.getRegistrationInfoAsync!();\n\n if (!registrationInfo) {\n // Registration is not enabled\n return;\n }\n\n const registration: DevicePushTokenRegistration | null = JSON.parse(registrationInfo);\n if (registration?.isEnabled) {\n // Dispatch an abortable task to update\n // registration with new token.\n await updatePushTokenAsync(token);\n }\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while updating server registration with latest device push token.',\n e\n );\n }\n });\n\n // Verify if persisted registration\n // has successfully uploaded last known\n // device push token. If not, retry.\n ServerRegistrationModule.getRegistrationInfoAsync().then(__handlePersistedRegistrationInfoAsync);\n} else {\n console.warn(\n `[expo-notifications] Error encountered while fetching auto-registration state, new tokens will not be automatically registered on server.`,\n new UnavailabilityError('ServerRegistrationModule', 'getRegistrationInfoAsync')\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationChannelGroupManager.d.ts","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC
|
|
1
|
+
{"version":3,"file":"NotificationChannelGroupManager.d.ts","sourceRoot":"","sources":["../src/NotificationChannelGroupManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;wBAKrF,+BAA+B;AAHpC,wBAGqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationChannelManager.d.ts","sourceRoot":"","sources":["../src/NotificationChannelManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC
|
|
1
|
+
{"version":3,"file":"NotificationChannelManager.d.ts","sourceRoot":"","sources":["../src/NotificationChannelManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;wBAK3E,0BAA0B;AAH/B,wBAGgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPermissions.d.ts","sourceRoot":"","sources":["../src/NotificationPermissions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAGjF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAAmB,qFAMxC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,uBAAuB,CAAC,WAAW,CAAC,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"NotificationPermissions.d.ts","sourceRoot":"","sources":["../src/NotificationPermissions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAGjF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAAmB,qFAMxC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,uBAAuB,CAAC,WAAW,CAAC,EAAE,8BAA8B,oFAgBzF"}
|
|
@@ -59,6 +59,7 @@ export async function requestPermissionsAsync(permissions) {
|
|
|
59
59
|
},
|
|
60
60
|
};
|
|
61
61
|
const requestedPlatformPermissions = requestedPermissions[Platform.OS];
|
|
62
|
+
// TODO(@kitten): This never checks whether the configuration object is undefined
|
|
62
63
|
return await NotificationPermissionsModule.requestPermissionsAsync(requestedPlatformPermissions);
|
|
63
64
|
}
|
|
64
65
|
//# sourceMappingURL=NotificationPermissions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPermissions.js","sourceRoot":"","sources":["../src/NotificationPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGlE,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,IAAI,CAAC,6BAA6B,CAAC,mBAAmB,EAAE;
|
|
1
|
+
{"version":3,"file":"NotificationPermissions.js","sourceRoot":"","sources":["../src/NotificationPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGlE,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,IAAI,CAAC,6BAA6B,CAAC,mBAAmB,EAAE,CAAC;QACvD,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,MAAM,6BAA6B,CAAC,mBAAmB,EAAE,CAAC;AACnE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,WAA4C;IACxF,IAAI,CAAC,6BAA6B,CAAC,uBAAuB,EAAE,CAAC;QAC3D,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM,oBAAoB,GAAG,WAAW,IAAI;QAC1C,GAAG,EAAE;YACH,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,IAAI;SACjB;KACF,CAAC;IACF,MAAM,4BAA4B,GAChC,oBAAoB,CAAC,QAAQ,CAAC,EAAuC,CAAC,CAAC;IACzE,iFAAiF;IACjF,OAAO,MAAM,6BAA6B,CAAC,uBAAuB,CAAC,4BAA6B,CAAC,CAAC;AACpG,CAAC","sourcesContent":["import { Platform, UnavailabilityError } from 'expo-modules-core';\n\nimport { NotificationPermissionsRequest } from './NotificationPermissions.types';\nimport NotificationPermissionsModule from './NotificationPermissionsModule';\n\n/**\n * Calling this function checks current permissions settings related to notifications.\n * It lets you verify whether the app is currently allowed to display alerts, play sounds, etc.\n * There is no user-facing effect of calling this.\n * @return It returns a `Promise` resolving to an object represents permission settings ([`NotificationPermissionsStatus`](#notificationpermissionsstatus)).\n * On iOS, make sure you [properly interpret the permissions response](#interpret-the-ios-permissions-response).\n * @example Check if the app is allowed to send any type of notifications (interrupting and non-interrupting–provisional on iOS).\n * ```ts\n * import * as Notifications from 'expo-notifications';\n *\n * export async function allowsNotificationsAsync() {\n * const settings = await Notifications.getPermissionsAsync();\n * return (\n * settings.granted || settings.ios?.status === Notifications.IosAuthorizationStatus.PROVISIONAL\n * );\n * }\n * ```\n * @header permissions\n */\nexport async function getPermissionsAsync() {\n if (!NotificationPermissionsModule.getPermissionsAsync) {\n throw new UnavailabilityError('Notifications', 'getPermissionsAsync');\n }\n\n return await NotificationPermissionsModule.getPermissionsAsync();\n}\n\n/**\n * Prompts the user for notification permissions according to request. **Request defaults to asking the user to allow displaying alerts,\n * setting badge count and playing sounds**.\n * @param permissions An object representing configuration for the request scope.\n * @return It returns a Promise resolving to an object represents permission settings ([`NotificationPermissionsStatus`](#notificationpermissionsstatus)).\n * On iOS, make sure you [properly interpret the permissions response](#interpret-the-ios-permissions-response).\n * @example Prompts the user to allow the app to show alerts, play sounds, set badge count and let Siri read out messages through AirPods.\n * ```ts\n * import * as Notifications from 'expo-notifications';\n *\n * export function requestPermissionsAsync() {\n * return await Notifications.requestPermissionsAsync({\n * ios: {\n * allowAlert: true,\n * allowBadge: true,\n * allowSound: true,\n * },\n * });\n * }\n * ```\n * @header permissions\n */\nexport async function requestPermissionsAsync(permissions?: NotificationPermissionsRequest) {\n if (!NotificationPermissionsModule.requestPermissionsAsync) {\n throw new UnavailabilityError('Notifications', 'requestPermissionsAsync');\n }\n\n const requestedPermissions = permissions ?? {\n ios: {\n allowAlert: true,\n allowBadge: true,\n allowSound: true,\n },\n };\n const requestedPlatformPermissions =\n requestedPermissions[Platform.OS as keyof typeof requestedPermissions];\n // TODO(@kitten): This never checks whether the configuration object is undefined\n return await NotificationPermissionsModule.requestPermissionsAsync(requestedPlatformPermissions!);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPermissionsModule.d.ts","sourceRoot":"","sources":["../src/NotificationPermissionsModule.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC
|
|
1
|
+
{"version":3,"file":"NotificationPermissionsModule.d.ts","sourceRoot":"","sources":["../src/NotificationPermissionsModule.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;wBA4EjF,6BAA6B;AAXlC,wBAWmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPermissionsModule.js","sourceRoot":"","sources":["../src/NotificationPermissionsModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQ/D,SAAS,uBAAuB,CAC9B,MAA0C;IAE1C,QAAQ,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"NotificationPermissionsModule.js","sourceRoot":"","sources":["../src/NotificationPermissionsModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQ/D,SAAS,uBAAuB,CAC9B,MAA0C;IAE1C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,OAAO;gBACL,MAAM,EAAE,gBAAgB,CAAC,OAAO;gBAChC,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,KAAK;gBAClB,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,KAAK,QAAQ;YACX,OAAO;gBACL,MAAM,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D;QAC9D,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;QAC3E,OAAO,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,0EAA0E;IAC1E,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED,eAAe;IACb,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,KAAK,CAAC,mBAAmB;QACvB,OAAO,sBAAsB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,KAAK,CAAC,uBAAuB,CAC3B,OAA6C;QAE7C,OAAO,sBAAsB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACrD,CAAC;CAC+B,CAAC","sourcesContent":["import { PermissionStatus, Platform } from 'expo-modules-core';\n\nimport {\n NativeNotificationPermissionsRequest,\n NotificationPermissionsStatus,\n} from './NotificationPermissions.types';\nimport { NotificationPermissionsModule } from './NotificationPermissionsModule.types';\n\nfunction convertPermissionStatus(\n status?: NotificationPermission | 'prompt'\n): NotificationPermissionsStatus {\n switch (status) {\n case 'granted':\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: false,\n granted: true,\n };\n case 'denied':\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: false,\n granted: false,\n };\n default:\n return {\n status: PermissionStatus.UNDETERMINED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n}\n\nasync function resolvePermissionAsync({\n shouldAsk,\n}: {\n shouldAsk: boolean;\n}): Promise<NotificationPermissionsStatus> {\n if (!Platform.isDOMAvailable) {\n return convertPermissionStatus('denied');\n }\n\n const { Notification = {} } = window as any;\n if (typeof Notification.requestPermission !== 'undefined') {\n let status = Notification.permission;\n if (shouldAsk) {\n status = await new Promise((resolve, reject) => {\n let resolved = false;\n function resolveOnce(status: string) {\n if (!resolved) {\n resolved = true;\n resolve(status);\n }\n }\n // Some browsers require a callback argument and some return a Promise\n Notification.requestPermission(resolveOnce)?.then(resolveOnce)?.catch(reject);\n });\n }\n return convertPermissionStatus(status);\n } else if (typeof navigator !== 'undefined' && navigator?.permissions?.query) {\n // TODO(Bacon): Support `push` in the future when it's stable.\n const query = await navigator.permissions.query({ name: 'notifications' });\n return convertPermissionStatus(query.state);\n }\n // Platforms like iOS Safari don't support Notifications so return denied.\n return convertPermissionStatus('denied');\n}\n\nexport default {\n addListener: () => {},\n removeListeners: () => {},\n async getPermissionsAsync(): Promise<NotificationPermissionsStatus> {\n return resolvePermissionAsync({ shouldAsk: false });\n },\n async requestPermissionsAsync(\n request: NativeNotificationPermissionsRequest\n ): Promise<NotificationPermissionsStatus> {\n return resolvePermissionAsync({ shouldAsk: true });\n },\n} as NotificationPermissionsModule;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPresenterModule.d.ts","sourceRoot":"","sources":["../src/NotificationPresenterModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC
|
|
1
|
+
{"version":3,"file":"NotificationPresenterModule.d.ts","sourceRoot":"","sources":["../src/NotificationPresenterModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;wBAK7E,2BAA2B;AAHhC,wBAGiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationScheduler.d.ts","sourceRoot":"","sources":["../src/NotificationScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC
|
|
1
|
+
{"version":3,"file":"NotificationScheduler.d.ts","sourceRoot":"","sources":["../src/NotificationScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;wBAKvE,2BAA2B;AAHhC,wBAGiC"}
|
|
@@ -696,6 +696,7 @@ export type NotificationCategoryOptions = {
|
|
|
696
696
|
*/
|
|
697
697
|
showSubtitle?: boolean;
|
|
698
698
|
/**
|
|
699
|
+
* @deprecated the option is ignored by iOS. This option will be removed in a future release.
|
|
699
700
|
* Indicates whether to allow notifications to be automatically read by Siri when the user is using AirPods.
|
|
700
701
|
* @default false
|
|
701
702
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifications.types.d.ts","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;OAEG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC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AAiB,EAAE,MAAM,CAAC;QAC1B;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;;;WAIG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB;;;WAGG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC;;;;;WAKG;QACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC;CACH;AAGD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAC;AAEhF;;KAEK;AACL,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAE7C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Notifications.types.d.ts","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;A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AED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAC;AAEhF;;KAEK;AACL,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAE7C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifications.types.js","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAiQA;;;GAGG;AACH,MAAM,CAAN,IAAY,4BAQX;AARD,WAAY,4BAA4B;IACtC,qDAAqB,CAAA;IACrB,+CAAe,CAAA;IACf,iDAAiB,CAAA;IACjB,mDAAmB,CAAA;IACnB,iDAAiB,CAAA;IACjB,6CAAa,CAAA;IACb,8DAA8B,CAAA;AAChC,CAAC,EARW,4BAA4B,KAA5B,4BAA4B,QAQvC;AAmID;;;GAGG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,kDAAmB,CAAA;IACnB,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC;AA6WD,OAAO,EAIL,gBAAgB,GACjB,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * An object which represents a notification delivered by a push notification system.\n *\n * On Android under `remoteMessage` field a JS version of the Firebase `RemoteMessage` may be accessed.\n * On iOS under `payload` you may find full contents of [`UNNotificationContent`'s](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) [`userInfo`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/1649869-userinfo?language=objc), for example [remote notification payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html).\n */\nimport type { EventSubscription } from 'expo-modules-core';\n\nexport type PushNotificationTrigger = {\n type: 'push';\n /**\n * @platform ios\n */\n payload?: Record<string, unknown>;\n /**\n * @platform android\n */\n remoteMessage?: FirebaseRemoteMessage;\n};\n\n/**\n * A trigger related to a [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface CalendarNotificationTrigger {\n type: 'calendar';\n repeats: boolean;\n dateComponents: {\n era?: number;\n year?: number;\n month?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n weekday?: number;\n weekdayOrdinal?: number;\n quarter?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n yearForWeekOfYear?: number;\n nanosecond?: number;\n isLeapMonth: boolean;\n timeZone?: string;\n calendar?: string;\n };\n}\n\n/**\n * The region used to determine when the system sends the notification.\n * @platform ios\n */\nexport interface Region {\n type: string;\n /**\n * The identifier for the region object.\n */\n identifier: string;\n /**\n * Indicates whether notifications are generated upon entry into the region.\n */\n notifyOnEntry: boolean;\n /**\n * Indicates whether notifications are generated upon exit from the region.\n */\n notifyOnExit: boolean;\n}\n\n/**\n * A circular geographic region, specified as a center point and radius. Based on Core Location [`CLCircularRegion`](https://developer.apple.com/documentation/corelocation/clcircularregion) class.\n * @platform ios\n */\nexport interface CircularRegion extends Region {\n type: 'circular';\n /**\n * The radius (measured in meters) that defines the geographic area’s outer boundary.\n */\n radius: number;\n /**\n * The center point of the geographic area.\n */\n center: {\n latitude: number;\n longitude: number;\n };\n}\n\n/**\n * A region used to detect the presence of iBeacon devices. Based on Core Location [`CLBeaconRegion`](https://developer.apple.com/documentation/corelocation/clbeaconregion) class.\n * @platform ios\n */\nexport interface BeaconRegion extends Region {\n type: 'beacon';\n /**\n * A Boolean value that indicates whether Core Location sends beacon notifications when the device’s display is on.\n */\n notifyEntryStateOnDisplay: boolean;\n /**\n * The major value from the beacon identity constraint that defines the beacon region.\n */\n major: number | null;\n /**\n * The minor value from the beacon identity constraint that defines the beacon region.\n */\n minor: number | null;\n /**\n * The UUID value from the beacon identity constraint that defines the beacon region.\n */\n uuid?: string;\n /**\n * The beacon identity constraint that defines the beacon region.\n */\n beaconIdentityConstraint?: {\n uuid: string;\n major: number | null;\n minor: number | null;\n };\n}\n\n/**\n * A trigger related to a [`UNLocationNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface LocationNotificationTrigger {\n type: 'location';\n repeats: boolean;\n region: CircularRegion | BeaconRegion;\n}\n\n/**\n * A trigger related to an elapsed time interval. May be repeating (see `repeats` field).\n */\nexport interface TimeIntervalNotificationTrigger {\n type: 'timeInterval';\n repeats: boolean;\n seconds: number;\n}\n\n/**\n * A trigger related to a daily notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface DailyNotificationTrigger {\n type: 'daily';\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a weekly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface WeeklyNotificationTrigger {\n type: 'weekly';\n weekday: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a monthly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface MonthlyNotificationTrigger {\n type: 'monthly';\n day: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a yearly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface YearlyNotificationTrigger {\n type: 'yearly';\n day: number;\n month: number;\n hour: number;\n minute: number;\n}\n\n// @docsMissing\n/**\n * A Firebase `RemoteMessage` that caused the notification to be delivered to the app.\n */\nexport interface FirebaseRemoteMessage {\n collapseKey: string | null;\n data: Record<string, string>;\n from: string | null;\n messageId: string | null;\n messageType: string | null;\n originalPriority: number;\n priority: number;\n sentTime: number;\n to: string | null;\n ttl: number;\n notification: null | FirebaseRemoteMessageNotification;\n}\n\n// @docsMissing\nexport interface FirebaseRemoteMessageNotification {\n body: string | null;\n bodyLocalizationArgs: string[] | null;\n bodyLocalizationKey: string | null;\n channelId: string | null;\n clickAction: string | null;\n color: string | null;\n usesDefaultLightSettings: boolean;\n usesDefaultSound: boolean;\n usesDefaultVibrateSettings: boolean;\n eventTime: number | null;\n icon: string | null;\n imageUrl: string | null;\n lightSettings: number[] | null;\n link: string | null;\n localOnly: boolean;\n notificationCount: number | null;\n notificationPriority: number | null;\n sound: string | null;\n sticky: boolean;\n tag: string | null;\n ticker: string | null;\n title: string | null;\n titleLocalizationArgs: string[] | null;\n titleLocalizationKey: string | null;\n vibrateTimings: number[] | null;\n visibility: number | null;\n}\n\n/**\n * Represents a notification trigger that is unknown to `expo-notifications` and that it didn't know how to serialize for JS.\n */\nexport interface UnknownNotificationTrigger {\n type: 'unknown';\n}\n\n/**\n * A union type containing different triggers which may cause the notification to be delivered to the application.\n */\nexport type NotificationTrigger =\n | PushNotificationTrigger\n | LocationNotificationTrigger\n | NotificationTriggerInput\n | UnknownNotificationTrigger;\n\n/**\n * A trigger that will cause the notification to be delivered immediately.\n */\nexport type ChannelAwareTriggerInput = {\n channelId: string;\n};\n\n/**\n * Schedulable trigger inputs (that are not a plain date value or time value)\n * must have the \"type\" property set to one of these values.\n */\nexport enum SchedulableTriggerInputTypes {\n CALENDAR = 'calendar',\n DAILY = 'daily',\n WEEKLY = 'weekly',\n MONTHLY = 'monthly',\n YEARLY = 'yearly',\n DATE = 'date',\n TIME_INTERVAL = 'timeInterval',\n}\n\n/**\n * This trigger input will cause the notification to be delivered once or many times\n * (controlled by the value of `repeats`)\n * when the date components match the specified values.\n * Corresponds to native\n * [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport type CalendarTriggerInput = {\n type: SchedulableTriggerInputTypes.CALENDAR;\n channelId?: string;\n repeats?: boolean;\n seconds?: number;\n timezone?: string;\n year?: number;\n month?: number;\n weekday?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n weekdayOrdinal?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once per day\n * when the `hour` and `minute` date components match the specified values.\n */\nexport type DailyTriggerInput = {\n type: SchedulableTriggerInputTypes.DAILY;\n channelId?: string;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once every week\n * when the `weekday`, `hour`, and `minute` date components match the specified values.\n * > **Note:** Weekdays are specified with a number from `1` through `7`, with `1` indicating Sunday.\n */\nexport type WeeklyTriggerInput = {\n type: SchedulableTriggerInputTypes.WEEKLY;\n channelId?: string;\n weekday: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once per month\n * when the `day`, `hour`, and `minute` date components match the specified values.\n * > **Note:** All properties are specified in JavaScript `Date` object's ranges (i.e. January is represented as 0).\n */\nexport type MonthlyTriggerInput = {\n type: SchedulableTriggerInputTypes.MONTHLY;\n channelId?: string;\n day: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once every year\n * when the `day`, `month`, `hour`, and `minute` date components match the specified values.\n * > **Note:** All properties are specified in JavaScript `Date` object's ranges (i.e. January is represented as 0).\n */\nexport type YearlyTriggerInput = {\n type: SchedulableTriggerInputTypes.YEARLY;\n channelId?: string;\n day: number;\n month: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once\n * on the specified value of the `date` property. The value of `repeats` will be ignored\n * for this trigger type.\n */\nexport type DateTriggerInput = {\n type: SchedulableTriggerInputTypes.DATE;\n date: Date | number;\n channelId?: string;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once or many times\n * (depends on the `repeats` field) after `seconds` time elapse.\n * > **On iOS**, when `repeats` is `true`, the time interval must be 60 seconds or greater.\n * Otherwise, the notification won't be triggered.\n */\nexport type TimeIntervalTriggerInput = {\n type: SchedulableTriggerInputTypes.TIME_INTERVAL;\n channelId?: string;\n repeats?: boolean;\n seconds: number;\n};\n\n/**\n * Input for time-based, schedulable triggers.\n * For these triggers you can check the next trigger date with [`getNextTriggerDateAsync`](#getnexttriggerdateasynctrigger).\n * If you pass in a `number` (Unix timestamp) or `Date`, it will be processed as a\n * trigger input of type [`SchedulableTriggerInputTypes.DATE`](#date). Otherwise, the input must be\n * an object, with a `type` value set to one of the allowed values in [`SchedulableTriggerInputTypes`](#schedulabletriggerinputtypes).\n * If the input is an object, date components passed in will be validated, and\n * an error is thrown if they are outside their allowed range (for example, the `minute` and\n * `second` components must be between 0 and 59 inclusive).\n */\nexport type SchedulableNotificationTriggerInput =\n | CalendarTriggerInput\n | TimeIntervalTriggerInput\n | DailyTriggerInput\n | WeeklyTriggerInput\n | MonthlyTriggerInput\n | YearlyTriggerInput\n | DateTriggerInput;\n\n/**\n * A type which represents possible triggers with which you can schedule notifications.\n * A `null` trigger means that the notification should be scheduled for delivery immediately.\n */\nexport type NotificationTriggerInput =\n | null\n | ChannelAwareTriggerInput\n | SchedulableNotificationTriggerInput;\n\n/**\n * An enum corresponding to values appropriate for Android's [`Notification#priority`](https://developer.android.com/reference/android/app/Notification#priority) field.\n * @platform android\n */\nexport enum AndroidNotificationPriority {\n MIN = 'min',\n LOW = 'low',\n DEFAULT = 'default',\n HIGH = 'high',\n MAX = 'max',\n}\n\n/**\n * An object represents notification's content.\n */\nexport type NotificationContent = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle: string | null;\n /**\n * Notification body - the main content of the notification.\n */\n body: string | null;\n /**\n * Data associated with the notification, not displayed\n */\n data: Record<string, any>;\n // @docsMissing\n sound: 'default' | 'defaultCritical' | 'custom' | null;\n} & (NotificationContentIos | NotificationContentAndroid);\n\n/**\n * See [Apple documentation](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) for more information on specific fields.\n */\nexport type NotificationContentIos = {\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName: string | null;\n /**\n * The number that your app’s icon displays.\n */\n badge: number | null;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n */\n attachments: NotificationContentAttachmentIos[];\n /**\n * The text the system adds to the notification summary to provide additional context.\n */\n summaryArgument?: string | null;\n /**\n * The number the system adds to the notification summary when the notification represents multiple items.\n */\n summaryArgumentCount?: number;\n /**\n * The identifier of the notification’s category.\n */\n categoryIdentifier: string | null;\n /**\n * The identifier that groups related notifications.\n */\n threadIdentifier: string | null;\n /**\n * The value your app uses to determine which scene to display to handle the notification.\n */\n targetContentIdentifier?: string;\n /**\n * The notification’s importance and required delivery timing.\n * Possible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios\n */\n interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';\n};\n\n// @docsMissing\n/**\n * @platform ios\n */\nexport type NotificationContentAttachmentIos = {\n identifier: string | null;\n url: string | null;\n type: string | null;\n typeHint?: string;\n hideThumbnail?: boolean;\n thumbnailClipArea?: { x: number; y: number; width: number; height: number };\n thumbnailTime?: number;\n};\n\n/**\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification#fields) for more information on specific fields.\n */\nexport type NotificationContentAndroid = {\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n */\n color?: string;\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n */\n priority?: AndroidNotificationPriority;\n /**\n * The pattern with which to vibrate.\n */\n vibrationPattern?: number[];\n};\n\n/**\n * An object represents a request to present a notification. It has content — how it's being represented, and a trigger — what triggers the notification.\n * Many notifications ([`Notification`](#notification)) may be triggered with the same request (for example, a repeating notification).\n */\nexport interface NotificationRequest {\n identifier: string;\n content: NotificationContent;\n trigger: NotificationTrigger;\n}\n\n// TODO(simek): asses if we can base this type on `NotificationContent`, since most of the fields looks like repetition\n/**\n * An object which represents notification content that you pass in as a part of `NotificationRequestInput`.\n */\nexport type NotificationContentInput = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title?: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle?: string | null;\n /**\n * The main content of the notification.\n */\n body?: string | null;\n /**\n * Data associated with the notification, not displayed.\n */\n data?: Record<string, any>;\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n sound?: boolean | string;\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName?: string;\n /**\n * The pattern with which to vibrate.\n * @platform android\n */\n vibrate?: number[];\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n * @platform android\n */\n priority?: string;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n * @platform android\n */\n color?: string;\n /**\n * If set to `false`, the notification will not be automatically dismissed when clicked.\n * The setting will be used when the value is not provided or is invalid is set to `true`, and the notification\n * will be dismissed automatically anyway. Corresponds directly to Android's `setAutoCancel` behavior.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setAutoCancel(boolean))\n * for more details.\n * @platform android\n */\n autoDismiss?: boolean;\n /**\n * The identifier of the notification’s category.\n * @platform ios\n */\n categoryIdentifier?: string;\n /**\n * If set to `true`, the notification cannot be dismissed by swipe. This setting defaults\n * to `false` if not provided or is invalid. Corresponds directly do Android's `isOngoing` behavior.\n * In Firebase terms this property of a notification is called `sticky`.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setOngoing(boolean))\n * and [Firebase documentation](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification.FIELDS.sticky)\n * for more details.\n * @platform android\n */\n sticky?: boolean;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n * @platform ios\n */\n attachments?: NotificationContentAttachmentIos[];\n /*\n * The notification’s importance and required delivery timing.\n * Posible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios\n */\n interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';\n};\n\n/**\n * An object which represents a notification request you can pass into `scheduleNotificationAsync`.\n */\nexport interface NotificationRequestInput {\n identifier?: string;\n content: NotificationContentInput;\n trigger: NotificationTriggerInput;\n}\n\n/**\n * An object which represents a single notification that has been triggered by some request ([`NotificationRequest`](#notificationrequest)) at some point in time.\n */\nexport interface Notification {\n date: number;\n request: NotificationRequest;\n}\n\n/**\n * An object which represents user's interaction with the notification.\n * > **Note:** If the user taps on a notification `actionIdentifier` will be equal to [`Notifications.DEFAULT_ACTION_IDENTIFIER`](#notificationsdefault_action_identifier).\n */\nexport interface NotificationResponse {\n notification: Notification;\n actionIdentifier: string;\n userText?: string;\n}\n\n/**\n * An object which represents behavior that should be applied to the incoming notification.\n * > On Android, setting `shouldPlaySound: false` will result in the drop-down notification alert **not** showing, no matter what the priority is.\n * > This setting will also override any channel-specific sounds you may have configured.\n */\nexport interface NotificationBehavior {\n shouldShowAlert: boolean;\n shouldPlaySound: boolean;\n shouldSetBadge: boolean;\n priority?: AndroidNotificationPriority;\n}\n\nexport interface NotificationAction {\n /**\n * A unique string that identifies this action. If a user takes this action (for example, selects this button in the system's Notification UI),\n * your app will receive this `actionIdentifier` via the [`NotificationResponseReceivedListener`](#addnotificationresponsereceivedlistenerlistener).\n */\n identifier: string;\n /**\n * The title of the button triggering this action.\n */\n buttonTitle: string;\n /**\n * Object which, if provided, will result in a button that prompts the user for a text response.\n */\n textInput?: {\n /**\n * A string which will be used as the title for the button used for submitting the text response.\n * @platform ios\n */\n submitButtonTitle: string;\n /**\n * A string that serves as a placeholder until the user begins typing. Defaults to no placeholder string.\n */\n placeholder: string;\n };\n /**\n * Object representing the additional configuration options.\n */\n options?: {\n /**\n * Boolean indicating whether the button title will be highlighted a different color (usually red).\n * This usually signifies a destructive action such as deleting data.\n * @platform ios\n */\n isDestructive?: boolean;\n /**\n * Boolean indicating whether triggering the action will require authentication from the user.\n * @platform ios\n */\n isAuthenticationRequired?: boolean;\n /**\n * Boolean indicating whether triggering this action foregrounds the app.\n * If `false` and your app is killed (not just backgrounded), [`NotificationResponseReceived` listeners](#addnotificationresponsereceivedlistenerlistener)\n * will not be triggered when a user selects this action.\n * @default true\n */\n opensAppToForeground?: boolean;\n };\n}\n\n// @docsMissing\nexport interface NotificationCategory {\n identifier: string;\n actions: NotificationAction[];\n options?: NotificationCategoryOptions;\n}\n\n/**\n * @platform ios\n */\nexport type NotificationCategoryOptions = {\n /**\n * Customizable placeholder for the notification preview text. This is shown if the user has disabled notification previews for the app.\n * Defaults to the localized iOS system default placeholder (`Notification`).\n */\n previewPlaceholder?: string;\n /**\n * Array of [Intent Class Identifiers](https://developer.apple.com/documentation/sirikit/intent_class_identifiers). When a notification is delivered,\n * the presence of an intent identifier lets the system know that the notification is potentially related to the handling of a request made through Siri.\n * @default []\n */\n intentIdentifiers?: string[];\n /**\n * A format string for the summary description used when the system groups the category’s notifications.\n */\n categorySummaryFormat?: string;\n /**\n * Indicates whether to send actions for handling when the notification is dismissed (the user must explicitly dismiss\n * the notification interface - ignoring a notification or flicking away a notification banner does not trigger this action).\n * @default false\n */\n customDismissAction?: boolean;\n /**\n * Indicates whether to allow CarPlay to display notifications of this type. **Apps must be approved for CarPlay to make use of this feature.**\n * @default false\n */\n allowInCarPlay?: boolean;\n /**\n * Indicates whether to show the notification's title, even if the user has disabled notification previews for the app.\n * @default false\n */\n showTitle?: boolean;\n /**\n * Indicates whether to show the notification's subtitle, even if the user has disabled notification previews for the app.\n * @default false\n */\n showSubtitle?: boolean;\n /**\n * Indicates whether to allow notifications to be automatically read by Siri when the user is using AirPods.\n * @default false\n */\n allowAnnouncement?: boolean;\n};\n\nexport type MaybeNotificationResponse = NotificationResponse | null | undefined;\n\n/**\n * @deprecated use the [`EventSubscription`](#eventsubscription) type instead\n * */\nexport type Subscription = EventSubscription;\n\nexport {\n PermissionExpiration,\n PermissionResponse,\n EventSubscription,\n PermissionStatus,\n} from 'expo-modules-core';\n"]}
|
|
1
|
+
{"version":3,"file":"Notifications.types.js","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAiQA;;;GAGG;AACH,MAAM,CAAN,IAAY,4BAQX;AARD,WAAY,4BAA4B;IACtC,qDAAqB,CAAA;IACrB,+CAAe,CAAA;IACf,iDAAiB,CAAA;IACjB,mDAAmB,CAAA;IACnB,iDAAiB,CAAA;IACjB,6CAAa,CAAA;IACb,8DAA8B,CAAA;AAChC,CAAC,EARW,4BAA4B,KAA5B,4BAA4B,QAQvC;AAmID;;;GAGG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,0CAAW,CAAA;IACX,kDAAmB,CAAA;IACnB,4CAAa,CAAA;IACb,0CAAW,CAAA;AACb,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC;AA8WD,OAAO,EAIL,gBAAgB,GACjB,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * An object which represents a notification delivered by a push notification system.\n *\n * On Android under `remoteMessage` field a JS version of the Firebase `RemoteMessage` may be accessed.\n * On iOS under `payload` you may find full contents of [`UNNotificationContent`'s](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) [`userInfo`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/1649869-userinfo?language=objc), for example [remote notification payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html).\n */\nimport type { EventSubscription } from 'expo-modules-core';\n\nexport type PushNotificationTrigger = {\n type: 'push';\n /**\n * @platform ios\n */\n payload?: Record<string, unknown>;\n /**\n * @platform android\n */\n remoteMessage?: FirebaseRemoteMessage;\n};\n\n/**\n * A trigger related to a [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface CalendarNotificationTrigger {\n type: 'calendar';\n repeats: boolean;\n dateComponents: {\n era?: number;\n year?: number;\n month?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n weekday?: number;\n weekdayOrdinal?: number;\n quarter?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n yearForWeekOfYear?: number;\n nanosecond?: number;\n isLeapMonth: boolean;\n timeZone?: string;\n calendar?: string;\n };\n}\n\n/**\n * The region used to determine when the system sends the notification.\n * @platform ios\n */\nexport interface Region {\n type: string;\n /**\n * The identifier for the region object.\n */\n identifier: string;\n /**\n * Indicates whether notifications are generated upon entry into the region.\n */\n notifyOnEntry: boolean;\n /**\n * Indicates whether notifications are generated upon exit from the region.\n */\n notifyOnExit: boolean;\n}\n\n/**\n * A circular geographic region, specified as a center point and radius. Based on Core Location [`CLCircularRegion`](https://developer.apple.com/documentation/corelocation/clcircularregion) class.\n * @platform ios\n */\nexport interface CircularRegion extends Region {\n type: 'circular';\n /**\n * The radius (measured in meters) that defines the geographic area’s outer boundary.\n */\n radius: number;\n /**\n * The center point of the geographic area.\n */\n center: {\n latitude: number;\n longitude: number;\n };\n}\n\n/**\n * A region used to detect the presence of iBeacon devices. Based on Core Location [`CLBeaconRegion`](https://developer.apple.com/documentation/corelocation/clbeaconregion) class.\n * @platform ios\n */\nexport interface BeaconRegion extends Region {\n type: 'beacon';\n /**\n * A Boolean value that indicates whether Core Location sends beacon notifications when the device’s display is on.\n */\n notifyEntryStateOnDisplay: boolean;\n /**\n * The major value from the beacon identity constraint that defines the beacon region.\n */\n major: number | null;\n /**\n * The minor value from the beacon identity constraint that defines the beacon region.\n */\n minor: number | null;\n /**\n * The UUID value from the beacon identity constraint that defines the beacon region.\n */\n uuid?: string;\n /**\n * The beacon identity constraint that defines the beacon region.\n */\n beaconIdentityConstraint?: {\n uuid: string;\n major: number | null;\n minor: number | null;\n };\n}\n\n/**\n * A trigger related to a [`UNLocationNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger?language=objc).\n * @platform ios\n */\nexport interface LocationNotificationTrigger {\n type: 'location';\n repeats: boolean;\n region: CircularRegion | BeaconRegion;\n}\n\n/**\n * A trigger related to an elapsed time interval. May be repeating (see `repeats` field).\n */\nexport interface TimeIntervalNotificationTrigger {\n type: 'timeInterval';\n repeats: boolean;\n seconds: number;\n}\n\n/**\n * A trigger related to a daily notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface DailyNotificationTrigger {\n type: 'daily';\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a weekly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface WeeklyNotificationTrigger {\n type: 'weekly';\n weekday: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a monthly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface MonthlyNotificationTrigger {\n type: 'monthly';\n day: number;\n hour: number;\n minute: number;\n}\n\n/**\n * A trigger related to a yearly notification.\n * > The same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n * @platform android\n */\nexport interface YearlyNotificationTrigger {\n type: 'yearly';\n day: number;\n month: number;\n hour: number;\n minute: number;\n}\n\n// @docsMissing\n/**\n * A Firebase `RemoteMessage` that caused the notification to be delivered to the app.\n */\nexport interface FirebaseRemoteMessage {\n collapseKey: string | null;\n data: Record<string, string>;\n from: string | null;\n messageId: string | null;\n messageType: string | null;\n originalPriority: number;\n priority: number;\n sentTime: number;\n to: string | null;\n ttl: number;\n notification: null | FirebaseRemoteMessageNotification;\n}\n\n// @docsMissing\nexport interface FirebaseRemoteMessageNotification {\n body: string | null;\n bodyLocalizationArgs: string[] | null;\n bodyLocalizationKey: string | null;\n channelId: string | null;\n clickAction: string | null;\n color: string | null;\n usesDefaultLightSettings: boolean;\n usesDefaultSound: boolean;\n usesDefaultVibrateSettings: boolean;\n eventTime: number | null;\n icon: string | null;\n imageUrl: string | null;\n lightSettings: number[] | null;\n link: string | null;\n localOnly: boolean;\n notificationCount: number | null;\n notificationPriority: number | null;\n sound: string | null;\n sticky: boolean;\n tag: string | null;\n ticker: string | null;\n title: string | null;\n titleLocalizationArgs: string[] | null;\n titleLocalizationKey: string | null;\n vibrateTimings: number[] | null;\n visibility: number | null;\n}\n\n/**\n * Represents a notification trigger that is unknown to `expo-notifications` and that it didn't know how to serialize for JS.\n */\nexport interface UnknownNotificationTrigger {\n type: 'unknown';\n}\n\n/**\n * A union type containing different triggers which may cause the notification to be delivered to the application.\n */\nexport type NotificationTrigger =\n | PushNotificationTrigger\n | LocationNotificationTrigger\n | NotificationTriggerInput\n | UnknownNotificationTrigger;\n\n/**\n * A trigger that will cause the notification to be delivered immediately.\n */\nexport type ChannelAwareTriggerInput = {\n channelId: string;\n};\n\n/**\n * Schedulable trigger inputs (that are not a plain date value or time value)\n * must have the \"type\" property set to one of these values.\n */\nexport enum SchedulableTriggerInputTypes {\n CALENDAR = 'calendar',\n DAILY = 'daily',\n WEEKLY = 'weekly',\n MONTHLY = 'monthly',\n YEARLY = 'yearly',\n DATE = 'date',\n TIME_INTERVAL = 'timeInterval',\n}\n\n/**\n * This trigger input will cause the notification to be delivered once or many times\n * (controlled by the value of `repeats`)\n * when the date components match the specified values.\n * Corresponds to native\n * [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n * @platform ios\n */\nexport type CalendarTriggerInput = {\n type: SchedulableTriggerInputTypes.CALENDAR;\n channelId?: string;\n repeats?: boolean;\n seconds?: number;\n timezone?: string;\n year?: number;\n month?: number;\n weekday?: number;\n weekOfMonth?: number;\n weekOfYear?: number;\n weekdayOrdinal?: number;\n day?: number;\n hour?: number;\n minute?: number;\n second?: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once per day\n * when the `hour` and `minute` date components match the specified values.\n */\nexport type DailyTriggerInput = {\n type: SchedulableTriggerInputTypes.DAILY;\n channelId?: string;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once every week\n * when the `weekday`, `hour`, and `minute` date components match the specified values.\n * > **Note:** Weekdays are specified with a number from `1` through `7`, with `1` indicating Sunday.\n */\nexport type WeeklyTriggerInput = {\n type: SchedulableTriggerInputTypes.WEEKLY;\n channelId?: string;\n weekday: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once per month\n * when the `day`, `hour`, and `minute` date components match the specified values.\n * > **Note:** All properties are specified in JavaScript `Date` object's ranges (i.e. January is represented as 0).\n */\nexport type MonthlyTriggerInput = {\n type: SchedulableTriggerInputTypes.MONTHLY;\n channelId?: string;\n day: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once every year\n * when the `day`, `month`, `hour`, and `minute` date components match the specified values.\n * > **Note:** All properties are specified in JavaScript `Date` object's ranges (i.e. January is represented as 0).\n */\nexport type YearlyTriggerInput = {\n type: SchedulableTriggerInputTypes.YEARLY;\n channelId?: string;\n day: number;\n month: number;\n hour: number;\n minute: number;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once\n * on the specified value of the `date` property. The value of `repeats` will be ignored\n * for this trigger type.\n */\nexport type DateTriggerInput = {\n type: SchedulableTriggerInputTypes.DATE;\n date: Date | number;\n channelId?: string;\n};\n\n/**\n * This trigger input will cause the notification to be delivered once or many times\n * (depends on the `repeats` field) after `seconds` time elapse.\n * > **On iOS**, when `repeats` is `true`, the time interval must be 60 seconds or greater.\n * Otherwise, the notification won't be triggered.\n */\nexport type TimeIntervalTriggerInput = {\n type: SchedulableTriggerInputTypes.TIME_INTERVAL;\n channelId?: string;\n repeats?: boolean;\n seconds: number;\n};\n\n/**\n * Input for time-based, schedulable triggers.\n * For these triggers you can check the next trigger date with [`getNextTriggerDateAsync`](#getnexttriggerdateasynctrigger).\n * If you pass in a `number` (Unix timestamp) or `Date`, it will be processed as a\n * trigger input of type [`SchedulableTriggerInputTypes.DATE`](#date). Otherwise, the input must be\n * an object, with a `type` value set to one of the allowed values in [`SchedulableTriggerInputTypes`](#schedulabletriggerinputtypes).\n * If the input is an object, date components passed in will be validated, and\n * an error is thrown if they are outside their allowed range (for example, the `minute` and\n * `second` components must be between 0 and 59 inclusive).\n */\nexport type SchedulableNotificationTriggerInput =\n | CalendarTriggerInput\n | TimeIntervalTriggerInput\n | DailyTriggerInput\n | WeeklyTriggerInput\n | MonthlyTriggerInput\n | YearlyTriggerInput\n | DateTriggerInput;\n\n/**\n * A type which represents possible triggers with which you can schedule notifications.\n * A `null` trigger means that the notification should be scheduled for delivery immediately.\n */\nexport type NotificationTriggerInput =\n | null\n | ChannelAwareTriggerInput\n | SchedulableNotificationTriggerInput;\n\n/**\n * An enum corresponding to values appropriate for Android's [`Notification#priority`](https://developer.android.com/reference/android/app/Notification#priority) field.\n * @platform android\n */\nexport enum AndroidNotificationPriority {\n MIN = 'min',\n LOW = 'low',\n DEFAULT = 'default',\n HIGH = 'high',\n MAX = 'max',\n}\n\n/**\n * An object represents notification's content.\n */\nexport type NotificationContent = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle: string | null;\n /**\n * Notification body - the main content of the notification.\n */\n body: string | null;\n /**\n * Data associated with the notification, not displayed\n */\n data: Record<string, any>;\n // @docsMissing\n sound: 'default' | 'defaultCritical' | 'custom' | null;\n} & (NotificationContentIos | NotificationContentAndroid);\n\n/**\n * See [Apple documentation](https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc) for more information on specific fields.\n */\nexport type NotificationContentIos = {\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName: string | null;\n /**\n * The number that your app’s icon displays.\n */\n badge: number | null;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n */\n attachments: NotificationContentAttachmentIos[];\n /**\n * The text the system adds to the notification summary to provide additional context.\n */\n summaryArgument?: string | null;\n /**\n * The number the system adds to the notification summary when the notification represents multiple items.\n */\n summaryArgumentCount?: number;\n /**\n * The identifier of the notification’s category.\n */\n categoryIdentifier: string | null;\n /**\n * The identifier that groups related notifications.\n */\n threadIdentifier: string | null;\n /**\n * The value your app uses to determine which scene to display to handle the notification.\n */\n targetContentIdentifier?: string;\n /**\n * The notification’s importance and required delivery timing.\n * Possible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios\n */\n interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';\n};\n\n// @docsMissing\n/**\n * @platform ios\n */\nexport type NotificationContentAttachmentIos = {\n identifier: string | null;\n url: string | null;\n type: string | null;\n typeHint?: string;\n hideThumbnail?: boolean;\n thumbnailClipArea?: { x: number; y: number; width: number; height: number };\n thumbnailTime?: number;\n};\n\n/**\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification#fields) for more information on specific fields.\n */\nexport type NotificationContentAndroid = {\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n */\n color?: string;\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n */\n priority?: AndroidNotificationPriority;\n /**\n * The pattern with which to vibrate.\n */\n vibrationPattern?: number[];\n};\n\n/**\n * An object represents a request to present a notification. It has content — how it's being represented, and a trigger — what triggers the notification.\n * Many notifications ([`Notification`](#notification)) may be triggered with the same request (for example, a repeating notification).\n */\nexport interface NotificationRequest {\n identifier: string;\n content: NotificationContent;\n trigger: NotificationTrigger;\n}\n\n// TODO(simek): asses if we can base this type on `NotificationContent`, since most of the fields looks like repetition\n/**\n * An object which represents notification content that you pass in as a part of `NotificationRequestInput`.\n */\nexport type NotificationContentInput = {\n /**\n * Notification title - the bold text displayed above the rest of the content.\n */\n title?: string | null;\n /**\n * On Android: `subText` - the display depends on the device.\n *\n * On iOS: `subtitle` - the bold text displayed between title and the rest of the content.\n */\n subtitle?: string | null;\n /**\n * The main content of the notification.\n */\n body?: string | null;\n /**\n * Data associated with the notification, not displayed.\n */\n data?: Record<string, any>;\n /**\n * Application badge number associated with the notification.\n */\n badge?: number;\n sound?: boolean | string;\n /**\n * The name of the image or storyboard to use when your app launches because of the notification.\n */\n launchImageName?: string;\n /**\n * The pattern with which to vibrate.\n * @platform android\n */\n vibrate?: number[];\n /**\n * Relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification.\n * Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification.\n * The system will make a determination about how to interpret this priority when presenting the notification.\n * @platform android\n */\n priority?: string;\n /**\n * Accent color (in `#AARRGGBB` or `#RRGGBB` format) to be applied by the standard Style templates when presenting this notification.\n * @platform android\n */\n color?: string;\n /**\n * If set to `false`, the notification will not be automatically dismissed when clicked.\n * The setting will be used when the value is not provided or is invalid is set to `true`, and the notification\n * will be dismissed automatically anyway. Corresponds directly to Android's `setAutoCancel` behavior.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setAutoCancel(boolean))\n * for more details.\n * @platform android\n */\n autoDismiss?: boolean;\n /**\n * The identifier of the notification’s category.\n * @platform ios\n */\n categoryIdentifier?: string;\n /**\n * If set to `true`, the notification cannot be dismissed by swipe. This setting defaults\n * to `false` if not provided or is invalid. Corresponds directly do Android's `isOngoing` behavior.\n * In Firebase terms this property of a notification is called `sticky`.\n *\n * See [Android developer documentation](https://developer.android.com/reference/android/app/Notification.Builder#setOngoing(boolean))\n * and [Firebase documentation](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification.FIELDS.sticky)\n * for more details.\n * @platform android\n */\n sticky?: boolean;\n /**\n * The visual and audio attachments to display alongside the notification’s main content.\n * @platform ios\n */\n attachments?: NotificationContentAttachmentIos[];\n /*\n * The notification’s importance and required delivery timing.\n * Posible values:\n * - 'passive' - the system adds the notification to the notification list without lighting up the screen or playing a sound\n * - 'active' - the system presents the notification immediately, lights up the screen, and can play a sound\n * - 'timeSensitive' - The system presents the notification immediately, lights up the screen, can play a sound, and breaks through system notification controls\n * - 'critical - the system presents the notification immediately, lights up the screen, and bypasses the mute switch to play a sound\n * @platform ios\n */\n interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';\n};\n\n/**\n * An object which represents a notification request you can pass into `scheduleNotificationAsync`.\n */\nexport interface NotificationRequestInput {\n identifier?: string;\n content: NotificationContentInput;\n trigger: NotificationTriggerInput;\n}\n\n/**\n * An object which represents a single notification that has been triggered by some request ([`NotificationRequest`](#notificationrequest)) at some point in time.\n */\nexport interface Notification {\n date: number;\n request: NotificationRequest;\n}\n\n/**\n * An object which represents user's interaction with the notification.\n * > **Note:** If the user taps on a notification `actionIdentifier` will be equal to [`Notifications.DEFAULT_ACTION_IDENTIFIER`](#notificationsdefault_action_identifier).\n */\nexport interface NotificationResponse {\n notification: Notification;\n actionIdentifier: string;\n userText?: string;\n}\n\n/**\n * An object which represents behavior that should be applied to the incoming notification.\n * > On Android, setting `shouldPlaySound: false` will result in the drop-down notification alert **not** showing, no matter what the priority is.\n * > This setting will also override any channel-specific sounds you may have configured.\n */\nexport interface NotificationBehavior {\n shouldShowAlert: boolean;\n shouldPlaySound: boolean;\n shouldSetBadge: boolean;\n priority?: AndroidNotificationPriority;\n}\n\nexport interface NotificationAction {\n /**\n * A unique string that identifies this action. If a user takes this action (for example, selects this button in the system's Notification UI),\n * your app will receive this `actionIdentifier` via the [`NotificationResponseReceivedListener`](#addnotificationresponsereceivedlistenerlistener).\n */\n identifier: string;\n /**\n * The title of the button triggering this action.\n */\n buttonTitle: string;\n /**\n * Object which, if provided, will result in a button that prompts the user for a text response.\n */\n textInput?: {\n /**\n * A string which will be used as the title for the button used for submitting the text response.\n * @platform ios\n */\n submitButtonTitle: string;\n /**\n * A string that serves as a placeholder until the user begins typing. Defaults to no placeholder string.\n */\n placeholder: string;\n };\n /**\n * Object representing the additional configuration options.\n */\n options?: {\n /**\n * Boolean indicating whether the button title will be highlighted a different color (usually red).\n * This usually signifies a destructive action such as deleting data.\n * @platform ios\n */\n isDestructive?: boolean;\n /**\n * Boolean indicating whether triggering the action will require authentication from the user.\n * @platform ios\n */\n isAuthenticationRequired?: boolean;\n /**\n * Boolean indicating whether triggering this action foregrounds the app.\n * If `false` and your app is killed (not just backgrounded), [`NotificationResponseReceived` listeners](#addnotificationresponsereceivedlistenerlistener)\n * will not be triggered when a user selects this action.\n * @default true\n */\n opensAppToForeground?: boolean;\n };\n}\n\n// @docsMissing\nexport interface NotificationCategory {\n identifier: string;\n actions: NotificationAction[];\n options?: NotificationCategoryOptions;\n}\n\n/**\n * @platform ios\n */\nexport type NotificationCategoryOptions = {\n /**\n * Customizable placeholder for the notification preview text. This is shown if the user has disabled notification previews for the app.\n * Defaults to the localized iOS system default placeholder (`Notification`).\n */\n previewPlaceholder?: string;\n /**\n * Array of [Intent Class Identifiers](https://developer.apple.com/documentation/sirikit/intent_class_identifiers). When a notification is delivered,\n * the presence of an intent identifier lets the system know that the notification is potentially related to the handling of a request made through Siri.\n * @default []\n */\n intentIdentifiers?: string[];\n /**\n * A format string for the summary description used when the system groups the category’s notifications.\n */\n categorySummaryFormat?: string;\n /**\n * Indicates whether to send actions for handling when the notification is dismissed (the user must explicitly dismiss\n * the notification interface - ignoring a notification or flicking away a notification banner does not trigger this action).\n * @default false\n */\n customDismissAction?: boolean;\n /**\n * Indicates whether to allow CarPlay to display notifications of this type. **Apps must be approved for CarPlay to make use of this feature.**\n * @default false\n */\n allowInCarPlay?: boolean;\n /**\n * Indicates whether to show the notification's title, even if the user has disabled notification previews for the app.\n * @default false\n */\n showTitle?: boolean;\n /**\n * Indicates whether to show the notification's subtitle, even if the user has disabled notification previews for the app.\n * @default false\n */\n showSubtitle?: boolean;\n /**\n * @deprecated the option is ignored by iOS. This option will be removed in a future release.\n * Indicates whether to allow notifications to be automatically read by Siri when the user is using AirPods.\n * @default false\n */\n allowAnnouncement?: boolean;\n};\n\nexport type MaybeNotificationResponse = NotificationResponse | null | undefined;\n\n/**\n * @deprecated use the [`EventSubscription`](#eventsubscription) type instead\n * */\nexport type Subscription = EventSubscription;\n\nexport {\n PermissionExpiration,\n PermissionResponse,\n EventSubscription,\n PermissionStatus,\n} from 'expo-modules-core';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsEmitter.js","sourceRoot":"","sources":["../src/NotificationsEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA0B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGpG,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE3F,iCAAiC;AACjC,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;AAEnE,MAAM,+BAA+B,GAAG,0BAA0B,CAAC;AACnE,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AAC/D,MAAM,uCAAuC,GAAG,kCAAkC,CAAC;AACnF,MAAM,qCAAqC,GAAG,gCAAgC,CAAC;AAE/E,eAAe;AACf,MAAM,CAAC,MAAM,yBAAyB,GAAG,4CAA4C,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,+BAA+B,CAC7C,QAAuC;IAEvC,OAAO,OAAO,CAAC,WAAW,CACxB,+BAA+B,EAC/B,CAAC,YAA0B,EAAE,EAAE;QAC7B,MAAM,kBAAkB,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;QACzD,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC/B,CAAC,CACF,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,+BAA+B,CAAC,QAAoB;IAClE,OAAO,OAAO,CAAC,WAAW,CAA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,CAAC,0BAA0B,CAAC,kCAAkC,EAAE,CAAC;QACnE,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,kCAAkC,CAAC,CAAC;IACzF,CAAC;IACD,MAAM,0BAA0B,CAAC,kCAAkC,EAAE,CAAC;IACtE,wFAAwF;IACxF,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC,CAAC,QAAoB;IACzE,OAAO,OAAO,CAAC,WAAW,CAAO,qCAAqC,EAAE,QAAQ,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import { LegacyEventEmitter, type EventSubscription, UnavailabilityError } from 'expo-modules-core';\n\nimport { Notification, NotificationResponse } from './Notifications.types';\nimport NotificationsEmitterModule from './NotificationsEmitterModule';\nimport { mapNotification, mapNotificationResponse } from './utils/mapNotificationResponse';\n\n// Web uses SyntheticEventEmitter\nconst emitter = new LegacyEventEmitter(NotificationsEmitterModule);\n\nconst didReceiveNotificationEventName = 'onDidReceiveNotification';\nconst didDropNotificationsEventName = 'onNotificationsDeleted';\nconst didReceiveNotificationResponseEventName = 'onDidReceiveNotificationResponse';\nconst didClearNotificationResponseEventName = 'onDidClearNotificationResponse';\n\n// @docsMissing\nexport const DEFAULT_ACTION_IDENTIFIER = 'expo.modules.notifications.actions.DEFAULT';\n\n/**\n * Listeners registered by this method will be called whenever a notification is received while the app is running.\n * @param listener A function accepting a notification ([`Notification`](#notification)) as an argument.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @example Registering a notification listener using a React hook:\n * ```jsx\n * import React from 'react';\n * import * as Notifications from 'expo-notifications';\n *\n * export default function App() {\n * React.useEffect(() => {\n * const subscription = Notifications.addNotificationReceivedListener(notification => {\n * console.log(notification);\n * });\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n * @header listen\n */\nexport function addNotificationReceivedListener(\n listener: (event: Notification) => void\n): EventSubscription {\n return emitter.addListener<Notification>(\n didReceiveNotificationEventName,\n (notification: Notification) => {\n const mappedNotification = mapNotification(notification);\n listener(mappedNotification);\n }\n );\n}\n\n/**\n * Listeners registered by this method will be called whenever some notifications have been dropped by the server.\n * Applicable only to Firebase Cloud Messaging which we use as a notifications service on Android. It corresponds to `onDeletedMessages()` callback.\n * More information can be found in [Firebase docs](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages).\n * @param listener A callback function.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @header listen\n */\nexport function addNotificationsDroppedListener(listener: () => void): EventSubscription {\n return emitter.addListener<void>(didDropNotificationsEventName, listener);\n}\n\n/**\n * Listeners registered by this method will be called whenever a user interacts with a notification (for example, taps on it).\n * @param listener A function accepting notification response ([`NotificationResponse`](#notificationresponse)) as an argument.\n * @return An [`EventSubscription`](#eventsubscription) object represents the subscription of the provided listener.\n * @example Register a notification responder listener:\n * ```jsx\n * import React from 'react';\n * import { Linking } from 'react-native';\n * import * as Notifications from 'expo-notifications';\n *\n * export default function Container() {\n * React.useEffect(() => {\n * const subscription = Notifications.addNotificationResponseReceivedListener(response => {\n * const url = response.notification.request.content.data.url;\n * Linking.openURL(url);\n * });\n * return () => subscription.remove();\n * }, []);\n *\n * return (\n * // Your app content\n * );\n * }\n * ```\n * @header listen\n */\nexport function addNotificationResponseReceivedListener(\n listener: (event: NotificationResponse) => void\n): EventSubscription {\n return emitter.addListener<NotificationResponse>(\n didReceiveNotificationResponseEventName,\n (response: NotificationResponse) => {\n const mappedResponse = mapNotificationResponse(response);\n listener(mappedResponse);\n }\n );\n}\n\n/**\n * Removes a notification subscription returned by an `addNotificationListener` call.\n * @param subscription A subscription returned by `addNotificationListener` method.\n * @header listen\n */\nexport function removeNotificationSubscription(subscription: EventSubscription) {\n if (typeof subscription?.remove === 'function') {\n subscription.remove();\n } else {\n throw new Error(\n `removeNotificationSubscription: Provided value is not a subscription: ${subscription}`\n );\n }\n}\n\n/**\n * Gets the notification response that was received most recently\n * (a notification response designates an interaction with a notification, such as tapping on it).\n *\n * - `null` - if no notification response has been received yet\n * - a [`NotificationResponse`](#notificationresponse) object - if a notification response was received\n */\nexport async function getLastNotificationResponseAsync(): Promise<NotificationResponse | null> {\n if (!NotificationsEmitterModule.getLastNotificationResponseAsync) {\n throw new UnavailabilityError('ExpoNotifications', 'getLastNotificationResponseAsync');\n }\n const response = await NotificationsEmitterModule.getLastNotificationResponseAsync();\n const mappedResponse = response ? mapNotificationResponse(response) : response;\n return mappedResponse;\n}\n\n/**\n * Clears the notification response that was received most recently. May be used\n * when an app selects a route based on the notification response, and it is undesirable\n * to continue selecting the route after the response has already been handled.\n *\n * If a component is using the [`useLastNotificationResponse`](#uselastnotificationresponse) hook,\n * this call will also clear the value returned by the hook.\n *\n * @return A promise that resolves if the native call was successful.\n */\nexport async function clearLastNotificationResponseAsync(): Promise<void> {\n if (!NotificationsEmitterModule.clearLastNotificationResponseAsync) {\n throw new UnavailabilityError('ExpoNotifications', 'getLastNotificationResponseAsync');\n }\n await NotificationsEmitterModule.clearLastNotificationResponseAsync();\n // Emit event to clear any useLastNotificationResponse hooks, after native call succeeds\n emitter.emit(didClearNotificationResponseEventName, []);\n}\n\n/**\n * @hidden\n */\nexport function addNotificationResponseClearedListener(listener: () => void): EventSubscription {\n return emitter.addListener<void>(didClearNotificationResponseEventName, listener);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsEmitterModule.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitterModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.d.ts","sourceRoot":"","sources":["../src/NotificationsEmitterModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;wBAc3E,0BAA0B;AAV/B,wBAUgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsEmitterModule.js","sourceRoot":"","sources":["../src/NotificationsEmitterModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,eAAe;IACb,WAAW,EAAE,GAAG,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE;
|
|
1
|
+
{"version":3,"file":"NotificationsEmitterModule.js","sourceRoot":"","sources":["../src/NotificationsEmitterModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,eAAe;IACb,WAAW,EAAE,GAAG,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CACV,6EAA6E,QAAQ,CAAC,EAAE,0CAA0C,CACnI,CAAC;YACF,mBAAmB,GAAG,IAAI,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;CACI,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\n\nimport { NotificationsEmitterModule } from './NotificationsEmitterModule.types';\n\nlet warningHasBeenShown = false;\n\nexport default {\n addListener: () => {\n if (!warningHasBeenShown) {\n console.warn(\n `[expo-notifications] Emitting notifications is not yet fully supported on ${Platform.OS}. Adding a listener will have no effect.`\n );\n warningHasBeenShown = true;\n }\n },\n removeListeners: () => {},\n} as NotificationsEmitterModule;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsHandler.d.ts","sourceRoot":"","sources":["../src/NotificationsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAEX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,C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,YAAY,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClF;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CAClF;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAuChF"}
|
|
@@ -63,6 +63,7 @@ export function setNotificationHandler(handler) {
|
|
|
63
63
|
handler.handleSuccess?.(id);
|
|
64
64
|
}
|
|
65
65
|
catch (error) {
|
|
66
|
+
// TODO(@kitten): This callback expects specific Error types, but we never narrow the type before calling this callback
|
|
66
67
|
handler.handleError?.(id, error);
|
|
67
68
|
}
|
|
68
69
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsHandler.js","sourceRoot":"","sources":["../src/NotificationsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAElB,UAAU,EACV,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,UAAU;IACtD,IAAI,CAA6C;IACjD,YAAY,cAAsB,EAAE,YAA0B;QAC5D,KAAK,CAAC,0BAA0B,EAAE,0CAA0C,cAAc,GAAG,CAAC,CAAC;QAC/F,IAAI,CAAC,IAAI,GAAG,EAAE,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;IACnD,CAAC;CACF;AAgCD,iCAAiC;AACjC,MAAM,mBAAmB,GAAG,IAAI,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;AAE/E,MAAM,2BAA2B,GAAG,sBAAsB,CAAC;AAC3D,MAAM,kCAAkC,GAAG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C,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACZ,kBAAkB,GAAG,mBAAmB,CAAC,WAAW,CAClD,2BAA2B,EAC3B,KAAK,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;YAC7B,IAAI,CAAC,0BAA0B,CAAC,uBAAuB,EAAE,CAAC;gBACxD,OAAO,CAAC,WAAW,EAAE,CACnB,EAAE,EACF,IAAI,mBAAmB,CAAC,eAAe,EAAE,yBAAyB,CAAC,CACpE,CAAC;gBACF,OAAO;YACT,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAChE,MAAM,0BAA0B,CAAC,uBAAuB,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;gBACvE,OAAO,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;YAC9B,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,uHAAuH;gBACvH,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CACF,CAAC;QAEF,yBAAyB,GAAG,mBAAmB,CAAC,WAAW,CACzD,kCAAkC,EAClC,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,CACvB,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,IAAI,wBAAwB,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,CAC5E,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import {\n LegacyEventEmitter,\n type EventSubscription,\n CodedError,\n UnavailabilityError,\n} from 'expo-modules-core';\n\nimport { Notification, NotificationBehavior } from './Notifications.types';\nimport NotificationsHandlerModule from './NotificationsHandlerModule';\n\n/**\n * @hidden\n */\nexport class NotificationTimeoutError extends CodedError {\n info: { notification: Notification; id: string };\n constructor(notificationId: string, notification: Notification) {\n super('ERR_NOTIFICATION_TIMEOUT', `Notification handling timed out for ID ${notificationId}.`);\n this.info = { id: notificationId, notification };\n }\n}\n\n// @docsMissing\nexport type NotificationHandlingError = NotificationTimeoutError | Error;\n\nexport interface NotificationHandler {\n /**\n * A function accepting an incoming notification returning a `Promise` resolving to a behavior ([`NotificationBehavior`](#notificationbehavior))\n * applicable to the notification\n * @param notification An object representing the notification.\n */\n handleNotification: (notification: Notification) => Promise<NotificationBehavior>;\n /**\n * A function called whenever an incoming notification is handled successfully.\n * @param notificationId Identifier of the notification.\n */\n handleSuccess?: (notificationId: string) => void;\n /**\n * A function called whenever calling `handleNotification()` for an incoming notification fails.\n * @param notificationId Identifier of the notification.\n * @param error An error which occurred in form of `NotificationHandlingError` object.\n */\n handleError?: (notificationId: string, error: NotificationHandlingError) => void;\n}\n\ntype HandleNotificationEvent = {\n id: string;\n notification: Notification;\n};\n\ntype HandleNotificationTimeoutEvent = HandleNotificationEvent;\n\n// Web uses SyntheticEventEmitter\nconst notificationEmitter = new LegacyEventEmitter(NotificationsHandlerModule);\n\nconst handleNotificationEventName = 'onHandleNotification';\nconst handleNotificationTimeoutEventName = 'onHandleNotificationTimeout';\n\nlet handleSubscription: EventSubscription | null = null;\nlet handleTimeoutSubscription: EventSubscription | null = null;\n\n/**\n * When a notification is received while the app is running, using this function you can set a callback that will decide\n * whether the notification should be shown to the user or not.\n *\n * When a notification is received, `handleNotification` is called with the incoming notification as an argument.\n * The function should respond with a behavior object within 3 seconds, otherwise, the notification will be discarded.\n * If the notification is handled successfully, `handleSuccess` is called with the identifier of the notification,\n * otherwise (or on timeout) `handleError` will be called.\n *\n * The default behavior when the handler is not set or does not respond in time is not to show the notification.\n * @param handler A single parameter which should be either `null` (if you want to clear the handler) or a [`NotificationHandler`](#notificationhandler) object.\n *\n * @example Implementing a notification handler that always shows the notification when it is received.\n * ```jsx\n * import * as Notifications from 'expo-notifications';\n *\n * Notifications.setNotificationHandler({\n * handleNotification: async () => ({\n * shouldShowAlert: true,\n * shouldPlaySound: false,\n * shouldSetBadge: false,\n * }),\n * });\n * ```\n * @header inForeground\n */\nexport function setNotificationHandler(handler: NotificationHandler | null): void {\n if (handleSubscription) {\n handleSubscription.remove();\n handleSubscription = null;\n }\n if (handleTimeoutSubscription) {\n handleTimeoutSubscription.remove();\n handleTimeoutSubscription = null;\n }\n\n if (handler) {\n handleSubscription = notificationEmitter.addListener<HandleNotificationEvent>(\n handleNotificationEventName,\n async ({ id, notification }) => {\n if (!NotificationsHandlerModule.handleNotificationAsync) {\n handler.handleError?.(\n id,\n new UnavailabilityError('Notifications', 'handleNotificationAsync')\n );\n return;\n }\n\n try {\n const behavior = await handler.handleNotification(notification);\n await NotificationsHandlerModule.handleNotificationAsync(id, behavior);\n handler.handleSuccess?.(id);\n } catch (error: any) {\n // TODO(@kitten): This callback expects specific Error types, but we never narrow the type before calling this callback\n handler.handleError?.(id, error);\n }\n }\n );\n\n handleTimeoutSubscription = notificationEmitter.addListener<HandleNotificationTimeoutEvent>(\n handleNotificationTimeoutEventName,\n ({ id, notification }) =>\n handler.handleError?.(id, new NotificationTimeoutError(id, notification))\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsHandlerModule.d.ts","sourceRoot":"","sources":["../src/NotificationsHandlerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.d.ts","sourceRoot":"","sources":["../src/NotificationsHandlerModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;wBAc3E,0BAA0B;AAV/B,wBAUgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsHandlerModule.js","sourceRoot":"","sources":["../src/NotificationsHandlerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,eAAe;IACb,WAAW,EAAE,GAAG,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE;
|
|
1
|
+
{"version":3,"file":"NotificationsHandlerModule.js","sourceRoot":"","sources":["../src/NotificationsHandlerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,eAAe;IACb,WAAW,EAAE,GAAG,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CACV,6EAA6E,QAAQ,CAAC,EAAE,+CAA+C,CACxI,CAAC;YACF,mBAAmB,GAAG,IAAI,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;CACI,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\n\nimport { NotificationsHandlerModule } from './NotificationsHandlerModule.types';\n\nlet warningHasBeenShown = false;\n\nexport default {\n addListener: () => {\n if (!warningHasBeenShown) {\n console.warn(\n `[expo-notifications] Notifications handling is not yet fully supported on ${Platform.OS}. Handling notifications will have no effect.`\n );\n warningHasBeenShown = true;\n }\n },\n removeListeners: () => {},\n} as NotificationsHandlerModule;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushTokenManager.d.ts","sourceRoot":"","sources":["../src/PushTokenManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC
|
|
1
|
+
{"version":3,"file":"PushTokenManager.d.ts","sourceRoot":"","sources":["../src/PushTokenManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;wBAoB7D,sBAAsB;AAhB3B,wBAgB4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushTokenManager.js","sourceRoot":"","sources":["../src/PushTokenManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,eAAe;IACb,WAAW,EAAE,GAAG,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE;
|
|
1
|
+
{"version":3,"file":"PushTokenManager.js","sourceRoot":"","sources":["../src/PushTokenManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,eAAe;IACb,WAAW,EAAE,GAAG,EAAE;QAChB,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,OAAO,CAAC,IAAI,CACV,sFAAsF,QAAQ,CAAC,EAAE,0CAA0C,CAC5I,CAAC;YACF,mBAAmB,GAAG,IAAI,CAAC;QAC7B,CAAC;QACD,OAAO;YACL,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;SACjB,CAAC;IACJ,CAAC;IACD,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,kBAAkB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC5B,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;IACd,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;CACG,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\n\nimport { PushTokenManagerModule } from './PushTokenManager.types';\n\nlet warningHasBeenShown = false;\n\nexport default {\n addListener: () => {\n if (!warningHasBeenShown) {\n console.warn(\n `[expo-notifications] Listening to push token changes is not yet fully supported on ${Platform.OS}. Adding a listener will have no effect.`\n );\n warningHasBeenShown = true;\n }\n return {\n remove: () => {},\n };\n },\n removeListener: () => {},\n removeAllListeners: () => {},\n emit: () => {},\n listenerCount: () => 0,\n} as PushTokenManagerModule;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerRegistrationModule.d.ts","sourceRoot":"","sources":["../src/ServerRegistrationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC
|
|
1
|
+
{"version":3,"file":"ServerRegistrationModule.d.ts","sourceRoot":"","sources":["../src/ServerRegistrationModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;wBAKvE,wBAAwB;AAH7B,wBAG8B"}
|