@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,164 +0,0 @@
|
|
|
1
|
-
import type { Message } from 'sip.js/lib/api/message';
|
|
2
|
-
import CallSession from '../../domain/CallSession';
|
|
3
|
-
import IssueReporter from '../../service/IssueReporter';
|
|
4
|
-
import Wazo from '../index';
|
|
5
|
-
import Room from './Room';
|
|
6
|
-
import { WazoSession } from '../../domain/types';
|
|
7
|
-
|
|
8
|
-
const logger = IssueReporter.loggerFor('sdk-sip-room');
|
|
9
|
-
|
|
10
|
-
class SipRoom extends Room {
|
|
11
|
-
static async connect({
|
|
12
|
-
extension,
|
|
13
|
-
constraints,
|
|
14
|
-
audioOnly = false,
|
|
15
|
-
extra,
|
|
16
|
-
room,
|
|
17
|
-
}: Record<string, any>) {
|
|
18
|
-
logger.info('connecting to sip room', {
|
|
19
|
-
extension,
|
|
20
|
-
audioOnly,
|
|
21
|
-
room: !!room,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
if (!room) {
|
|
25
|
-
await Wazo.Phone.connect({
|
|
26
|
-
media: constraints,
|
|
27
|
-
});
|
|
28
|
-
const withCamera = constraints && !!constraints.video;
|
|
29
|
-
const callSession = await Wazo.Phone.call(extension, withCamera, null, audioOnly, true);
|
|
30
|
-
// eslint-disable-next-line no-param-reassign
|
|
31
|
-
room = new SipRoom(callSession as CallSession, extension, null, null, extra);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (room && room.callSession && room.callSession.call) {
|
|
35
|
-
room.setCallId(room.callSession.call.id);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
logger.info('connected to room', {
|
|
39
|
-
extension: room.extension,
|
|
40
|
-
});
|
|
41
|
-
return room;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
mute() {
|
|
45
|
-
logger.info('mute sip room');
|
|
46
|
-
Wazo.Phone.mute(this.callSession as CallSession, false);
|
|
47
|
-
this.sendMuteStatus();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
unmute() {
|
|
51
|
-
logger.info('unmute sip room');
|
|
52
|
-
Wazo.Phone.unmute(this.callSession as CallSession, false);
|
|
53
|
-
this.sendUnMuteStatus();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
getLocalGuestName(): string | null {
|
|
57
|
-
// @ts-ignore: private
|
|
58
|
-
return Wazo.Phone.phone?.client.userAgent?.options.displayName || null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Overridden to not listen to websocket messages
|
|
62
|
-
_transferEvents() {
|
|
63
|
-
// Phone events
|
|
64
|
-
Wazo.Phone.on(this.ON_MESSAGE, this._boundOnMessage);
|
|
65
|
-
Wazo.Phone.on(this.ON_CHAT, this._boundOnChat);
|
|
66
|
-
Wazo.Phone.on(this.ON_SIGNAL, this._boundOnSignal);
|
|
67
|
-
Wazo.Phone.on(this.ON_VIDEO_INPUT_CHANGE, this._boundSaveLocalVideoStream);
|
|
68
|
-
[this.ON_AUDIO_STREAM, this.ON_VIDEO_STREAM, this.ON_REMOVE_STREAM].forEach(event => Wazo.Phone.on(event, (...args: any[]) => this.eventEmitter.emit.apply(this.eventEmitter, [event, ...args])));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
_onMessage(message: Message): Record<string, any> | null | undefined {
|
|
72
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
73
|
-
const body = super._onMessage(message);
|
|
74
|
-
|
|
75
|
-
if (!body) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const getChannel = () => body.channels[0];
|
|
80
|
-
|
|
81
|
-
switch (body.type) {
|
|
82
|
-
case 'ConfbridgeWelcome':
|
|
83
|
-
body.channels.forEach((channel: any) => {
|
|
84
|
-
this._onParticipantJoined(channel);
|
|
85
|
-
});
|
|
86
|
-
break;
|
|
87
|
-
|
|
88
|
-
case 'ConfbridgeJoin':
|
|
89
|
-
{
|
|
90
|
-
const channel = getChannel();
|
|
91
|
-
|
|
92
|
-
this._onParticipantJoined(channel);
|
|
93
|
-
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
case 'ConfbridgeLeave':
|
|
98
|
-
{
|
|
99
|
-
const channel = getChannel();
|
|
100
|
-
|
|
101
|
-
this._onParticipantLeft({
|
|
102
|
-
data: {
|
|
103
|
-
call_id: channel.id,
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
default:
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
async _onParticipantJoined(channel: Record<string, any>): Promise<any> {
|
|
116
|
-
const isLocal = channel.channelvars.WAZO_SIP_CALL_ID === this._getCurrentSipCallIs();
|
|
117
|
-
|
|
118
|
-
const callId = channel.id;
|
|
119
|
-
const ParticipantClass = isLocal ? Wazo.LocalParticipant : Wazo.RemoteParticipant;
|
|
120
|
-
const name = channel.caller ? channel.caller.name : null;
|
|
121
|
-
const extra = isLocal ? {
|
|
122
|
-
guestName: this.getLocalGuestName(),
|
|
123
|
-
} : {};
|
|
124
|
-
|
|
125
|
-
const participant = new ParticipantClass(this, {
|
|
126
|
-
caller_id_name: name,
|
|
127
|
-
call_id: callId,
|
|
128
|
-
}, extra);
|
|
129
|
-
|
|
130
|
-
const participantIdx = this.participants.findIndex(other => other.callId === participant.callId);
|
|
131
|
-
|
|
132
|
-
if (participantIdx !== -1 && name) {
|
|
133
|
-
this.participants[participantIdx].name = name;
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (isLocal) {
|
|
138
|
-
// Should be updated by the Wazo WS but we don't have it for now
|
|
139
|
-
if (this.callSession) {
|
|
140
|
-
this.callSession.ringing = false;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
this._onLocalParticipantJoined(participant);
|
|
144
|
-
|
|
145
|
-
// Give some time for the stream to be updated
|
|
146
|
-
setTimeout(() => {
|
|
147
|
-
this.eventEmitter.emit(this.ON_JOINED, participant, this.participants);
|
|
148
|
-
}, 1000);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
this.participants.push(participant);
|
|
152
|
-
|
|
153
|
-
this._isParticipantJoining(participant);
|
|
154
|
-
|
|
155
|
-
return participant;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
_getCurrentSipCallIs() {
|
|
159
|
-
return Wazo.Phone.getSipSessionId(Wazo.Phone.phone?.currentSipSession as WazoSession);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export default SipRoom;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/* global document */
|
|
2
|
-
|
|
3
|
-
/* eslint-disable no-param-reassign */
|
|
4
|
-
import type Participant from './Participant';
|
|
5
|
-
import Wazo from '../index';
|
|
6
|
-
|
|
7
|
-
class Stream {
|
|
8
|
-
htmlStream: MediaStream;
|
|
9
|
-
|
|
10
|
-
participant: Participant | undefined;
|
|
11
|
-
|
|
12
|
-
static detachStream(stream: MediaStream) {
|
|
13
|
-
stream.getTracks()
|
|
14
|
-
.filter((track: MediaStreamTrack) => track.enabled)
|
|
15
|
-
.forEach((track: MediaStreamTrack) => track.stop());
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
constructor(htmlStream: MediaStream, participant?: Participant) {
|
|
19
|
-
this.htmlStream = htmlStream;
|
|
20
|
-
this.participant = participant;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
attach(rawElement: HTMLVideoElement | null | undefined) {
|
|
24
|
-
const element = rawElement || document.createElement('video');
|
|
25
|
-
const isLocal = this.participant instanceof Wazo.LocalParticipant;
|
|
26
|
-
element.autoplay = true;
|
|
27
|
-
element.srcObject = this.htmlStream;
|
|
28
|
-
element.muted = isLocal;
|
|
29
|
-
|
|
30
|
-
if (isLocal) {
|
|
31
|
-
// Reverse local video
|
|
32
|
-
element.style.transform = 'scale(-1, 1)';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
element.onloadedmetadata = () => {
|
|
36
|
-
const tracks = this.htmlStream ? this.htmlStream.getVideoTracks() : [];
|
|
37
|
-
tracks.forEach((track: MediaStreamTrack & { loaded?: boolean }) => {
|
|
38
|
-
track.enabled = true;
|
|
39
|
-
track.loaded = true;
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return element;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
detach() {
|
|
47
|
-
Stream.detachStream(this.htmlStream);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
hasVideo() {
|
|
51
|
-
if (!this.htmlStream) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return this.htmlStream.getTracks().some(track => track.kind === 'video' && track.readyState !== 'ended');
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
get id() {
|
|
59
|
-
return this.htmlStream ? this.htmlStream.id : null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export default Stream;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// Using directly Wazo to avoid issues with require cycle
|
|
2
|
-
import getApiClient from '../../../service/getApiClient';
|
|
3
|
-
import Wazo from '../../index';
|
|
4
|
-
import Room from '../Room';
|
|
5
|
-
|
|
6
|
-
jest.mock('../../../service/getApiClient');
|
|
7
|
-
|
|
8
|
-
describe('Participant', () => {
|
|
9
|
-
describe('ban', () => {
|
|
10
|
-
it('should throw an error when there is no meeting', async () => {
|
|
11
|
-
// @ts-expect-error
|
|
12
|
-
const room = new Room();
|
|
13
|
-
const participant = new Wazo.RemoteParticipant(room, {
|
|
14
|
-
call_id: 'id',
|
|
15
|
-
caller_id_name: 'Alice',
|
|
16
|
-
caller_id_number: 'number',
|
|
17
|
-
user_uuid: 'some_uuid',
|
|
18
|
-
});
|
|
19
|
-
await expect(async () => participant.ban()).rejects.toThrow('Attempting to ban a participant without a `meetingUuid`');
|
|
20
|
-
});
|
|
21
|
-
it('should call the api', async () => {
|
|
22
|
-
const number = '1234';
|
|
23
|
-
const meetingUuid = 'some-meeting-uuid';
|
|
24
|
-
const callId = 'some-call-id';
|
|
25
|
-
// @ts-expect-error
|
|
26
|
-
const room = new Room();
|
|
27
|
-
room.setMeetingUuid(meetingUuid);
|
|
28
|
-
const banMeetingParticipant = jest.fn();
|
|
29
|
-
(getApiClient as any).mockImplementation(() => ({
|
|
30
|
-
calld: {
|
|
31
|
-
banMeetingParticipant,
|
|
32
|
-
},
|
|
33
|
-
}));
|
|
34
|
-
const participant = new Wazo.RemoteParticipant(room, {
|
|
35
|
-
call_id: callId,
|
|
36
|
-
caller_id_name: 'Alice',
|
|
37
|
-
caller_id_number: number,
|
|
38
|
-
user_uuid: 'some_uuid',
|
|
39
|
-
});
|
|
40
|
-
participant.onBan = jest.fn();
|
|
41
|
-
await participant.ban();
|
|
42
|
-
expect(banMeetingParticipant).toHaveBeenCalledWith(meetingUuid, callId);
|
|
43
|
-
expect(participant.onBan).toHaveBeenCalledWith(true);
|
|
44
|
-
});
|
|
45
|
-
it('should call the api with a delay', async () => {
|
|
46
|
-
const number = '1234';
|
|
47
|
-
const meetingUuid = 'some-meeting-uuid';
|
|
48
|
-
const callId = 'some-call-id';
|
|
49
|
-
const someDelay = 2;
|
|
50
|
-
// @ts-expect-error
|
|
51
|
-
const room = new Room();
|
|
52
|
-
room.setMeetingUuid(meetingUuid);
|
|
53
|
-
const banMeetingParticipant = jest.fn();
|
|
54
|
-
(getApiClient as any).mockImplementation(() => ({
|
|
55
|
-
calld: {
|
|
56
|
-
banMeetingParticipant,
|
|
57
|
-
},
|
|
58
|
-
}));
|
|
59
|
-
const participant = new Wazo.RemoteParticipant(room, {
|
|
60
|
-
call_id: callId,
|
|
61
|
-
caller_id_name: 'Alice',
|
|
62
|
-
caller_id_number: number,
|
|
63
|
-
user_uuid: 'some_uuid',
|
|
64
|
-
});
|
|
65
|
-
participant.delay = jest.fn();
|
|
66
|
-
participant.onBan = jest.fn();
|
|
67
|
-
await participant.ban(someDelay);
|
|
68
|
-
expect(banMeetingParticipant).toHaveBeenCalledWith(meetingUuid, callId);
|
|
69
|
-
expect(participant.delay).toHaveBeenCalledWith(someDelay);
|
|
70
|
-
expect(participant.onBan).toHaveBeenCalledWith(true);
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Using directly Wazo to avoid issues with require cycle
|
|
2
|
-
import Wazo from '../../index';
|
|
3
|
-
import { RawParticipant } from '../Participant';
|
|
4
|
-
import Room from '../Room';
|
|
5
|
-
|
|
6
|
-
describe('RemoteParticipant', () => {
|
|
7
|
-
it('should fall back on number when name is <unknown>', () => {
|
|
8
|
-
const number = '1234';
|
|
9
|
-
const participant = new Wazo.RemoteParticipant({} as Room, {
|
|
10
|
-
caller_id_name: '<unknown>',
|
|
11
|
-
caller_id_number: number,
|
|
12
|
-
} as RawParticipant);
|
|
13
|
-
expect(participant.name).toEqual(number);
|
|
14
|
-
});
|
|
15
|
-
});
|
package/src/simple/utils.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* global navigator */
|
|
2
|
-
import Wazo from './index';
|
|
3
|
-
|
|
4
|
-
const createLocalStream = async (kind: string, options: Record<string, any> = {}) => {
|
|
5
|
-
const createOptions: Record<string, any> = {};
|
|
6
|
-
createOptions[kind] = Object.keys(options).length > 0 ? options : true;
|
|
7
|
-
const mediaStream = await navigator.mediaDevices.getUserMedia(createOptions);
|
|
8
|
-
return new Wazo.Stream(mediaStream, new Wazo.LocalParticipant(null, { call_id: 'some-call-id', caller_id_name: 'some-call-id-name' }));
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const createLocalVideoStream = async (options: Record<string, any>) => createLocalStream('video', options);
|
|
12
|
-
export const createLocalAudioStream = async (options: Record<string, any>) => createLocalStream('audio', options);
|
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
import type { SwitchboardCallItems, SwitchboardAnwseredQueuedCall, SwitchboardAnwseredHeldCall } from '../domain/SwitchboardCall';
|
|
2
|
-
import type { ChatMessageResponse } from '../domain/ChatMessage';
|
|
3
|
-
import ChatRoom from '../domain/ChatRoom';
|
|
4
|
-
import Meeting from '../domain/Meeting';
|
|
5
|
-
import type MeetingAuthorization from '../domain/MeetingAuthorization';
|
|
6
|
-
|
|
7
|
-
type WebSocketBaseMessage = {
|
|
8
|
-
op: string;
|
|
9
|
-
origin_uuid: string;
|
|
10
|
-
required_acl: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type ExternalAuth = {
|
|
14
|
-
external_auth_name: string;
|
|
15
|
-
user_uuid: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export type CallMessage = {
|
|
19
|
-
call_id: string;
|
|
20
|
-
caller_id_number: string;
|
|
21
|
-
creation_time: string;
|
|
22
|
-
dialed_extension: string;
|
|
23
|
-
on_hold: boolean;
|
|
24
|
-
peer_caller_id_name: string;
|
|
25
|
-
peer_caller_id_number: string;
|
|
26
|
-
status: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type CallEventMessage = {
|
|
30
|
-
call_id: string;
|
|
31
|
-
user_uuid: string;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type ChatMessageEvent = {
|
|
35
|
-
from: string[];
|
|
36
|
-
msg: string;
|
|
37
|
-
to: string[];
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type FavoriteEvent = {
|
|
41
|
-
source: string;
|
|
42
|
-
source_entry_id: string;
|
|
43
|
-
user_uuid: string;
|
|
44
|
-
xivo_uuid: string;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export type VoicemailDataEvent = {
|
|
48
|
-
caller_id_name: string;
|
|
49
|
-
caller_id_num: string;
|
|
50
|
-
duration: number;
|
|
51
|
-
folder: {
|
|
52
|
-
name: string;
|
|
53
|
-
type: string;
|
|
54
|
-
};
|
|
55
|
-
id: string;
|
|
56
|
-
timestamp: number;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export type VoicemailEvent = {
|
|
60
|
-
message: VoicemailDataEvent;
|
|
61
|
-
message_id: string;
|
|
62
|
-
user_uuid: string;
|
|
63
|
-
voicemail_id: number;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export type CallLogEvent = {
|
|
67
|
-
answer: string;
|
|
68
|
-
answered: boolean;
|
|
69
|
-
call_direction: string;
|
|
70
|
-
destination_extension: string;
|
|
71
|
-
destination_internal_context: any | null | undefined;
|
|
72
|
-
destination_internal_extension: any | null | undefined;
|
|
73
|
-
destination_line_id: any | null | undefined;
|
|
74
|
-
destination_name: string;
|
|
75
|
-
destination_user_uuid: any | null | undefined;
|
|
76
|
-
duration: number;
|
|
77
|
-
end: string;
|
|
78
|
-
id: number;
|
|
79
|
-
requested_context: string;
|
|
80
|
-
requested_extension: string;
|
|
81
|
-
requested_internal_context: any | null | undefined;
|
|
82
|
-
requested_internal_extension: any | null | undefined;
|
|
83
|
-
source_extension: string;
|
|
84
|
-
source_internal_context: string;
|
|
85
|
-
source_internal_extension: string;
|
|
86
|
-
source_line_id: number;
|
|
87
|
-
source_name: string;
|
|
88
|
-
source_user_uuid: string;
|
|
89
|
-
start: string;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export type UserStatusUpdateEvent = {
|
|
93
|
-
status: string;
|
|
94
|
-
user_uuid: string;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export type DoNotDisturbUpdateEvent = {
|
|
98
|
-
enabled: boolean;
|
|
99
|
-
user_uuid: string;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export type EndpointStatusUpdateEvent = {
|
|
103
|
-
endpoint_id: string;
|
|
104
|
-
status: string;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export type PresencesReadEvent = {
|
|
108
|
-
lines: Array<{
|
|
109
|
-
id: number;
|
|
110
|
-
state: string;
|
|
111
|
-
}>;
|
|
112
|
-
sessions: Array<any>;
|
|
113
|
-
state: string;
|
|
114
|
-
status: string;
|
|
115
|
-
tenant_uuid: string;
|
|
116
|
-
uuid: string;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export type RoomParticipantUpdate = {
|
|
120
|
-
admin: boolean;
|
|
121
|
-
call_id: string;
|
|
122
|
-
caller_id_name: string;
|
|
123
|
-
caller_id_number: string;
|
|
124
|
-
conference_id: number;
|
|
125
|
-
id: string;
|
|
126
|
-
language: string;
|
|
127
|
-
muted: boolean;
|
|
128
|
-
user_uuid: string;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export type MeetingParticipantUpdate = {
|
|
132
|
-
admin: boolean;
|
|
133
|
-
call_id: string;
|
|
134
|
-
caller_id_name: string;
|
|
135
|
-
caller_id_number: string;
|
|
136
|
-
room_uuid: string;
|
|
137
|
-
id: string;
|
|
138
|
-
language: string;
|
|
139
|
-
muted: boolean;
|
|
140
|
-
user_uuid: string;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export type FaxOutboundFailedEvent = {
|
|
144
|
-
call_id: string;
|
|
145
|
-
caller_id: string;
|
|
146
|
-
context: string;
|
|
147
|
-
error: string;
|
|
148
|
-
extension: string;
|
|
149
|
-
id: string;
|
|
150
|
-
tenant_uuid: string;
|
|
151
|
-
user_uuid: string;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
export type FaxOutboundSucceededEvent = {
|
|
155
|
-
call_id: string;
|
|
156
|
-
caller_id: string;
|
|
157
|
-
context: string;
|
|
158
|
-
error: string;
|
|
159
|
-
extension: string;
|
|
160
|
-
id: string;
|
|
161
|
-
tenant_uuid: string;
|
|
162
|
-
user_uuid: string;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
export type AgentStatusUpdateEvent = {
|
|
166
|
-
agent_id: string;
|
|
167
|
-
status: string;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
type CallCreated = WebSocketBaseMessage & {
|
|
171
|
-
data: CallMessage;
|
|
172
|
-
name: 'call_created';
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
type CallUpdated = WebSocketBaseMessage & {
|
|
176
|
-
data: CallMessage;
|
|
177
|
-
name: 'call_updated';
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
type CallEnded = WebSocketBaseMessage & {
|
|
181
|
-
data: CallMessage;
|
|
182
|
-
name: 'call_ended';
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
type CallHeld = WebSocketBaseMessage & {
|
|
186
|
-
data: CallEventMessage;
|
|
187
|
-
name: 'call_held';
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
type CallResumed = WebSocketBaseMessage & {
|
|
191
|
-
data: CallEventMessage;
|
|
192
|
-
name: 'call_resumed';
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
type ChatMessageSent = WebSocketBaseMessage & {
|
|
196
|
-
data: ChatMessageEvent;
|
|
197
|
-
name: 'chatd_user_room_created';
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
type ChatRoomCreate = WebSocketBaseMessage & {
|
|
201
|
-
data: ChatRoom;
|
|
202
|
-
name: 'chatd_user_room_message_created';
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
type VoicemailCreated = WebSocketBaseMessage & {
|
|
206
|
-
data: VoicemailEvent;
|
|
207
|
-
name: 'user_voicemail_message_created';
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
type UpdateDoNotDisturb = WebSocketBaseMessage & {
|
|
211
|
-
data: DoNotDisturbUpdateEvent;
|
|
212
|
-
name: 'users_services_dnd_updated';
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
type VoicemailDeleted = WebSocketBaseMessage & {
|
|
216
|
-
data: VoicemailEvent;
|
|
217
|
-
name: 'user_voicemail_message_deleted';
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
type FavoriteAdded = WebSocketBaseMessage & {
|
|
221
|
-
data: FavoriteEvent;
|
|
222
|
-
name: 'favorite_added';
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
type FavoriteDeleted = WebSocketBaseMessage & {
|
|
226
|
-
data: FavoriteEvent;
|
|
227
|
-
name: 'favorite_deleted';
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
type NewCallLog = WebSocketBaseMessage & {
|
|
231
|
-
data: CallLogEvent;
|
|
232
|
-
name: 'call_log_user_created';
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
type UserStatusUpdate = WebSocketBaseMessage & {
|
|
236
|
-
data: UserStatusUpdateEvent;
|
|
237
|
-
name: 'user_status_update';
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
type EndpointStatusUpdate = WebSocketBaseMessage & {
|
|
241
|
-
data: EndpointStatusUpdateEvent;
|
|
242
|
-
name: 'endpoint_status_update';
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
type ExternalAuthAdded = WebSocketBaseMessage & {
|
|
246
|
-
data: ExternalAuth;
|
|
247
|
-
name: 'auth_user_external_auth_added';
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
type ExternalAuthDeleted = WebSocketBaseMessage & {
|
|
251
|
-
data: ExternalAuth;
|
|
252
|
-
name: 'auth_user_external_auth_deleted';
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
type PresencesRead = WebSocketBaseMessage & {
|
|
256
|
-
data: PresencesReadEvent;
|
|
257
|
-
name: 'chatd_presence_updated';
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
type ParticipantJoinedRoom = WebSocketBaseMessage & {
|
|
261
|
-
data: RoomParticipantUpdate;
|
|
262
|
-
name: 'conference_user_participant_joined';
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
type ParticipantLeftRoom = WebSocketBaseMessage & {
|
|
266
|
-
data: RoomParticipantUpdate;
|
|
267
|
-
name: 'conference_user_participant_left';
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
type ParticipantJoinedMeeting = WebSocketBaseMessage & {
|
|
271
|
-
data: MeetingParticipantUpdate;
|
|
272
|
-
name: 'meeting_user_participant_joined';
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
type ParticipantLeftMeeting = WebSocketBaseMessage & {
|
|
276
|
-
data: MeetingParticipantUpdate;
|
|
277
|
-
name: 'meeting_user_participant_left';
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
type SwitchboardQueuedCallsUpdated = WebSocketBaseMessage & {
|
|
281
|
-
data: SwitchboardCallItems;
|
|
282
|
-
name: 'switchboard_queued_calls_updated';
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
type SwitchboardQueuedCallAnswered = WebSocketBaseMessage & {
|
|
286
|
-
data: SwitchboardAnwseredQueuedCall;
|
|
287
|
-
name: 'switchboard_queued_call_answered';
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
type SwitchboardHeldCallsUpdated = WebSocketBaseMessage & {
|
|
291
|
-
data: any;
|
|
292
|
-
name: 'switchboard_held_calls_updated';
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
type SwitchboardHeldCallAnswered = WebSocketBaseMessage & {
|
|
296
|
-
data: SwitchboardAnwseredHeldCall;
|
|
297
|
-
name: 'switchboard_held_call_answered';
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
type FaxOutboundFailed = WebSocketBaseMessage & {
|
|
301
|
-
data: FaxOutboundFailedEvent;
|
|
302
|
-
name: 'fax_outbound_user_failed';
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
type FaxOutboundSucceeded = WebSocketBaseMessage & {
|
|
306
|
-
data: FaxOutboundSucceededEvent;
|
|
307
|
-
name: 'fax_outbound_user_succeeded';
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
type AgentStatusUpdate = WebSocketBaseMessage & {
|
|
311
|
-
data: AgentStatusUpdateEvent;
|
|
312
|
-
name: 'agent_status_update';
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
type AgentPaused = WebSocketBaseMessage & {
|
|
316
|
-
data: any;
|
|
317
|
-
name: 'agent_paused';
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
type AgentUnpaused = WebSocketBaseMessage & {
|
|
321
|
-
data: any;
|
|
322
|
-
name: 'agent_unpaused';
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
type MeetingUserProgress = WebSocketBaseMessage & {
|
|
326
|
-
data: Meeting;
|
|
327
|
-
name: 'meeting_user_progress';
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
type MeetingAuthorizationPending = WebSocketBaseMessage & {
|
|
331
|
-
data: MeetingAuthorization;
|
|
332
|
-
name: 'meeting_authorization_pending';
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
export type WebSocketMessage = CallCreated | CallUpdated | CallEnded | CallHeld | CallResumed | NewCallLog | ChatMessageSent | (WebSocketBaseMessage & ChatMessageResponse) | ChatRoomCreate | VoicemailCreated | UpdateDoNotDisturb | VoicemailDeleted | FavoriteAdded | FavoriteDeleted | UserStatusUpdate | EndpointStatusUpdate | ExternalAuthAdded | ExternalAuthDeleted | PresencesRead | SwitchboardQueuedCallsUpdated | SwitchboardQueuedCallAnswered | SwitchboardHeldCallsUpdated | SwitchboardHeldCallAnswered | ParticipantJoinedRoom | ParticipantLeftRoom | ParticipantJoinedMeeting | ParticipantLeftMeeting | FaxOutboundFailed | FaxOutboundSucceeded | AgentStatusUpdate | AgentPaused | AgentUnpaused | MeetingUserProgress | MeetingAuthorizationPending;
|
package/src/types/global.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* eslint-disable vars-on-top */
|
|
2
|
-
/* eslint-disable no-var */
|
|
3
|
-
|
|
4
|
-
import { WebsocketType } from '../domain/types';
|
|
5
|
-
import { Auth } from '../simple/Auth';
|
|
6
|
-
import { Configuration } from '../simple/Configuration';
|
|
7
|
-
import { Directory } from '../simple/Directory';
|
|
8
|
-
import { Phone } from '../simple/Phone';
|
|
9
|
-
|
|
10
|
-
declare global {
|
|
11
|
-
var Wazo;
|
|
12
|
-
var wazoClients;
|
|
13
|
-
var wazoClientId;
|
|
14
|
-
var wazoClientToken;
|
|
15
|
-
var wazoRefreshToken;
|
|
16
|
-
var wazoRefreshTenantId;
|
|
17
|
-
var wazoRefreshDomainName;
|
|
18
|
-
var wazoOnRefreshToken;
|
|
19
|
-
var wazoOnRefreshTokenError;
|
|
20
|
-
var wazoRefreshExpiration;
|
|
21
|
-
var wazoRefreshBackend;
|
|
22
|
-
var wazoIsMobile;
|
|
23
|
-
var wazoRequestApiTimeout;
|
|
24
|
-
var wazoFetchOptions;
|
|
25
|
-
var wazoCurrentServer;
|
|
26
|
-
var wazoAuthInstance: Auth;
|
|
27
|
-
var wazoConfigurationInstance: Configuration;
|
|
28
|
-
var wazoDirectoryInstance: Directory;
|
|
29
|
-
var wazoTelephonyInstance: Phone;
|
|
30
|
-
var wazoWebsocketInstance: WebsocketType;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export {};
|
package/src/types/wazo.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module '@wazo/sdk';
|