@stream-io/video-react-native-sdk 1.2.16 → 1.3.1

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 (148) hide show
  1. package/CHANGELOG.md +1609 -0
  2. package/dist/commonjs/components/Call/CallControls/IncomingCallControls.js +2 -1
  3. package/dist/commonjs/components/Call/CallControls/IncomingCallControls.js.map +1 -1
  4. package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js +4 -3
  5. package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
  6. package/dist/commonjs/components/Call/CallControls/RejectCallButton.js +7 -4
  7. package/dist/commonjs/components/Call/CallControls/RejectCallButton.js.map +1 -1
  8. package/dist/commonjs/hooks/push/useIosCallKeepEventsSetupEffect.js +43 -6
  9. package/dist/commonjs/hooks/push/useIosCallKeepEventsSetupEffect.js.map +1 -1
  10. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +1 -1
  11. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +2 -2
  12. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js +2 -7
  13. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js.map +1 -1
  14. package/dist/commonjs/hooks/push/useProcessPushNonRingingCallEffect.js +3 -3
  15. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +1 -0
  16. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  17. package/dist/commonjs/providers/StreamCall.js +1 -1
  18. package/dist/commonjs/utils/StreamVideoRN/index.js +5 -6
  19. package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
  20. package/dist/commonjs/utils/index.js +12 -0
  21. package/dist/commonjs/utils/index.js.map +1 -1
  22. package/dist/commonjs/utils/push/android.js +23 -79
  23. package/dist/commonjs/utils/push/android.js.map +1 -1
  24. package/dist/commonjs/utils/push/index.js +39 -0
  25. package/dist/commonjs/utils/push/index.js.map +1 -0
  26. package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -0
  27. package/dist/commonjs/utils/push/internal/utils.js +158 -0
  28. package/dist/commonjs/utils/push/internal/utils.js.map +1 -0
  29. package/dist/commonjs/utils/push/ios.js +43 -84
  30. package/dist/commonjs/utils/push/ios.js.map +1 -1
  31. package/dist/commonjs/utils/push/libs/expoNotifications.js.map +1 -1
  32. package/dist/commonjs/utils/push/libs/index.js +0 -11
  33. package/dist/commonjs/utils/push/libs/index.js.map +1 -1
  34. package/dist/commonjs/utils/push/libs/iosPushNotification.js.map +1 -1
  35. package/dist/commonjs/utils/push/utils.js +29 -150
  36. package/dist/commonjs/utils/push/utils.js.map +1 -1
  37. package/dist/commonjs/version.js +1 -1
  38. package/dist/commonjs/version.js.map +1 -1
  39. package/dist/module/components/Call/CallControls/IncomingCallControls.js +2 -1
  40. package/dist/module/components/Call/CallControls/IncomingCallControls.js.map +1 -1
  41. package/dist/module/components/Call/CallControls/OutgoingCallControls.js +4 -3
  42. package/dist/module/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
  43. package/dist/module/components/Call/CallControls/RejectCallButton.js +7 -4
  44. package/dist/module/components/Call/CallControls/RejectCallButton.js.map +1 -1
  45. package/dist/module/hooks/push/useIosCallKeepEventsSetupEffect.js +41 -4
  46. package/dist/module/hooks/push/useIosCallKeepEventsSetupEffect.js.map +1 -1
  47. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +1 -1
  48. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
  49. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +2 -2
  50. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  51. package/dist/module/hooks/push/useProcessPushCallEffect.js +2 -7
  52. package/dist/module/hooks/push/useProcessPushCallEffect.js.map +1 -1
  53. package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js +3 -3
  54. package/dist/module/hooks/push/useProcessPushNonRingingCallEffect.js.map +1 -1
  55. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +1 -0
  56. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  57. package/dist/module/providers/StreamCall.js +1 -1
  58. package/dist/module/providers/StreamCall.js.map +1 -1
  59. package/dist/module/utils/StreamVideoRN/index.js +5 -6
  60. package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
  61. package/dist/module/utils/index.js +1 -0
  62. package/dist/module/utils/index.js.map +1 -1
  63. package/dist/module/utils/push/android.js +20 -79
  64. package/dist/module/utils/push/android.js.map +1 -1
  65. package/dist/module/utils/push/index.js +4 -0
  66. package/dist/module/utils/push/index.js.map +1 -0
  67. package/dist/module/utils/push/internal/rxSubjects.js.map +1 -0
  68. package/dist/module/utils/push/internal/utils.js +147 -0
  69. package/dist/module/utils/push/internal/utils.js.map +1 -0
  70. package/dist/module/utils/push/ios.js +40 -81
  71. package/dist/module/utils/push/ios.js.map +1 -1
  72. package/dist/module/utils/push/libs/expoNotifications.js.map +1 -1
  73. package/dist/module/utils/push/libs/index.js +0 -1
  74. package/dist/module/utils/push/libs/index.js.map +1 -1
  75. package/dist/module/utils/push/libs/iosPushNotification.js.map +1 -1
  76. package/dist/module/utils/push/utils.js +25 -144
  77. package/dist/module/utils/push/utils.js.map +1 -1
  78. package/dist/module/version.js +1 -1
  79. package/dist/module/version.js.map +1 -1
  80. package/dist/typescript/components/Call/CallControls/IncomingCallControls.d.ts.map +1 -1
  81. package/dist/typescript/components/Call/CallControls/OutgoingCallControls.d.ts.map +1 -1
  82. package/dist/typescript/components/Call/CallControls/RejectCallButton.d.ts +17 -2
  83. package/dist/typescript/components/Call/CallControls/RejectCallButton.d.ts.map +1 -1
  84. package/dist/typescript/hooks/push/useIosCallKeepEventsSetupEffect.d.ts.map +1 -1
  85. package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
  86. package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
  87. package/dist/typescript/utils/StreamVideoRN/types.d.ts +6 -4
  88. package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
  89. package/dist/typescript/utils/index.d.ts +1 -0
  90. package/dist/typescript/utils/index.d.ts.map +1 -1
  91. package/dist/typescript/utils/push/android.d.ts +12 -2
  92. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  93. package/dist/typescript/utils/push/index.d.ts +4 -0
  94. package/dist/typescript/utils/push/index.d.ts.map +1 -0
  95. package/dist/typescript/utils/push/{rxSubjects.d.ts → internal/rxSubjects.d.ts} +1 -1
  96. package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -0
  97. package/dist/typescript/utils/push/internal/utils.d.ts +43 -0
  98. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -0
  99. package/dist/typescript/utils/push/ios.d.ts +8 -3
  100. package/dist/typescript/utils/push/ios.d.ts.map +1 -1
  101. package/dist/typescript/utils/push/libs/expoNotifications.d.ts +2 -0
  102. package/dist/typescript/utils/push/libs/expoNotifications.d.ts.map +1 -1
  103. package/dist/typescript/utils/push/libs/index.d.ts +0 -1
  104. package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
  105. package/dist/typescript/utils/push/libs/iosPushNotification.d.ts +2 -0
  106. package/dist/typescript/utils/push/libs/iosPushNotification.d.ts.map +1 -1
  107. package/dist/typescript/utils/push/utils.d.ts +14 -42
  108. package/dist/typescript/utils/push/utils.d.ts.map +1 -1
  109. package/dist/typescript/version.d.ts +1 -1
  110. package/dist/typescript/version.d.ts.map +1 -1
  111. package/package.json +6 -11
  112. package/src/components/Call/CallControls/IncomingCallControls.tsx +4 -1
  113. package/src/components/Call/CallControls/OutgoingCallControls.tsx +3 -2
  114. package/src/components/Call/CallControls/RejectCallButton.tsx +19 -3
  115. package/src/hooks/push/useIosCallKeepEventsSetupEffect.ts +62 -6
  116. package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +1 -1
  117. package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +2 -2
  118. package/src/hooks/push/useProcessPushCallEffect.ts +2 -7
  119. package/src/hooks/push/useProcessPushNonRingingCallEffect.ts +3 -3
  120. package/src/hooks/useAndroidKeepCallAliveEffect.ts +1 -0
  121. package/src/providers/StreamCall.tsx +1 -1
  122. package/src/utils/StreamVideoRN/index.ts +11 -6
  123. package/src/utils/StreamVideoRN/types.ts +6 -4
  124. package/src/utils/index.ts +1 -0
  125. package/src/utils/push/android.ts +28 -99
  126. package/src/utils/push/index.ts +3 -0
  127. package/src/utils/push/{rxSubjects.ts → internal/rxSubjects.ts} +1 -1
  128. package/src/utils/push/internal/utils.ts +178 -0
  129. package/src/utils/push/ios.ts +49 -115
  130. package/src/utils/push/libs/expoNotifications.ts +4 -0
  131. package/src/utils/push/libs/index.ts +0 -1
  132. package/src/utils/push/libs/iosPushNotification.ts +4 -0
  133. package/src/utils/push/utils.ts +44 -175
  134. package/src/version.ts +1 -1
  135. package/dist/commonjs/utils/push/libs/expoTaskManager.js +0 -17
  136. package/dist/commonjs/utils/push/libs/expoTaskManager.js.map +0 -1
  137. package/dist/commonjs/utils/push/rxSubjects.js.map +0 -1
  138. package/dist/module/utils/push/libs/expoTaskManager.js +0 -11
  139. package/dist/module/utils/push/libs/expoTaskManager.js.map +0 -1
  140. package/dist/module/utils/push/rxSubjects.js.map +0 -1
  141. package/dist/typescript/utils/push/libs/expoTaskManager.d.ts +0 -3
  142. package/dist/typescript/utils/push/libs/expoTaskManager.d.ts.map +0 -1
  143. package/dist/typescript/utils/push/rxSubjects.d.ts.map +0 -1
  144. package/ios/StreamVideoReactNative.xcodeproj/project.xcworkspace/xcuserdata/santhoshvaiyapuri.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  145. package/ios/StreamVideoReactNative.xcodeproj/xcuserdata/santhoshvaiyapuri.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  146. package/src/utils/push/libs/expoTaskManager.ts +0 -16
  147. /package/dist/commonjs/utils/push/{rxSubjects.js → internal/rxSubjects.js} +0 -0
  148. /package/dist/module/utils/push/{rxSubjects.js → internal/rxSubjects.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","pushAcceptedIncomingCallCId$","voipPushNotificationCallCId$","voipCallkeepCallOnForegroundMap$","voipCallkeepAcceptedCallOnNativeDialerMap$","pushNonRingingCallData$","clearPushWSEventSubscriptions","processCallFromPushInBackground","getExpoNotificationsLib","getNotifeeLibThrowIfNotInstalledForPush","getPushNotificationIosLib","getLogger","setPushLogoutCallback","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","next","iosCallkeepAcceptCall","callUUIDFromCallkeep","shouldProcessCallFromCallkeep","uuid","undefined","iosCallkeepRejectCall","pushConfig","setupRemoteNotificationsHandleriOS","OS","notifeeLib","default","onForegroundEvent","detail","EventType","PRESS","notification","data","stream","result","onTapNonRingingCallNotification","isExpo","Notifications","setNotificationHandler","handleNotification","shouldShowAlert","shouldPlaySound","shouldSetBadge","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","logger","push_provider_name","addDevice","expoNotificationsLib","getDevicePushTokenAsync","then","devicePushToken","subscription","addPushTokenListener","subscriptionForReceive","addNotificationReceivedListener","event","request","trigger","payload","remove","pushNotificationIosLib","addEventListener","getData","finish","FetchResult","NoData","removeEventListener"],"sourceRoot":"../../../../src","sources":["utils/push/ios.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAKvC,SACEC,4BAA4B,EAC5BC,4BAA4B,EAC5BC,gCAAgC,EAChCC,0CAA0C,EAC1CC,uBAAuB,QAClB,cAAc;AACrB,SACEC,6BAA6B,EAC7BC,+BAA+B,QAC1B,SAAS;AAChB,SACEC,uBAAuB,EACvBC,uCAAuC,EACvCC,yBAAyB,QACpB,QAAQ;AACf,SAA4BC,SAAS,QAAQ,yBAAyB;AACtE,SAASC,qBAAqB,QAAQ,gCAAgC;AAYtE,IAAIC,YAAY,GAAG;EAAEC,K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MAAM+B,sBAAsB,GAC1BN,oBAAoB,CAACO,+BAA+B,CAAEC,KAAK,IAAK;MAC9D;MACA,IAAIA,KAAK,CAACC,OAAO,CAACC,OAAO,CAACvD,IAAI,KAAK,MAAM,EAAE;QACzC,MAAMF,aAAa,GAAGuD,KAAK,CAACC,OAAO,CAACC,OAAO,CAACC,OAAO,EAC/CnC,MAAuB;QAC3BxB,0CAA0C,CAACC,aAAa,CAAC;MAC3D;IACF,CAAC,CAAC;IACJmC,sBAAsB,CAAC,MAAM;MAC3BgB,YAAY,CAACQ,MAAM,CAAC,CAAC;MACrBN,sBAAsB,CAACM,MAAM,CAAC,CAAC;IACjC,CAAC,CAAC;EACJ,CAAC,MAAM;IACL,MAAMC,sBAAsB,GAAGnE,yBAAyB,CAAC,CAAC;IAC1DmE,sBAAsB,CAACC,gBAAgB,CAAC,UAAU,EAAGhE,KAAK,IAAK;MAC7DyC,cAAc,CAACzC,KAAK,CAAC;IACvB,CAAC,CAAC;IACF+D,sBAAsB,CAACC,gBAAgB,CAAC,cAAc,EAAGxC,YAAY,IAAK;MACxE,MAAMC,IAAI,GAAGD,YAAY,CAACyC,OAAO,CAAC,CAAC;MACnC,MAAM9D,aAAa,GAAGsB,IAAI,EAAEC,MAAuB;MACnD;MACAxB,0CAA0C,CAACC,aAAa,CAAC;MACzDqB,YAAY,CAAC0C,MAAM,CAACH,sBAAsB,CAACI,WAAW,CAACC,MAAM,CAAC;IAChE,CAAC,CAAC;IACF9B,sBAAsB,CAAC,MAAM;MAC3ByB,sBAAsB,CAACM,mBAAmB,CAAC,UAAU,CAAC;MACtDN,sBAAsB,CAACM,mBAAmB,CAAC,cAAc,CAAC;IAC5D,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
1
+ {"version":3,"names":["Platform","pushNonRingingCallData$","getExpoNotificationsLib","getPushNotificationIosLib","getLogger","setPushLogoutCallback","EventType","StreamVideoRN","lastApnToken","token","userId","processNonRingingNotificationStreamPayload","streamPayload","sender","type","cid","call_cid","next","oniOSExpoNotificationEvent","event","pushConfig","getConfig","push","request","trigger","payload","stream","oniOSNotifeeEvent","OS","detail","PRESS","notification","data","result","onTapNonRingingCallNotification","onPushNotificationiOSStreamVideoEvent","pushNotificationIosLib","getData","isClicked","userInteraction","finish","FetchResult","NoData","initIosNonVoipToken","client","setUnsubscribeListener","ios","pushProviderName","setDeviceToken","streamClient","_user","id","removeDevice","err","logger","push_provider_name","addDevice","isExpo","expoNotificationsLib","getDevicePushTokenAsync","then","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,yBAAyB,QAEpB,QAAQ;AACf,SAA4BC,SAAS,QAAQ,yBAAyB;AACtE,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,SAAS,QAAe,uBAAuB;AACxD,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,IACxCD,aAAa,EAAEE,IAAI,KAAK,WAAW,EACnC;IACA,MAAMC,GAAG,GAAGH,aAAa,CAACI,QAAQ;IAClC,MAAMF,IAAI,GAAGF,aAAa,CAACE,IAAI;IAC/Bb,uBAAuB,CAACgB,IAAI,CAAC;MAAEF,GAAG;MAAED;IAAK,CAAC,CAAC;IAC3C,OAAO;MAAEC,GAAG;MAAED;IAAK,CAAC;EACtB;AACF;AAEA,OAAO,MAAMI,0BAA0B,GAAIC,KAAuB,IAAK;EACrE,MAAMC,UAAU,GAAGb,aAAa,CAACc,SAAS,CAAC,CAAC,CAACC,IAAI;EACjD,IAAIF,UAAU,EAAE;IACd,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AMH,MAAM,CAACY,SAAS,CAAC/C,KAAK,EAAE,KAAK,EAAE8C,kBAAkB,CAAC;EAC1D,CAAC;EACD,IAAInC,UAAU,CAACqC,MAAM,EAAE;IACrB,MAAMC,oBAAoB,GAAGxD,uBAAuB,CAAC,CAAC;IACtDwD,oBAAoB,CAACC,uBAAuB,CAAC,CAAC,CAACC,IAAI,CAAEC,eAAe,IAAK;MACvEb,cAAc,CAACa,eAAe,CAAC7B,IAAI,CAAC;IACtC,CAAC,CAAC;IACF,MAAM8B,YAAY,GAAGJ,oBAAoB,CAACK,oBAAoB,CAC3DF,eAAe,IAAK;MACnBb,cAAc,CAACa,eAAe,CAAC7B,IAAI,CAAC;IACtC,CACF,CAAC;IACDa,sBAAsB,CAAC,MAAM;MAC3BiB,YAAY,CAACE,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC;EACJ,CAAC,MAAM;IACL,MAAM5B,sBAAsB,GAAGjC,yBAAyB,CAAC,CAAC;IAC1DiC,sBAAsB,CAAC6B,gBAAgB,CAAC,UAAU,EAAGxD,KAAK,IAAK;MAC7DuC,cAAc,CAACvC,KAAK,CAAC;IACvB,CAAC,CAAC;IACFoC,sBAAsB,CAAC,MAAM;MAC3BT,sBAAsB,CAAC8B,mBAAmB,CAAC,UAAU,CAAC;IACxD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["expoNotificationsLib","require","_e","getExpoNotificationsLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/expoNotifications.ts"],"mappings":"AAEA,IAAIA,oBAAsD;AAE1D,IAAI;EACFA,oBAAoB,GAAGC,OAAO,CAAC,oBAAoB,CAAC;AACtD,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACH,oBAAoB,EAAE;IACzB,MAAMI,KAAK,CACT,gJACF,CAAC;EACH;EACA,OAAOJ,oBAAoB;AAC7B","ignoreList":[]}
1
+ {"version":3,"names":["expoNotificationsLib","require","_e","getExpoNotificationsLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/expoNotifications.ts"],"mappings":"AAMA,IAAIA,oBAAsD;AAE1D,IAAI;EACFA,oBAAoB,GAAGC,OAAO,CAAC,oBAAoB,CAAC;AACtD,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,uBAAuBA,CAAA,EAAG;EACxC,IAAI,CAACH,oBAAoB,EAAE;IACzB,MAAMI,KAAK,CACT,gJACF,CAAC;EACH;EACA,OAAOJ,oBAAoB;AAC7B","ignoreList":[]}
@@ -1,5 +1,4 @@
1
1
  export * from './expoNotifications';
2
- export * from './expoTaskManager';
3
2
  export * from './firebaseMessaging';
4
3
  export * from './iosPushNotification';
5
4
  export * from './voipPushNotification';
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,mBAAmB;AACjC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,YAAY;AAC1B,cAAc,WAAW;;AAEzB;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["utils/push/libs/index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,YAAY;AAC1B,cAAc,WAAW;;AAEzB;AACA;AACA;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["pushNotificationIosLib","require","default","_e","getPushNotificationIosLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/iosPushNotification.ts"],"mappings":"AAGA,IAAIA,sBAA0D;AAE9D,IAAI;EACFA,sBAAsB,GACpBC,OAAO,CAAC,+CAA+C,CAAC,CAACC,OAAO;AACpE,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,IAAI,CAACJ,sBAAsB,EAAE;IAC3B,MAAMK,KAAK,CACT,0NACF,CAAC;EACH;EACA,OAAOL,sBAAsB;AAC/B","ignoreList":[]}
1
+ {"version":3,"names":["pushNotificationIosLib","require","default","_e","getPushNotificationIosLib","Error"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/iosPushNotification.ts"],"mappings":"AAGA,IAAIA,sBAA0D;AAM9D,IAAI;EACFA,sBAAsB,GACpBC,OAAO,CAAC,+CAA+C,CAAC,CAACC,OAAO;AACpE,CAAC,CAAC,OAAOC,EAAE,EAAE,CAAC;AAEd,OAAO,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,IAAI,CAACJ,sBAAsB,EAAE;IAC3B,MAAMK,KAAK,CACT,0NACF,CAAC;EACH;EACA,OAAOL,sBAAsB;AAC/B","ignoreList":[]}
@@ -1,146 +1,27 @@
1
- import { getLogger, RxUtils } from '@stream-io/video-client';
2
- import { onNewCallNotification } from '../internal/newNotificationCallbacks';
3
- import { pushUnsubscriptionCallbacks$ } from './rxSubjects';
4
- /**
5
- * This function is used to check if the call should be ended based on the push notification
6
- * Useful for callkeep management to end the call if necessary (with reportEndCallWithUUID)
7
- */
8
- export const shouldCallBeEnded = (callFromPush, created_by_id, receiver_id) => {
9
- /* callkeep reasons for ending a call
10
- FAILED: 1,
11
- REMOTE_ENDED: 2,
12
- UNANSWERED: 3,
13
- ANSWERED_ELSEWHERE: 4,
14
- DECLINED_ELSEWHERE: 5,
15
- MISSED: 6
16
- */
17
- const callSession = callFromPush.state.session;
18
- const rejected_by = callSession?.rejected_by;
19
- const accepted_by = callSession?.accepted_by;
20
- let mustEndCall = false;
21
- let callkeepReason = 0;
22
- if (created_by_id && rejected_by) {
23
- if (rejected_by[created_by_id]) {
24
- // call was cancelled by the caller
25
- mustEndCall = true;
26
- callkeepReason = 2;
27
- }
28
- } else if (receiver_id && rejected_by) {
29
- if (rejected_by[receiver_id]) {
30
- // call was rejected by the receiver in some other device
31
- mustEndCall = true;
32
- callkeepReason = 5;
33
- }
34
- } else if (receiver_id && accepted_by) {
35
- if (accepted_by[receiver_id]) {
36
- // call was accepted by the receiver in some other device
37
- mustEndCall = true;
38
- callkeepReason = 4;
39
- }
1
+ export function isFirebaseStreamVideoMessage(message) {
2
+ return message.data?.sender === 'stream.video';
3
+ }
4
+ export function isNotifeeStreamVideoEvent(event) {
5
+ const {
6
+ detail
7
+ } = event;
8
+ const {
9
+ notification
10
+ } = detail;
11
+ return notification?.data?.sender === 'stream.video';
12
+ }
13
+ export function isExpoNotificationStreamVideoEvent(event) {
14
+ if (event.request.trigger.type === 'push') {
15
+ // iOS
16
+ const streamPayload = event.request.trigger.payload?.stream;
17
+ // Android
18
+ const remoteMessageData = event.request.trigger.remoteMessage?.data;
19
+ return streamPayload?.sender === 'stream.video' || remoteMessageData?.sender === 'stream.video';
40
20
  }
41
- return {
42
- mustEndCall,
43
- callkeepReason
44
- };
45
- };
46
-
47
- /* An action for the notification or callkeep and app does not have JS context setup yet, so we need to do two steps:
48
- 1. we need to create a new client and connect the user to decline the call
49
- 2. this is because the app is in background state and we don't have a client to get the call and do an action
50
- */
51
- export const processCallFromPushInBackground = async (pushConfig, call_cid, action) => {
52
- let videoClient;
53
- try {
54
- videoClient = await pushConfig.createStreamVideoClient();
55
- if (!videoClient) {
56
- return;
57
- }
58
- } catch (e) {
59
- const logger = getLogger(['processCallFromPushInBackground']);
60
- logger('error', 'failed to create video client', e);
61
- return;
62
- }
63
- await processCallFromPush(videoClient, call_cid, action, pushConfig);
64
- };
65
-
66
- /**
67
- * This function is used process the call from push notifications due to incoming call
68
- * It does the following steps:
69
- * 1. Get the call from the client if present or create a new call
70
- * 2. Fetch the latest state of the call from the server if its not already in ringing state
71
- * 3. Join or leave the call based on the user's action.
72
- */
73
- export const processCallFromPush = async (client, call_cid, action, pushConfig) => {
74
- let callFromPush;
75
- try {
76
- callFromPush = await client.onRingingCall(call_cid);
77
- } catch (e) {
78
- const logger = getLogger(['processCallFromPush']);
79
- logger('error', 'failed to fetch call from push notification', e);
80
- return;
81
- }
82
- // note: when action was pressed or delivered, we dont need to do anything as the only thing is to do is to get the call which adds it to the client
83
- try {
84
- if (action === 'accept') {
85
- if (pushConfig.publishOptions) {
86
- callFromPush.updatePublishOptions(pushConfig.publishOptions);
87
- }
88
- await callFromPush.join();
89
- } else if (action === 'decline') {
90
- await callFromPush.leave({
91
- reject: true
92
- });
93
- }
94
- } catch (e) {
95
- const logger = getLogger(['processCallFromPush']);
96
- logger('error', `failed to process ${action} call from push notification`, e);
97
- }
98
- };
99
-
100
- /**
101
- * This function is used process the call from push notifications due to non ringing calls
102
- * It does the following steps:
103
- * 1. Get the call from the client if present or create a new call
104
- * 2. Fetch the latest state of the call from the server if its not already in ringing state
105
- * 3. Call all the callbacks to inform the app about the call
106
- */
107
- export const processNonIncomingCallFromPush = async (client, call_cid, nonRingingNotificationType) => {
108
- let callFromPush;
109
- try {
110
- const _callFromPush = client.state.calls.find(c => c.cid === call_cid);
111
- if (_callFromPush) {
112
- callFromPush = _callFromPush;
113
- } else {
114
- // if not it means that WS is not alive when receiving the push notifications and we need to fetch the call
115
- const [callType, callId] = call_cid.split(':');
116
- callFromPush = client.call(callType, callId);
117
- await callFromPush.get();
118
- }
119
- } catch (e) {
120
- const logger = getLogger(['processNonIncomingCallFromPush']);
121
- logger('error', 'failed to fetch call from push notification', e);
122
- return;
123
- }
124
- onNewCallNotification(callFromPush, nonRingingNotificationType);
125
- };
126
-
127
- /**
128
- * This function is used to clear all the push related WS subscriptions
129
- * note: events are subscribed in push for accept/decline through WS
130
- */
131
- export const clearPushWSEventSubscriptions = () => {
132
- const unsubscriptionCallbacks = RxUtils.getCurrentValue(pushUnsubscriptionCallbacks$);
133
- if (unsubscriptionCallbacks) {
134
- unsubscriptionCallbacks.forEach(cb => cb());
135
- }
136
- pushUnsubscriptionCallbacks$.next(undefined);
137
- };
138
-
139
- /**
140
- * This ref is used to check if the push WS subscriptions can be added
141
- * It is used to avoid adding the push WS subscriptions when the client is connected to WS in the foreground
142
- */
143
- export const canAddPushWSSubscriptionsRef = {
144
- current: true
145
- };
21
+ }
22
+ export function isPushNotificationiOSStreamVideoEvent(notification) {
23
+ const data = notification.getData();
24
+ const streamPayload = data?.stream;
25
+ return streamPayload?.sender === 'stream.video';
26
+ }
146
27
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getLogger","RxUtils","onNewCallNotification","pushUnsubscriptionCallbacks$","shouldCallBeEnded","callFromPush","created_by_id","receiver_id","callSession","state","session","rejected_by","accepted_by","mustEndCall","callkeepReason","processCallFromPushInBackground","pushConfig","call_cid","action","videoClient","createStreamVideoClient","e","logger","processCallFromPush","client","onRingingCall","publishOptions","updatePublishOptions","join","leave","reject","processNonIncomingCallFromPush","nonRingingNotificationType","_callFromPush","calls","find","c","cid","callType","callId","split","call","get","clearPushWSEventSubscriptions","unsubscriptionCallbacks","getCurrentValue","forEach","cb","next","undefined","canAddPushWSSubscriptionsRef","current"],"sourceRoot":"../../../../src","sources":["utils/push/utils.ts"],"mappings":"AAAA,SAEEA,SAAS,EACTC,OAAO,QAEF,yBAAyB;AAKhC,SAASC,qBAAqB,QAAQ,sCAAsC;AAC5E,SAASC,4BAA4B,QAAQ,cAAc;AAM3D;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAC/BC,YAAkB,EAClBC,aAAiC,EACjCC,WAA+B,KAC5B;EACH;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,WAAW,GAAGH,YAAY,CAACI,KAAK,CAACC,OAAO;EAC9C,MAAMC,WAAW,GAAGH,WAAW,EAAEG,WAAW;EAC5C,MAAMC,WAAW,GAAGJ,WAAW,EAAEI,WAAW;EAC5C,IAAIC,WAAW,GAAG,KAAK;EACvB,IAAIC,cAAc,GAAG,CAAC;EACtB,IAAIR,aAA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AgB,CAAC;MAChE,MAAMlC,YAAY,CAACqC,GAAG,CAAC,CAAC;IAC1B;EACF,CAAC,CAAC,OAAOrB,CAAC,EAAE;IACV,MAAMC,MAAM,GAAGtB,SAAS,CAAC,CAAC,gCAAgC,CAAC,CAAC;IAC5DsB,MAAM,CAAC,OAAO,EAAE,6CAA6C,EAAED,CAAC,CAAC;IACjE;EACF;EACAnB,qBAAqB,CAACG,YAAY,EAAE2B,0BAA0B,CAAC;AACjE,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMW,6BAA6B,GAAGA,CAAA,KAAM;EACjD,MAAMC,uBAAuB,GAAG3C,OAAO,CAAC4C,eAAe,CACrD1C,4BACF,CAAC;EACD,IAAIyC,uBAAuB,EAAE;IAC3BA,uBAAuB,CAACE,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;EAC/C;EACA5C,4BAA4B,CAAC6C,IAAI,CAACC,SAAS,CAAC;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA0D,GAAG;EACxEC,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["isFirebaseStreamVideoMessage","message","data","sender","isNotifeeStreamVideoEvent","event","detail","notification","isExpoNotificationStreamVideoEvent","request","trigger","type","streamPayload","payload","stream","remoteMessageData","remoteMessage","isPushNotificationiOSStreamVideoEvent","getData"],"sourceRoot":"../../../../src","sources":["utils/push/utils.ts"],"mappings":"AAcA,OAAO,SAASA,4BAA4BA,CAC1CC,OAA6C,EAC7C;EACA,OAAOA,OAAO,CAACC,IAAI,EAAEC,MAAM,KAAK,cAAc;AAChD;AAEA,OAAO,SAASC,yBAAyBA,CAACC,KAAY,EAAE;EACtD,MAAM;IAAEC;EAAO,CAAC,GAAGD,KAAK;EACxB,MAAM;IAAEE;EAAa,CAAC,GAAGD,MAAM;EAC/B,OAAOC,YAAY,EAAEL,IAAI,EAAEC,MAAM,KAAK,cAAc;AACtD;AAEA,OAAO,SAASK,kCAAkCA,CAACH,KAAuB,EAAE;EAC1E,IAAIA,KAAK,CAACI,OAAO,CAACC,OAAO,CAACC,IAAI,KAAK,MAAM,EAAE;IACzC;IACA,MAAMC,aAAa,GAAGP,KAAK,CAACI,OAAO,CAACC,OAAO,CAACG,OAAO,EAC/CC,MAA2B;IAC/B;IACA,MAAMC,iBAAiB,GAAGV,KAAK,CAACI,OAAO,CAACC,OAAO,CAACM,aAAa,EAAEd,IAAI;IACnE,OACEU,aAAa,EAAET,MAAM,KAAK,cAAc,IACxCY,iBAAiB,EAAEZ,MAAM,KAAK,cAAc;EAEhD;AACF;AAEA,OAAO,SAASc,qCAAqCA,CACnDV,YAAqC,EACrC;EACA,MAAML,IAAI,GAAGK,YAAY,CAACW,OAAO,CAAC,CAAC;EACnC,MAAMN,aAAa,GAAGV,IAAI,EAAEY,MAA2B;EACvD,OAAOF,aAAa,EAAET,MAAM,KAAK,cAAc;AACjD","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- export const version = '1.2.15';
1
+ export const version = '1.3.1';
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,OAAO","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"IncomingCallControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/IncomingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,kDAG9B,yBAAyB,sBAW3B,CAAC"}
1
+ {"version":3,"file":"IncomingCallControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/IncomingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,kDAG9B,yBAAyB,sBAc3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OutgoingCallControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/OutgoingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,6BAE9B,yBAAyB,sBAqB3B,CAAC"}
1
+ {"version":3,"file":"OutgoingCallControls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/OutgoingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,6BAE9B,yBAAyB,sBAsB3B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { CallControlsButton } from './CallControlsButton';
2
3
  /**
3
4
  * The props for the Reject Call button.
4
5
  */
@@ -14,12 +15,26 @@ type RejectCallButtonProps = {
14
15
  * Note: If the `onPressHandler` is passed this handler will not be executed.
15
16
  */
16
17
  onRejectCallHandler?: () => void;
18
+ /**
19
+ * Sets the height, width and border-radius (half the value) of the button.
20
+ */
21
+ size?: React.ComponentProps<typeof CallControlsButton>['size'];
22
+ /**
23
+ * Optional: Reason for rejecting the call.
24
+ * Pass a predefined or a custom reason.
25
+ * There are four predefined reasons for rejecting the call:
26
+ - `busy` - when the callee is busy and cannot accept the call.
27
+ - `decline` - when the callee intentionally declines the call.
28
+ - `cancel` - when the caller cancels the call.
29
+ - `timeout` - when the **caller** or **callee** rejects the call after `auto_cancel_timeout_ms` or `incoming_call_timeout_ms` accordingly.
30
+ */
31
+ rejectReason?: string;
17
32
  };
18
33
  /**
19
34
  * Button to reject a call.
20
35
  *
21
- * Mostly calls call.leave({ reject: true }) internally.
36
+ * Calls call.leave({ reject: true, reason: `OPTIONAL-REASON` }) internally.
22
37
  */
23
- export declare const RejectCallButton: ({ onPressHandler, onRejectCallHandler, }: RejectCallButtonProps) => React.JSX.Element;
38
+ export declare const RejectCallButton: ({ onPressHandler, onRejectCallHandler, size, rejectReason, }: RejectCallButtonProps) => React.JSX.Element;
24
39
  export {};
25
40
  //# sourceMappingURL=RejectCallButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RejectCallButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/RejectCallButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;GAEG;AACH,KAAK,qBAAqB,GAAG;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,6CAG1B,qBAAqB,sBA0CvB,CAAC"}
1
+ {"version":3,"file":"RejectCallButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/RejectCallButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D;;GAEG;AACH,KAAK,qBAAqB,GAAG;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/D;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,iEAK1B,qBAAqB,sBA0CvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIosCallKeepEventsSetupEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallKeepEventsSetupEffect.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,eAAO,MAAM,+BAA+B,YA8C3C,CAAC"}
1
+ {"version":3,"file":"useIosCallKeepEventsSetupEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/push/useIosCallKeepEventsSetupEffect.ts"],"names":[],"mappings":"AAqBA;;GAEG;AACH,eAAO,MAAM,+BAA+B,YA8C3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"AA0DA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,YAgFzC,CAAC"}
1
+ {"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"AA2DA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,YAgFzC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG5C,OAAiC,EAC/B,2BAA2B,EAC5B,MAAM,sCAAsC,CAAC;AAa9C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,MAAM,CAA+B;IAEpD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAO1E,MAAM,CAAC,gCAAgC,CACrC,aAAa,EAAE,OAAO,CACpB,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CACzE;IAWH;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAYvE,MAAM,CAAC,SAAS;IAIhB;;;OAGG;IACH,MAAM,CAAC,YAAY;IASnB;;;;OAIG;IACH,MAAM,CAAC,gCAAgC,CACrC,QAAQ,EAAE,2BAA2B;CAYxC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAiC,EAC/B,2BAA2B,EAC5B,MAAM,sCAAsC,CAAC;AAa9C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,MAAM,CAA+B;IAEpD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAO1E,MAAM,CAAC,gCAAgC,CACrC,aAAa,EAAE,OAAO,CACpB,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CACzE;IAWH;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAmBvE,MAAM,CAAC,SAAS;IAIhB;;;OAGG;IACH,MAAM,CAAC,YAAY;IASnB;;;;OAIG;IACH,MAAM,CAAC,gCAAgC,CACrC,QAAQ,EAAE,2BAA2B;CAYxC"}
@@ -102,10 +102,12 @@ export type StreamVideoConfig = {
102
102
  * }
103
103
  */
104
104
  createStreamVideoClient: () => Promise<StreamVideoClient | undefined>;
105
- /** The callback that is called when a call is accepted, used for navigation */
106
- navigateAcceptCall: () => void;
107
- /** The callback that is called when a push notification is tapped but user did not press accept or decline, used for navigation */
108
- navigateToIncomingCall: () => void;
105
+ /** @deprecated This method will be removed in the future. Please watch for incoming and outgoing calls in the root component of your app.
106
+ Please see https://getstream.io/video/docs/react-native/advanced/ringing-calls/#watch-for-incoming-and-outgoing-calls for more information */
107
+ navigateAcceptCall?: () => void;
108
+ /** @deprecated This method will be removed in the future. Please watch for incoming and outgoing calls in the root component of your app.
109
+ Please see https://getstream.io/video/docs/react-native/advanced/ringing-calls/#watch-for-incoming-and-outgoing-calls for more information */
110
+ navigateToIncomingCall?: () => void;
109
111
  /** Callback that is called when a non ringing push notification was tapped */
110
112
  onTapNonRingingCallNotification?: (call_cid: string, type: NonRingingPushEvent) => void;
111
113
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAE5E,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;OAIG;I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;;;;WAiBG;QACH,uBAAuB,EAAE,MAAM,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;QACtE;yJACiJ;QACjJ,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;QAChC;yJACiJ;QACjJ,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;QACpC,8EAA8E;QAC9E,+BAA+B,CAAC,EAAE,CAChC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,mBAAmB,KACtB,IAAI,CAAC;KACX,CAAC;IACF,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP;;;;eAIG;YACH,iBAAiB,EAAE;gBACjB,KAAK,EAAE,MAAM,CAAC;gBACd,IAAI,EAAE,MAAM,CAAC;aACd,CAAC;SACH,CAAC;KACH,CAAC;CACH,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export declare const generateCallTitle: (memberUserIds: string[], totalMembersToShow?: number) => string;
2
2
  export declare const generateParticipantTitle: (memberUserId: string) => string;
3
3
  export declare const getInitialsOfName: (name: string) => string;
4
+ export * from './push/index';
4
5
  export * from './enterPiPAndroid';
5
6
  export * from './StreamVideoRN';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,uBACF,MAAM,WAgB5B,CAAC;AAGF,eAAO,MAAM,wBAAwB,iBAAkB,MAAM,WAI5D,CAAC;AAGF,eAAO,MAAM,iBAAiB,SAAU,MAAM,WAS7C,CAAC;AAEF,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,uBACF,MAAM,WAgB5B,CAAC;AAGF,eAAO,MAAM,wBAAwB,iBAAkB,MAAM,WAI5D,CAAC;AAGF,eAAO,MAAM,iBAAiB,SAAU,MAAM,WAS7C,CAAC;AAEF,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
@@ -1,9 +1,19 @@
1
1
  import { StreamVideoClient } from '@stream-io/video-client';
2
2
  import type { StreamVideoConfig } from '../StreamVideoRN/types';
3
+ import { NotifeeLib, FirebaseMessagingTypes } from './libs';
3
4
  type PushConfig = NonNullable<StreamVideoConfig['push']>;
4
- /** Setup Firebase push message handler **/
5
- export declare function setupFirebaseHandlerAndroid(pushConfig: PushConfig): void;
5
+ type onBackgroundEventFunctionParams = Parameters<NotifeeLib['default']['onBackgroundEvent']>[0];
6
+ type Event = Parameters<onBackgroundEventFunctionParams>[0];
6
7
  /** Send token to stream, create notification channel, */
7
8
  export declare function initAndroidPushToken(client: StreamVideoClient, pushConfig: PushConfig, setUnsubscribeListener: (unsubscribe: () => void) => void): Promise<void>;
9
+ /**
10
+ * Creates notification from the push message data.
11
+ * For Ringing and Non-Ringing calls.
12
+ */
13
+ export declare const firebaseDataHandler: (data: FirebaseMessagingTypes.RemoteMessage["data"]) => Promise<void>;
14
+ export declare const onAndroidNotifeeEvent: ({ event, isBackground, }: {
15
+ event: Event;
16
+ isBackground: boolean;
17
+ }) => Promise<void>;
8
18
  export {};
9
19
  //# sourceMappingURL=android.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AA6BhC,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAYzD,2CAA2C;AAC3C,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,UAAU,QA8EjE;AAED,0DAA0D;AAC1D,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBA+C1D"}
1
+ {"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,UAAU,EACV,sBAAsB,EACvB,MAAM,QAAQ,CAAC;AAsBhB,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAEzD,KAAK,+BAA+B,GAAG,UAAU,CAC/C,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAC3C,CAAC,CAAC,CAAC,CAAC;AAEL,KAAK,KAAK,GAAG,UAAU,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC;AAI5D,0DAA0D;AAC1D,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBA+C1D;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,SACxB,sBAAsB,CAAC,aAAa,CAAC,MAAM,CAAC,kBA+LnD,CAAC;AAEF,eAAO,MAAM,qBAAqB,6BAG/B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACvB,kBA2EA,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './android';
2
+ export * from './ios';
3
+ export * from './utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
- import { NonRingingPushEvent } from '../StreamVideoRN/types';
2
+ import { NonRingingPushEvent } from '../../StreamVideoRN/types';
3
3
  /**
4
4
  * This rxjs subject is used to store the call cid of the accepted incoming call from push notification
5
5
  * Note: it is should be subscribed only when a user has connected to the websocket of Stream
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rxSubjects.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/internal/rxSubjects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;SAC3B,MAAM;UAAQ,mBAAmB;cAC9B,CAAC;AAEb;;;GAGG;AACH,eAAO,MAAM,4BAA4B,qCAE7B,CAAC;AAEb;;;GAGG;AACH,eAAO,MAAM,0BAA0B,qCAE3B,CAAC;AAEb;;;;GAIG;AACH,eAAO,MAAM,8CAA8C,qCACP,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,qCAE7B,CAAC;AAEb;;GAEG;AACH,eAAO,MAAM,4BAA4B,qCAE7B,CAAC;AAEb,sFAAsF;AACtF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAOF,eAAO,MAAM,gCAAgC,0CAEjC,CAAC;AAKb,eAAO,MAAM,0CAA0C,0CAE3C,CAAC;AAEb,KAAK,mBAAmB,GAAG,MAAM,IAAI,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,4BAA4B,oDAE7B,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { Call, StreamVideoClient } from '@stream-io/video-client';
2
+ import type { NonRingingPushEvent, StreamVideoConfig } from '../../StreamVideoRN/types';
3
+ type PushConfig = NonNullable<StreamVideoConfig['push']>;
4
+ type CanAddPushWSSubscriptionsRef = {
5
+ current: boolean;
6
+ };
7
+ /**
8
+ * This function is used to check if the call should be ended based on the push notification
9
+ * Useful for callkeep management to end the call if necessary (with reportEndCallWithUUID)
10
+ */
11
+ export declare const shouldCallBeEnded: (callFromPush: Call, created_by_id: string | undefined, receiver_id: string | undefined) => {
12
+ mustEndCall: boolean;
13
+ callkeepReason: number;
14
+ };
15
+ export declare const processCallFromPushInBackground: (pushConfig: PushConfig, call_cid: string, action: Parameters<typeof processCallFromPush>[2]) => Promise<void>;
16
+ /**
17
+ * This function is used process the call from push notifications due to incoming call
18
+ * It does the following steps:
19
+ * 1. Get the call from the client if present or create a new call
20
+ * 2. Fetch the latest state of the call from the server if its not already in ringing state
21
+ * 3. Join or leave the call based on the user's action.
22
+ */
23
+ export declare const processCallFromPush: (client: StreamVideoClient, call_cid: string, action: "accept" | "decline" | "pressed" | "backgroundDelivered", pushConfig: PushConfig) => Promise<void>;
24
+ /**
25
+ * This function is used process the call from push notifications due to non ringing calls
26
+ * It does the following steps:
27
+ * 1. Get the call from the client if present or create a new call
28
+ * 2. Fetch the latest state of the call from the server
29
+ * 3. Call all the callbacks to inform the app about the call
30
+ */
31
+ export declare const processNonIncomingCallFromPush: (client: StreamVideoClient, call_cid: string, nonRingingNotificationType: NonRingingPushEvent) => Promise<void>;
32
+ /**
33
+ * This function is used to clear all the push related WS subscriptions
34
+ * note: events are subscribed in push for accept/decline through WS
35
+ */
36
+ export declare const clearPushWSEventSubscriptions: () => void;
37
+ /**
38
+ * This ref is used to check if the push WS subscriptions can be added
39
+ * It is used to avoid adding the push WS subscriptions when the client is connected to WS in the foreground
40
+ */
41
+ export declare const canAddPushWSSubscriptionsRef: CanAddPushWSSubscriptionsRef;
42
+ export {};
43
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAEJ,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAInC,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAEzD,KAAK,4BAA4B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,iBACd,IAAI,iBACH,MAAM,GAAG,SAAS,eACpB,MAAM,GAAG,SAAS;;;CAmChC,CAAC;AAMF,eAAO,MAAM,+BAA+B,eAC9B,UAAU,YACZ,MAAM,UACR,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,kBAelD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,WACtB,iBAAiB,YACf,MAAM,UACR,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,qBAAqB,cACpD,UAAU,kBA4BvB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,WACjC,iBAAiB,YACf,MAAM,8BACY,mBAAmB,kBAmBhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,YAQzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,4BAE1C,CAAC"}
@@ -1,9 +1,14 @@
1
1
  import type { StreamVideoConfig } from '../StreamVideoRN/types';
2
+ import { ExpoNotification, PushNotificationiOSType } from './libs';
2
3
  import { StreamVideoClient } from '@stream-io/video-client';
4
+ import { Event } from '@notifee/react-native';
3
5
  type PushConfig = NonNullable<StreamVideoConfig['push']>;
4
- export declare const iosCallkeepAcceptCall: (call_cid: string | undefined, callUUIDFromCallkeep: string) => void;
5
- export declare const iosCallkeepRejectCall: (call_cid: string | undefined, callUUIDFromCallkeep: string, pushConfig: PushConfig) => Promise<void>;
6
- export declare const setupRemoteNotificationsHandleriOS: (pushConfig: PushConfig) => void;
6
+ export declare const oniOSExpoNotificationEvent: (event: ExpoNotification) => void;
7
+ export declare const oniOSNotifeeEvent: ({ event, }: {
8
+ event: Event;
9
+ isBackground: boolean;
10
+ }) => void;
11
+ export declare function onPushNotificationiOSStreamVideoEvent(notification: PushNotificationiOSType): void;
7
12
  /** Send token to stream */
8
13
  export declare function initIosNonVoipToken(client: StreamVideoClient, pushConfig: PushConfig, setUnsubscribeListener: (unsubscribe: () => void) => void): Promise<void>;
9
14
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAiBhC,OAAO,EAAE,iBAAiB,EAAa,MAAM,yBAAyB,CAAC;AAGvE,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AA0BzD,eAAO,MAAM,qBAAqB,aACtB,MAAM,GAAG,SAAS,wBACN,MAAM,SAe7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,aACtB,MAAM,GAAG,SAAS,wBACN,MAAM,cAChB,UAAU,kBAWvB,CAAC;AAgBF,eAAO,MAAM,kCAAkC,eAAgB,UAAU,SA+BxE,CAAC;AAEF,2BAA2B;AAC3B,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBAmE1D"}
1
+ {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/ios.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EACL,gBAAgB,EAGhB,uBAAuB,EACxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,iBAAiB,EAAa,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAa,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAIzD,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAkBzD,eAAO,MAAM,0BAA0B,UAAW,gBAAgB,SASjE,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAE3B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;CACvB,SAaA,CAAC;AAEF,wBAAgB,qCAAqC,CACnD,YAAY,EAAE,uBAAuB,QAiBtC;AAED,2BAA2B;AAC3B,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBAiD1D"}
@@ -1,3 +1,5 @@
1
1
  export type ExpoNotificationsLib = typeof import('expo-notifications');
2
+ import type { Notification } from 'expo-notifications';
3
+ export type ExpoNotification = Notification;
2
4
  export declare function getExpoNotificationsLib(): typeof import("expo-notifications");
3
5
  //# sourceMappingURL=expoNotifications.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expoNotifications.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/expoNotifications.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,cAAc,oBAAoB,CAAC,CAAC;AAQvE,wBAAgB,uBAAuB,wCAOtC"}
1
+ {"version":3,"file":"expoNotifications.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/expoNotifications.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,cAAc,oBAAoB,CAAC,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAQ5C,wBAAgB,uBAAuB,wCAOtC"}
@@ -1,5 +1,4 @@
1
1
  export * from './expoNotifications';
2
- export * from './expoTaskManager';
3
2
  export * from './firebaseMessaging';
4
3
  export * from './iosPushNotification';
5
4
  export * from './voipPushNotification';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -1,3 +1,5 @@
1
1
  export type PushNotificationIosLib = typeof import('@react-native-community/push-notification-ios').default;
2
+ import type { PushNotification } from '@react-native-community/push-notification-ios';
3
+ export type PushNotificationiOSType = PushNotification;
2
4
  export declare function getPushNotificationIosLib(): import("@react-native-community/push-notification-ios").PushNotificationIOSStatic;
3
5
  //# sourceMappingURL=iosPushNotification.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"iosPushNotification.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/iosPushNotification.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAChC,cAAc,+CAA+C,EAAE,OAAO,CAAC;AASzE,wBAAgB,yBAAyB,sFAOxC"}
1
+ {"version":3,"file":"iosPushNotification.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/iosPushNotification.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAChC,cAAc,+CAA+C,EAAE,OAAO,CAAC;AAIzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAOvD,wBAAgB,yBAAyB,sFAOxC"}