@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/api/dird.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { jsonToGraphQLQuery } from 'json-to-graphql-query/lib/jsonToGraphQLQuery';
|
|
2
|
-
import ApiRequester from '../utils/api-requester';
|
|
3
|
-
import { Contact } from '../index';
|
|
4
|
-
const getContactPayload = (contact) => ({
|
|
5
|
-
email: contact.email,
|
|
6
|
-
firstname: contact.firstName ? contact.firstName : '',
|
|
7
|
-
lastname: contact.lastName ? contact.lastName : '',
|
|
8
|
-
number: contact.phoneNumber ? contact.phoneNumber : '',
|
|
9
|
-
entreprise: contact.entreprise ? contact.entreprise : '',
|
|
10
|
-
birthday: contact.birthday ? contact.birthday : '',
|
|
11
|
-
address: contact.address ? contact.address : '',
|
|
12
|
-
note: contact.note ? contact.note : '',
|
|
13
|
-
});
|
|
14
|
-
export default ((client, baseUrl) => ({
|
|
15
|
-
search: (context, term, offset = 0, limit = null) => client.get(`${baseUrl}/directories/lookup/${context}`, {
|
|
16
|
-
term,
|
|
17
|
-
}).then((response) => Contact.parseMany(response, offset, limit)),
|
|
18
|
-
listPersonalContacts: (queryParams) => client.get(`${baseUrl}/personal`, queryParams).then((response) => Contact.parseManyPersonal(response.items)),
|
|
19
|
-
fetchPersonalContact: (contactUuid) => client.get(`${baseUrl}/personal/${contactUuid}`).then(Contact.parsePersonal),
|
|
20
|
-
addContact: (contact) => client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
21
|
-
editContact: (contact) => client.put(`${baseUrl}/personal/${contact.sourceId || contact.id || ''}`, getContactPayload(contact)).then(Contact.parsePersonal),
|
|
22
|
-
importContacts: async (csv) => {
|
|
23
|
-
const headers = {
|
|
24
|
-
'Content-Type': 'text/csv; charset=utf-8',
|
|
25
|
-
'X-Auth-Token': client.token,
|
|
26
|
-
};
|
|
27
|
-
return client.post(`${baseUrl}/personal/import`, csv, headers).then((result) => Contact.parseManyPersonal(result.created));
|
|
28
|
-
},
|
|
29
|
-
deleteContact: (contactUuid) => client.delete(`${baseUrl}/personal/${contactUuid}`),
|
|
30
|
-
listFavorites: (context) => client.get(`${baseUrl}/directories/favorites/${context}`).then(Contact.parseMany),
|
|
31
|
-
markAsFavorite: (source, sourceId) => {
|
|
32
|
-
const url = `${baseUrl}/directories/favorites/${source}/${sourceId}`;
|
|
33
|
-
return client.put(url, null, null, ApiRequester.successResponseParser);
|
|
34
|
-
},
|
|
35
|
-
removeFavorite: (source, sourceId) => client.delete(`${baseUrl}/directories/favorites/${source}/${sourceId}`),
|
|
36
|
-
fetchOffice365Source: (context) => client.get(`${baseUrl}/directories/${context}/sources`, {
|
|
37
|
-
backend: 'office365',
|
|
38
|
-
}),
|
|
39
|
-
fetchOffice365Contacts: async (source, queryParams) => {
|
|
40
|
-
if (!source) {
|
|
41
|
-
return Promise.resolve([]);
|
|
42
|
-
}
|
|
43
|
-
return client.get(`${baseUrl}/backends/office365/sources/${source.uuid}/contacts`, queryParams).then((response) => Contact.parseManyOffice365(response.items, source));
|
|
44
|
-
},
|
|
45
|
-
fetchWazoSource: (context) => client.get(`${baseUrl}/directories/${context}/sources`, {
|
|
46
|
-
backend: 'wazo',
|
|
47
|
-
}),
|
|
48
|
-
// Can be used with `queryParams = { uuid: uuid1, uuid2 }` to fetch multiple contacts
|
|
49
|
-
fetchWazoContacts: async (source, queryParams) => {
|
|
50
|
-
if (!source) {
|
|
51
|
-
return Promise.resolve([]);
|
|
52
|
-
}
|
|
53
|
-
return client.get(`${baseUrl}/backends/wazo/sources/${source.uuid}/contacts`, queryParams).then((response) => Contact.parseManyWazo(response.items, source));
|
|
54
|
-
},
|
|
55
|
-
fetchGoogleSource: (context) => client.get(`${baseUrl}/directories/${context}/sources`, {
|
|
56
|
-
backend: 'google',
|
|
57
|
-
}),
|
|
58
|
-
fetchGoogleContacts: async (source, queryParams) => {
|
|
59
|
-
if (!source) {
|
|
60
|
-
return Promise.resolve([]);
|
|
61
|
-
}
|
|
62
|
-
return client.get(`${baseUrl}/backends/google/sources/${source.uuid}/contacts`, queryParams).then((response) => Contact.parseManyGoogle(response.items, source));
|
|
63
|
-
},
|
|
64
|
-
fetchConferenceSource: (context) => client.get(`${baseUrl}/directories/${context}/sources`, {
|
|
65
|
-
backend: 'conference',
|
|
66
|
-
}),
|
|
67
|
-
fetchSourcesFor: (context, backend) => client.get(`${baseUrl}/directories/${context}/sources`, { backend }),
|
|
68
|
-
fetchPhonebookContacts: async (source, queryParams) => {
|
|
69
|
-
if (!source) {
|
|
70
|
-
return Promise.resolve({ items: [], total: 0 });
|
|
71
|
-
}
|
|
72
|
-
return client.get(`${baseUrl}/backends/phonebook/sources/${source.uuid}/contacts`, queryParams);
|
|
73
|
-
},
|
|
74
|
-
fetchConferenceContacts: async (source, queryParams) => {
|
|
75
|
-
if (!source) {
|
|
76
|
-
return Promise.resolve([]);
|
|
77
|
-
}
|
|
78
|
-
return client.get(`${baseUrl}/backends/conference/sources/${source.uuid}/contacts`, queryParams).then((response) => Contact.parseManyConference(response.items, source));
|
|
79
|
-
},
|
|
80
|
-
// Graphql
|
|
81
|
-
findMultipleContactsByNumber: (numbers, fields) => {
|
|
82
|
-
const query = jsonToGraphQLQuery({
|
|
83
|
-
me: {
|
|
84
|
-
contacts: {
|
|
85
|
-
__args: {
|
|
86
|
-
profile: 'default',
|
|
87
|
-
extens: numbers,
|
|
88
|
-
},
|
|
89
|
-
edges: {
|
|
90
|
-
node: fields || {
|
|
91
|
-
firstname: true,
|
|
92
|
-
lastname: true,
|
|
93
|
-
wazoReverse: true,
|
|
94
|
-
wazoBackend: true,
|
|
95
|
-
email: true,
|
|
96
|
-
wazoSourceEntryId: true,
|
|
97
|
-
wazoSourceName: true,
|
|
98
|
-
'... on WazoContact': {
|
|
99
|
-
userUuid: true,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
return client.post(`${baseUrl}/graphql`, {
|
|
107
|
-
query: `{${query}}`,
|
|
108
|
-
}).then(Contact.manyGraphQlWithNumbersParser(numbers));
|
|
109
|
-
},
|
|
110
|
-
}));
|
package/esm/api/webhookd.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Subscription from '../domain/Subscription';
|
|
2
|
-
export default ((client, baseUrl) => ({
|
|
3
|
-
getSubscriptions: () => client.get(`${baseUrl}/users/me/subscriptions`).then(Subscription.parseMany),
|
|
4
|
-
getSubscription: (uuid) => client.get(`${baseUrl}/users/me/subscriptions/${uuid}`).then(Subscription.parse),
|
|
5
|
-
createSubscription: (payload) => client.post(`${baseUrl}/users/me/subscriptions`, payload),
|
|
6
|
-
removeSubscription: (uuid) => client.delete(`${baseUrl}/users/me/subscriptions/${uuid}`),
|
|
7
|
-
}));
|
package/esm/api-client.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import applicationMethods from './api/application';
|
|
2
|
-
import confdMethods from './api/confd';
|
|
3
|
-
import ctidNgMethods from './api/ctid-ng';
|
|
4
|
-
import dirdMethods from './api/dird';
|
|
5
|
-
import callLogdMethods from './api/call-logd';
|
|
6
|
-
import chatdMethods from './api/chatd';
|
|
7
|
-
import calldMethods from './api/calld';
|
|
8
|
-
import agentdMethods from './api/agentd';
|
|
9
|
-
import webhookdMethods from './api/webhookd';
|
|
10
|
-
import amidMethods from './api/amid';
|
|
11
|
-
import { APPLICATION_VERSION, CONFD_VERSION, CTIDNG_VERSION, DIRD_VERSION, CALL_LOGD_VERSION, CHATD_VERSION, CALLD_VERSION, AGENTD_VERSION, WEBHOOKD_VERSION, AMID_VERSION, } from './constants';
|
|
12
|
-
import BaseApiClient from './base-api-client';
|
|
13
|
-
export default class ApiClient extends BaseApiClient {
|
|
14
|
-
application;
|
|
15
|
-
confd;
|
|
16
|
-
ctidNg;
|
|
17
|
-
dird;
|
|
18
|
-
callLogd;
|
|
19
|
-
chatd;
|
|
20
|
-
calld;
|
|
21
|
-
agentd;
|
|
22
|
-
webhookd;
|
|
23
|
-
amid;
|
|
24
|
-
constructor(args) {
|
|
25
|
-
super(args);
|
|
26
|
-
this.initializeEndpoints(); // Reinitialize sdk endpoints
|
|
27
|
-
}
|
|
28
|
-
initializeEndpoints() {
|
|
29
|
-
super.initializeEndpoints();
|
|
30
|
-
this.application = applicationMethods(this.client, `calld/${APPLICATION_VERSION}/applications`);
|
|
31
|
-
this.confd = confdMethods(this.client, `confd/${CONFD_VERSION}`);
|
|
32
|
-
this.ctidNg = ctidNgMethods(this.client, `ctid-ng/${CTIDNG_VERSION}`);
|
|
33
|
-
this.dird = dirdMethods(this.client, `dird/${DIRD_VERSION}`);
|
|
34
|
-
this.callLogd = callLogdMethods(this.client, `call-logd/${CALL_LOGD_VERSION}`);
|
|
35
|
-
this.chatd = chatdMethods(this.client, `chatd/${CHATD_VERSION}`);
|
|
36
|
-
this.calld = calldMethods(this.client, `calld/${CALLD_VERSION}`);
|
|
37
|
-
this.agentd = agentdMethods(this.client, `agentd/${AGENTD_VERSION}`);
|
|
38
|
-
this.webhookd = webhookdMethods(this.client, `webhookd/${WEBHOOKD_VERSION}`);
|
|
39
|
-
this.amid = amidMethods(this.client, `amid/${AMID_VERSION}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
package/esm/base-api-client.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import authMethods from './api/auth';
|
|
2
|
-
import ApiRequester from './utils/api-requester';
|
|
3
|
-
import IssueReporter from './service/IssueReporter';
|
|
4
|
-
import { obfuscateToken } from './utils/string';
|
|
5
|
-
import { AUTH_VERSION } from './constants';
|
|
6
|
-
const logger = IssueReporter ? IssueReporter.loggerFor('api') : console;
|
|
7
|
-
export default class BaseApiClient {
|
|
8
|
-
client;
|
|
9
|
-
auth;
|
|
10
|
-
refreshToken;
|
|
11
|
-
onRefreshToken;
|
|
12
|
-
onRefreshTokenError;
|
|
13
|
-
refreshExpiration;
|
|
14
|
-
refreshBackend;
|
|
15
|
-
refreshTenantId;
|
|
16
|
-
refreshDomainName;
|
|
17
|
-
isMobile;
|
|
18
|
-
fetchOptions;
|
|
19
|
-
constructor({ server, agent = null, refreshToken, clientId, isMobile = false, fetchOptions, }) {
|
|
20
|
-
this.updateParameters({
|
|
21
|
-
server,
|
|
22
|
-
agent,
|
|
23
|
-
clientId,
|
|
24
|
-
fetchOptions,
|
|
25
|
-
});
|
|
26
|
-
this.refreshToken = refreshToken;
|
|
27
|
-
this.isMobile = isMobile || false;
|
|
28
|
-
}
|
|
29
|
-
initializeEndpoints() {
|
|
30
|
-
this.auth = authMethods(this.client, `auth/${AUTH_VERSION}`);
|
|
31
|
-
}
|
|
32
|
-
updateParameters({ server, agent, clientId, fetchOptions, }) {
|
|
33
|
-
const refreshTokenCallback = this.refreshTokenCallback.bind(this);
|
|
34
|
-
this.client = new ApiRequester({
|
|
35
|
-
server,
|
|
36
|
-
agent,
|
|
37
|
-
refreshTokenCallback,
|
|
38
|
-
clientId,
|
|
39
|
-
fetchOptions,
|
|
40
|
-
});
|
|
41
|
-
this.initializeEndpoints();
|
|
42
|
-
}
|
|
43
|
-
async forceRefreshToken() {
|
|
44
|
-
logger.info('forcing refresh token, calling callback');
|
|
45
|
-
return this.refreshTokenCallback();
|
|
46
|
-
}
|
|
47
|
-
async refreshTokenCallback() {
|
|
48
|
-
logger.info('refresh token callback called', {
|
|
49
|
-
refreshToken: obfuscateToken(this.refreshToken),
|
|
50
|
-
refreshBackend: this.refreshBackend,
|
|
51
|
-
refreshTenantId: this.refreshTenantId,
|
|
52
|
-
refreshDomainName: this.refreshDomainName,
|
|
53
|
-
refreshExpiration: this.refreshExpiration,
|
|
54
|
-
isMobile: this.isMobile,
|
|
55
|
-
});
|
|
56
|
-
if (!this.refreshToken) {
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
const session = await this.auth.refreshToken(this.refreshToken, this.refreshBackend, this.refreshExpiration, this.isMobile, this.refreshTenantId, this.refreshDomainName);
|
|
61
|
-
if (!session) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
logger.info('token refreshed', {
|
|
65
|
-
token: obfuscateToken(session.token),
|
|
66
|
-
});
|
|
67
|
-
if (this.onRefreshToken) {
|
|
68
|
-
this.onRefreshToken(session.token, session);
|
|
69
|
-
}
|
|
70
|
-
this.setToken(session.token);
|
|
71
|
-
return session.token;
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
logger.error('token refresh, error', error);
|
|
75
|
-
if (this.onRefreshTokenError) {
|
|
76
|
-
this.onRefreshTokenError(error);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
setToken(token) {
|
|
82
|
-
this.client.setToken(token);
|
|
83
|
-
}
|
|
84
|
-
setTenant(tenant) {
|
|
85
|
-
this.client.setTenant(tenant);
|
|
86
|
-
}
|
|
87
|
-
setRefreshToken(refreshToken) {
|
|
88
|
-
this.refreshToken = refreshToken;
|
|
89
|
-
}
|
|
90
|
-
setRequestTimeout(requestTimeout) {
|
|
91
|
-
this.client.setRequestTimeout(requestTimeout);
|
|
92
|
-
}
|
|
93
|
-
setClientId(clientId) {
|
|
94
|
-
this.client.clientId = clientId;
|
|
95
|
-
}
|
|
96
|
-
setOnRefreshToken(onRefreshToken) {
|
|
97
|
-
this.onRefreshToken = onRefreshToken;
|
|
98
|
-
}
|
|
99
|
-
setOnRefreshTokenError(callback) {
|
|
100
|
-
this.onRefreshTokenError = callback;
|
|
101
|
-
}
|
|
102
|
-
setRefreshExpiration(refreshExpiration) {
|
|
103
|
-
this.refreshExpiration = refreshExpiration;
|
|
104
|
-
}
|
|
105
|
-
setRefreshBackend(refreshBackend) {
|
|
106
|
-
this.refreshBackend = refreshBackend;
|
|
107
|
-
}
|
|
108
|
-
setRefreshTenantId(tenantId) {
|
|
109
|
-
console.warn('Use of `setRefreshTenantId` is deprecated, use `setRefreshDomainName` instead');
|
|
110
|
-
this.refreshTenantId = tenantId;
|
|
111
|
-
}
|
|
112
|
-
setRefreshDomainName(domainName) {
|
|
113
|
-
this.refreshDomainName = domainName;
|
|
114
|
-
}
|
|
115
|
-
setIsMobile(isMobile) {
|
|
116
|
-
this.isMobile = isMobile;
|
|
117
|
-
}
|
|
118
|
-
setFetchOptions(fetchOptions) {
|
|
119
|
-
this.fetchOptions = fetchOptions;
|
|
120
|
-
this.client.setFetchOptions(fetchOptions);
|
|
121
|
-
}
|
|
122
|
-
disableErrorLogging() {
|
|
123
|
-
this.client.disableErrorLogging();
|
|
124
|
-
}
|
|
125
|
-
}
|
package/esm/checker/Checker.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import WazoApiClient from '../api-client';
|
|
2
|
-
import IssueReporter from '../service/IssueReporter';
|
|
3
|
-
import checks from './checks/index';
|
|
4
|
-
const logger = IssueReporter.loggerFor('engine-check');
|
|
5
|
-
class Checker {
|
|
6
|
-
session;
|
|
7
|
-
server;
|
|
8
|
-
externalAppConfig;
|
|
9
|
-
checks;
|
|
10
|
-
constructor(server, session, externalAppConfig = {}) {
|
|
11
|
-
this.server = server;
|
|
12
|
-
this.session = session;
|
|
13
|
-
this.externalAppConfig = externalAppConfig;
|
|
14
|
-
this.checks = [...checks];
|
|
15
|
-
}
|
|
16
|
-
async check(onCheckBegin = () => { }, onCheckResult = () => { }) {
|
|
17
|
-
await this._addEngineVersion();
|
|
18
|
-
logger.info('Engine check starting');
|
|
19
|
-
for (let i = 0; i < this.checks.length; i++) {
|
|
20
|
-
const { name, check, } = this.checks[i];
|
|
21
|
-
logger.info(`Checking ${name} ...`);
|
|
22
|
-
onCheckBegin(name);
|
|
23
|
-
try {
|
|
24
|
-
// eslint-disable-next-line no-await-in-loop
|
|
25
|
-
const result = await check(this.server, this.session, this.externalAppConfig);
|
|
26
|
-
logger.info(`Checking ${name} success.`, {
|
|
27
|
-
result,
|
|
28
|
-
});
|
|
29
|
-
onCheckResult(name, result);
|
|
30
|
-
}
|
|
31
|
-
catch (e) {
|
|
32
|
-
logger.info(`Checking ${name} failure`, {
|
|
33
|
-
message: e.message,
|
|
34
|
-
});
|
|
35
|
-
onCheckResult(name, e);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
logger.info('Engine check done.');
|
|
39
|
-
}
|
|
40
|
-
addCheck(check) {
|
|
41
|
-
this.checks.push(check);
|
|
42
|
-
}
|
|
43
|
-
async _addEngineVersion() {
|
|
44
|
-
if (!this.session.engineVersion) {
|
|
45
|
-
const apiClient = new WazoApiClient({
|
|
46
|
-
server: this.server,
|
|
47
|
-
});
|
|
48
|
-
apiClient.setToken(this.session.token);
|
|
49
|
-
const { wazo_version: engineVersion, } = await apiClient.confd.getInfos();
|
|
50
|
-
this.session.engineVersion = engineVersion;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
export default Checker;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import WazoApiClient from '../../api-client';
|
|
2
|
-
export default {
|
|
3
|
-
name: 'List of AOR',
|
|
4
|
-
check: async (server, session) => {
|
|
5
|
-
const apiClient = new WazoApiClient({
|
|
6
|
-
server,
|
|
7
|
-
});
|
|
8
|
-
apiClient.setToken(session.token);
|
|
9
|
-
apiClient.disableErrorLogging();
|
|
10
|
-
const line = session.primaryWebRtcLine();
|
|
11
|
-
if (!line) {
|
|
12
|
-
return 'No WebRTC line for this user';
|
|
13
|
-
}
|
|
14
|
-
const { username, } = line;
|
|
15
|
-
try {
|
|
16
|
-
const aors = await apiClient.amid.getAors(username);
|
|
17
|
-
const nbAors = aors.length;
|
|
18
|
-
const availableAors = aors.filter(aor => aor.status === 'Reachable');
|
|
19
|
-
return `Number of AOR: ${nbAors} (${availableAors.length} Avail, ${nbAors - availableAors.length} Unavail)`;
|
|
20
|
-
}
|
|
21
|
-
catch (e) {
|
|
22
|
-
if (e.status === 401) {
|
|
23
|
-
return 'Not available for this user';
|
|
24
|
-
}
|
|
25
|
-
throw e;
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import WazoApiClient from '../../api-client';
|
|
2
|
-
import ServerError from '../../domain/ServerError';
|
|
3
|
-
export default {
|
|
4
|
-
name: 'API',
|
|
5
|
-
check: async (server, session) => {
|
|
6
|
-
const client = new WazoApiClient({
|
|
7
|
-
server,
|
|
8
|
-
});
|
|
9
|
-
client.setToken(session.token);
|
|
10
|
-
client.disableErrorLogging();
|
|
11
|
-
const handleApiError = (apiName, error) => {
|
|
12
|
-
const statusText = error instanceof ServerError ? 'server error' : 'api error';
|
|
13
|
-
throw new Error(`${apiName} fails with status (${error.status}, ${statusText}) : ${error.message}`);
|
|
14
|
-
};
|
|
15
|
-
// Check simple API call
|
|
16
|
-
try {
|
|
17
|
-
await client.auth.getPushNotificationSenderId(session.uuid);
|
|
18
|
-
await client.auth.getProviders(session.uuid);
|
|
19
|
-
}
|
|
20
|
-
catch (e) {
|
|
21
|
-
handleApiError('wazo-auth', e);
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
await client.callLogd.listCallLogs();
|
|
25
|
-
}
|
|
26
|
-
catch (e) {
|
|
27
|
-
handleApiError('wazo-callogd', e);
|
|
28
|
-
}
|
|
29
|
-
try {
|
|
30
|
-
await client.calld.listCalls();
|
|
31
|
-
}
|
|
32
|
-
catch (e) {
|
|
33
|
-
handleApiError('wazo-calld', e);
|
|
34
|
-
}
|
|
35
|
-
try {
|
|
36
|
-
await client.calld.listVoicemails();
|
|
37
|
-
}
|
|
38
|
-
catch (e) {
|
|
39
|
-
// API throws a 404 when no voicemail
|
|
40
|
-
if (e.status !== 404) {
|
|
41
|
-
handleApiError('wazo-calld', e);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
try {
|
|
45
|
-
await client.chatd.getState(session.uuid);
|
|
46
|
-
await client.chatd.getContactStatusInfo(session.uuid);
|
|
47
|
-
await client.chatd.getUserRooms();
|
|
48
|
-
}
|
|
49
|
-
catch (e) {
|
|
50
|
-
handleApiError('wazo-chatd', e);
|
|
51
|
-
}
|
|
52
|
-
try {
|
|
53
|
-
await client.confd.getInfos();
|
|
54
|
-
await client.confd.getUser(session.uuid);
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
handleApiError('wazo-confd', e);
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
await client.dird.listPersonalContacts();
|
|
61
|
-
await client.dird.listFavorites(session.primaryContext());
|
|
62
|
-
await client.dird.fetchWazoSource(session.primaryContext());
|
|
63
|
-
const conferenceSource = await client.dird.fetchConferenceSource(session.primaryContext());
|
|
64
|
-
await client.dird.fetchConferenceContacts(conferenceSource.items[0]);
|
|
65
|
-
}
|
|
66
|
-
catch (e) {
|
|
67
|
-
handleApiError('wazo-dird', e);
|
|
68
|
-
}
|
|
69
|
-
try {
|
|
70
|
-
await client.webhookd.getSubscriptions();
|
|
71
|
-
}
|
|
72
|
-
catch (e) {
|
|
73
|
-
handleApiError('wazo-webhookd', e);
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/* global MediaStream, RTCPeerConnection */
|
|
2
|
-
import { parseCandidate } from '../../utils/webrtc';
|
|
3
|
-
import isMobile from '../../utils/isMobile';
|
|
4
|
-
const checkIsIPV4 = (ip) => {
|
|
5
|
-
const blocks = ip.split('.');
|
|
6
|
-
if (blocks.length !== 4) {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
return blocks.every(block => parseInt(block, 10) >= 0 && parseInt(block, 10) <= 255);
|
|
10
|
-
};
|
|
11
|
-
export default {
|
|
12
|
-
name: 'Non IP v4 ice',
|
|
13
|
-
check: (server, session, externalAppConfig) => new Promise((resolve, reject) => {
|
|
14
|
-
if (typeof MediaStream === 'undefined') {
|
|
15
|
-
resolve('Skipped on node');
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const mobile = isMobile();
|
|
19
|
-
const offerOptions = {
|
|
20
|
-
offerToReceiveAudio: 1,
|
|
21
|
-
};
|
|
22
|
-
const ips = [];
|
|
23
|
-
const config = {
|
|
24
|
-
iceServers: [{
|
|
25
|
-
urls: 'stun:stun1.l.google.com:19302',
|
|
26
|
-
}, {
|
|
27
|
-
urls: 'stun:stun2.l.google.com:19302',
|
|
28
|
-
}],
|
|
29
|
-
};
|
|
30
|
-
let hasSrflxOrRelay = false;
|
|
31
|
-
if (externalAppConfig && externalAppConfig.stun_servers) {
|
|
32
|
-
config.iceServers = { ...externalAppConfig.stun_servers.split(',').map((url) => ({
|
|
33
|
-
urls: url,
|
|
34
|
-
})),
|
|
35
|
-
...config.iceServers, };
|
|
36
|
-
}
|
|
37
|
-
if (externalAppConfig && externalAppConfig.turn_servers) {
|
|
38
|
-
config.iceServers = [...JSON.parse(externalAppConfig.turn_servers), ...(config.iceServers || [])];
|
|
39
|
-
// Force to use TURN when defined in config
|
|
40
|
-
config.iceTransportPolicy = 'relay';
|
|
41
|
-
}
|
|
42
|
-
const pc = new RTCPeerConnection(config);
|
|
43
|
-
pc.createDataChannel('wazo-check-ipv4');
|
|
44
|
-
pc.onicecandidate = e => {
|
|
45
|
-
if (e.candidate) {
|
|
46
|
-
const rawCandidate = e.candidate.candidate;
|
|
47
|
-
if (rawCandidate.indexOf('srflx') !== -1 || rawCandidate.indexOf('relay') !== -1) {
|
|
48
|
-
hasSrflxOrRelay = true;
|
|
49
|
-
const candidate = parseCandidate(e.candidate.candidate);
|
|
50
|
-
ips.push(candidate.ip);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
else if (!e.candidate) {
|
|
54
|
-
if (!hasSrflxOrRelay) {
|
|
55
|
-
return reject(new Error('No `srflx` or `relay` found in candidate. Please consider using a TURN server.'));
|
|
56
|
-
}
|
|
57
|
-
if (ips.every(checkIsIPV4)) {
|
|
58
|
-
resolve(null);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
const nonIPV4 = ips.find(ip => !checkIsIPV4(ip));
|
|
62
|
-
reject(new Error(`Non IPv4 ice candidate found : ${nonIPV4}.`));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
// @ts-ignore
|
|
67
|
-
pc.createOffer(offerOptions).then(offer => pc.setLocalDescription(offer)).then(description => (mobile ? pc.createOffer(offerOptions) : description)).then(sessionDescription => (mobile ? pc.setLocalDescription(sessionDescription) : sessionDescription));
|
|
68
|
-
}),
|
|
69
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import api from './api';
|
|
2
|
-
import aor from './aor';
|
|
3
|
-
import wazoWebsocket from './wazo-websocket';
|
|
4
|
-
import webrtcTransport from './webrtc-transport';
|
|
5
|
-
import webrtc from './webrtc';
|
|
6
|
-
import SymmetricNat from './symmetric-nat';
|
|
7
|
-
import iceIpv4 from './ice-ipv4';
|
|
8
|
-
export default [aor, api, wazoWebsocket, webrtcTransport, webrtc, SymmetricNat, iceIpv4];
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/* global MediaStream, RTCPeerConnection */
|
|
2
|
-
import { parseCandidate } from '../../utils/webrtc';
|
|
3
|
-
const timeoutDuration = 8000; // @see https://webrtchacks.com/symmetric-nat/
|
|
4
|
-
export default {
|
|
5
|
-
name: 'Symmetric NAT',
|
|
6
|
-
check: () => new Promise((resolve, reject) => {
|
|
7
|
-
if (typeof MediaStream === 'undefined') {
|
|
8
|
-
return resolve('Skipped on node');
|
|
9
|
-
}
|
|
10
|
-
const candidates = {};
|
|
11
|
-
const rawCandidates = [];
|
|
12
|
-
let nbCandidates = 0;
|
|
13
|
-
const pc = new RTCPeerConnection({
|
|
14
|
-
iceServers: [{
|
|
15
|
-
urls: 'stun:stun.wazo.io:443',
|
|
16
|
-
}, {
|
|
17
|
-
urls: 'stun:stun1.l.google.com:19302',
|
|
18
|
-
}, {
|
|
19
|
-
urls: 'stun:stun2.l.google.com:19302',
|
|
20
|
-
}],
|
|
21
|
-
});
|
|
22
|
-
let timeout;
|
|
23
|
-
const onEnded = () => {
|
|
24
|
-
clearTimeout(timeout);
|
|
25
|
-
if (Object.keys(candidates).length === 0) {
|
|
26
|
-
reject(new Error(`Timed out (${timeoutDuration}ms), ${nbCandidates} candidates : ${rawCandidates.join(', ')}`));
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const ports = candidates[Object.keys(candidates)[0]];
|
|
30
|
-
if (ports.length === 1) {
|
|
31
|
-
resolve();
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
reject(new Error('Symmetric NAT detected, you should use a TURN server.'));
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
timeout = setTimeout(onEnded, timeoutDuration);
|
|
38
|
-
pc.createDataChannel('wazo-check-nat');
|
|
39
|
-
pc.onicecandidate = (e) => {
|
|
40
|
-
nbCandidates++;
|
|
41
|
-
if (e.candidate) {
|
|
42
|
-
rawCandidates.push(e.candidate.candidate);
|
|
43
|
-
}
|
|
44
|
-
if (e.candidate && e.candidate.candidate.indexOf('srflx') !== -1) {
|
|
45
|
-
const cand = parseCandidate(e.candidate.candidate);
|
|
46
|
-
if (cand.relatedPort) {
|
|
47
|
-
if (!candidates[cand.relatedPort]) {
|
|
48
|
-
candidates[cand.relatedPort] = [];
|
|
49
|
-
}
|
|
50
|
-
candidates[cand.relatedPort].push(cand.port);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
else if (!e.candidate) {
|
|
54
|
-
onEnded();
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
pc.createOffer().then(offer => pc.setLocalDescription(offer));
|
|
58
|
-
}),
|
|
59
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import WebSocketClient, { SOCKET_EVENTS, HEARTBEAT_ENGINE_VERSION } from '../../websocket-client';
|
|
2
|
-
export default {
|
|
3
|
-
name: 'Event transport (WS)',
|
|
4
|
-
check: (server, session) => new Promise((resolve, reject) => {
|
|
5
|
-
const client = new WebSocketClient({
|
|
6
|
-
host: server,
|
|
7
|
-
token: session.token,
|
|
8
|
-
version: 2,
|
|
9
|
-
});
|
|
10
|
-
const handleError = (message) => {
|
|
11
|
-
client.close();
|
|
12
|
-
reject(new Error(message));
|
|
13
|
-
};
|
|
14
|
-
const handleSuccess = () => {
|
|
15
|
-
client.stopHeartbeat();
|
|
16
|
-
client.close();
|
|
17
|
-
resolve();
|
|
18
|
-
};
|
|
19
|
-
client.on(SOCKET_EVENTS.ON_ERROR, error => {
|
|
20
|
-
handleError(`Connection error : ${error}`);
|
|
21
|
-
});
|
|
22
|
-
client.on(SOCKET_EVENTS.ON_OPEN, () => {
|
|
23
|
-
if (session.hasEngineVersionGte(HEARTBEAT_ENGINE_VERSION)) {
|
|
24
|
-
client.setOnHeartbeatTimeout(() => {
|
|
25
|
-
handleError('No response to heartbeat');
|
|
26
|
-
});
|
|
27
|
-
client.setOnHeartbeatCallback(() => {
|
|
28
|
-
handleSuccess();
|
|
29
|
-
});
|
|
30
|
-
client.startHeartbeat();
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
handleSuccess();
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
client.connect();
|
|
37
|
-
}),
|
|
38
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import WebRTCClient from '../../web-rtc-client';
|
|
2
|
-
export default {
|
|
3
|
-
name: 'WebRTC Transport (WS) ~30s',
|
|
4
|
-
check: (server, session) => new Promise((resolve, reject) => {
|
|
5
|
-
const [host, port = 443] = server.split(':');
|
|
6
|
-
const client = new WebRTCClient({
|
|
7
|
-
host,
|
|
8
|
-
port,
|
|
9
|
-
media: {
|
|
10
|
-
audio: true,
|
|
11
|
-
},
|
|
12
|
-
}, session);
|
|
13
|
-
const handleError = (message) => {
|
|
14
|
-
client.close();
|
|
15
|
-
reject(new Error(message));
|
|
16
|
-
};
|
|
17
|
-
const handleSuccess = async () => {
|
|
18
|
-
client.stopHeartbeat();
|
|
19
|
-
await client.close();
|
|
20
|
-
resolve();
|
|
21
|
-
};
|
|
22
|
-
client.on(client.TRANSPORT_ERROR, error => {
|
|
23
|
-
handleError(`Transport error : ${error}`);
|
|
24
|
-
});
|
|
25
|
-
client.on(client.REGISTERED, () => {
|
|
26
|
-
client.setOnHeartbeatTimeout(() => {
|
|
27
|
-
handleError('No response to heartbeat');
|
|
28
|
-
});
|
|
29
|
-
client.setOnHeartbeatCallback(() => {
|
|
30
|
-
handleSuccess();
|
|
31
|
-
});
|
|
32
|
-
client.startHeartbeat();
|
|
33
|
-
});
|
|
34
|
-
}),
|
|
35
|
-
};
|