@stream-io/video-react-native-sdk 1.35.0 → 1.36.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 (179) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js +9 -2
  3. package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
  4. package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js +9 -2
  5. package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
  6. package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js +11 -12
  7. package/dist/commonjs/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
  8. package/dist/commonjs/components/Call/RingingCallContent/TextBasedIndicator.js +7 -2
  9. package/dist/commonjs/components/Call/RingingCallContent/TextBasedIndicator.js.map +1 -1
  10. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js +7 -3
  11. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -1
  12. package/dist/commonjs/hooks/push/index.js +0 -4
  13. package/dist/commonjs/hooks/push/index.js.map +1 -1
  14. package/dist/commonjs/modules/call-manager/CallManager.js +6 -0
  15. package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
  16. package/dist/commonjs/utils/StreamVideoRN/index.js +0 -17
  17. package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
  18. package/dist/commonjs/utils/internal/callingx/callingx.js +55 -32
  19. package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
  20. package/dist/commonjs/utils/internal/registerSDKGlobals.js +2 -0
  21. package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
  22. package/dist/commonjs/utils/push/android.js +0 -93
  23. package/dist/commonjs/utils/push/android.js.map +1 -1
  24. package/dist/commonjs/utils/push/index.js +0 -11
  25. package/dist/commonjs/utils/push/index.js.map +1 -1
  26. package/dist/commonjs/utils/push/internal/utils.js +2 -31
  27. package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
  28. package/dist/commonjs/utils/push/libs/callingx.js +9 -0
  29. package/dist/commonjs/utils/push/libs/callingx.js.map +1 -1
  30. package/dist/commonjs/utils/push/libs/index.js +0 -33
  31. package/dist/commonjs/utils/push/libs/index.js.map +1 -1
  32. package/dist/commonjs/utils/push/utils.js +0 -28
  33. package/dist/commonjs/utils/push/utils.js.map +1 -1
  34. package/dist/commonjs/version.js +1 -1
  35. package/dist/module/components/Call/RingingCallContent/IncomingCall.js +9 -2
  36. package/dist/module/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
  37. package/dist/module/components/Call/RingingCallContent/OutgoingCall.js +9 -2
  38. package/dist/module/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
  39. package/dist/module/components/Call/RingingCallContent/RingingCallContent.js +11 -12
  40. package/dist/module/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
  41. package/dist/module/components/Call/RingingCallContent/TextBasedIndicator.js +7 -2
  42. package/dist/module/components/Call/RingingCallContent/TextBasedIndicator.js.map +1 -1
  43. package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js +7 -3
  44. package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -1
  45. package/dist/module/hooks/push/index.js +0 -4
  46. package/dist/module/hooks/push/index.js.map +1 -1
  47. package/dist/module/modules/call-manager/CallManager.js +6 -0
  48. package/dist/module/modules/call-manager/CallManager.js.map +1 -1
  49. package/dist/module/utils/StreamVideoRN/index.js +0 -17
  50. package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
  51. package/dist/module/utils/internal/callingx/callingx.js +56 -33
  52. package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
  53. package/dist/module/utils/internal/registerSDKGlobals.js +2 -0
  54. package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
  55. package/dist/module/utils/push/android.js +1 -92
  56. package/dist/module/utils/push/android.js.map +1 -1
  57. package/dist/module/utils/push/index.js +0 -1
  58. package/dist/module/utils/push/index.js.map +1 -1
  59. package/dist/module/utils/push/internal/utils.js +0 -28
  60. package/dist/module/utils/push/internal/utils.js.map +1 -1
  61. package/dist/module/utils/push/libs/callingx.js +9 -0
  62. package/dist/module/utils/push/libs/callingx.js.map +1 -1
  63. package/dist/module/utils/push/libs/index.js +0 -3
  64. package/dist/module/utils/push/libs/index.js.map +1 -1
  65. package/dist/module/utils/push/utils.js +0 -25
  66. package/dist/module/utils/push/utils.js.map +1 -1
  67. package/dist/module/version.js +1 -1
  68. package/dist/typescript/components/Call/RingingCallContent/IncomingCall.d.ts.map +1 -1
  69. package/dist/typescript/components/Call/RingingCallContent/OutgoingCall.d.ts.map +1 -1
  70. package/dist/typescript/components/Call/RingingCallContent/RingingCallContent.d.ts.map +1 -1
  71. package/dist/typescript/components/Call/RingingCallContent/TextBasedIndicator.d.ts.map +1 -1
  72. package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts.map +1 -1
  73. package/dist/typescript/hooks/push/index.d.ts.map +1 -1
  74. package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
  75. package/dist/typescript/utils/StreamVideoRN/index.d.ts +0 -7
  76. package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
  77. package/dist/typescript/utils/StreamVideoRN/types.d.ts +19 -40
  78. package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
  79. package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
  80. package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
  81. package/dist/typescript/utils/push/android.d.ts +1 -6
  82. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  83. package/dist/typescript/utils/push/index.d.ts +0 -1
  84. package/dist/typescript/utils/push/index.d.ts.map +1 -1
  85. package/dist/typescript/utils/push/internal/utils.d.ts +2 -10
  86. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
  87. package/dist/typescript/utils/push/libs/callingx.d.ts.map +1 -1
  88. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +16 -2
  89. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
  90. package/dist/typescript/utils/push/libs/index.d.ts +0 -3
  91. package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
  92. package/dist/typescript/utils/push/utils.d.ts +0 -6
  93. package/dist/typescript/utils/push/utils.d.ts.map +1 -1
  94. package/dist/typescript/version.d.ts +1 -1
  95. package/expo-config-plugin/dist/withAppDelegate.js +56 -0
  96. package/ios/StreamVideoReactNative.h +14 -0
  97. package/ios/StreamVideoReactNative.m +129 -7
  98. package/package.json +2 -12
  99. package/src/components/Call/RingingCallContent/IncomingCall.tsx +14 -2
  100. package/src/components/Call/RingingCallContent/OutgoingCall.tsx +14 -2
  101. package/src/components/Call/RingingCallContent/RingingCallContent.tsx +7 -12
  102. package/src/components/Call/RingingCallContent/TextBasedIndicator.tsx +13 -2
  103. package/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx +10 -2
  104. package/src/hooks/push/index.ts +0 -4
  105. package/src/modules/call-manager/CallManager.ts +6 -0
  106. package/src/utils/StreamVideoRN/index.ts +0 -22
  107. package/src/utils/StreamVideoRN/types.ts +19 -46
  108. package/src/utils/internal/callingx/callingx.ts +60 -29
  109. package/src/utils/internal/registerSDKGlobals.ts +2 -0
  110. package/src/utils/push/android.ts +1 -117
  111. package/src/utils/push/index.ts +0 -1
  112. package/src/utils/push/internal/utils.ts +1 -41
  113. package/src/utils/push/libs/callingx.ts +12 -0
  114. package/src/utils/push/libs/index.ts +0 -3
  115. package/src/utils/push/utils.ts +0 -37
  116. package/src/version.ts +1 -1
  117. package/dist/commonjs/hooks/push/useIosInitRemoteNotifications.js +0 -33
  118. package/dist/commonjs/hooks/push/useIosInitRemoteNotifications.js.map +0 -1
  119. package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js +0 -49
  120. package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js.map +0 -1
  121. package/dist/commonjs/utils/internal/newNotificationCallbacks.js +0 -17
  122. package/dist/commonjs/utils/internal/newNotificationCallbacks.js.map +0 -1
  123. package/dist/commonjs/utils/push/internal/rxSubjects.js +0 -13
  124. package/dist/commonjs/utils/push/internal/rxSubjects.js.map +0 -1
  125. package/dist/commonjs/utils/push/ios.js +0 -158
  126. package/dist/commonjs/utils/push/ios.js.map +0 -1
  127. package/dist/commonjs/utils/push/libs/expoNotifications.js +0 -25
  128. package/dist/commonjs/utils/push/libs/expoNotifications.js.map +0 -1
  129. package/dist/commonjs/utils/push/libs/iosPushNotification.js +0 -17
  130. package/dist/commonjs/utils/push/libs/iosPushNotification.js.map +0 -1
  131. package/dist/commonjs/utils/push/libs/notifee/index.js +0 -38
  132. package/dist/commonjs/utils/push/libs/notifee/index.js.map +0 -1
  133. package/dist/commonjs/utils/push/libs/notifee/lib.js +0 -16
  134. package/dist/commonjs/utils/push/libs/notifee/lib.js.map +0 -1
  135. package/dist/module/hooks/push/useIosInitRemoteNotifications.js +0 -27
  136. package/dist/module/hooks/push/useIosInitRemoteNotifications.js.map +0 -1
  137. package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js +0 -43
  138. package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js.map +0 -1
  139. package/dist/module/utils/internal/newNotificationCallbacks.js +0 -10
  140. package/dist/module/utils/internal/newNotificationCallbacks.js.map +0 -1
  141. package/dist/module/utils/push/internal/rxSubjects.js +0 -7
  142. package/dist/module/utils/push/internal/rxSubjects.js.map +0 -1
  143. package/dist/module/utils/push/ios.js +0 -148
  144. package/dist/module/utils/push/ios.js.map +0 -1
  145. package/dist/module/utils/push/libs/expoNotifications.js +0 -18
  146. package/dist/module/utils/push/libs/expoNotifications.js.map +0 -1
  147. package/dist/module/utils/push/libs/iosPushNotification.js +0 -11
  148. package/dist/module/utils/push/libs/iosPushNotification.js.map +0 -1
  149. package/dist/module/utils/push/libs/notifee/index.js +0 -31
  150. package/dist/module/utils/push/libs/notifee/index.js.map +0 -1
  151. package/dist/module/utils/push/libs/notifee/lib.js +0 -11
  152. package/dist/module/utils/push/libs/notifee/lib.js.map +0 -1
  153. package/dist/typescript/hooks/push/useIosInitRemoteNotifications.d.ts +0 -5
  154. package/dist/typescript/hooks/push/useIosInitRemoteNotifications.d.ts.map +0 -1
  155. package/dist/typescript/hooks/push/useProcessPushNonRingingCallEffect.d.ts +0 -7
  156. package/dist/typescript/hooks/push/useProcessPushNonRingingCallEffect.d.ts.map +0 -1
  157. package/dist/typescript/utils/internal/newNotificationCallbacks.d.ts +0 -10
  158. package/dist/typescript/utils/internal/newNotificationCallbacks.d.ts.map +0 -1
  159. package/dist/typescript/utils/push/internal/rxSubjects.d.ts +0 -11
  160. package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +0 -1
  161. package/dist/typescript/utils/push/ios.d.ts +0 -14
  162. package/dist/typescript/utils/push/ios.d.ts.map +0 -1
  163. package/dist/typescript/utils/push/libs/expoNotifications.d.ts +0 -6
  164. package/dist/typescript/utils/push/libs/expoNotifications.d.ts.map +0 -1
  165. package/dist/typescript/utils/push/libs/iosPushNotification.d.ts +0 -5
  166. package/dist/typescript/utils/push/libs/iosPushNotification.d.ts.map +0 -1
  167. package/dist/typescript/utils/push/libs/notifee/index.d.ts +0 -23
  168. package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +0 -1
  169. package/dist/typescript/utils/push/libs/notifee/lib.d.ts +0 -4
  170. package/dist/typescript/utils/push/libs/notifee/lib.d.ts.map +0 -1
  171. package/src/hooks/push/useIosInitRemoteNotifications.ts +0 -29
  172. package/src/hooks/push/useProcessPushNonRingingCallEffect.ts +0 -50
  173. package/src/utils/internal/newNotificationCallbacks.ts +0 -29
  174. package/src/utils/push/internal/rxSubjects.ts +0 -10
  175. package/src/utils/push/ios.ts +0 -207
  176. package/src/utils/push/libs/expoNotifications.ts +0 -32
  177. package/src/utils/push/libs/iosPushNotification.ts +0 -22
  178. package/src/utils/push/libs/notifee/index.ts +0 -41
  179. package/src/utils/push/libs/notifee/lib.ts +0 -14
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.pushNonRingingCallData$ = void 0;
7
- var _rxjs = require("rxjs");
8
- /**
9
- * This rxjs subject is used to store the call cid of the accepted incoming call from push notification
10
- * Note: it is should be subscribed only when a user has connected to the websocket of Stream
11
- */
12
- const pushNonRingingCallData$ = exports.pushNonRingingCallData$ = new _rxjs.BehaviorSubject(undefined);
13
- //# sourceMappingURL=rxSubjects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_rxjs","require","pushNonRingingCallData$","exports","BehaviorSubject","undefined"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/rxSubjects.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAIE,qBAAe,CAExDC,SAAS,CAAC","ignoreList":[]}
@@ -1,158 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.initIosNonVoipToken = initIosNonVoipToken;
7
- exports.onPushNotificationiOSStreamVideoEvent = onPushNotificationiOSStreamVideoEvent;
8
- exports.oniOSNotifeeEvent = exports.oniOSExpoNotificationEvent = void 0;
9
- var _reactNative = require("react-native");
10
- var _rxSubjects = require("./internal/rxSubjects");
11
- var _libs = require("./libs");
12
- var _videoClient = require("@stream-io/video-client");
13
- var _pushLogoutCallback = require("../internal/pushLogoutCallback");
14
- var _StreamVideoRN = require("../StreamVideoRN");
15
- let lastApnToken = {
16
- token: '',
17
- userId: ''
18
- };
19
- function processNonRingingNotificationStreamPayload(streamPayload) {
20
- if (streamPayload?.sender === 'stream.video' && streamPayload?.type !== 'call.ring') {
21
- const cid = streamPayload.call_cid;
22
- const type = streamPayload.type;
23
- const logger = _videoClient.videoLoggerSystem.getLogger('processNonRingingNotificationStreamPayload');
24
- logger.trace(`cid, type - ${cid}, ${type}`);
25
- _rxSubjects.pushNonRingingCallData$.next({
26
- cid,
27
- type
28
- });
29
- return {
30
- cid,
31
- type
32
- };
33
- }
34
- return undefined;
35
- }
36
- const oniOSExpoNotificationEvent = event => {
37
- const pushConfig = _StreamVideoRN.StreamVideoRN.getConfig().push;
38
- if (pushConfig) {
39
- const trigger = event.request.trigger;
40
- if (trigger && typeof trigger === 'object' && 'type' in trigger && trigger.type === 'push' && trigger.payload?.stream) {
41
- const streamPayload = trigger.payload.stream;
42
- const logger = _videoClient.videoLoggerSystem.getLogger('processNonRingingNotificationStreamPayload');
43
- logger.trace(`processNonRingingNotificationStreamPayload - ${JSON.stringify(streamPayload)}`);
44
- processNonRingingNotificationStreamPayload(streamPayload);
45
- }
46
- }
47
- };
48
- exports.oniOSExpoNotificationEvent = oniOSExpoNotificationEvent;
49
- const oniOSNotifeeEvent = ({
50
- event
51
- }) => {
52
- if (_reactNative.Platform.OS !== 'ios') return;
53
- const pushConfig = _StreamVideoRN.StreamVideoRN.getConfig().push;
54
- const {
55
- type,
56
- detail
57
- } = event;
58
- const notifeeLib = (0, _libs.getNotifeeLibThrowIfNotInstalledForPush)();
59
- if (pushConfig && type === notifeeLib.EventType.PRESS) {
60
- const streamPayload = detail.notification?.data?.stream;
61
- const result = processNonRingingNotificationStreamPayload(streamPayload);
62
- if (result) {
63
- const logger = _videoClient.videoLoggerSystem.getLogger('oniOSNotifeeEvent');
64
- logger.debug(`onTapNonRingingCallNotification?.(${result.cid}, ${result.type})`);
65
- pushConfig.onTapNonRingingCallNotification?.(result.cid, result.type);
66
- }
67
- }
68
- };
69
- exports.oniOSNotifeeEvent = oniOSNotifeeEvent;
70
- function onPushNotificationiOSStreamVideoEvent(notification) {
71
- const pushNotificationIosLib = (0, _libs.getPushNotificationIosLib)();
72
- const data = notification.getData();
73
- const streamPayload = data?.stream;
74
- const logger = _videoClient.videoLoggerSystem.getLogger('onPushNotificationiOSStreamVideoEvent');
75
- if (!streamPayload) {
76
- logger.trace(`skipping process: no stream payload found in notification data - ${JSON.stringify(data)}`);
77
- return;
78
- }
79
- const isClicked = data.userInteraction === 1;
80
- const pushConfig = _StreamVideoRN.StreamVideoRN.getConfig().push;
81
- if (!isClicked || !pushConfig) {
82
- logger.debug(`notification.finish called and returning - isClicked: ${isClicked}, pushConfig: ${!!pushConfig}`);
83
- notification.finish(pushNotificationIosLib.FetchResult.NoData);
84
- return;
85
- }
86
- // listen to foreground notifications
87
- const result = processNonRingingNotificationStreamPayload(streamPayload);
88
- if (result) {
89
- logger.debug(`onTapNonRingingCallNotification?.(${result.cid}, ${result.type})`);
90
- pushConfig.onTapNonRingingCallNotification?.(result.cid, result.type);
91
- }
92
- notification.finish(pushNotificationIosLib.FetchResult.NoData);
93
- }
94
-
95
- /** Send token to stream */
96
- async function initIosNonVoipToken(client, pushConfig, setUnsubscribeListener) {
97
- if (_reactNative.Platform.OS !== 'ios' || !pushConfig.ios?.pushProviderName || !pushConfig.onTapNonRingingCallNotification) {
98
- return;
99
- }
100
- const logger = _videoClient.videoLoggerSystem.getLogger('initIosNonVoipToken');
101
- const setDeviceToken = async token => {
102
- const userId = client.streamClient._user?.id ?? '';
103
- if (lastApnToken.token === token && lastApnToken.userId === userId) {
104
- logger.debug('Skipped sending device token to stream as it was already sent', token);
105
- return;
106
- }
107
- (0, _pushLogoutCallback.setPushLogoutCallback)(async () => {
108
- lastApnToken = {
109
- token: '',
110
- userId: ''
111
- };
112
- try {
113
- logger.debug('Remove device token - setPushLogoutCallback', token);
114
- await client.removeDevice(token);
115
- } catch (err) {
116
- logger.warn('setPushLogoutCallback - Failed to remove apn token from stream', err);
117
- }
118
- });
119
- const push_provider_name = pushConfig.ios?.pushProviderName;
120
- logger.debug('Add device token to stream', token);
121
- await client.addDevice(token, 'apn', push_provider_name).then(() => {
122
- lastApnToken = {
123
- token,
124
- userId
125
- };
126
- }).catch(err => {
127
- logger.warn('Failed to add apn token to stream', err);
128
- });
129
- };
130
- if (pushConfig.isExpo) {
131
- const expoNotificationsLib = (0, _libs.getExpoNotificationsLib)();
132
- if (expoNotificationsLib) {
133
- expoNotificationsLib.getDevicePushTokenAsync().then(devicePushToken => {
134
- logger.debug('Got device token - expoNotificationsLib.getDevicePushTokenAsync', devicePushToken.data);
135
- setDeviceToken(devicePushToken.data);
136
- });
137
- const subscription = expoNotificationsLib.addPushTokenListener(devicePushToken => {
138
- logger.debug('Got device token - expoNotificationsLib.addPushTokenListener', devicePushToken.data);
139
- setDeviceToken(devicePushToken.data);
140
- });
141
- setUnsubscribeListener(() => {
142
- logger.debug(`removed expo addPushTokenListener`);
143
- subscription.remove();
144
- });
145
- }
146
- } else {
147
- const pushNotificationIosLib = (0, _libs.getPushNotificationIosLib)();
148
- pushNotificationIosLib.addEventListener('register', token => {
149
- logger.debug(`Got device token - pushNotificationIosLib.addEventListener('register')`, token);
150
- setDeviceToken(token);
151
- });
152
- setUnsubscribeListener(() => {
153
- logger.debug(`pushNotificationIosLib.removeEventListener('register')`);
154
- pushNotificationIosLib.removeEventListener('register');
155
- });
156
- }
157
- }
158
- //# sourceMappingURL=ios.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_rxSubjects","_libs","_videoClient","_pushLogoutCallback","_StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","videoLoggerSystem","getLogger","trace","pushNonRingingCallData$","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","StreamVideoRN","getConfig","push","trigger","request","payload","stream","JSON","stringify","exports","oniOSNotifeeEvent","Platform","OS","detail","notifeeLib","getNotifeeLibThrowIfNotInstalledForPush","EventType","PRESS","notification","data","result","debug","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getPushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","setPushLogoutCallback","removeDevice","err","warn","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getExpoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAOA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AAKA,IAAIM,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,EAChC;EACA,IACEA,aAAa,EAAEC,MAAM,KAAK,cAAc,IACxCD,aAAa,EAAEE,IAAI,KAAK,WAAW,EACnC;IACA,MAAMC,GAAG,GAAGH,aAAa,CAACI,QAAQ;IAClC,MAAMF,IAAI,GAAGF,aAAa,CAACE,IAAI;IAC/B,MAAMG,MAAM,GAAGC,8BAAiB,CAACC,SAAS,CACxC,4CACF,CAAC;IACDF,MAAM,CAACG,KAAK,CAAC,eAAeL,GAAG,KAAKD,IAAI,EAAE,CAAC;IAC3CO,mCAAuB,CAACC,IAAI,CAAC;MAAEP,GAAG;MAAED;IAAK,CAAC,CAAC;IAC3C,OAAO;MAAEC,GAAG;MAAED;IAAK,CAAC;EACtB;EACA,OAAOS,SAAS;AAClB;AAEO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAK;EACrE,MAAMC,UAAU,GAAGC,4BAAa,CAACC,SAAS,CAAC,CAAC,CAACC,IAAI;EACjD,IAAIH,UAAU,EAAE;IACd,MAAMI,OAAO,GAAGL,KAAK,CAACM,OAAO,CAACD,OAAO;IACrC,IACEA,OAAO,IACP,OAAOA,OAAO,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5
- });
6
- exports.getExpoNotificationsLib = getExpoNotificationsLib;
7
- exports.getExpoNotificationsLibNoThrow = getExpoNotificationsLibNoThrow;
8
- var _videoClient = require("@stream-io/video-client");
9
- let expoNotificationsLib;
10
- try {
11
- expoNotificationsLib = require('expo-notifications');
12
- } catch {}
13
- function getExpoNotificationsLib() {
14
- if (!expoNotificationsLib) {
15
- throw Error('expo-notifications library is not installed. Please see https://docs.expo.dev/versions/latest/sdk/notifications/ for installation instructions. It is required for non ringing push notifications.');
16
- }
17
- return expoNotificationsLib;
18
- }
19
- function getExpoNotificationsLibNoThrow() {
20
- if (!expoNotificationsLib) {
21
- _videoClient.videoLoggerSystem.getLogger('getExpoNotificationsLibNoThrow').debug('expo-notifications library is not installed. It is required for non ringing push notifications and not for ringing');
22
- }
23
- return expoNotificationsLib;
24
- }
25
- //# sourceMappingURL=expoNotifications.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_videoClient","require","expoNotificationsLib","getExpoNotificationsLib","Error","getExpoNotificationsLibNoThrow","videoLoggerSystem","getLogger","debug"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/expoNotifications.ts"],"mappings":";;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAIC,oBAAsD;AAE1D,IAAI;EACFA,oBAAoB,GAAGD,OAAO,CAAC,oBAAoB,CAAC;AACtD,CAAC,CAAC,MAAM,CAAC;AAEF,SAASE,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACD,oBAAoB,EAAE;IACzB,MAAME,KAAK,CACT,oMACF,CAAC;EACH;EACA,OAAOF,oBAAoB;AAC7B;AAEO,SAASG,8BAA8BA,CAAA,EAAG;EAC/C,IAAI,CAACH,oBAAoB,EAAE;IACzBI,8BAAiB,CACdC,SAAS,CAAC,gCAAgC,CAAC,CAC3CC,KAAK,CACJ,oHACF,CAAC;EACL;EACA,OAAON,oBAAoB;AAC7B","ignoreList":[]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getPushNotificationIosLib = getPushNotificationIosLib;
7
- let pushNotificationIosLib;
8
- try {
9
- pushNotificationIosLib = require('@react-native-community/push-notification-ios').default;
10
- } catch {}
11
- function getPushNotificationIosLib() {
12
- if (!pushNotificationIosLib) {
13
- throw Error('@react-native-community/push-notification-ios library is not installed. Please install it using "yarn add @react-native-community/push-notification-ios" or "npm i @react-native-community/push-notification-ios --save"');
14
- }
15
- return pushNotificationIosLib;
16
- }
17
- //# sourceMappingURL=iosPushNotification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["pushNotificationIosLib","require","default","getPushNotificationIosLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/iosPushNotification.ts"],"mappings":";;;;;;AAKA,IAAIA,sBAA0D;AAI9D,IAAI;EACFA,sBAAsB,GACpBC,OAAO,CAAC,+CAA+C,CAAC,CAACC,OAAO;AACpE,CAAC,CAAC,MAAM,CAAC;AAEF,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,IAAI,CAACH,sBAAsB,EAAE;IAC3B,MAAMI,KAAK,CACT,0NACF,CAAC;EACH;EACA,OAAOJ,sBAAsB;AAC/B","ignoreList":[]}
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getIncomingCallForegroundServiceTypes = getIncomingCallForegroundServiceTypes;
7
- exports.getNotifeeLibThrowIfNotInstalledForPush = getNotifeeLibThrowIfNotInstalledForPush;
8
- var _lib = require("./lib");
9
- var AndroidForegroundServiceType = /*#__PURE__*/function (AndroidForegroundServiceType) {
10
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_CAMERA"] = 64] = "FOREGROUND_SERVICE_TYPE_CAMERA";
11
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE"] = 16] = "FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE";
12
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_DATA_SYNC"] = 1] = "FOREGROUND_SERVICE_TYPE_DATA_SYNC";
13
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_HEALTH"] = 256] = "FOREGROUND_SERVICE_TYPE_HEALTH";
14
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_LOCATION"] = 8] = "FOREGROUND_SERVICE_TYPE_LOCATION";
15
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK"] = 2] = "FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK";
16
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION"] = 32] = "FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION";
17
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_MEDIA_PROCESSING"] = 8192] = "FOREGROUND_SERVICE_TYPE_MEDIA_PROCESSING";
18
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_MICROPHONE"] = 128] = "FOREGROUND_SERVICE_TYPE_MICROPHONE";
19
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_PHONE_CALL"] = 4] = "FOREGROUND_SERVICE_TYPE_PHONE_CALL";
20
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING"] = 512] = "FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING";
21
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_SHORT_SERVICE"] = 2048] = "FOREGROUND_SERVICE_TYPE_SHORT_SERVICE";
22
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_SPECIAL_USE"] = 1073741824] = "FOREGROUND_SERVICE_TYPE_SPECIAL_USE";
23
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED"] = 1024] = "FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED";
24
- AndroidForegroundServiceType[AndroidForegroundServiceType["FOREGROUND_SERVICE_TYPE_MANIFEST"] = -1] = "FOREGROUND_SERVICE_TYPE_MANIFEST";
25
- return AndroidForegroundServiceType;
26
- }(AndroidForegroundServiceType || {});
27
- const INSTALLATION_INSTRUCTION = 'Please see https://notifee.app/react-native/docs/installation for installation instructions';
28
- function getNotifeeLibThrowIfNotInstalledForPush() {
29
- if (!_lib.lib) {
30
- throw Error('@notifee/react-native is not installed. It is required for implementing push notifications. ' + INSTALLATION_INSTRUCTION);
31
- }
32
- return _lib.lib;
33
- }
34
- function getIncomingCallForegroundServiceTypes() {
35
- const types = [AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE];
36
- return types;
37
- }
38
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_lib","require","AndroidForegroundServiceType","INSTALLATION_INSTRUCTION","getNotifeeLibThrowIfNotInstalledForPush","lib","Error","getIncomingCallForegroundServiceTypes","types","FOREGROUND_SERVICE_TYPE_SHORT_SERVICE"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/notifee/index.ts"],"mappings":";;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAAuC,IAIlCC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAA5BA,4BAA4B,CAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA,EAA5BA,4BAA4B;AAkBjC,MAAMC,wBAAwB,GAC5B,6FAA6F;AAExF,SAASC,uCAAuCA,CAAA,EAAG;EACxD,IAAI,CAACC,QAAG,EAAE;IACR,MAAMC,KAAK,CACT,8FAA8F,GAC5FH,wBACJ,CAAC;EACH;EACA,OAAOE,QAAG;AACZ;AAEO,SAASE,qCAAqCA,CAAA,EAAG;EACtD,MAAMC,KAAqC,GAAG,CAC5CN,4BAA4B,CAACO,qCAAqC,CACnE;EACD,OAAOD,KAAK;AACd","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.lib = void 0;
7
- let lib = exports.lib = void 0;
8
- try {
9
- exports.lib = lib = require('@notifee/react-native');
10
- } catch {}
11
-
12
- /*
13
- IMPORTANT: must keep a failing import in a different file
14
- Else on commonjs, metro doesnt resolve any other modules properly in a file, if one of the module is not installed
15
- */
16
- //# sourceMappingURL=lib.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["lib","exports","require"],"sourceRoot":"../../../../../../src","sources":["utils/push/libs/notifee/lib.ts"],"mappings":";;;;;;AAEA,IAAIA,GAAqB,GAAAC,OAAA,CAAAD,GAAA;AAEzB,IAAI;EACFC,OAAA,CAAAD,GAAA,GAAAA,GAAG,GAAGE,OAAO,CAAC,uBAAuB,CAAC;AACxC,CAAC,CAAC,MAAM,CAAC;;AAIT;AACA;AACA;AACA","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- import { useConnectedUser, useStreamVideoClient } from '@stream-io/video-react-bindings';
2
- import { useEffect } from 'react';
3
- import { StreamVideoRN } from '../../utils';
4
- import { initIosNonVoipToken } from '../../utils/push/ios';
5
-
6
- /**
7
- * This hook is used to initialize the push token for iOS.
8
- */
9
- export const useIosInitRemoteNotifications = () => {
10
- const client = useStreamVideoClient();
11
- const connectedUserId = useConnectedUser()?.id;
12
- useEffect(() => {
13
- const pushConfig = StreamVideoRN.getConfig().push;
14
- // NOTE: we need to wait for user to be connected before we can send the push token
15
- if (!client || !connectedUserId || !pushConfig) {
16
- return;
17
- }
18
- let unsubscribe = () => {};
19
- initIosNonVoipToken(client, pushConfig, unsubscribeListener => {
20
- unsubscribe = unsubscribeListener;
21
- });
22
- return () => {
23
- unsubscribe();
24
- };
25
- }, [client, connectedUserId]);
26
- };
27
- //# sourceMappingURL=useIosInitRemoteNotifications.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useConnectedUser","useStreamVideoClient","useEffect","StreamVideoRN","initIosNonVoipToken","useIosInitRemoteNotifications","client","connectedUserId","id","pushConfig","getConfig","push","unsubscribe","unsubscribeListener"],"sourceRoot":"../../../../src","sources":["hooks/push/useIosInitRemoteNotifications.ts"],"mappings":"AAAA,SACEA,gBAAgB,EAChBC,oBAAoB,QACf,iCAAiC;AACxC,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,mBAAmB,QAAQ,sBAAsB;;AAE1D;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,GAAGA,CAAA,KAAM;EACjD,MAAMC,MAAM,GAAGL,oBAAoB,CAAC,CAAC;EACrC,MAAMM,eAAe,GAAGP,gBAAgB,CAAC,CAAC,EAAEQ,EAAE;EAC9CN,SAAS,CAAC,MAAM;IACd,MAAMO,UAAU,GAAGN,aAAa,CAACO,SAAS,CAAC,CAAC,CAACC,IAAI;IACjD;IACA,IAAI,CAACL,MAAM,IAAI,CAACC,eAAe,IAAI,CAACE,UAAU,EAAE;MAC9C;IACF;IACA,IAAIG,WAAW,GAAGA,CAAA,KAAM,CAAC,CAAC;IAC1BR,mBAAmB,CAACE,MAAM,EAAEG,UAAU,EAAGI,mBAAmB,IAAK;MAC/DD,WAAW,GAAGC,mBAAmB;IACnC,CAAC,CAAC;IACF,OAAO,MAAM;MACXD,WAAW,CAAC,CAAC;IACf,CAAC;EACH,CAAC,EAAE,CAACN,MAAM,EAAEC,eAAe,CAAC,CAAC;AAC/B,CAAC","ignoreList":[]}
@@ -1,43 +0,0 @@
1
- import { pushNonRingingCallData$ } from '../../utils/push/internal/rxSubjects';
2
- import { useEffect } from 'react';
3
- import { StreamVideoRN } from '../../utils';
4
- import { useConnectedUser, useStreamVideoClient } from '@stream-io/video-react-bindings';
5
- import { filter } from 'rxjs/operators';
6
- import { processNonIncomingCallFromPush } from '../../utils/push/internal/utils';
7
- import { videoLoggerSystem } from '@stream-io/video-client';
8
-
9
- /**
10
- * This hook is used to process the non ringing call data via push notifications using the relevant rxjs subject
11
- * Note: this effect cannot work when push notifications are received when the app is in quit state or in other words when the client is not connected with a websocket.
12
- * So we essentially run this effect only when the client is connected with a websocket.
13
- */
14
- export const useProcessPushNonRingingCallEffect = () => {
15
- const client = useStreamVideoClient();
16
- const connectedUserId = useConnectedUser()?.id;
17
- // The Effect to automatically add the non ringing call to our low level client state
18
- useEffect(() => {
19
- const pushConfig = StreamVideoRN.getConfig().push;
20
- if (!pushConfig || !client || !connectedUserId) {
21
- return;
22
- }
23
- const subscription = pushNonRingingCallData$.pipe(filter(NotUndefined)).subscribe(async ({
24
- cid,
25
- type
26
- }) => {
27
- videoLoggerSystem.getLogger('useProcessPushNonRingingCallEffect').debug(`processNonIncomingCallFromPush with callCId: ${cid} and type: ${type}`);
28
- await processNonIncomingCallFromPush(client, cid, type);
29
- pushNonRingingCallData$.next(undefined); // remove the current data to avoid processing again
30
- });
31
- return () => {
32
- subscription.unsubscribe();
33
- };
34
- }, [client, connectedUserId]);
35
- };
36
-
37
- /**
38
- * A type guard to check if the data is not undefined
39
- */
40
- function NotUndefined(data) {
41
- return data !== undefined;
42
- }
43
- //# sourceMappingURL=useProcessPushNonRingingCallEffect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["pushNonRingingCallData$","useEffect","StreamVideoRN","useConnectedUser","useStreamVideoClient","filter","processNonIncomingCallFromPush","videoLoggerSystem","useProcessPushNonRingingCallEffect","client","connectedUserId","id","pushConfig","getConfig","push","subscription","pipe","NotUndefined","subscribe","cid","type","getLogger","debug","next","undefined","unsubscribe","data"],"sourceRoot":"../../../../src","sources":["hooks/push/useProcessPushNonRingingCallEffect.ts"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,sCAAsC;AAC9E,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,aAAa,QAAQ,aAAa;AAC3C,SACEC,gBAAgB,EAChBC,oBAAoB,QACf,iCAAiC;AACxC,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,8BAA8B,QAAQ,iCAAiC;AAChF,SAASC,iBAAiB,QAAQ,yBAAyB;;AAE3D;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kCAAkC,GAAGA,CAAA,KAAM;EACtD,MAAMC,MAAM,GAAGL,oBAAoB,CAAC,CAAC;EACrC,MAAMM,eAAe,GAAGP,gBAAgB,CAAC,CAAC,EAAEQ,EAAE;EAC9C;EACAV,SAAS,CAAC,MAAM;IACd,MAAMW,UAAU,GAAGV,aAAa,CAACW,SAAS,CAAC,CAAC,CAACC,IAAI;IACjD,IAAI,CAACF,UAAU,IAAI,CAACH,MAAM,IAAI,CAACC,eAAe,EAAE;MAC9C;IACF;IAEA,MAAMK,YAAY,GAAGf,uBAAuB,CACzCgB,IAAI,CAACX,MAAM,CAACY,YAAY,CAAC,CAAC,CAC1BC,SAAS,CAAC,OAAO;MAAEC,GAAG;MAAEC;IAAK,CAAC,KAAK;MAClCb,iBAAiB,CACdc,SAAS,CAAC,oCAAoC,CAAC,CAC/CC,KAAK,CACJ,gDAAgDH,GAAG,cAAcC,IAAI,EACvE,CAAC;MACH,MAAMd,8BAA8B,CAACG,MAAM,EAAEU,GAAG,EAAEC,IAAI,CAAC;MACvDpB,uBAAuB,CAACuB,IAAI,CAACC,SAAS,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC;IAEJ,OAAO,MAAM;MACXT,YAAY,CAACU,WAAW,CAAC,CAAC;IAC5B,CAAC;EACH,CAAC,EAAE,CAAChB,MAAM,EAAEC,eAAe,CAAC,CAAC;AAC/B,CAAC;;AAED;AACA;AACA;AACA,SAASO,YAAYA,CAAIS,IAAmB,EAAa;EACvD,OAAOA,IAAI,KAAKF,SAAS;AAC3B","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- let lastCid = '';
2
- const newNotificationCallbacks = {};
3
- export const onNewCallNotification = (call, notificationType) => {
4
- if (newNotificationCallbacks.current && lastCid !== call.cid) {
5
- newNotificationCallbacks.current.forEach(callback => callback(call, notificationType));
6
- lastCid = call.cid;
7
- }
8
- };
9
- export default newNotificationCallbacks;
10
- //# sourceMappingURL=newNotificationCallbacks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["lastCid","newNotificationCallbacks","onNewCallNotification","call","notificationType","current","cid","forEach","callback"],"sourceRoot":"../../../../src","sources":["utils/internal/newNotificationCallbacks.ts"],"mappings":"AAYA,IAAIA,OAAO,GAAG,EAAE;AAEhB,MAAMC,wBAAkD,GAAG,CAAC,CAAC;AAE7D,OAAO,MAAMC,qBAAkD,GAAGA,CAChEC,IAAI,EACJC,gBAAgB,KACb;EACH,IAAIH,wBAAwB,CAACI,OAAO,IAAIL,OAAO,KAAKG,IAAI,CAACG,GAAG,EAAE;IAC5DL,wBAAwB,CAACI,OAAO,CAACE,OAAO,CAAEC,QAAQ,IAChDA,QAAQ,CAACL,IAAI,EAAEC,gBAAgB,CACjC,CAAC;IACDJ,OAAO,GAAGG,IAAI,CAACG,GAAG;EACpB;AACF,CAAC;AAED,eAAeL,wBAAwB","ignoreList":[]}
@@ -1,7 +0,0 @@
1
- import { BehaviorSubject } from 'rxjs';
2
- /**
3
- * This rxjs subject is used to store the call cid of the accepted incoming call from push notification
4
- * Note: it is should be subscribed only when a user has connected to the websocket of Stream
5
- */
6
- export const pushNonRingingCallData$ = new BehaviorSubject(undefined);
7
- //# sourceMappingURL=rxSubjects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["BehaviorSubject","pushNonRingingCallData$","undefined"],"sourceRoot":"../../../../../src","sources":["utils/push/internal/rxSubjects.ts"],"mappings":"AAAA,SAASA,eAAe,QAAQ,MAAM;AAGtC;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,IAAID,eAAe,CAExDE,SAAS,CAAC","ignoreList":[]}
@@ -1,148 +0,0 @@
1
- import { Platform } from 'react-native';
2
- import { pushNonRingingCallData$ } from './internal/rxSubjects';
3
- import { getExpoNotificationsLib, getNotifeeLibThrowIfNotInstalledForPush, getPushNotificationIosLib } from './libs';
4
- import { videoLoggerSystem } from '@stream-io/video-client';
5
- import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
6
- import { StreamVideoRN } from '../StreamVideoRN';
7
- let lastApnToken = {
8
- token: '',
9
- userId: ''
10
- };
11
- function processNonRingingNotificationStreamPayload(streamPayload) {
12
- if (streamPayload?.sender === 'stream.video' && streamPayload?.type !== 'call.ring') {
13
- const cid = streamPayload.call_cid;
14
- const type = streamPayload.type;
15
- const logger = videoLoggerSystem.getLogger('processNonRingingNotificationStreamPayload');
16
- logger.trace(`cid, type - ${cid}, ${type}`);
17
- pushNonRingingCallData$.next({
18
- cid,
19
- type
20
- });
21
- return {
22
- cid,
23
- type
24
- };
25
- }
26
- return undefined;
27
- }
28
- export const oniOSExpoNotificationEvent = event => {
29
- const pushConfig = StreamVideoRN.getConfig().push;
30
- if (pushConfig) {
31
- const trigger = event.request.trigger;
32
- if (trigger && typeof trigger === 'object' && 'type' in trigger && trigger.type === 'push' && trigger.payload?.stream) {
33
- const streamPayload = trigger.payload.stream;
34
- const logger = videoLoggerSystem.getLogger('processNonRingingNotificationStreamPayload');
35
- logger.trace(`processNonRingingNotificationStreamPayload - ${JSON.stringify(streamPayload)}`);
36
- processNonRingingNotificationStreamPayload(streamPayload);
37
- }
38
- }
39
- };
40
- export const oniOSNotifeeEvent = ({
41
- event
42
- }) => {
43
- if (Platform.OS !== 'ios') return;
44
- const pushConfig = StreamVideoRN.getConfig().push;
45
- const {
46
- type,
47
- detail
48
- } = event;
49
- const notifeeLib = getNotifeeLibThrowIfNotInstalledForPush();
50
- if (pushConfig && type === notifeeLib.EventType.PRESS) {
51
- const streamPayload = detail.notification?.data?.stream;
52
- const result = processNonRingingNotificationStreamPayload(streamPayload);
53
- if (result) {
54
- const logger = videoLoggerSystem.getLogger('oniOSNotifeeEvent');
55
- logger.debug(`onTapNonRingingCallNotification?.(${result.cid}, ${result.type})`);
56
- pushConfig.onTapNonRingingCallNotification?.(result.cid, result.type);
57
- }
58
- }
59
- };
60
- export function onPushNotificationiOSStreamVideoEvent(notification) {
61
- const pushNotificationIosLib = getPushNotificationIosLib();
62
- const data = notification.getData();
63
- const streamPayload = data?.stream;
64
- const logger = videoLoggerSystem.getLogger('onPushNotificationiOSStreamVideoEvent');
65
- if (!streamPayload) {
66
- logger.trace(`skipping process: no stream payload found in notification data - ${JSON.stringify(data)}`);
67
- return;
68
- }
69
- const isClicked = data.userInteraction === 1;
70
- const pushConfig = StreamVideoRN.getConfig().push;
71
- if (!isClicked || !pushConfig) {
72
- logger.debug(`notification.finish called and returning - isClicked: ${isClicked}, pushConfig: ${!!pushConfig}`);
73
- notification.finish(pushNotificationIosLib.FetchResult.NoData);
74
- return;
75
- }
76
- // listen to foreground notifications
77
- const result = processNonRingingNotificationStreamPayload(streamPayload);
78
- if (result) {
79
- logger.debug(`onTapNonRingingCallNotification?.(${result.cid}, ${result.type})`);
80
- pushConfig.onTapNonRingingCallNotification?.(result.cid, result.type);
81
- }
82
- notification.finish(pushNotificationIosLib.FetchResult.NoData);
83
- }
84
-
85
- /** Send token to stream */
86
- export async function initIosNonVoipToken(client, pushConfig, setUnsubscribeListener) {
87
- if (Platform.OS !== 'ios' || !pushConfig.ios?.pushProviderName || !pushConfig.onTapNonRingingCallNotification) {
88
- return;
89
- }
90
- const logger = videoLoggerSystem.getLogger('initIosNonVoipToken');
91
- const setDeviceToken = async token => {
92
- const userId = client.streamClient._user?.id ?? '';
93
- if (lastApnToken.token === token && lastApnToken.userId === userId) {
94
- logger.debug('Skipped sending device token to stream as it was already sent', token);
95
- return;
96
- }
97
- setPushLogoutCallback(async () => {
98
- lastApnToken = {
99
- token: '',
100
- userId: ''
101
- };
102
- try {
103
- logger.debug('Remove device token - setPushLogoutCallback', token);
104
- await client.removeDevice(token);
105
- } catch (err) {
106
- logger.warn('setPushLogoutCallback - Failed to remove apn token from stream', err);
107
- }
108
- });
109
- const push_provider_name = pushConfig.ios?.pushProviderName;
110
- logger.debug('Add device token to stream', token);
111
- await client.addDevice(token, 'apn', push_provider_name).then(() => {
112
- lastApnToken = {
113
- token,
114
- userId
115
- };
116
- }).catch(err => {
117
- logger.warn('Failed to add apn token to stream', err);
118
- });
119
- };
120
- if (pushConfig.isExpo) {
121
- const expoNotificationsLib = getExpoNotificationsLib();
122
- if (expoNotificationsLib) {
123
- expoNotificationsLib.getDevicePushTokenAsync().then(devicePushToken => {
124
- logger.debug('Got device token - expoNotificationsLib.getDevicePushTokenAsync', devicePushToken.data);
125
- setDeviceToken(devicePushToken.data);
126
- });
127
- const subscription = expoNotificationsLib.addPushTokenListener(devicePushToken => {
128
- logger.debug('Got device token - expoNotificationsLib.addPushTokenListener', devicePushToken.data);
129
- setDeviceToken(devicePushToken.data);
130
- });
131
- setUnsubscribeListener(() => {
132
- logger.debug(`removed expo addPushTokenListener`);
133
- subscription.remove();
134
- });
135
- }
136
- } else {
137
- const pushNotificationIosLib = getPushNotificationIosLib();
138
- pushNotificationIosLib.addEventListener('register', token => {
139
- logger.debug(`Got device token - pushNotificationIosLib.addEventListener('register')`, token);
140
- setDeviceToken(token);
141
- });
142
- setUnsubscribeListener(() => {
143
- logger.debug(`pushNotificationIosLib.removeEventListener('register')`);
144
- pushNotificationIosLib.removeEventListener('register');
145
- });
146
- }
147
- }
148
- //# sourceMappingURL=ios.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","videoLoggerSystem","setPushLogoutCallback","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","logger","getLogger","trace","next","undefined","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","trigger","request","payload","stream","JSON","stringify","oniOSNotifeeEvent","OS","detail","notifeeLib","EventType","PRESS","notification","data","result","debug","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","warn","push_provider_name","addDevice","then","catch","isExpo","expoNotificationsLib","getDevicePushTokenAsync","devicePushToken","subscription","addPushTokenListener","remove","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SAEEC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,QAEpB,QAAQ;AACf,SAA4BC,iBAAiB,QAAQ,yBAAyB;AAC9E,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,SAASC,aAAa,QAAQ,kBAAkB;AAKhD,IAAIC,YAAY,GAAG;EAAEC,KAAK,EAAE,EAAE;EAAEC,MAAM,EAAE;AAAG,CAAC;AAE5C,SAASC,0CAA0CA,CACjDC,aAAgC,EAChC;EACA,IACEA,aAAa,EAAEC,MAAM,KAAK,cAAc,IACx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AK,CAAC,mCAAmC,CAAC;QACjD8B,YAAY,CAACE,MAAM,CAAC,CAAC;MACvB,CAAC,CAAC;IACJ;EACF,CAAC,MAAM;IACL,MAAM7B,sBAAsB,GAAGzC,yBAAyB,CAAC,CAAC;IAC1DyC,sBAAsB,CAAC8B,gBAAgB,CAAC,UAAU,EAAGlE,KAAK,IAAK;MAC7DQ,MAAM,CAACyB,KAAK,CACV,wEAAwE,EACxEjC,KACF,CAAC;MACDgD,cAAc,CAAChD,KAAK,CAAC;IACvB,CAAC,CAAC;IACF6C,sBAAsB,CAAC,MAAM;MAC3BrC,MAAM,CAACyB,KAAK,CAAC,wDAAwD,CAAC;MACtEG,sBAAsB,CAAC+B,mBAAmB,CAAC,UAAU,CAAC;IACxD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -1,18 +0,0 @@
1
- import { videoLoggerSystem } from '@stream-io/video-client';
2
- let expoNotificationsLib;
3
- try {
4
- expoNotificationsLib = require('expo-notifications');
5
- } catch {}
6
- export function getExpoNotificationsLib() {
7
- if (!expoNotificationsLib) {
8
- throw Error('expo-notifications library is not installed. Please see https://docs.expo.dev/versions/latest/sdk/notifications/ for installation instructions. It is required for non ringing push notifications.');
9
- }
10
- return expoNotificationsLib;
11
- }
12
- export function getExpoNotificationsLibNoThrow() {
13
- if (!expoNotificationsLib) {
14
- videoLoggerSystem.getLogger('getExpoNotificationsLibNoThrow').debug('expo-notifications library is not installed. It is required for non ringing push notifications and not for ringing');
15
- }
16
- return expoNotificationsLib;
17
- }
18
- //# sourceMappingURL=expoNotifications.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["videoLoggerSystem","expoNotificationsLib","require","getExpoNotificationsLib","Error","getExpoNotificationsLibNoThrow","getLogger","debug"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/expoNotifications.ts"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,yBAAyB;AAM3D,IAAIC,oBAAsD;AAE1D,IAAI;EACFA,oBAAoB,GAAGC,OAAO,CAAC,oBAAoB,CAAC;AACtD,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACF,oBAAoB,EAAE;IACzB,MAAMG,KAAK,CACT,oMACF,CAAC;EACH;EACA,OAAOH,oBAAoB;AAC7B;AAEA,OAAO,SAASI,8BAA8BA,CAAA,EAAG;EAC/C,IAAI,CAACJ,oBAAoB,EAAE;IACzBD,iBAAiB,CACdM,SAAS,CAAC,gCAAgC,CAAC,CAC3CC,KAAK,CACJ,oHACF,CAAC;EACL;EACA,OAAON,oBAAoB;AAC7B","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- let pushNotificationIosLib;
2
- try {
3
- pushNotificationIosLib = require('@react-native-community/push-notification-ios').default;
4
- } catch {}
5
- export function getPushNotificationIosLib() {
6
- if (!pushNotificationIosLib) {
7
- throw Error('@react-native-community/push-notification-ios library is not installed. Please install it using "yarn add @react-native-community/push-notification-ios" or "npm i @react-native-community/push-notification-ios --save"');
8
- }
9
- return pushNotificationIosLib;
10
- }
11
- //# sourceMappingURL=iosPushNotification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["pushNotificationIosLib","require","default","getPushNotificationIosLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/iosPushNotification.ts"],"mappings":"AAKA,IAAIA,sBAA0D;AAI9D,IAAI;EACFA,sBAAsB,GACpBC,OAAO,CAAC,+CAA+C,CAAC,CAACC,OAAO;AACpE,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,IAAI,CAACH,sBAAsB,EAAE;IAC3B,MAAMI,KAAK,CACT,0NACF,CAAC;EACH;EACA,OAAOJ,sBAAsB;AAC/B","ignoreList":[]}