@wazo/sdk 0.43.14 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -57
- package/dist/index.js +10630 -0
- package/dist/index.mjs +10541 -0
- package/dist/types/api-client.d.ts +26 -0
- package/dist/types/api-client.d.ts.map +1 -0
- package/{lib/types/api-client.d.ts → dist/types/base-api-client.d.ts} +3 -24
- package/dist/types/base-api-client.d.ts.map +1 -0
- package/dist/types/constants.d.ts +12 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/{lib → dist}/types/domain/Contact.d.ts +3 -1
- package/dist/types/domain/Contact.d.ts.map +1 -0
- package/{lib → dist}/types/index.d.ts +14 -13
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/service/__tests__/getApiclient.test.d.ts +2 -0
- package/dist/types/service/__tests__/getApiclient.test.d.ts.map +1 -0
- package/{lib → dist}/types/service/getApiClient.d.ts +5 -2
- package/dist/types/service/getApiClient.d.ts.map +1 -0
- package/{esm → dist}/types/simple/index.d.ts +1 -1
- package/{lib → dist}/types/utils/api-requester.d.ts.map +1 -1
- package/dist/wazo-sdk.js +69378 -43
- package/dist/wazo-sdk.js.LICENSE.txt +684 -0
- package/package.json +10 -21
- package/esm/__tests__/api-client.test.js +0 -281
- package/esm/__tests__/web-rtc-client.test.js +0 -192
- package/esm/api/agentd.js +0 -23
- package/esm/api/amid.js +0 -17
- package/esm/api/application.js +0 -63
- package/esm/api/auth.js +0 -198
- package/esm/api/call-logd.js +0 -24
- package/esm/api/calld.js +0 -120
- package/esm/api/chatd.js +0 -50
- package/esm/api/confd.js +0 -77
- package/esm/api/ctid-ng.js +0 -96
- package/esm/api/dird.js +0 -110
- package/esm/api/webhookd.js +0 -7
- package/esm/api-client.js +0 -166
- package/esm/checker/Checker.js +0 -54
- package/esm/checker/checks/aor.js +0 -28
- package/esm/checker/checks/api.js +0 -76
- package/esm/checker/checks/ice-ipv4.js +0 -69
- package/esm/checker/checks/index.js +0 -8
- package/esm/checker/checks/symmetric-nat.js +0 -59
- package/esm/checker/checks/wazo-websocket.js +0 -38
- package/esm/checker/checks/webrtc-transport.js +0 -35
- package/esm/checker/checks/webrtc.js +0 -40
- package/esm/domain/AdHocAPIConference.js +0 -102
- package/esm/domain/Agent.js +0 -30
- package/esm/domain/BadResponse.js +0 -21
- package/esm/domain/Call.js +0 -123
- package/esm/domain/CallLog.js +0 -157
- package/esm/domain/CallSession.js +0 -253
- package/esm/domain/CallerID.js +0 -24
- package/esm/domain/ChatMessage.js +0 -55
- package/esm/domain/ChatRoom.js +0 -30
- package/esm/domain/Contact.js +0 -464
- package/esm/domain/Country.js +0 -19
- package/esm/domain/Device/DebugDevice.js +0 -32
- package/esm/domain/Device/Device.js +0 -1
- package/esm/domain/DirectorySource.js +0 -1
- package/esm/domain/ExternalApp.js +0 -24
- package/esm/domain/Features.js +0 -77
- package/esm/domain/ForwardOption.js +0 -37
- package/esm/domain/Incall.js +0 -28
- package/esm/domain/IndirectTransfer.js +0 -40
- package/esm/domain/Line.js +0 -39
- package/esm/domain/Meeting.js +0 -61
- package/esm/domain/MeetingAuthorization.js +0 -46
- package/esm/domain/MeetingStatus.js +0 -14
- package/esm/domain/NotificationOptions.js +0 -45
- package/esm/domain/Phone/CTIPhone.js +0 -288
- package/esm/domain/Phone/Phone.js +0 -1
- package/esm/domain/Phone/WebRTCPhone.js +0 -1482
- package/esm/domain/Profile.js +0 -128
- package/esm/domain/Recording.js +0 -30
- package/esm/domain/Relocation.js +0 -20
- package/esm/domain/Room.js +0 -97
- package/esm/domain/SFUNotAvailableError.js +0 -6
- package/esm/domain/ServerError.js +0 -9
- package/esm/domain/Session.js +0 -174
- package/esm/domain/SipLine.js +0 -82
- package/esm/domain/Subscription.js +0 -42
- package/esm/domain/SwitchboardCall.js +0 -56
- package/esm/domain/Voicemail.js +0 -76
- package/esm/domain/__tests__/Agent.test.js +0 -37
- package/esm/domain/__tests__/Call.test.js +0 -25
- package/esm/domain/__tests__/CallLog.test.js +0 -181
- package/esm/domain/__tests__/CallSession.test.js +0 -78
- package/esm/domain/__tests__/Contact.test.js +0 -393
- package/esm/domain/__tests__/IndirectTransfer.test.js +0 -67
- package/esm/domain/__tests__/Line.test.js +0 -52
- package/esm/domain/__tests__/Meeting.test.js +0 -77
- package/esm/domain/__tests__/MeetingAuthorization.test.js +0 -49
- package/esm/domain/__tests__/Profile.test.js +0 -169
- package/esm/domain/__tests__/Room.test.js +0 -206
- package/esm/domain/__tests__/Session.test.js +0 -382
- package/esm/domain/__tests__/SipLine.test.js +0 -27
- package/esm/domain/__tests__/Voicemail.test.js +0 -90
- package/esm/domain/types.js +0 -2
- package/esm/index.js +0 -50
- package/esm/lib/WazoSessionDescriptionHandler.js +0 -429
- package/esm/pubkey.js +0 -10
- package/esm/service/CallApi.js +0 -61
- package/esm/service/IssueReporter.js +0 -331
- package/esm/service/__tests__/IssueReporter.test.js +0 -112
- package/esm/service/getApiClient.js +0 -92
- package/esm/simple/Auth.js +0 -384
- package/esm/simple/Configuration.js +0 -13
- package/esm/simple/Directory.js +0 -11
- package/esm/simple/Phone.js +0 -389
- package/esm/simple/Websocket.js +0 -81
- package/esm/simple/__tests__/Auth.test.js +0 -144
- package/esm/simple/index.js +0 -137
- package/esm/simple/room/LocalParticipant.js +0 -4
- package/esm/simple/room/Participant.js +0 -315
- package/esm/simple/room/RemoteParticipant.js +0 -10
- package/esm/simple/room/Room.js +0 -714
- package/esm/simple/room/SipRoom.js +0 -121
- package/esm/simple/room/Stream.js +0 -47
- package/esm/simple/room/__tests__/Participant.test.js +0 -71
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +0 -12
- package/esm/simple/utils.js +0 -10
- package/esm/types/WebSocketMessage.js +0 -1
- package/esm/types/api-client.d.ts +0 -64
- package/esm/types/api-client.d.ts.map +0 -1
- package/esm/types/domain/Contact.d.ts +0 -332
- package/esm/types/domain/Contact.d.ts.map +0 -1
- package/esm/types/index.d.ts +0 -58
- package/esm/types/index.d.ts.map +0 -1
- package/esm/types/service/getApiClient.d.ts +0 -18
- package/esm/types/service/getApiClient.d.ts.map +0 -1
- package/esm/types/utils/api-requester.d.ts.map +0 -1
- package/esm/utils/Emitter.js +0 -19
- package/esm/utils/Heartbeat.js +0 -73
- package/esm/utils/PhoneNumberUtil.js +0 -67
- package/esm/utils/__tests__/Heartbeat.test.js +0 -65
- package/esm/utils/__tests__/PhoneNumberUtil.test.js +0 -70
- package/esm/utils/__tests__/api-requester.test.js +0 -166
- package/esm/utils/__tests__/array.test.js +0 -18
- package/esm/utils/__tests__/compare-version.test.js +0 -10
- package/esm/utils/__tests__/object.test.js +0 -76
- package/esm/utils/__tests__/sdp.test.js +0 -172
- package/esm/utils/__tests__/string.test.js +0 -49
- package/esm/utils/api-requester.js +0 -214
- package/esm/utils/array.js +0 -9
- package/esm/utils/compare-version.js +0 -17
- package/esm/utils/isMobile.js +0 -3
- package/esm/utils/new-from.js +0 -7
- package/esm/utils/object.js +0 -10
- package/esm/utils/once.js +0 -15
- package/esm/utils/sdp.js +0 -104
- package/esm/utils/string.js +0 -12
- package/esm/utils/update-from.js +0 -10
- package/esm/utils/webrtc.js +0 -37
- package/esm/web-rtc-client.js +0 -2200
- package/esm/websocket-client.js +0 -385
- package/index.js +0 -1
- package/lib/__tests__/api-client.test.js +0 -295
- package/lib/__tests__/web-rtc-client.test.js +0 -210
- package/lib/api/agentd.js +0 -28
- package/lib/api/amid.js +0 -28
- package/lib/api/application.js +0 -68
- package/lib/api/auth.js +0 -210
- package/lib/api/call-logd.js +0 -29
- package/lib/api/calld.js +0 -134
- package/lib/api/chatd.js +0 -68
- package/lib/api/confd.js +0 -91
- package/lib/api/ctid-ng.js +0 -101
- package/lib/api/dird.js +0 -124
- package/lib/api/webhookd.js +0 -12
- package/lib/api-client.js +0 -164
- package/lib/checker/Checker.js +0 -68
- package/lib/checker/checks/aor.js +0 -42
- package/lib/checker/checks/api.js +0 -90
- package/lib/checker/checks/ice-ipv4.js +0 -73
- package/lib/checker/checks/index.js +0 -13
- package/lib/checker/checks/symmetric-nat.js +0 -61
- package/lib/checker/checks/wazo-websocket.js +0 -63
- package/lib/checker/checks/webrtc-transport.js +0 -49
- package/lib/checker/checks/webrtc.js +0 -54
- package/lib/domain/AdHocAPIConference.js +0 -101
- package/lib/domain/Agent.js +0 -25
- package/lib/domain/BadResponse.js +0 -19
- package/lib/domain/Call.js +0 -112
- package/lib/domain/CallLog.js +0 -151
- package/lib/domain/CallSession.js +0 -224
- package/lib/domain/CallerID.js +0 -27
- package/lib/domain/ChatMessage.js +0 -53
- package/lib/domain/ChatRoom.js +0 -32
- package/lib/domain/Contact.js +0 -439
- package/lib/domain/Country.js +0 -21
- package/lib/domain/Device/DebugDevice.js +0 -35
- package/lib/domain/Device/Device.js +0 -2
- package/lib/domain/DirectorySource.js +0 -2
- package/lib/domain/ExternalApp.js +0 -27
- package/lib/domain/Features.js +0 -87
- package/lib/domain/ForwardOption.js +0 -41
- package/lib/domain/Incall.js +0 -32
- package/lib/domain/IndirectTransfer.js +0 -42
- package/lib/domain/Line.js +0 -39
- package/lib/domain/Meeting.js +0 -55
- package/lib/domain/MeetingAuthorization.js +0 -45
- package/lib/domain/MeetingStatus.js +0 -15
- package/lib/domain/NotificationOptions.js +0 -49
- package/lib/domain/Phone/CTIPhone.js +0 -324
- package/lib/domain/Phone/Phone.js +0 -2
- package/lib/domain/Phone/WebRTCPhone.js +0 -1492
- package/lib/domain/Profile.js +0 -138
- package/lib/domain/Recording.js +0 -31
- package/lib/domain/Relocation.js +0 -18
- package/lib/domain/Room.js +0 -81
- package/lib/domain/SFUNotAvailableError.js +0 -9
- package/lib/domain/ServerError.js +0 -15
- package/lib/domain/Session.js +0 -166
- package/lib/domain/SipLine.js +0 -76
- package/lib/domain/Subscription.js +0 -34
- package/lib/domain/SwitchboardCall.js +0 -50
- package/lib/domain/Voicemail.js +0 -77
- package/lib/domain/__tests__/Agent.test.js +0 -42
- package/lib/domain/__tests__/Call.test.js +0 -30
- package/lib/domain/__tests__/CallLog.test.js +0 -166
- package/lib/domain/__tests__/CallSession.test.js +0 -83
- package/lib/domain/__tests__/Contact.test.js +0 -371
- package/lib/domain/__tests__/IndirectTransfer.test.js +0 -81
- package/lib/domain/__tests__/Line.test.js +0 -57
- package/lib/domain/__tests__/Meeting.test.js +0 -82
- package/lib/domain/__tests__/MeetingAuthorization.test.js +0 -54
- package/lib/domain/__tests__/Profile.test.js +0 -197
- package/lib/domain/__tests__/Room.test.js +0 -220
- package/lib/domain/__tests__/Session.test.js +0 -378
- package/lib/domain/__tests__/SipLine.test.js +0 -32
- package/lib/domain/__tests__/Voicemail.test.js +0 -95
- package/lib/domain/types.js +0 -38
- package/lib/index.js +0 -125
- package/lib/lib/WazoSessionDescriptionHandler.js +0 -434
- package/lib/pubkey.js +0 -12
- package/lib/service/CallApi.js +0 -112
- package/lib/service/IssueReporter.js +0 -317
- package/lib/service/__tests__/IssueReporter.test.js +0 -117
- package/lib/service/getApiClient.js +0 -112
- package/lib/simple/Auth.js +0 -433
- package/lib/simple/Configuration.js +0 -31
- package/lib/simple/Directory.js +0 -29
- package/lib/simple/Phone.js +0 -418
- package/lib/simple/Websocket.js +0 -116
- package/lib/simple/__tests__/Auth.test.js +0 -181
- package/lib/simple/index.js +0 -165
- package/lib/simple/room/LocalParticipant.js +0 -9
- package/lib/simple/room/Participant.js +0 -302
- package/lib/simple/room/RemoteParticipant.js +0 -15
- package/lib/simple/room/Room.js +0 -711
- package/lib/simple/room/SipRoom.js +0 -141
- package/lib/simple/room/Stream.js +0 -50
- package/lib/simple/room/__tests__/Participant.test.js +0 -85
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +0 -17
- package/lib/simple/utils.js +0 -27
- package/lib/types/WebSocketMessage.js +0 -2
- package/lib/types/__tests__/api-client.test.d.ts +0 -2
- package/lib/types/__tests__/api-client.test.d.ts.map +0 -1
- package/lib/types/__tests__/web-rtc-client.test.d.ts +0 -2
- package/lib/types/__tests__/web-rtc-client.test.d.ts.map +0 -1
- package/lib/types/api/agentd.d.ts +0 -17
- package/lib/types/api/agentd.d.ts.map +0 -1
- package/lib/types/api/amid.d.ts +0 -8
- package/lib/types/api/amid.d.ts.map +0 -1
- package/lib/types/api/application.d.ts +0 -34
- package/lib/types/api/application.d.ts.map +0 -1
- package/lib/types/api/auth.d.ts +0 -69
- package/lib/types/api/auth.d.ts.map +0 -1
- package/lib/types/api/call-logd.d.ts +0 -12
- package/lib/types/api/call-logd.d.ts.map +0 -1
- package/lib/types/api/calld.d.ts +0 -52
- package/lib/types/api/calld.d.ts.map +0 -1
- package/lib/types/api/chatd.d.ts +0 -29
- package/lib/types/api/chatd.d.ts.map +0 -1
- package/lib/types/api/confd.d.ts +0 -46
- package/lib/types/api/confd.d.ts.map +0 -1
- package/lib/types/api/ctid-ng.d.ts +0 -36
- package/lib/types/api/ctid-ng.d.ts.map +0 -1
- package/lib/types/api/dird.d.ts +0 -33
- package/lib/types/api/dird.d.ts.map +0 -1
- package/lib/types/api/webhookd.d.ts +0 -24
- package/lib/types/api/webhookd.d.ts.map +0 -1
- package/lib/types/api-client.d.ts.map +0 -1
- package/lib/types/checker/Checker.d.ts +0 -13
- package/lib/types/checker/Checker.d.ts.map +0 -1
- package/lib/types/checker/checks/aor.d.ts +0 -6
- package/lib/types/checker/checks/aor.d.ts.map +0 -1
- package/lib/types/checker/checks/api.d.ts +0 -6
- package/lib/types/checker/checks/api.d.ts.map +0 -1
- package/lib/types/checker/checks/ice-ipv4.d.ts +0 -6
- package/lib/types/checker/checks/ice-ipv4.d.ts.map +0 -1
- package/lib/types/checker/checks/index.d.ts +0 -9
- package/lib/types/checker/checks/index.d.ts.map +0 -1
- package/lib/types/checker/checks/symmetric-nat.d.ts +0 -6
- package/lib/types/checker/checks/symmetric-nat.d.ts.map +0 -1
- package/lib/types/checker/checks/wazo-websocket.d.ts +0 -6
- package/lib/types/checker/checks/wazo-websocket.d.ts.map +0 -1
- package/lib/types/checker/checks/webrtc-transport.d.ts +0 -7
- package/lib/types/checker/checks/webrtc-transport.d.ts.map +0 -1
- package/lib/types/checker/checks/webrtc.d.ts +0 -6
- package/lib/types/checker/checks/webrtc.d.ts.map +0 -1
- package/lib/types/domain/AdHocAPIConference.d.ts +0 -54
- package/lib/types/domain/AdHocAPIConference.d.ts.map +0 -1
- package/lib/types/domain/Agent.d.ts +0 -31
- package/lib/types/domain/Agent.d.ts.map +0 -1
- package/lib/types/domain/BadResponse.d.ts +0 -11
- package/lib/types/domain/BadResponse.d.ts.map +0 -1
- package/lib/types/domain/Call.d.ts +0 -79
- package/lib/types/domain/Call.d.ts.map +0 -1
- package/lib/types/domain/CallLog.d.ts +0 -88
- package/lib/types/domain/CallLog.d.ts.map +0 -1
- package/lib/types/domain/CallSession.d.ts +0 -119
- package/lib/types/domain/CallSession.d.ts.map +0 -1
- package/lib/types/domain/CallerID.d.ts +0 -22
- package/lib/types/domain/CallerID.d.ts.map +0 -1
- package/lib/types/domain/ChatMessage.d.ts +0 -41
- package/lib/types/domain/ChatMessage.d.ts.map +0 -1
- package/lib/types/domain/ChatRoom.d.ts +0 -22
- package/lib/types/domain/ChatRoom.d.ts.map +0 -1
- package/lib/types/domain/Contact.d.ts.map +0 -1
- package/lib/types/domain/Country.d.ts +0 -21
- package/lib/types/domain/Country.d.ts.map +0 -1
- package/lib/types/domain/Device/DebugDevice.d.ts +0 -14
- package/lib/types/domain/Device/DebugDevice.d.ts.map +0 -1
- package/lib/types/domain/Device/Device.d.ts +0 -13
- package/lib/types/domain/Device/Device.d.ts.map +0 -1
- package/lib/types/domain/DirectorySource.d.ts +0 -13
- package/lib/types/domain/DirectorySource.d.ts.map +0 -1
- package/lib/types/domain/ExternalApp.d.ts +0 -22
- package/lib/types/domain/ExternalApp.d.ts.map +0 -1
- package/lib/types/domain/Features.d.ts +0 -26
- package/lib/types/domain/Features.d.ts.map +0 -1
- package/lib/types/domain/ForwardOption.d.ts +0 -28
- package/lib/types/domain/ForwardOption.d.ts.map +0 -1
- package/lib/types/domain/Incall.d.ts +0 -21
- package/lib/types/domain/Incall.d.ts.map +0 -1
- package/lib/types/domain/IndirectTransfer.d.ts +0 -31
- package/lib/types/domain/IndirectTransfer.d.ts.map +0 -1
- package/lib/types/domain/Line.d.ts +0 -35
- package/lib/types/domain/Line.d.ts.map +0 -1
- package/lib/types/domain/Meeting.d.ts +0 -45
- package/lib/types/domain/Meeting.d.ts.map +0 -1
- package/lib/types/domain/MeetingAuthorization.d.ts +0 -32
- package/lib/types/domain/MeetingAuthorization.d.ts.map +0 -1
- package/lib/types/domain/MeetingStatus.d.ts +0 -10
- package/lib/types/domain/MeetingStatus.d.ts.map +0 -1
- package/lib/types/domain/NotificationOptions.d.ts +0 -22
- package/lib/types/domain/NotificationOptions.d.ts.map +0 -1
- package/lib/types/domain/Phone/CTIPhone.d.ts +0 -79
- package/lib/types/domain/Phone/CTIPhone.d.ts.map +0 -1
- package/lib/types/domain/Phone/Phone.d.ts +0 -83
- package/lib/types/domain/Phone/Phone.d.ts.map +0 -1
- package/lib/types/domain/Phone/WebRTCPhone.d.ts +0 -183
- package/lib/types/domain/Phone/WebRTCPhone.d.ts.map +0 -1
- package/lib/types/domain/Profile.d.ts +0 -155
- package/lib/types/domain/Profile.d.ts.map +0 -1
- package/lib/types/domain/Recording.d.ts +0 -26
- package/lib/types/domain/Recording.d.ts.map +0 -1
- package/lib/types/domain/Relocation.d.ts +0 -23
- package/lib/types/domain/Relocation.d.ts.map +0 -1
- package/lib/types/domain/Room.d.ts +0 -33
- package/lib/types/domain/Room.d.ts.map +0 -1
- package/lib/types/domain/SFUNotAvailableError.d.ts +0 -4
- package/lib/types/domain/SFUNotAvailableError.d.ts.map +0 -1
- package/lib/types/domain/ServerError.d.ts +0 -6
- package/lib/types/domain/ServerError.d.ts.map +0 -1
- package/lib/types/domain/Session.d.ts +0 -100
- package/lib/types/domain/Session.d.ts.map +0 -1
- package/lib/types/domain/SipLine.d.ts +0 -54
- package/lib/types/domain/SipLine.d.ts.map +0 -1
- package/lib/types/domain/Subscription.d.ts +0 -43
- package/lib/types/domain/Subscription.d.ts.map +0 -1
- package/lib/types/domain/SwitchboardCall.d.ts +0 -62
- package/lib/types/domain/SwitchboardCall.d.ts.map +0 -1
- package/lib/types/domain/Voicemail.d.ts +0 -58
- package/lib/types/domain/Voicemail.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Agent.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Agent.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Call.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Call.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/CallLog.test.d.ts +0 -2
- package/lib/types/domain/__tests__/CallLog.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/CallSession.test.d.ts +0 -2
- package/lib/types/domain/__tests__/CallSession.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Contact.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Contact.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/IndirectTransfer.test.d.ts +0 -2
- package/lib/types/domain/__tests__/IndirectTransfer.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Line.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Line.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Meeting.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Meeting.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/MeetingAuthorization.test.d.ts +0 -2
- package/lib/types/domain/__tests__/MeetingAuthorization.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Profile.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Profile.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Room.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Room.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Session.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Session.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/SipLine.test.d.ts +0 -2
- package/lib/types/domain/__tests__/SipLine.test.d.ts.map +0 -1
- package/lib/types/domain/__tests__/Voicemail.test.d.ts +0 -2
- package/lib/types/domain/__tests__/Voicemail.test.d.ts.map +0 -1
- package/lib/types/domain/types.d.ts +0 -378
- package/lib/types/domain/types.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/lib/WazoSessionDescriptionHandler.d.ts +0 -31
- package/lib/types/lib/WazoSessionDescriptionHandler.d.ts.map +0 -1
- package/lib/types/pubkey.d.ts +0 -3
- package/lib/types/pubkey.d.ts.map +0 -1
- package/lib/types/service/CallApi.d.ts +0 -28
- package/lib/types/service/CallApi.d.ts.map +0 -1
- package/lib/types/service/IssueReporter.d.ts +0 -42
- package/lib/types/service/IssueReporter.d.ts.map +0 -1
- package/lib/types/service/__tests__/IssueReporter.test.d.ts +0 -2
- package/lib/types/service/__tests__/IssueReporter.test.d.ts.map +0 -1
- package/lib/types/service/getApiClient.d.ts.map +0 -1
- package/lib/types/simple/Auth.d.ts +0 -75
- package/lib/types/simple/Auth.d.ts.map +0 -1
- package/lib/types/simple/Configuration.d.ts +0 -7
- package/lib/types/simple/Configuration.d.ts.map +0 -1
- package/lib/types/simple/Directory.d.ts +0 -7
- package/lib/types/simple/Directory.d.ts.map +0 -1
- package/lib/types/simple/Phone.d.ts +0 -119
- package/lib/types/simple/Phone.d.ts.map +0 -1
- package/lib/types/simple/Websocket.d.ts +0 -21
- package/lib/types/simple/Websocket.d.ts.map +0 -1
- package/lib/types/simple/__tests__/Auth.test.d.ts +0 -2
- package/lib/types/simple/__tests__/Auth.test.d.ts.map +0 -1
- package/lib/types/simple/index.d.ts +0 -153
- package/lib/types/simple/index.d.ts.map +0 -1
- package/lib/types/simple/room/LocalParticipant.d.ts +0 -5
- package/lib/types/simple/room/LocalParticipant.d.ts.map +0 -1
- package/lib/types/simple/room/Participant.d.ts +0 -77
- package/lib/types/simple/room/Participant.d.ts.map +0 -1
- package/lib/types/simple/room/RemoteParticipant.d.ts +0 -7
- package/lib/types/simple/room/RemoteParticipant.d.ts.map +0 -1
- package/lib/types/simple/room/Room.d.ts +0 -127
- package/lib/types/simple/room/Room.d.ts.map +0 -1
- package/lib/types/simple/room/SipRoom.d.ts +0 -14
- package/lib/types/simple/room/SipRoom.d.ts.map +0 -1
- package/lib/types/simple/room/Stream.d.ts +0 -13
- package/lib/types/simple/room/Stream.d.ts.map +0 -1
- package/lib/types/simple/room/__tests__/Participant.test.d.ts +0 -2
- package/lib/types/simple/room/__tests__/Participant.test.d.ts.map +0 -1
- package/lib/types/simple/room/__tests__/RemoteParticipant.test.d.ts +0 -2
- package/lib/types/simple/room/__tests__/RemoteParticipant.test.d.ts.map +0 -1
- package/lib/types/simple/utils.d.ts +0 -3
- package/lib/types/simple/utils.d.ts.map +0 -1
- package/lib/types/types/WebSocketMessage.d.ts +0 -285
- package/lib/types/types/WebSocketMessage.d.ts.map +0 -1
- package/lib/types/utils/Emitter.d.ts +0 -18
- package/lib/types/utils/Emitter.d.ts.map +0 -1
- package/lib/types/utils/Heartbeat.d.ts +0 -22
- package/lib/types/utils/Heartbeat.d.ts.map +0 -1
- package/lib/types/utils/PhoneNumberUtil.d.ts +0 -7
- package/lib/types/utils/PhoneNumberUtil.d.ts.map +0 -1
- package/lib/types/utils/__tests__/Heartbeat.test.d.ts +0 -2
- package/lib/types/utils/__tests__/Heartbeat.test.d.ts.map +0 -1
- package/lib/types/utils/__tests__/PhoneNumberUtil.test.d.ts +0 -2
- package/lib/types/utils/__tests__/PhoneNumberUtil.test.d.ts.map +0 -1
- package/lib/types/utils/__tests__/api-requester.test.d.ts +0 -2
- package/lib/types/utils/__tests__/api-requester.test.d.ts.map +0 -1
- package/lib/types/utils/__tests__/array.test.d.ts +0 -2
- package/lib/types/utils/__tests__/array.test.d.ts.map +0 -1
- package/lib/types/utils/__tests__/compare-version.test.d.ts +0 -2
- package/lib/types/utils/__tests__/compare-version.test.d.ts.map +0 -1
- package/lib/types/utils/__tests__/object.test.d.ts +0 -2
- package/lib/types/utils/__tests__/object.test.d.ts.map +0 -1
- package/lib/types/utils/__tests__/sdp.test.d.ts +0 -2
- package/lib/types/utils/__tests__/sdp.test.d.ts.map +0 -1
- package/lib/types/utils/__tests__/string.test.d.ts +0 -2
- package/lib/types/utils/__tests__/string.test.d.ts.map +0 -1
- package/lib/types/utils/api-requester.d.ts +0 -48
- package/lib/types/utils/array.d.ts +0 -2
- package/lib/types/utils/array.d.ts.map +0 -1
- package/lib/types/utils/compare-version.d.ts +0 -3
- package/lib/types/utils/compare-version.d.ts.map +0 -1
- package/lib/types/utils/isMobile.d.ts +0 -3
- package/lib/types/utils/isMobile.d.ts.map +0 -1
- package/lib/types/utils/new-from.d.ts +0 -3
- package/lib/types/utils/new-from.d.ts.map +0 -1
- package/lib/types/utils/object.d.ts +0 -2
- package/lib/types/utils/object.d.ts.map +0 -1
- package/lib/types/utils/once.d.ts +0 -2
- package/lib/types/utils/once.d.ts.map +0 -1
- package/lib/types/utils/sdp.d.ts +0 -28
- package/lib/types/utils/sdp.d.ts.map +0 -1
- package/lib/types/utils/string.d.ts +0 -3
- package/lib/types/utils/string.d.ts.map +0 -1
- package/lib/types/utils/update-from.d.ts +0 -3
- package/lib/types/utils/update-from.d.ts.map +0 -1
- package/lib/types/utils/webrtc.d.ts +0 -15
- package/lib/types/utils/webrtc.d.ts.map +0 -1
- package/lib/types/web-rtc-client.d.ts +0 -198
- package/lib/types/web-rtc-client.d.ts.map +0 -1
- package/lib/types/websocket-client.d.ts +0 -138
- package/lib/types/websocket-client.d.ts.map +0 -1
- package/lib/utils/Emitter.js +0 -24
- package/lib/utils/Heartbeat.js +0 -66
- package/lib/utils/PhoneNumberUtil.js +0 -73
- package/lib/utils/__tests__/Heartbeat.test.js +0 -79
- package/lib/utils/__tests__/PhoneNumberUtil.test.js +0 -72
- package/lib/utils/__tests__/api-requester.test.js +0 -180
- package/lib/utils/__tests__/array.test.js +0 -20
- package/lib/utils/__tests__/compare-version.test.js +0 -15
- package/lib/utils/__tests__/object.test.js +0 -78
- package/lib/utils/__tests__/sdp.test.js +0 -188
- package/lib/utils/__tests__/string.test.js +0 -51
- package/lib/utils/api-requester.js +0 -201
- package/lib/utils/array.js +0 -13
- package/lib/utils/compare-version.js +0 -19
- package/lib/utils/isMobile.js +0 -5
- package/lib/utils/new-from.js +0 -9
- package/lib/utils/object.js +0 -14
- package/lib/utils/once.js +0 -18
- package/lib/utils/sdp.js +0 -115
- package/lib/utils/string.js +0 -17
- package/lib/utils/update-from.js +0 -12
- package/lib/utils/webrtc.js +0 -41
- package/lib/web-rtc-client.js +0 -2239
- package/lib/websocket-client.js +0 -390
- package/src/__tests__/api-client.test.ts +0 -315
- package/src/__tests__/web-rtc-client.test.ts +0 -198
- package/src/api/agentd.ts +0 -37
- package/src/api/amid.ts +0 -25
- package/src/api/application.ts +0 -96
- package/src/api/auth.ts +0 -305
- package/src/api/call-logd.ts +0 -38
- package/src/api/calld.ts +0 -185
- package/src/api/chatd.ts +0 -87
- package/src/api/confd.ts +0 -119
- package/src/api/ctid-ng.ts +0 -152
- package/src/api/dird.ts +0 -143
- package/src/api/webhookd.ts +0 -30
- package/src/api-client.ts +0 -233
- package/src/checker/Checker.ts +0 -73
- package/src/checker/checks/aor.ts +0 -34
- package/src/checker/checks/api.ts +0 -78
- package/src/checker/checks/ice-ipv4.ts +0 -80
- package/src/checker/checks/index.ts +0 -9
- package/src/checker/checks/symmetric-nat.ts +0 -69
- package/src/checker/checks/wazo-websocket.ts +0 -41
- package/src/checker/checks/webrtc-transport.ts +0 -42
- package/src/checker/checks/webrtc.ts +0 -48
- package/src/domain/AdHocAPIConference.ts +0 -166
- package/src/domain/Agent.ts +0 -68
- package/src/domain/BadResponse.ts +0 -29
- package/src/domain/Call.ts +0 -217
- package/src/domain/CallLog.ts +0 -265
- package/src/domain/CallSession.ts +0 -401
- package/src/domain/CallerID.ts +0 -49
- package/src/domain/ChatMessage.ts +0 -107
- package/src/domain/ChatRoom.ts +0 -55
- package/src/domain/Contact.ts +0 -851
- package/src/domain/Country.ts +0 -19
- package/src/domain/Device/DebugDevice.ts +0 -44
- package/src/domain/Device/Device.ts +0 -12
- package/src/domain/DirectorySource.ts +0 -13
- package/src/domain/ExternalApp.ts +0 -46
- package/src/domain/Features.ts +0 -105
- package/src/domain/ForwardOption.ts +0 -65
- package/src/domain/Incall.ts +0 -50
- package/src/domain/IndirectTransfer.ts +0 -73
- package/src/domain/Line.ts +0 -79
- package/src/domain/Meeting.ts +0 -113
- package/src/domain/MeetingAuthorization.ts +0 -81
- package/src/domain/MeetingStatus.ts +0 -23
- package/src/domain/NotificationOptions.ts +0 -68
- package/src/domain/Phone/CTIPhone.ts +0 -381
- package/src/domain/Phone/Phone.ts +0 -81
- package/src/domain/Phone/WebRTCPhone.ts +0 -1830
- package/src/domain/Profile.ts +0 -289
- package/src/domain/Recording.ts +0 -60
- package/src/domain/Relocation.ts +0 -45
- package/src/domain/Room.ts +0 -141
- package/src/domain/SFUNotAvailableError.ts +0 -7
- package/src/domain/ServerError.ts +0 -12
- package/src/domain/Session.ts +0 -297
- package/src/domain/SipLine.ts +0 -154
- package/src/domain/Subscription.ts +0 -95
- package/src/domain/SwitchboardCall.ts +0 -127
- package/src/domain/Voicemail.ts +0 -138
- package/src/domain/__tests__/Agent.test.ts +0 -38
- package/src/domain/__tests__/Call.test.ts +0 -26
- package/src/domain/__tests__/CallLog.test.ts +0 -203
- package/src/domain/__tests__/CallSession.test.ts +0 -80
- package/src/domain/__tests__/Contact.test.ts +0 -407
- package/src/domain/__tests__/IndirectTransfer.test.ts +0 -68
- package/src/domain/__tests__/Line.test.ts +0 -53
- package/src/domain/__tests__/Meeting.test.ts +0 -93
- package/src/domain/__tests__/MeetingAuthorization.test.ts +0 -50
- package/src/domain/__tests__/Profile.test.ts +0 -170
- package/src/domain/__tests__/Room.test.ts +0 -207
- package/src/domain/__tests__/Session.test.ts +0 -385
- package/src/domain/__tests__/SipLine.test.ts +0 -30
- package/src/domain/__tests__/Voicemail.test.ts +0 -91
- package/src/domain/types.ts +0 -331
- package/src/index.ts +0 -59
- package/src/lib/WazoSessionDescriptionHandler.ts +0 -532
- package/src/pubkey.ts +0 -11
- package/src/service/CallApi.ts +0 -86
- package/src/service/IssueReporter.ts +0 -434
- package/src/service/__tests__/IssueReporter.test.ts +0 -127
- package/src/service/getApiClient.ts +0 -106
- package/src/simple/Auth.ts +0 -496
- package/src/simple/Configuration.ts +0 -18
- package/src/simple/Directory.ts +0 -16
- package/src/simple/Phone.ts +0 -531
- package/src/simple/Websocket.ts +0 -107
- package/src/simple/__tests__/Auth.test.ts +0 -168
- package/src/simple/index.ts +0 -153
- package/src/simple/room/LocalParticipant.ts +0 -5
- package/src/simple/room/Participant.ts +0 -409
- package/src/simple/room/RemoteParticipant.ts +0 -15
- package/src/simple/room/Room.ts +0 -942
- package/src/simple/room/SipRoom.ts +0 -164
- package/src/simple/room/Stream.ts +0 -64
- package/src/simple/room/__tests__/Participant.test.ts +0 -73
- package/src/simple/room/__tests__/RemoteParticipant.test.ts +0 -15
- package/src/simple/utils.ts +0 -12
- package/src/types/WebSocketMessage.ts +0 -335
- package/src/types/global.d.ts +0 -33
- package/src/types/wazo.d.ts +0 -1
- package/src/utils/Emitter.ts +0 -34
- package/src/utils/Heartbeat.ts +0 -102
- package/src/utils/PhoneNumberUtil.ts +0 -81
- package/src/utils/__tests__/Heartbeat.test.ts +0 -66
- package/src/utils/__tests__/PhoneNumberUtil.test.ts +0 -79
- package/src/utils/__tests__/api-requester.test.ts +0 -180
- package/src/utils/__tests__/array.test.ts +0 -19
- package/src/utils/__tests__/compare-version.test.ts +0 -11
- package/src/utils/__tests__/object.test.ts +0 -77
- package/src/utils/__tests__/sdp.test.ts +0 -173
- package/src/utils/__tests__/string.test.ts +0 -55
- package/src/utils/api-requester.ts +0 -295
- package/src/utils/array.ts +0 -11
- package/src/utils/compare-version.ts +0 -21
- package/src/utils/isMobile.ts +0 -4
- package/src/utils/new-from.ts +0 -7
- package/src/utils/object.ts +0 -12
- package/src/utils/once.ts +0 -14
- package/src/utils/sdp.ts +0 -140
- package/src/utils/string.ts +0 -15
- package/src/utils/update-from.ts +0 -11
- package/src/utils/webrtc.ts +0 -56
- package/src/web-rtc-client.ts +0 -2687
- package/src/websocket-client.ts +0 -475
- /package/{esm → dist}/types/__tests__/api-client.test.d.ts +0 -0
- /package/{esm → dist}/types/__tests__/api-client.test.d.ts.map +0 -0
- /package/{esm → dist}/types/__tests__/web-rtc-client.test.d.ts +0 -0
- /package/{esm → dist}/types/__tests__/web-rtc-client.test.d.ts.map +0 -0
- /package/{esm → dist}/types/api/agentd.d.ts +0 -0
- /package/{esm → dist}/types/api/agentd.d.ts.map +0 -0
- /package/{esm → dist}/types/api/amid.d.ts +0 -0
- /package/{esm → dist}/types/api/amid.d.ts.map +0 -0
- /package/{esm → dist}/types/api/application.d.ts +0 -0
- /package/{esm → dist}/types/api/application.d.ts.map +0 -0
- /package/{esm → dist}/types/api/auth.d.ts +0 -0
- /package/{esm → dist}/types/api/auth.d.ts.map +0 -0
- /package/{esm → dist}/types/api/call-logd.d.ts +0 -0
- /package/{esm → dist}/types/api/call-logd.d.ts.map +0 -0
- /package/{esm → dist}/types/api/calld.d.ts +0 -0
- /package/{esm → dist}/types/api/calld.d.ts.map +0 -0
- /package/{esm → dist}/types/api/chatd.d.ts +0 -0
- /package/{esm → dist}/types/api/chatd.d.ts.map +0 -0
- /package/{esm → dist}/types/api/confd.d.ts +0 -0
- /package/{esm → dist}/types/api/confd.d.ts.map +0 -0
- /package/{esm → dist}/types/api/ctid-ng.d.ts +0 -0
- /package/{esm → dist}/types/api/ctid-ng.d.ts.map +0 -0
- /package/{esm → dist}/types/api/dird.d.ts +0 -0
- /package/{esm → dist}/types/api/dird.d.ts.map +0 -0
- /package/{esm → dist}/types/api/webhookd.d.ts +0 -0
- /package/{esm → dist}/types/api/webhookd.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/Checker.d.ts +0 -0
- /package/{esm → dist}/types/checker/Checker.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/checks/aor.d.ts +0 -0
- /package/{esm → dist}/types/checker/checks/aor.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/checks/api.d.ts +0 -0
- /package/{esm → dist}/types/checker/checks/api.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/checks/ice-ipv4.d.ts +0 -0
- /package/{esm → dist}/types/checker/checks/ice-ipv4.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/checks/index.d.ts +0 -0
- /package/{esm → dist}/types/checker/checks/index.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/checks/symmetric-nat.d.ts +0 -0
- /package/{esm → dist}/types/checker/checks/symmetric-nat.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/checks/wazo-websocket.d.ts +0 -0
- /package/{esm → dist}/types/checker/checks/wazo-websocket.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/checks/webrtc-transport.d.ts +0 -0
- /package/{esm → dist}/types/checker/checks/webrtc-transport.d.ts.map +0 -0
- /package/{esm → dist}/types/checker/checks/webrtc.d.ts +0 -0
- /package/{esm → dist}/types/checker/checks/webrtc.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/AdHocAPIConference.d.ts +0 -0
- /package/{esm → dist}/types/domain/AdHocAPIConference.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Agent.d.ts +0 -0
- /package/{esm → dist}/types/domain/Agent.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/BadResponse.d.ts +0 -0
- /package/{esm → dist}/types/domain/BadResponse.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Call.d.ts +0 -0
- /package/{esm → dist}/types/domain/Call.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/CallLog.d.ts +0 -0
- /package/{esm → dist}/types/domain/CallLog.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/CallSession.d.ts +0 -0
- /package/{esm → dist}/types/domain/CallSession.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/CallerID.d.ts +0 -0
- /package/{esm → dist}/types/domain/CallerID.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/ChatMessage.d.ts +0 -0
- /package/{esm → dist}/types/domain/ChatMessage.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/ChatRoom.d.ts +0 -0
- /package/{esm → dist}/types/domain/ChatRoom.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Country.d.ts +0 -0
- /package/{esm → dist}/types/domain/Country.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Device/DebugDevice.d.ts +0 -0
- /package/{esm → dist}/types/domain/Device/DebugDevice.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Device/Device.d.ts +0 -0
- /package/{esm → dist}/types/domain/Device/Device.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/DirectorySource.d.ts +0 -0
- /package/{esm → dist}/types/domain/DirectorySource.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/ExternalApp.d.ts +0 -0
- /package/{esm → dist}/types/domain/ExternalApp.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Features.d.ts +0 -0
- /package/{esm → dist}/types/domain/Features.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/ForwardOption.d.ts +0 -0
- /package/{esm → dist}/types/domain/ForwardOption.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Incall.d.ts +0 -0
- /package/{esm → dist}/types/domain/Incall.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/IndirectTransfer.d.ts +0 -0
- /package/{esm → dist}/types/domain/IndirectTransfer.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Line.d.ts +0 -0
- /package/{esm → dist}/types/domain/Line.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Meeting.d.ts +0 -0
- /package/{esm → dist}/types/domain/Meeting.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/MeetingAuthorization.d.ts +0 -0
- /package/{esm → dist}/types/domain/MeetingAuthorization.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/MeetingStatus.d.ts +0 -0
- /package/{esm → dist}/types/domain/MeetingStatus.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/NotificationOptions.d.ts +0 -0
- /package/{esm → dist}/types/domain/NotificationOptions.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Phone/CTIPhone.d.ts +0 -0
- /package/{esm → dist}/types/domain/Phone/CTIPhone.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Phone/Phone.d.ts +0 -0
- /package/{esm → dist}/types/domain/Phone/Phone.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Phone/WebRTCPhone.d.ts +0 -0
- /package/{esm → dist}/types/domain/Phone/WebRTCPhone.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Profile.d.ts +0 -0
- /package/{esm → dist}/types/domain/Profile.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Recording.d.ts +0 -0
- /package/{esm → dist}/types/domain/Recording.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Relocation.d.ts +0 -0
- /package/{esm → dist}/types/domain/Relocation.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Room.d.ts +0 -0
- /package/{esm → dist}/types/domain/Room.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/SFUNotAvailableError.d.ts +0 -0
- /package/{esm → dist}/types/domain/SFUNotAvailableError.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/ServerError.d.ts +0 -0
- /package/{esm → dist}/types/domain/ServerError.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Session.d.ts +0 -0
- /package/{esm → dist}/types/domain/Session.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/SipLine.d.ts +0 -0
- /package/{esm → dist}/types/domain/SipLine.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Subscription.d.ts +0 -0
- /package/{esm → dist}/types/domain/Subscription.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/SwitchboardCall.d.ts +0 -0
- /package/{esm → dist}/types/domain/SwitchboardCall.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/Voicemail.d.ts +0 -0
- /package/{esm → dist}/types/domain/Voicemail.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Agent.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Agent.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Call.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Call.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/CallLog.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/CallLog.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/CallSession.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/CallSession.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Contact.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Contact.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/IndirectTransfer.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/IndirectTransfer.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Line.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Line.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Meeting.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Meeting.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/MeetingAuthorization.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/MeetingAuthorization.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Profile.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Profile.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Room.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Room.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Session.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Session.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/SipLine.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/SipLine.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/__tests__/Voicemail.test.d.ts +0 -0
- /package/{esm → dist}/types/domain/__tests__/Voicemail.test.d.ts.map +0 -0
- /package/{esm → dist}/types/domain/types.d.ts +0 -0
- /package/{esm → dist}/types/domain/types.d.ts.map +0 -0
- /package/{esm → dist}/types/lib/WazoSessionDescriptionHandler.d.ts +0 -0
- /package/{esm → dist}/types/lib/WazoSessionDescriptionHandler.d.ts.map +0 -0
- /package/{esm → dist}/types/pubkey.d.ts +0 -0
- /package/{esm → dist}/types/pubkey.d.ts.map +0 -0
- /package/{esm → dist}/types/service/CallApi.d.ts +0 -0
- /package/{esm → dist}/types/service/CallApi.d.ts.map +0 -0
- /package/{esm → dist}/types/service/IssueReporter.d.ts +0 -0
- /package/{esm → dist}/types/service/IssueReporter.d.ts.map +0 -0
- /package/{esm → dist}/types/service/__tests__/IssueReporter.test.d.ts +0 -0
- /package/{esm → dist}/types/service/__tests__/IssueReporter.test.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/Auth.d.ts +0 -0
- /package/{esm → dist}/types/simple/Auth.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/Configuration.d.ts +0 -0
- /package/{esm → dist}/types/simple/Configuration.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/Directory.d.ts +0 -0
- /package/{esm → dist}/types/simple/Directory.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/Phone.d.ts +0 -0
- /package/{esm → dist}/types/simple/Phone.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/Websocket.d.ts +0 -0
- /package/{esm → dist}/types/simple/Websocket.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/__tests__/Auth.test.d.ts +0 -0
- /package/{esm → dist}/types/simple/__tests__/Auth.test.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/index.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/room/LocalParticipant.d.ts +0 -0
- /package/{esm → dist}/types/simple/room/LocalParticipant.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/room/Participant.d.ts +0 -0
- /package/{esm → dist}/types/simple/room/Participant.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/room/RemoteParticipant.d.ts +0 -0
- /package/{esm → dist}/types/simple/room/RemoteParticipant.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/room/Room.d.ts +0 -0
- /package/{esm → dist}/types/simple/room/Room.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/room/SipRoom.d.ts +0 -0
- /package/{esm → dist}/types/simple/room/SipRoom.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/room/Stream.d.ts +0 -0
- /package/{esm → dist}/types/simple/room/Stream.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/room/__tests__/Participant.test.d.ts +0 -0
- /package/{esm → dist}/types/simple/room/__tests__/Participant.test.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/room/__tests__/RemoteParticipant.test.d.ts +0 -0
- /package/{esm → dist}/types/simple/room/__tests__/RemoteParticipant.test.d.ts.map +0 -0
- /package/{esm → dist}/types/simple/utils.d.ts +0 -0
- /package/{esm → dist}/types/simple/utils.d.ts.map +0 -0
- /package/{esm → dist}/types/types/WebSocketMessage.d.ts +0 -0
- /package/{esm → dist}/types/types/WebSocketMessage.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/Emitter.d.ts +0 -0
- /package/{esm → dist}/types/utils/Emitter.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/Heartbeat.d.ts +0 -0
- /package/{esm → dist}/types/utils/Heartbeat.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/PhoneNumberUtil.d.ts +0 -0
- /package/{esm → dist}/types/utils/PhoneNumberUtil.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/__tests__/Heartbeat.test.d.ts +0 -0
- /package/{esm → dist}/types/utils/__tests__/Heartbeat.test.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/__tests__/PhoneNumberUtil.test.d.ts +0 -0
- /package/{esm → dist}/types/utils/__tests__/PhoneNumberUtil.test.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/__tests__/api-requester.test.d.ts +0 -0
- /package/{esm → dist}/types/utils/__tests__/api-requester.test.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/__tests__/array.test.d.ts +0 -0
- /package/{esm → dist}/types/utils/__tests__/array.test.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/__tests__/compare-version.test.d.ts +0 -0
- /package/{esm → dist}/types/utils/__tests__/compare-version.test.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/__tests__/object.test.d.ts +0 -0
- /package/{esm → dist}/types/utils/__tests__/object.test.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/__tests__/sdp.test.d.ts +0 -0
- /package/{esm → dist}/types/utils/__tests__/sdp.test.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/__tests__/string.test.d.ts +0 -0
- /package/{esm → dist}/types/utils/__tests__/string.test.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/api-requester.d.ts +0 -0
- /package/{esm → dist}/types/utils/array.d.ts +0 -0
- /package/{esm → dist}/types/utils/array.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/compare-version.d.ts +0 -0
- /package/{esm → dist}/types/utils/compare-version.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/isMobile.d.ts +0 -0
- /package/{esm → dist}/types/utils/isMobile.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/new-from.d.ts +0 -0
- /package/{esm → dist}/types/utils/new-from.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/object.d.ts +0 -0
- /package/{esm → dist}/types/utils/object.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/once.d.ts +0 -0
- /package/{esm → dist}/types/utils/once.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/sdp.d.ts +0 -0
- /package/{esm → dist}/types/utils/sdp.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/string.d.ts +0 -0
- /package/{esm → dist}/types/utils/string.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/update-from.d.ts +0 -0
- /package/{esm → dist}/types/utils/update-from.d.ts.map +0 -0
- /package/{esm → dist}/types/utils/webrtc.d.ts +0 -0
- /package/{esm → dist}/types/utils/webrtc.d.ts.map +0 -0
- /package/{esm → dist}/types/web-rtc-client.d.ts +0 -0
- /package/{esm → dist}/types/web-rtc-client.d.ts.map +0 -0
- /package/{esm → dist}/types/websocket-client.d.ts +0 -0
- /package/{esm → dist}/types/websocket-client.d.ts.map +0 -0
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
const BadResponse_1 = __importDefault(require("../../domain/BadResponse"));
|
|
39
|
-
const ServerError_1 = __importDefault(require("../../domain/ServerError"));
|
|
40
|
-
const getApiClient_1 = __importStar(require("../../service/getApiClient"));
|
|
41
|
-
const Auth_1 = require("../Auth");
|
|
42
|
-
const Auth = new Auth_1.Auth();
|
|
43
|
-
const TOKEN = 'some-token';
|
|
44
|
-
const REFRESH_TOKEN = 'some-refresh-token';
|
|
45
|
-
const USER_UUID = 'some-user-uuid';
|
|
46
|
-
jest.mock('../../service/getApiClient');
|
|
47
|
-
describe('simple/Auth', () => {
|
|
48
|
-
beforeEach(() => {
|
|
49
|
-
const authenticate = jest.fn();
|
|
50
|
-
getApiClient_1.default.mockImplementation(() => ({
|
|
51
|
-
auth: {
|
|
52
|
-
authenticate,
|
|
53
|
-
},
|
|
54
|
-
}));
|
|
55
|
-
});
|
|
56
|
-
afterEach(() => {
|
|
57
|
-
jest.restoreAllMocks();
|
|
58
|
-
});
|
|
59
|
-
describe('validateToken', () => {
|
|
60
|
-
it('should return undefined if nullish', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
61
|
-
// @ts-expect-error
|
|
62
|
-
const result = yield Auth.validateToken(null);
|
|
63
|
-
expect(result).toEqual(undefined);
|
|
64
|
-
}));
|
|
65
|
-
it('should set refresh token if provided', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
-
yield Auth.validateToken(TOKEN, REFRESH_TOKEN);
|
|
67
|
-
expect(getApiClient_1.setRefreshToken).toHaveBeenCalledWith(REFRESH_TOKEN);
|
|
68
|
-
}));
|
|
69
|
-
it('should set user uuid header when using edge server', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
|
-
Auth.usingEdgeServer = true;
|
|
71
|
-
const setHttpUserUuidHeader = jest.spyOn(Auth, 'setHttpUserUuidHeader');
|
|
72
|
-
yield Auth.validateToken(TOKEN, undefined, USER_UUID);
|
|
73
|
-
expect(setHttpUserUuidHeader).toHaveBeenCalledWith(USER_UUID);
|
|
74
|
-
}));
|
|
75
|
-
it('should NOT set user uuid header when NOT using edge server', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
-
Auth.usingEdgeServer = false;
|
|
77
|
-
const setHttpUserUuidHeader = jest.spyOn(Auth, 'setHttpUserUuidHeader');
|
|
78
|
-
yield Auth.validateToken(TOKEN, undefined, USER_UUID);
|
|
79
|
-
expect(setHttpUserUuidHeader).not.toHaveBeenCalled();
|
|
80
|
-
}));
|
|
81
|
-
});
|
|
82
|
-
describe('checkHttpUserUuidHeader', () => {
|
|
83
|
-
it('should return undefined if UUID is null', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
84
|
-
const result = yield Auth.checkHttpUserUuidHeader(null);
|
|
85
|
-
expect(result).toEqual(undefined);
|
|
86
|
-
}));
|
|
87
|
-
it('should set user UUID header on successful HEAD call', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
88
|
-
const head = jest.fn(() => Promise.resolve({ headers: { get: () => null } }));
|
|
89
|
-
const setHttpUserUuidHeader = jest.spyOn(Auth, 'setHttpUserUuidHeader');
|
|
90
|
-
Auth.onSetUsingEdgeServer = jest.fn();
|
|
91
|
-
getApiClient_1.default.mockImplementation(() => ({
|
|
92
|
-
client: {
|
|
93
|
-
head,
|
|
94
|
-
},
|
|
95
|
-
}));
|
|
96
|
-
yield Auth.checkHttpUserUuidHeader(USER_UUID);
|
|
97
|
-
expect(head).toHaveBeenCalled();
|
|
98
|
-
expect(setHttpUserUuidHeader).toHaveBeenCalledWith(USER_UUID);
|
|
99
|
-
expect(Auth.usingEdgeServer).toEqual(true);
|
|
100
|
-
expect(Auth.onSetUsingEdgeServer).toHaveBeenCalledWith(true);
|
|
101
|
-
}));
|
|
102
|
-
it('should NOT set user UUID header on failed HEAD call', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
-
const head = jest.fn(() => Promise.reject());
|
|
104
|
-
const setHttpUserUuidHeader = jest.spyOn(Auth, 'setHttpUserUuidHeader');
|
|
105
|
-
Auth.onSetUsingEdgeServer = jest.fn();
|
|
106
|
-
getApiClient_1.default.mockImplementation(() => ({
|
|
107
|
-
client: {
|
|
108
|
-
head,
|
|
109
|
-
},
|
|
110
|
-
}));
|
|
111
|
-
yield Auth.checkHttpUserUuidHeader(USER_UUID);
|
|
112
|
-
expect(head).toHaveBeenCalled();
|
|
113
|
-
expect(setHttpUserUuidHeader).not.toHaveBeenCalled();
|
|
114
|
-
expect(Auth.usingEdgeServer).toEqual(false);
|
|
115
|
-
expect(Auth.onSetUsingEdgeServer).toHaveBeenCalledWith(false);
|
|
116
|
-
}));
|
|
117
|
-
it('should set user UUID header on mobile when header is present', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
118
|
-
Auth.mobile = true;
|
|
119
|
-
const head = jest.fn(() => Promise.resolve({ headers: { get: () => 'X-User-UUID: something' } }));
|
|
120
|
-
const setHttpUserUuidHeader = jest.spyOn(Auth, 'setHttpUserUuidHeader');
|
|
121
|
-
Auth.onSetUsingEdgeServer = jest.fn();
|
|
122
|
-
getApiClient_1.default.mockImplementation(() => ({
|
|
123
|
-
client: {
|
|
124
|
-
head,
|
|
125
|
-
},
|
|
126
|
-
}));
|
|
127
|
-
yield Auth.checkHttpUserUuidHeader(USER_UUID);
|
|
128
|
-
expect(head).toHaveBeenCalled();
|
|
129
|
-
expect(setHttpUserUuidHeader).toHaveBeenCalledWith(USER_UUID);
|
|
130
|
-
expect(Auth.usingEdgeServer).toEqual(true);
|
|
131
|
-
expect(Auth.onSetUsingEdgeServer).toHaveBeenCalledWith(true);
|
|
132
|
-
}));
|
|
133
|
-
it('should NOT set user UUID header on mobile when header is NOT present', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
134
|
-
Auth.mobile = true;
|
|
135
|
-
const head = jest.fn(() => Promise.resolve({ headers: { get: () => 'something' } }));
|
|
136
|
-
const setHttpUserUuidHeader = jest.spyOn(Auth, 'setHttpUserUuidHeader');
|
|
137
|
-
Auth.onSetUsingEdgeServer = jest.fn();
|
|
138
|
-
getApiClient_1.default.mockImplementation(() => ({
|
|
139
|
-
client: {
|
|
140
|
-
head,
|
|
141
|
-
},
|
|
142
|
-
}));
|
|
143
|
-
yield Auth.checkHttpUserUuidHeader(USER_UUID);
|
|
144
|
-
expect(head).toHaveBeenCalled();
|
|
145
|
-
expect(setHttpUserUuidHeader).not.toHaveBeenCalled();
|
|
146
|
-
expect(Auth.usingEdgeServer).toEqual(false);
|
|
147
|
-
expect(Auth.onSetUsingEdgeServer).toHaveBeenCalledWith(false);
|
|
148
|
-
}));
|
|
149
|
-
});
|
|
150
|
-
describe('initiateIdpAuthentication', () => {
|
|
151
|
-
const validResponse = { location: 'idp.com/auth', saml_session_id: 'a1b2C3d4' };
|
|
152
|
-
it('should return a `location` and `saml_session_id` if the response is valid', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
153
|
-
const initiateIdpAuthentication = jest.fn(() => validResponse);
|
|
154
|
-
getApiClient_1.default.mockImplementation(() => ({
|
|
155
|
-
auth: {
|
|
156
|
-
initiateIdpAuthentication,
|
|
157
|
-
},
|
|
158
|
-
}));
|
|
159
|
-
const response = yield Auth.initiateIdpAuthentication('example.com', 'https://myapp.xyz');
|
|
160
|
-
expect(response).toBe(validResponse);
|
|
161
|
-
}));
|
|
162
|
-
it('should return a `NoSamlRouteError` if the response is a 404', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
163
|
-
const initiateIdpAuthentication = jest.fn(() => { throw BadResponse_1.default.fromText('an error message', 404); });
|
|
164
|
-
getApiClient_1.default.mockImplementation(() => ({
|
|
165
|
-
auth: {
|
|
166
|
-
initiateIdpAuthentication,
|
|
167
|
-
},
|
|
168
|
-
}));
|
|
169
|
-
yield expect(Auth.initiateIdpAuthentication('example.com', 'https://myapp.xyz')).rejects.toThrow('No route found for SAML SSO');
|
|
170
|
-
}));
|
|
171
|
-
it('should return a `SamlConfigError` if the response is a 500', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
172
|
-
const initiateIdpAuthentication = jest.fn(() => { throw ServerError_1.default.fromText('an error message', 500); });
|
|
173
|
-
getApiClient_1.default.mockImplementation(() => ({
|
|
174
|
-
auth: {
|
|
175
|
-
initiateIdpAuthentication,
|
|
176
|
-
},
|
|
177
|
-
}));
|
|
178
|
-
yield expect(Auth.initiateIdpAuthentication('example.com', 'https://myapp.xyz')).rejects.toThrow('SAML/server configuration error');
|
|
179
|
-
}));
|
|
180
|
-
});
|
|
181
|
-
});
|
package/lib/simple/index.js
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
/* eslint-disable import/no-named-as-default */
|
|
30
|
-
/* global window */
|
|
31
|
-
const Auth_1 = __importStar(require("./Auth"));
|
|
32
|
-
const Phone_1 = __importDefault(require("./Phone"));
|
|
33
|
-
const Websocket_1 = __importDefault(require("./Websocket"));
|
|
34
|
-
const Room_1 = __importDefault(require("./room/Room"));
|
|
35
|
-
const SipRoom_1 = __importDefault(require("./room/SipRoom"));
|
|
36
|
-
const RemoteParticipant_1 = __importDefault(require("./room/RemoteParticipant"));
|
|
37
|
-
const LocalParticipant_1 = __importDefault(require("./room/LocalParticipant"));
|
|
38
|
-
const Participant_1 = __importDefault(require("./room/Participant"));
|
|
39
|
-
const Stream_1 = __importDefault(require("./room/Stream"));
|
|
40
|
-
const Directory_1 = __importDefault(require("./Directory"));
|
|
41
|
-
const Configuration_1 = __importDefault(require("./Configuration"));
|
|
42
|
-
const getApiClient_1 = __importDefault(require("../service/getApiClient"));
|
|
43
|
-
const utils_1 = require("./utils");
|
|
44
|
-
const web_rtc_client_1 = require("../web-rtc-client");
|
|
45
|
-
const BadResponse_1 = __importDefault(require("../domain/BadResponse"));
|
|
46
|
-
const ServerError_1 = __importDefault(require("../domain/ServerError"));
|
|
47
|
-
const SFUNotAvailableError_1 = __importDefault(require("../domain/SFUNotAvailableError"));
|
|
48
|
-
const Call_1 = __importDefault(require("../domain/Call"));
|
|
49
|
-
const CallLog_1 = __importDefault(require("../domain/CallLog"));
|
|
50
|
-
const Recording_1 = __importDefault(require("../domain/Recording"));
|
|
51
|
-
const ChatMessage_1 = __importDefault(require("../domain/ChatMessage"));
|
|
52
|
-
const ChatRoom_1 = __importDefault(require("../domain/ChatRoom"));
|
|
53
|
-
const Contact_1 = __importDefault(require("../domain/Contact"));
|
|
54
|
-
const ForwardOption_1 = __importDefault(require("../domain/ForwardOption"));
|
|
55
|
-
const Line_1 = __importDefault(require("../domain/Line"));
|
|
56
|
-
const NotificationOptions_1 = __importDefault(require("../domain/NotificationOptions"));
|
|
57
|
-
const Profile_1 = __importDefault(require("../domain/Profile"));
|
|
58
|
-
const Session_1 = __importDefault(require("../domain/Session"));
|
|
59
|
-
const Voicemail_1 = __importDefault(require("../domain/Voicemail"));
|
|
60
|
-
const Relocation_1 = __importDefault(require("../domain/Relocation"));
|
|
61
|
-
const Room_2 = __importDefault(require("../domain/Room"));
|
|
62
|
-
const CallSession_1 = __importDefault(require("../domain/CallSession"));
|
|
63
|
-
const WebRTCPhone_1 = __importDefault(require("../domain/Phone/WebRTCPhone"));
|
|
64
|
-
const CTIPhone_1 = __importDefault(require("../domain/Phone/CTIPhone"));
|
|
65
|
-
const IndirectTransfer_1 = __importDefault(require("../domain/IndirectTransfer"));
|
|
66
|
-
const SwitchboardCall_1 = __importDefault(require("../domain/SwitchboardCall"));
|
|
67
|
-
const IssueReporter_1 = __importDefault(require("../service/IssueReporter"));
|
|
68
|
-
const Features_1 = __importDefault(require("../domain/Features"));
|
|
69
|
-
const Meeting_1 = __importDefault(require("../domain/Meeting"));
|
|
70
|
-
const Checker_1 = __importDefault(require("../checker/Checker"));
|
|
71
|
-
const Wazo = {
|
|
72
|
-
Auth: Auth_1.default,
|
|
73
|
-
Phone: Phone_1.default,
|
|
74
|
-
Websocket: Websocket_1.default,
|
|
75
|
-
Room: Room_1.default,
|
|
76
|
-
SipRoom: SipRoom_1.default,
|
|
77
|
-
RemoteParticipant: RemoteParticipant_1.default,
|
|
78
|
-
LocalParticipant: LocalParticipant_1.default,
|
|
79
|
-
Participant: Participant_1.default,
|
|
80
|
-
Stream: Stream_1.default,
|
|
81
|
-
createLocalVideoStream: utils_1.createLocalVideoStream,
|
|
82
|
-
createLocalAudioStream: utils_1.createLocalAudioStream,
|
|
83
|
-
Configuration: Configuration_1.default,
|
|
84
|
-
Directory: Directory_1.default,
|
|
85
|
-
getApiClient: getApiClient_1.default,
|
|
86
|
-
IssueReporter: IssueReporter_1.default,
|
|
87
|
-
loggerFor: IssueReporter_1.default.loggerFor.bind(IssueReporter_1.default),
|
|
88
|
-
Features: Features_1.default,
|
|
89
|
-
Checker: Checker_1.default,
|
|
90
|
-
// Domain
|
|
91
|
-
domain: {
|
|
92
|
-
BadResponse: BadResponse_1.default,
|
|
93
|
-
ServerError: ServerError_1.default,
|
|
94
|
-
Call: Call_1.default,
|
|
95
|
-
CallLog: CallLog_1.default,
|
|
96
|
-
CTIPhone: CTIPhone_1.default,
|
|
97
|
-
Recording: Recording_1.default,
|
|
98
|
-
ChatMessage: ChatMessage_1.default,
|
|
99
|
-
ChatRoom: ChatRoom_1.default,
|
|
100
|
-
Contact: Contact_1.default,
|
|
101
|
-
ForwardOption: ForwardOption_1.default,
|
|
102
|
-
Line: Line_1.default,
|
|
103
|
-
NotificationOptions: NotificationOptions_1.default,
|
|
104
|
-
Profile: Profile_1.default,
|
|
105
|
-
Session: Session_1.default,
|
|
106
|
-
Voicemail: Voicemail_1.default,
|
|
107
|
-
Relocation: Relocation_1.default,
|
|
108
|
-
ConferenceRoom: Room_2.default,
|
|
109
|
-
CallSession: CallSession_1.default,
|
|
110
|
-
IndirectTransfer: IndirectTransfer_1.default,
|
|
111
|
-
SwitchboardCall: SwitchboardCall_1.default,
|
|
112
|
-
WebRTCPhone: WebRTCPhone_1.default,
|
|
113
|
-
Meeting: Meeting_1.default,
|
|
114
|
-
},
|
|
115
|
-
// Api
|
|
116
|
-
get api() {
|
|
117
|
-
return (0, getApiClient_1.default)();
|
|
118
|
-
},
|
|
119
|
-
get agentd() {
|
|
120
|
-
return (0, getApiClient_1.default)().agentd;
|
|
121
|
-
},
|
|
122
|
-
get amid() {
|
|
123
|
-
return (0, getApiClient_1.default)().amid;
|
|
124
|
-
},
|
|
125
|
-
get application() {
|
|
126
|
-
return (0, getApiClient_1.default)().application;
|
|
127
|
-
},
|
|
128
|
-
get auth() {
|
|
129
|
-
return (0, getApiClient_1.default)().auth;
|
|
130
|
-
},
|
|
131
|
-
get callLogd() {
|
|
132
|
-
return (0, getApiClient_1.default)().callLogd;
|
|
133
|
-
},
|
|
134
|
-
get calld() {
|
|
135
|
-
return (0, getApiClient_1.default)().calld;
|
|
136
|
-
},
|
|
137
|
-
get chatd() {
|
|
138
|
-
return (0, getApiClient_1.default)().chatd;
|
|
139
|
-
},
|
|
140
|
-
get confd() {
|
|
141
|
-
return (0, getApiClient_1.default)().confd;
|
|
142
|
-
},
|
|
143
|
-
get dird() {
|
|
144
|
-
return (0, getApiClient_1.default)().dird;
|
|
145
|
-
},
|
|
146
|
-
get webhookd() {
|
|
147
|
-
return (0, getApiClient_1.default)().webhookd;
|
|
148
|
-
},
|
|
149
|
-
// Error
|
|
150
|
-
InvalidSubscription: Auth_1.InvalidSubscription,
|
|
151
|
-
InvalidAuthorization: Auth_1.InvalidAuthorization,
|
|
152
|
-
CanceledCallError: web_rtc_client_1.CanceledCallError,
|
|
153
|
-
SFUNotAvailableError: SFUNotAvailableError_1.default,
|
|
154
|
-
NoTenantIdError: Auth_1.NoTenantIdError,
|
|
155
|
-
NoDomainNameError: Auth_1.NoDomainNameError,
|
|
156
|
-
NoSamlRouteError: Auth_1.NoSamlRouteError,
|
|
157
|
-
SamlConfigError: Auth_1.SamlConfigError,
|
|
158
|
-
};
|
|
159
|
-
if (typeof window !== 'undefined') {
|
|
160
|
-
window.Wazo = Wazo;
|
|
161
|
-
}
|
|
162
|
-
if (typeof global !== 'undefined') {
|
|
163
|
-
global.Wazo = Wazo;
|
|
164
|
-
}
|
|
165
|
-
exports.default = Wazo;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Participant_1 = __importDefault(require("./Participant"));
|
|
7
|
-
class LocalParticipant extends Participant_1.default {
|
|
8
|
-
}
|
|
9
|
-
exports.default = LocalParticipant;
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const Emitter_1 = __importDefault(require("../../utils/Emitter"));
|
|
16
|
-
const IssueReporter_1 = __importDefault(require("../../service/IssueReporter"));
|
|
17
|
-
// eslint-disable-next-line import/no-named-as-default
|
|
18
|
-
const Phone_1 = __importDefault(require("../Phone"));
|
|
19
|
-
const Room_1 = require("./Room");
|
|
20
|
-
const Contact_1 = __importDefault(require("../../domain/Contact"));
|
|
21
|
-
const getApiClient_1 = __importDefault(require("../../service/getApiClient"));
|
|
22
|
-
const logger = IssueReporter_1.default.loggerFor('room');
|
|
23
|
-
class Participant extends Emitter_1.default {
|
|
24
|
-
/**
|
|
25
|
-
* @param room Room The room where the participant is
|
|
26
|
-
* @param rawParticipant string Participant sent via the Wazo WS
|
|
27
|
-
* @param extra Object extra status of the participant
|
|
28
|
-
*/
|
|
29
|
-
constructor(room, rawParticipant, extra = {}) {
|
|
30
|
-
super();
|
|
31
|
-
this.room = room;
|
|
32
|
-
this.uuid = rawParticipant.user_uuid;
|
|
33
|
-
this.name = (rawParticipant.caller_id_name || '').replace("\\'", "'");
|
|
34
|
-
this.number = rawParticipant.caller_id_number;
|
|
35
|
-
this.callId = rawParticipant.call_id;
|
|
36
|
-
this.isTalking = false;
|
|
37
|
-
this.streams = [];
|
|
38
|
-
this.videoStreams = [];
|
|
39
|
-
this.audioMuted = false;
|
|
40
|
-
this.videoMuted = false;
|
|
41
|
-
this.screensharing = false;
|
|
42
|
-
this.isOnHold = false;
|
|
43
|
-
this.extra = extra;
|
|
44
|
-
this.banned = false;
|
|
45
|
-
this.ON_UPDATED = 'participant/ON_UPDATED';
|
|
46
|
-
this.ON_START_TALKING = 'participant/ON_START_TALKING';
|
|
47
|
-
this.ON_STOP_TALKING = 'participant/ON_STOP_TALKING';
|
|
48
|
-
this.ON_DISCONNECT = 'participant/ON_DISCONNECT';
|
|
49
|
-
this.ON_STREAM_SUBSCRIBED = 'participant/ON_STREAM_SUBSCRIBED';
|
|
50
|
-
this.ON_STREAM_UNSUBSCRIBED = 'participant/ON_STREAM_UNSUBSCRIBED';
|
|
51
|
-
this.ON_AUDIO_MUTED = 'participant/ON_AUDIO_MUTED';
|
|
52
|
-
this.ON_AUDIO_UNMUTED = 'participant/ON_AUDIO_UNMUTED';
|
|
53
|
-
this.ON_VIDEO_MUTED = 'participant/ON_VIDEO_MUTED';
|
|
54
|
-
this.ON_VIDEO_UNMUTED = 'participant/ON_VIDEO_UNMUTED';
|
|
55
|
-
this.ON_SCREENSHARING = 'participant/ON_SCREENSHARING';
|
|
56
|
-
this.ON_STOP_SCREENSHARING = 'participant/ON_STOP_SCREENSHARING';
|
|
57
|
-
this.ON_EXTRA_CHANGE = 'participant/ON_EXTRA_CHANGE';
|
|
58
|
-
this.ON_HOLD = 'participant/ON_HOLD';
|
|
59
|
-
this.ON_RESUME = 'participant/ON_RESUME';
|
|
60
|
-
this.ON_BAN = 'participant/ON_BAN';
|
|
61
|
-
}
|
|
62
|
-
triggerEvent(name, ...args) {
|
|
63
|
-
this.eventEmitter.emit.apply(this.eventEmitter, [name, ...args]);
|
|
64
|
-
this.eventEmitter.emit.apply(this.eventEmitter, [this.ON_UPDATED, ...args]);
|
|
65
|
-
}
|
|
66
|
-
triggerUpdate(eventType, broadcast = true) {
|
|
67
|
-
const status = {
|
|
68
|
-
callId: this.callId,
|
|
69
|
-
};
|
|
70
|
-
switch (eventType) {
|
|
71
|
-
case this.ON_START_TALKING:
|
|
72
|
-
case this.ON_STOP_TALKING:
|
|
73
|
-
{
|
|
74
|
-
status.isTalking = this.isTalking;
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
case this.ON_AUDIO_MUTED:
|
|
78
|
-
case this.ON_AUDIO_UNMUTED:
|
|
79
|
-
{
|
|
80
|
-
status.audioMuted = this.audioMuted;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
case this.ON_VIDEO_MUTED:
|
|
84
|
-
case this.ON_VIDEO_UNMUTED:
|
|
85
|
-
{
|
|
86
|
-
status.videoMuted = this.videoMuted;
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
case this.ON_SCREENSHARING:
|
|
90
|
-
case this.ON_STOP_SCREENSHARING:
|
|
91
|
-
{
|
|
92
|
-
status.screensharing = this.screensharing;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
case this.ON_HOLD:
|
|
96
|
-
case this.ON_RESUME:
|
|
97
|
-
{
|
|
98
|
-
status.isOnHold = this.isOnHold;
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
case this.ON_EXTRA_CHANGE:
|
|
102
|
-
{
|
|
103
|
-
status.extra = this.extra;
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
case this.ON_BAN:
|
|
107
|
-
{
|
|
108
|
-
status.banned = true;
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
default:
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
if (broadcast) {
|
|
115
|
-
this.broadcastStatus(status);
|
|
116
|
-
}
|
|
117
|
-
this.eventEmitter.emit(eventType, status);
|
|
118
|
-
this.eventEmitter.emit(this.ON_UPDATED, eventType, status);
|
|
119
|
-
}
|
|
120
|
-
onTalking(isTalking) {
|
|
121
|
-
logger.info('on participant talking', {
|
|
122
|
-
name: this.name,
|
|
123
|
-
isTalking,
|
|
124
|
-
callId: this.callId,
|
|
125
|
-
});
|
|
126
|
-
this.isTalking = isTalking;
|
|
127
|
-
// you may notice we're not broadcasting: since all participants are getting this info
|
|
128
|
-
// directly from asterisk, there's no need to do so
|
|
129
|
-
this.triggerUpdate(this.isTalking ? this.ON_START_TALKING : this.ON_STOP_TALKING, false);
|
|
130
|
-
}
|
|
131
|
-
onDisconnect() {
|
|
132
|
-
return this.triggerEvent(this.ON_DISCONNECT);
|
|
133
|
-
}
|
|
134
|
-
onStreamSubscribed(stream) {
|
|
135
|
-
return this.triggerEvent(this.ON_STREAM_SUBSCRIBED, stream);
|
|
136
|
-
}
|
|
137
|
-
onStreamUnSubscribed(stream) {
|
|
138
|
-
return this.triggerEvent(this.ON_STREAM_UNSUBSCRIBED, stream);
|
|
139
|
-
}
|
|
140
|
-
onAudioMuted(broadcast = true) {
|
|
141
|
-
if (this.audioMuted) {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
this.audioMuted = true;
|
|
145
|
-
this.triggerUpdate(this.ON_AUDIO_MUTED, broadcast);
|
|
146
|
-
}
|
|
147
|
-
onAudioUnMuted(broadcast = true) {
|
|
148
|
-
if (!this.audioMuted) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
this.audioMuted = false;
|
|
152
|
-
this.triggerUpdate(this.ON_AUDIO_UNMUTED, broadcast);
|
|
153
|
-
}
|
|
154
|
-
onVideoMuted(broadcast = true) {
|
|
155
|
-
if (this.videoMuted) {
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
this.videoMuted = true;
|
|
159
|
-
this.triggerUpdate(this.ON_VIDEO_MUTED, broadcast);
|
|
160
|
-
}
|
|
161
|
-
onVideoUnMuted(broadcast = true) {
|
|
162
|
-
if (!this.videoMuted) {
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
this.videoMuted = false;
|
|
166
|
-
this.triggerUpdate(this.ON_VIDEO_UNMUTED, broadcast);
|
|
167
|
-
}
|
|
168
|
-
onScreensharing(broadcast = true) {
|
|
169
|
-
if (this.screensharing) {
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
this.screensharing = true;
|
|
173
|
-
this.triggerUpdate(this.ON_SCREENSHARING, broadcast);
|
|
174
|
-
}
|
|
175
|
-
onStopScreensharing(broadcast = true) {
|
|
176
|
-
if (!this.screensharing) {
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
this.screensharing = false;
|
|
180
|
-
this.triggerUpdate(this.ON_STOP_SCREENSHARING, broadcast);
|
|
181
|
-
}
|
|
182
|
-
onHold(broadcast = true) {
|
|
183
|
-
if (this.isOnHold) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
this.isOnHold = true;
|
|
187
|
-
this.triggerUpdate(this.ON_HOLD, broadcast);
|
|
188
|
-
}
|
|
189
|
-
onResume(broadcast = true) {
|
|
190
|
-
if (!this.isOnHold) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
this.isOnHold = false;
|
|
194
|
-
this.triggerUpdate(this.ON_RESUME, broadcast);
|
|
195
|
-
}
|
|
196
|
-
onBan(broadcast = true) {
|
|
197
|
-
this.banned = true;
|
|
198
|
-
this.triggerUpdate(this.ON_BAN, broadcast);
|
|
199
|
-
}
|
|
200
|
-
getStatus() {
|
|
201
|
-
return {
|
|
202
|
-
callId: this.callId,
|
|
203
|
-
audioMuted: this.audioMuted,
|
|
204
|
-
videoMuted: this.videoMuted,
|
|
205
|
-
screensharing: this.screensharing,
|
|
206
|
-
isTalking: this.isTalking,
|
|
207
|
-
extra: this.extra,
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
updateStatus(status, broadcast = true) {
|
|
211
|
-
logger.info('updating participant status', {
|
|
212
|
-
name: this.name,
|
|
213
|
-
status,
|
|
214
|
-
});
|
|
215
|
-
if (typeof status.audioMuted !== 'undefined' && status.audioMuted !== this.audioMuted) {
|
|
216
|
-
if (status.audioMuted) {
|
|
217
|
-
this.onAudioMuted(broadcast);
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
this.onAudioUnMuted(broadcast);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
if (typeof status.videoMuted !== 'undefined' && status.videoMuted !== this.videoMuted) {
|
|
224
|
-
if (status.videoMuted) {
|
|
225
|
-
this.onVideoMuted(broadcast);
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
this.onVideoUnMuted(broadcast);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
if (typeof status.screensharing !== 'undefined' && status.screensharing !== this.screensharing) {
|
|
232
|
-
if (status.screensharing) {
|
|
233
|
-
this.onScreensharing(broadcast);
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
this.onStopScreensharing(broadcast);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
if (typeof status.isOnHold !== 'undefined' && status.isOnHold !== this.isOnHold) {
|
|
240
|
-
if (status.isOnHold) {
|
|
241
|
-
this.onHold(broadcast);
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
this.onResume(broadcast);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
if (status.banned) {
|
|
248
|
-
this.onBan(false);
|
|
249
|
-
}
|
|
250
|
-
// Poor man's object comparison
|
|
251
|
-
if (typeof status.extra !== 'undefined' && JSON.stringify(this.extra) !== JSON.stringify(status.extra)) {
|
|
252
|
-
this.extra = Object.assign(Object.assign({}, this.extra), status.extra);
|
|
253
|
-
if (this.extra.contact && !(this.extra.contact instanceof Contact_1.default)) {
|
|
254
|
-
this.extra.contact = new Contact_1.default(this.extra.contact);
|
|
255
|
-
}
|
|
256
|
-
this.triggerUpdate(this.ON_EXTRA_CHANGE, broadcast);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
broadcastStatus(inboundStatus = null, sendReinvite = null) {
|
|
260
|
-
var _a, _b;
|
|
261
|
-
const status = inboundStatus || this.getStatus();
|
|
262
|
-
logger.info('broadcasting participant status', {
|
|
263
|
-
callId: this.callId,
|
|
264
|
-
status,
|
|
265
|
-
});
|
|
266
|
-
if (sendReinvite && !this.streams.length && Phone_1.default.phone) {
|
|
267
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
268
|
-
Phone_1.default.phone._sendReinviteMessage((_a = this.room) === null || _a === void 0 ? void 0 : _a.callSession, false);
|
|
269
|
-
}
|
|
270
|
-
(_b = this.room) === null || _b === void 0 ? void 0 : _b.sendSignal({
|
|
271
|
-
type: Room_1.SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
272
|
-
origin: this.callId,
|
|
273
|
-
status,
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
resetStreams(streams) {
|
|
277
|
-
this.streams = streams;
|
|
278
|
-
this.videoStreams = streams;
|
|
279
|
-
}
|
|
280
|
-
ban() {
|
|
281
|
-
return __awaiter(this, arguments, void 0, function* (apiRequestDelay = null) {
|
|
282
|
-
const { meetingUuid, } = this.room || {};
|
|
283
|
-
if (!meetingUuid) {
|
|
284
|
-
throw new Error('Attempting to ban a participant without a `meetingUuid`');
|
|
285
|
-
}
|
|
286
|
-
// this notifies all that someone is being banned
|
|
287
|
-
this.onBan(true);
|
|
288
|
-
// this allows to delay the actual ban, in order for the banned participant as well as others to react to the situation
|
|
289
|
-
if (apiRequestDelay) {
|
|
290
|
-
yield this.delay(apiRequestDelay);
|
|
291
|
-
}
|
|
292
|
-
// proceed with the actual kick
|
|
293
|
-
return (0, getApiClient_1.default)().calld.banMeetingParticipant(meetingUuid, this.callId);
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
delay(ms) {
|
|
297
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
exports.default = Participant;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Participant_1 = __importDefault(require("./Participant"));
|
|
7
|
-
class RemoteParticipant extends Participant_1.default {
|
|
8
|
-
constructor(room, rawParticipant, extra = {}) {
|
|
9
|
-
super(room, rawParticipant, extra);
|
|
10
|
-
if (this.name === '<unknown>') {
|
|
11
|
-
this.name = String(this.number);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.default = RemoteParticipant;
|