@wazo/sdk 0.43.15 → 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/dist/index.js +10630 -0
- package/dist/index.mjs +10541 -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 +13 -13
- package/dist/types/index.d.ts.map +1 -0
- 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 -41
- package/esm/base-api-client.js +0 -125
- 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/constants.js +0 -11
- 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 -51
- 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/__tests__/getApiclient.test.js +0 -37
- package/esm/service/getApiClient.js +0 -94
- 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/domain/Contact.d.ts +0 -332
- package/esm/types/domain/Contact.d.ts.map +0 -1
- package/esm/types/index.d.ts +0 -59
- package/esm/types/index.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 -213
- 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 -37
- package/lib/base-api-client.js +0 -133
- 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/constants.js +0 -14
- 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 -127
- 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/__tests__/getApiclient.test.js +0 -42
- package/lib/service/getApiClient.js +0 -114
- 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 +0 -26
- package/lib/types/api-client.d.ts.map +0 -1
- package/lib/types/base-api-client.d.ts +0 -43
- package/lib/types/base-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/constants.d.ts +0 -12
- package/lib/types/constants.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/__tests__/getApiclient.test.d.ts +0 -2
- package/lib/types/service/__tests__/getApiclient.test.d.ts.map +0 -1
- package/lib/types/service/getApiClient.d.ts +0 -21
- 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/api-requester.d.ts.map +0 -1
- 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 -200
- 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 -65
- package/src/base-api-client.ts +0 -184
- 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/constants.ts +0 -11
- 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 -60
- 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/__tests__/getApiclient.test.ts +0 -46
- package/src/service/getApiClient.ts +0 -113
- 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 -294
- 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/api-client.d.ts +0 -0
- /package/{esm → dist}/types/api-client.d.ts.map +0 -0
- /package/{esm → dist}/types/base-api-client.d.ts +0 -0
- /package/{esm → dist}/types/base-api-client.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/constants.d.ts +0 -0
- /package/{esm → dist}/types/constants.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/service/__tests__/getApiclient.test.d.ts +0 -0
- /package/{esm → dist}/types/service/__tests__/getApiclient.test.d.ts.map +0 -0
- /package/{esm → dist}/types/service/getApiClient.d.ts +0 -0
- /package/{esm → dist}/types/service/getApiClient.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 +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/api-requester.d.ts.map +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
package/esm/domain/Profile.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import Line from './Line';
|
|
2
|
-
import ForwardOption, { FORWARD_KEYS } from './ForwardOption';
|
|
3
|
-
import newFrom from '../utils/new-from';
|
|
4
|
-
import Incall from './Incall';
|
|
5
|
-
export const STATE = {
|
|
6
|
-
AVAILABLE: 'available',
|
|
7
|
-
UNAVAILABLE: 'unavailable',
|
|
8
|
-
INVISIBLE: 'invisible',
|
|
9
|
-
DISCONNECTED: 'disconnected',
|
|
10
|
-
AWAY: 'away',
|
|
11
|
-
};
|
|
12
|
-
export const LINE_STATE = {
|
|
13
|
-
AVAILABLE: 'available',
|
|
14
|
-
HOLDING: 'holding',
|
|
15
|
-
RINGING: 'ringing',
|
|
16
|
-
TALKING: 'talking',
|
|
17
|
-
UNAVAILABLE: 'unavailable',
|
|
18
|
-
PROGRESSING: 'progressing',
|
|
19
|
-
};
|
|
20
|
-
export default class Profile {
|
|
21
|
-
id;
|
|
22
|
-
firstName;
|
|
23
|
-
lastName;
|
|
24
|
-
email;
|
|
25
|
-
lines;
|
|
26
|
-
sipLines;
|
|
27
|
-
incalls;
|
|
28
|
-
username;
|
|
29
|
-
mobileNumber;
|
|
30
|
-
forwards;
|
|
31
|
-
doNotDisturb;
|
|
32
|
-
onlineCallRecordEnabled;
|
|
33
|
-
state;
|
|
34
|
-
ringSeconds;
|
|
35
|
-
voicemail;
|
|
36
|
-
status;
|
|
37
|
-
subscriptionType;
|
|
38
|
-
agent;
|
|
39
|
-
switchboards;
|
|
40
|
-
callPickupTargetUsers;
|
|
41
|
-
static parse(plain) {
|
|
42
|
-
return new Profile({
|
|
43
|
-
id: plain.uuid,
|
|
44
|
-
firstName: plain.firstName || plain.firstname || '',
|
|
45
|
-
lastName: plain.lastName || plain.lastname || '',
|
|
46
|
-
email: plain.email,
|
|
47
|
-
lines: plain.lines.map(line => Line.parse(line)),
|
|
48
|
-
incalls: plain.incalls,
|
|
49
|
-
username: plain.username,
|
|
50
|
-
mobileNumber: plain.mobile_phone_number || '',
|
|
51
|
-
ringSeconds: plain.ring_seconds,
|
|
52
|
-
forwards: [ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL), ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER), ForwardOption.parse(plain.forwards.busy, FORWARD_KEYS.BUSY)],
|
|
53
|
-
doNotDisturb: plain.services.dnd.enabled,
|
|
54
|
-
subscriptionType: plain.subscription_type,
|
|
55
|
-
voicemail: plain.voicemail,
|
|
56
|
-
switchboards: plain.switchboards || [],
|
|
57
|
-
agent: plain.agent,
|
|
58
|
-
status: '',
|
|
59
|
-
callPickupTargetUsers: plain.call_pickup_target_users || [],
|
|
60
|
-
onlineCallRecordEnabled: plain.online_call_record_enabled,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
static newFrom(profile) {
|
|
64
|
-
return newFrom(profile, Profile);
|
|
65
|
-
}
|
|
66
|
-
constructor({ id, firstName, lastName, email, lines, username, mobileNumber, forwards, doNotDisturb, state, subscriptionType, voicemail, switchboards, agent, status, ringSeconds, sipLines, callPickupTargetUsers, onlineCallRecordEnabled, incalls, }) {
|
|
67
|
-
this.id = id;
|
|
68
|
-
this.firstName = firstName;
|
|
69
|
-
this.lastName = lastName;
|
|
70
|
-
this.email = email;
|
|
71
|
-
this.lines = lines;
|
|
72
|
-
this.username = username;
|
|
73
|
-
this.mobileNumber = mobileNumber;
|
|
74
|
-
this.forwards = forwards;
|
|
75
|
-
this.doNotDisturb = doNotDisturb;
|
|
76
|
-
this.state = state;
|
|
77
|
-
this.voicemail = voicemail;
|
|
78
|
-
this.subscriptionType = subscriptionType;
|
|
79
|
-
this.switchboards = switchboards;
|
|
80
|
-
this.agent = agent;
|
|
81
|
-
this.status = status;
|
|
82
|
-
this.callPickupTargetUsers = callPickupTargetUsers;
|
|
83
|
-
this.onlineCallRecordEnabled = onlineCallRecordEnabled;
|
|
84
|
-
this.ringSeconds = ringSeconds;
|
|
85
|
-
this.sipLines = sipLines || [];
|
|
86
|
-
this.incalls = incalls?.map(Incall.parse) || [];
|
|
87
|
-
}
|
|
88
|
-
static getLinesState(lines) {
|
|
89
|
-
let result = LINE_STATE.UNAVAILABLE;
|
|
90
|
-
// eslint-disable-next-line
|
|
91
|
-
for (const line of lines) {
|
|
92
|
-
if (line.state === LINE_STATE.RINGING) {
|
|
93
|
-
result = LINE_STATE.RINGING;
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
if (line.state === LINE_STATE.TALKING) {
|
|
97
|
-
result = LINE_STATE.TALKING;
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
if (line.state === LINE_STATE.AVAILABLE) {
|
|
101
|
-
result = LINE_STATE.AVAILABLE;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return result;
|
|
105
|
-
}
|
|
106
|
-
hasId(id) {
|
|
107
|
-
return id === this.id;
|
|
108
|
-
}
|
|
109
|
-
setMobileNumber(number) {
|
|
110
|
-
this.mobileNumber = number;
|
|
111
|
-
return this;
|
|
112
|
-
}
|
|
113
|
-
setForwardOption(forwardOption) {
|
|
114
|
-
const updatedForwardOptions = this.forwards.slice();
|
|
115
|
-
const index = updatedForwardOptions.findIndex(forward => forward.is(forwardOption));
|
|
116
|
-
updatedForwardOptions.splice(index, 1, forwardOption);
|
|
117
|
-
this.forwards = updatedForwardOptions;
|
|
118
|
-
return this;
|
|
119
|
-
}
|
|
120
|
-
setDoNotDisturb(enabled) {
|
|
121
|
-
this.doNotDisturb = enabled;
|
|
122
|
-
return this;
|
|
123
|
-
}
|
|
124
|
-
setState(state) {
|
|
125
|
-
this.state = state;
|
|
126
|
-
return this;
|
|
127
|
-
}
|
|
128
|
-
}
|
package/esm/domain/Recording.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import moment from 'moment';
|
|
2
|
-
export default class Recording {
|
|
3
|
-
deleted;
|
|
4
|
-
end;
|
|
5
|
-
fileName;
|
|
6
|
-
start;
|
|
7
|
-
uuid;
|
|
8
|
-
static parseMany(recordings = []) {
|
|
9
|
-
if (!recordings) {
|
|
10
|
-
return [];
|
|
11
|
-
}
|
|
12
|
-
return recordings.map(item => Recording.parse(item));
|
|
13
|
-
}
|
|
14
|
-
static parse(plain) {
|
|
15
|
-
return new Recording({
|
|
16
|
-
deleted: plain.deleted,
|
|
17
|
-
fileName: plain.filename,
|
|
18
|
-
end: plain.end_time ? moment(plain.end_time).toDate() : null,
|
|
19
|
-
start: moment(plain.start_time).toDate(),
|
|
20
|
-
uuid: plain.uuid,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
constructor({ deleted, end, fileName, start, uuid, }) {
|
|
24
|
-
this.deleted = deleted;
|
|
25
|
-
this.end = end;
|
|
26
|
-
this.fileName = fileName;
|
|
27
|
-
this.start = start;
|
|
28
|
-
this.uuid = uuid;
|
|
29
|
-
}
|
|
30
|
-
}
|
package/esm/domain/Relocation.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
class Relocation {
|
|
2
|
-
static MIN_ENGINE_VERSION_REQUIRED;
|
|
3
|
-
relocatedCall;
|
|
4
|
-
initiatorCall;
|
|
5
|
-
recipientCall;
|
|
6
|
-
static parse(response) {
|
|
7
|
-
return new Relocation({
|
|
8
|
-
initiatorCall: response.initiator_call,
|
|
9
|
-
recipientCall: response.recipient_call,
|
|
10
|
-
relocatedCall: response.relocated_call,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
constructor({ relocatedCall, initiatorCall, recipientCall, }) {
|
|
14
|
-
this.initiatorCall = initiatorCall || '';
|
|
15
|
-
this.relocatedCall = relocatedCall || '';
|
|
16
|
-
this.recipientCall = recipientCall || '';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
Relocation.MIN_ENGINE_VERSION_REQUIRED = '19.09';
|
|
20
|
-
export default Relocation;
|
package/esm/domain/Room.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import newFrom from '../utils/new-from';
|
|
2
|
-
import updateFrom from '../utils/update-from';
|
|
3
|
-
export default class Room {
|
|
4
|
-
id;
|
|
5
|
-
name;
|
|
6
|
-
connectedCallSession;
|
|
7
|
-
participants;
|
|
8
|
-
constructor({ id, connectedCallSession, participants, name, }) {
|
|
9
|
-
this.id = id;
|
|
10
|
-
this.connectedCallSession = connectedCallSession;
|
|
11
|
-
this.participants = participants;
|
|
12
|
-
this.name = name;
|
|
13
|
-
}
|
|
14
|
-
getExtension() {
|
|
15
|
-
return this.connectedCallSession ? this.connectedCallSession.number : null;
|
|
16
|
-
}
|
|
17
|
-
connect(callSession) {
|
|
18
|
-
return new Room({ ...this,
|
|
19
|
-
connectedCallSession: callSession,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
has(callSession) {
|
|
23
|
-
return !!this.connectedCallSession && this.connectedCallSession.is(callSession);
|
|
24
|
-
}
|
|
25
|
-
addParticipant(uuid, extension, talking = null) {
|
|
26
|
-
if (!this.participants.some(participant => participant.uuid === uuid || participant.extension === extension)) {
|
|
27
|
-
return new Room({ ...this,
|
|
28
|
-
participants: [...this.participants, {
|
|
29
|
-
uuid,
|
|
30
|
-
extension,
|
|
31
|
-
talking,
|
|
32
|
-
}],
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
return this;
|
|
36
|
-
}
|
|
37
|
-
updateParticipant(uuid, participant, shouldAdd = false) {
|
|
38
|
-
const idx = this.participants.findIndex(someParticipant => someParticipant.uuid === uuid);
|
|
39
|
-
if (idx === -1 && !shouldAdd) {
|
|
40
|
-
return this;
|
|
41
|
-
}
|
|
42
|
-
const updatedParticipants = [...this.participants];
|
|
43
|
-
if (idx !== -1) {
|
|
44
|
-
updatedParticipants[idx] = { ...updatedParticipants[idx],
|
|
45
|
-
...participant,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
updatedParticipants.push(participant);
|
|
50
|
-
}
|
|
51
|
-
return new Room({ ...this,
|
|
52
|
-
participants: updatedParticipants,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
updateParticipantByExtension(extension, participant, shouldAdd = false) {
|
|
56
|
-
const idx = this.participants.findIndex(someParticipant => someParticipant.extension === extension);
|
|
57
|
-
if (idx === -1 && !shouldAdd) {
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
const updatedParticipants = [...this.participants];
|
|
61
|
-
if (idx !== -1) {
|
|
62
|
-
updatedParticipants[idx] = { ...updatedParticipants[idx],
|
|
63
|
-
...participant,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
updatedParticipants.push(participant);
|
|
68
|
-
}
|
|
69
|
-
return new Room({ ...this,
|
|
70
|
-
participants: updatedParticipants,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
hasCallWithId(id) {
|
|
74
|
-
return !!this.connectedCallSession && this.connectedCallSession.getId() === id;
|
|
75
|
-
}
|
|
76
|
-
disconnect() {
|
|
77
|
-
return new Room({ ...this,
|
|
78
|
-
connectedCallSession: null,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
removeParticipantWithUUID(uuid) {
|
|
82
|
-
return new Room({ ...this,
|
|
83
|
-
participants: this.participants.filter(participant => participant.uuid !== uuid),
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
removeParticipantWithExtension(extension) {
|
|
87
|
-
return new Room({ ...this,
|
|
88
|
-
participants: this.participants.filter(participant => participant.extension !== extension),
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
updateFrom(room) {
|
|
92
|
-
updateFrom(this, room);
|
|
93
|
-
}
|
|
94
|
-
static newFrom(room) {
|
|
95
|
-
return newFrom(room, Room);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import BadResponse from './BadResponse';
|
|
2
|
-
export default class ServerError extends BadResponse {
|
|
3
|
-
static fromResponse(error, status) {
|
|
4
|
-
return new ServerError(error.message || JSON.stringify(error), status, error.timestamp, error.error_id, error.details);
|
|
5
|
-
}
|
|
6
|
-
static fromText(response, status) {
|
|
7
|
-
return new ServerError(response, status);
|
|
8
|
-
}
|
|
9
|
-
}
|
package/esm/domain/Session.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-nested-ternary */
|
|
2
|
-
import { KEYUTIL, KJUR, b64utoutf8 } from 'jsrsasign';
|
|
3
|
-
import moment from 'moment';
|
|
4
|
-
import swarmPublicKey from '../pubkey';
|
|
5
|
-
import Contact from './Contact';
|
|
6
|
-
import newFrom from '../utils/new-from';
|
|
7
|
-
import compareVersions from '../utils/compare-version';
|
|
8
|
-
const { jws } = KJUR;
|
|
9
|
-
const swarmKey = (KEYUTIL.getKey(swarmPublicKey));
|
|
10
|
-
const MINIMUM_WAZO_ENGINE_VERSION_FOR_DEFAULT_CONTEXT = '19.08';
|
|
11
|
-
export default class Session {
|
|
12
|
-
acl;
|
|
13
|
-
contact;
|
|
14
|
-
token;
|
|
15
|
-
refreshToken;
|
|
16
|
-
uuid;
|
|
17
|
-
tenantUuid;
|
|
18
|
-
stackUuid;
|
|
19
|
-
sessionUuid;
|
|
20
|
-
engineVersion;
|
|
21
|
-
_stackHostFromHeader;
|
|
22
|
-
profile;
|
|
23
|
-
expiresAt;
|
|
24
|
-
authorizations;
|
|
25
|
-
static parse(plain) {
|
|
26
|
-
const token = plain.data.metadata ? plain.data.metadata.jwt : null;
|
|
27
|
-
let authorizations = [];
|
|
28
|
-
// Add authorizations from JWT
|
|
29
|
-
if (token) {
|
|
30
|
-
const isValid = jws.JWS.verifyJWT(token, swarmKey, {
|
|
31
|
-
alg: ['RS256'],
|
|
32
|
-
// @ts-ignore: date / number
|
|
33
|
-
verifyAt: new Date(),
|
|
34
|
-
});
|
|
35
|
-
if (isValid) {
|
|
36
|
-
const decodedToken = jws.JWS.readSafeJSONString(b64utoutf8(token.split('.')[1]));
|
|
37
|
-
authorizations = decodedToken ? decodedToken.authorizations : [];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return new Session({
|
|
41
|
-
token: plain.data.token,
|
|
42
|
-
refreshToken: plain.data.refresh_token || null,
|
|
43
|
-
uuid: plain.data.metadata ? plain.data.metadata.uuid : null,
|
|
44
|
-
sessionUuid: plain.data.session_uuid,
|
|
45
|
-
authorizations,
|
|
46
|
-
acl: plain.data.acls ? plain.data.acls : plain.data.acl ? plain.data.acl : [],
|
|
47
|
-
tenantUuid: plain.data.metadata ? plain.data.metadata.tenant_uuid : undefined,
|
|
48
|
-
expiresAt: moment.utc(plain.data.utc_expires_at).toDate(),
|
|
49
|
-
stackUuid: plain.data.xivo_uuid,
|
|
50
|
-
// eslint-disable-next-line
|
|
51
|
-
stackHostFromHeader: plain._headers?.get?.('wazo-stack-host'),
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
static newFrom(profile) {
|
|
55
|
-
return newFrom(profile, Session);
|
|
56
|
-
}
|
|
57
|
-
constructor({ token, uuid, tenantUuid, profile, expiresAt, authorizations, acl, engineVersion, refreshToken, sessionUuid, stackUuid, stackHostFromHeader = undefined, }) {
|
|
58
|
-
this.token = token;
|
|
59
|
-
this.uuid = uuid;
|
|
60
|
-
this.tenantUuid = tenantUuid || null;
|
|
61
|
-
this.profile = profile;
|
|
62
|
-
this.expiresAt = expiresAt;
|
|
63
|
-
this.authorizations = authorizations || [];
|
|
64
|
-
this.acl = acl || [];
|
|
65
|
-
this.engineVersion = engineVersion;
|
|
66
|
-
this.refreshToken = refreshToken;
|
|
67
|
-
this.sessionUuid = sessionUuid;
|
|
68
|
-
this.stackUuid = stackUuid;
|
|
69
|
-
this._stackHostFromHeader = stackHostFromHeader;
|
|
70
|
-
}
|
|
71
|
-
hasExpired(date = new Date()) {
|
|
72
|
-
return date >= this.expiresAt;
|
|
73
|
-
}
|
|
74
|
-
is(contact) {
|
|
75
|
-
return Boolean(contact) && this.uuid === contact.uuid;
|
|
76
|
-
}
|
|
77
|
-
using(profile) {
|
|
78
|
-
this.profile = profile;
|
|
79
|
-
return this;
|
|
80
|
-
}
|
|
81
|
-
hasAuthorizations() {
|
|
82
|
-
return this.authorizations && !!this.authorizations.length;
|
|
83
|
-
}
|
|
84
|
-
displayName() {
|
|
85
|
-
return this.profile ? `${this.profile.firstName} ${this.profile.lastName}` : '';
|
|
86
|
-
}
|
|
87
|
-
hasAccessToVoicemail() {
|
|
88
|
-
if (!this.profile) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
return !!this.profile.voicemail;
|
|
92
|
-
}
|
|
93
|
-
primaryLine() {
|
|
94
|
-
return this.profile && this.profile.lines.length > 0 ? this.profile.lines[0] : null;
|
|
95
|
-
}
|
|
96
|
-
primarySipLine() {
|
|
97
|
-
return this.profile && this.profile.sipLines.length > 0 ? this.profile.sipLines[0] : null;
|
|
98
|
-
}
|
|
99
|
-
primaryWebRtcLine() {
|
|
100
|
-
return this.profile && (this.profile.sipLines || []).find(sipLine => sipLine && sipLine.isWebRtc());
|
|
101
|
-
}
|
|
102
|
-
primaryCtiLine() {
|
|
103
|
-
return this.profile && (this.profile.sipLines || []).find(sipLine => sipLine && !sipLine.isWebRtc());
|
|
104
|
-
}
|
|
105
|
-
getContact() {
|
|
106
|
-
if (this.contact) {
|
|
107
|
-
return this.contact;
|
|
108
|
-
}
|
|
109
|
-
const { email, firstName, lastName, mobileNumber, state, status } = this.profile || {};
|
|
110
|
-
const number = this.primaryNumber() || '';
|
|
111
|
-
const numbers = [{ label: 'primary', number }];
|
|
112
|
-
if (mobileNumber) {
|
|
113
|
-
numbers.push({ label: 'mobile', number: mobileNumber });
|
|
114
|
-
}
|
|
115
|
-
return new Contact({
|
|
116
|
-
uuid: this.uuid || '',
|
|
117
|
-
email,
|
|
118
|
-
name: `${firstName} ${lastName}`,
|
|
119
|
-
number,
|
|
120
|
-
numbers,
|
|
121
|
-
state: state || '',
|
|
122
|
-
status,
|
|
123
|
-
backend: 'wazo',
|
|
124
|
-
source: 'default',
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
primaryContext() {
|
|
128
|
-
if (this.engineVersion) {
|
|
129
|
-
if (this.hasEngineVersionGte(MINIMUM_WAZO_ENGINE_VERSION_FOR_DEFAULT_CONTEXT)) {
|
|
130
|
-
return 'default';
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
const line = this.primaryLine();
|
|
134
|
-
return line && Array.isArray(line.extensions) && line.extensions.length > 0 ? line.extensions[0].context : 'default';
|
|
135
|
-
}
|
|
136
|
-
hasEngineVersionGte(version) {
|
|
137
|
-
return !!this.engineVersion && compareVersions(String(this.engineVersion), String(version)) >= 0;
|
|
138
|
-
}
|
|
139
|
-
primaryNumber() {
|
|
140
|
-
const line = this.primaryLine();
|
|
141
|
-
return line && Array.isArray(line.extensions) && line.extensions.length ? line.extensions[0].exten : null;
|
|
142
|
-
}
|
|
143
|
-
allLines() {
|
|
144
|
-
return this.profile ? this.profile.lines || [] : [];
|
|
145
|
-
}
|
|
146
|
-
allNumbers() {
|
|
147
|
-
const extensions = this.allLines().map(line => line.extensions?.map(extension => extension.exten) || []);
|
|
148
|
-
if (!extensions.length) {
|
|
149
|
-
return [];
|
|
150
|
-
}
|
|
151
|
-
return extensions.reduce((a, b) => a.concat(b));
|
|
152
|
-
}
|
|
153
|
-
hasExtension(extension) {
|
|
154
|
-
return this.allNumbers().some(number => number === extension);
|
|
155
|
-
}
|
|
156
|
-
getHostFromHeader() {
|
|
157
|
-
return this._stackHostFromHeader;
|
|
158
|
-
}
|
|
159
|
-
get acls() {
|
|
160
|
-
console.warn('`acls` property of Session has been removed in Wazo\'s SDK, please use `acl` instead.');
|
|
161
|
-
return this.acl;
|
|
162
|
-
}
|
|
163
|
-
get engineUuid() {
|
|
164
|
-
console.warn('`engineUuid` property of Session has been removed in Wazo\'s SDK, please use `stackUuid` instead.');
|
|
165
|
-
return this.stackUuid;
|
|
166
|
-
}
|
|
167
|
-
toJSON() {
|
|
168
|
-
return {
|
|
169
|
-
...this,
|
|
170
|
-
// Added `engineUuid` because of the getter, it won't be included in `JSON.stringify()` methods.
|
|
171
|
-
engineUuid: this.engineUuid,
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
}
|
package/esm/domain/SipLine.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import newFrom from '../utils/new-from';
|
|
2
|
-
const availableCodecs = ['vp8', 'vp9', 'h264'];
|
|
3
|
-
export default class SipLine {
|
|
4
|
-
id;
|
|
5
|
-
uuid;
|
|
6
|
-
tenantUuid;
|
|
7
|
-
username;
|
|
8
|
-
secret;
|
|
9
|
-
type;
|
|
10
|
-
host;
|
|
11
|
-
options;
|
|
12
|
-
endpointSectionOptions;
|
|
13
|
-
links;
|
|
14
|
-
trunk;
|
|
15
|
-
line;
|
|
16
|
-
static parse(plain) {
|
|
17
|
-
let { username, secret, host, } = plain;
|
|
18
|
-
// Since 20.13 engine so options are now in section
|
|
19
|
-
if (plain.auth_section_options) {
|
|
20
|
-
const findOption = (options, name) => options.find(option => option[0] === name);
|
|
21
|
-
const usernameOption = findOption(plain.auth_section_options, 'username');
|
|
22
|
-
const secretOption = findOption(plain.auth_section_options, 'password');
|
|
23
|
-
const hostOption = findOption(plain.endpoint_section_options, 'media_address');
|
|
24
|
-
username = usernameOption ? usernameOption[1] : '';
|
|
25
|
-
secret = secretOption ? secretOption[1] : '';
|
|
26
|
-
host = hostOption ? hostOption[1] : '';
|
|
27
|
-
}
|
|
28
|
-
return new SipLine({
|
|
29
|
-
id: plain.id,
|
|
30
|
-
uuid: plain.uuid,
|
|
31
|
-
tenantUuid: plain.tenant_uuid,
|
|
32
|
-
username,
|
|
33
|
-
secret,
|
|
34
|
-
type: plain.type,
|
|
35
|
-
host,
|
|
36
|
-
options: plain.options,
|
|
37
|
-
endpointSectionOptions: plain.endpoint_section_options,
|
|
38
|
-
links: plain.links,
|
|
39
|
-
trunk: plain.trunk,
|
|
40
|
-
line: plain.line,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
static newFrom(sipLine) {
|
|
44
|
-
return newFrom(sipLine, SipLine);
|
|
45
|
-
}
|
|
46
|
-
is(line) {
|
|
47
|
-
if (line.uuid) {
|
|
48
|
-
return this.uuid === line.uuid;
|
|
49
|
-
}
|
|
50
|
-
return this.id === line.id;
|
|
51
|
-
}
|
|
52
|
-
getOptions() {
|
|
53
|
-
// `options` params have beend remove since 20.13... we should now use endpointSectionOptions
|
|
54
|
-
return this.endpointSectionOptions || this.options || [];
|
|
55
|
-
}
|
|
56
|
-
isWebRtc() {
|
|
57
|
-
return this.getOptions().some(option => option[0] === 'webrtc' && option[1] === 'yes');
|
|
58
|
-
}
|
|
59
|
-
hasVideo() {
|
|
60
|
-
const allow = this.getOptions().find(option => option[0] === 'allow');
|
|
61
|
-
return Array.isArray(allow) && allow[1].split(',').some((codec) => availableCodecs.some(c => c === codec));
|
|
62
|
-
}
|
|
63
|
-
hasVideoConference() {
|
|
64
|
-
return this.getOptions().some(option => option[0] === 'max_audio_streams' && parseInt(option[1], 10) > 0) && this.getOptions().some(option => option[0] === 'max_video_streams' && parseInt(option[1], 10) > 1);
|
|
65
|
-
}
|
|
66
|
-
constructor({ id, uuid, tenantUuid, username, secret, type, host, options, endpointSectionOptions, links, trunk, line, }) {
|
|
67
|
-
this.id = id;
|
|
68
|
-
this.uuid = uuid;
|
|
69
|
-
this.tenantUuid = tenantUuid;
|
|
70
|
-
this.username = username;
|
|
71
|
-
this.secret = secret;
|
|
72
|
-
this.type = type;
|
|
73
|
-
this.host = host;
|
|
74
|
-
this.options = options;
|
|
75
|
-
this.endpointSectionOptions = endpointSectionOptions;
|
|
76
|
-
this.links = links;
|
|
77
|
-
this.trunk = trunk;
|
|
78
|
-
this.line = line;
|
|
79
|
-
// Useful to compare instead of instanceof with minified code
|
|
80
|
-
this.type = 'SipLine';
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
class Subscription {
|
|
2
|
-
name;
|
|
3
|
-
events;
|
|
4
|
-
config;
|
|
5
|
-
uuid;
|
|
6
|
-
service;
|
|
7
|
-
eventsUserUuid;
|
|
8
|
-
eventsWazoUuid;
|
|
9
|
-
metadata;
|
|
10
|
-
ownerTenantUuid;
|
|
11
|
-
ownerUserUuid;
|
|
12
|
-
static parse(plain) {
|
|
13
|
-
return new Subscription({
|
|
14
|
-
name: plain.name,
|
|
15
|
-
events: plain.events,
|
|
16
|
-
config: plain.config,
|
|
17
|
-
uuid: plain.uuid,
|
|
18
|
-
service: plain.service,
|
|
19
|
-
eventsUserUuid: plain.events_user_uuid,
|
|
20
|
-
eventsWazoUuid: plain.events_wazo_uuid,
|
|
21
|
-
metadata: plain.metadata,
|
|
22
|
-
ownerTenantUuid: plain.owner_tenant_uuid,
|
|
23
|
-
ownerUserUuid: plain.owner_user_uuid,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
static parseMany(response) {
|
|
27
|
-
return response.items.map(payload => Subscription.parse(payload));
|
|
28
|
-
}
|
|
29
|
-
constructor({ name, events, config, uuid, service, eventsUserUuid, eventsWazoUuid, metadata, ownerTenantUuid, ownerUserUuid, }) {
|
|
30
|
-
this.name = name;
|
|
31
|
-
this.events = events;
|
|
32
|
-
this.config = config;
|
|
33
|
-
this.uuid = uuid;
|
|
34
|
-
this.service = service;
|
|
35
|
-
this.eventsUserUuid = eventsUserUuid;
|
|
36
|
-
this.eventsWazoUuid = eventsWazoUuid;
|
|
37
|
-
this.metadata = metadata;
|
|
38
|
-
this.ownerTenantUuid = ownerTenantUuid;
|
|
39
|
-
this.ownerUserUuid = ownerUserUuid;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export default Subscription;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import newFrom from '../utils/new-from';
|
|
2
|
-
import updateFrom from '../utils/update-from';
|
|
3
|
-
class SwitchboardCall {
|
|
4
|
-
static STATE;
|
|
5
|
-
id;
|
|
6
|
-
callSession;
|
|
7
|
-
callerIdName;
|
|
8
|
-
callerIdNumber;
|
|
9
|
-
answerTime;
|
|
10
|
-
participantId;
|
|
11
|
-
state;
|
|
12
|
-
switchboardName;
|
|
13
|
-
switchboardUuid;
|
|
14
|
-
type;
|
|
15
|
-
static parse(plain) {
|
|
16
|
-
return new SwitchboardCall({
|
|
17
|
-
id: plain.id,
|
|
18
|
-
callSession: plain.callSession || null,
|
|
19
|
-
callerIdName: plain.caller_id_name || null,
|
|
20
|
-
callerIdNumber: plain.caller_id_number || null,
|
|
21
|
-
participantId: plain.participantId || null,
|
|
22
|
-
answerTime: plain.startTime,
|
|
23
|
-
state: plain.state,
|
|
24
|
-
switchboardName: plain.switchboardName,
|
|
25
|
-
switchboardUuid: plain.switchboardUuid,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
constructor({ id, callSession, callerIdName, callerIdNumber, participantId, answerTime, state, switchboardName, switchboardUuid, }) {
|
|
29
|
-
this.id = id;
|
|
30
|
-
this.callSession = callSession;
|
|
31
|
-
this.callerIdName = callerIdName;
|
|
32
|
-
this.callerIdNumber = callerIdNumber;
|
|
33
|
-
this.participantId = participantId;
|
|
34
|
-
this.answerTime = answerTime;
|
|
35
|
-
this.state = state;
|
|
36
|
-
this.switchboardName = switchboardName;
|
|
37
|
-
this.switchboardUuid = switchboardUuid;
|
|
38
|
-
// Useful to compare instead of instanceof with minified code
|
|
39
|
-
this.type = 'SwitchboardCall';
|
|
40
|
-
}
|
|
41
|
-
updateFrom(switchboardCall) {
|
|
42
|
-
updateFrom(this, switchboardCall);
|
|
43
|
-
}
|
|
44
|
-
getId() {
|
|
45
|
-
return this.id;
|
|
46
|
-
}
|
|
47
|
-
static newFrom(switchboardCall) {
|
|
48
|
-
return newFrom(switchboardCall, SwitchboardCall);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
SwitchboardCall.STATE = {
|
|
52
|
-
INCOMING: 'incoming',
|
|
53
|
-
ONGOING: 'ongoing',
|
|
54
|
-
HELD: 'held',
|
|
55
|
-
};
|
|
56
|
-
export default SwitchboardCall;
|