@wazo/sdk 0.43.15 → 0.44.1
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 +11 -22
- 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/lib/api/calld.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
/* eslint-disable camelcase */
|
|
16
|
-
const api_requester_1 = __importDefault(require("../utils/api-requester"));
|
|
17
|
-
const Relocation_1 = __importDefault(require("../domain/Relocation"));
|
|
18
|
-
const ChatMessage_1 = __importDefault(require("../domain/ChatMessage"));
|
|
19
|
-
const Voicemail_1 = __importDefault(require("../domain/Voicemail"));
|
|
20
|
-
const Call_1 = __importDefault(require("../domain/Call"));
|
|
21
|
-
const IndirectTransfer_1 = __importDefault(require("../domain/IndirectTransfer"));
|
|
22
|
-
const MeetingStatus_1 = __importDefault(require("../domain/MeetingStatus"));
|
|
23
|
-
exports.default = ((client, baseUrl) => ({
|
|
24
|
-
updatePresence: (presence) => client.put(`${baseUrl}/users/me/presences`, {
|
|
25
|
-
presence,
|
|
26
|
-
}, null, api_requester_1.default.successResponseParser),
|
|
27
|
-
listMessages: (participantUuid, limit) => {
|
|
28
|
-
const query = {};
|
|
29
|
-
if (participantUuid) {
|
|
30
|
-
query.participant_user_uuid = participantUuid;
|
|
31
|
-
}
|
|
32
|
-
if (limit) {
|
|
33
|
-
query.limit = limit;
|
|
34
|
-
}
|
|
35
|
-
return client.get(`${baseUrl}/users/me/chats`, query).then((response) => ChatMessage_1.default.parseMany(response));
|
|
36
|
-
},
|
|
37
|
-
sendMessage: (alias, msg, toUserId) => {
|
|
38
|
-
const body = {
|
|
39
|
-
alias,
|
|
40
|
-
msg,
|
|
41
|
-
to: toUserId,
|
|
42
|
-
};
|
|
43
|
-
return client.post(`${baseUrl}/users/me/chats`, body, null, api_requester_1.default.successResponseParser);
|
|
44
|
-
},
|
|
45
|
-
makeCall: (extension, fromMobile, lineId, allLines = false) => {
|
|
46
|
-
const query = {
|
|
47
|
-
from_mobile: fromMobile,
|
|
48
|
-
extension,
|
|
49
|
-
};
|
|
50
|
-
if (lineId) {
|
|
51
|
-
query.line_id = lineId;
|
|
52
|
-
}
|
|
53
|
-
if (allLines) {
|
|
54
|
-
query.all_lines = true;
|
|
55
|
-
}
|
|
56
|
-
return client.post(`${baseUrl}/users/me/calls`, query);
|
|
57
|
-
},
|
|
58
|
-
cancelCall: (callId) => client.delete(`${baseUrl}/users/me/calls/${callId}`, null),
|
|
59
|
-
listCalls: () => client.get(`${baseUrl}/users/me/calls`, null).then((response) => Call_1.default.parseMany(response.items)),
|
|
60
|
-
relocateCall(callId, destination, lineId, contact) {
|
|
61
|
-
const body = {
|
|
62
|
-
completions: ['answer'],
|
|
63
|
-
destination,
|
|
64
|
-
initiator_call: callId,
|
|
65
|
-
auto_answer: true,
|
|
66
|
-
};
|
|
67
|
-
if (lineId || contact) {
|
|
68
|
-
body.location = {};
|
|
69
|
-
}
|
|
70
|
-
if (lineId) {
|
|
71
|
-
body.location.line_id = lineId;
|
|
72
|
-
}
|
|
73
|
-
if (contact) {
|
|
74
|
-
body.location.contact = contact;
|
|
75
|
-
}
|
|
76
|
-
return client.post(`${baseUrl}/users/me/relocates`, body).then((response) => Relocation_1.default.parse(response));
|
|
77
|
-
},
|
|
78
|
-
listVoicemails: () => client.get(`${baseUrl}/users/me/voicemails`).then((response) => Voicemail_1.default.parseMany(response)),
|
|
79
|
-
deleteVoicemail: (voicemailId) => client.delete(`${baseUrl}/users/me/voicemails/messages/${voicemailId}`),
|
|
80
|
-
getVoicemailUrl: (voicemail) => {
|
|
81
|
-
const body = {
|
|
82
|
-
token: client.token,
|
|
83
|
-
};
|
|
84
|
-
return client.computeUrl('get', `${baseUrl}/users/me/voicemails/messages/${voicemail.id}/recording`, body);
|
|
85
|
-
},
|
|
86
|
-
updateVoicemailFolder: (voicemail, folder) => client.put(`${baseUrl}/users/me/voicemails/messages/${voicemail.id}`, { folder_id: Voicemail_1.default.getFolderMappingFromType(folder) }, null, api_requester_1.default.successResponseParser),
|
|
87
|
-
fetchSwitchboardHeldCalls: (switchboardUuid) => client.get(`${baseUrl}/switchboards/${switchboardUuid}/calls/held`),
|
|
88
|
-
holdSwitchboardCall: (switchboardUuid, callId) => client.put(`${baseUrl}/switchboards/${switchboardUuid}/calls/held/${callId}`, null, null, api_requester_1.default.successResponseParser),
|
|
89
|
-
answerSwitchboardHeldCall: (switchboardUuid, callId, lineId = null) => client.put(`${baseUrl}/switchboards/${switchboardUuid}/calls/held/${callId}/answer${lineId ? `?line_id=${lineId}` : ''}`),
|
|
90
|
-
fetchSwitchboardQueuedCalls: (switchboardUuid) => client.get(`${baseUrl}/switchboards/${switchboardUuid}/calls/queued`),
|
|
91
|
-
answerSwitchboardQueuedCall: (switchboardUuid, callId, lineId = null) => client.put(`${baseUrl}/switchboards/${switchboardUuid}/calls/queued/${callId}/answer${lineId ? `?line_id=${lineId}` : ''}`),
|
|
92
|
-
sendFax: (extension, fax, callerId) => {
|
|
93
|
-
const headers = {
|
|
94
|
-
'Content-type': 'application/pdf',
|
|
95
|
-
'X-Auth-Token': client.token,
|
|
96
|
-
};
|
|
97
|
-
const params = api_requester_1.default.getQueryString({
|
|
98
|
-
extension,
|
|
99
|
-
caller_id: callerId,
|
|
100
|
-
});
|
|
101
|
-
return client.post(`${baseUrl}/users/me/faxes?${params}`, fax, headers);
|
|
102
|
-
},
|
|
103
|
-
getConferenceParticipantsAsUser: (conferenceId) => __awaiter(void 0, void 0, void 0, function* () { return client.get(`${baseUrl}/users/me/conferences/${conferenceId}/participants`); }),
|
|
104
|
-
getMeetingParticipantsAsUser: (meetingUuid) => __awaiter(void 0, void 0, void 0, function* () { return client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/participants`); }),
|
|
105
|
-
banMeetingParticipant: (meetingUuid, participantUuid) => client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}/participants/${participantUuid}`, null, null, api_requester_1.default.successResponseParser),
|
|
106
|
-
listTrunks: () => client.get(`${baseUrl}/trunks`),
|
|
107
|
-
mute: (callId) => client.put(`${baseUrl}/users/me/calls/${callId}/mute/start`, null, null, api_requester_1.default.successResponseParser),
|
|
108
|
-
unmute: (callId) => client.put(`${baseUrl}/users/me/calls/${callId}/mute/stop`, null, null, api_requester_1.default.successResponseParser),
|
|
109
|
-
hold: (callId) => client.put(`${baseUrl}/users/me/calls/${callId}/hold/start`, null, null, api_requester_1.default.successResponseParser),
|
|
110
|
-
resume: (callId) => client.put(`${baseUrl}/users/me/calls/${callId}/hold/stop`, null, null, api_requester_1.default.successResponseParser),
|
|
111
|
-
// eslint-disable-next-line camelcase
|
|
112
|
-
transferCall: (initiator_call, exten, flow) => client.post(`${baseUrl}/users/me/transfers`, {
|
|
113
|
-
initiator_call,
|
|
114
|
-
exten,
|
|
115
|
-
flow,
|
|
116
|
-
}).then(IndirectTransfer_1.default.parseFromApi),
|
|
117
|
-
confirmCallTransfer: (transferId) => client.put(`${baseUrl}/users/me/transfers/${transferId}/complete`, null, null, api_requester_1.default.successResponseParser),
|
|
118
|
-
cancelCallTransfer: (transferId) => client.delete(`${baseUrl}/users/me/transfers/${transferId}`, null, null, api_requester_1.default.successResponseParser),
|
|
119
|
-
sendDTMF: (callId, digits) => client.put(`${baseUrl}/users/me/calls/${callId}/dtmf?digits=${encodeURIComponent(digits)}`, null, null, api_requester_1.default.successResponseParser),
|
|
120
|
-
// @deprecated: check for engine version >= 20.12 instead
|
|
121
|
-
isAhHocConferenceAPIEnabled: () => client.head(`${baseUrl}/users/me/conferences/adhoc`, null, null, api_requester_1.default.successResponseParser),
|
|
122
|
-
createAdHocConference: (hostCallId, participantCallIds) => client.post(`${baseUrl}/users/me/conferences/adhoc`, {
|
|
123
|
-
host_call_id: hostCallId,
|
|
124
|
-
participant_call_ids: participantCallIds,
|
|
125
|
-
}),
|
|
126
|
-
addAdHocConferenceParticipant: (conferenceId, callId) => client.put(`${baseUrl}/users/me/conferences/adhoc/${conferenceId}/participants/${callId}`, null, null, api_requester_1.default.successResponseParser),
|
|
127
|
-
removeAdHocConferenceParticipant: (conferenceId, participantCallId) => client.delete(`${baseUrl}/users/me/conferences/adhoc/${conferenceId}/participants/${participantCallId}`, null, null, api_requester_1.default.successResponseParser),
|
|
128
|
-
deleteAdHocConference: (conferenceId) => client.delete(`${baseUrl}/users/me/conferences/adhoc/${conferenceId}`, null, null, api_requester_1.default.successResponseParser),
|
|
129
|
-
startRecording: (callId) => client.put(`${baseUrl}/users/me/calls/${callId}/record/start`, null, null, api_requester_1.default.successResponseParser),
|
|
130
|
-
stopRecording: (callId) => client.put(`${baseUrl}/users/me/calls/${callId}/record/stop`, null, null, api_requester_1.default.successResponseParser),
|
|
131
|
-
pauseRecording: (callId) => client.put(`${baseUrl}/users/me/calls/${callId}/record/pause`, null, null, api_requester_1.default.successResponseParser),
|
|
132
|
-
resumeRecording: (callId) => client.put(`${baseUrl}/users/me/calls/${callId}/record/resume`, null, null, api_requester_1.default.successResponseParser),
|
|
133
|
-
guestGetMeetingStatus: (meetingUuid) => client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}/status`).then(MeetingStatus_1.default.parse),
|
|
134
|
-
}));
|
package/lib/api/chatd.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const api_requester_1 = __importDefault(require("../utils/api-requester"));
|
|
16
|
-
const Profile_1 = __importDefault(require("../domain/Profile"));
|
|
17
|
-
const ChatRoom_1 = __importDefault(require("../domain/ChatRoom"));
|
|
18
|
-
const ChatMessage_1 = __importDefault(require("../domain/ChatMessage"));
|
|
19
|
-
// split contact status retrieval to avoid `414 Request-URI Too Large`.
|
|
20
|
-
const MAX_PRESENCE_FETCHED = 30;
|
|
21
|
-
exports.default = ((client, baseUrl) => ({
|
|
22
|
-
updateState: (contactUuid, state) => client.put(`${baseUrl}/users/${contactUuid}/presences`, {
|
|
23
|
-
state,
|
|
24
|
-
}, null, api_requester_1.default.successResponseParser),
|
|
25
|
-
updateStatus: (contactUuid, state, status) => {
|
|
26
|
-
const body = {
|
|
27
|
-
state,
|
|
28
|
-
status,
|
|
29
|
-
};
|
|
30
|
-
return client.put(`${baseUrl}/users/${contactUuid}/presences`, body, null, api_requester_1.default.successResponseParser);
|
|
31
|
-
},
|
|
32
|
-
getState: (contactUuid) => __awaiter(void 0, void 0, void 0, function* () { return client.get(`${baseUrl}/users/${contactUuid}/presences`).then((response) => response.state); }),
|
|
33
|
-
getContactStatusInfo: (contactUuid) => __awaiter(void 0, void 0, void 0, function* () { return client.get(`${baseUrl}/users/${contactUuid}/presences`).then((response) => response); }),
|
|
34
|
-
getLineState: (contactUuid) => __awaiter(void 0, void 0, void 0, function* () { return client.get(`${baseUrl}/users/${contactUuid}/presences`).then((response) => Profile_1.default.getLinesState(response.lines)); }),
|
|
35
|
-
getMultipleLineState(contactUuids) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const body = {};
|
|
38
|
-
const uuids = contactUuids || [];
|
|
39
|
-
if (uuids.length > MAX_PRESENCE_FETCHED) {
|
|
40
|
-
const requests = uuids.reduce((acc, _, i) => {
|
|
41
|
-
if (i % MAX_PRESENCE_FETCHED === 0) {
|
|
42
|
-
acc.push(this.getMultipleLineState(uuids.slice(i, i + MAX_PRESENCE_FETCHED)));
|
|
43
|
-
}
|
|
44
|
-
return acc;
|
|
45
|
-
}, []);
|
|
46
|
-
const splittedStatuses = yield Promise.all(requests);
|
|
47
|
-
return splittedStatuses.flat();
|
|
48
|
-
}
|
|
49
|
-
if (uuids.length) {
|
|
50
|
-
body.user_uuid = uuids.join(',');
|
|
51
|
-
}
|
|
52
|
-
return client.get(`${baseUrl}/users/presences`, body).then((response) => response.items);
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
getUserRooms: () => __awaiter(void 0, void 0, void 0, function* () { return client.get(`${baseUrl}/users/me/rooms`).then(ChatRoom_1.default.parseMany); }),
|
|
56
|
-
createRoom: (name, users) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
-
return client.post(`${baseUrl}/users/me/rooms`, {
|
|
58
|
-
name,
|
|
59
|
-
users,
|
|
60
|
-
}).then(ChatRoom_1.default.parse);
|
|
61
|
-
}),
|
|
62
|
-
getRoomMessages: (roomUuid, params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
-
const qs = api_requester_1.default.getQueryString(params || {});
|
|
64
|
-
return client.get(`${baseUrl}/users/me/rooms/${roomUuid}/messages${qs.length ? `?${qs}` : ''}`).then((response) => ChatMessage_1.default.parseMany(response));
|
|
65
|
-
}),
|
|
66
|
-
sendRoomMessage: (roomUuid, message) => __awaiter(void 0, void 0, void 0, function* () { return client.post(`${baseUrl}/users/me/rooms/${roomUuid}/messages`, message).then(ChatMessage_1.default.parse); }),
|
|
67
|
-
getMessages: (options) => __awaiter(void 0, void 0, void 0, function* () { return client.get(`${baseUrl}/users/me/rooms/messages`, options); }),
|
|
68
|
-
}));
|
package/lib/api/confd.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const api_requester_1 = __importDefault(require("../utils/api-requester"));
|
|
16
|
-
const CallerID_1 = __importDefault(require("../domain/CallerID"));
|
|
17
|
-
const Profile_1 = __importDefault(require("../domain/Profile"));
|
|
18
|
-
const SipLine_1 = __importDefault(require("../domain/SipLine"));
|
|
19
|
-
const ExternalApp_1 = __importDefault(require("../domain/ExternalApp"));
|
|
20
|
-
const Meeting_1 = __importDefault(require("../domain/Meeting"));
|
|
21
|
-
const MeetingAuthorization_1 = __importDefault(require("../domain/MeetingAuthorization"));
|
|
22
|
-
const object_1 = require("../utils/object");
|
|
23
|
-
exports.default = ((client, baseUrl) => ({
|
|
24
|
-
listUsers: () => client.get(`${baseUrl}/users`, null),
|
|
25
|
-
getUser: (userUuid) => client.get(`${baseUrl}/users/${userUuid}`, null).then(Profile_1.default.parse),
|
|
26
|
-
updateUser: (userUuid, profile) => {
|
|
27
|
-
const body = {
|
|
28
|
-
firstname: profile.firstName,
|
|
29
|
-
lastname: profile.lastName,
|
|
30
|
-
email: profile.email,
|
|
31
|
-
mobile_phone_number: profile.mobileNumber,
|
|
32
|
-
};
|
|
33
|
-
return client.put(`${baseUrl}/users/${userUuid}`, body, null, api_requester_1.default.successResponseParser);
|
|
34
|
-
},
|
|
35
|
-
updateForwardOption: (userUuid, key, destination, enabled) => {
|
|
36
|
-
const url = `${baseUrl}/users/${userUuid}/forwards/${key}`;
|
|
37
|
-
return client.put(url, {
|
|
38
|
-
destination,
|
|
39
|
-
enabled,
|
|
40
|
-
}, null, api_requester_1.default.successResponseParser);
|
|
41
|
-
},
|
|
42
|
-
updateForwardOptions: (userUuid, options) => {
|
|
43
|
-
const url = `${baseUrl}/users/${userUuid}/forwards`;
|
|
44
|
-
return client.put(url, options, null, api_requester_1.default.successResponseParser);
|
|
45
|
-
},
|
|
46
|
-
updateDoNotDisturb: (userUuid, enabled) => client.put(`${baseUrl}/users/${userUuid}/services/dnd`, {
|
|
47
|
-
enabled,
|
|
48
|
-
}, null, api_requester_1.default.successResponseParser),
|
|
49
|
-
getUserLineSip: (userUuid, lineId) => client.get(`${baseUrl}/users/${userUuid}/lines/${lineId}/associated/endpoints/sip?view=merged`).then(SipLine_1.default.parse),
|
|
50
|
-
getUserLinesSip(userUuid, lineIds) {
|
|
51
|
-
// We have to catch all exception, unless Promise.all will returns an empty array for 2 lines with a custom one:
|
|
52
|
-
// The custom line will throw a 404 and break the Promise.all.
|
|
53
|
-
return Promise.all(lineIds.map(lineId => this.getUserLineSip(userUuid, lineId).catch(() => null)));
|
|
54
|
-
},
|
|
55
|
-
getUserLineSipFromToken(userUuid) {
|
|
56
|
-
return this.getUser(userUuid).then(user => {
|
|
57
|
-
if (!user.lines.length) {
|
|
58
|
-
console.warn(`No sip line for user: ${userUuid}`);
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
const line = user.lines[0];
|
|
62
|
-
return this.getUserLineSip(userUuid, line.uuid || line.id);
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
listApplications: () => client.get(`${baseUrl}/applications`, null),
|
|
66
|
-
getInfos: () => client.get(`${baseUrl}/infos`, null),
|
|
67
|
-
getExternalApps: (userUuid) => client.get(`${baseUrl}/users/${userUuid}/external/apps`).then(ExternalApp_1.default.parseMany),
|
|
68
|
-
getExternalApp: (userUuid, name) => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
|
-
const url = `${baseUrl}/users/${userUuid}/external/apps/${name}?view=fallback`;
|
|
70
|
-
try {
|
|
71
|
-
return yield client.get(url).then(ExternalApp_1.default.parse);
|
|
72
|
-
}
|
|
73
|
-
catch (e) {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
}),
|
|
77
|
-
getMyMeetings: () => client.get(`${baseUrl}/users/me/meetings`).then((response) => Meeting_1.default.parseMany(response.items)),
|
|
78
|
-
createMyMeeting: (args) => client.post(`${baseUrl}/users/me/meetings`, (0, object_1.convertKeysFromCamelToUnderscore)(args)).then(Meeting_1.default.parse),
|
|
79
|
-
updateMyMeeting: (meetingUuid, data) => client.put(`${baseUrl}/users/me/meetings/${meetingUuid}`, (0, object_1.convertKeysFromCamelToUnderscore)(data), null, api_requester_1.default.successResponseParser),
|
|
80
|
-
deleteMyMeeting: (meetingUuid) => client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
|
|
81
|
-
getMeeting: (meetingUuid) => client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting_1.default.parse),
|
|
82
|
-
meetingAuthorizations: (meetingUuid) => client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then((response) => MeetingAuthorization_1.default.parseMany(response.items)),
|
|
83
|
-
meetingAuthorizationReject: (meetingUuid, authorizationUuid) => client.put(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`, {}, null, api_requester_1.default.successResponseParser),
|
|
84
|
-
meetingAuthorizationAccept: (meetingUuid, authorizationUuid) => client.put(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`, {}, null, api_requester_1.default.successResponseParser),
|
|
85
|
-
guestGetMeeting: (meetingUuid) => client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting_1.default.parse),
|
|
86
|
-
guestAuthorizationRequest: (userUuid, meetingUuid, username) => client.post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, {
|
|
87
|
-
guest_name: username,
|
|
88
|
-
}).then(MeetingAuthorization_1.default.parse),
|
|
89
|
-
guestAuthorizationCheck: (userUuid, meetingUuid, authorizationUuid) => client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
|
|
90
|
-
getOutgoingCallerIDs: (userUuid) => client.get(`${baseUrl}/users/${userUuid}/callerids/outgoing`, null).then(CallerID_1.default.parseMany),
|
|
91
|
-
}));
|
package/lib/api/ctid-ng.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable camelcase */
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
/* DEPRECATED: USE CALLD INSTEAD CTID-NG */
|
|
8
|
-
const api_requester_1 = __importDefault(require("../utils/api-requester"));
|
|
9
|
-
const Relocation_1 = __importDefault(require("../domain/Relocation"));
|
|
10
|
-
const ChatMessage_1 = __importDefault(require("../domain/ChatMessage"));
|
|
11
|
-
const Voicemail_1 = __importDefault(require("../domain/Voicemail"));
|
|
12
|
-
const Call_1 = __importDefault(require("../domain/Call"));
|
|
13
|
-
const CTIPhone_1 = require("../domain/Phone/CTIPhone");
|
|
14
|
-
exports.default = ((client, baseUrl) => ({
|
|
15
|
-
updatePresence: (presence) => client.put(`${baseUrl}/users/me/presences`, {
|
|
16
|
-
presence,
|
|
17
|
-
}, null, api_requester_1.default.successResponseParser),
|
|
18
|
-
listMessages: (participantUuid, limit) => {
|
|
19
|
-
const query = {};
|
|
20
|
-
if (participantUuid) {
|
|
21
|
-
query.participant_user_uuid = participantUuid;
|
|
22
|
-
}
|
|
23
|
-
if (limit) {
|
|
24
|
-
query.limit = limit;
|
|
25
|
-
}
|
|
26
|
-
return client.get(`${baseUrl}/users/me/chats`, query).then(ChatMessage_1.default.parseMany);
|
|
27
|
-
},
|
|
28
|
-
sendMessage: (alias, msg, toUserId) => {
|
|
29
|
-
const body = {
|
|
30
|
-
alias,
|
|
31
|
-
msg,
|
|
32
|
-
to: toUserId,
|
|
33
|
-
};
|
|
34
|
-
return client.post(`${baseUrl}/users/me/chats`, body, null, api_requester_1.default.successResponseParser);
|
|
35
|
-
},
|
|
36
|
-
makeCall: (extension, fromMobile, lineId, allLines = false) => {
|
|
37
|
-
const query = {
|
|
38
|
-
from_mobile: fromMobile,
|
|
39
|
-
extension,
|
|
40
|
-
};
|
|
41
|
-
if (lineId) {
|
|
42
|
-
query.line_id = lineId;
|
|
43
|
-
}
|
|
44
|
-
if (allLines) {
|
|
45
|
-
query.all_lines = true;
|
|
46
|
-
}
|
|
47
|
-
return client.post(`${baseUrl}/users/me/calls`, query);
|
|
48
|
-
},
|
|
49
|
-
cancelCall: (callId) => client.delete(`${baseUrl}/users/me/calls/${callId}`),
|
|
50
|
-
listCalls: () => client.get(`${baseUrl}/users/me/calls`).then((response) => Call_1.default.parseMany(response.items)),
|
|
51
|
-
relocateCall(callId, destination, lineId, contact) {
|
|
52
|
-
const body = {
|
|
53
|
-
completions: ['answer'],
|
|
54
|
-
destination,
|
|
55
|
-
initiator_call: callId,
|
|
56
|
-
auto_answer: true,
|
|
57
|
-
};
|
|
58
|
-
if (lineId || contact) {
|
|
59
|
-
body.location = {};
|
|
60
|
-
}
|
|
61
|
-
if (lineId) {
|
|
62
|
-
body.location.line_id = lineId;
|
|
63
|
-
}
|
|
64
|
-
if (contact) {
|
|
65
|
-
body.location.contact = contact;
|
|
66
|
-
}
|
|
67
|
-
return client.post(`${baseUrl}/users/me/relocates`, body).then(Relocation_1.default.parse);
|
|
68
|
-
},
|
|
69
|
-
transferCall(callId, number, flow = CTIPhone_1.TRANSFER_FLOW_BLIND) {
|
|
70
|
-
const body = {
|
|
71
|
-
exten: number,
|
|
72
|
-
flow,
|
|
73
|
-
initiator_call: callId,
|
|
74
|
-
};
|
|
75
|
-
return client.post(`${baseUrl}/users/me/transfers`, body);
|
|
76
|
-
},
|
|
77
|
-
// @TODO: fix response type
|
|
78
|
-
cancelCallTransfer: (transferId) => client.delete(`${baseUrl}/users/me/transfers/${transferId}`),
|
|
79
|
-
// @TODO: fix response type
|
|
80
|
-
confirmCallTransfer: (transferId) => client.put(`${baseUrl}/users/me/transfers/${transferId}/complete`),
|
|
81
|
-
listVoicemails: () => client.get(`${baseUrl}/users/me/voicemails`, null).then((response) => Voicemail_1.default.parseMany(response)),
|
|
82
|
-
deleteVoicemail: (voicemailId) => client.delete(`${baseUrl}/users/me/voicemails/messages/${voicemailId}`, null),
|
|
83
|
-
getPresence: (contactUuid) => client.get(`${baseUrl}/users/${contactUuid}/presences`, null),
|
|
84
|
-
getStatus: (lineUuid) => client.get(`${baseUrl}/lines/${lineUuid}/presences`, null),
|
|
85
|
-
fetchSwitchboardHeldCalls: (switchboardUuid) => client.get(`${baseUrl}/switchboards/${switchboardUuid}/calls/held`, null),
|
|
86
|
-
holdSwitchboardCall: (switchboardUuid, callId) => client.put(`${baseUrl}/switchboards/${switchboardUuid}/calls/held/${callId}`, null, null, api_requester_1.default.successResponseParser),
|
|
87
|
-
answerSwitchboardHeldCall: (switchboardUuid, callId) => client.put(`${baseUrl}/switchboards/${switchboardUuid}/calls/held/${callId}/answer`, null),
|
|
88
|
-
fetchSwitchboardQueuedCalls: (switchboardUuid) => client.get(`${baseUrl}/switchboards/${switchboardUuid}/calls/queued`, null),
|
|
89
|
-
answerSwitchboardQueuedCall: (switchboardUuid, callId) => client.put(`${baseUrl}/switchboards/${switchboardUuid}/calls/queued/${callId}/answer`, null),
|
|
90
|
-
sendFax: (extension, fax, callerId = null) => {
|
|
91
|
-
const headers = {
|
|
92
|
-
'Content-type': 'application/pdf',
|
|
93
|
-
'X-Auth-Token': client.token,
|
|
94
|
-
};
|
|
95
|
-
const params = api_requester_1.default.getQueryString({
|
|
96
|
-
extension,
|
|
97
|
-
caller_id: callerId,
|
|
98
|
-
});
|
|
99
|
-
return client.post(`${baseUrl}/users/me/faxes?${params}`, fax, headers);
|
|
100
|
-
},
|
|
101
|
-
}));
|
package/lib/api/dird.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const jsonToGraphQLQuery_1 = require("json-to-graphql-query/lib/jsonToGraphQLQuery");
|
|
16
|
-
const api_requester_1 = __importDefault(require("../utils/api-requester"));
|
|
17
|
-
const index_1 = require("../index");
|
|
18
|
-
const getContactPayload = (contact) => ({
|
|
19
|
-
email: contact.email,
|
|
20
|
-
firstname: contact.firstName ? contact.firstName : '',
|
|
21
|
-
lastname: contact.lastName ? contact.lastName : '',
|
|
22
|
-
number: contact.phoneNumber ? contact.phoneNumber : '',
|
|
23
|
-
entreprise: contact.entreprise ? contact.entreprise : '',
|
|
24
|
-
birthday: contact.birthday ? contact.birthday : '',
|
|
25
|
-
address: contact.address ? contact.address : '',
|
|
26
|
-
note: contact.note ? contact.note : '',
|
|
27
|
-
});
|
|
28
|
-
exports.default = ((client, baseUrl) => ({
|
|
29
|
-
search: (context, term, offset = 0, limit = null) => client.get(`${baseUrl}/directories/lookup/${context}`, {
|
|
30
|
-
term,
|
|
31
|
-
}).then((response) => index_1.Contact.parseMany(response, offset, limit)),
|
|
32
|
-
listPersonalContacts: (queryParams) => client.get(`${baseUrl}/personal`, queryParams).then((response) => index_1.Contact.parseManyPersonal(response.items)),
|
|
33
|
-
fetchPersonalContact: (contactUuid) => client.get(`${baseUrl}/personal/${contactUuid}`).then(index_1.Contact.parsePersonal),
|
|
34
|
-
addContact: (contact) => client.post(`${baseUrl}/personal`, getContactPayload(contact)).then(index_1.Contact.parsePersonal),
|
|
35
|
-
editContact: (contact) => client.put(`${baseUrl}/personal/${contact.sourceId || contact.id || ''}`, getContactPayload(contact)).then(index_1.Contact.parsePersonal),
|
|
36
|
-
importContacts: (csv) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
|
-
const headers = {
|
|
38
|
-
'Content-Type': 'text/csv; charset=utf-8',
|
|
39
|
-
'X-Auth-Token': client.token,
|
|
40
|
-
};
|
|
41
|
-
return client.post(`${baseUrl}/personal/import`, csv, headers).then((result) => index_1.Contact.parseManyPersonal(result.created));
|
|
42
|
-
}),
|
|
43
|
-
deleteContact: (contactUuid) => client.delete(`${baseUrl}/personal/${contactUuid}`),
|
|
44
|
-
listFavorites: (context) => client.get(`${baseUrl}/directories/favorites/${context}`).then(index_1.Contact.parseMany),
|
|
45
|
-
markAsFavorite: (source, sourceId) => {
|
|
46
|
-
const url = `${baseUrl}/directories/favorites/${source}/${sourceId}`;
|
|
47
|
-
return client.put(url, null, null, api_requester_1.default.successResponseParser);
|
|
48
|
-
},
|
|
49
|
-
removeFavorite: (source, sourceId) => client.delete(`${baseUrl}/directories/favorites/${source}/${sourceId}`),
|
|
50
|
-
fetchOffice365Source: (context) => client.get(`${baseUrl}/directories/${context}/sources`, {
|
|
51
|
-
backend: 'office365',
|
|
52
|
-
}),
|
|
53
|
-
fetchOffice365Contacts: (source, queryParams) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
|
-
if (!source) {
|
|
55
|
-
return Promise.resolve([]);
|
|
56
|
-
}
|
|
57
|
-
return client.get(`${baseUrl}/backends/office365/sources/${source.uuid}/contacts`, queryParams).then((response) => index_1.Contact.parseManyOffice365(response.items, source));
|
|
58
|
-
}),
|
|
59
|
-
fetchWazoSource: (context) => client.get(`${baseUrl}/directories/${context}/sources`, {
|
|
60
|
-
backend: 'wazo',
|
|
61
|
-
}),
|
|
62
|
-
// Can be used with `queryParams = { uuid: uuid1, uuid2 }` to fetch multiple contacts
|
|
63
|
-
fetchWazoContacts: (source, queryParams) => __awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
-
if (!source) {
|
|
65
|
-
return Promise.resolve([]);
|
|
66
|
-
}
|
|
67
|
-
return client.get(`${baseUrl}/backends/wazo/sources/${source.uuid}/contacts`, queryParams).then((response) => index_1.Contact.parseManyWazo(response.items, source));
|
|
68
|
-
}),
|
|
69
|
-
fetchGoogleSource: (context) => client.get(`${baseUrl}/directories/${context}/sources`, {
|
|
70
|
-
backend: 'google',
|
|
71
|
-
}),
|
|
72
|
-
fetchGoogleContacts: (source, queryParams) => __awaiter(void 0, void 0, void 0, function* () {
|
|
73
|
-
if (!source) {
|
|
74
|
-
return Promise.resolve([]);
|
|
75
|
-
}
|
|
76
|
-
return client.get(`${baseUrl}/backends/google/sources/${source.uuid}/contacts`, queryParams).then((response) => index_1.Contact.parseManyGoogle(response.items, source));
|
|
77
|
-
}),
|
|
78
|
-
fetchConferenceSource: (context) => client.get(`${baseUrl}/directories/${context}/sources`, {
|
|
79
|
-
backend: 'conference',
|
|
80
|
-
}),
|
|
81
|
-
fetchSourcesFor: (context, backend) => client.get(`${baseUrl}/directories/${context}/sources`, { backend }),
|
|
82
|
-
fetchPhonebookContacts: (source, queryParams) => __awaiter(void 0, void 0, void 0, function* () {
|
|
83
|
-
if (!source) {
|
|
84
|
-
return Promise.resolve({ items: [], total: 0 });
|
|
85
|
-
}
|
|
86
|
-
return client.get(`${baseUrl}/backends/phonebook/sources/${source.uuid}/contacts`, queryParams);
|
|
87
|
-
}),
|
|
88
|
-
fetchConferenceContacts: (source, queryParams) => __awaiter(void 0, void 0, void 0, function* () {
|
|
89
|
-
if (!source) {
|
|
90
|
-
return Promise.resolve([]);
|
|
91
|
-
}
|
|
92
|
-
return client.get(`${baseUrl}/backends/conference/sources/${source.uuid}/contacts`, queryParams).then((response) => index_1.Contact.parseManyConference(response.items, source));
|
|
93
|
-
}),
|
|
94
|
-
// Graphql
|
|
95
|
-
findMultipleContactsByNumber: (numbers, fields) => {
|
|
96
|
-
const query = (0, jsonToGraphQLQuery_1.jsonToGraphQLQuery)({
|
|
97
|
-
me: {
|
|
98
|
-
contacts: {
|
|
99
|
-
__args: {
|
|
100
|
-
profile: 'default',
|
|
101
|
-
extens: numbers,
|
|
102
|
-
},
|
|
103
|
-
edges: {
|
|
104
|
-
node: fields || {
|
|
105
|
-
firstname: true,
|
|
106
|
-
lastname: true,
|
|
107
|
-
wazoReverse: true,
|
|
108
|
-
wazoBackend: true,
|
|
109
|
-
email: true,
|
|
110
|
-
wazoSourceEntryId: true,
|
|
111
|
-
wazoSourceName: true,
|
|
112
|
-
'... on WazoContact': {
|
|
113
|
-
userUuid: true,
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
});
|
|
120
|
-
return client.post(`${baseUrl}/graphql`, {
|
|
121
|
-
query: `{${query}}`,
|
|
122
|
-
}).then(index_1.Contact.manyGraphQlWithNumbersParser(numbers));
|
|
123
|
-
},
|
|
124
|
-
}));
|
package/lib/api/webhookd.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Subscription_1 = __importDefault(require("../domain/Subscription"));
|
|
7
|
-
exports.default = ((client, baseUrl) => ({
|
|
8
|
-
getSubscriptions: () => client.get(`${baseUrl}/users/me/subscriptions`).then(Subscription_1.default.parseMany),
|
|
9
|
-
getSubscription: (uuid) => client.get(`${baseUrl}/users/me/subscriptions/${uuid}`).then(Subscription_1.default.parse),
|
|
10
|
-
createSubscription: (payload) => client.post(`${baseUrl}/users/me/subscriptions`, payload),
|
|
11
|
-
removeSubscription: (uuid) => client.delete(`${baseUrl}/users/me/subscriptions/${uuid}`),
|
|
12
|
-
}));
|
package/lib/api-client.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const application_1 = __importDefault(require("./api/application"));
|
|
7
|
-
const confd_1 = __importDefault(require("./api/confd"));
|
|
8
|
-
const ctid_ng_1 = __importDefault(require("./api/ctid-ng"));
|
|
9
|
-
const dird_1 = __importDefault(require("./api/dird"));
|
|
10
|
-
const call_logd_1 = __importDefault(require("./api/call-logd"));
|
|
11
|
-
const chatd_1 = __importDefault(require("./api/chatd"));
|
|
12
|
-
const calld_1 = __importDefault(require("./api/calld"));
|
|
13
|
-
const agentd_1 = __importDefault(require("./api/agentd"));
|
|
14
|
-
const webhookd_1 = __importDefault(require("./api/webhookd"));
|
|
15
|
-
const amid_1 = __importDefault(require("./api/amid"));
|
|
16
|
-
const constants_1 = require("./constants");
|
|
17
|
-
const base_api_client_1 = __importDefault(require("./base-api-client"));
|
|
18
|
-
class ApiClient extends base_api_client_1.default {
|
|
19
|
-
constructor(args) {
|
|
20
|
-
super(args);
|
|
21
|
-
this.initializeEndpoints(); // Reinitialize sdk endpoints
|
|
22
|
-
}
|
|
23
|
-
initializeEndpoints() {
|
|
24
|
-
super.initializeEndpoints();
|
|
25
|
-
this.application = (0, application_1.default)(this.client, `calld/${constants_1.APPLICATION_VERSION}/applications`);
|
|
26
|
-
this.confd = (0, confd_1.default)(this.client, `confd/${constants_1.CONFD_VERSION}`);
|
|
27
|
-
this.ctidNg = (0, ctid_ng_1.default)(this.client, `ctid-ng/${constants_1.CTIDNG_VERSION}`);
|
|
28
|
-
this.dird = (0, dird_1.default)(this.client, `dird/${constants_1.DIRD_VERSION}`);
|
|
29
|
-
this.callLogd = (0, call_logd_1.default)(this.client, `call-logd/${constants_1.CALL_LOGD_VERSION}`);
|
|
30
|
-
this.chatd = (0, chatd_1.default)(this.client, `chatd/${constants_1.CHATD_VERSION}`);
|
|
31
|
-
this.calld = (0, calld_1.default)(this.client, `calld/${constants_1.CALLD_VERSION}`);
|
|
32
|
-
this.agentd = (0, agentd_1.default)(this.client, `agentd/${constants_1.AGENTD_VERSION}`);
|
|
33
|
-
this.webhookd = (0, webhookd_1.default)(this.client, `webhookd/${constants_1.WEBHOOKD_VERSION}`);
|
|
34
|
-
this.amid = (0, amid_1.default)(this.client, `amid/${constants_1.AMID_VERSION}`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.default = ApiClient;
|