@ammarahmed/notifee-react-native 7.3.0

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 (215) hide show
  1. package/.gitattributes +3 -0
  2. package/LICENSE +44 -0
  3. package/README.md +131 -0
  4. package/RNNotifee.podspec +39 -0
  5. package/RNNotifeeCore.podspec +33 -0
  6. package/android/build.gradle +116 -0
  7. package/android/gradle.properties +1 -0
  8. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar +0 -0
  9. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.md5 +1 -0
  10. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha1 +1 -0
  11. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha256 +1 -0
  12. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha512 +1 -0
  13. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom +9 -0
  14. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.md5 +1 -0
  15. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha1 +1 -0
  16. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha256 +1 -0
  17. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha512 +1 -0
  18. package/android/libs/app/notifee/core/maven-metadata.xml +13 -0
  19. package/android/libs/app/notifee/core/maven-metadata.xml.md5 +1 -0
  20. package/android/libs/app/notifee/core/maven-metadata.xml.sha1 +1 -0
  21. package/android/libs/app/notifee/core/maven-metadata.xml.sha256 +1 -0
  22. package/android/libs/app/notifee/core/maven-metadata.xml.sha512 +1 -0
  23. package/android/lint.xml +5 -0
  24. package/android/proguard-rules.pro +74 -0
  25. package/android/settings.gradle +1 -0
  26. package/android/src/main/AndroidManifest.xml +12 -0
  27. package/android/src/main/java/io/invertase/notifee/NotifeeApiModule.java +349 -0
  28. package/android/src/main/java/io/invertase/notifee/NotifeeEventSubscriber.java +118 -0
  29. package/android/src/main/java/io/invertase/notifee/NotifeeInitProvider.java +55 -0
  30. package/android/src/main/java/io/invertase/notifee/NotifeePackage.java +30 -0
  31. package/android/src/main/java/io/invertase/notifee/NotifeeReactUtils.java +244 -0
  32. package/app.plugin.js +1 -0
  33. package/dist/NotifeeApiModule.d.ts +53 -0
  34. package/dist/NotifeeApiModule.js +607 -0
  35. package/dist/NotifeeApiModule.js.map +1 -0
  36. package/dist/NotifeeJSEventEmitter.d.ts +3 -0
  37. package/dist/NotifeeJSEventEmitter.js +14 -0
  38. package/dist/NotifeeJSEventEmitter.js.map +1 -0
  39. package/dist/NotifeeNativeError.d.ts +15 -0
  40. package/dist/NotifeeNativeError.js +61 -0
  41. package/dist/NotifeeNativeError.js.map +1 -0
  42. package/dist/NotifeeNativeModule.d.ts +14 -0
  43. package/dist/NotifeeNativeModule.js +43 -0
  44. package/dist/NotifeeNativeModule.js.map +1 -0
  45. package/dist/NotifeeNativeModule.web.d.ts +12 -0
  46. package/dist/NotifeeNativeModule.web.js +19 -0
  47. package/dist/NotifeeNativeModule.web.js.map +1 -0
  48. package/dist/index.d.ts +8 -0
  49. package/dist/index.js +43 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/types/Library.d.ts +21 -0
  52. package/dist/types/Library.js +6 -0
  53. package/dist/types/Library.js.map +1 -0
  54. package/dist/types/Module.d.ts +572 -0
  55. package/dist/types/Module.js +6 -0
  56. package/dist/types/Module.js.map +1 -0
  57. package/dist/types/Notification.d.ts +450 -0
  58. package/dist/types/Notification.js +105 -0
  59. package/dist/types/Notification.js.map +1 -0
  60. package/dist/types/NotificationAndroid.d.ts +1276 -0
  61. package/dist/types/NotificationAndroid.js +380 -0
  62. package/dist/types/NotificationAndroid.js.map +1 -0
  63. package/dist/types/NotificationIOS.d.ts +537 -0
  64. package/dist/types/NotificationIOS.js +92 -0
  65. package/dist/types/NotificationIOS.js.map +1 -0
  66. package/dist/types/NotificationWeb.d.ts +5 -0
  67. package/dist/types/NotificationWeb.js +3 -0
  68. package/dist/types/NotificationWeb.js.map +1 -0
  69. package/dist/types/PowerManagerInfo.d.ts +36 -0
  70. package/dist/types/PowerManagerInfo.js +6 -0
  71. package/dist/types/PowerManagerInfo.js.map +1 -0
  72. package/dist/types/Trigger.d.ts +108 -0
  73. package/dist/types/Trigger.js +39 -0
  74. package/dist/types/Trigger.js.map +1 -0
  75. package/dist/utils/id.d.ts +1 -0
  76. package/dist/utils/id.js +16 -0
  77. package/dist/utils/id.js.map +1 -0
  78. package/dist/utils/index.d.ts +16 -0
  79. package/dist/utils/index.js +52 -0
  80. package/dist/utils/index.js.map +1 -0
  81. package/dist/utils/validate.d.ts +15 -0
  82. package/dist/utils/validate.js +93 -0
  83. package/dist/utils/validate.js.map +1 -0
  84. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.d.ts +2 -0
  85. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js +39 -0
  86. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js.map +1 -0
  87. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.d.ts +2 -0
  88. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js +27 -0
  89. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js.map +1 -0
  90. package/dist/validators/validate.d.ts +25 -0
  91. package/dist/validators/validate.js +75 -0
  92. package/dist/validators/validate.js.map +1 -0
  93. package/dist/validators/validateAndroidAction.d.ts +2 -0
  94. package/dist/validators/validateAndroidAction.js +52 -0
  95. package/dist/validators/validateAndroidAction.js.map +1 -0
  96. package/dist/validators/validateAndroidChannel.d.ts +2 -0
  97. package/dist/validators/validateAndroidChannel.js +155 -0
  98. package/dist/validators/validateAndroidChannel.js.map +1 -0
  99. package/dist/validators/validateAndroidChannelGroup.d.ts +2 -0
  100. package/dist/validators/validateAndroidChannelGroup.js +42 -0
  101. package/dist/validators/validateAndroidChannelGroup.js.map +1 -0
  102. package/dist/validators/validateAndroidFullScreenAction.d.ts +2 -0
  103. package/dist/validators/validateAndroidFullScreenAction.js +50 -0
  104. package/dist/validators/validateAndroidFullScreenAction.js.map +1 -0
  105. package/dist/validators/validateAndroidInput.d.ts +2 -0
  106. package/dist/validators/validateAndroidInput.js +54 -0
  107. package/dist/validators/validateAndroidInput.js.map +1 -0
  108. package/dist/validators/validateAndroidNotification.d.ts +2 -0
  109. package/dist/validators/validateAndroidNotification.js +529 -0
  110. package/dist/validators/validateAndroidNotification.js.map +1 -0
  111. package/dist/validators/validateAndroidPressAction.d.ts +2 -0
  112. package/dist/validators/validateAndroidPressAction.js +50 -0
  113. package/dist/validators/validateAndroidPressAction.js.map +1 -0
  114. package/dist/validators/validateAndroidStyle.d.ts +22 -0
  115. package/dist/validators/validateAndroidStyle.js +231 -0
  116. package/dist/validators/validateAndroidStyle.js.map +1 -0
  117. package/dist/validators/validateIOSAttachment.d.ts +6 -0
  118. package/dist/validators/validateIOSAttachment.js +102 -0
  119. package/dist/validators/validateIOSAttachment.js.map +1 -0
  120. package/dist/validators/validateIOSCategory.d.ts +2 -0
  121. package/dist/validators/validateIOSCategory.js +124 -0
  122. package/dist/validators/validateIOSCategory.js.map +1 -0
  123. package/dist/validators/validateIOSCategoryAction.d.ts +2 -0
  124. package/dist/validators/validateIOSCategoryAction.js +59 -0
  125. package/dist/validators/validateIOSCategoryAction.js.map +1 -0
  126. package/dist/validators/validateIOSInput.d.ts +2 -0
  127. package/dist/validators/validateIOSInput.js +32 -0
  128. package/dist/validators/validateIOSInput.js.map +1 -0
  129. package/dist/validators/validateIOSNotification.d.ts +2 -0
  130. package/dist/validators/validateIOSNotification.js +211 -0
  131. package/dist/validators/validateIOSNotification.js.map +1 -0
  132. package/dist/validators/validateIOSPermissions.d.ts +2 -0
  133. package/dist/validators/validateIOSPermissions.js +62 -0
  134. package/dist/validators/validateIOSPermissions.js.map +1 -0
  135. package/dist/validators/validateNotification.d.ts +11 -0
  136. package/dist/validators/validateNotification.js +129 -0
  137. package/dist/validators/validateNotification.js.map +1 -0
  138. package/dist/validators/validateTrigger.d.ts +2 -0
  139. package/dist/validators/validateTrigger.js +104 -0
  140. package/dist/validators/validateTrigger.js.map +1 -0
  141. package/dist/version.d.ts +1 -0
  142. package/dist/version.js.map +1 -0
  143. package/ios/NotifeeCore/Info.plist +22 -0
  144. package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.h +28 -0
  145. package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.m +72 -0
  146. package/ios/NotifeeCore/NotifeeCore+NSURLSession.h +25 -0
  147. package/ios/NotifeeCore/NotifeeCore+NSURLSession.m +55 -0
  148. package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.h +37 -0
  149. package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m +242 -0
  150. package/ios/NotifeeCore/NotifeeCore.h +118 -0
  151. package/ios/NotifeeCore/NotifeeCore.m +784 -0
  152. package/ios/NotifeeCore/NotifeeCoreDelegateHolder.h +34 -0
  153. package/ios/NotifeeCore/NotifeeCoreDelegateHolder.m +70 -0
  154. package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.h +39 -0
  155. package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.m +68 -0
  156. package/ios/NotifeeCore/NotifeeCoreExtensionHelper.h +38 -0
  157. package/ios/NotifeeCore/NotifeeCoreExtensionHelper.m +224 -0
  158. package/ios/NotifeeCore/NotifeeCoreUtil.h +82 -0
  159. package/ios/NotifeeCore/NotifeeCoreUtil.m +793 -0
  160. package/ios/RNNotifee/NotifeeApiModule.h +25 -0
  161. package/ios/RNNotifee/NotifeeApiModule.m +371 -0
  162. package/ios/RNNotifee/NotifeeExtensionHelper.h +37 -0
  163. package/ios/RNNotifee/NotifeeExtensionHelper.m +37 -0
  164. package/ios/RNNotifee.xcodeproj/project.pbxproj +318 -0
  165. package/jest-mock.js +158 -0
  166. package/package.json +59 -0
  167. package/plugin/build/index.d.ts +3 -0
  168. package/plugin/build/index.js +12 -0
  169. package/plugin/build/index.js.map +1 -0
  170. package/plugin/build/withNotifeeProjectGradlePlugin.d.ts +5 -0
  171. package/plugin/build/withNotifeeProjectGradlePlugin.js +24 -0
  172. package/plugin/build/withNotifeeProjectGradlePlugin.js.map +1 -0
  173. package/plugin/src/index.ts +9 -0
  174. package/plugin/src/withNotifeeProjectGradlePlugin.ts +27 -0
  175. package/plugin/tsconfig.json +9 -0
  176. package/react-native.config.js +11 -0
  177. package/refresh-example.sh +71 -0
  178. package/src/NotifeeApiModule.ts +825 -0
  179. package/src/NotifeeJSEventEmitter.ts +11 -0
  180. package/src/NotifeeNativeError.ts +70 -0
  181. package/src/NotifeeNativeModule.ts +55 -0
  182. package/src/NotifeeNativeModule.web.ts +25 -0
  183. package/src/index.ts +33 -0
  184. package/src/types/Library.ts +28 -0
  185. package/src/types/Module.ts +625 -0
  186. package/src/types/Notification.ts +505 -0
  187. package/src/types/NotificationAndroid.ts +1443 -0
  188. package/src/types/NotificationIOS.ts +681 -0
  189. package/src/types/NotificationWeb.ts +5 -0
  190. package/src/types/PowerManagerInfo.ts +43 -0
  191. package/src/types/Trigger.ts +118 -0
  192. package/src/utils/id.ts +13 -0
  193. package/src/utils/index.ts +47 -0
  194. package/src/utils/validate.ts +92 -0
  195. package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfo.ts +45 -0
  196. package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.ts +33 -0
  197. package/src/validators/validate.ts +85 -0
  198. package/src/validators/validateAndroidAction.ts +54 -0
  199. package/src/validators/validateAndroidChannel.ts +188 -0
  200. package/src/validators/validateAndroidChannelGroup.ts +49 -0
  201. package/src/validators/validateAndroidFullScreenAction.ts +65 -0
  202. package/src/validators/validateAndroidInput.ts +67 -0
  203. package/src/validators/validateAndroidNotification.ts +704 -0
  204. package/src/validators/validateAndroidPressAction.ts +65 -0
  205. package/src/validators/validateAndroidStyle.ts +315 -0
  206. package/src/validators/validateIOSAttachment.ts +136 -0
  207. package/src/validators/validateIOSCategory.ts +150 -0
  208. package/src/validators/validateIOSCategoryAction.ts +65 -0
  209. package/src/validators/validateIOSInput.ts +38 -0
  210. package/src/validators/validateIOSNotification.ts +296 -0
  211. package/src/validators/validateIOSPermissions.ts +78 -0
  212. package/src/validators/validateNotification.ts +156 -0
  213. package/src/validators/validateTrigger.ts +134 -0
  214. package/src/version.ts +2 -0
  215. package/tsconfig.json +23 -0
@@ -0,0 +1,537 @@
1
+ import { AuthorizationStatus } from './Notification';
2
+ /**
3
+ * The interface for iOS specific options which are applied to a notification.
4
+ *
5
+ * To learn more about iOS notifications, view the [iOS](/react-native/docs/iOS/introduction)
6
+ * documentation for full examples and usage.
7
+ *
8
+ * @platform ios
9
+ */
10
+ export interface NotificationIOS {
11
+ /**
12
+ * Optional array of [IOSNotificationAttachment](/react-native/reference/iosnotificationattachment) interfaces.
13
+ *
14
+ * Attachments allow audio, image, or video content to be displayed with the notification, enriching the user's experience.
15
+ *
16
+ * View the [Attachments](/react-native/docs/ios/appearances#attachments) documentation for more information
17
+ * and usage examples.
18
+ */
19
+ attachments?: IOSNotificationAttachment[];
20
+ /**
21
+ * The application badge count number. Set to null to indicate no change, or 0 to hide.
22
+ */
23
+ badgeCount?: number | null;
24
+ /**
25
+ * The id of a registered `IOSCategory` (via the `setNotificationCategories` API) that will be used to determine the
26
+ * appropriate actions to display for the notification.
27
+ */
28
+ categoryId?: string;
29
+ /**
30
+ * The launch image that will be used when the app is opened from this notification.
31
+ */
32
+ launchImageName?: string;
33
+ /**
34
+ * The name of the sound file to be played. The sound must be in the Library/Sounds folder of the
35
+ * app's data container or the Library/Sounds folder of an app group data container.
36
+ *
37
+ * If the file is not found in a container, the system will look in the app's bundle.
38
+ *
39
+ * Use 'default' to use the default system sound.
40
+ */
41
+ sound?: string;
42
+ /**
43
+ * Value that indicate the importance and delivery timing of a notification.
44
+ *
45
+ * @platform ios iOS >= 15
46
+ */
47
+ interruptionLevel?: IOSNotificationInterruptionLevel;
48
+ /**
49
+ * If the notification is a critical alert set this property to true; critical alerts will bypass
50
+ * the mute switch and also bypass Do Not Disturb.
51
+ *
52
+ * @platform ios iOS >= 12
53
+ */
54
+ critical?: boolean;
55
+ /**
56
+ * The optional audio volume of the critical sound; a float value between 0.0 and 1.0.
57
+ *
58
+ * This property is not used unless the `critical: true` option is also set.
59
+ *
60
+ * @platform ios iOS >= 12
61
+ */
62
+ criticalVolume?: number;
63
+ /**
64
+ * A unique id for the thread or conversation related to this notification.
65
+ * This will be used to visually group notifications together.
66
+ */
67
+ threadId?: string;
68
+ /**
69
+ * The argument that is inserted in the IOSCategory.summaryFormat for this notification.
70
+ *
71
+ * See `IOSCategory.summaryFormat`.
72
+ *
73
+ * @platform ios iOS >= 12
74
+ */
75
+ summaryArgument?: string;
76
+ /**
77
+ * A number that indicates how many items in the summary are being represented.
78
+ *
79
+ * For example if a messages app sends one notification for 3 new messages in a group chat,
80
+ * the summaryArgument could be the name of the group chat and the summaryArgumentCount should be 3.
81
+ *
82
+ * If set, value cannot be 0 or less.
83
+ *
84
+ * See `IOSCategory.summaryFormat`.
85
+ *
86
+ * @platform ios iOS >= 12
87
+ */
88
+ summaryArgumentCount?: number;
89
+ /**
90
+ * The identifier for the window to be opened when the user taps a notification.
91
+ *
92
+ * This value determines the window brought forward when the user taps this notification on iPadOS.
93
+ *
94
+ * @platform ios iOS >= 13
95
+ */
96
+ targetContentId?: string;
97
+ /**
98
+ * Optional property to customise how notifications are presented when the app is in the foreground.
99
+ *
100
+ * By default, Notifee will show iOS notifications in heads-up mode if your app is currently in the foreground.
101
+ */
102
+ foregroundPresentationOptions?: IOSForegroundPresentationOptions;
103
+ /**
104
+ * Optional property for communication notifications
105
+ *
106
+ * @platform ios iOS >= 15
107
+ */
108
+ communicationInfo?: IOSCommunicationInfo;
109
+ }
110
+ /**
111
+ * An interface to support communication notifications on iOS 15 and above
112
+ *
113
+ * @platform ios
114
+ */
115
+ export interface IOSCommunicationInfo {
116
+ conversationId: string;
117
+ body?: string;
118
+ sender: IOSCommunicationInfoPerson;
119
+ }
120
+ export interface IOSCommunicationInfoPerson {
121
+ id: string;
122
+ displayName: string;
123
+ avatar?: string;
124
+ }
125
+ /**
126
+ * An interface to customise how notifications are shown when the app is in the foreground.
127
+ *
128
+ * By default, Notifee will show iOS notifications in heads-up mode if your app is currently in the foreground.
129
+ *
130
+ * View the [Foreground Notifications](/react-native/docs/ios/appearance#foreground-notifications) to learn
131
+ * more.
132
+ *
133
+ * @platform ios
134
+ */
135
+ export interface IOSForegroundPresentationOptions {
136
+ /**
137
+ * App in foreground dialog box which indicates when a decision has to be made
138
+ *
139
+ * Defaults to true
140
+ * @deprecated Use `banner` and `list` instead
141
+ */
142
+ alert?: boolean;
143
+ /**
144
+ * App in foreground notification sound
145
+ *
146
+ * Defaults to true
147
+ */
148
+ sound?: boolean;
149
+ /**
150
+ * App in foreground badge update
151
+ *
152
+ * Defaults to true
153
+ */
154
+ badge?: boolean;
155
+ /**
156
+ * Present the notification as a banner
157
+ *
158
+ * For iOS 13 and lower, will be equivalent to setting `alert` to true
159
+ *
160
+ * Defaults to true
161
+ */
162
+ banner?: boolean;
163
+ /**
164
+ * Show the notification in Notification Center
165
+ *
166
+ * For iOS 13 and lower, will be equivalent to setting `alert` to true
167
+ *
168
+ * Defaults to true
169
+ */
170
+ list?: boolean;
171
+ }
172
+ /**
173
+ * An interface representing all the available permissions that can be requested by your app via
174
+ * the [`requestPermission`](/react-native/reference/requestpermission) API.
175
+ *
176
+ * View the [Permissions](/react-native/docs/ios/permissions) to learn
177
+ * more.
178
+ *
179
+ * @platform ios
180
+ */
181
+ export interface IOSNotificationPermissions {
182
+ /**
183
+ * Request permission to display alerts.
184
+ *
185
+ * Defaults to true.
186
+ */
187
+ alert?: boolean;
188
+ /**
189
+ * Request permission to display critical notifications.
190
+ *
191
+ * View the [Critical Notifications](/react-native/docs/ios/behaviour#critical-notifications) documentation for more information
192
+ * and usage examples.
193
+ *
194
+ * Defaults to false.
195
+ */
196
+ criticalAlert?: boolean;
197
+ /**
198
+ * Request permission to update the application badge.
199
+ *
200
+ * Defaults to true.
201
+ */
202
+ badge?: boolean;
203
+ /**
204
+ * Request permission to play sounds.
205
+ *
206
+ * Defaults to true.
207
+ */
208
+ sound?: boolean;
209
+ /**
210
+ * Request permission to display notifications in a CarPlay environment.
211
+ *
212
+ * Defaults to true.
213
+ */
214
+ carPlay?: boolean;
215
+ /**
216
+ * Request permission to provisionally create non-interrupting notifications.
217
+ *
218
+ * Defaults to false.
219
+ *
220
+ * @platform ios iOS >= 12
221
+ */
222
+ provisional?: boolean;
223
+ /**
224
+ * Request permission for Siri to automatically read out notification messages over AirPods.
225
+ *
226
+ * Defaults to false.
227
+ *
228
+ * @platform ios iOS >= 13
229
+ */
230
+ announcement?: boolean;
231
+ }
232
+ /**
233
+ * An enum representing the show previews notification setting for this app on the device.
234
+ *
235
+ * Value is greater than 0 if previews are to be shown, compare against an exact value
236
+ * (e.g. WHEN_AUTHENTICATED) for more granular control.
237
+ *
238
+ * @platform ios
239
+ */
240
+ export declare enum IOSShowPreviewsSetting {
241
+ /**
242
+ * This setting is not supported on this device. Usually this means that the iOS version required
243
+ * for this setting (iOS 11+) has not been met.
244
+ */
245
+ NOT_SUPPORTED = -1,
246
+ /**
247
+ * Never show previews.
248
+ */
249
+ NEVER = 0,
250
+ /**
251
+ * Always show previews even if the device is currently locked.
252
+ */
253
+ ALWAYS = 1,
254
+ /**
255
+ * Only show previews when the device is unlocked.
256
+ */
257
+ WHEN_AUTHENTICATED = 2
258
+ }
259
+ /**
260
+ * An enum representing a notification setting for this app on the device.
261
+ *
262
+ * Value is greater than 0 if setting enabled, compare against an exact value (e.g. NOT_SUPPORTED) for more
263
+ * granular control.
264
+ *
265
+ * @platform ios
266
+ */
267
+ export declare enum IOSNotificationSetting {
268
+ /**
269
+ * This setting is not supported on this device. Usually this means that the iOS version required
270
+ * for this setting has not been met.
271
+ */
272
+ NOT_SUPPORTED = -1,
273
+ /**
274
+ * This setting is currently disabled by the user.
275
+ */
276
+ DISABLED = 0,
277
+ /**
278
+ * This setting is currently enabled.
279
+ */
280
+ ENABLED = 1
281
+ }
282
+ /**
283
+ * An interface representing the current authorization status and notification-related settings for your app.
284
+ *
285
+ * This interface is returned from [`requestPermission`](/react-native/reference/requestpermission)
286
+ * and [`getNotificationSettings`](/react-native/reference/getnotificationsettings).
287
+ *
288
+ * View the [Observing Settings](/react-native/docs/ios/permissions#observing-settings) documentation to learn more.
289
+ *
290
+ * @platform ios
291
+ */
292
+ export interface IOSNotificationSettings {
293
+ /**
294
+ * Enum describing if notifications will alert the user.
295
+ */
296
+ alert: IOSNotificationSetting;
297
+ /**
298
+ * Enum describing if notifications can update the application badge.
299
+ */
300
+ badge: IOSNotificationSetting;
301
+ /**
302
+ * Enum describing if critical notifications are allowed.
303
+ */
304
+ criticalAlert: IOSNotificationSetting;
305
+ /**
306
+ * Enum describing if notification previews will be shown.
307
+ */
308
+ showPreviews: IOSShowPreviewsSetting;
309
+ /**
310
+ * Enum describing if notifications can trigger a sound.
311
+ */
312
+ sound: IOSNotificationSetting;
313
+ /**
314
+ * Enum describing if notifications can be displayed in a CarPlay environment.
315
+ */
316
+ carPlay: IOSNotificationSetting;
317
+ /**
318
+ * Enum describing if notifications will be displayed on the lock screen.
319
+ */
320
+ lockScreen: IOSNotificationSetting;
321
+ /**
322
+ * Enum describing if notifications can be announced to the user
323
+ * via 3rd party services such as Siri.
324
+ *
325
+ * For example, if the notification can be automatically read by Siri
326
+ * while the user is wearing AirPods.
327
+ */
328
+ announcement: IOSNotificationSetting;
329
+ /**
330
+ * Enum describing if notifications will be displayed in the notification center.
331
+ */
332
+ notificationCenter: IOSNotificationSetting;
333
+ inAppNotificationSettings: IOSNotificationSetting;
334
+ /**
335
+ * Overall notification authorization status for the application.
336
+ */
337
+ authorizationStatus: AuthorizationStatus;
338
+ }
339
+ /**
340
+ * TODO docs, used to provide context to Siri
341
+ *
342
+ * @platform ios
343
+ */
344
+ export declare enum IOSIntentIdentifier {
345
+ START_AUDIO_CALL = 0,
346
+ START_VIDEO_CALL = 1,
347
+ SEARCH_CALL_HISTORY = 2,
348
+ SET_AUDIO_SOURCE_IN_CAR = 3,
349
+ SET_CLIMATE_SETTINGS_IN_CAR = 4,
350
+ SET_DEFROSTER_SETTINGS_IN_CAR = 5,
351
+ SET_SEAT_SETTINGS_IN_CAR = 6,
352
+ SET_PROFILE_IN_CAR = 7,
353
+ SAVE_PROFILE_IN_CAR = 8,
354
+ START_WORKOUT = 9,
355
+ PAUSE_WORKOUT = 10,
356
+ END_WORKOUT = 11,
357
+ CANCEL_WORKOUT = 12,
358
+ RESUME_WORKOUT = 13,
359
+ SET_RADIO_STATION = 14,
360
+ SEND_MESSAGE = 15,
361
+ SEARCH_FOR_MESSAGES = 16,
362
+ SET_MESSAGE_ATTRIBUTE = 17,
363
+ SEND_PAYMENT = 18,
364
+ REQUEST_PAYMENT = 19,
365
+ SEARCH_FOR_PHOTOS = 20,
366
+ START_PHOTO_PLAYBACK = 21,
367
+ LIST_RIDE_OPTIONS = 22,
368
+ REQUEST_RIDE = 23,
369
+ GET_RIDE_STATUS = 24
370
+ }
371
+ /**
372
+ * A interface representing a notification category created via [`setNotificationCategories`](/react-native/reference/setnotificationcategories).
373
+ *
374
+ * At minimum, a category must be created with a unique identifier, all other properties are optional.
375
+ *
376
+ * View the [Categories](/react-native/docs/ios/categories) documentation to learn more.
377
+ *
378
+ * @platform ios
379
+ */
380
+ export interface IOSNotificationCategory {
381
+ /**
382
+ * The unique ID for the category.
383
+ */
384
+ id: string;
385
+ /**
386
+ * Specify a custom format for the summary text, which is visible when notifications are grouped together.
387
+ *
388
+ * View the [Summary Text](/react-native/docs/ios/categories#category-summary-text) documentation to learn more.
389
+ */
390
+ summaryFormat?: string;
391
+ /**
392
+ * Allow notifications in this category to be displayed in a CarPlay environment.
393
+ *
394
+ * Defaults to `false`.
395
+ */
396
+ allowInCarPlay?: boolean;
397
+ allowAnnouncement?: boolean;
398
+ hiddenPreviewsShowTitle?: boolean;
399
+ hiddenPreviewsShowSubtitle?: boolean;
400
+ hiddenPreviewsBodyPlaceholder?: string;
401
+ intentIdentifiers?: IOSIntentIdentifier[];
402
+ actions?: IOSNotificationCategoryAction[];
403
+ }
404
+ /**
405
+ * The interface used to describe a notification quick action for iOS.
406
+ *
407
+ * Quick actions allow users to interact with notifications, allowing you to handle events
408
+ * within your application. When an action completes (e.g. pressing an action, or filling out an input
409
+ * box) an event is sent.
410
+ *
411
+ * View the [Quick Actions](/react-native/docs/ios/interaction#quick-actions) documentation to learn more.
412
+ *
413
+ * @platform ios
414
+ */
415
+ export interface IOSNotificationCategoryAction {
416
+ id: string;
417
+ /**
418
+ * The title of the action, e.g. "Reply", "Mark as read" etc.
419
+ */
420
+ title: string;
421
+ /**
422
+ * If provided, the action accepts custom user input.
423
+ *
424
+ * If `true`, the user will be able to provide free text input when the action is pressed.
425
+ *
426
+ * The placeholder and button text can be customized by providing an object
427
+ * of type [`IOSInput`](/react-native/reference/iosinput).
428
+ *
429
+ * View the [Action Input](/react-native/docs/ios/interaction#action-input) documentation to
430
+ * learn more.
431
+ */
432
+ input?: true | IOSInput;
433
+ /**
434
+ * Makes the action red, indicating that the action is destructive.
435
+ */
436
+ destructive?: boolean;
437
+ /**
438
+ * Whether this action should cause the application to launch in the foreground.
439
+ */
440
+ foreground?: boolean;
441
+ /**
442
+ * Whether this action should require unlocking before being performed.
443
+ */
444
+ authenticationRequired?: boolean;
445
+ }
446
+ /**
447
+ * The interface used to enable advanced user input on a notification.
448
+ *
449
+ * View the [Action input](/react-native/docs/ios/interaction#action-input) documentation to learn more.
450
+ *
451
+ * @platform ios
452
+ */
453
+ export interface IOSInput {
454
+ /**
455
+ * Overrides the default button text "Send", next to the input box.
456
+ */
457
+ buttonText?: string;
458
+ /**
459
+ * The placeholder text displayed in the text input field for this action.
460
+ */
461
+ placeholderText?: string;
462
+ }
463
+ /**
464
+ * An interface for describing an iOS Notification Attachment.
465
+ *
466
+ * View the [Attachments](/react-native/docs/ios/appearance#attachments) documentation to learn more.
467
+ *
468
+ * @platform ios
469
+ */
470
+ export interface IOSNotificationAttachment {
471
+ /**
472
+ * A optional unique identifier of the attachment.
473
+ * If no `id` is provided, a unique id is created for you.
474
+ */
475
+ id?: string;
476
+ /**
477
+ * A URL to the media file to display.
478
+ *
479
+ * The value can be any of the following:
480
+ *
481
+ * - An absolute path to a file on the device
482
+ * - iOS resource
483
+ *
484
+ * For a list of supported file types, see [Supported File Types](https://developer.apple.com/documentation/usernotifications/unnotificationattachment#1682051) on the official Apple documentation for more information.
485
+ */
486
+ url: string;
487
+ /**
488
+ * An optional hint about an attachment’s file type, as as Uniform Type Identifier (UTI).
489
+ *
490
+ * A list of UTI values can be found [here](https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html) e.g. for JPEG you'd use `public.jpeg` as the `typeHint` value.
491
+ *
492
+ * If you do not include this key, the attachment’s filename extension is used to determine its type.
493
+ */
494
+ typeHint?: string;
495
+ /**
496
+ * When set to `true` the thumbnail will be hidden.
497
+ * Defaults to `false`.
498
+ */
499
+ thumbnailHidden?: boolean;
500
+ /**
501
+ * An optional clipping rectangle for a thumbnail image.
502
+ */
503
+ thumbnailClippingRect?: IOSAttachmentThumbnailClippingRect;
504
+ /**
505
+ * The frame number of an animation to use as the thumbnail.
506
+ *
507
+ * For a video, it is the time (in seconds) into the video from which to
508
+ * grab the thumbnail image.
509
+ *
510
+ * For a GIF, it is the frame number of the animation to use
511
+ * as a thumbnail image.
512
+ */
513
+ thumbnailTime?: number;
514
+ }
515
+ /**
516
+ * The interface used to specify the portion of your image that you want to be displayed as the thumbnail
517
+ *
518
+ * Values are in the range 0.0 to 1.0.
519
+ *
520
+ * For example, specifying an origin (x,y) of (0.25, 0.25) and a size (width, height) of (0.5, 0.5)
521
+ * defines a clipping rectangle that shows only the center portion of the image.
522
+ *
523
+ * @platform ios
524
+ */
525
+ export interface IOSAttachmentThumbnailClippingRect {
526
+ x: number;
527
+ y: number;
528
+ width: number;
529
+ height: number;
530
+ }
531
+ /**
532
+ * Constants that indicate the importance and delivery timing of a notification.
533
+ * https://developer.apple.com/documentation/usernotifications/unnotificationinterruptionlevel
534
+ *
535
+ * @platform ios
536
+ */
537
+ export declare type IOSNotificationInterruptionLevel = 'active' | 'critical' | 'passive' | 'timeSensitive';
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2016-present Invertase Limited.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.IOSIntentIdentifier = exports.IOSNotificationSetting = exports.IOSShowPreviewsSetting = void 0;
7
+ /**
8
+ * An enum representing the show previews notification setting for this app on the device.
9
+ *
10
+ * Value is greater than 0 if previews are to be shown, compare against an exact value
11
+ * (e.g. WHEN_AUTHENTICATED) for more granular control.
12
+ *
13
+ * @platform ios
14
+ */
15
+ var IOSShowPreviewsSetting;
16
+ (function (IOSShowPreviewsSetting) {
17
+ /**
18
+ * This setting is not supported on this device. Usually this means that the iOS version required
19
+ * for this setting (iOS 11+) has not been met.
20
+ */
21
+ IOSShowPreviewsSetting[IOSShowPreviewsSetting["NOT_SUPPORTED"] = -1] = "NOT_SUPPORTED";
22
+ /**
23
+ * Never show previews.
24
+ */
25
+ IOSShowPreviewsSetting[IOSShowPreviewsSetting["NEVER"] = 0] = "NEVER";
26
+ /**
27
+ * Always show previews even if the device is currently locked.
28
+ */
29
+ IOSShowPreviewsSetting[IOSShowPreviewsSetting["ALWAYS"] = 1] = "ALWAYS";
30
+ /**
31
+ * Only show previews when the device is unlocked.
32
+ */
33
+ IOSShowPreviewsSetting[IOSShowPreviewsSetting["WHEN_AUTHENTICATED"] = 2] = "WHEN_AUTHENTICATED";
34
+ })(IOSShowPreviewsSetting = exports.IOSShowPreviewsSetting || (exports.IOSShowPreviewsSetting = {}));
35
+ /**
36
+ * An enum representing a notification setting for this app on the device.
37
+ *
38
+ * Value is greater than 0 if setting enabled, compare against an exact value (e.g. NOT_SUPPORTED) for more
39
+ * granular control.
40
+ *
41
+ * @platform ios
42
+ */
43
+ var IOSNotificationSetting;
44
+ (function (IOSNotificationSetting) {
45
+ /**
46
+ * This setting is not supported on this device. Usually this means that the iOS version required
47
+ * for this setting has not been met.
48
+ */
49
+ IOSNotificationSetting[IOSNotificationSetting["NOT_SUPPORTED"] = -1] = "NOT_SUPPORTED";
50
+ /**
51
+ * This setting is currently disabled by the user.
52
+ */
53
+ IOSNotificationSetting[IOSNotificationSetting["DISABLED"] = 0] = "DISABLED";
54
+ /**
55
+ * This setting is currently enabled.
56
+ */
57
+ IOSNotificationSetting[IOSNotificationSetting["ENABLED"] = 1] = "ENABLED";
58
+ })(IOSNotificationSetting = exports.IOSNotificationSetting || (exports.IOSNotificationSetting = {}));
59
+ /**
60
+ * TODO docs, used to provide context to Siri
61
+ *
62
+ * @platform ios
63
+ */
64
+ var IOSIntentIdentifier;
65
+ (function (IOSIntentIdentifier) {
66
+ IOSIntentIdentifier[IOSIntentIdentifier["START_AUDIO_CALL"] = 0] = "START_AUDIO_CALL";
67
+ IOSIntentIdentifier[IOSIntentIdentifier["START_VIDEO_CALL"] = 1] = "START_VIDEO_CALL";
68
+ IOSIntentIdentifier[IOSIntentIdentifier["SEARCH_CALL_HISTORY"] = 2] = "SEARCH_CALL_HISTORY";
69
+ IOSIntentIdentifier[IOSIntentIdentifier["SET_AUDIO_SOURCE_IN_CAR"] = 3] = "SET_AUDIO_SOURCE_IN_CAR";
70
+ IOSIntentIdentifier[IOSIntentIdentifier["SET_CLIMATE_SETTINGS_IN_CAR"] = 4] = "SET_CLIMATE_SETTINGS_IN_CAR";
71
+ IOSIntentIdentifier[IOSIntentIdentifier["SET_DEFROSTER_SETTINGS_IN_CAR"] = 5] = "SET_DEFROSTER_SETTINGS_IN_CAR";
72
+ IOSIntentIdentifier[IOSIntentIdentifier["SET_SEAT_SETTINGS_IN_CAR"] = 6] = "SET_SEAT_SETTINGS_IN_CAR";
73
+ IOSIntentIdentifier[IOSIntentIdentifier["SET_PROFILE_IN_CAR"] = 7] = "SET_PROFILE_IN_CAR";
74
+ IOSIntentIdentifier[IOSIntentIdentifier["SAVE_PROFILE_IN_CAR"] = 8] = "SAVE_PROFILE_IN_CAR";
75
+ IOSIntentIdentifier[IOSIntentIdentifier["START_WORKOUT"] = 9] = "START_WORKOUT";
76
+ IOSIntentIdentifier[IOSIntentIdentifier["PAUSE_WORKOUT"] = 10] = "PAUSE_WORKOUT";
77
+ IOSIntentIdentifier[IOSIntentIdentifier["END_WORKOUT"] = 11] = "END_WORKOUT";
78
+ IOSIntentIdentifier[IOSIntentIdentifier["CANCEL_WORKOUT"] = 12] = "CANCEL_WORKOUT";
79
+ IOSIntentIdentifier[IOSIntentIdentifier["RESUME_WORKOUT"] = 13] = "RESUME_WORKOUT";
80
+ IOSIntentIdentifier[IOSIntentIdentifier["SET_RADIO_STATION"] = 14] = "SET_RADIO_STATION";
81
+ IOSIntentIdentifier[IOSIntentIdentifier["SEND_MESSAGE"] = 15] = "SEND_MESSAGE";
82
+ IOSIntentIdentifier[IOSIntentIdentifier["SEARCH_FOR_MESSAGES"] = 16] = "SEARCH_FOR_MESSAGES";
83
+ IOSIntentIdentifier[IOSIntentIdentifier["SET_MESSAGE_ATTRIBUTE"] = 17] = "SET_MESSAGE_ATTRIBUTE";
84
+ IOSIntentIdentifier[IOSIntentIdentifier["SEND_PAYMENT"] = 18] = "SEND_PAYMENT";
85
+ IOSIntentIdentifier[IOSIntentIdentifier["REQUEST_PAYMENT"] = 19] = "REQUEST_PAYMENT";
86
+ IOSIntentIdentifier[IOSIntentIdentifier["SEARCH_FOR_PHOTOS"] = 20] = "SEARCH_FOR_PHOTOS";
87
+ IOSIntentIdentifier[IOSIntentIdentifier["START_PHOTO_PLAYBACK"] = 21] = "START_PHOTO_PLAYBACK";
88
+ IOSIntentIdentifier[IOSIntentIdentifier["LIST_RIDE_OPTIONS"] = 22] = "LIST_RIDE_OPTIONS";
89
+ IOSIntentIdentifier[IOSIntentIdentifier["REQUEST_RIDE"] = 23] = "REQUEST_RIDE";
90
+ IOSIntentIdentifier[IOSIntentIdentifier["GET_RIDE_STATUS"] = 24] = "GET_RIDE_STATUS";
91
+ })(IOSIntentIdentifier = exports.IOSIntentIdentifier || (exports.IOSIntentIdentifier = {}));
92
+ //# sourceMappingURL=NotificationIOS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationIOS.js","sourceRoot":"","sources":["../../src/types/NotificationIOS.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkRH;;;;;;;GAOG;AACH,IAAY,sBAqBX;AArBD,WAAY,sBAAsB;IAChC;;;OAGG;IACH,sFAAkB,CAAA;IAElB;;OAEG;IACH,qEAAS,CAAA;IAET;;OAEG;IACH,uEAAU,CAAA;IAEV;;OAEG;IACH,+FAAsB,CAAA;AACxB,CAAC,EArBW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAqBjC;AAED;;;;;;;GAOG;AACH,IAAY,sBAgBX;AAhBD,WAAY,sBAAsB;IAChC;;;OAGG;IACH,sFAAkB,CAAA;IAElB;;OAEG;IACH,2EAAY,CAAA;IAEZ;;OAEG;IACH,yEAAW,CAAA;AACb,CAAC,EAhBW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAgBjC;AAsED;;;;GAIG;AACH,IAAY,mBAkDX;AAlDD,WAAY,mBAAmB;IAC7B,qFAAoB,CAAA;IAEpB,qFAAoB,CAAA;IAEpB,2FAAuB,CAAA;IAEvB,mGAA2B,CAAA;IAE3B,2GAA+B,CAAA;IAE/B,+GAAiC,CAAA;IAEjC,qGAA4B,CAAA;IAE5B,yFAAsB,CAAA;IAEtB,2FAAuB,CAAA;IAEvB,+EAAiB,CAAA;IAEjB,gFAAkB,CAAA;IAElB,4EAAgB,CAAA;IAEhB,kFAAmB,CAAA;IAEnB,kFAAmB,CAAA;IAEnB,wFAAsB,CAAA;IAEtB,8EAAiB,CAAA;IAEjB,4FAAwB,CAAA;IAExB,gGAA0B,CAAA;IAE1B,8EAAiB,CAAA;IAEjB,oFAAoB,CAAA;IAEpB,wFAAsB,CAAA;IAEtB,8FAAyB,CAAA;IAEzB,wFAAsB,CAAA;IAEtB,8EAAiB,CAAA;IAEjB,oFAAoB,CAAA;AACtB,CAAC,EAlDW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAkD9B"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Empty at the moment but will contain web-specific settings as needed
3
+ */
4
+ export interface WebNotificationSettings {
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=NotificationWeb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationWeb.js","sourceRoot":"","sources":["../../src/types/NotificationWeb.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The interface that represents the information returned from `getPowerManagerInfo()`.
3
+ *
4
+ * View the [Background Restrictions](/react-native/docs/android/background-restrictions) documentation to learn more.
5
+ *
6
+ * @platform android
7
+ */
8
+ export interface PowerManagerInfo {
9
+ /**
10
+ * The device manufacturer.
11
+ *
12
+ * For example, Samsung.
13
+ */
14
+ manufacturer?: string;
15
+ /**
16
+ * The device model.
17
+ *
18
+ * For example, Galaxy S8
19
+ */
20
+ model?: string;
21
+ /**
22
+ * The Android version
23
+ *
24
+ * For example, Android 10
25
+ */
26
+ version?: string;
27
+ /**
28
+ * The activity that the user will be navigated to if `openPowerManagerSettings()` is called.
29
+ *
30
+ * Use this as an indicator of what steps the user may have to perform,
31
+ * in-order to prevent your app from being killed.
32
+ *
33
+ * If no activity can be found, value will be null.
34
+ */
35
+ activity?: string | null;
36
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2016-present Invertase Limited.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=PowerManagerInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PowerManagerInfo.js","sourceRoot":"","sources":["../../src/types/PowerManagerInfo.ts"],"names":[],"mappings":";AAAA;;GAEG"}