@ethora/chat-component-rn 26.10.10 → 26.10.11
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.
- package/CHANGELOG.md +16 -0
- package/README.md +125 -0
- package/lib/commonjs/booking/index.js +44 -0
- package/lib/commonjs/booking/index.js.map +1 -0
- package/lib/commonjs/booking/pendingScheduledCall.js +275 -0
- package/lib/commonjs/booking/pendingScheduledCall.js.map +1 -0
- package/lib/commonjs/booking/scheduleForm.js +91 -0
- package/lib/commonjs/booking/scheduleForm.js.map +1 -0
- package/lib/commonjs/booking/scheduledCall.js +141 -0
- package/lib/commonjs/booking/scheduledCall.js.map +1 -0
- package/lib/commonjs/booking/scheduledCallActions.js +128 -0
- package/lib/commonjs/booking/scheduledCallActions.js.map +1 -0
- package/lib/commonjs/booking/scheduledCallLink.js +143 -0
- package/lib/commonjs/booking/scheduledCallLink.js.map +1 -0
- package/lib/commonjs/booking/scheduledCallStore.js +64 -0
- package/lib/commonjs/booking/scheduledCallStore.js.map +1 -0
- package/lib/commonjs/booking/startRoomCall.js +84 -0
- package/lib/commonjs/booking/startRoomCall.js.map +1 -0
- package/lib/commonjs/calls/callBusy.js +18 -0
- package/lib/commonjs/calls/callBusy.js.map +1 -0
- package/lib/commonjs/calls/callDisplay.js +73 -0
- package/lib/commonjs/calls/callDisplay.js.map +1 -0
- package/lib/commonjs/calls/callMode.js +175 -0
- package/lib/commonjs/calls/callMode.js.map +1 -0
- package/lib/commonjs/calls/declineReport.js +20 -0
- package/lib/commonjs/calls/declineReport.js.map +1 -0
- package/lib/commonjs/calls/p2p/P2PCallController.js +724 -0
- package/lib/commonjs/calls/p2p/P2PCallController.js.map +1 -0
- package/lib/commonjs/calls/p2p/icePolicy.js +107 -0
- package/lib/commonjs/calls/p2p/icePolicy.js.map +1 -0
- package/lib/commonjs/calls/p2p/negotiator.js +202 -0
- package/lib/commonjs/calls/p2p/negotiator.js.map +1 -0
- package/lib/commonjs/calls/p2p/p2pRuntime.js +147 -0
- package/lib/commonjs/calls/p2p/p2pRuntime.js.map +1 -0
- package/lib/commonjs/calls/p2p/signalInbox.js +98 -0
- package/lib/commonjs/calls/p2p/signalInbox.js.map +1 -0
- package/lib/commonjs/calls/p2p/signalStanza.js +141 -0
- package/lib/commonjs/calls/p2p/signalStanza.js.map +1 -0
- package/lib/commonjs/calls/p2p/webrtcRuntime.js +53 -0
- package/lib/commonjs/calls/p2p/webrtcRuntime.js.map +1 -0
- package/lib/commonjs/calls/senderTrust.js +43 -0
- package/lib/commonjs/calls/senderTrust.js.map +1 -0
- package/lib/commonjs/calls/startCall.js +51 -0
- package/lib/commonjs/calls/startCall.js.map +1 -0
- package/lib/commonjs/components/Booking/BookingIcons.js +55 -0
- package/lib/commonjs/components/Booking/BookingIcons.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduleCallButton.js +64 -0
- package/lib/commonjs/components/Booking/ScheduleCallButton.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduleCallSheet.js +351 -0
- package/lib/commonjs/components/Booking/ScheduleCallSheet.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduledCallCard.js +203 -0
- package/lib/commonjs/components/Booking/ScheduledCallCard.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduledCallHost.js +23 -0
- package/lib/commonjs/components/Booking/ScheduledCallHost.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduledCallMessage.js +55 -0
- package/lib/commonjs/components/Booking/ScheduledCallMessage.js.map +1 -0
- package/lib/commonjs/components/Booking/ScheduledCallPreJoin.js +235 -0
- package/lib/commonjs/components/Booking/ScheduledCallPreJoin.js.map +1 -0
- package/lib/commonjs/components/Booking/bookingShared.js +305 -0
- package/lib/commonjs/components/Booking/bookingShared.js.map +1 -0
- package/lib/commonjs/components/MainComponents/ChatHeader.js +2 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LanguageSelectorButton.js +5 -2
- package/lib/commonjs/components/MainComponents/LanguageSelectorButton.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js +6 -3
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +13 -0
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js +10 -0
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +19 -15
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +15 -8
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/LanguageCard.js +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/LanguageCard.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/ActiveCallBar.js +3 -2
- package/lib/commonjs/components/VideoCalls/ActiveCallBar.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/CallButtons.js +19 -11
- package/lib/commonjs/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/CallControlBar.js +119 -0
- package/lib/commonjs/components/VideoCalls/CallControlBar.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/CallVideo.js +49 -0
- package/lib/commonjs/components/VideoCalls/CallVideo.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/GroupCallView.js +281 -0
- package/lib/commonjs/components/VideoCalls/GroupCallView.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/P2PCallRunner.js +151 -0
- package/lib/commonjs/components/VideoCalls/P2PCallRunner.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +38 -14
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js +57 -128
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callActions.js +3 -0
- package/lib/commonjs/components/VideoCalls/callActions.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callElapsed.js +38 -0
- package/lib/commonjs/components/VideoCalls/callElapsed.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/callLive.js +15 -0
- package/lib/commonjs/components/VideoCalls/callLive.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/callSessionController.js +81 -24
- package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callSessionTypes.js +41 -0
- package/lib/commonjs/components/VideoCalls/callSessionTypes.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/groupLayout.js +43 -0
- package/lib/commonjs/components/VideoCalls/groupLayout.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/p2pCallSession.js +272 -0
- package/lib/commonjs/components/VideoCalls/p2pCallSession.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/useCallKeep.js +7 -2
- package/lib/commonjs/components/VideoCalls/useCallKeep.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js +2 -1
- package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js.map +1 -1
- package/lib/commonjs/context/xmppProvider.js +2 -1
- package/lib/commonjs/context/xmppProvider.js.map +1 -1
- package/lib/commonjs/helpers/callPush.js +3 -1
- package/lib/commonjs/helpers/callPush.js.map +1 -1
- package/lib/commonjs/helpers/incomingCallFromPush.js +63 -7
- package/lib/commonjs/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/commonjs/helpers/pushPayload.js +5 -0
- package/lib/commonjs/helpers/pushPayload.js.map +1 -1
- package/lib/commonjs/helpers/reportRoom.js +76 -0
- package/lib/commonjs/helpers/reportRoom.js.map +1 -0
- package/lib/commonjs/i18n/strings.js +444 -0
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/main.js +93 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/callState.api.js +75 -0
- package/lib/commonjs/networking/api-requests/callState.api.js.map +1 -0
- package/lib/commonjs/networking/api-requests/push.api.js +29 -6
- package/lib/commonjs/networking/api-requests/push.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +8 -2
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/scheduledCalls.api.js +141 -0
- package/lib/commonjs/networking/api-requests/scheduledCalls.api.js.map +1 -0
- package/lib/commonjs/networking/callTokenStanza.js +210 -50
- package/lib/commonjs/networking/callTokenStanza.js.map +1 -1
- package/lib/commonjs/roomStore/callSlice.js +59 -4
- package/lib/commonjs/roomStore/callSlice.js.map +1 -1
- package/lib/commonjs/services/appBadge.js +80 -0
- package/lib/commonjs/services/appBadge.js.map +1 -0
- package/lib/commonjs/services/languageSettings.js +47 -15
- package/lib/commonjs/services/languageSettings.js.map +1 -1
- package/lib/commonjs/services/pushRegistration.js +21 -5
- package/lib/commonjs/services/pushRegistration.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/booking/index.js +5 -0
- package/lib/module/booking/index.js.map +1 -0
- package/lib/module/booking/pendingScheduledCall.js +261 -0
- package/lib/module/booking/pendingScheduledCall.js.map +1 -0
- package/lib/module/booking/scheduleForm.js +79 -0
- package/lib/module/booking/scheduleForm.js.map +1 -0
- package/lib/module/booking/scheduledCall.js +129 -0
- package/lib/module/booking/scheduledCall.js.map +1 -0
- package/lib/module/booking/scheduledCallActions.js +118 -0
- package/lib/module/booking/scheduledCallActions.js.map +1 -0
- package/lib/module/booking/scheduledCallLink.js +136 -0
- package/lib/module/booking/scheduledCallLink.js.map +1 -0
- package/lib/module/booking/scheduledCallStore.js +60 -0
- package/lib/module/booking/scheduledCallStore.js.map +1 -0
- package/lib/module/booking/startRoomCall.js +80 -0
- package/lib/module/booking/startRoomCall.js.map +1 -0
- package/lib/module/calls/callBusy.js +13 -0
- package/lib/module/calls/callBusy.js.map +1 -0
- package/lib/module/calls/callDisplay.js +65 -0
- package/lib/module/calls/callDisplay.js.map +1 -0
- package/lib/module/calls/callMode.js +168 -0
- package/lib/module/calls/callMode.js.map +1 -0
- package/lib/module/calls/declineReport.js +16 -0
- package/lib/module/calls/declineReport.js.map +1 -0
- package/lib/module/calls/p2p/P2PCallController.js +718 -0
- package/lib/module/calls/p2p/P2PCallController.js.map +1 -0
- package/lib/module/calls/p2p/icePolicy.js +102 -0
- package/lib/module/calls/p2p/icePolicy.js.map +1 -0
- package/lib/module/calls/p2p/negotiator.js +197 -0
- package/lib/module/calls/p2p/negotiator.js.map +1 -0
- package/lib/module/calls/p2p/p2pRuntime.js +137 -0
- package/lib/module/calls/p2p/p2pRuntime.js.map +1 -0
- package/lib/module/calls/p2p/signalInbox.js +93 -0
- package/lib/module/calls/p2p/signalInbox.js.map +1 -0
- package/lib/module/calls/p2p/signalStanza.js +135 -0
- package/lib/module/calls/p2p/signalStanza.js.map +1 -0
- package/lib/module/calls/p2p/webrtcRuntime.js +46 -0
- package/lib/module/calls/p2p/webrtcRuntime.js.map +1 -0
- package/lib/module/calls/senderTrust.js +38 -0
- package/lib/module/calls/senderTrust.js.map +1 -0
- package/lib/module/calls/startCall.js +47 -0
- package/lib/module/calls/startCall.js.map +1 -0
- package/lib/module/components/Booking/BookingIcons.js +48 -0
- package/lib/module/components/Booking/BookingIcons.js.map +1 -0
- package/lib/module/components/Booking/ScheduleCallButton.js +59 -0
- package/lib/module/components/Booking/ScheduleCallButton.js.map +1 -0
- package/lib/module/components/Booking/ScheduleCallSheet.js +345 -0
- package/lib/module/components/Booking/ScheduleCallSheet.js.map +1 -0
- package/lib/module/components/Booking/ScheduledCallCard.js +197 -0
- package/lib/module/components/Booking/ScheduledCallCard.js.map +1 -0
- package/lib/module/components/Booking/ScheduledCallHost.js +18 -0
- package/lib/module/components/Booking/ScheduledCallHost.js.map +1 -0
- package/lib/module/components/Booking/ScheduledCallMessage.js +48 -0
- package/lib/module/components/Booking/ScheduledCallMessage.js.map +1 -0
- package/lib/module/components/Booking/ScheduledCallPreJoin.js +229 -0
- package/lib/module/components/Booking/ScheduledCallPreJoin.js.map +1 -0
- package/lib/module/components/Booking/bookingShared.js +291 -0
- package/lib/module/components/Booking/bookingShared.js.map +1 -0
- package/lib/module/components/MainComponents/ChatHeader.js +2 -1
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/LanguageSelectorButton.js +5 -2
- package/lib/module/components/MainComponents/LanguageSelectorButton.js.map +1 -1
- package/lib/module/components/MainComponents/LanguageSelectorModal.js +7 -4
- package/lib/module/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +13 -0
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/ReduxWrapper.js +10 -0
- package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +21 -15
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +17 -10
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/LanguageCard.js +1 -1
- package/lib/module/components/Modals/UserSettingsModal/LanguageCard.js.map +1 -1
- package/lib/module/components/VideoCalls/ActiveCallBar.js +3 -2
- package/lib/module/components/VideoCalls/ActiveCallBar.js.map +1 -1
- package/lib/module/components/VideoCalls/CallButtons.js +19 -11
- package/lib/module/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/module/components/VideoCalls/CallControlBar.js +113 -0
- package/lib/module/components/VideoCalls/CallControlBar.js.map +1 -0
- package/lib/module/components/VideoCalls/CallVideo.js +43 -0
- package/lib/module/components/VideoCalls/CallVideo.js.map +1 -0
- package/lib/module/components/VideoCalls/GroupCallView.js +275 -0
- package/lib/module/components/VideoCalls/GroupCallView.js.map +1 -0
- package/lib/module/components/VideoCalls/P2PCallRunner.js +147 -0
- package/lib/module/components/VideoCalls/P2PCallRunner.js.map +1 -0
- package/lib/module/components/VideoCalls/VideoCallOverlay.js +38 -14
- package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallSession.js +46 -127
- package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/module/components/VideoCalls/callActions.js +3 -0
- package/lib/module/components/VideoCalls/callActions.js.map +1 -1
- package/lib/module/components/VideoCalls/callElapsed.js +33 -0
- package/lib/module/components/VideoCalls/callElapsed.js.map +1 -0
- package/lib/module/components/VideoCalls/callLive.js +10 -0
- package/lib/module/components/VideoCalls/callLive.js.map +1 -0
- package/lib/module/components/VideoCalls/callSessionController.js +80 -24
- package/lib/module/components/VideoCalls/callSessionController.js.map +1 -1
- package/lib/module/components/VideoCalls/callSessionTypes.js +37 -0
- package/lib/module/components/VideoCalls/callSessionTypes.js.map +1 -0
- package/lib/module/components/VideoCalls/groupLayout.js +36 -0
- package/lib/module/components/VideoCalls/groupLayout.js.map +1 -0
- package/lib/module/components/VideoCalls/p2pCallSession.js +256 -0
- package/lib/module/components/VideoCalls/p2pCallSession.js.map +1 -0
- package/lib/module/components/VideoCalls/useCallKeep.js +8 -2
- package/lib/module/components/VideoCalls/useCallKeep.js.map +1 -1
- package/lib/module/components/VideoCalls/useOngoingCallNotification.js +2 -1
- package/lib/module/components/VideoCalls/useOngoingCallNotification.js.map +1 -1
- package/lib/module/context/xmppProvider.js +2 -1
- package/lib/module/context/xmppProvider.js.map +1 -1
- package/lib/module/helpers/callPush.js +3 -1
- package/lib/module/helpers/callPush.js.map +1 -1
- package/lib/module/helpers/incomingCallFromPush.js +63 -7
- package/lib/module/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/module/helpers/pushPayload.js +5 -0
- package/lib/module/helpers/pushPayload.js.map +1 -1
- package/lib/module/helpers/reportRoom.js +70 -0
- package/lib/module/helpers/reportRoom.js.map +1 -0
- package/lib/module/i18n/strings.js +444 -0
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/main.js +5 -0
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/callState.api.js +66 -0
- package/lib/module/networking/api-requests/callState.api.js.map +1 -0
- package/lib/module/networking/api-requests/push.api.js +29 -6
- package/lib/module/networking/api-requests/push.api.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +8 -2
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/api-requests/scheduledCalls.api.js +130 -0
- package/lib/module/networking/api-requests/scheduledCalls.api.js.map +1 -0
- package/lib/module/networking/callTokenStanza.js +210 -50
- package/lib/module/networking/callTokenStanza.js.map +1 -1
- package/lib/module/roomStore/callSlice.js +57 -3
- package/lib/module/roomStore/callSlice.js.map +1 -1
- package/lib/module/services/appBadge.js +74 -0
- package/lib/module/services/appBadge.js.map +1 -0
- package/lib/module/services/languageSettings.js +44 -13
- package/lib/module/services/languageSettings.js.map +1 -1
- package/lib/module/services/pushRegistration.js +21 -5
- package/lib/module/services/pushRegistration.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/booking/index.d.ts +3 -0
- package/lib/typescript/booking/index.d.ts.map +1 -0
- package/lib/typescript/booking/pendingScheduledCall.d.ts +80 -0
- package/lib/typescript/booking/pendingScheduledCall.d.ts.map +1 -0
- package/lib/typescript/booking/scheduleForm.d.ts +28 -0
- package/lib/typescript/booking/scheduleForm.d.ts.map +1 -0
- package/lib/typescript/booking/scheduledCall.d.ts +52 -0
- package/lib/typescript/booking/scheduledCall.d.ts.map +1 -0
- package/lib/typescript/booking/scheduledCallActions.d.ts +22 -0
- package/lib/typescript/booking/scheduledCallActions.d.ts.map +1 -0
- package/lib/typescript/booking/scheduledCallLink.d.ts +37 -0
- package/lib/typescript/booking/scheduledCallLink.d.ts.map +1 -0
- package/lib/typescript/booking/scheduledCallStore.d.ts +47 -0
- package/lib/typescript/booking/scheduledCallStore.d.ts.map +1 -0
- package/lib/typescript/booking/startRoomCall.d.ts +12 -0
- package/lib/typescript/booking/startRoomCall.d.ts.map +1 -0
- package/lib/typescript/calls/callBusy.d.ts +9 -0
- package/lib/typescript/calls/callBusy.d.ts.map +1 -0
- package/lib/typescript/calls/callDisplay.d.ts +23 -0
- package/lib/typescript/calls/callDisplay.d.ts.map +1 -0
- package/lib/typescript/calls/callMode.d.ts +106 -0
- package/lib/typescript/calls/callMode.d.ts.map +1 -0
- package/lib/typescript/calls/declineReport.d.ts +11 -0
- package/lib/typescript/calls/declineReport.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/P2PCallController.d.ts +150 -0
- package/lib/typescript/calls/p2p/P2PCallController.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/icePolicy.d.ts +37 -0
- package/lib/typescript/calls/p2p/icePolicy.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/negotiator.d.ts +57 -0
- package/lib/typescript/calls/p2p/negotiator.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/p2pRuntime.d.ts +41 -0
- package/lib/typescript/calls/p2p/p2pRuntime.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/signalInbox.d.ts +35 -0
- package/lib/typescript/calls/p2p/signalInbox.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/signalStanza.d.ts +52 -0
- package/lib/typescript/calls/p2p/signalStanza.d.ts.map +1 -0
- package/lib/typescript/calls/p2p/webrtcRuntime.d.ts +32 -0
- package/lib/typescript/calls/p2p/webrtcRuntime.d.ts.map +1 -0
- package/lib/typescript/calls/senderTrust.d.ts +8 -0
- package/lib/typescript/calls/senderTrust.d.ts.map +1 -0
- package/lib/typescript/calls/startCall.d.ts +17 -0
- package/lib/typescript/calls/startCall.d.ts.map +1 -0
- package/lib/typescript/components/Booking/BookingIcons.d.ts +9 -0
- package/lib/typescript/components/Booking/BookingIcons.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduleCallButton.d.ts +11 -0
- package/lib/typescript/components/Booking/ScheduleCallButton.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduleCallSheet.d.ts +4 -0
- package/lib/typescript/components/Booking/ScheduleCallSheet.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduledCallCard.d.ts +14 -0
- package/lib/typescript/components/Booking/ScheduledCallCard.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduledCallHost.d.ts +10 -0
- package/lib/typescript/components/Booking/ScheduledCallHost.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduledCallMessage.d.ts +20 -0
- package/lib/typescript/components/Booking/ScheduledCallMessage.d.ts.map +1 -0
- package/lib/typescript/components/Booking/ScheduledCallPreJoin.d.ts +8 -0
- package/lib/typescript/components/Booking/ScheduledCallPreJoin.d.ts.map +1 -0
- package/lib/typescript/components/Booking/bookingShared.d.ts +199 -0
- package/lib/typescript/components/Booking/bookingShared.d.ts.map +1 -0
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/LanguageSelectorButton.d.ts +3 -1
- package/lib/typescript/components/MainComponents/LanguageSelectorButton.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/LanguageSelectorModal.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserSettingsModal/LanguageCard.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/CallButtons.d.ts +2 -1
- package/lib/typescript/components/VideoCalls/CallButtons.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/CallControlBar.d.ts +17 -0
- package/lib/typescript/components/VideoCalls/CallControlBar.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/CallVideo.d.ts +23 -0
- package/lib/typescript/components/VideoCalls/CallVideo.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/GroupCallView.d.ts +22 -0
- package/lib/typescript/components/VideoCalls/GroupCallView.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/P2PCallRunner.d.ts +2 -0
- package/lib/typescript/components/VideoCalls/P2PCallRunner.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts +10 -12
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callActions.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callElapsed.d.ts +8 -0
- package/lib/typescript/components/VideoCalls/callElapsed.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/callLive.d.ts +9 -0
- package/lib/typescript/components/VideoCalls/callLive.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts +10 -31
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callSessionTypes.d.ts +60 -0
- package/lib/typescript/components/VideoCalls/callSessionTypes.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/groupLayout.d.ts +23 -0
- package/lib/typescript/components/VideoCalls/groupLayout.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/p2pCallSession.d.ts +31 -0
- package/lib/typescript/components/VideoCalls/p2pCallSession.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/useCallKeep.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/useOngoingCallNotification.d.ts.map +1 -1
- package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
- package/lib/typescript/helpers/callPush.d.ts +11 -1
- package/lib/typescript/helpers/callPush.d.ts.map +1 -1
- package/lib/typescript/helpers/incomingCallFromPush.d.ts.map +1 -1
- package/lib/typescript/helpers/pushPayload.d.ts +1 -1
- package/lib/typescript/helpers/pushPayload.d.ts.map +1 -1
- package/lib/typescript/helpers/reportRoom.d.ts +19 -0
- package/lib/typescript/helpers/reportRoom.d.ts.map +1 -0
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +6 -1
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/callState.api.d.ts +25 -0
- package/lib/typescript/networking/api-requests/callState.api.d.ts.map +1 -0
- package/lib/typescript/networking/api-requests/push.api.d.ts +9 -2
- package/lib/typescript/networking/api-requests/push.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +2 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/scheduledCalls.api.d.ts +86 -0
- package/lib/typescript/networking/api-requests/scheduledCalls.api.d.ts.map +1 -0
- package/lib/typescript/networking/callTokenStanza.d.ts.map +1 -1
- package/lib/typescript/roomStore/callSlice.d.ts +23 -1
- package/lib/typescript/roomStore/callSlice.d.ts.map +1 -1
- package/lib/typescript/services/appBadge.d.ts +3 -0
- package/lib/typescript/services/appBadge.d.ts.map +1 -0
- package/lib/typescript/services/languageSettings.d.ts +7 -0
- package/lib/typescript/services/languageSettings.d.ts.map +1 -1
- package/lib/typescript/services/pushRegistration.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +67 -4
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/booking/index.ts +10 -0
- package/src/booking/pendingScheduledCall.ts +272 -0
- package/src/booking/scheduleForm.ts +84 -0
- package/src/booking/scheduledCall.ts +163 -0
- package/src/booking/scheduledCallActions.ts +141 -0
- package/src/booking/scheduledCallLink.ts +145 -0
- package/src/booking/scheduledCallStore.ts +69 -0
- package/src/booking/startRoomCall.ts +103 -0
- package/src/calls/callBusy.ts +10 -0
- package/src/calls/callDisplay.ts +74 -0
- package/src/calls/callMode.ts +286 -0
- package/src/calls/declineReport.ts +16 -0
- package/src/calls/p2p/P2PCallController.ts +813 -0
- package/src/calls/p2p/icePolicy.ts +99 -0
- package/src/calls/p2p/negotiator.ts +186 -0
- package/src/calls/p2p/p2pRuntime.ts +164 -0
- package/src/calls/p2p/signalInbox.ts +117 -0
- package/src/calls/p2p/signalStanza.ts +205 -0
- package/src/calls/p2p/webrtcRuntime.ts +60 -0
- package/src/calls/senderTrust.ts +40 -0
- package/src/calls/startCall.ts +56 -0
- package/src/components/Booking/BookingIcons.tsx +44 -0
- package/src/components/Booking/ScheduleCallButton.tsx +66 -0
- package/src/components/Booking/ScheduleCallSheet.tsx +380 -0
- package/src/components/Booking/ScheduledCallCard.tsx +216 -0
- package/src/components/Booking/ScheduledCallHost.tsx +18 -0
- package/src/components/Booking/ScheduledCallMessage.tsx +62 -0
- package/src/components/Booking/ScheduledCallPreJoin.tsx +230 -0
- package/src/components/Booking/bookingShared.tsx +295 -0
- package/src/components/MainComponents/ChatHeader.tsx +2 -0
- package/src/components/MainComponents/LanguageSelectorButton.tsx +9 -2
- package/src/components/MainComponents/LanguageSelectorModal.tsx +10 -6
- package/src/components/MainComponents/MessageContainer.tsx +15 -0
- package/src/components/MainComponents/ReduxWrapper.tsx +10 -0
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +22 -22
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +28 -9
- package/src/components/Modals/UserSettingsModal/LanguageCard.tsx +9 -7
- package/src/components/VideoCalls/ActiveCallBar.tsx +6 -5
- package/src/components/VideoCalls/CallButtons.tsx +23 -12
- package/src/components/VideoCalls/CallControlBar.tsx +131 -0
- package/src/components/VideoCalls/CallVideo.tsx +59 -0
- package/src/components/VideoCalls/GroupCallView.tsx +324 -0
- package/src/components/VideoCalls/P2PCallRunner.tsx +192 -0
- package/src/components/VideoCalls/VideoCallOverlay.tsx +62 -17
- package/src/components/VideoCalls/VideoCallSession.tsx +55 -133
- package/src/components/VideoCalls/callActions.ts +3 -0
- package/src/components/VideoCalls/callElapsed.ts +27 -0
- package/src/components/VideoCalls/callLive.ts +13 -0
- package/src/components/VideoCalls/callSessionController.ts +130 -55
- package/src/components/VideoCalls/callSessionTypes.ts +80 -0
- package/src/components/VideoCalls/groupLayout.ts +48 -0
- package/src/components/VideoCalls/p2pCallSession.ts +291 -0
- package/src/components/VideoCalls/useCallKeep.ts +9 -2
- package/src/components/VideoCalls/useOngoingCallNotification.ts +2 -2
- package/src/context/xmppProvider.tsx +3 -0
- package/src/helpers/callPush.ts +13 -1
- package/src/helpers/incomingCallFromPush.ts +65 -7
- package/src/helpers/pushPayload.ts +9 -1
- package/src/helpers/reportRoom.ts +93 -0
- package/src/i18n/strings.ts +444 -0
- package/src/main.ts +33 -0
- package/src/networking/api-requests/callState.api.ts +83 -0
- package/src/networking/api-requests/push.api.ts +28 -3
- package/src/networking/api-requests/rooms.api.ts +12 -3
- package/src/networking/api-requests/scheduledCalls.api.ts +232 -0
- package/src/networking/callTokenStanza.ts +247 -50
- package/src/roomStore/callSlice.ts +86 -2
- package/src/services/appBadge.ts +85 -0
- package/src/services/languageSettings.ts +43 -8
- package/src/services/pushRegistration.ts +34 -3
- package/src/types/types.ts +70 -4
- package/src/version.ts +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opening a scheduled call from a link or a reminder push.
|
|
3
|
+
*
|
|
4
|
+
* A link can arrive while the app is still starting: before the user is
|
|
5
|
+
* signed in, or before `<Chat>` has configured the store and connected. The
|
|
6
|
+
* slug is then held (in memory, and in AsyncStorage so a cold start that
|
|
7
|
+
* is interrupted by the sign-in screen keeps it) and opened once both are
|
|
8
|
+
* true. Opening = resolve the slug through the API, open its room, show the
|
|
9
|
+
* pre-join sheet. No media starts before the user taps Join.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PENDING_SCHEDULED_CALL_KEY = "ethora_pending_scheduled_call";
|
|
12
|
+
/** A link older than this is dropped instead of ambushing the user later. */
|
|
13
|
+
export declare const PENDING_SCHEDULED_CALL_TTL_MS: number;
|
|
14
|
+
export interface PendingStorage {
|
|
15
|
+
read(): Promise<{
|
|
16
|
+
slug: string;
|
|
17
|
+
at: number;
|
|
18
|
+
} | null>;
|
|
19
|
+
write(value: {
|
|
20
|
+
slug: string;
|
|
21
|
+
at: number;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
clear(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export declare const asyncPendingStorage: PendingStorage;
|
|
26
|
+
export interface PendingQueueDeps {
|
|
27
|
+
/** Signed in AND the chat is configured and connected. */
|
|
28
|
+
isReady: () => boolean;
|
|
29
|
+
/** Opens the call; called once per held link, when ready. */
|
|
30
|
+
open: (slug: string) => void;
|
|
31
|
+
storage: PendingStorage;
|
|
32
|
+
now?: () => number;
|
|
33
|
+
ttlMs?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The hold-until-ready logic, free of the store so it can be tested. One
|
|
37
|
+
* slot: a newer link replaces an older one (the user tapped it last).
|
|
38
|
+
*/
|
|
39
|
+
export declare const createPendingScheduledCallQueue: (deps: PendingQueueDeps) => {
|
|
40
|
+
/** A link arrived: open it now, or hold it. Returns what happened. */
|
|
41
|
+
submit(slug: string): "opened" | "held";
|
|
42
|
+
/** Something that can make us ready changed. */
|
|
43
|
+
poke(): boolean;
|
|
44
|
+
/** Pick up a link persisted by an earlier run of the app. */
|
|
45
|
+
restore(): Promise<void>;
|
|
46
|
+
peek: () => {
|
|
47
|
+
slug: string;
|
|
48
|
+
at: number;
|
|
49
|
+
} | null;
|
|
50
|
+
reset(): void;
|
|
51
|
+
};
|
|
52
|
+
export declare const isScheduledCallReady: () => boolean;
|
|
53
|
+
/** Resolve the slug, open its room, show the pre-join sheet. */
|
|
54
|
+
export declare const resolveAndOpenScheduledCall: (slug: string) => Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Watches the store so a held link opens the moment sign-in and the chat
|
|
57
|
+
* are both there. Idempotent; `<Chat>` arms it on import and
|
|
58
|
+
* `openScheduledCall` arms it too, so a link that beats `<Chat>` is not lost.
|
|
59
|
+
*/
|
|
60
|
+
export declare const installScheduledCallHook: () => void;
|
|
61
|
+
/**
|
|
62
|
+
* Open a scheduled call by slug: now when the user is signed in and the
|
|
63
|
+
* chat is up, otherwise as soon as both are true. Returns `'opening'` when
|
|
64
|
+
* it started right away and `'pending'` when it is held.
|
|
65
|
+
*/
|
|
66
|
+
export declare const openScheduledCall: (slug: string) => "opening" | "pending";
|
|
67
|
+
/**
|
|
68
|
+
* Hand any URL to the SDK: a scheduled-call link is opened (or held) and
|
|
69
|
+
* `true` is returned; anything else returns `false` untouched.
|
|
70
|
+
*/
|
|
71
|
+
export declare const handleScheduledCallUrl: (url: string | null | undefined) => boolean;
|
|
72
|
+
/** The reminder push the backend sends 10 minutes before a call. */
|
|
73
|
+
export declare const SCHEDULED_CALL_REMINDER_PUSH_TYPE = "scheduledCallReminder";
|
|
74
|
+
export declare const isScheduledCallReminderPush: (data: Record<string, unknown> | null | undefined) => boolean;
|
|
75
|
+
/** Slug of a reminder push: `slug`, else parsed out of `joinUrl`. */
|
|
76
|
+
export declare const scheduledCallSlugFromPush: (data: Record<string, unknown> | null | undefined) => string | null;
|
|
77
|
+
/** A tap on the reminder push opens the same flow as the join link. */
|
|
78
|
+
export declare const handleScheduledCallPush: (data: Record<string, unknown> | null | undefined) => boolean;
|
|
79
|
+
export declare const __resetPendingScheduledCallForTests: () => void;
|
|
80
|
+
//# sourceMappingURL=pendingScheduledCall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pendingScheduledCall.d.ts","sourceRoot":"","sources":["../../../src/booking/pendingScheduledCall.ts"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AAEH,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,6EAA6E;AAC7E,eAAO,MAAM,6BAA6B,QAAiB,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACrD,KAAK,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,EAAE,cA2BjC,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,6DAA6D;IAC7D,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,+BAA+B,GAAI,MAAM,gBAAgB;IAyBlE,sEAAsE;iBACzD,MAAM,GAAG,QAAQ,GAAG,MAAM;IAMvC,gDAAgD;YACxC,OAAO;IAGf,6DAA6D;eAC5C,OAAO,CAAC,IAAI,CAAC;;cAlCd,MAAM;YAAM,MAAM;;;CAoDrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAO,OAOvC,CAAC;AAeF,gEAAgE;AAChE,eAAO,MAAM,2BAA2B,GACtC,MAAM,MAAM,KACX,OAAO,CAAC,IAAI,CAoCd,CAAC;AAYF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAAO,IAM3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,SAAS,GAAG,SAG5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,OAKvE,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,iCAAiC,0BAA0B,CAAC;AAEzE,eAAO,MAAM,2BAA2B,GACtC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KAC/C,OAAyE,CAAC;AAE7E,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,GACpC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KAC/C,MAAM,GAAG,IAKX,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,GAClC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KAC/C,OAKF,CAAC;AAEF,eAAO,MAAM,mCAAmC,QAAO,IAItD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers behind the schedule / edit sheet: the default start, the
|
|
3
|
+
* stepper arithmetic and the validation the server repeats.
|
|
4
|
+
*/
|
|
5
|
+
export declare const MIN_DURATION_MINUTES = 5;
|
|
6
|
+
export declare const MAX_DURATION_MINUTES = 480;
|
|
7
|
+
export declare const DEFAULT_DURATION_MINUTES = 30;
|
|
8
|
+
export declare const DURATION_CHOICES: number[];
|
|
9
|
+
export declare const TIME_STEP_MINUTES = 15;
|
|
10
|
+
export declare const TITLE_MAX = 200;
|
|
11
|
+
export declare const NOTES_MAX = 2000;
|
|
12
|
+
/** The server accepts a start this far in the past (clock skew). */
|
|
13
|
+
export declare const CLOCK_SKEW_MS: number;
|
|
14
|
+
/** The next quarter hour that is at least 15 minutes away. */
|
|
15
|
+
export declare const defaultStartMs: (now: number) => number;
|
|
16
|
+
/** Move by whole local days (DST safe: done on the calendar, not by 24 h). */
|
|
17
|
+
export declare const shiftDays: (ms: number, days: number) => number;
|
|
18
|
+
export declare const shiftMinutes: (ms: number, minutes: number) => number;
|
|
19
|
+
export declare const clampDuration: (minutes: number) => number;
|
|
20
|
+
export type ScheduleFormError = 'pastTime' | null;
|
|
21
|
+
/** Only the rules the client can check; the server stays the authority. */
|
|
22
|
+
export declare const validateStart: (startMs: number, now: number, options?: {
|
|
23
|
+
allowPast?: boolean;
|
|
24
|
+
}) => ScheduleFormError;
|
|
25
|
+
export declare const deviceTimezone: () => string | undefined;
|
|
26
|
+
export declare const formatDay: (ms: number, locale?: string) => string;
|
|
27
|
+
export declare const formatClock: (ms: number, locale?: string) => string;
|
|
28
|
+
//# sourceMappingURL=scheduleForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduleForm.d.ts","sourceRoot":"","sources":["../../../src/booking/scheduleForm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,gBAAgB,UAA4B,CAAC;AAC1D,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B,oEAAoE;AACpE,eAAO,MAAM,aAAa,QAAgB,CAAC;AAI3C,8DAA8D;AAC9D,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MAI5C,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,EAAE,MAAM,MAAM,KAAG,MAIpD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,EAAE,SAAS,MAAM,KAAG,MACpC,CAAC;AAExB,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,KAAG,MAI/C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,IAAI,CAAC;AAElD,2EAA2E;AAC3E,eAAO,MAAM,aAAa,GACxB,SAAS,MAAM,EACf,KAAK,MAAM,EACX,UAAU;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,KAChC,iBAIF,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,MAAM,GAAG,SAM1C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,EAAE,SAAS,MAAM,KAAG,MAWvD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,IAAI,MAAM,EAAE,SAAS,MAAM,KAAG,MASzD,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { IMessage } from '../types/types';
|
|
2
|
+
/**
|
|
3
|
+
* Scheduled-call invite cards: what a `<data type="scheduledCall">` message
|
|
4
|
+
* says, and the pure rules for which message owns a card and what state the
|
|
5
|
+
* card is in. No React, no store: everything here is unit-testable.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SCHEDULED_CALL_MESSAGE_TYPE = "scheduledCall";
|
|
8
|
+
/** Join opens this long before the start (contract: 15 minutes). */
|
|
9
|
+
export declare const JOIN_WINDOW_BEFORE_MS: number;
|
|
10
|
+
export type ScheduledCallMessageStatus = 'scheduled' | 'updated' | 'cancelled';
|
|
11
|
+
/** upcoming -> joinable (15 min before start until the end) -> ended; or cancelled. */
|
|
12
|
+
export type ScheduledCallCardState = 'upcoming' | 'joinable' | 'ended' | 'cancelled';
|
|
13
|
+
export interface ScheduledCallCardData {
|
|
14
|
+
slug: string;
|
|
15
|
+
title: string;
|
|
16
|
+
/** ISO UTC. */
|
|
17
|
+
startAt: string;
|
|
18
|
+
startMs: number;
|
|
19
|
+
durationMinutes: number;
|
|
20
|
+
kind: 'video' | 'audio';
|
|
21
|
+
status: ScheduledCallMessageStatus;
|
|
22
|
+
joinUrl: string;
|
|
23
|
+
icsUrl: string;
|
|
24
|
+
googleUrl: string;
|
|
25
|
+
outlookUrl: string;
|
|
26
|
+
/** Creator's user id (`scheduledCallCreatedBy`); '' on an invite that predates it. */
|
|
27
|
+
createdBy: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const isScheduledCallMessage: (message: unknown) => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The card data a message carries, or null when it is not a usable invite
|
|
32
|
+
* (no slug, or a start time that is not a date). Defaults follow the
|
|
33
|
+
* contract: 30 minutes, video, status `scheduled`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const parseScheduledCallMessage: (message: unknown) => ScheduledCallCardData | null;
|
|
36
|
+
export declare const latestScheduledCallMessages: (messages: ReadonlyArray<IMessage> | undefined | null) => Map<string, IMessage>;
|
|
37
|
+
/** The message that owns this slug's card, or undefined for no invite at all. */
|
|
38
|
+
export declare const latestScheduledCallMessage: (messages: ReadonlyArray<IMessage> | undefined | null, slug: string) => IMessage | undefined;
|
|
39
|
+
export declare const scheduledCallEndMs: (card: Pick<ScheduledCallCardData, "startMs" | "durationMinutes">) => number;
|
|
40
|
+
/** Where a card stands at `now` (epoch ms). */
|
|
41
|
+
export declare const getScheduledCallCardState: (card: Pick<ScheduledCallCardData, "startMs" | "durationMinutes" | "status">, now: number) => ScheduledCallCardState;
|
|
42
|
+
/**
|
|
43
|
+
* The next instant the card's state changes (join window opens, call ends),
|
|
44
|
+
* or null when it will not change on its own (cancelled / ended). Lets the
|
|
45
|
+
* card sleep until then instead of polling.
|
|
46
|
+
*/
|
|
47
|
+
export declare const nextScheduledCallTransition: (card: Pick<ScheduledCallCardData, "startMs" | "durationMinutes" | "status">, now: number) => number | null;
|
|
48
|
+
/** Longest a single setTimeout may sleep (the platform clamps at 2^31-1 ms). */
|
|
49
|
+
export declare const MAX_TIMER_MS = 2000000000;
|
|
50
|
+
/** The room's bare name, as the call and booking endpoints take it. */
|
|
51
|
+
export declare const chatNameOfRoom: (roomJidOrName: string) => string;
|
|
52
|
+
//# sourceMappingURL=scheduledCall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduledCall.d.ts","sourceRoot":"","sources":["../../../src/booking/scheduledCall.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;GAIG;AAEH,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAE3D,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,QAAiB,CAAC;AAEpD,MAAM,MAAM,0BAA0B,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,CAAC;AAE/E,uFAAuF;AACvF,MAAM,MAAM,sBAAsB,GAC9B,UAAU,GACV,UAAU,GACV,OAAO,GACP,WAAW,CAAC;AAEhB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,eAAe;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,MAAM,EAAE,0BAA0B,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,SAAS,EAAE,MAAM,CAAC;CACnB;AAKD,eAAO,MAAM,sBAAsB,GAAI,SAAS,OAAO,KAAG,OAEb,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,SAAS,OAAO,KACf,qBAAqB,GAAG,IA4B1B,CAAC;AASF,eAAO,MAAM,2BAA2B,GACtC,UAAU,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS,GAAG,IAAI,KACnD,GAAG,CAAC,MAAM,EAAE,QAAQ,CAoBtB,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,GACrC,UAAU,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS,GAAG,IAAI,EACpD,MAAM,MAAM,KACX,QAAQ,GAAG,SAA4D,CAAC;AAE3E,eAAO,MAAM,kBAAkB,GAC7B,MAAM,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,iBAAiB,CAAC,KAC/D,MAAyD,CAAC;AAE7D,+CAA+C;AAC/C,eAAO,MAAM,yBAAyB,GACpC,MAAM,IAAI,CACR,qBAAqB,EACrB,SAAS,GAAG,iBAAiB,GAAG,QAAQ,CACzC,EACD,KAAK,MAAM,KACV,sBAKF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,MAAM,IAAI,CACR,qBAAqB,EACrB,SAAS,GAAG,iBAAiB,GAAG,QAAQ,CACzC,EACD,KAAK,MAAM,KACV,MAAM,GAAG,IAKX,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,YAAY,aAAgB,CAAC;AAE1C,uEAAuE;AACvE,eAAO,MAAM,cAAc,GAAI,eAAe,MAAM,KAAG,MACZ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ScheduledCallDetail } from '../networking/api-requests/scheduledCalls.api';
|
|
2
|
+
export declare const notifyScheduledCall: (type: "success" | "error", message: string) => void;
|
|
3
|
+
/** A link the backend gave us, opened as is. Only web links are opened. */
|
|
4
|
+
export declare const openBackendLink: (url: string | undefined) => Promise<void>;
|
|
5
|
+
/** The user tapped Join: the room's ordinary call start / join. */
|
|
6
|
+
export declare const joinScheduledCall: (roomJidOrName: string, kind: "audio" | "video") => Promise<boolean>;
|
|
7
|
+
/** Ask, then cancel. Resolves true when the call was cancelled. */
|
|
8
|
+
export declare const confirmAndCancelScheduledCall: (slug: string) => Promise<boolean>;
|
|
9
|
+
export declare const getScheduledCallDetailCached: (slug: string, version: string) => Promise<ScheduledCallDetail>;
|
|
10
|
+
export declare const invalidateScheduledCallDetail: (slug: string) => void;
|
|
11
|
+
export declare const __resetScheduledCallDetailCacheForTests: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* May this user edit or cancel the call? The server decides for real
|
|
14
|
+
* (creator or room owner); this only decides whether to show the buttons.
|
|
15
|
+
*/
|
|
16
|
+
export declare const canManageScheduledCall: (params: {
|
|
17
|
+
createdBy?: string;
|
|
18
|
+
userId?: string;
|
|
19
|
+
roomRole?: string;
|
|
20
|
+
}) => boolean;
|
|
21
|
+
export declare const currentUserId: () => string;
|
|
22
|
+
//# sourceMappingURL=scheduledCallActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduledCallActions.d.ts","sourceRoot":"","sources":["../../../src/booking/scheduledCallActions.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,+CAA+C,CAAC;AAmBvD,eAAO,MAAM,mBAAmB,SARX,SAAS,GAAG,OAAO,WAAW,MAAM,SAQjB,CAAC;AAEzC,2EAA2E;AAC3E,eAAO,MAAM,eAAe,GAAU,KAAK,MAAM,GAAG,SAAS,KAAG,OAAO,CAAC,IAAI,CAU3E,CAAC;AASF,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,GAC5B,eAAe,MAAM,EACrB,MAAM,OAAO,GAAG,OAAO,KACtB,OAAO,CAAC,OAAO,CAQjB,CAAC;AAuBF,mEAAmE;AACnE,eAAO,MAAM,6BAA6B,GACxC,MAAM,MAAM,KACX,OAAO,CAAC,OAAO,CAWjB,CAAC;AAMF,eAAO,MAAM,4BAA4B,GACvC,MAAM,MAAM,EACZ,SAAS,MAAM,KACd,OAAO,CAAC,mBAAmB,CAS7B,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,MAAM,MAAM,KAAG,IAI5D,CAAC;AAEF,eAAO,MAAM,uCAAuC,QAAO,IAAuB,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KAAG,OAIH,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,MACkB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep links for scheduled calls.
|
|
3
|
+
*
|
|
4
|
+
* https://<host>/call/<slug> universal / app link, <host> must be a known host
|
|
5
|
+
* <scheme>://call/<slug> the app's own URL scheme
|
|
6
|
+
*
|
|
7
|
+
* The slug is the secret in the link; this only extracts it. Whether the
|
|
8
|
+
* signed-in user may see the call is the server's answer to
|
|
9
|
+
* `GET /v1/chats/calls/scheduled/:slug`.
|
|
10
|
+
*
|
|
11
|
+
* Known hosts and schemes come from `config.scheduledCalls` and from
|
|
12
|
+
* `configureScheduledCallLinks()`, which a host calls at startup so a link
|
|
13
|
+
* that opens the app before `<Chat>` is mounted can already be recognised.
|
|
14
|
+
*/
|
|
15
|
+
/** The hosted web app: always accepted. */
|
|
16
|
+
export declare const DEFAULT_SCHEDULED_CALL_HOSTS: string[];
|
|
17
|
+
export interface ScheduledCallLinkOptions {
|
|
18
|
+
/** Hosts whose `https://<host>/call/<slug>` links open the app. */
|
|
19
|
+
hosts?: string[];
|
|
20
|
+
/** Custom URL schemes, without `://` (e.g. `ethorachat`). */
|
|
21
|
+
schemes?: string[];
|
|
22
|
+
}
|
|
23
|
+
/** Replaces the host list and schemes set by a previous call. */
|
|
24
|
+
export declare const configureScheduledCallLinks: (options: ScheduledCallLinkOptions) => void;
|
|
25
|
+
export declare const __resetScheduledCallLinksForTests: () => void;
|
|
26
|
+
/** Every host and scheme in force right now. */
|
|
27
|
+
export declare const getScheduledCallLinkTargets: () => Required<ScheduledCallLinkOptions>;
|
|
28
|
+
/**
|
|
29
|
+
* The slug of a scheduled-call link, or null when the URL is anything else.
|
|
30
|
+
*
|
|
31
|
+
* `https://app.chat.ethora.com/call/<slug>` (and any other configured host)
|
|
32
|
+
* and `<scheme>://call/<slug>` qualify. With no scheme configured any custom
|
|
33
|
+
* scheme is accepted (only `http(s)` and a few script-like ones never are);
|
|
34
|
+
* once schemes are configured only those are.
|
|
35
|
+
*/
|
|
36
|
+
export declare const parseScheduledCallLink: (url: string | null | undefined, options?: ScheduledCallLinkOptions) => string | null;
|
|
37
|
+
//# sourceMappingURL=scheduledCallLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduledCallLink.d.ts","sourceRoot":"","sources":["../../../src/booking/scheduledCallLink.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,2CAA2C;AAC3C,eAAO,MAAM,4BAA4B,UAA0B,CAAC;AAEpE,MAAM,WAAW,wBAAwB;IACvC,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAmBD,iEAAiE;AACjE,eAAO,MAAM,2BAA2B,GACtC,SAAS,wBAAwB,KAChC,IAKF,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAAO,IAEpD,CAAC;AAUF,gDAAgD;AAChD,eAAO,MAAM,2BAA2B,QAAO,QAAQ,CAAC,wBAAwB,CAc/E,CAAC;AAqBF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,UAAU,wBAAwB,KACjC,MAAM,GAAG,IA+BX,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ScheduledCallDetail } from '../networking/api-requests/scheduledCalls.api';
|
|
2
|
+
/**
|
|
3
|
+
* UI state of the scheduled-call flow: the pre-join sheet (a call opened from
|
|
4
|
+
* a card or a link) and the editor (schedule a new call / edit one). Kept
|
|
5
|
+
* outside redux because it is transient and has no business in persistence,
|
|
6
|
+
* the same way the call overlay's own UI state is (VideoCalls/callUiStore).
|
|
7
|
+
*/
|
|
8
|
+
export type PreJoinErrorReason = 'not-a-member' | 'not-found' | 'cancelled' | 'network';
|
|
9
|
+
export type PreJoinState = {
|
|
10
|
+
phase: 'loading';
|
|
11
|
+
slug: string;
|
|
12
|
+
} | {
|
|
13
|
+
phase: 'ready';
|
|
14
|
+
slug: string;
|
|
15
|
+
detail: ScheduledCallDetail;
|
|
16
|
+
} | {
|
|
17
|
+
phase: 'error';
|
|
18
|
+
slug: string;
|
|
19
|
+
reason: PreJoinErrorReason;
|
|
20
|
+
/** The call's title when the server told us (cancelled). */
|
|
21
|
+
title?: string;
|
|
22
|
+
};
|
|
23
|
+
export type EditorState = {
|
|
24
|
+
mode: 'create';
|
|
25
|
+
roomJid: string;
|
|
26
|
+
} | {
|
|
27
|
+
mode: 'edit';
|
|
28
|
+
roomJid: string;
|
|
29
|
+
detail: ScheduledCallDetail;
|
|
30
|
+
};
|
|
31
|
+
interface ScheduledCallUiState {
|
|
32
|
+
preJoin: PreJoinState | null;
|
|
33
|
+
editor: EditorState | null;
|
|
34
|
+
}
|
|
35
|
+
export declare const scheduledCallUi: {
|
|
36
|
+
getState: () => ScheduledCallUiState;
|
|
37
|
+
subscribe: (listener: () => void) => (() => void);
|
|
38
|
+
showPreJoin: (preJoin: PreJoinState) => void;
|
|
39
|
+
closePreJoin: () => void;
|
|
40
|
+
openCreate: (roomJid: string) => void;
|
|
41
|
+
openEdit: (roomJid: string, detail: ScheduledCallDetail) => void;
|
|
42
|
+
closeEditor: () => void;
|
|
43
|
+
reset: () => void;
|
|
44
|
+
};
|
|
45
|
+
export declare const useScheduledCallUi: () => ScheduledCallUiState;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=scheduledCallStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduledCallStore.d.ts","sourceRoot":"","sources":["../../../src/booking/scheduledCallStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,+CAA+C,CAAC;AAEvD;;;;;GAKG;AAEH,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,WAAW,GACX,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,MAAM,YAAY,GACpB;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAA;CAAE,GAC7D;IACE,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,kBAAkB,CAAC;IAC3B,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAEnE,UAAU,oBAAoB;IAC5B,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;CAC5B;AAUD,eAAO,MAAM,eAAe;oBACZ,oBAAoB;0BACZ,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC;2BAMxB,YAAY;;0BAEb,MAAM;wBACR,MAAM,UAAU,mBAAmB;;;CAIxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAAO,oBAKnC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Joining a scheduled call is the ordinary call start for that room, taken
|
|
3
|
+
* on a user tap: a private room starts (or answers) its call, a group or
|
|
4
|
+
* public room starts or joins the room call. This file is the ONE place the
|
|
5
|
+
* booking flow reaches into the call path, so when the call transport
|
|
6
|
+
* changes only this function follows (it mirrors CallButtons.placeCall and
|
|
7
|
+
* hands the request to the shared requestOutgoingCall, so a private room
|
|
8
|
+
* gets the p2p call and a group room the LiveKit one, as the server decides).
|
|
9
|
+
*/
|
|
10
|
+
export type StartRoomCallOutcome = 'started' | 'answered' | 'busy' | 'disabled' | 'no-room' | 'failed';
|
|
11
|
+
export declare const startRoomCall: (roomJid: string, kind: "audio" | "video") => Promise<StartRoomCallOutcome>;
|
|
12
|
+
//# sourceMappingURL=startRoomCall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startRoomCall.d.ts","sourceRoot":"","sources":["../../../src/booking/startRoomCall.ts"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AAEH,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,UAAU,GACV,MAAM,GACN,UAAU,GACV,SAAS,GACT,QAAQ,CAAC;AAIb,eAAO,MAAM,aAAa,GACxB,SAAS,MAAM,EACf,MAAM,OAAO,GAAG,OAAO,KACtB,OAAO,CAAC,oBAAoB,CAqE9B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BusyCallSnapshot } from './callMode';
|
|
2
|
+
/**
|
|
3
|
+
* The call slice as `decideIncomingWhileBusy` should see it. A call that
|
|
4
|
+
* failed (phase 'error') only has its error card left on screen, waiting to
|
|
5
|
+
* be dismissed; it must not make the phone refuse the next incoming call as
|
|
6
|
+
* busy.
|
|
7
|
+
*/
|
|
8
|
+
export declare const busySnapshot: (call: BusyCallSnapshot) => BusyCallSnapshot;
|
|
9
|
+
//# sourceMappingURL=callBusy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callBusy.d.ts","sourceRoot":"","sources":["../../../src/calls/callBusy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,gBAAgB,KAAG,gBACM,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Shown on the ring screen when no human-readable name is known. */
|
|
2
|
+
export declare const NEUTRAL_INCOMING_CALL_LABEL = "Incoming call";
|
|
3
|
+
/**
|
|
4
|
+
* True for strings that are a chat's internal name or an id rather than
|
|
5
|
+
* something a person would be called: two user JIDs joined (the private chat
|
|
6
|
+
* name), a lone user id, an `<appId>_<uuid>` group name, or any long run of
|
|
7
|
+
* hex / underscore / hyphen.
|
|
8
|
+
*/
|
|
9
|
+
export declare const looksLikeRawRoomName: (value: unknown) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Plain-text, display-safe version of a name: control characters stripped,
|
|
12
|
+
* whitespace collapsed and trimmed, capped at about 80 characters. Returns ''
|
|
13
|
+
* when nothing usable is left or the value is a raw chat name / id.
|
|
14
|
+
*/
|
|
15
|
+
export declare const sanitizeCallName: (value: unknown) => string;
|
|
16
|
+
/** sanitizeCallName with null instead of '' (state-friendly). */
|
|
17
|
+
export declare const safeCallName: (value: unknown) => string | null;
|
|
18
|
+
/**
|
|
19
|
+
* An xmppUsername from a stanza attribute, or null when it is not shaped like
|
|
20
|
+
* one (it is only ever used for lookups and routing, never shown).
|
|
21
|
+
*/
|
|
22
|
+
export declare const sanitizeXmppUsername: (value: unknown) => string | null;
|
|
23
|
+
//# sourceMappingURL=callDisplay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callDisplay.d.ts","sourceRoot":"","sources":["../../../src/calls/callDisplay.ts"],"names":[],"mappings":"AAKA,qEAAqE;AACrE,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAiB3D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,OAQrD,CAAC;AAOF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,MAUjD,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IACtB,CAAC;AAElC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IAI9D,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export type CallMode = 'livekit' | 'p2p';
|
|
2
|
+
export type CallKindName = 'audio' | 'video';
|
|
3
|
+
export type CallRoomType = 'private' | 'group';
|
|
4
|
+
/** Serializable subset of RTCIceServer (kept free of DOM types for redux). */
|
|
5
|
+
export interface IceServerConfig {
|
|
6
|
+
urls: string | string[];
|
|
7
|
+
username?: string;
|
|
8
|
+
credential?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Accepts an array, an `{ iceServers }` envelope or a JSON string of either
|
|
12
|
+
* (the call-token stanza carries the list as a JSON attribute) and returns
|
|
13
|
+
* only well formed stun/turn entries. Anything else is dropped, never thrown.
|
|
14
|
+
*/
|
|
15
|
+
export declare const normalizeIceServers: (raw: unknown) => IceServerConfig[];
|
|
16
|
+
/**
|
|
17
|
+
* A LiveKit server URL as the backend publishes it. Only websocket / http(s)
|
|
18
|
+
* URLs are accepted: the value ends up as the connect target of the media
|
|
19
|
+
* session, so anything else (javascript:, data:, garbage) is treated as unset.
|
|
20
|
+
*/
|
|
21
|
+
export declare const normalizeLivekitUrl: (raw: unknown) => string | null;
|
|
22
|
+
/** Attributes of a `<data type="call-token">` element, defensively read. */
|
|
23
|
+
export interface ParsedCallTokenAttrs {
|
|
24
|
+
token: string;
|
|
25
|
+
room: string;
|
|
26
|
+
/** Raw `callId` attribute, null when absent (the JWT may still carry it). */
|
|
27
|
+
callId: string | null;
|
|
28
|
+
/** Valid `kind` attribute, null when absent or unrecognised. */
|
|
29
|
+
kind: CallKindName | null;
|
|
30
|
+
mode: CallMode;
|
|
31
|
+
group: boolean;
|
|
32
|
+
/** Callee's ICE servers for `mode=p2p`, null when absent or unparseable. */
|
|
33
|
+
iceServers: IceServerConfig[] | null;
|
|
34
|
+
/**
|
|
35
|
+
* Public LiveKit wss URL for `mode=livekit`, null when the server did not
|
|
36
|
+
* send one (older backends), it is empty, or it is not a usable URL.
|
|
37
|
+
*/
|
|
38
|
+
livekitUrl: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Caller's display name as plain text (control characters stripped, capped,
|
|
41
|
+
* raw chat names refused); '' when absent. Only trustworthy from the system
|
|
42
|
+
* account, see calls/senderTrust.
|
|
43
|
+
*/
|
|
44
|
+
callerName: string;
|
|
45
|
+
/** Caller's xmppUsername when well formed, else null. Same trust rule. */
|
|
46
|
+
caller: string | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Tolerant reader for the call-token stanza. A server that sends neither
|
|
50
|
+
* `mode` nor `group` (every server before P2P / group calls) yields
|
|
51
|
+
* `mode: 'livekit'`, `group: false`, i.e. exactly the legacy behaviour.
|
|
52
|
+
*/
|
|
53
|
+
export declare const parseCallTokenAttrs: (attrs: Record<string, any> | undefined | null) => ParsedCallTokenAttrs;
|
|
54
|
+
/** Normalised `POST /v1/chats/call/create/:chatName` response. */
|
|
55
|
+
export interface CallCreateResult {
|
|
56
|
+
callId: string | null;
|
|
57
|
+
mode: CallMode;
|
|
58
|
+
kind: CallKindName;
|
|
59
|
+
/** Server-reported group flag, null when the server did not say. */
|
|
60
|
+
group: boolean | null;
|
|
61
|
+
/** Public LiveKit wss URL when the server knows it. */
|
|
62
|
+
livekitUrl: string | null;
|
|
63
|
+
iceServers: IceServerConfig[];
|
|
64
|
+
ttlSeconds: number | null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Reads the create response. Old servers answer with no `mode`, which maps to
|
|
68
|
+
* `livekit` (the caller then waits for its own call-token as before). A p2p
|
|
69
|
+
* answer without a callId is unusable (no way to correlate signalling) and
|
|
70
|
+
* throws.
|
|
71
|
+
*/
|
|
72
|
+
export declare const parseCallCreateResponse: (data: unknown, fallbackKind: CallKindName) => CallCreateResult;
|
|
73
|
+
/**
|
|
74
|
+
* Which room types may start / receive calls. Hosts that never set
|
|
75
|
+
* `allowedRoomTypes` get 1:1 and group chats; an explicit list is respected
|
|
76
|
+
* as written (so `['private']` keeps a host on 1:1 only).
|
|
77
|
+
*/
|
|
78
|
+
export declare const DEFAULT_CALL_ROOM_TYPES: CallRoomType[];
|
|
79
|
+
export declare const isCallRoomTypeAllowed: (roomType: string | undefined | null, allowedRoomTypes?: CallRoomType[] | null) => boolean;
|
|
80
|
+
export interface BusyCallSnapshot {
|
|
81
|
+
phase: string;
|
|
82
|
+
direction: 'incoming' | 'outgoing' | null;
|
|
83
|
+
mode: CallMode;
|
|
84
|
+
callId: string | null;
|
|
85
|
+
roomBareName: string | null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* What to do with an incoming call-token while another call may be active.
|
|
89
|
+
* - accept: nothing active, ring.
|
|
90
|
+
* - duplicate: same callId as the active call (server re-delivery), ignore.
|
|
91
|
+
* - replace: legacy LiveKit behaviour (a new token overwrites the old
|
|
92
|
+
* call), kept exactly for livekit-vs-livekit.
|
|
93
|
+
* - glare-yield: both sides dialled each other; the lexicographically smaller
|
|
94
|
+
* callId wins on BOTH ends, and this is the loser: drop our
|
|
95
|
+
* outgoing call and ring for theirs.
|
|
96
|
+
* - glare-keep: same race, we hold the winning callId, ignore theirs (the
|
|
97
|
+
* other side yields).
|
|
98
|
+
* - busy: a different call is in progress, decline the newcomer.
|
|
99
|
+
*/
|
|
100
|
+
export type IncomingWhileBusyDecision = 'accept' | 'duplicate' | 'replace' | 'glare-yield' | 'glare-keep' | 'busy';
|
|
101
|
+
export declare const decideIncomingWhileBusy: (current: BusyCallSnapshot, incoming: {
|
|
102
|
+
mode: CallMode;
|
|
103
|
+
callId: string | null;
|
|
104
|
+
roomBareName: string | null;
|
|
105
|
+
}) => IncomingWhileBusyDecision;
|
|
106
|
+
//# sourceMappingURL=callMode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callMode.d.ts","sourceRoot":"","sources":["../../../src/calls/callMode.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAC;AACzC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAC7C,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,CAAC;AAE/C,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,OAAO,KAAG,eAAe,EA4CjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,OAAO,KAAG,MAAM,GAAG,IAG3D,CAAC;AASF,4EAA4E;AAC5E,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gEAAgE;IAChE,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,4EAA4E;IAC5E,UAAU,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IACrC;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,KAC5C,oBAyBF,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,oEAAoE;IACpE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB,uDAAuD;IACvD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,OAAO,EACb,cAAc,YAAY,KACzB,gBAoCF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,YAAY,EAAyB,CAAC;AAE5E,eAAO,MAAM,qBAAqB,GAChC,UAAU,MAAM,GAAG,SAAS,GAAG,IAAI,EACnC,mBAAmB,YAAY,EAAE,GAAG,IAAI,KACvC,OAIF,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAC1C,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,yBAAyB,GACjC,QAAQ,GACR,WAAW,GACX,SAAS,GACT,aAAa,GACb,YAAY,GACZ,MAAM,CAAC;AAEX,eAAO,MAAM,uBAAuB,GAClC,SAAS,gBAAgB,EACzB,UAAU;IACR,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,KACA,yBAmBF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A peer to peer call has no LiveKit webhook, so the server learns that the
|
|
3
|
+
* callee rejected it (and relays that to the caller) only from this report.
|
|
4
|
+
* Never sent for a LiveKit call, where a REST decline would act on the
|
|
5
|
+
* LiveKit room. REST needs no socket, so it can go out at once.
|
|
6
|
+
*/
|
|
7
|
+
export declare const reportDeclineIfP2P: (call: {
|
|
8
|
+
mode: string;
|
|
9
|
+
callId: string | null;
|
|
10
|
+
}) => void;
|
|
11
|
+
//# sourceMappingURL=declineReport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declineReport.d.ts","sourceRoot":"","sources":["../../../src/calls/declineReport.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,KAAG,IAIH,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { IceServerConfig } from '../callMode';
|
|
2
|
+
import { P2PRole } from './negotiator';
|
|
3
|
+
import type { P2PSignal, P2PSignalName, P2PSignalPayload } from './signalStanza';
|
|
4
|
+
export type P2PStatus = 'preparing' | 'waiting' | 'connecting' | 'connected' | 'reconnecting' | 'failed' | 'ended';
|
|
5
|
+
export interface P2PSnapshot {
|
|
6
|
+
status: P2PStatus;
|
|
7
|
+
localStream: MediaStream | null;
|
|
8
|
+
remoteStream: MediaStream | null;
|
|
9
|
+
micEnabled: boolean;
|
|
10
|
+
camEnabled: boolean;
|
|
11
|
+
remoteVideoLive: boolean;
|
|
12
|
+
/** Dismissible, non-fatal hint (e.g. the camera could not be re-enabled). */
|
|
13
|
+
notice: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface P2PCallParams {
|
|
16
|
+
callId: string;
|
|
17
|
+
role: P2PRole;
|
|
18
|
+
kind: 'audio' | 'video';
|
|
19
|
+
/** Peer's xmpp localpart; signals from anyone else are ignored. */
|
|
20
|
+
peerLocal: string;
|
|
21
|
+
iceServers: IceServerConfig[];
|
|
22
|
+
startWithMicOn?: boolean;
|
|
23
|
+
startWithCameraOn?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface P2PCallDeps {
|
|
26
|
+
createPeerConnection: (config: RTCConfiguration) => RTCPeerConnection;
|
|
27
|
+
getUserMedia: (constraints: MediaStreamConstraints) => Promise<MediaStream>;
|
|
28
|
+
createMediaStream: () => MediaStream;
|
|
29
|
+
/** Fresh credentials; null/empty keeps the servers already in use. */
|
|
30
|
+
fetchIceServers: () => Promise<IceServerConfig[] | null>;
|
|
31
|
+
sendSignal: (signal: P2PSignalName, payload: P2PSignalPayload) => void;
|
|
32
|
+
log?: (message: string, detail?: unknown) => void;
|
|
33
|
+
}
|
|
34
|
+
export interface P2PCallEvents {
|
|
35
|
+
/** The offer/answer exchange completed: media is now negotiating. */
|
|
36
|
+
onNegotiated?: () => void;
|
|
37
|
+
/** Media is flowing for the first time. */
|
|
38
|
+
onConnected?: () => void;
|
|
39
|
+
/** The peer ended the call (hang up, decline, their own failure). */
|
|
40
|
+
onRemoteEnd?: (reason: string) => void;
|
|
41
|
+
/** The call failed locally; the message is meant for the user. */
|
|
42
|
+
onFailed?: (message: string) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Called exactly once when the call's resources are released. `started` is
|
|
45
|
+
* false for a callee that never accepted (nothing was negotiated).
|
|
46
|
+
*/
|
|
47
|
+
onDisposed?: (info: {
|
|
48
|
+
started: boolean;
|
|
49
|
+
}) => void;
|
|
50
|
+
}
|
|
51
|
+
export interface P2PTimings {
|
|
52
|
+
connectTimeoutMs: number;
|
|
53
|
+
offerResendMs: number[];
|
|
54
|
+
}
|
|
55
|
+
export declare const describeMediaError: (error: unknown) => string;
|
|
56
|
+
/**
|
|
57
|
+
* What to show when the PEER ended the call for a reason that is a failure
|
|
58
|
+
* rather than a normal hang up / decline. Null means "just close the call".
|
|
59
|
+
*/
|
|
60
|
+
export declare const remoteEndNotice: (reason: string) => string | null;
|
|
61
|
+
export declare class P2PCallController {
|
|
62
|
+
readonly callId: string;
|
|
63
|
+
readonly role: P2PRole;
|
|
64
|
+
readonly kind: 'audio' | 'video';
|
|
65
|
+
private readonly params;
|
|
66
|
+
private readonly deps;
|
|
67
|
+
private readonly events;
|
|
68
|
+
private readonly timings;
|
|
69
|
+
private readonly negotiator;
|
|
70
|
+
private readonly policy;
|
|
71
|
+
private snapshot;
|
|
72
|
+
private readonly listeners;
|
|
73
|
+
private pc;
|
|
74
|
+
private localStream;
|
|
75
|
+
private audioTrack;
|
|
76
|
+
private videoTrack;
|
|
77
|
+
private videoSender;
|
|
78
|
+
private ownedTracks;
|
|
79
|
+
private remoteStream;
|
|
80
|
+
private remoteCleanups;
|
|
81
|
+
private queue;
|
|
82
|
+
private timers;
|
|
83
|
+
private graceTimer;
|
|
84
|
+
private deadlineTimer;
|
|
85
|
+
private connectTimer;
|
|
86
|
+
private started;
|
|
87
|
+
private disposed;
|
|
88
|
+
private endSent;
|
|
89
|
+
private connectedOnce;
|
|
90
|
+
private negotiated;
|
|
91
|
+
private cameraBusy;
|
|
92
|
+
private lastConn;
|
|
93
|
+
private candidateGateOpen;
|
|
94
|
+
private heldOutgoingCandidates;
|
|
95
|
+
private sentCandidates;
|
|
96
|
+
private lastOffer;
|
|
97
|
+
constructor(params: P2PCallParams, deps: P2PCallDeps, events?: P2PCallEvents, timings?: Partial<P2PTimings>);
|
|
98
|
+
subscribe: (listener: () => void) => (() => void);
|
|
99
|
+
getSnapshot: () => P2PSnapshot;
|
|
100
|
+
private update;
|
|
101
|
+
private log;
|
|
102
|
+
private later;
|
|
103
|
+
private cancel;
|
|
104
|
+
/**
|
|
105
|
+
* Caller: get media, build the connection, offer. Callee: get media, build
|
|
106
|
+
* the connection, then apply the offer that may already be waiting. Safe to
|
|
107
|
+
* call once; every failure ends the call with a message instead of throwing.
|
|
108
|
+
*/
|
|
109
|
+
start(): Promise<void>;
|
|
110
|
+
/** Feed a signal from the peer (already routed by callId). */
|
|
111
|
+
receive(signal: P2PSignal): void;
|
|
112
|
+
/** Local user hung up (or cancelled): tell the peer and release everything. */
|
|
113
|
+
hangup(reason?: string): void;
|
|
114
|
+
/**
|
|
115
|
+
* Release every resource: timers, listeners, media tracks, the connection.
|
|
116
|
+
* Idempotent, safe from any exit path. Tells the peer unless it is already
|
|
117
|
+
* known to be over.
|
|
118
|
+
*/
|
|
119
|
+
dispose(): void;
|
|
120
|
+
private sendEnd;
|
|
121
|
+
private fail;
|
|
122
|
+
private handleRemoteEnd;
|
|
123
|
+
private acquireMedia;
|
|
124
|
+
private releaseMedia;
|
|
125
|
+
toggleMic(): void;
|
|
126
|
+
/**
|
|
127
|
+
* Turning the camera off stops sending video and releases the device (the
|
|
128
|
+
* camera light goes out); turning it on opens the camera again and swaps it
|
|
129
|
+
* into the existing sender, so no renegotiation is needed.
|
|
130
|
+
*/
|
|
131
|
+
toggleCamera(): Promise<void>;
|
|
132
|
+
dismissNotice(): void;
|
|
133
|
+
private createConnection;
|
|
134
|
+
private emitCandidate;
|
|
135
|
+
private openCandidateGate;
|
|
136
|
+
private onRemoteTrack;
|
|
137
|
+
private remoteVideoLive;
|
|
138
|
+
private enqueue;
|
|
139
|
+
private sendOffer;
|
|
140
|
+
private scheduleOfferResends;
|
|
141
|
+
private runCommands;
|
|
142
|
+
private applyOffer;
|
|
143
|
+
private onNegotiated;
|
|
144
|
+
private connState;
|
|
145
|
+
private onConnectionState;
|
|
146
|
+
private runIceAction;
|
|
147
|
+
/** ICE restart with fresh TURN credentials; the caller of this is the policy. */
|
|
148
|
+
private restartIce;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=P2PCallController.d.ts.map
|