expo-notifications 0.30.5 → 0.30.7

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/notifications/notifications/RemoteMessageSerializer.java +5 -0
  4. package/android/src/main/java/expo/modules/notifications/notifications/model/NotificationData.kt +0 -3
  5. package/android/src/main/java/expo/modules/notifications/service/delegates/ExpoHandlingDelegate.kt +13 -3
  6. package/android/src/main/java/expo/modules/notifications/service/delegates/FirebaseMessagingDelegate.kt +14 -13
  7. package/build/Notifications.types.d.ts +30 -6
  8. package/build/Notifications.types.d.ts.map +1 -1
  9. package/build/Notifications.types.js.map +1 -1
  10. package/build/NotificationsHandler.d.ts.map +1 -1
  11. package/build/NotificationsHandler.js +4 -2
  12. package/build/NotificationsHandler.js.map +1 -1
  13. package/build/registerTaskAsync.d.ts +12 -6
  14. package/build/registerTaskAsync.d.ts.map +1 -1
  15. package/build/registerTaskAsync.js +12 -6
  16. package/build/registerTaskAsync.js.map +1 -1
  17. package/build/utils/mapNotificationResponse.d.ts +32 -8
  18. package/build/utils/mapNotificationResponse.d.ts.map +1 -1
  19. package/build/warnOfExpoGoPushUsage.d.ts.map +1 -1
  20. package/build/warnOfExpoGoPushUsage.js +8 -1
  21. package/build/warnOfExpoGoPushUsage.js.map +1 -1
  22. package/expo-module.config.json +1 -1
  23. package/ios/EXNotifications/Notifications/Background/BackgroundEventTransformer.swift +47 -0
  24. package/ios/EXNotifications/Notifications/Background/NotificationsBackgroundTaskConsumer.swift +2 -1
  25. package/ios/EXNotifications.podspec +7 -0
  26. package/ios/Tests/BackgroundEventTransformerSpec.swift +104 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.30.5/expo.modules.notifications-0.30.5-sources.jar → 0.30.7/expo.modules.notifications-0.30.7-sources.jar} +0 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7-sources.jar.md5 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7-sources.jar.sha1 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7-sources.jar.sha256 +1 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7-sources.jar.sha512 +1 -0
  32. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.aar +0 -0
  33. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.aar.md5 +1 -0
  34. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.aar.sha1 +1 -0
  35. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.aar.sha256 +1 -0
  36. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.aar.sha512 +1 -0
  37. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.30.5/expo.modules.notifications-0.30.5.module → 0.30.7/expo.modules.notifications-0.30.7.module} +22 -22
  38. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.module.md5 +1 -0
  39. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.module.sha1 +1 -0
  40. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.module.sha256 +1 -0
  41. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.module.sha512 +1 -0
  42. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{0.30.5/expo.modules.notifications-0.30.5.pom → 0.30.7/expo.modules.notifications-0.30.7.pom} +1 -1
  43. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.pom.md5 +1 -0
  44. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.pom.sha1 +1 -0
  45. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.pom.sha256 +1 -0
  46. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.7/expo.modules.notifications-0.30.7.pom.sha512 +1 -0
  47. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml +4 -4
  48. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.md5 +1 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha1 +1 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha256 +1 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha512 +1 -1
  52. package/package.json +3 -3
  53. package/src/Notifications.types.ts +34 -7
  54. package/src/NotificationsHandler.ts +4 -2
  55. package/src/registerTaskAsync.ts +12 -6
  56. package/src/warnOfExpoGoPushUsage.ts +8 -3
  57. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5-sources.jar.md5 +0 -1
  58. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5-sources.jar.sha1 +0 -1
  59. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5-sources.jar.sha256 +0 -1
  60. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5-sources.jar.sha512 +0 -1
  61. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.aar +0 -0
  62. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.aar.md5 +0 -1
  63. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.aar.sha1 +0 -1
  64. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.aar.sha256 +0 -1
  65. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.aar.sha512 +0 -1
  66. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.module.md5 +0 -1
  67. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.module.sha1 +0 -1
  68. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.module.sha256 +0 -1
  69. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.module.sha512 +0 -1
  70. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.pom.md5 +0 -1
  71. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.pom.sha1 +0 -1
  72. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.pom.sha256 +0 -1
  73. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/0.30.5/expo.modules.notifications-0.30.5.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,20 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.30.7 — 2025-04-23
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 0.30.6 — 2025-04-22
18
+
19
+ ### 🛠 Breaking changes
20
+
21
+ - [Android] support action buttons when not in foreground. This is breaking because notification background tasks on Android run not only in response to an incoming notification but also in response to an action button press. ([#35295](https://github.com/expo/expo/pull/35295) by [@vonovak](https://github.com/vonovak))
22
+
23
+ ### 🐛 Bug fixes
24
+
25
+ - correctly include `NotificationContent.data` in `NotificationHandler` ([#36195](https://github.com/expo/expo/pull/36195) by [@vonovak](https://github.com/vonovak))
26
+
13
27
  ## 0.30.5 — 2025-04-21
14
28
 
15
29
  _This version does not introduce any user-facing changes._
@@ -5,13 +5,13 @@ plugins {
5
5
  }
6
6
 
7
7
  group = 'host.exp.exponent'
8
- version = '0.30.5'
8
+ version = '0.30.7'
9
9
 
10
10
  android {
11
11
  namespace "expo.modules.notifications"
12
12
  defaultConfig {
13
13
  versionCode 21
14
- versionName '0.30.5'
14
+ versionName '0.30.7'
15
15
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16
16
  }
17
17
 
@@ -38,6 +38,11 @@ public class RemoteMessageSerializer {
38
38
 
39
39
  private static Bundle toBundle(Map<String, String> data) {
40
40
  Bundle serializedData = new Bundle();
41
+ // we put the dataString in the bundle to achieve a cross-platform behavior
42
+ // users can call JSON.parse() on the dataString to get the data in JS.
43
+ // Converting to Bundle which would seem to be the equivalent of JSON.parse
44
+ // lacks some dynamic properties of JSON.parse so we don't do it.
45
+ serializedData.putString("dataString", data.getOrDefault("body", null));
41
46
  for (Map.Entry<String, String> dataEntry : data.entrySet()) {
42
47
  serializedData.putString(dataEntry.getKey(), dataEntry.getValue());
43
48
  }
@@ -58,9 +58,6 @@ value class NotificationData(private val data: Map<String, String>) {
58
58
  val categoryId: String?
59
59
  get() = data["categoryId"]
60
60
 
61
- val sticky: Boolean
62
- get() = data["sticky"]?.toBoolean() ?: false
63
-
64
61
  val subText: String?
65
62
  get() = data["subtitle"]
66
63
 
@@ -8,10 +8,12 @@ import android.util.Log
8
8
  import androidx.lifecycle.Lifecycle
9
9
  import androidx.lifecycle.ProcessLifecycleOwner
10
10
  import expo.modules.notifications.notifications.NotificationManager
11
+ import expo.modules.notifications.notifications.NotificationSerializer
11
12
  import expo.modules.notifications.notifications.model.Notification
12
13
  import expo.modules.notifications.notifications.model.NotificationResponse
13
14
  import expo.modules.notifications.service.NotificationForwarderActivity
14
15
  import expo.modules.notifications.service.NotificationsService
16
+ import expo.modules.notifications.service.delegates.FirebaseMessagingDelegate.Companion.runTaskManagerTasks
15
17
  import expo.modules.notifications.service.interfaces.HandlingDelegate
16
18
  import java.lang.ref.WeakReference
17
19
  import java.util.*
@@ -107,7 +109,7 @@ class ExpoHandlingDelegate(protected val context: Context) : HandlingDelegate {
107
109
 
108
110
  override fun handleNotification(notification: Notification) {
109
111
  /**
110
- * The app is in background, only data-only notifications reach this point.
112
+ * When the app is in background, only data-only notifications reach this point.
111
113
  * We do not inform JS about those. If JS wants to respond to data-only notifications,
112
114
  * it needs to happen via expo-task-manager: https://docs.expo.dev/versions/latest/sdk/notifications/#background-notifications
113
115
  * */
@@ -120,8 +122,8 @@ class ExpoHandlingDelegate(protected val context: Context) : HandlingDelegate {
120
122
  it.onNotificationReceived(notification)
121
123
  }
122
124
  } else if (notification.shouldPresent()) {
123
- // TODO vonovak remove this - this branch doesn't seem to execute at all
124
- // because only data-only notifications reach this point and they are not presented
125
+ // only data-only notifications reach this point and we present them if they fall into the documented exception:
126
+ // https://docs.expo.dev/push-notifications/what-you-need-to-know/#headless-background-notifications
125
127
  NotificationsService.present(context, notification)
126
128
  }
127
129
  }
@@ -136,9 +138,17 @@ class ExpoHandlingDelegate(protected val context: Context) : HandlingDelegate {
136
138
  }
137
139
 
138
140
  override fun handleNotificationResponse(notificationResponse: NotificationResponse) {
141
+ if (!isAppInForeground()) {
142
+ // do not run in foreground for better alignment with iOS
143
+ // iOS doesn't run background tasks for notification responses at all
144
+ runTaskManagerTasks(context.applicationContext, NotificationSerializer.toBundle(notificationResponse))
145
+ }
139
146
  if (notificationResponse.action.opensAppToForeground()) {
140
147
  openAppToForeground(context, notificationResponse)
141
148
  }
149
+ // NOTE the listeners are not set up when the app is killed
150
+ // and is launched in response to tapping a notification button
151
+ // this code is a noop in that case
142
152
  val listeners = getListeners()
143
153
  if (listeners.isEmpty()) {
144
154
  sPendingNotificationResponses.add(notificationResponse)
@@ -1,6 +1,7 @@
1
1
  package expo.modules.notifications.service.delegates
2
2
 
3
3
  import android.content.Context
4
+ import android.os.Bundle
4
5
  import com.google.firebase.messaging.RemoteMessage
5
6
  import expo.modules.interfaces.taskManager.TaskServiceProviderHelper
6
7
  import expo.modules.notifications.notifications.RemoteMessageSerializer
@@ -73,6 +74,18 @@ open class FirebaseMessagingDelegate(protected val context: Context) : FirebaseM
73
74
  }
74
75
  sBackgroundTaskConsumerReferences[taskConsumer] = WeakReference(taskConsumer)
75
76
  }
77
+
78
+ fun getBackgroundTasks() = sBackgroundTaskConsumerReferences.values.mapNotNull { it.get() }
79
+
80
+ fun runTaskManagerTasks(applicationContext: Context, bundle: Bundle) {
81
+ // getTaskServiceImpl() has a side effect:
82
+ // the TaskService constructor calls restoreTasks which then constructs a BackgroundRemoteNotificationTaskConsumer,
83
+ // and the getBackgroundTasks() call below doesn't return an empty collection.
84
+ TaskServiceProviderHelper.getTaskServiceImpl(applicationContext)
85
+ getBackgroundTasks().forEach {
86
+ it.executeTask(bundle)
87
+ }
88
+ }
76
89
  }
77
90
 
78
91
  /**
@@ -87,25 +100,13 @@ open class FirebaseMessagingDelegate(protected val context: Context) : FirebaseM
87
100
  sLastToken = token
88
101
  }
89
102
 
90
- private fun getBackgroundTasks() = sBackgroundTaskConsumerReferences.values.mapNotNull { it.get() }
91
-
92
103
  override fun onMessageReceived(remoteMessage: RemoteMessage) {
93
104
  // the entry point for notifications. For its behavior, see table at https://firebase.google.com/docs/cloud-messaging/android/receive
94
105
  DebugLogging.logRemoteMessage("FirebaseMessagingDelegate.onMessageReceived: message", remoteMessage)
95
106
  val notification = createNotification(remoteMessage)
96
107
  DebugLogging.logNotification("FirebaseMessagingDelegate.onMessageReceived: notification", notification)
97
108
  NotificationsService.receive(context, notification)
98
- runTaskManagerTasks(remoteMessage)
99
- }
100
-
101
- private fun runTaskManagerTasks(remoteMessage: RemoteMessage) {
102
- // getTaskServiceImpl() has a side effect:
103
- // the TaskService constructor calls restoreTasks which then constructs a BackgroundRemoteNotificationTaskConsumer,
104
- // and the getBackgroundTasks() call below doesn't return an empty collection.
105
- TaskServiceProviderHelper.getTaskServiceImpl(context.applicationContext)
106
- getBackgroundTasks().forEach {
107
- it.executeTask(RemoteMessageSerializer.toBundle(remoteMessage))
108
- }
109
+ runTaskManagerTasks(context.applicationContext, RemoteMessageSerializer.toBundle(remoteMessage))
109
110
  }
110
111
 
111
112
  protected fun createNotification(remoteMessage: RemoteMessage): Notification {
@@ -387,7 +387,13 @@ export type NotificationContent = {
387
387
  /**
388
388
  * Data associated with the notification, not displayed
389
389
  */
390
- data: Record<string, any>;
390
+ data: {
391
+ [key: string]: unknown;
392
+ };
393
+ /**
394
+ * The identifier of the notification’s category.
395
+ */
396
+ categoryIdentifier: string | null;
391
397
  sound: 'default' | 'defaultCritical' | 'custom' | null;
392
398
  } & (NotificationContentIos | NotificationContentAndroid);
393
399
  /**
@@ -414,10 +420,6 @@ export type NotificationContentIos = {
414
420
  * The number the system adds to the notification summary when the notification represents multiple items.
415
421
  */
416
422
  summaryArgumentCount?: number;
417
- /**
418
- * The identifier of the notification’s category.
419
- */
420
- categoryIdentifier: string | null;
421
423
  /**
422
424
  * The identifier that groups related notifications.
423
425
  */
@@ -507,7 +509,7 @@ export type NotificationContentInput = {
507
509
  /**
508
510
  * Data associated with the notification, not displayed.
509
511
  */
510
- data?: Record<string, any>;
512
+ data?: Record<string, unknown>;
511
513
  /**
512
514
  * Application badge number associated with the notification.
513
515
  */
@@ -708,4 +710,26 @@ export type MaybeNotificationResponse = NotificationResponse | null | undefined;
708
710
  * */
709
711
  export type Subscription = EventSubscription;
710
712
  export { PermissionExpiration, PermissionResponse, EventSubscription, PermissionStatus, } from 'expo-modules-core';
713
+ /**
714
+ * Payload for the background notification handler task.
715
+ * [Read more](#run-javascript-in-response-to-incoming-notifications).
716
+ * */
717
+ export type NotificationTaskPayload = NotificationResponse | {
718
+ /**
719
+ * Object describing the remote notification. `null` for headless background notifications.
720
+ */
721
+ notification: Record<string, unknown> | null;
722
+ /**
723
+ * `dataString` carries the data payload of the notification as JSON string.
724
+ */
725
+ data: {
726
+ dataString?: string;
727
+ [key: string]: unknown;
728
+ };
729
+ /**
730
+ * Detailed, raw object describing the remote notification. [See more](https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification#Payload-key-reference).
731
+ * @platform ios
732
+ */
733
+ aps?: Record<string, unknown>;
734
+ };
711
735
  //# sourceMappingURL=Notifications.types.d.ts.map
@@ -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;QAC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B,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;;;;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
+ {"version":3,"file":"Notifications.types.d.ts","sourceRoot":"","sources":["../src/Notifications.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,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ACvC;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;;;;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;AAE3B;;;KAGK;AACL,MAAM,MAAM,uBAAuB,GAC/B,oBAAoB,GACpB;IACE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C;;OAEG;IACH,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B,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;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
+ {"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;AAgXD,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: {\n [key: string]: unknown;\n };\n /**\n * The identifier of the notification’s category.\n */\n categoryIdentifier: string | null;\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 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, unknown>;\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 * 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/**\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\n/**\n * Payload for the background notification handler task.\n * [Read more](#run-javascript-in-response-to-incoming-notifications).\n * */\nexport type NotificationTaskPayload =\n | NotificationResponse\n | {\n /**\n * Object describing the remote notification. `null` for headless background notifications.\n */\n notification: Record<string, unknown> | null;\n /**\n * `dataString` carries the data payload of the notification as JSON string.\n */\n data: {\n dataString?: string;\n [key: string]: unknown;\n };\n /**\n * Detailed, raw object describing the remote notification. [See more](https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification#Payload-key-reference).\n * @platform ios\n */\n aps?: Record<string, unknown>;\n };\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,CAAC;AAG3E;;GAEG;AACH,qBAA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AAoB,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,CAwChF"}
@@ -1,5 +1,6 @@
1
1
  import { LegacyEventEmitter, CodedError, UnavailabilityError, } from 'expo-modules-core';
2
2
  import NotificationsHandlerModule from './NotificationsHandlerModule';
3
+ import { mapNotification } from './utils/mapNotificationResponse';
3
4
  /**
4
5
  * @hidden
5
6
  */
@@ -58,7 +59,8 @@ export function setNotificationHandler(handler) {
58
59
  return;
59
60
  }
60
61
  try {
61
- const behavior = await handler.handleNotification(notification);
62
+ const mappedNotification = mapNotification(notification);
63
+ const behavior = await handler.handleNotification(mappedNotification);
62
64
  await NotificationsHandlerModule.handleNotificationAsync(id, behavior);
63
65
  handler.handleSuccess?.(id);
64
66
  }
@@ -67,7 +69,7 @@ export function setNotificationHandler(handler) {
67
69
  handler.handleError?.(id, error);
68
70
  }
69
71
  });
70
- handleTimeoutSubscription = notificationEmitter.addListener(handleNotificationTimeoutEventName, ({ id, notification }) => handler.handleError?.(id, new NotificationTimeoutError(id, notification)));
72
+ handleTimeoutSubscription = notificationEmitter.addListener(handleNotificationTimeoutEventName, ({ id, notification }) => handler.handleError?.(id, new NotificationTimeoutError(id, mapNotification(notification))));
71
73
  }
72
74
  }
73
75
  //# sourceMappingURL=NotificationsHandler.js.map
@@ -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,mBA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ACH,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
+ {"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;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE;;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,6BAA6B,CAAC;AAEzE,IAAI,kBAAkB,GAA6B,IAAI,CAAC;AACxD,IAAI,yBAAyB,GAA6B,IAAI,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAmC;IACxE,IAAI,kBAAkB,EAAE,CAAC;QACvB,kBAAkB,CAAC,MAAM,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itter,\n type EventSubscription,\n CodedError,\n UnavailabilityError,\n} from 'expo-modules-core';\n\nimport { Notification, NotificationBehavior } from './Notifications.types';\nimport NotificationsHandlerModule from './NotificationsHandlerModule';\nimport { mapNotification } from './utils/mapNotificationResponse';\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 mappedNotification = mapNotification(notification);\n const behavior = await handler.handleNotification(mappedNotification);\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, mapNotification(notification)))\n );\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  /**
2
- * Call `registerTaskAsync` to set a callback (task) that will run in response to when a notification is received while the app is in foreground, background, or terminated.
3
- * When app is terminated, only a [data message](https://firebase.google.com/docs/cloud-messaging/concept-options#data_messages) (Android) / [background notification](https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app#Create-a-background-notification) (iOS) triggers the task execution.
2
+ * Call `registerTaskAsync` to set a callback (task) that runs when a notification is received while the app is in foreground, background, or terminated.
3
+ * Only on Android, the task also runs in response to a notification action press when the app is backgrounded or terminated.
4
+ * When the app is terminated, only a [Headless Background Notification](/push-notifications/what-you-need-to-know/#headless-background-notifications) triggers the task execution.
4
5
  * However, the OS may decide not to deliver the notification to your app in some cases (e.g. when the device is in Doze mode on Android, or when you send too many notifications - Apple recommends to not ["send more than two or three per hour"](https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app#overview)).
5
6
  *
6
7
  * Under the hood, this function is run using `expo-task-manager`. You **must** define the task first, with [`TaskManager.defineTask`](./task-manager#taskmanagerdefinetasktaskname-taskexecutor) and register it with `registerTaskAsync`.
@@ -9,7 +10,7 @@
9
10
  * `expo-task-manager` loads your app's JS bundle in the background and executes the task, as well as any side effects which may happen as a consequence of requiring any JS modules.
10
11
  *
11
12
  * The callback function you define with `TaskManager.defineTask` receives an object with the following fields:
12
- * - `data`: The remote payload delivered by either FCM (Android) or APNs (iOS). See [`PushNotificationTrigger`](#pushnotificationtrigger) for details.
13
+ * - `data`: The remote payload delivered by either FCM (Android) or APNs (iOS). See [`NotificationTaskPayload`](#notificationtaskpayload) for details.
13
14
  * - `error`: The error (if any) that occurred during execution of the task.
14
15
  * - `executionInfo`: JSON object of additional info related to the task, including the `taskName`.
15
16
  * @param taskName The string you passed to `TaskManager.defineTask` as the `taskName` parameter.
@@ -21,9 +22,14 @@
21
22
  *
22
23
  * const BACKGROUND_NOTIFICATION_TASK = 'BACKGROUND-NOTIFICATION-TASK';
23
24
  *
24
- * TaskManager.defineTask(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {
25
- * console.log('Received a notification in the background!');
26
- * // Do something with the notification data
25
+ * defineTask<Notifications.NotificationTaskPayload>(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {
26
+ * console.log('Received a notification task payload!');
27
+ * const isNotificationResponse = 'actionIdentifier' in taskPayload;
28
+ * if (isNotificationResponse) {
29
+ * // Do something with the notification response from user
30
+ * } else {
31
+ * // Do something with the data from notification that was received
32
+ * }
27
33
  * });
28
34
  *
29
35
  * Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);
@@ -1 +1 @@
1
- {"version":3,"file":"registerTaskAsync.d.ts","sourceRoot":"","sources":["../src/registerTaskAsync.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAA8B,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM/E"}
1
+ {"version":3,"file":"registerTaskAsync.d.ts","sourceRoot":"","sources":["../src/registerTaskAsync.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAA8B,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM/E"}
@@ -1,8 +1,9 @@
1
1
  import { UnavailabilityError } from 'expo-modules-core';
2
2
  import BackgroundNotificationTasksModule from './BackgroundNotificationTasksModule';
3
3
  /**
4
- * Call `registerTaskAsync` to set a callback (task) that will run in response to when a notification is received while the app is in foreground, background, or terminated.
5
- * When app is terminated, only a [data message](https://firebase.google.com/docs/cloud-messaging/concept-options#data_messages) (Android) / [background notification](https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app#Create-a-background-notification) (iOS) triggers the task execution.
4
+ * Call `registerTaskAsync` to set a callback (task) that runs when a notification is received while the app is in foreground, background, or terminated.
5
+ * Only on Android, the task also runs in response to a notification action press when the app is backgrounded or terminated.
6
+ * When the app is terminated, only a [Headless Background Notification](/push-notifications/what-you-need-to-know/#headless-background-notifications) triggers the task execution.
6
7
  * However, the OS may decide not to deliver the notification to your app in some cases (e.g. when the device is in Doze mode on Android, or when you send too many notifications - Apple recommends to not ["send more than two or three per hour"](https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app#overview)).
7
8
  *
8
9
  * Under the hood, this function is run using `expo-task-manager`. You **must** define the task first, with [`TaskManager.defineTask`](./task-manager#taskmanagerdefinetasktaskname-taskexecutor) and register it with `registerTaskAsync`.
@@ -11,7 +12,7 @@ import BackgroundNotificationTasksModule from './BackgroundNotificationTasksModu
11
12
  * `expo-task-manager` loads your app's JS bundle in the background and executes the task, as well as any side effects which may happen as a consequence of requiring any JS modules.
12
13
  *
13
14
  * The callback function you define with `TaskManager.defineTask` receives an object with the following fields:
14
- * - `data`: The remote payload delivered by either FCM (Android) or APNs (iOS). See [`PushNotificationTrigger`](#pushnotificationtrigger) for details.
15
+ * - `data`: The remote payload delivered by either FCM (Android) or APNs (iOS). See [`NotificationTaskPayload`](#notificationtaskpayload) for details.
15
16
  * - `error`: The error (if any) that occurred during execution of the task.
16
17
  * - `executionInfo`: JSON object of additional info related to the task, including the `taskName`.
17
18
  * @param taskName The string you passed to `TaskManager.defineTask` as the `taskName` parameter.
@@ -23,9 +24,14 @@ import BackgroundNotificationTasksModule from './BackgroundNotificationTasksModu
23
24
  *
24
25
  * const BACKGROUND_NOTIFICATION_TASK = 'BACKGROUND-NOTIFICATION-TASK';
25
26
  *
26
- * TaskManager.defineTask(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {
27
- * console.log('Received a notification in the background!');
28
- * // Do something with the notification data
27
+ * defineTask<Notifications.NotificationTaskPayload>(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {
28
+ * console.log('Received a notification task payload!');
29
+ * const isNotificationResponse = 'actionIdentifier' in taskPayload;
30
+ * if (isNotificationResponse) {
31
+ * // Do something with the notification response from user
32
+ * } else {
33
+ * // Do something with the data from notification that was received
34
+ * }
29
35
  * });
30
36
  *
31
37
  * Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);
@@ -1 +1 @@
1
- {"version":3,"file":"registerTaskAsync.js","sourceRoot":"","sources":["../src/registerTaskAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,iCAAiC,MAAM,qCAAqC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAgB;IAC9D,IAAI,CAAC,iCAAiC,CAAC,iBAAiB,EAAE,CAAC;QACzD,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,MAAM,iCAAiC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport BackgroundNotificationTasksModule from './BackgroundNotificationTasksModule';\n\n/**\n * Call `registerTaskAsync` to set a callback (task) that will run in response to when a notification is received while the app is in foreground, background, or terminated.\n * When app is terminated, only a [data message](https://firebase.google.com/docs/cloud-messaging/concept-options#data_messages) (Android) / [background notification](https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app#Create-a-background-notification) (iOS) triggers the task execution.\n * However, the OS may decide not to deliver the notification to your app in some cases (e.g. when the device is in Doze mode on Android, or when you send too many notifications - Apple recommends to not [\"send more than two or three per hour\"](https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app#overview)).\n *\n * Under the hood, this function is run using `expo-task-manager`. You **must** define the task first, with [`TaskManager.defineTask`](./task-manager#taskmanagerdefinetasktaskname-taskexecutor) and register it with `registerTaskAsync`.\n *\n * Make sure you define and register the task in the module scope of a JS module which is required early by your app (e.g. in the `index.js` file).\n * `expo-task-manager` loads your app's JS bundle in the background and executes the task, as well as any side effects which may happen as a consequence of requiring any JS modules.\n *\n * The callback function you define with `TaskManager.defineTask` receives an object with the following fields:\n * - `data`: The remote payload delivered by either FCM (Android) or APNs (iOS). See [`PushNotificationTrigger`](#pushnotificationtrigger) for details.\n * - `error`: The error (if any) that occurred during execution of the task.\n * - `executionInfo`: JSON object of additional info related to the task, including the `taskName`.\n * @param taskName The string you passed to `TaskManager.defineTask` as the `taskName` parameter.\n *\n * @example\n * ```ts\n * import * as TaskManager from 'expo-task-manager';\n * import * as Notifications from 'expo-notifications';\n *\n * const BACKGROUND_NOTIFICATION_TASK = 'BACKGROUND-NOTIFICATION-TASK';\n *\n * TaskManager.defineTask(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {\n * console.log('Received a notification in the background!');\n * // Do something with the notification data\n * });\n *\n * Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);\n * ```\n * @header inBackground\n */\nexport default async function registerTaskAsync(taskName: string): Promise<null> {\n if (!BackgroundNotificationTasksModule.registerTaskAsync) {\n throw new UnavailabilityError('Notifications', 'registerTaskAsync');\n }\n\n return await BackgroundNotificationTasksModule.registerTaskAsync(taskName);\n}\n"]}
1
+ {"version":3,"file":"registerTaskAsync.js","sourceRoot":"","sources":["../src/registerTaskAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,iCAAiC,MAAM,qCAAqC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAgB;IAC9D,IAAI,CAAC,iCAAiC,CAAC,iBAAiB,EAAE,CAAC;QACzD,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,MAAM,iCAAiC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport BackgroundNotificationTasksModule from './BackgroundNotificationTasksModule';\n\n/**\n * Call `registerTaskAsync` to set a callback (task) that runs when a notification is received while the app is in foreground, background, or terminated.\n * Only on Android, the task also runs in response to a notification action press when the app is backgrounded or terminated.\n * When the app is terminated, only a [Headless Background Notification](/push-notifications/what-you-need-to-know/#headless-background-notifications) triggers the task execution.\n * However, the OS may decide not to deliver the notification to your app in some cases (e.g. when the device is in Doze mode on Android, or when you send too many notifications - Apple recommends to not [\"send more than two or three per hour\"](https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app#overview)).\n *\n * Under the hood, this function is run using `expo-task-manager`. You **must** define the task first, with [`TaskManager.defineTask`](./task-manager#taskmanagerdefinetasktaskname-taskexecutor) and register it with `registerTaskAsync`.\n *\n * Make sure you define and register the task in the module scope of a JS module which is required early by your app (e.g. in the `index.js` file).\n * `expo-task-manager` loads your app's JS bundle in the background and executes the task, as well as any side effects which may happen as a consequence of requiring any JS modules.\n *\n * The callback function you define with `TaskManager.defineTask` receives an object with the following fields:\n * - `data`: The remote payload delivered by either FCM (Android) or APNs (iOS). See [`NotificationTaskPayload`](#notificationtaskpayload) for details.\n * - `error`: The error (if any) that occurred during execution of the task.\n * - `executionInfo`: JSON object of additional info related to the task, including the `taskName`.\n * @param taskName The string you passed to `TaskManager.defineTask` as the `taskName` parameter.\n *\n * @example\n * ```ts\n * import * as TaskManager from 'expo-task-manager';\n * import * as Notifications from 'expo-notifications';\n *\n * const BACKGROUND_NOTIFICATION_TASK = 'BACKGROUND-NOTIFICATION-TASK';\n *\n * defineTask<Notifications.NotificationTaskPayload>(BACKGROUND_NOTIFICATION_TASK, ({ data, error, executionInfo }) => {\n * console.log('Received a notification task payload!');\n * const isNotificationResponse = 'actionIdentifier' in taskPayload;\n * if (isNotificationResponse) {\n * // Do something with the notification response from user\n * } else {\n * // Do something with the data from notification that was received\n * }\n * });\n *\n * Notifications.registerTaskAsync(BACKGROUND_NOTIFICATION_TASK);\n * ```\n * @header inBackground\n */\nexport default async function registerTaskAsync(taskName: string): Promise<null> {\n if (!BackgroundNotificationTasksModule.registerTaskAsync) {\n throw new UnavailabilityError('Notifications', 'registerTaskAsync');\n }\n\n return await BackgroundNotificationTasksModule.registerTaskAsync(taskName);\n}\n"]}