@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/src/domain/Country.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
AUSTRALIA: 'AU',
|
|
3
|
-
BELGIUM: 'BE',
|
|
4
|
-
CANADA: 'CA',
|
|
5
|
-
FRANCE: 'FR',
|
|
6
|
-
GERMANY: 'DE',
|
|
7
|
-
ISRAEL: 'IL',
|
|
8
|
-
ITALY: 'IT',
|
|
9
|
-
LUXEMBOURG: 'LU',
|
|
10
|
-
MALAYSIA: 'MY',
|
|
11
|
-
MONACO: 'MC',
|
|
12
|
-
NETHERLANDS: 'NL',
|
|
13
|
-
POLAND: 'PL',
|
|
14
|
-
PORTUGAL: 'PT',
|
|
15
|
-
UNITED_KINGDOM: 'GB',
|
|
16
|
-
UNITED_STATES: 'US',
|
|
17
|
-
SPAIN: 'ES',
|
|
18
|
-
SWITZERLAND: 'CH',
|
|
19
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { Device } from "./Device";
|
|
3
|
-
export default class DebugDevice implements Device {
|
|
4
|
-
connectToCall() {
|
|
5
|
-
console.info('DebugDevice - Connected to call');
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
disconnectFromCall() {
|
|
9
|
-
console.info('DebugDevice - Disconnected from call');
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
ringback() {
|
|
13
|
-
console.info('DebugDevice - Ringback');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
stopRingback() {
|
|
17
|
-
console.info('DebugDevice - Stop ringback');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
playRingtone() {
|
|
21
|
-
console.info('DebugDevice - Play ringtone');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
stopRingtone() {
|
|
25
|
-
console.info('DebugDevice - Stop ringtone');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
mute() {
|
|
29
|
-
console.info('DebugDevice - Mute');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
unmute() {
|
|
33
|
-
console.info('DebugDevice - Unmute');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
putOnSpeaker() {
|
|
37
|
-
console.info('DebugDevice - Put on speaker');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
putOffSpeaker() {
|
|
41
|
-
console.info('DebugDevice - Put off speaker');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface Device {
|
|
2
|
-
connectToCall(): void;
|
|
3
|
-
disconnectFromCall(): void;
|
|
4
|
-
ringback(): void;
|
|
5
|
-
stopRingback(): void;
|
|
6
|
-
playRingtone(): void;
|
|
7
|
-
stopRingtone(): void;
|
|
8
|
-
mute(): void;
|
|
9
|
-
unmute(): void;
|
|
10
|
-
putOnSpeaker(): void;
|
|
11
|
-
putOffSpeaker(): void;
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { UUID } from './types';
|
|
2
|
-
|
|
3
|
-
export type DirectorySource = {
|
|
4
|
-
backend: string;
|
|
5
|
-
name: string;
|
|
6
|
-
tenant_uuid: UUID;
|
|
7
|
-
uuid: UUID;
|
|
8
|
-
};
|
|
9
|
-
export type DirectorySources = {
|
|
10
|
-
filtered: number;
|
|
11
|
-
total: number;
|
|
12
|
-
items: DirectorySource[];
|
|
13
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import newFrom from '../utils/new-from';
|
|
2
|
-
|
|
3
|
-
type Response = {
|
|
4
|
-
name: string;
|
|
5
|
-
configuration: Record<string, any>;
|
|
6
|
-
};
|
|
7
|
-
type ListResponse = {
|
|
8
|
-
items: Response[];
|
|
9
|
-
};
|
|
10
|
-
type Arguments = {
|
|
11
|
-
name?: string;
|
|
12
|
-
configuration?: Record<string, any>;
|
|
13
|
-
};
|
|
14
|
-
export default class ExternalApp {
|
|
15
|
-
name: string | undefined;
|
|
16
|
-
|
|
17
|
-
type: string;
|
|
18
|
-
|
|
19
|
-
configuration?: Record<string, any>;
|
|
20
|
-
|
|
21
|
-
static parse(plain: Response): ExternalApp {
|
|
22
|
-
return new ExternalApp({
|
|
23
|
-
name: plain.name,
|
|
24
|
-
configuration: plain.configuration,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static parseMany(plain: ListResponse): ExternalApp[] {
|
|
29
|
-
return plain.items.map(item => ExternalApp.parse(item));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
static newFrom(profile: ExternalApp) {
|
|
33
|
-
return newFrom(profile, ExternalApp);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
constructor({
|
|
37
|
-
name,
|
|
38
|
-
configuration,
|
|
39
|
-
}: Arguments = {}) {
|
|
40
|
-
this.name = name;
|
|
41
|
-
this.configuration = configuration;
|
|
42
|
-
// Useful to compare instead of instanceof with minified code
|
|
43
|
-
this.type = 'ExternalApp';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
}
|
package/src/domain/Features.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import getApiClient from '../service/getApiClient';
|
|
2
|
-
|
|
3
|
-
export const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting', 'caller_id'];
|
|
4
|
-
export const getScopeName = (featureName: string) => `enterprise.app.${featureName}`;
|
|
5
|
-
const scopesToCheck = FEATURES.map(getScopeName); // Handle available features on the engine.
|
|
6
|
-
|
|
7
|
-
class Features {
|
|
8
|
-
_hasChat: boolean;
|
|
9
|
-
|
|
10
|
-
_hasVideo: boolean;
|
|
11
|
-
|
|
12
|
-
_hasCallRecording: boolean;
|
|
13
|
-
|
|
14
|
-
_hasFax: boolean;
|
|
15
|
-
|
|
16
|
-
_hasMobileDoubleCall: boolean;
|
|
17
|
-
|
|
18
|
-
_hasMobileGsm: boolean;
|
|
19
|
-
|
|
20
|
-
_hasMeeting: boolean;
|
|
21
|
-
|
|
22
|
-
_hasCallerID: boolean;
|
|
23
|
-
|
|
24
|
-
constructor() {
|
|
25
|
-
this._hasChat = true;
|
|
26
|
-
this._hasVideo = true;
|
|
27
|
-
this._hasCallRecording = true;
|
|
28
|
-
this._hasFax = true;
|
|
29
|
-
this._hasMobileDoubleCall = true;
|
|
30
|
-
this._hasMobileGsm = true;
|
|
31
|
-
this._hasMeeting = true;
|
|
32
|
-
this._hasCallerID = false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async fetchAccess() {
|
|
36
|
-
let response;
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
response = await getApiClient().auth.getRestrictionPolicies(scopesToCheck);
|
|
40
|
-
} catch (_) { // Noting to do because everything should be available even if the API is not available
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (!response) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const {
|
|
48
|
-
scopes,
|
|
49
|
-
} = response;
|
|
50
|
-
this._hasChat = this._hasFeatures(scopes, 'chat');
|
|
51
|
-
this._hasVideo = this._hasFeatures(scopes, 'video');
|
|
52
|
-
this._hasCallRecording = this._hasFeatures(scopes, 'call_recording');
|
|
53
|
-
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
54
|
-
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
55
|
-
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
56
|
-
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
57
|
-
this._hasCallerID = this._hasFeatures(scopes, 'caller_id');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
hasChat() {
|
|
61
|
-
return this._hasChat;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
hasVideo() {
|
|
65
|
-
return this._hasVideo;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
hasCallRecording() {
|
|
69
|
-
return this._hasCallRecording;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
hasFax() {
|
|
73
|
-
return this._hasFax;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
hasMobileDoubleCall() {
|
|
77
|
-
return this._hasMobileDoubleCall;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
hasMobileGsm() {
|
|
81
|
-
return this._hasMobileGsm;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
hasMeeting() {
|
|
85
|
-
return this._hasMeeting;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
hasCallerID() {
|
|
89
|
-
return this._hasCallerID;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
_hasFeatures(scopes: Record<string, any>, featureName: string) {
|
|
93
|
-
const scopeName = getScopeName(featureName);
|
|
94
|
-
|
|
95
|
-
if (!scopes || !(scopeName in scopes)) {
|
|
96
|
-
// Assume that the feature is available if not present (available by default)
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return scopes[scopeName] === true;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export default new Features();
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import newFrom from '../utils/new-from';
|
|
2
|
-
|
|
3
|
-
type Response = {
|
|
4
|
-
destination: string;
|
|
5
|
-
enabled: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type ForwardName = 'busy' | 'noanswer' | 'unconditional';
|
|
8
|
-
export const FORWARD_KEYS: {
|
|
9
|
-
BUSY: 'busy';
|
|
10
|
-
NO_ANSWER: 'noanswer';
|
|
11
|
-
UNCONDITIONAL: 'unconditional';
|
|
12
|
-
} = {
|
|
13
|
-
BUSY: 'busy',
|
|
14
|
-
NO_ANSWER: 'noanswer',
|
|
15
|
-
UNCONDITIONAL: 'unconditional',
|
|
16
|
-
};
|
|
17
|
-
type ForwardOptionArguments = {
|
|
18
|
-
destination?: string;
|
|
19
|
-
enabled?: boolean;
|
|
20
|
-
key?: ForwardName;
|
|
21
|
-
};
|
|
22
|
-
export default class ForwardOption {
|
|
23
|
-
destination: string | undefined;
|
|
24
|
-
|
|
25
|
-
enabled: boolean | undefined;
|
|
26
|
-
|
|
27
|
-
key: ForwardName | undefined;
|
|
28
|
-
|
|
29
|
-
static parse(plain: Response, key: ForwardName): ForwardOption {
|
|
30
|
-
return new ForwardOption({
|
|
31
|
-
destination: plain.destination || '',
|
|
32
|
-
enabled: plain.enabled,
|
|
33
|
-
key,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static newFrom(profile: ForwardOption) {
|
|
38
|
-
return newFrom(profile, ForwardOption);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
constructor({
|
|
42
|
-
destination,
|
|
43
|
-
enabled,
|
|
44
|
-
key,
|
|
45
|
-
}: ForwardOptionArguments = {}) {
|
|
46
|
-
this.destination = destination;
|
|
47
|
-
this.enabled = enabled;
|
|
48
|
-
this.key = key;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
setDestination(number: string): ForwardOption {
|
|
52
|
-
this.destination = number;
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
setEnabled(enabled: boolean): ForwardOption {
|
|
57
|
-
this.enabled = enabled;
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
is(other: ForwardOption) {
|
|
62
|
-
return this.key === other.key;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
}
|
package/src/domain/Incall.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import newFrom from '../utils/new-from';
|
|
2
|
-
import { ExtensionRelation } from './types';
|
|
3
|
-
|
|
4
|
-
// Generic based on incall and user's incall payload
|
|
5
|
-
export type GenericIncall = {
|
|
6
|
-
id: number;
|
|
7
|
-
extensions: ExtensionRelation[];
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type IncallArguments = {
|
|
12
|
-
id?: number;
|
|
13
|
-
extensions?: ExtensionRelation[];
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default class Incall {
|
|
17
|
-
id: number | undefined;
|
|
18
|
-
|
|
19
|
-
extensions: ExtensionRelation[] | undefined;
|
|
20
|
-
|
|
21
|
-
extension: string | undefined;
|
|
22
|
-
|
|
23
|
-
// Useful to compare instead of instanceof with minified code
|
|
24
|
-
readonly type: string = 'Incall';
|
|
25
|
-
|
|
26
|
-
constructor({ id, extensions }: IncallArguments = {}) {
|
|
27
|
-
this.id = id;
|
|
28
|
-
this.extensions = extensions;
|
|
29
|
-
this.extension = extensions?.[0]?.exten;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
static parse(plain: GenericIncall): Incall {
|
|
33
|
-
return new Incall({
|
|
34
|
-
id: plain.id,
|
|
35
|
-
extensions: plain.extensions,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static newFrom(profile: Incall) {
|
|
40
|
-
return newFrom(profile, Incall);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
hasExtension(extension: string) {
|
|
44
|
-
if (!this.extensions) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return this.extensions.some(ext => ext.exten === extension);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import CallSession from './CallSession';
|
|
2
|
-
import newFrom from '../utils/new-from';
|
|
3
|
-
import updateFrom from '../utils/update-from';
|
|
4
|
-
|
|
5
|
-
export type IndirectTransferArguments = {
|
|
6
|
-
status?: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
destinationId: string;
|
|
9
|
-
sourceId: string;
|
|
10
|
-
};
|
|
11
|
-
type Reponse = {
|
|
12
|
-
id: string;
|
|
13
|
-
initiator_uuid: string;
|
|
14
|
-
transferred_call: string;
|
|
15
|
-
initiator_call: string;
|
|
16
|
-
recipient_call: string;
|
|
17
|
-
status: string;
|
|
18
|
-
flow: string;
|
|
19
|
-
};
|
|
20
|
-
export default class IndirectTransfer {
|
|
21
|
-
status: string | null | undefined;
|
|
22
|
-
|
|
23
|
-
id: string | null | undefined;
|
|
24
|
-
|
|
25
|
-
sourceId: string;
|
|
26
|
-
|
|
27
|
-
destinationId: string;
|
|
28
|
-
|
|
29
|
-
constructor({
|
|
30
|
-
sourceId,
|
|
31
|
-
destinationId,
|
|
32
|
-
status,
|
|
33
|
-
id,
|
|
34
|
-
}: IndirectTransferArguments) {
|
|
35
|
-
this.sourceId = sourceId;
|
|
36
|
-
this.destinationId = destinationId;
|
|
37
|
-
this.status = status;
|
|
38
|
-
this.id = id;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static parseFromCallSession(source: CallSession, destination: CallSession) {
|
|
42
|
-
return new IndirectTransfer({
|
|
43
|
-
sourceId: source.getId(),
|
|
44
|
-
destinationId: destination.getId(),
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static parseFromApi(plain: Reponse) {
|
|
49
|
-
return new IndirectTransfer({
|
|
50
|
-
id: plain.id,
|
|
51
|
-
status: plain.status,
|
|
52
|
-
sourceId: plain.initiator_call,
|
|
53
|
-
destinationId: plain.recipient_call,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
destinationIs(callSession: CallSession): boolean {
|
|
58
|
-
return callSession.isId(this.destinationId);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
sourceIs(callSession: CallSession): boolean {
|
|
62
|
-
return callSession.isId(this.sourceId);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
updateFrom(indirectTransfer: IndirectTransfer) {
|
|
66
|
-
updateFrom(this, indirectTransfer);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
static newFrom(indirectTransfer: IndirectTransfer) {
|
|
70
|
-
return newFrom(indirectTransfer, IndirectTransfer);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}
|
package/src/domain/Line.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import newFrom from '../utils/new-from';
|
|
2
|
-
import type { ExtensionRelation, Link } from './types';
|
|
3
|
-
|
|
4
|
-
export type Endpoint = {
|
|
5
|
-
id: number;
|
|
6
|
-
links: Link[];
|
|
7
|
-
username?: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type LineResponse = {
|
|
11
|
-
endpoint_custom: Endpoint | null | undefined;
|
|
12
|
-
endpoint_sccp: Endpoint | null | undefined;
|
|
13
|
-
endpoint_sip: Endpoint | null | undefined;
|
|
14
|
-
extensions: ExtensionRelation[];
|
|
15
|
-
id: number;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
type LineArguments = {
|
|
19
|
-
id?: number;
|
|
20
|
-
extensions?: ExtensionRelation[];
|
|
21
|
-
endpointCustom?: Endpoint | null;
|
|
22
|
-
endpointSccp?: Endpoint | null;
|
|
23
|
-
endpointSip?: Endpoint | null;
|
|
24
|
-
};
|
|
25
|
-
export default class Line {
|
|
26
|
-
type: string;
|
|
27
|
-
|
|
28
|
-
id: number | undefined;
|
|
29
|
-
|
|
30
|
-
extensions: ExtensionRelation[] | undefined;
|
|
31
|
-
|
|
32
|
-
endpointCustom: Endpoint | null;
|
|
33
|
-
|
|
34
|
-
endpointSccp: Endpoint | null;
|
|
35
|
-
|
|
36
|
-
endpointSip: Endpoint | null;
|
|
37
|
-
|
|
38
|
-
static parse(plain: LineResponse): Line {
|
|
39
|
-
return new Line({
|
|
40
|
-
id: plain.id,
|
|
41
|
-
extensions: plain.extensions,
|
|
42
|
-
endpointCustom: plain.endpoint_custom || null,
|
|
43
|
-
endpointSccp: plain.endpoint_sccp || null,
|
|
44
|
-
endpointSip: plain.endpoint_sip || null,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static newFrom(profile: Line) {
|
|
49
|
-
return newFrom(profile, Line);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
is(line: Line | null | undefined) {
|
|
53
|
-
return line ? this.id === line.id : false;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
hasExtension(extension: string) {
|
|
57
|
-
if (!this.extensions) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return this.extensions.some(ext => ext.exten === extension);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
constructor({
|
|
65
|
-
id,
|
|
66
|
-
extensions,
|
|
67
|
-
endpointCustom,
|
|
68
|
-
endpointSccp,
|
|
69
|
-
endpointSip,
|
|
70
|
-
}: LineArguments = {}) {
|
|
71
|
-
this.id = id;
|
|
72
|
-
this.extensions = extensions;
|
|
73
|
-
this.endpointCustom = endpointCustom || null;
|
|
74
|
-
this.endpointSccp = endpointSccp || null;
|
|
75
|
-
this.endpointSip = endpointSip || null;
|
|
76
|
-
// Useful to compare instead of instanceof with minified code
|
|
77
|
-
this.type = 'Line';
|
|
78
|
-
}
|
|
79
|
-
}
|
package/src/domain/Meeting.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import moment from 'moment';
|
|
2
|
-
import newFrom from '../utils/new-from';
|
|
3
|
-
import MeetingAuthorization from './MeetingAuthorization';
|
|
4
|
-
|
|
5
|
-
export type MeetingCreateArguments = {
|
|
6
|
-
name: string;
|
|
7
|
-
requireAuthorization: boolean;
|
|
8
|
-
persistent: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type MeetingUpdateArguments = {
|
|
11
|
-
name?: string;
|
|
12
|
-
requireAuthorization?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export type MeetingCreationResponse = {
|
|
15
|
-
guest_sip_authorization: string;
|
|
16
|
-
ingress_http_uri: string;
|
|
17
|
-
name: string;
|
|
18
|
-
owner_uuids: Array<string>;
|
|
19
|
-
port: string;
|
|
20
|
-
uuid: string;
|
|
21
|
-
exten: string;
|
|
22
|
-
persistent: boolean;
|
|
23
|
-
creation_time: string;
|
|
24
|
-
require_authorization: boolean;
|
|
25
|
-
};
|
|
26
|
-
export default class Meeting {
|
|
27
|
-
type: string;
|
|
28
|
-
|
|
29
|
-
guestSipAuthorization: string;
|
|
30
|
-
|
|
31
|
-
uri: string;
|
|
32
|
-
|
|
33
|
-
uuid: string;
|
|
34
|
-
|
|
35
|
-
name: string;
|
|
36
|
-
|
|
37
|
-
port: string;
|
|
38
|
-
|
|
39
|
-
extension: string;
|
|
40
|
-
|
|
41
|
-
persistent: boolean;
|
|
42
|
-
|
|
43
|
-
ownerUuids: Array<string>;
|
|
44
|
-
|
|
45
|
-
creationTime: Date;
|
|
46
|
-
|
|
47
|
-
pendingAuthorizations: Array<MeetingAuthorization>;
|
|
48
|
-
|
|
49
|
-
requireAuthorization: boolean;
|
|
50
|
-
|
|
51
|
-
static parse(plain: MeetingCreationResponse): Meeting {
|
|
52
|
-
return new Meeting({
|
|
53
|
-
guestSipAuthorization: plain.guest_sip_authorization,
|
|
54
|
-
uri: plain.ingress_http_uri,
|
|
55
|
-
name: plain.name,
|
|
56
|
-
ownerUuids: plain.owner_uuids,
|
|
57
|
-
port: plain.port,
|
|
58
|
-
uuid: plain.uuid,
|
|
59
|
-
extension: plain.exten,
|
|
60
|
-
persistent: plain.persistent,
|
|
61
|
-
creationTime: moment(plain.creation_time).toDate(),
|
|
62
|
-
requireAuthorization: plain.require_authorization,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
static parseMany(items: MeetingCreationResponse[]): Array<Meeting> {
|
|
67
|
-
if (!items) {
|
|
68
|
-
return [];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return items.map(plain => Meeting.parse(plain));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
static newFrom(meeting: Meeting) {
|
|
75
|
-
return newFrom(meeting, Meeting);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
constructor({
|
|
79
|
-
uuid,
|
|
80
|
-
name,
|
|
81
|
-
guestSipAuthorization,
|
|
82
|
-
ownerUuids,
|
|
83
|
-
port,
|
|
84
|
-
uri,
|
|
85
|
-
extension,
|
|
86
|
-
persistent,
|
|
87
|
-
creationTime,
|
|
88
|
-
requireAuthorization,
|
|
89
|
-
}: Record<string, any> = {}) {
|
|
90
|
-
this.guestSipAuthorization = guestSipAuthorization;
|
|
91
|
-
this.uri = uri;
|
|
92
|
-
this.name = name;
|
|
93
|
-
this.ownerUuids = ownerUuids;
|
|
94
|
-
this.port = port;
|
|
95
|
-
this.uuid = uuid;
|
|
96
|
-
this.extension = extension;
|
|
97
|
-
this.persistent = persistent;
|
|
98
|
-
this.creationTime = creationTime;
|
|
99
|
-
this.requireAuthorization = requireAuthorization;
|
|
100
|
-
// Useful to compare instead of instanceof with minified code
|
|
101
|
-
this.type = 'Meeting';
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
getGuestSipCredentials() {
|
|
105
|
-
// eslint-disable-next-line no-undef
|
|
106
|
-
const [username, secret] = Buffer.from(this.guestSipAuthorization, 'base64').toString('ascii').split(':');
|
|
107
|
-
return {
|
|
108
|
-
username,
|
|
109
|
-
secret,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
export type RawMeetingAuthorization = {
|
|
2
|
-
created_at: string;
|
|
3
|
-
meeting_uuid: string;
|
|
4
|
-
uuid: string;
|
|
5
|
-
guest_uuid: string;
|
|
6
|
-
guest_name: string;
|
|
7
|
-
};
|
|
8
|
-
export const PENDING = 'pending';
|
|
9
|
-
export const ACCEPTED = 'accepted';
|
|
10
|
-
export const REJECTED = 'rejected';
|
|
11
|
-
export const POST_PROCESSING = 'post_processing';
|
|
12
|
-
export const POST_PROCESSED_SUCCESS = 'post_processed_success';
|
|
13
|
-
export const POST_PROCESSED_ERROR = 'post_processed_error';
|
|
14
|
-
|
|
15
|
-
export default class MeetingAuthorization {
|
|
16
|
-
static PENDING = PENDING;
|
|
17
|
-
|
|
18
|
-
static ACCEPTED = ACCEPTED;
|
|
19
|
-
|
|
20
|
-
static REJECTED = REJECTED;
|
|
21
|
-
|
|
22
|
-
static POST_PROCESSING = POST_PROCESSING;
|
|
23
|
-
|
|
24
|
-
static POST_PROCESSED_SUCCESS = POST_PROCESSED_SUCCESS;
|
|
25
|
-
|
|
26
|
-
static POST_PROCESSED_ERROR = POST_PROCESSED_ERROR;
|
|
27
|
-
|
|
28
|
-
meetingUuid: string;
|
|
29
|
-
|
|
30
|
-
uuid: string;
|
|
31
|
-
|
|
32
|
-
userUuid: string;
|
|
33
|
-
|
|
34
|
-
userName: string;
|
|
35
|
-
|
|
36
|
-
status: string;
|
|
37
|
-
|
|
38
|
-
constructor({
|
|
39
|
-
meetingUuid,
|
|
40
|
-
uuid,
|
|
41
|
-
userUuid,
|
|
42
|
-
userName,
|
|
43
|
-
}: Record<string, any> = {}) {
|
|
44
|
-
this.meetingUuid = meetingUuid;
|
|
45
|
-
this.uuid = uuid;
|
|
46
|
-
this.userUuid = userUuid;
|
|
47
|
-
this.userName = userName;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
setStatus(status: string) {
|
|
51
|
-
this.status = status;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
getStatus() {
|
|
55
|
-
return this.status;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
static parse(plain: RawMeetingAuthorization) {
|
|
59
|
-
const {
|
|
60
|
-
meeting_uuid: meetingUuid,
|
|
61
|
-
uuid,
|
|
62
|
-
guest_uuid: userUuid,
|
|
63
|
-
guest_name: userName,
|
|
64
|
-
} = plain;
|
|
65
|
-
return new MeetingAuthorization({
|
|
66
|
-
meetingUuid,
|
|
67
|
-
uuid,
|
|
68
|
-
userUuid,
|
|
69
|
-
userName,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
static parseMany(items: RawMeetingAuthorization[]): Array<MeetingAuthorization> {
|
|
74
|
-
if (!items) {
|
|
75
|
-
return [];
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return items.map(MeetingAuthorization.parse);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}
|