@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
|
@@ -1,114 +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
|
-
exports.getFetchOptions = exports.setFetchOptions = exports.setRequestTimeout = exports.setIsMobile = exports.setRefreshBackend = exports.setRefreshExpiration = exports.setOnRefreshTokenError = exports.setOnRefreshToken = exports.setRefreshDomainName = exports.setRefreshTenantId = exports.setRefreshToken = exports.setApiToken = exports.setCurrentServer = exports.setApiClientId = void 0;
|
|
7
|
-
/* eslint-disable dot-notation */
|
|
8
|
-
const api_client_1 = __importDefault(require("../api-client"));
|
|
9
|
-
// Can't use node cache mechanism here because when requiring lib/CallApi.js
|
|
10
|
-
// this file will be merge with CallApi.js and the cache will be lost.
|
|
11
|
-
// So we have to store values in global scope.
|
|
12
|
-
global.wazoClients = global.wazoClients || {};
|
|
13
|
-
global.wazoClientId = global.wazoClientId || {};
|
|
14
|
-
global.wazoClientToken = global.wazoClientToken || {};
|
|
15
|
-
global.wazoRefreshToken = global.wazoRefreshToken || {};
|
|
16
|
-
global.wazoRefreshTenantId = global.wazoRefreshTenantId || {};
|
|
17
|
-
global.wazoRefreshDomainName = global.wazoRefreshDomainName || {};
|
|
18
|
-
global.wazoOnRefreshToken = global.wazoOnRefreshToken || {};
|
|
19
|
-
global.wazoOnRefreshTokenError = global.wazoOnRefreshTokenError || {};
|
|
20
|
-
global.wazoRefreshExpiration = global.wazoRefreshExpiration || {};
|
|
21
|
-
global.wazoRefreshBackend = global.wazoRefreshBackend || {};
|
|
22
|
-
global.wazoIsMobile = global.wazoIsMobile || {};
|
|
23
|
-
global.wazoRequestApiTimeout = global.wazoRequestApiTimeout || {};
|
|
24
|
-
global.wazoFetchOptions = global.wazoFetchOptions || {};
|
|
25
|
-
const setApiClientId = (clientId, forServer = null) => {
|
|
26
|
-
global.wazoClientId[String(forServer)] = clientId;
|
|
27
|
-
};
|
|
28
|
-
exports.setApiClientId = setApiClientId;
|
|
29
|
-
const setCurrentServer = (newServer) => {
|
|
30
|
-
global.wazoCurrentServer = newServer;
|
|
31
|
-
};
|
|
32
|
-
exports.setCurrentServer = setCurrentServer;
|
|
33
|
-
const setApiToken = (newToken, forServer = null) => {
|
|
34
|
-
global.wazoClientToken[String(forServer)] = newToken;
|
|
35
|
-
};
|
|
36
|
-
exports.setApiToken = setApiToken;
|
|
37
|
-
const setRefreshToken = (newRefreshToken, forServer = null) => {
|
|
38
|
-
global.wazoRefreshToken[String(forServer)] = newRefreshToken;
|
|
39
|
-
};
|
|
40
|
-
exports.setRefreshToken = setRefreshToken;
|
|
41
|
-
const setRefreshTenantId = (refreshTenantId, forServer = null) => {
|
|
42
|
-
console.warn('Use of `setRefreshTenantId` is deprecated, please use `setRefreshDomainName` instead');
|
|
43
|
-
global.wazoRefreshTenantId[String(forServer)] = refreshTenantId;
|
|
44
|
-
};
|
|
45
|
-
exports.setRefreshTenantId = setRefreshTenantId;
|
|
46
|
-
const setRefreshDomainName = (refreshDomainName, forServer = null) => {
|
|
47
|
-
global.wazoRefreshDomainName[String(forServer)] = refreshDomainName;
|
|
48
|
-
};
|
|
49
|
-
exports.setRefreshDomainName = setRefreshDomainName;
|
|
50
|
-
const setOnRefreshToken = (onRefreshToken, forServer = null) => {
|
|
51
|
-
global.wazoOnRefreshToken[String(forServer)] = onRefreshToken;
|
|
52
|
-
};
|
|
53
|
-
exports.setOnRefreshToken = setOnRefreshToken;
|
|
54
|
-
const setOnRefreshTokenError = (callback, forServer = null) => {
|
|
55
|
-
global.wazoOnRefreshTokenError[String(forServer)] = callback;
|
|
56
|
-
};
|
|
57
|
-
exports.setOnRefreshTokenError = setOnRefreshTokenError;
|
|
58
|
-
const setRefreshExpiration = (refreshExpiration, forServer = null) => {
|
|
59
|
-
global.wazoRefreshExpiration[String(forServer)] = refreshExpiration;
|
|
60
|
-
};
|
|
61
|
-
exports.setRefreshExpiration = setRefreshExpiration;
|
|
62
|
-
const setRefreshBackend = (refreshBackend, forServer = null) => {
|
|
63
|
-
global.wazoRefreshBackend[String(forServer)] = refreshBackend;
|
|
64
|
-
};
|
|
65
|
-
exports.setRefreshBackend = setRefreshBackend;
|
|
66
|
-
const setIsMobile = (isMobile, forServer = null) => {
|
|
67
|
-
global.wazoIsMobile[String(forServer)] = isMobile;
|
|
68
|
-
};
|
|
69
|
-
exports.setIsMobile = setIsMobile;
|
|
70
|
-
const setRequestTimeout = (requestTimeout, forServer = null) => {
|
|
71
|
-
global.wazoRequestApiTimeout[String(forServer)] = requestTimeout;
|
|
72
|
-
};
|
|
73
|
-
exports.setRequestTimeout = setRequestTimeout;
|
|
74
|
-
const setFetchOptions = (fetchOptions, forServer = null) => {
|
|
75
|
-
global.wazoFetchOptions[String(forServer)] = fetchOptions;
|
|
76
|
-
};
|
|
77
|
-
exports.setFetchOptions = setFetchOptions;
|
|
78
|
-
const getFetchOptions = (forServer = null) => (forServer ? global.wazoFetchOptions[forServer] : global.wazoFetchOptions.null) || global.wazoFetchOptions.null;
|
|
79
|
-
exports.getFetchOptions = getFetchOptions;
|
|
80
|
-
const fillClient = (apiClient) => {
|
|
81
|
-
const { server, token, clientId, } = apiClient.client;
|
|
82
|
-
const tenantId = global.wazoRefreshTenantId[server] || global.wazoRefreshTenantId.null || apiClient.refreshTenantId;
|
|
83
|
-
const requestTimeout = global.wazoRequestApiTimeout[server] || global.wazoRequestApiTimeout.null;
|
|
84
|
-
// try with null server when dealing with non-related server info
|
|
85
|
-
apiClient.setToken(global.wazoClientToken[server] || global.wazoClientToken.null || token);
|
|
86
|
-
apiClient.setClientId(global.wazoClientId[server] || global.wazoClientId.null || clientId);
|
|
87
|
-
apiClient.setRefreshToken(global.wazoRefreshToken[server] || global.wazoRefreshToken.null || apiClient.refreshToken);
|
|
88
|
-
if (tenantId) {
|
|
89
|
-
apiClient.setRefreshTenantId(tenantId);
|
|
90
|
-
}
|
|
91
|
-
apiClient.setRefreshDomainName(global.wazoRefreshDomainName[server] || global.wazoRefreshDomainName.null || apiClient.refreshDomainName);
|
|
92
|
-
apiClient.setFetchOptions(global.wazoFetchOptions[server] || global.wazoFetchOptions.null || apiClient.fetchOptions);
|
|
93
|
-
apiClient.setOnRefreshToken(global.wazoOnRefreshToken[server] || global.wazoOnRefreshToken.null || apiClient.onRefreshToken);
|
|
94
|
-
apiClient.setOnRefreshTokenError(global.wazoOnRefreshTokenError[server] || global.wazoOnRefreshTokenError.null || apiClient.onRefreshTokenError);
|
|
95
|
-
apiClient.setRefreshExpiration(global.wazoRefreshExpiration[server] || global.wazoRefreshExpiration.null || apiClient.refreshExpiration);
|
|
96
|
-
apiClient.setRefreshBackend(global.wazoRefreshBackend[server] || global.wazoRefreshBackend.null || apiClient.refreshBackend);
|
|
97
|
-
apiClient.setIsMobile(global.wazoIsMobile[server] || global.wazoIsMobile.null || apiClient.isMobile);
|
|
98
|
-
if (requestTimeout) {
|
|
99
|
-
apiClient.setRequestTimeout(requestTimeout);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const getApiClient = (forServer, Client = api_client_1.default) => {
|
|
103
|
-
const server = forServer || global.wazoCurrentServer || '';
|
|
104
|
-
if (server in global.wazoClients) {
|
|
105
|
-
fillClient(global.wazoClients[server]);
|
|
106
|
-
return global.wazoClients[server];
|
|
107
|
-
}
|
|
108
|
-
global.wazoClients[server] = new Client({
|
|
109
|
-
server,
|
|
110
|
-
});
|
|
111
|
-
fillClient(global.wazoClients[server]);
|
|
112
|
-
return global.wazoClients[server];
|
|
113
|
-
};
|
|
114
|
-
exports.default = getApiClient;
|
package/lib/simple/Auth.js
DELETED
|
@@ -1,433 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.Auth = exports.SamlConfigError = exports.NoSamlRouteError = exports.NoDomainNameError = exports.NoTenantIdError = exports.InvalidAuthorization = exports.InvalidSubscription = void 0;
|
|
39
|
-
const auth_1 = require("../api/auth");
|
|
40
|
-
const getApiClient_1 = __importStar(require("../service/getApiClient"));
|
|
41
|
-
const IssueReporter_1 = __importDefault(require("../service/IssueReporter"));
|
|
42
|
-
const index_1 = __importDefault(require("./index"));
|
|
43
|
-
const SipLine_1 = __importDefault(require("../domain/SipLine"));
|
|
44
|
-
const string_1 = require("../utils/string");
|
|
45
|
-
class InvalidSubscription extends Error {
|
|
46
|
-
}
|
|
47
|
-
exports.InvalidSubscription = InvalidSubscription;
|
|
48
|
-
class InvalidAuthorization extends Error {
|
|
49
|
-
}
|
|
50
|
-
exports.InvalidAuthorization = InvalidAuthorization;
|
|
51
|
-
class NoTenantIdError extends Error {
|
|
52
|
-
}
|
|
53
|
-
exports.NoTenantIdError = NoTenantIdError;
|
|
54
|
-
class NoDomainNameError extends Error {
|
|
55
|
-
}
|
|
56
|
-
exports.NoDomainNameError = NoDomainNameError;
|
|
57
|
-
class NoSamlRouteError extends Error {
|
|
58
|
-
}
|
|
59
|
-
exports.NoSamlRouteError = NoSamlRouteError;
|
|
60
|
-
class SamlConfigError extends Error {
|
|
61
|
-
}
|
|
62
|
-
exports.SamlConfigError = SamlConfigError;
|
|
63
|
-
const logger = IssueReporter_1.default.loggerFor('simple-auth');
|
|
64
|
-
class Auth {
|
|
65
|
-
constructor() {
|
|
66
|
-
this.expiration = auth_1.DETAULT_EXPIRATION;
|
|
67
|
-
this.authenticated = false;
|
|
68
|
-
this.minSubscriptionType = null;
|
|
69
|
-
this.BACKEND_WAZO = auth_1.DEFAULT_BACKEND_USER;
|
|
70
|
-
this.BACKEND_LDAP = auth_1.BACKEND_LDAP_USER;
|
|
71
|
-
}
|
|
72
|
-
init(clientId, expiration, minSubscriptionType, authorizationName, mobile) {
|
|
73
|
-
this.clientId = clientId;
|
|
74
|
-
this.expiration = expiration;
|
|
75
|
-
this.minSubscriptionType = typeof minSubscriptionType === 'undefined' ? null : minSubscriptionType;
|
|
76
|
-
this.authorizationName = authorizationName;
|
|
77
|
-
this.host = null;
|
|
78
|
-
this.session = null;
|
|
79
|
-
this.mobile = mobile || false;
|
|
80
|
-
(0, getApiClient_1.setApiClientId)(this.clientId);
|
|
81
|
-
(0, getApiClient_1.setRefreshExpiration)(this.expiration);
|
|
82
|
-
(0, getApiClient_1.setOnRefreshToken)((token, session) => {
|
|
83
|
-
logger.info('on refresh token done', { token: (0, string_1.obfuscateToken)(token) });
|
|
84
|
-
(0, getApiClient_1.setApiToken)(token);
|
|
85
|
-
index_1.default.Websocket.updateToken(token);
|
|
86
|
-
if (this.onRefreshTokenCallback) {
|
|
87
|
-
this.onRefreshTokenCallback(token, session);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
(0, getApiClient_1.setOnRefreshTokenError)(error => {
|
|
91
|
-
logger.error('on refresh token error', error);
|
|
92
|
-
if (this.onRefreshTokenCallbackError) {
|
|
93
|
-
this.onRefreshTokenCallbackError(error);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
setFetchOptions(options) {
|
|
98
|
-
(0, getApiClient_1.setFetchOptions)(options);
|
|
99
|
-
}
|
|
100
|
-
logIn(username, password, backend, extra) {
|
|
101
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
let tenantId = null;
|
|
103
|
-
let domainName = null;
|
|
104
|
-
if (typeof extra === 'string') {
|
|
105
|
-
tenantId = extra;
|
|
106
|
-
}
|
|
107
|
-
if (extra && typeof extra === 'object') {
|
|
108
|
-
domainName = extra.domainName;
|
|
109
|
-
}
|
|
110
|
-
if (backend && backend !== this.BACKEND_WAZO && !tenantId && !domainName) {
|
|
111
|
-
if (!tenantId) {
|
|
112
|
-
throw new NoTenantIdError('No tenant id');
|
|
113
|
-
}
|
|
114
|
-
if (!domainName) {
|
|
115
|
-
throw new NoDomainNameError('No domain name');
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
this.authenticated = false;
|
|
119
|
-
this.session = null;
|
|
120
|
-
const rawSession = yield (0, getApiClient_1.default)().auth.logIn({
|
|
121
|
-
username,
|
|
122
|
-
password,
|
|
123
|
-
backend: backend,
|
|
124
|
-
tenantId: tenantId,
|
|
125
|
-
domainName: domainName,
|
|
126
|
-
expiration: this.expiration,
|
|
127
|
-
mobile: this.mobile,
|
|
128
|
-
});
|
|
129
|
-
// Used for Proxy Authentication
|
|
130
|
-
if (rawSession) {
|
|
131
|
-
const stackHostFromHeaders = rawSession.getHostFromHeader();
|
|
132
|
-
if (stackHostFromHeaders) {
|
|
133
|
-
this.setHost(stackHostFromHeaders);
|
|
134
|
-
if (this.onHostFromHeadersCallback) {
|
|
135
|
-
this.onHostFromHeadersCallback(stackHostFromHeaders);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (backend) {
|
|
140
|
-
(0, getApiClient_1.default)().setRefreshBackend(backend);
|
|
141
|
-
}
|
|
142
|
-
if (tenantId) {
|
|
143
|
-
(0, getApiClient_1.default)().setRefreshTenantId(tenantId);
|
|
144
|
-
}
|
|
145
|
-
if (domainName) {
|
|
146
|
-
(0, getApiClient_1.default)().setRefreshDomainName(domainName);
|
|
147
|
-
}
|
|
148
|
-
return this._onAuthenticated(rawSession);
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
samlLogIn(samlSessionId) {
|
|
152
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
const rawSession = yield (0, getApiClient_1.default)().auth.samlLogIn(samlSessionId);
|
|
154
|
-
return this._onAuthenticated(rawSession);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
samlLogOut() {
|
|
158
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
-
return yield this.logout(false, true);
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
initiateIdpAuthentication(domain, redirectUrl) {
|
|
163
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
-
try {
|
|
165
|
-
return yield (0, getApiClient_1.default)().auth.initiateIdpAuthentication(domain, redirectUrl);
|
|
166
|
-
}
|
|
167
|
-
catch (e) {
|
|
168
|
-
logger.error('Error during IdP authentication initialization:', e.message);
|
|
169
|
-
if (e.status === 404) {
|
|
170
|
-
throw new NoSamlRouteError('No route found for SAML SSO');
|
|
171
|
-
}
|
|
172
|
-
if (e.status === 500) {
|
|
173
|
-
throw new SamlConfigError('SAML/server configuration error');
|
|
174
|
-
}
|
|
175
|
-
throw e;
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
logInViaRefreshToken(refreshToken) {
|
|
180
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
const rawSession = yield (0, getApiClient_1.default)().auth.refreshToken(refreshToken, '', this.expiration, this.mobile);
|
|
182
|
-
return this._onAuthenticated(rawSession);
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
validateToken(token, refreshToken, headerUserUuid) {
|
|
186
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
-
if (!token) {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
if (this.usingEdgeServer && typeof headerUserUuid === 'string') {
|
|
191
|
-
logger.info('using edge server, setting user UUID header', { headerUserUuid });
|
|
192
|
-
this.setHttpUserUuidHeader(headerUserUuid);
|
|
193
|
-
}
|
|
194
|
-
if (refreshToken) {
|
|
195
|
-
(0, getApiClient_1.setRefreshToken)(refreshToken);
|
|
196
|
-
}
|
|
197
|
-
// Check if the token is valid
|
|
198
|
-
try {
|
|
199
|
-
const rawSession = yield (0, getApiClient_1.default)().auth.authenticate(token);
|
|
200
|
-
return this._onAuthenticated(rawSession);
|
|
201
|
-
}
|
|
202
|
-
catch (e) {
|
|
203
|
-
logger.error('on validate token error', e);
|
|
204
|
-
console.warn(e);
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
generateNewToken(refreshToken) {
|
|
209
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
-
return (0, getApiClient_1.default)().auth.refreshToken(refreshToken, '', this.expiration);
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
logout() {
|
|
214
|
-
return __awaiter(this, arguments, void 0, function* (deleteRefreshToken = true, saml = false) {
|
|
215
|
-
var _a;
|
|
216
|
-
try {
|
|
217
|
-
index_1.default.Websocket.close(true);
|
|
218
|
-
if (!saml && this.clientId && deleteRefreshToken) {
|
|
219
|
-
yield (0, getApiClient_1.default)().auth.deleteRefreshToken(this.clientId);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
catch (e) {
|
|
223
|
-
// Nothing to
|
|
224
|
-
}
|
|
225
|
-
let response;
|
|
226
|
-
try {
|
|
227
|
-
if ((_a = this.session) === null || _a === void 0 ? void 0 : _a.token) {
|
|
228
|
-
if (saml) {
|
|
229
|
-
response = yield (0, getApiClient_1.default)().auth.samlLogOut();
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
yield (0, getApiClient_1.default)().auth.logOut(this.session.token);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
catch (e) {
|
|
237
|
-
// Nothing to
|
|
238
|
-
}
|
|
239
|
-
(0, getApiClient_1.setApiToken)(null);
|
|
240
|
-
(0, getApiClient_1.setRefreshToken)(null);
|
|
241
|
-
this.session = null;
|
|
242
|
-
this.authenticated = false;
|
|
243
|
-
this.usingEdgeServer = undefined;
|
|
244
|
-
(0, getApiClient_1.setFetchOptions)({});
|
|
245
|
-
return response;
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
setOnHostFromHeaders(callback) {
|
|
249
|
-
this.onHostFromHeadersCallback = callback;
|
|
250
|
-
}
|
|
251
|
-
setOnSetUsingEdgeServer(callback) {
|
|
252
|
-
logger.info('setting onSetUsingEdgeServer callback', { callback: typeof callback === 'function' });
|
|
253
|
-
this.onSetUsingEdgeServer = callback;
|
|
254
|
-
}
|
|
255
|
-
setOnRefreshToken(callback) {
|
|
256
|
-
this.onRefreshTokenCallback = callback;
|
|
257
|
-
}
|
|
258
|
-
setOnRefreshTokenError(callback) {
|
|
259
|
-
this.onRefreshTokenCallbackError = callback;
|
|
260
|
-
}
|
|
261
|
-
checkAuthorizations(session, authorizationName) {
|
|
262
|
-
if (!authorizationName) {
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
const { authorizations, } = session;
|
|
266
|
-
if (!authorizations.find(authorization => authorization.rules.find(rule => rule.name === authorizationName))) {
|
|
267
|
-
throw new InvalidAuthorization(`No authorization '${authorizationName || ''}' found for your account.`);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
checkSubscription(session, minSubscriptionType) {
|
|
271
|
-
var _a;
|
|
272
|
-
const userSubscriptionType = ((_a = session.profile) === null || _a === void 0 ? void 0 : _a.subscriptionType) || null;
|
|
273
|
-
if (userSubscriptionType === null || userSubscriptionType <= minSubscriptionType) {
|
|
274
|
-
const message = `Invalid subscription ${userSubscriptionType || 'n/a'}, required at least ${minSubscriptionType}`;
|
|
275
|
-
throw new InvalidSubscription(message);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
setHost(host) {
|
|
279
|
-
this.host = host;
|
|
280
|
-
(0, getApiClient_1.setCurrentServer)(host);
|
|
281
|
-
}
|
|
282
|
-
setApiToken(token) {
|
|
283
|
-
(0, getApiClient_1.setApiToken)(token);
|
|
284
|
-
}
|
|
285
|
-
setRefreshToken(refreshToken) {
|
|
286
|
-
(0, getApiClient_1.setRefreshToken)(refreshToken);
|
|
287
|
-
}
|
|
288
|
-
setRefreshTenantId(refreshTenantId) {
|
|
289
|
-
console.warn('Use of `setRefreshTenantId` is deprecated, use `setRefreshDomainName` instead.');
|
|
290
|
-
(0, getApiClient_1.setRefreshTenantId)(refreshTenantId);
|
|
291
|
-
(0, getApiClient_1.default)().setRefreshTenantId(refreshTenantId);
|
|
292
|
-
}
|
|
293
|
-
setRefreshDomainName(domainName) {
|
|
294
|
-
(0, getApiClient_1.setRefreshDomainName)(domainName);
|
|
295
|
-
(0, getApiClient_1.default)().setRefreshDomainName(domainName);
|
|
296
|
-
}
|
|
297
|
-
setRequestTimeout(requestTimeout) {
|
|
298
|
-
(0, getApiClient_1.setRequestTimeout)(requestTimeout);
|
|
299
|
-
(0, getApiClient_1.default)().setRequestTimeout(requestTimeout);
|
|
300
|
-
}
|
|
301
|
-
forceRefreshToken() {
|
|
302
|
-
return (0, getApiClient_1.default)().forceRefreshToken();
|
|
303
|
-
}
|
|
304
|
-
setIsMobile(mobile) {
|
|
305
|
-
this.mobile = mobile;
|
|
306
|
-
}
|
|
307
|
-
getHost() {
|
|
308
|
-
return this.host || undefined;
|
|
309
|
-
}
|
|
310
|
-
getSession() {
|
|
311
|
-
return this.session || undefined;
|
|
312
|
-
}
|
|
313
|
-
getFirstName() {
|
|
314
|
-
if (!this.session || !this.session.profile) {
|
|
315
|
-
return '';
|
|
316
|
-
}
|
|
317
|
-
return this.session.profile.firstName;
|
|
318
|
-
}
|
|
319
|
-
getLastName() {
|
|
320
|
-
if (!this.session || !this.session.profile) {
|
|
321
|
-
return '';
|
|
322
|
-
}
|
|
323
|
-
return this.session.profile.lastName;
|
|
324
|
-
}
|
|
325
|
-
setClientId(clientId) {
|
|
326
|
-
this.clientId = clientId;
|
|
327
|
-
(0, getApiClient_1.setApiClientId)(this.clientId);
|
|
328
|
-
}
|
|
329
|
-
getName() {
|
|
330
|
-
return `${this.getFirstName()} ${this.getLastName()}`;
|
|
331
|
-
}
|
|
332
|
-
_getHttpUserUuidHeaders(uuid) {
|
|
333
|
-
var _a;
|
|
334
|
-
return Object.assign(Object.assign({}, (((_a = (0, getApiClient_1.getFetchOptions)()) === null || _a === void 0 ? void 0 : _a.headers) || {})), { 'X-User-UUID': uuid });
|
|
335
|
-
}
|
|
336
|
-
setHttpUserUuidHeader(uuid) {
|
|
337
|
-
logger.info('Setting http header user uuid', { uuid });
|
|
338
|
-
if (!uuid) {
|
|
339
|
-
logger.warn('attempting to set a null value to user uuid header');
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
const headers = this._getHttpUserUuidHeaders(uuid);
|
|
343
|
-
(0, getApiClient_1.setFetchOptions)(Object.assign(Object.assign({}, (0, getApiClient_1.getFetchOptions)()), { headers }));
|
|
344
|
-
}
|
|
345
|
-
checkHttpUserUuidHeader(uuid) {
|
|
346
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
347
|
-
var _a;
|
|
348
|
-
logger.info('Checking user uuid http header', { uuid });
|
|
349
|
-
if (!uuid) {
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
const headers = this._getHttpUserUuidHeaders(uuid);
|
|
353
|
-
try {
|
|
354
|
-
const response = yield (0, getApiClient_1.default)().client.head('auth/0.1/status', null, headers, (r) => r);
|
|
355
|
-
const allowsUserUuidHeader = (_a = response.headers.get('access-control-allow-headers')) === null || _a === void 0 ? void 0 : _a.includes('X-User-UUID');
|
|
356
|
-
if (this.mobile && !allowsUserUuidHeader) {
|
|
357
|
-
throw new Error('Server does not allow user UUID header on mobile');
|
|
358
|
-
}
|
|
359
|
-
// If the previous request went well, it means that the header is accepted
|
|
360
|
-
this.setHttpUserUuidHeader(uuid);
|
|
361
|
-
this.usingEdgeServer = true;
|
|
362
|
-
logger.info('Setting usingEdgeServer value to TRUE', { requestHeaders: headers, responseHeaders: response.headers, allowsUserUuidHeader });
|
|
363
|
-
}
|
|
364
|
-
catch (e) {
|
|
365
|
-
this.usingEdgeServer = false;
|
|
366
|
-
logger.info('Setting usingEdgeServer to FALSE', { justification: e });
|
|
367
|
-
}
|
|
368
|
-
if (typeof this.onSetUsingEdgeServer === 'function') {
|
|
369
|
-
logger.info('calling onSetUsingEdgeServer', { usingEdgeServer: this.usingEdgeServer });
|
|
370
|
-
this.onSetUsingEdgeServer(this.usingEdgeServer);
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
_onAuthenticated(rawSession) {
|
|
375
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
-
var _a;
|
|
377
|
-
if (this.authenticated && this.session) {
|
|
378
|
-
return this.session;
|
|
379
|
-
}
|
|
380
|
-
const session = rawSession;
|
|
381
|
-
if (!session) {
|
|
382
|
-
return null;
|
|
383
|
-
}
|
|
384
|
-
if (this.usingEdgeServer) {
|
|
385
|
-
this.setHttpUserUuidHeader(session.uuid);
|
|
386
|
-
}
|
|
387
|
-
else if (typeof this.usingEdgeServer === 'undefined') {
|
|
388
|
-
yield this.checkHttpUserUuidHeader(session.uuid);
|
|
389
|
-
}
|
|
390
|
-
(0, getApiClient_1.setApiToken)(session.token);
|
|
391
|
-
if (session.refreshToken) {
|
|
392
|
-
(0, getApiClient_1.setRefreshToken)(session.refreshToken);
|
|
393
|
-
}
|
|
394
|
-
try {
|
|
395
|
-
const [profile, { wazo_version: engineVersion, }] = yield Promise.all([(0, getApiClient_1.default)().confd.getUser(session.uuid), (0, getApiClient_1.default)().confd.getInfos()]);
|
|
396
|
-
session.engineVersion = engineVersion;
|
|
397
|
-
session.profile = profile;
|
|
398
|
-
this.checkAuthorizations(session, this.authorizationName);
|
|
399
|
-
if (this.minSubscriptionType !== null) {
|
|
400
|
-
this.checkSubscription(session, +this.minSubscriptionType);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
catch (e) {
|
|
404
|
-
logger.error('on authenticated error', e);
|
|
405
|
-
// Destroy tokens when validation fails
|
|
406
|
-
if (this.clientId) {
|
|
407
|
-
yield (0, getApiClient_1.default)().auth.deleteRefreshToken(this.clientId);
|
|
408
|
-
}
|
|
409
|
-
if (session) {
|
|
410
|
-
yield (0, getApiClient_1.default)().auth.logOut(session.token);
|
|
411
|
-
}
|
|
412
|
-
throw e;
|
|
413
|
-
}
|
|
414
|
-
try {
|
|
415
|
-
const lineIds = (_a = session.profile) === null || _a === void 0 ? void 0 : _a.lines.filter(line => !line.endpointSccp).map(line => String(line.id));
|
|
416
|
-
const sipLines = yield (0, getApiClient_1.default)().confd.getUserLinesSip(session.uuid, lineIds);
|
|
417
|
-
session.profile.sipLines = sipLines.filter(line => line instanceof SipLine_1.default);
|
|
418
|
-
}
|
|
419
|
-
catch (e) { // When an user has only a sccp line, getSipLines return a 404
|
|
420
|
-
}
|
|
421
|
-
this.authenticated = true;
|
|
422
|
-
index_1.default.Websocket.open(this.host, session);
|
|
423
|
-
this.session = session;
|
|
424
|
-
return session;
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
exports.Auth = Auth;
|
|
429
|
-
if (!global.wazoAuthInstance) {
|
|
430
|
-
global.wazoAuthInstance = new Auth();
|
|
431
|
-
}
|
|
432
|
-
// @ts-ignore: Circular definition of import alias 'default'.
|
|
433
|
-
exports.default = global.wazoAuthInstance;
|
|
@@ -1,31 +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
|
-
exports.Configuration = void 0;
|
|
16
|
-
const _1 = __importDefault(require("."));
|
|
17
|
-
const getApiClient_1 = __importDefault(require("../service/getApiClient"));
|
|
18
|
-
class Configuration {
|
|
19
|
-
getCurrentUser() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const session = _1.default.Auth.getSession();
|
|
22
|
-
return (0, getApiClient_1.default)().confd.getUser(`${session ? session.uuid : ''}`);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.Configuration = Configuration;
|
|
27
|
-
if (!global.wazoConfigurationInstance) {
|
|
28
|
-
global.wazoConfigurationInstance = new Configuration();
|
|
29
|
-
}
|
|
30
|
-
// @ts-ignore: Circular definition of import alias 'default'.
|
|
31
|
-
exports.default = global.wazoConfigurationInstance;
|
package/lib/simple/Directory.js
DELETED
|
@@ -1,29 +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
|
-
exports.Directory = void 0;
|
|
16
|
-
const getApiClient_1 = __importDefault(require("../service/getApiClient"));
|
|
17
|
-
class Directory {
|
|
18
|
-
findMultipleContactsByNumber(numbers, fields) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
return (0, getApiClient_1.default)().dird.findMultipleContactsByNumber(numbers, fields);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.Directory = Directory;
|
|
25
|
-
if (!global.wazoDirectoryInstance) {
|
|
26
|
-
global.wazoDirectoryInstance = new Directory();
|
|
27
|
-
}
|
|
28
|
-
// @ts-ignore: Circular definition of import alias 'default'.
|
|
29
|
-
exports.default = global.wazoDirectoryInstance;
|