@goliapkg/sentori-react-native 4.0.0 → 5.1.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 (308) hide show
  1. package/MIGRATION.md +131 -0
  2. package/README.md +40 -30
  3. package/android/build.gradle +21 -0
  4. package/android/src/main/java/com/sentori/SentoriCrashHandler.kt +29 -0
  5. package/android/src/main/java/com/sentori/SentoriModule.kt +8 -0
  6. package/android/src/main/java/com/sentori/SentoriScreenshotCapture.kt +36 -4
  7. package/android/src/test/java/com/sentori/SentoriCrashHandlerTest.kt +7 -2
  8. package/android/src/test/resources/robolectric.properties +10 -0
  9. package/ios/SentoriCrashHandler.swift +48 -4
  10. package/ios/SentoriModule.swift +12 -0
  11. package/ios/SentoriScreenshotCapture.swift +34 -3
  12. package/lib/config.d.ts +17 -47
  13. package/lib/config.d.ts.map +1 -1
  14. package/lib/config.js +3 -0
  15. package/lib/config.js.map +1 -1
  16. package/lib/device.d.ts +5 -0
  17. package/lib/device.d.ts.map +1 -0
  18. package/lib/device.js +29 -0
  19. package/lib/device.js.map +1 -0
  20. package/lib/emit-hooks.d.ts +7 -0
  21. package/lib/emit-hooks.d.ts.map +1 -0
  22. package/lib/emit-hooks.js +24 -0
  23. package/lib/emit-hooks.js.map +1 -0
  24. package/lib/error-boundary.d.ts.map +1 -1
  25. package/lib/error-boundary.js +1 -1
  26. package/lib/error-boundary.js.map +1 -1
  27. package/lib/feature-flags.d.ts.map +1 -1
  28. package/lib/handlers/dev-symbolicate.d.ts +1 -1
  29. package/lib/handlers/dev-symbolicate.d.ts.map +1 -1
  30. package/lib/handlers/dev-symbolicate.js +2 -0
  31. package/lib/handlers/dev-symbolicate.js.map +1 -1
  32. package/lib/handlers/global.js +1 -1
  33. package/lib/handlers/global.js.map +1 -1
  34. package/lib/handlers/lifecycle.js +3 -3
  35. package/lib/handlers/lifecycle.js.map +1 -1
  36. package/lib/handlers/network.d.ts +2 -2
  37. package/lib/handlers/network.d.ts.map +1 -1
  38. package/lib/handlers/network.js +69 -187
  39. package/lib/handlers/network.js.map +1 -1
  40. package/lib/handlers/promise.js +1 -1
  41. package/lib/handlers/promise.js.map +1 -1
  42. package/lib/handlers/screenshot.d.ts.map +1 -1
  43. package/lib/handlers/screenshot.js +3 -12
  44. package/lib/handlers/screenshot.js.map +1 -1
  45. package/lib/index.d.ts +32 -109
  46. package/lib/index.d.ts.map +1 -1
  47. package/lib/index.js +54 -103
  48. package/lib/index.js.map +1 -1
  49. package/lib/init.d.ts +3 -150
  50. package/lib/init.d.ts.map +1 -1
  51. package/lib/init.js +100 -261
  52. package/lib/init.js.map +1 -1
  53. package/lib/long-task-monitor.d.ts +1 -7
  54. package/lib/long-task-monitor.d.ts.map +1 -1
  55. package/lib/long-task-monitor.js +37 -58
  56. package/lib/long-task-monitor.js.map +1 -1
  57. package/lib/mask.d.ts +5 -13
  58. package/lib/mask.d.ts.map +1 -1
  59. package/lib/mask.js +29 -30
  60. package/lib/mask.js.map +1 -1
  61. package/lib/mobile-vitals.d.ts +3 -31
  62. package/lib/mobile-vitals.d.ts.map +1 -1
  63. package/lib/mobile-vitals.js +22 -61
  64. package/lib/mobile-vitals.js.map +1 -1
  65. package/lib/native-pending.d.ts +3 -0
  66. package/lib/native-pending.d.ts.map +1 -0
  67. package/lib/native-pending.js +64 -0
  68. package/lib/native-pending.js.map +1 -0
  69. package/lib/native.d.ts +4 -11
  70. package/lib/native.d.ts.map +1 -1
  71. package/lib/native.js +23 -0
  72. package/lib/native.js.map +1 -1
  73. package/lib/navigation.d.ts +3 -17
  74. package/lib/navigation.d.ts.map +1 -1
  75. package/lib/navigation.js +32 -133
  76. package/lib/navigation.js.map +1 -1
  77. package/lib/netinfo.d.ts +1 -1
  78. package/lib/netinfo.d.ts.map +1 -1
  79. package/lib/netinfo.js +2 -2
  80. package/lib/netinfo.js.map +1 -1
  81. package/lib/push.d.ts.map +1 -1
  82. package/lib/push.js +2 -4
  83. package/lib/push.js.map +1 -1
  84. package/lib/rage-tap.d.ts.map +1 -1
  85. package/lib/rage-tap.js +56 -23
  86. package/lib/rage-tap.js.map +1 -1
  87. package/lib/replay-screens.d.ts +15 -0
  88. package/lib/replay-screens.d.ts.map +1 -0
  89. package/lib/replay-screens.js +87 -0
  90. package/lib/replay-screens.js.map +1 -0
  91. package/lib/replay.d.ts.map +1 -1
  92. package/lib/replay.js +3 -24
  93. package/lib/replay.js.map +1 -1
  94. package/lib/responsiveness-detector.d.ts +18 -0
  95. package/lib/responsiveness-detector.d.ts.map +1 -0
  96. package/lib/responsiveness-detector.js +55 -0
  97. package/lib/responsiveness-detector.js.map +1 -0
  98. package/lib/scope.d.ts +7 -0
  99. package/lib/scope.d.ts.map +1 -0
  100. package/lib/scope.js +41 -0
  101. package/lib/scope.js.map +1 -0
  102. package/lib/transport.d.ts +19 -92
  103. package/lib/transport.d.ts.map +1 -1
  104. package/lib/transport.js +75 -288
  105. package/lib/transport.js.map +1 -1
  106. package/lib/verbs.d.ts +16 -0
  107. package/lib/verbs.d.ts.map +1 -0
  108. package/lib/verbs.js +153 -0
  109. package/lib/verbs.js.map +1 -0
  110. package/package.json +4 -3
  111. package/src/__tests__/iron-rule.test.ts +128 -0
  112. package/src/__tests__/replay-screens.test.ts +63 -0
  113. package/src/__tests__/responsiveness-detector.test.ts +74 -0
  114. package/src/__tests__/screenshot.test.ts +0 -2
  115. package/src/__tests__/transport.test.ts +66 -213
  116. package/src/__tests__/verbs.test.ts +91 -0
  117. package/src/config.ts +20 -47
  118. package/src/device.ts +36 -0
  119. package/src/emit-hooks.ts +30 -0
  120. package/src/error-boundary.tsx +1 -1
  121. package/src/handlers/dev-symbolicate.ts +2 -1
  122. package/src/handlers/global.ts +1 -1
  123. package/src/handlers/lifecycle.ts +3 -3
  124. package/src/handlers/network.ts +95 -211
  125. package/src/handlers/promise.ts +1 -1
  126. package/src/handlers/screenshot.ts +3 -11
  127. package/src/index.ts +84 -215
  128. package/src/init.ts +115 -449
  129. package/src/long-task-monitor.ts +42 -64
  130. package/src/mask.ts +29 -31
  131. package/src/mobile-vitals.ts +22 -82
  132. package/src/native-pending.ts +92 -0
  133. package/src/native.ts +33 -0
  134. package/src/navigation.ts +34 -142
  135. package/src/netinfo.ts +3 -3
  136. package/src/push.ts +2 -5
  137. package/src/rage-tap.tsx +72 -25
  138. package/src/replay-screens.ts +95 -0
  139. package/src/replay.ts +3 -20
  140. package/src/responsiveness-detector.ts +66 -0
  141. package/src/scope.ts +50 -0
  142. package/src/transport.ts +84 -371
  143. package/src/verbs.ts +198 -0
  144. package/lib/breadcrumbs.d.ts +0 -18
  145. package/lib/breadcrumbs.d.ts.map +0 -1
  146. package/lib/breadcrumbs.js +0 -42
  147. package/lib/breadcrumbs.js.map +0 -1
  148. package/lib/bundle-info.d.ts +0 -12
  149. package/lib/bundle-info.d.ts.map +0 -1
  150. package/lib/bundle-info.js +0 -73
  151. package/lib/bundle-info.js.map +0 -1
  152. package/lib/capture.d.ts +0 -140
  153. package/lib/capture.d.ts.map +0 -1
  154. package/lib/capture.js +0 -511
  155. package/lib/capture.js.map +0 -1
  156. package/lib/compat/sentry.d.ts +0 -126
  157. package/lib/compat/sentry.d.ts.map +0 -1
  158. package/lib/compat/sentry.js +0 -332
  159. package/lib/compat/sentry.js.map +0 -1
  160. package/lib/control-channel.d.ts +0 -6
  161. package/lib/control-channel.d.ts.map +0 -1
  162. package/lib/control-channel.js +0 -96
  163. package/lib/control-channel.js.map +0 -1
  164. package/lib/expo-compat.d.ts +0 -270
  165. package/lib/expo-compat.d.ts.map +0 -1
  166. package/lib/expo-compat.js +0 -500
  167. package/lib/expo-compat.js.map +0 -1
  168. package/lib/feedback-widget.d.ts +0 -35
  169. package/lib/feedback-widget.d.ts.map +0 -1
  170. package/lib/feedback-widget.js +0 -193
  171. package/lib/feedback-widget.js.map +0 -1
  172. package/lib/feedback.d.ts +0 -2
  173. package/lib/feedback.d.ts.map +0 -1
  174. package/lib/feedback.js +0 -17
  175. package/lib/feedback.js.map +0 -1
  176. package/lib/heartbeat.d.ts +0 -9
  177. package/lib/heartbeat.d.ts.map +0 -1
  178. package/lib/heartbeat.js +0 -138
  179. package/lib/heartbeat.js.map +0 -1
  180. package/lib/index.js.bak +0 -64
  181. package/lib/install-id.d.ts +0 -17
  182. package/lib/install-id.d.ts.map +0 -1
  183. package/lib/install-id.js +0 -125
  184. package/lib/install-id.js.map +0 -1
  185. package/lib/lifecycle.d.ts +0 -28
  186. package/lib/lifecycle.d.ts.map +0 -1
  187. package/lib/lifecycle.js +0 -73
  188. package/lib/lifecycle.js.map +0 -1
  189. package/lib/measure.d.ts +0 -4
  190. package/lib/measure.d.ts.map +0 -1
  191. package/lib/measure.js +0 -25
  192. package/lib/measure.js.map +0 -1
  193. package/lib/metrics.d.ts +0 -24
  194. package/lib/metrics.d.ts.map +0 -1
  195. package/lib/metrics.js +0 -81
  196. package/lib/metrics.js.map +0 -1
  197. package/lib/pre-crash-sentinel.d.ts +0 -12
  198. package/lib/pre-crash-sentinel.d.ts.map +0 -1
  199. package/lib/pre-crash-sentinel.js +0 -116
  200. package/lib/pre-crash-sentinel.js.map +0 -1
  201. package/lib/report-security.d.ts +0 -40
  202. package/lib/report-security.d.ts.map +0 -1
  203. package/lib/report-security.js +0 -159
  204. package/lib/report-security.js.map +0 -1
  205. package/lib/runtime-metrics-fps.d.ts +0 -19
  206. package/lib/runtime-metrics-fps.d.ts.map +0 -1
  207. package/lib/runtime-metrics-fps.js +0 -128
  208. package/lib/runtime-metrics-fps.js.map +0 -1
  209. package/lib/runtime-metrics-heap.d.ts +0 -13
  210. package/lib/runtime-metrics-heap.d.ts.map +0 -1
  211. package/lib/runtime-metrics-heap.js +0 -67
  212. package/lib/runtime-metrics-heap.js.map +0 -1
  213. package/lib/runtime-metrics-network.d.ts +0 -23
  214. package/lib/runtime-metrics-network.d.ts.map +0 -1
  215. package/lib/runtime-metrics-network.js +0 -99
  216. package/lib/runtime-metrics-network.js.map +0 -1
  217. package/lib/runtime-metrics.d.ts +0 -43
  218. package/lib/runtime-metrics.d.ts.map +0 -1
  219. package/lib/runtime-metrics.js +0 -115
  220. package/lib/runtime-metrics.js.map +0 -1
  221. package/lib/sample-profiler.d.ts +0 -21
  222. package/lib/sample-profiler.d.ts.map +0 -1
  223. package/lib/sample-profiler.js +0 -152
  224. package/lib/sample-profiler.js.map +0 -1
  225. package/lib/sentinel-context.d.ts +0 -4
  226. package/lib/sentinel-context.d.ts.map +0 -1
  227. package/lib/sentinel-context.js +0 -52
  228. package/lib/sentinel-context.js.map +0 -1
  229. package/lib/session-tracker.d.ts +0 -6
  230. package/lib/session-tracker.d.ts.map +0 -1
  231. package/lib/session-tracker.js +0 -50
  232. package/lib/session-tracker.js.map +0 -1
  233. package/lib/stack.d.ts +0 -3
  234. package/lib/stack.d.ts.map +0 -1
  235. package/lib/stack.js +0 -7
  236. package/lib/stack.js.map +0 -1
  237. package/lib/state-snapshots.d.ts +0 -33
  238. package/lib/state-snapshots.d.ts.map +0 -1
  239. package/lib/state-snapshots.js +0 -109
  240. package/lib/state-snapshots.js.map +0 -1
  241. package/lib/track.d.ts +0 -34
  242. package/lib/track.d.ts.map +0 -1
  243. package/lib/track.js +0 -107
  244. package/lib/track.js.map +0 -1
  245. package/lib/trail.d.ts +0 -12
  246. package/lib/trail.d.ts.map +0 -1
  247. package/lib/trail.js +0 -28
  248. package/lib/trail.js.map +0 -1
  249. package/lib/trust-score.d.ts +0 -20
  250. package/lib/trust-score.d.ts.map +0 -1
  251. package/lib/trust-score.js +0 -151
  252. package/lib/trust-score.js.map +0 -1
  253. package/lib/types.d.ts +0 -2
  254. package/lib/types.d.ts.map +0 -1
  255. package/lib/types.js +0 -4
  256. package/lib/types.js.map +0 -1
  257. package/lib/uuid.d.ts +0 -2
  258. package/lib/uuid.d.ts.map +0 -1
  259. package/lib/uuid.js +0 -3
  260. package/lib/uuid.js.map +0 -1
  261. package/src/__tests__/before-send.test.ts +0 -72
  262. package/src/__tests__/breadcrumbs.test.ts +0 -44
  263. package/src/__tests__/capture-replay.test.ts +0 -150
  264. package/src/__tests__/compat-sentry.test.ts +0 -121
  265. package/src/__tests__/control-channel.test.ts +0 -111
  266. package/src/__tests__/install-id.test.ts +0 -60
  267. package/src/__tests__/long-task-monitor.test.ts +0 -59
  268. package/src/__tests__/measure.test.ts +0 -45
  269. package/src/__tests__/navigation.test.ts +0 -175
  270. package/src/__tests__/push.test.ts +0 -238
  271. package/src/__tests__/report-security.test.ts +0 -106
  272. package/src/__tests__/runtime-metrics-instruments.test.ts +0 -109
  273. package/src/__tests__/runtime-metrics-network.test.ts +0 -78
  274. package/src/__tests__/sample-profiler.test.ts +0 -59
  275. package/src/__tests__/stack.test.ts +0 -45
  276. package/src/__tests__/state-snapshots.test.ts +0 -119
  277. package/src/__tests__/tracing.test.ts +0 -201
  278. package/src/__tests__/track.test.ts +0 -91
  279. package/src/__tests__/uuid.test.ts +0 -41
  280. package/src/breadcrumbs.ts +0 -57
  281. package/src/bundle-info.ts +0 -95
  282. package/src/capture.ts +0 -660
  283. package/src/compat/sentry.ts +0 -490
  284. package/src/control-channel.ts +0 -98
  285. package/src/expo-compat.ts +0 -698
  286. package/src/feedback-widget.tsx +0 -316
  287. package/src/feedback.ts +0 -21
  288. package/src/heartbeat.ts +0 -157
  289. package/src/install-id.ts +0 -146
  290. package/src/lifecycle.ts +0 -76
  291. package/src/measure.ts +0 -28
  292. package/src/metrics.ts +0 -94
  293. package/src/pre-crash-sentinel.ts +0 -140
  294. package/src/report-security.ts +0 -165
  295. package/src/runtime-metrics-fps.ts +0 -137
  296. package/src/runtime-metrics-heap.ts +0 -78
  297. package/src/runtime-metrics-network.ts +0 -103
  298. package/src/runtime-metrics.ts +0 -122
  299. package/src/sample-profiler.ts +0 -169
  300. package/src/sentinel-context.ts +0 -60
  301. package/src/session-tracker.ts +0 -53
  302. package/src/stack.ts +0 -10
  303. package/src/state-snapshots.ts +0 -133
  304. package/src/track.ts +0 -123
  305. package/src/trail.ts +0 -32
  306. package/src/trust-score.ts +0 -176
  307. package/src/types.ts +0 -21
  308. package/src/uuid.ts +0 -2
@@ -1,270 +0,0 @@
1
- export type DevicePushToken = {
2
- type: 'ios' | 'android';
3
- data: string;
4
- };
5
- export type ExpoPushToken = {
6
- type: 'expo';
7
- data: string;
8
- };
9
- export type NotificationPermissionsStatus = {
10
- status: PermissionStatus;
11
- granted: boolean;
12
- expires: PermissionExpiration;
13
- canAskAgain: boolean;
14
- ios?: IosNotificationPermissions;
15
- android?: AndroidNotificationPermissions;
16
- };
17
- export type PermissionStatus = 'granted' | 'denied' | 'undetermined';
18
- export type PermissionExpiration = 'never' | number;
19
- export type IosNotificationPermissions = {
20
- status: IosAuthorizationStatusValue;
21
- allowsAlert: boolean;
22
- allowsBadge: boolean;
23
- allowsSound: boolean;
24
- allowsAnnouncements?: boolean;
25
- allowsCriticalAlerts?: boolean;
26
- allowsDisplayInCarPlay?: boolean;
27
- allowsDisplayInNotificationCenter?: boolean;
28
- allowsDisplayOnLockScreen?: boolean;
29
- allowsPersistentTypes?: boolean;
30
- allowsPreviews?: boolean;
31
- providesAppNotificationSettings?: boolean;
32
- };
33
- export type AndroidNotificationPermissions = {
34
- status: PermissionStatus;
35
- };
36
- export type Notification = {
37
- date: number;
38
- request: NotificationRequest;
39
- };
40
- export type NotificationRequest = {
41
- identifier: string;
42
- content: NotificationContent;
43
- trigger: NotificationTrigger | null;
44
- };
45
- export type NotificationContent = {
46
- title: string | null;
47
- subtitle: string | null;
48
- body: string | null;
49
- data: Record<string, unknown>;
50
- badge?: number | null;
51
- sound?: NotificationSound;
52
- categoryIdentifier?: string | null;
53
- attachments?: NotificationAttachment[];
54
- /** iOS 15+ */
55
- interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical';
56
- };
57
- export type NotificationAttachment = {
58
- identifier?: string;
59
- url?: string;
60
- type?: string;
61
- hideThumbnail?: boolean;
62
- thumbnailClipArea?: {
63
- x: number;
64
- y: number;
65
- width: number;
66
- height: number;
67
- };
68
- thumbnailTime?: number;
69
- };
70
- export type NotificationSound = boolean | 'default' | 'defaultCritical' | string;
71
- export type NotificationTrigger = unknown;
72
- export type NotificationResponse = {
73
- actionIdentifier: string;
74
- notification: Notification;
75
- userText?: string;
76
- };
77
- export type NotificationBehavior = {
78
- shouldShowBanner: boolean;
79
- shouldShowList: boolean;
80
- shouldPlaySound: boolean;
81
- shouldSetBadge: boolean;
82
- priority?: AndroidNotificationPriorityValue;
83
- };
84
- export type NotificationHandler = {
85
- handleNotification: (notification: Notification) => Promise<NotificationBehavior>;
86
- handleSuccess?: (id: string) => void;
87
- handleError?: (id: string, err: {
88
- code: string;
89
- message: string;
90
- }) => void;
91
- };
92
- export type EventSubscription = {
93
- remove: () => void;
94
- };
95
- export type PushTokenListener = (token: DevicePushToken) => void;
96
- export declare const DEFAULT_ACTION_IDENTIFIER = "expo.modules.notifications.actions.DEFAULT";
97
- export declare const AndroidImportance: {
98
- readonly NONE: 0;
99
- readonly MIN: 1;
100
- readonly LOW: 2;
101
- readonly DEFAULT: 3;
102
- readonly HIGH: 4;
103
- readonly MAX: 5;
104
- };
105
- export type AndroidImportanceValue = (typeof AndroidImportance)[keyof typeof AndroidImportance];
106
- export declare const AndroidNotificationPriority: {
107
- readonly MIN: "min";
108
- readonly LOW: "low";
109
- readonly DEFAULT: "default";
110
- readonly HIGH: "high";
111
- readonly MAX: "max";
112
- };
113
- export type AndroidNotificationPriorityValue = (typeof AndroidNotificationPriority)[keyof typeof AndroidNotificationPriority];
114
- export declare const AndroidNotificationVisibility: {
115
- readonly PUBLIC: 1;
116
- readonly PRIVATE: 0;
117
- readonly SECRET: -1;
118
- };
119
- export declare const IosAuthorizationStatus: {
120
- readonly NOT_DETERMINED: 0;
121
- readonly DENIED: 1;
122
- readonly AUTHORIZED: 2;
123
- readonly PROVISIONAL: 3;
124
- readonly EPHEMERAL: 4;
125
- };
126
- export type IosAuthorizationStatusValue = (typeof IosAuthorizationStatus)[keyof typeof IosAuthorizationStatus];
127
- export declare const IosAlertStyle: {
128
- readonly NONE: 0;
129
- readonly BANNER: 1;
130
- readonly ALERT: 2;
131
- };
132
- export declare const SchedulableTriggerInputTypes: {
133
- readonly TIME_INTERVAL: "timeInterval";
134
- readonly DATE: "date";
135
- readonly CALENDAR: "calendar";
136
- readonly DAILY: "daily";
137
- readonly WEEKLY: "weekly";
138
- readonly MONTHLY: "monthly";
139
- readonly YEARLY: "yearly";
140
- };
141
- /**
142
- * Returns the OS-reported notification permission status without
143
- * prompting. Mirrors `Notifications.getPermissionsAsync()`.
144
- */
145
- export declare function getPermissionsAsync(): Promise<NotificationPermissionsStatus>;
146
- export type RequestPermissionsOptions = {
147
- ios?: {
148
- allowAlert?: boolean;
149
- allowBadge?: boolean;
150
- allowSound?: boolean;
151
- allowDisplayInCarPlay?: boolean;
152
- allowCriticalAlerts?: boolean;
153
- provideAppNotificationSettings?: boolean;
154
- allowProvisional?: boolean;
155
- allowAnnouncements?: boolean;
156
- };
157
- android?: Record<string, never>;
158
- };
159
- /**
160
- * Triggers the OS permission prompt the first time, otherwise
161
- * returns the cached decision. Mirrors
162
- * `Notifications.requestPermissionsAsync()`.
163
- *
164
- * `options.ios.allowProvisional` is accepted for API parity but
165
- * silently falls back to a regular authorization request — the
166
- * underlying native module doesn't surface the provisional flag
167
- * separately yet. Follow up: thread the `provisional` option
168
- * through `SentoriPushNotifications.requestPermission(...)` on iOS.
169
- */
170
- export declare function requestPermissionsAsync(options?: RequestPermissionsOptions): Promise<NotificationPermissionsStatus>;
171
- /**
172
- * Returns the raw APNs (iOS) or FCM (Android) token. Mirrors
173
- * `Notifications.getDevicePushTokenAsync()` — for customers who
174
- * already wire the device token to a custom backend, the migration
175
- * is literally a one-line import change.
176
- */
177
- export declare function getDevicePushTokenAsync(): Promise<DevicePushToken>;
178
- /**
179
- * `expo-notifications`'s `getExpoPushTokenAsync` returns a
180
- * `ExponentPushToken[...]` string that Expo's exp.host service uses
181
- * to route to APNs / FCM. We don't run that service — `data` here
182
- * is the raw native token wrapped in the same envelope shape so
183
- * destructuring code keeps compiling.
184
- *
185
- * **Server-side change required:** instead of POSTing to
186
- * `https://exp.host/--/api/v2/push/send`, your backend should POST
187
- * to Sentori's ingest. See the migration recipe.
188
- */
189
- export declare function getExpoPushTokenAsync(_options?: {
190
- projectId?: string;
191
- experienceId?: string;
192
- }): Promise<ExpoPushToken>;
193
- /**
194
- * Mirrors `Notifications.unregisterForNotificationsAsync()`. Calls
195
- * the native unregister + stops the drain loop.
196
- */
197
- export declare function unregisterForNotificationsAsync(): Promise<void>;
198
- /**
199
- * Foreground notification callback. Mirrors
200
- * `Notifications.addNotificationReceivedListener()`. The first
201
- * subscription starts a 1 Hz native-buffer drain loop; the last
202
- * unsubscribe stops it.
203
- */
204
- export declare function addNotificationReceivedListener(listener: (notification: Notification) => void): EventSubscription;
205
- /**
206
- * User-tapped-a-notification callback. Mirrors
207
- * `Notifications.addNotificationResponseReceivedListener()`.
208
- */
209
- export declare function addNotificationResponseReceivedListener(listener: (response: NotificationResponse) => void): EventSubscription;
210
- /**
211
- * Token-rotation callback. Mirrors
212
- * `Notifications.addPushTokenListener()`. Fires once per new token —
213
- * the native side detects rotation and pushes into the buffer; the
214
- * shared drain loop forwards it here.
215
- */
216
- export declare function addPushTokenListener(listener: PushTokenListener): EventSubscription;
217
- /**
218
- * Presentation behaviour hook. Mirrors
219
- * `Notifications.setNotificationHandler()`. The handler runs once
220
- * per foreground notification before the listener fan-out; it can
221
- * suppress the banner/sound/badge.
222
- *
223
- * Today the SDK always shows the system banner because that's the
224
- * native delegate's hard-coded behaviour. The handler's
225
- * `handleNotification` is still invoked so customer logic that
226
- * inspects the notification can run, but the returned
227
- * `NotificationBehavior` flags don't override presentation yet.
228
- * Follow up: pipe these flags through
229
- * `SentoriPushNotifications` so willPresent can return what the
230
- * handler asked for.
231
- */
232
- export declare function setNotificationHandler(handler: NotificationHandler | null): void;
233
- type ScheduleArgs = {
234
- content: unknown;
235
- trigger?: unknown;
236
- identifier?: string;
237
- };
238
- export declare function scheduleNotificationAsync(_args: ScheduleArgs): never;
239
- export declare function cancelScheduledNotificationAsync(_id: string): never;
240
- export declare function cancelAllScheduledNotificationsAsync(): never;
241
- export declare function getAllScheduledNotificationsAsync(): never;
242
- export declare function getNextTriggerDateAsync(_trigger: unknown): never;
243
- export declare function setBadgeCountAsync(_count: number, _options?: unknown): never;
244
- export declare function getBadgeCountAsync(): never;
245
- export declare function setNotificationChannelAsync(_id: string, _channel: unknown): never;
246
- export declare function getNotificationChannelAsync(_id: string): never;
247
- export declare function getNotificationChannelsAsync(): never;
248
- export declare function deleteNotificationChannelAsync(_id: string): never;
249
- export declare function setNotificationChannelGroupAsync(_id: string, _group: unknown): never;
250
- export declare function setNotificationCategoryAsync(_id: string, _actions: unknown, _options?: unknown): never;
251
- export declare function getNotificationCategoriesAsync(): never;
252
- export declare function deleteNotificationCategoryAsync(_id: string): never;
253
- export declare function useLastNotificationResponse(): NotificationResponse | null | undefined;
254
- export declare function getLastNotificationResponseAsync(): Promise<NotificationResponse | null>;
255
- export declare function clearLastNotificationResponseAsync(): Promise<void>;
256
- export declare function subscribeToTopicAsync(_topic: string): never;
257
- export declare function unsubscribeFromTopicAsync(_topic: string): never;
258
- export declare function registerTaskAsync(_taskName: string): never;
259
- export declare function unregisterTaskAsync(_taskName: string): never;
260
- export declare function dismissNotificationAsync(_id: string): never;
261
- export declare function dismissAllNotificationsAsync(): never;
262
- export declare function getPresentedNotificationsAsync(): never;
263
- /** Returns the last device token returned by getDevicePushTokenAsync.
264
- * Used in tests + the migration recipe. */
265
- export declare function __getLastDeviceTokenForTests(): null | DevicePushToken;
266
- /** Resets module-scoped state. Test-only — do not call from
267
- * production code. */
268
- export declare function __resetForTests(): void;
269
- export {};
270
- //# sourceMappingURL=expo-compat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"expo-compat.d.ts","sourceRoot":"","sources":["../src/expo-compat.ts"],"names":[],"mappings":"AAyDA,MAAM,MAAM,eAAe,GAAG;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