@wazo/sdk 0.39.15 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/wazo-sdk.js +12 -12
- package/esm/__tests__/api-client.test.js +0 -10
- package/esm/__tests__/web-rtc-client.test.js +2 -15
- package/esm/api/chatd.js +0 -1
- package/esm/api/dird.js +7 -10
- package/esm/checker/checks/ice-ipv4.js +2 -3
- package/esm/checker/checks/symmetric-nat.js +7 -4
- package/esm/domain/AdHocAPIConference.js +1 -1
- package/esm/domain/CallLog.js +1 -1
- package/esm/domain/Contact.js +2 -1
- package/esm/domain/MeetingAuthorization.js +6 -0
- package/esm/domain/Phone/CTIPhone.js +2 -0
- package/esm/domain/Phone/WebRTCPhone.js +16 -18
- package/esm/domain/Session.js +2 -2
- package/esm/domain/__tests__/Agent.test.js +0 -2
- package/esm/domain/__tests__/Call.test.js +0 -1
- package/esm/domain/__tests__/CallLog.test.js +0 -1
- package/esm/domain/__tests__/CallSession.test.js +1 -2
- package/esm/domain/__tests__/Contact.test.js +2 -4
- package/esm/domain/__tests__/IndirectTransfer.test.js +0 -1
- package/esm/domain/__tests__/Profile.test.js +0 -1
- package/esm/domain/__tests__/Room.test.js +1 -25
- package/esm/domain/__tests__/Session.test.js +13 -14
- package/esm/domain/__tests__/SipLine.test.js +2 -3
- package/esm/index.js +42 -88
- package/esm/lib/WazoSessionDescriptionHandler.js +9 -15
- package/esm/service/IssueReporter.js +1 -3
- package/esm/service/__tests__/IssueReporter.test.js +0 -1
- package/esm/simple/Phone.js +1 -1
- package/esm/simple/Websocket.js +2 -2
- package/esm/simple/index.js +5 -4
- package/esm/simple/room/Room.js +15 -15
- package/esm/simple/room/SipRoom.js +1 -1
- package/esm/simple/room/Stream.js +1 -2
- package/esm/simple/room/__tests__/Participant.test.js +0 -2
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +1 -2
- package/esm/types/api/auth.d.ts +2 -2
- package/esm/types/api/auth.d.ts.map +1 -1
- package/esm/types/api/call-logd.d.ts +3 -3
- package/esm/types/api/call-logd.d.ts.map +1 -1
- package/esm/types/api/chatd.d.ts +9 -22
- package/esm/types/api/chatd.d.ts.map +1 -1
- package/esm/types/api/dird.d.ts +21 -14
- package/esm/types/api/dird.d.ts.map +1 -1
- package/esm/types/checker/checks/ice-ipv4.d.ts.map +1 -1
- package/esm/types/checker/checks/index.d.ts +1 -1
- package/esm/types/checker/checks/symmetric-nat.d.ts.map +1 -1
- package/esm/types/checker/checks/webrtc-transport.d.ts +2 -2
- package/esm/types/checker/checks/webrtc-transport.d.ts.map +1 -1
- package/esm/types/domain/Agent.d.ts +1 -1
- package/esm/types/domain/Agent.d.ts.map +1 -1
- package/esm/types/domain/CallLog.d.ts +14 -26
- package/esm/types/domain/CallLog.d.ts.map +1 -1
- package/esm/types/domain/CallSession.d.ts +3 -4
- package/esm/types/domain/CallSession.d.ts.map +1 -1
- package/esm/types/domain/Contact.d.ts +8 -0
- package/esm/types/domain/Contact.d.ts.map +1 -1
- package/esm/types/domain/MeetingAuthorization.d.ts +6 -0
- package/esm/types/domain/MeetingAuthorization.d.ts.map +1 -1
- package/esm/types/domain/Phone/CTIPhone.d.ts +2 -0
- package/esm/types/domain/Phone/CTIPhone.d.ts.map +1 -1
- package/esm/types/domain/Phone/Phone.d.ts +12 -2
- package/esm/types/domain/Phone/Phone.d.ts.map +1 -1
- package/esm/types/domain/Phone/WebRTCPhone.d.ts +24 -20
- package/esm/types/domain/Phone/WebRTCPhone.d.ts.map +1 -1
- package/esm/types/domain/Room.d.ts +10 -12
- package/esm/types/domain/Room.d.ts.map +1 -1
- package/esm/types/domain/Session.d.ts +1 -1
- package/esm/types/domain/Session.d.ts.map +1 -1
- package/esm/types/domain/SipLine.d.ts +3 -3
- package/esm/types/domain/SipLine.d.ts.map +1 -1
- package/esm/types/domain/types.d.ts +64 -10
- package/esm/types/domain/types.d.ts.map +1 -1
- package/esm/types/index.d.ts +51 -314
- package/esm/types/index.d.ts.map +1 -1
- package/esm/types/lib/WazoSessionDescriptionHandler.d.ts +5 -4
- package/esm/types/lib/WazoSessionDescriptionHandler.d.ts.map +1 -1
- package/esm/types/service/CallApi.d.ts +3 -3
- package/esm/types/service/CallApi.d.ts.map +1 -1
- package/esm/types/service/IssueReporter.d.ts.map +1 -1
- package/esm/types/simple/Auth.d.ts +0 -40
- package/esm/types/simple/Auth.d.ts.map +1 -1
- package/esm/types/simple/Phone.d.ts +0 -113
- package/esm/types/simple/Phone.d.ts.map +1 -1
- package/esm/types/simple/Websocket.d.ts +0 -16
- package/esm/types/simple/Websocket.d.ts.map +1 -1
- package/esm/types/simple/index.d.ts +8 -8
- package/esm/types/simple/index.d.ts.map +1 -1
- package/esm/types/simple/room/Participant.d.ts +4 -3
- package/esm/types/simple/room/Participant.d.ts.map +1 -1
- package/esm/types/simple/room/Room.d.ts +29 -18
- package/esm/types/simple/room/Room.d.ts.map +1 -1
- package/esm/types/simple/room/SipRoom.d.ts +1 -1
- package/esm/types/simple/room/SipRoom.d.ts.map +1 -1
- package/esm/types/simple/room/Stream.d.ts +1 -1
- package/esm/types/simple/room/Stream.d.ts.map +1 -1
- package/esm/types/utils/PhoneNumberUtil.d.ts +1 -1
- package/esm/types/utils/PhoneNumberUtil.d.ts.map +1 -1
- package/esm/types/utils/api-requester.d.ts +1 -1
- package/esm/types/utils/api-requester.d.ts.map +1 -1
- package/esm/types/utils/sdp.d.ts +20 -5
- package/esm/types/utils/sdp.d.ts.map +1 -1
- package/esm/types/web-rtc-client.d.ts +51 -49
- package/esm/types/web-rtc-client.d.ts.map +1 -1
- package/esm/types/websocket-client.d.ts.map +1 -1
- package/esm/utils/__tests__/PhoneNumberUtil.test.js +0 -6
- package/esm/utils/__tests__/api-requester.test.js +0 -2
- package/esm/utils/__tests__/sdp.test.js +4 -18
- package/esm/utils/api-requester.js +1 -2
- package/esm/utils/sdp.js +8 -3
- package/esm/web-rtc-client.js +99 -136
- package/esm/websocket-client.js +1 -2
- package/index.js +1 -0
- package/lib/__tests__/api-client.test.js +0 -10
- package/lib/__tests__/web-rtc-client.test.js +2 -15
- package/lib/api/chatd.js +0 -1
- package/lib/api/dird.js +19 -22
- package/lib/checker/checks/ice-ipv4.js +2 -3
- package/lib/checker/checks/symmetric-nat.js +7 -4
- package/lib/domain/AdHocAPIConference.js +1 -1
- package/lib/domain/CallLog.js +1 -1
- package/lib/domain/Contact.js +2 -1
- package/lib/domain/MeetingAuthorization.js +6 -0
- package/lib/domain/Phone/CTIPhone.js +2 -0
- package/lib/domain/Phone/WebRTCPhone.js +16 -18
- package/lib/domain/Session.js +2 -2
- package/lib/domain/__tests__/Agent.test.js +0 -2
- package/lib/domain/__tests__/Call.test.js +0 -1
- package/lib/domain/__tests__/CallLog.test.js +0 -1
- package/lib/domain/__tests__/CallSession.test.js +1 -2
- package/lib/domain/__tests__/Contact.test.js +2 -4
- package/lib/domain/__tests__/IndirectTransfer.test.js +0 -1
- package/lib/domain/__tests__/Profile.test.js +0 -1
- package/lib/domain/__tests__/Room.test.js +1 -25
- package/lib/domain/__tests__/Session.test.js +13 -14
- package/lib/domain/__tests__/SipLine.test.js +2 -3
- package/lib/index.js +93 -99
- package/lib/lib/WazoSessionDescriptionHandler.js +9 -15
- package/lib/service/IssueReporter.js +1 -3
- package/lib/service/__tests__/IssueReporter.test.js +0 -1
- package/lib/simple/Phone.js +1 -1
- package/lib/simple/Websocket.js +2 -2
- package/lib/simple/index.js +2 -1
- package/lib/simple/room/Room.js +17 -15
- package/lib/simple/room/SipRoom.js +1 -1
- package/lib/simple/room/Stream.js +1 -2
- package/lib/simple/room/__tests__/Participant.test.js +0 -2
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +1 -2
- package/lib/types/api/auth.d.ts +2 -2
- package/lib/types/api/auth.d.ts.map +1 -1
- package/lib/types/api/call-logd.d.ts +3 -3
- package/lib/types/api/call-logd.d.ts.map +1 -1
- package/lib/types/api/chatd.d.ts +9 -22
- package/lib/types/api/chatd.d.ts.map +1 -1
- package/lib/types/api/dird.d.ts +21 -14
- package/lib/types/api/dird.d.ts.map +1 -1
- package/lib/types/checker/checks/ice-ipv4.d.ts.map +1 -1
- package/lib/types/checker/checks/index.d.ts +1 -1
- package/lib/types/checker/checks/symmetric-nat.d.ts.map +1 -1
- package/lib/types/checker/checks/webrtc-transport.d.ts +2 -2
- package/lib/types/checker/checks/webrtc-transport.d.ts.map +1 -1
- package/lib/types/domain/Agent.d.ts +1 -1
- package/lib/types/domain/Agent.d.ts.map +1 -1
- package/lib/types/domain/CallLog.d.ts +14 -26
- package/lib/types/domain/CallLog.d.ts.map +1 -1
- package/lib/types/domain/CallSession.d.ts +3 -4
- package/lib/types/domain/CallSession.d.ts.map +1 -1
- package/lib/types/domain/Contact.d.ts +8 -0
- package/lib/types/domain/Contact.d.ts.map +1 -1
- package/lib/types/domain/MeetingAuthorization.d.ts +6 -0
- package/lib/types/domain/MeetingAuthorization.d.ts.map +1 -1
- package/lib/types/domain/Phone/CTIPhone.d.ts +2 -0
- package/lib/types/domain/Phone/CTIPhone.d.ts.map +1 -1
- package/lib/types/domain/Phone/Phone.d.ts +12 -2
- package/lib/types/domain/Phone/Phone.d.ts.map +1 -1
- package/lib/types/domain/Phone/WebRTCPhone.d.ts +24 -20
- package/lib/types/domain/Phone/WebRTCPhone.d.ts.map +1 -1
- package/lib/types/domain/Room.d.ts +10 -12
- package/lib/types/domain/Room.d.ts.map +1 -1
- package/lib/types/domain/Session.d.ts +1 -1
- package/lib/types/domain/Session.d.ts.map +1 -1
- package/lib/types/domain/SipLine.d.ts +3 -3
- package/lib/types/domain/SipLine.d.ts.map +1 -1
- package/lib/types/domain/types.d.ts +64 -10
- package/lib/types/domain/types.d.ts.map +1 -1
- package/lib/types/index.d.ts +51 -314
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/lib/WazoSessionDescriptionHandler.d.ts +5 -4
- package/lib/types/lib/WazoSessionDescriptionHandler.d.ts.map +1 -1
- package/lib/types/service/CallApi.d.ts +3 -3
- package/lib/types/service/CallApi.d.ts.map +1 -1
- package/lib/types/service/IssueReporter.d.ts.map +1 -1
- package/lib/types/simple/Auth.d.ts +0 -40
- package/lib/types/simple/Auth.d.ts.map +1 -1
- package/lib/types/simple/Phone.d.ts +0 -113
- package/lib/types/simple/Phone.d.ts.map +1 -1
- package/lib/types/simple/Websocket.d.ts +0 -16
- package/lib/types/simple/Websocket.d.ts.map +1 -1
- package/lib/types/simple/index.d.ts +8 -8
- package/lib/types/simple/index.d.ts.map +1 -1
- package/lib/types/simple/room/Participant.d.ts +4 -3
- package/lib/types/simple/room/Participant.d.ts.map +1 -1
- package/lib/types/simple/room/Room.d.ts +29 -18
- package/lib/types/simple/room/Room.d.ts.map +1 -1
- package/lib/types/simple/room/SipRoom.d.ts +1 -1
- package/lib/types/simple/room/SipRoom.d.ts.map +1 -1
- package/lib/types/simple/room/Stream.d.ts +1 -1
- package/lib/types/simple/room/Stream.d.ts.map +1 -1
- package/lib/types/utils/PhoneNumberUtil.d.ts +1 -1
- package/lib/types/utils/PhoneNumberUtil.d.ts.map +1 -1
- package/lib/types/utils/api-requester.d.ts +1 -1
- package/lib/types/utils/api-requester.d.ts.map +1 -1
- package/lib/types/utils/sdp.d.ts +20 -5
- package/lib/types/utils/sdp.d.ts.map +1 -1
- package/lib/types/web-rtc-client.d.ts +51 -49
- package/lib/types/web-rtc-client.d.ts.map +1 -1
- package/lib/types/websocket-client.d.ts.map +1 -1
- package/lib/utils/__tests__/PhoneNumberUtil.test.js +0 -6
- package/lib/utils/__tests__/api-requester.test.js +0 -2
- package/lib/utils/__tests__/sdp.test.js +6 -18
- package/lib/utils/api-requester.js +2 -3
- package/lib/utils/sdp.js +9 -3
- package/lib/web-rtc-client.js +105 -140
- package/lib/websocket-client.js +1 -2
- package/package.json +5 -18
- package/src/__tests__/api-client.test.ts +10 -19
- package/src/__tests__/web-rtc-client.test.ts +13 -25
- package/src/api/auth.ts +2 -5
- package/src/api/call-logd.ts +3 -3
- package/src/api/chatd.ts +10 -24
- package/src/api/dird.ts +33 -39
- package/src/checker/checks/ice-ipv4.ts +4 -5
- package/src/checker/checks/symmetric-nat.ts +11 -7
- package/src/checker/checks/webrtc-transport.ts +2 -2
- package/src/domain/AdHocAPIConference.ts +1 -1
- package/src/domain/Agent.ts +1 -1
- package/src/domain/CallLog.ts +19 -27
- package/src/domain/CallSession.ts +3 -4
- package/src/domain/Contact.ts +3 -1
- package/src/domain/MeetingAuthorization.ts +13 -0
- package/src/domain/Phone/CTIPhone.ts +4 -0
- package/src/domain/Phone/Phone.ts +11 -2
- package/src/domain/Phone/WebRTCPhone.ts +51 -52
- package/src/domain/Room.ts +12 -14
- package/src/domain/Session.ts +3 -3
- package/src/domain/SipLine.ts +3 -3
- package/src/domain/__tests__/Agent.test.ts +3 -5
- package/src/domain/__tests__/Call.test.ts +4 -5
- package/src/domain/__tests__/CallLog.test.ts +1 -3
- package/src/domain/__tests__/CallSession.test.ts +10 -11
- package/src/domain/__tests__/Contact.test.ts +2 -4
- package/src/domain/__tests__/IndirectTransfer.test.ts +6 -7
- package/src/domain/__tests__/Profile.test.ts +3 -4
- package/src/domain/__tests__/Room.test.ts +27 -51
- package/src/domain/__tests__/Session.test.ts +27 -28
- package/src/domain/__tests__/SipLine.test.ts +4 -5
- package/src/domain/types.ts +64 -11
- package/src/index.ts +51 -111
- package/src/lib/WazoSessionDescriptionHandler.ts +24 -30
- package/src/service/CallApi.ts +3 -3
- package/src/service/IssueReporter.ts +3 -5
- package/src/service/__tests__/IssueReporter.test.ts +1 -2
- package/src/simple/Auth.ts +1 -41
- package/src/simple/Phone.ts +9 -116
- package/src/simple/Websocket.ts +4 -20
- package/src/simple/index.ts +8 -7
- package/src/simple/room/Participant.ts +4 -3
- package/src/simple/room/Room.ts +44 -36
- package/src/simple/room/SipRoom.ts +4 -4
- package/src/simple/room/Stream.ts +2 -3
- package/src/simple/room/__tests__/Participant.test.ts +2 -4
- package/src/simple/room/__tests__/RemoteParticipant.test.ts +4 -3
- package/src/types/wazo.d.ts +1 -0
- package/src/utils/PhoneNumberUtil.ts +1 -1
- package/src/utils/__tests__/PhoneNumberUtil.test.ts +0 -6
- package/src/utils/__tests__/api-requester.test.ts +3 -4
- package/src/utils/__tests__/sdp.test.ts +16 -30
- package/src/utils/api-requester.ts +1 -4
- package/src/utils/sdp.ts +38 -17
- package/src/web-rtc-client.ts +196 -234
- package/src/websocket-client.ts +2 -3
- package/lib/.DS_Store +0 -0
|
@@ -25,7 +25,6 @@ describe('Session domain', () => {
|
|
|
25
25
|
xivo_user_uuid: null,
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
|
-
// @ts-ignore
|
|
29
28
|
const session = Session.parse(plain);
|
|
30
29
|
expect(session).toEqual(new Session({
|
|
31
30
|
token: 'b93ae6bd-08d7-4001-9e61-057e72bbc4b3',
|
|
@@ -45,7 +44,7 @@ describe('Session domain', () => {
|
|
|
45
44
|
const session = new Session({
|
|
46
45
|
token: 'ref-12345',
|
|
47
46
|
uuid: '1234',
|
|
48
|
-
//
|
|
47
|
+
//
|
|
49
48
|
profile: new Profile({
|
|
50
49
|
voicemail: {
|
|
51
50
|
id: 1234,
|
|
@@ -62,7 +61,7 @@ describe('Session domain', () => {
|
|
|
62
61
|
const session = new Session({
|
|
63
62
|
token: 'ref-12345',
|
|
64
63
|
uuid: '1234',
|
|
65
|
-
//
|
|
64
|
+
//
|
|
66
65
|
profile: new Profile({
|
|
67
66
|
lines: [new Line({
|
|
68
67
|
id: 9012,
|
|
@@ -90,7 +89,7 @@ describe('Session domain', () => {
|
|
|
90
89
|
const session = new Session({
|
|
91
90
|
token: 'ref-12345',
|
|
92
91
|
uuid: '1234',
|
|
93
|
-
//
|
|
92
|
+
//
|
|
94
93
|
profile: new Profile({
|
|
95
94
|
lines: [new Line({
|
|
96
95
|
id: 9012,
|
|
@@ -111,7 +110,7 @@ describe('Session domain', () => {
|
|
|
111
110
|
const session = new Session({
|
|
112
111
|
token: 'ref-12345',
|
|
113
112
|
uuid: '1234',
|
|
114
|
-
//
|
|
113
|
+
//
|
|
115
114
|
profile: new Profile({
|
|
116
115
|
voicemail: undefined,
|
|
117
116
|
}),
|
|
@@ -162,7 +161,7 @@ describe('Session domain', () => {
|
|
|
162
161
|
const session = new Session({
|
|
163
162
|
token: 'ref-12345',
|
|
164
163
|
uuid: '1234',
|
|
165
|
-
//
|
|
164
|
+
//
|
|
166
165
|
profile: new Profile({
|
|
167
166
|
lines: [new Line({
|
|
168
167
|
id: 9012,
|
|
@@ -224,7 +223,7 @@ describe('Session domain', () => {
|
|
|
224
223
|
describe('and NO lines', () => {
|
|
225
224
|
beforeEach(() => {
|
|
226
225
|
A_SESSION = new Session({ ...A_SESSION,
|
|
227
|
-
//
|
|
226
|
+
//
|
|
228
227
|
profile: new Profile({
|
|
229
228
|
lines: [],
|
|
230
229
|
}),
|
|
@@ -244,10 +243,10 @@ describe('Session domain', () => {
|
|
|
244
243
|
exten: '1',
|
|
245
244
|
}],
|
|
246
245
|
id: 1,
|
|
247
|
-
//
|
|
246
|
+
//
|
|
248
247
|
exten: 1,
|
|
249
248
|
});
|
|
250
|
-
//
|
|
249
|
+
//
|
|
251
250
|
const profile = new Profile({
|
|
252
251
|
lines: [line],
|
|
253
252
|
});
|
|
@@ -270,7 +269,7 @@ describe('Session domain', () => {
|
|
|
270
269
|
});
|
|
271
270
|
describe('and NO lines', () => {
|
|
272
271
|
beforeEach(() => {
|
|
273
|
-
//
|
|
272
|
+
//
|
|
274
273
|
const profile = new Profile({
|
|
275
274
|
lines: [],
|
|
276
275
|
});
|
|
@@ -292,10 +291,10 @@ describe('Session domain', () => {
|
|
|
292
291
|
exten: '1',
|
|
293
292
|
}],
|
|
294
293
|
id: 1,
|
|
295
|
-
//
|
|
294
|
+
//
|
|
296
295
|
exten: 1,
|
|
297
296
|
});
|
|
298
|
-
//
|
|
297
|
+
//
|
|
299
298
|
const profile = new Profile({
|
|
300
299
|
lines: [line],
|
|
301
300
|
});
|
|
@@ -327,10 +326,10 @@ describe('Session domain', () => {
|
|
|
327
326
|
exten: '1',
|
|
328
327
|
}],
|
|
329
328
|
id: 1,
|
|
330
|
-
//
|
|
329
|
+
//
|
|
331
330
|
exten: 1,
|
|
332
331
|
});
|
|
333
|
-
//
|
|
332
|
+
//
|
|
334
333
|
const profile = new Profile({
|
|
335
334
|
lines: [line],
|
|
336
335
|
});
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
import SipLine from '../SipLine';
|
|
3
2
|
describe('SipLine domain', () => {
|
|
4
3
|
describe('Endpoint (20.13 and higher)', () => {
|
|
5
4
|
it('can tell if we have videoConference capabilities', () => {
|
|
6
|
-
const getSipLine = endpointSectionOptions => new SipLine({
|
|
5
|
+
const getSipLine = (endpointSectionOptions) => new SipLine({
|
|
7
6
|
endpointSectionOptions,
|
|
8
7
|
});
|
|
9
8
|
expect(getSipLine([['max_audio_streams', '1'], ['max_video_streams', '2']]).hasVideoConference()).toBe(true);
|
|
@@ -15,7 +14,7 @@ describe('SipLine domain', () => {
|
|
|
15
14
|
});
|
|
16
15
|
describe('Old Endpoint', () => {
|
|
17
16
|
it('can tell if we have videoConference capabilities', () => {
|
|
18
|
-
const getSipLine = options => new SipLine({
|
|
17
|
+
const getSipLine = (options) => new SipLine({
|
|
19
18
|
options,
|
|
20
19
|
});
|
|
21
20
|
expect(getSipLine([['max_audio_streams', '1'], ['max_video_streams', '2']]).hasVideoConference()).toBe(true);
|
package/esm/index.js
CHANGED
|
@@ -1,89 +1,43 @@
|
|
|
1
|
-
import ApiClient from './api-client';
|
|
2
|
-
import WebRTCClient from './web-rtc-client';
|
|
3
|
-
import WebSocketClient, { SOCKET_EVENTS } from './websocket-client';
|
|
4
|
-
import Emitter from './utils/Emitter';
|
|
5
|
-
import IssueReporter from './service/IssueReporter';
|
|
6
|
-
// Domain
|
|
7
|
-
import BadResponse from './domain/BadResponse';
|
|
8
|
-
import ServerError from './domain/ServerError';
|
|
9
|
-
import SFUNotAvailableError from './domain/SFUNotAvailableError';
|
|
10
|
-
import Call from './domain/Call';
|
|
11
|
-
import CallLog from './domain/CallLog';
|
|
12
|
-
import Recording from './domain/Recording';
|
|
13
|
-
import ChatMessage from './domain/ChatMessage';
|
|
14
|
-
import ChatRoom from './domain/ChatRoom';
|
|
15
|
-
import Contact from './domain/Contact';
|
|
16
|
-
import COUNTRIES from './domain/Country';
|
|
17
|
-
import Features from './domain/Features';
|
|
18
|
-
import ForwardOption, { FORWARD_KEYS } from './domain/ForwardOption';
|
|
19
|
-
import Line from './domain/Line';
|
|
20
|
-
import NotificationOptions from './domain/NotificationOptions';
|
|
21
|
-
import Profile, { STATE as PROFILE_STATE, LINE_STATE } from './domain/Profile';
|
|
22
|
-
import Session from './domain/Session';
|
|
23
|
-
import Voicemail from './domain/Voicemail';
|
|
24
|
-
import Relocation from './domain/Relocation';
|
|
25
|
-
import Room from './domain/Room';
|
|
26
|
-
import CallSession from './domain/CallSession';
|
|
27
|
-
import IndirectTransfer from './domain/IndirectTransfer';
|
|
28
|
-
import SwitchboardCall from './domain/SwitchboardCall';
|
|
29
|
-
import WebRTCPhone from './domain/Phone/WebRTCPhone';
|
|
30
|
-
import CTIPhone from './domain/Phone/CTIPhone';
|
|
31
|
-
import Meeting from './domain/Meeting';
|
|
32
|
-
import DebugDevice from './domain/Device/DebugDevice';
|
|
33
|
-
import Checker from './checker/Checker';
|
|
34
|
-
import { PhoneNumberUtil, PhoneNumberFormat, AsYouTypeFormatter, getDisplayableNumber, getCallableNumber } from './utils/PhoneNumberUtil';
|
|
35
|
-
import ApiRequester from './utils/api-requester';
|
|
36
1
|
import Wazo from './simple/index';
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export default
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
FORWARD_KEYS,
|
|
80
|
-
LINE_STATE,
|
|
81
|
-
SOCKET_EVENTS,
|
|
82
|
-
Wazo,
|
|
83
|
-
WebRTCPhone,
|
|
84
|
-
Meeting,
|
|
85
|
-
MeetingAuthorization,
|
|
86
|
-
MeetingStatus,
|
|
87
|
-
SipLine,
|
|
88
|
-
getApiClient,
|
|
89
|
-
};
|
|
2
|
+
export { default as Emitter } from './utils/Emitter';
|
|
3
|
+
export { default as IssueReporter } from './service/IssueReporter';
|
|
4
|
+
export { default as BadResponse } from './domain/BadResponse';
|
|
5
|
+
export { default as ServerError } from './domain/ServerError';
|
|
6
|
+
export { default as SFUNotAvailableError } from './domain/SFUNotAvailableError';
|
|
7
|
+
export { default as Call } from './domain/Call';
|
|
8
|
+
export { default as CallLog } from './domain/CallLog';
|
|
9
|
+
export { default as Recording } from './domain/Recording';
|
|
10
|
+
export { default as ChatMessage } from './domain/ChatMessage';
|
|
11
|
+
export { default as ChatRoom } from './domain/ChatRoom';
|
|
12
|
+
export { default as Contact } from './domain/Contact';
|
|
13
|
+
export { default as COUNTRIES } from './domain/Country';
|
|
14
|
+
export { default as Features } from './domain/Features';
|
|
15
|
+
export { default as ForwardOption, FORWARD_KEYS } from './domain/ForwardOption';
|
|
16
|
+
export { default as Line } from './domain/Line';
|
|
17
|
+
export { default as NotificationOptions } from './domain/NotificationOptions';
|
|
18
|
+
export { default as Profile, STATE as PROFILE_STATE, LINE_STATE } from './domain/Profile';
|
|
19
|
+
export { default as Session } from './domain/Session';
|
|
20
|
+
export { default as Voicemail } from './domain/Voicemail';
|
|
21
|
+
export { default as Relocation } from './domain/Relocation';
|
|
22
|
+
export { default as Room } from './domain/Room';
|
|
23
|
+
export { default as CallSession } from './domain/CallSession';
|
|
24
|
+
export { default as IndirectTransfer } from './domain/IndirectTransfer';
|
|
25
|
+
export { default as SwitchboardCall } from './domain/SwitchboardCall';
|
|
26
|
+
export { default as WebRTCPhone } from './domain/Phone/WebRTCPhone';
|
|
27
|
+
export { default as CTIPhone } from './domain/Phone/CTIPhone';
|
|
28
|
+
export { default as Meeting } from './domain/Meeting';
|
|
29
|
+
export { default as DebugDevice } from './domain/Device/DebugDevice';
|
|
30
|
+
export { default as Checker } from './checker/Checker';
|
|
31
|
+
export * from './utils/PhoneNumberUtil';
|
|
32
|
+
export { default as ApiRequester } from './utils/api-requester';
|
|
33
|
+
export { default as MeetingStatus } from './domain/MeetingStatus';
|
|
34
|
+
export { default as MeetingAuthorization } from './domain/MeetingAuthorization';
|
|
35
|
+
export { default as SipLine } from './domain/SipLine';
|
|
36
|
+
export { default as getApiClient, setApiToken, setCurrentServer, setOnRefreshToken, setOnRefreshTokenError, setIsMobile } from './service/getApiClient';
|
|
37
|
+
export { default as CallApi } from './service/CallApi';
|
|
38
|
+
export { default as AdHocAPIConference } from './domain/AdHocAPIConference';
|
|
39
|
+
export { default as WebSocketClient, SOCKET_EVENTS } from './websocket-client';
|
|
40
|
+
export { default as WebRTCClient } from './web-rtc-client';
|
|
41
|
+
export { default as WazoApiClient } from './api-client';
|
|
42
|
+
export * from './domain/types';
|
|
43
|
+
export default Wazo;
|
|
@@ -55,7 +55,7 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
55
55
|
return Promise.reject(new Error('Peer connection closed.'));
|
|
56
56
|
}
|
|
57
57
|
// Callback on data channel creation
|
|
58
|
-
// @ts-ignore
|
|
58
|
+
// @ts-ignore: private
|
|
59
59
|
this.onDataChannel = options.onDataChannel;
|
|
60
60
|
// ICE will restart upon applying an offer created with the iceRestart option
|
|
61
61
|
const iceRestart = options.offerOptions ? options.offerOptions.iceRestart : false;
|
|
@@ -64,7 +64,7 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
64
64
|
// We should wait for ice when iceRestart (reinvite) or for the first invite
|
|
65
65
|
// We shouldn't wait for ice when holding or resuming the call
|
|
66
66
|
// We shouldn't wait for ice when receiving a reinvite (eg: pendingReinviteAck = true)
|
|
67
|
-
// @ts-ignore
|
|
67
|
+
// @ts-ignore: private
|
|
68
68
|
const shouldWaitForIce = !this.session.pendingReinviteAck && (iceRestart || 'constraints' in options);
|
|
69
69
|
// ICE gathering timeout may be set on a per call basis, otherwise the configured default is used
|
|
70
70
|
const iceTimeout = options.iceGatheringTimeout === undefined ? this.sessionDescriptionHandlerConfiguration?.iceGatheringTimeout : options.iceGatheringTimeout;
|
|
@@ -83,7 +83,7 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
83
83
|
done: true,
|
|
84
84
|
});
|
|
85
85
|
if (event.candidate) {
|
|
86
|
-
// @ts-ignore
|
|
86
|
+
// @ts-ignore: we're possibly inject null candidates
|
|
87
87
|
this.gatheredCandidates.push(parseCandidate(event.candidate.candidate));
|
|
88
88
|
// When receiving a `srflx` or a `relay` candidate, consider the negotiation done.
|
|
89
89
|
if (event.candidate.candidate.indexOf('srflx') !== -1 || event.candidate.candidate.indexOf('relay') !== -1) {
|
|
@@ -125,7 +125,6 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
125
125
|
return {
|
|
126
126
|
type: description.type,
|
|
127
127
|
// Fix sdp only when no candidates
|
|
128
|
-
// @ts-ignore
|
|
129
128
|
sdp: fixSdp(sdp, this.gatheredCandidates, options && options.constraints ? options.constraints.video : false),
|
|
130
129
|
};
|
|
131
130
|
})
|
|
@@ -171,16 +170,13 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
171
170
|
return;
|
|
172
171
|
}
|
|
173
172
|
// Closing senders via getLocalStreams, `getLocalStreams` is deprecated, we have to check if it exists.
|
|
174
|
-
// @ts-ignore
|
|
175
173
|
if (this.peerConnection?.getLocalStreams) {
|
|
176
|
-
// @ts-ignore
|
|
177
174
|
this.peerConnection?.getLocalStreams().forEach(stream => {
|
|
178
175
|
stream.getTracks()
|
|
179
176
|
.filter((track) => track.enabled)
|
|
180
177
|
.forEach((track) => track.stop());
|
|
181
178
|
});
|
|
182
179
|
// Closing receivers via getRemoteStreams
|
|
183
|
-
// @ts-ignore
|
|
184
180
|
this.peerConnection?.getRemoteStreams().forEach(stream => {
|
|
185
181
|
stream.getTracks()
|
|
186
182
|
.filter((track) => track.enabled)
|
|
@@ -292,7 +288,6 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
292
288
|
})();
|
|
293
289
|
// set the transceiver direction to the answer direction
|
|
294
290
|
this._peerConnection.getTransceivers().forEach(transceiver => {
|
|
295
|
-
// @ts-ignore
|
|
296
291
|
if (transceiver.stopped) {
|
|
297
292
|
return;
|
|
298
293
|
}
|
|
@@ -352,11 +347,11 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
352
347
|
if (oldTrack) {
|
|
353
348
|
oldTrack.stop();
|
|
354
349
|
localStream.removeTrack(oldTrack);
|
|
355
|
-
// @ts-ignore
|
|
350
|
+
// @ts-ignore: private
|
|
356
351
|
SessionDescriptionHandler.dispatchRemoveTrackEvent(localStream, oldTrack);
|
|
357
352
|
}
|
|
358
353
|
localStream.addTrack(newTrack);
|
|
359
|
-
// @ts-ignore
|
|
354
|
+
// @ts-ignore: private
|
|
360
355
|
SessionDescriptionHandler.dispatchAddTrackEvent(localStream, newTrack);
|
|
361
356
|
}).catch((error) => {
|
|
362
357
|
this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${kind} track`);
|
|
@@ -383,7 +378,7 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
383
378
|
throw error;
|
|
384
379
|
}
|
|
385
380
|
localStream.addTrack(newTrack);
|
|
386
|
-
// @ts-ignore
|
|
381
|
+
// @ts-ignore: private
|
|
387
382
|
SessionDescriptionHandler.dispatchAddTrackEvent(localStream, newTrack);
|
|
388
383
|
}));
|
|
389
384
|
}
|
|
@@ -409,10 +404,10 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
409
404
|
let constraints = options.constraints ? { ...options.constraints,
|
|
410
405
|
} : {};
|
|
411
406
|
// if we already have a local media stream...
|
|
412
|
-
// @ts-ignore
|
|
407
|
+
// @ts-ignore: private
|
|
413
408
|
if (this.localMediaStreamConstraints) {
|
|
414
409
|
// if constraints have not changed, do not get a new media stream
|
|
415
|
-
// @ts-ignore
|
|
410
|
+
// @ts-ignore: private
|
|
416
411
|
if (JSON.stringify(this.localMediaStreamConstraints.audio) === JSON.stringify(constraints.audio) && JSON.stringify(this.localMediaStreamConstraints.video) === JSON.stringify(constraints.video)) {
|
|
417
412
|
return Promise.resolve();
|
|
418
413
|
}
|
|
@@ -423,9 +418,8 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
|
|
|
423
418
|
audio: true,
|
|
424
419
|
};
|
|
425
420
|
}
|
|
426
|
-
// @ts-ignore
|
|
421
|
+
// @ts-ignore: private
|
|
427
422
|
this.localMediaStreamConstraints = constraints;
|
|
428
|
-
// @ts-ignore
|
|
429
423
|
return this.mediaStreamFactory(constraints, this).then(mediaStream => {
|
|
430
424
|
this.setLocalMediaStream(mediaStream);
|
|
431
425
|
return mediaStream;
|
|
@@ -126,7 +126,6 @@ class IssueReporter {
|
|
|
126
126
|
errorMessage: lastArg.message,
|
|
127
127
|
errorStack: lastArg.stack,
|
|
128
128
|
errorType: lastArg.constructor.name,
|
|
129
|
-
// @ts-ignore
|
|
130
129
|
skipSendToRemote: lastArg.skipSendToRemote,
|
|
131
130
|
};
|
|
132
131
|
}
|
|
@@ -204,7 +203,7 @@ class IssueReporter {
|
|
|
204
203
|
this.oldConsoleMethods = {};
|
|
205
204
|
CONSOLE_METHODS.forEach((methodName) => {
|
|
206
205
|
if (this.oldConsoleMethods) {
|
|
207
|
-
// @ts-ignore
|
|
206
|
+
// @ts-ignore: keys
|
|
208
207
|
// eslint-disable-next-line
|
|
209
208
|
this.oldConsoleMethods[methodName] = console[methodName];
|
|
210
209
|
}
|
|
@@ -297,7 +296,6 @@ class IssueReporter {
|
|
|
297
296
|
},
|
|
298
297
|
body,
|
|
299
298
|
}).catch((e) => {
|
|
300
|
-
// @ts-ignore
|
|
301
299
|
e.skipSendToRemote = true;
|
|
302
300
|
this.log('error', this._makeCategory('grafana'), 'Sending log to grafana, error', e);
|
|
303
301
|
// wait at least 1 second, at most 50 seconds
|
package/esm/simple/Phone.js
CHANGED
package/esm/simple/Websocket.js
CHANGED
|
@@ -17,11 +17,11 @@ class Websocket extends Emitter {
|
|
|
17
17
|
super();
|
|
18
18
|
// Sugar syntax for `Wazo.WebSocket.EVENT_NAME`
|
|
19
19
|
Object.keys(OTHER_EVENTS).forEach(key => {
|
|
20
|
-
// @ts-ignore
|
|
20
|
+
// @ts-ignore: keys
|
|
21
21
|
this[key] = OTHER_EVENTS[key];
|
|
22
22
|
});
|
|
23
23
|
Object.keys(SOCKET_EVENTS).forEach(key => {
|
|
24
|
-
// @ts-ignore
|
|
24
|
+
// @ts-ignore: keys
|
|
25
25
|
this[key] = SOCKET_EVENTS[key];
|
|
26
26
|
});
|
|
27
27
|
this.eventLists = WazoWebSocketClient.eventLists;
|
package/esm/simple/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import Room from './room/Room';
|
|
|
6
6
|
import SipRoom from './room/SipRoom';
|
|
7
7
|
import RemoteParticipant from './room/RemoteParticipant';
|
|
8
8
|
import LocalParticipant from './room/LocalParticipant';
|
|
9
|
+
import Participant from './room/Participant';
|
|
9
10
|
import Stream from './room/Stream';
|
|
10
11
|
import Directory from './Directory';
|
|
11
12
|
import Configuration from './Configuration';
|
|
@@ -39,13 +40,14 @@ import Features from '../domain/Features';
|
|
|
39
40
|
import Meeting from '../domain/Meeting';
|
|
40
41
|
import Checker from '../checker/Checker';
|
|
41
42
|
const Wazo = {
|
|
42
|
-
Auth
|
|
43
|
-
Phone
|
|
44
|
-
Websocket
|
|
43
|
+
Auth,
|
|
44
|
+
Phone,
|
|
45
|
+
Websocket,
|
|
45
46
|
Room,
|
|
46
47
|
SipRoom,
|
|
47
48
|
RemoteParticipant,
|
|
48
49
|
LocalParticipant,
|
|
50
|
+
Participant,
|
|
49
51
|
Stream,
|
|
50
52
|
createLocalVideoStream,
|
|
51
53
|
createLocalAudioStream,
|
|
@@ -124,7 +126,6 @@ const Wazo = {
|
|
|
124
126
|
NoDomainNameError,
|
|
125
127
|
};
|
|
126
128
|
if (window) {
|
|
127
|
-
// @ts-ignore
|
|
128
129
|
window.Wazo = Wazo;
|
|
129
130
|
}
|
|
130
131
|
if (global) {
|
package/esm/simple/room/Room.js
CHANGED
|
@@ -141,8 +141,9 @@ class Room extends Emitter {
|
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
const callSession = await Wazo.Phone.call(extension, withCamera, null, audioOnly, true);
|
|
144
|
+
// @ts-fix: heads up: added an extra `null` here
|
|
144
145
|
// eslint-disable-next-line no-param-reassign
|
|
145
|
-
room = new Room(callSession, extension, null, null, extra);
|
|
146
|
+
room = new Room(callSession, extension, null, null, null, extra);
|
|
146
147
|
// Wait for the call to be accepted
|
|
147
148
|
await new Promise((resolve, reject) => {
|
|
148
149
|
Wazo.Phone.once(Wazo.Phone.ON_CALL_ACCEPTED, resolve);
|
|
@@ -164,8 +165,8 @@ class Room extends Emitter {
|
|
|
164
165
|
name: conference ? conference.name : null,
|
|
165
166
|
});
|
|
166
167
|
if (conference) {
|
|
167
|
-
room.setSourceId(conference.sourceId);
|
|
168
|
-
room.setName(conference.name);
|
|
168
|
+
room.setSourceId(parseInt(`${conference.sourceId}`, 10));
|
|
169
|
+
room.setName(`${conference.name}`);
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
else if (meeting) {
|
|
@@ -362,8 +363,7 @@ class Room extends Emitter {
|
|
|
362
363
|
return;
|
|
363
364
|
}
|
|
364
365
|
// Retrieve mapping
|
|
365
|
-
|
|
366
|
-
Wazo.Phone.phone.currentSipSession.sessionDescriptionHandler.on('setDescription', ({ type, sdp: rawSdp, }) => {
|
|
366
|
+
Wazo.Phone.phone.currentSipSession.sessionDescriptionHandler?.on('setDescription', ({ type, sdp: rawSdp, }) => {
|
|
367
367
|
if (type !== 'offer') {
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
@@ -425,10 +425,11 @@ class Room extends Emitter {
|
|
|
425
425
|
}
|
|
426
426
|
_mapMsid(rawSdp) {
|
|
427
427
|
const sdp = sdpParser.parse(rawSdp);
|
|
428
|
-
|
|
428
|
+
// @ts-ignore: Property 'label' does not exist
|
|
429
|
+
const labelMsidArray = sdp.media.filter((media) => !!media.label).map(({ label, msid }) => ({
|
|
429
430
|
label: String(label),
|
|
430
|
-
streamId: msid
|
|
431
|
-
trackId: msid
|
|
431
|
+
streamId: msid?.split(' ')[0],
|
|
432
|
+
trackId: msid?.split(' ')[1],
|
|
432
433
|
}));
|
|
433
434
|
labelMsidArray.forEach(({ label, streamId, trackId, }) => {
|
|
434
435
|
this._callIdStreamIdMap[String(label)] = {
|
|
@@ -455,13 +456,11 @@ class Room extends Emitter {
|
|
|
455
456
|
[this.ON_AUDIO_STREAM, this.ON_VIDEO_STREAM, this.ON_REMOVE_STREAM].forEach(event => Wazo.Phone.on(event, (...args) => this.eventEmitter.emit.apply(this.eventEmitter, [event, ...args])));
|
|
456
457
|
}
|
|
457
458
|
_onMessage(message) {
|
|
458
|
-
// @ts-ignore
|
|
459
459
|
if (message.method !== 'MESSAGE') {
|
|
460
460
|
return null;
|
|
461
461
|
}
|
|
462
462
|
let body;
|
|
463
463
|
try {
|
|
464
|
-
// @ts-ignore
|
|
465
464
|
body = JSON.parse(message.body);
|
|
466
465
|
}
|
|
467
466
|
catch (e) {
|
|
@@ -642,10 +641,9 @@ class Room extends Emitter {
|
|
|
642
641
|
_onParticipantTrackUpdate(oldParticipant, update) {
|
|
643
642
|
const newParticipant = oldParticipant;
|
|
644
643
|
const { trackId, streamId, } = this._callIdStreamIdMap[newParticipant.callId] || {};
|
|
645
|
-
|
|
646
|
-
const pc = Wazo.Phone.phone.currentSipSession.sessionDescriptionHandler.peerConnection;
|
|
644
|
+
const pc = Wazo.Phone.phone?.currentSipSession?.sessionDescriptionHandler?.peerConnection;
|
|
647
645
|
// Can't use `getReceivers` here because on FF we make the mapping based on the streamId
|
|
648
|
-
const stream = pc.getRemoteStreams().find(
|
|
646
|
+
const stream = pc.getRemoteStreams().find(someStream => someStream.id === streamId || someStream.getTracks().some(track => track.id === trackId));
|
|
649
647
|
if (update === 'downgrade') {
|
|
650
648
|
newParticipant.resetStreams([]);
|
|
651
649
|
newParticipant.onStreamUnSubscribed(stream);
|
|
@@ -669,11 +667,13 @@ class Room extends Emitter {
|
|
|
669
667
|
}
|
|
670
668
|
const streamId = this._getStreamIdFrTrackId(trackId);
|
|
671
669
|
const key = this._getUnassociatedMapIdFromTrackIdOrStreamId(trackId, streamId);
|
|
672
|
-
const stream = this._unassociatedVideoStreams[key];
|
|
670
|
+
const stream = key ? this._unassociatedVideoStreams[key] : null;
|
|
673
671
|
if (stream) {
|
|
674
672
|
// Try to associate stream
|
|
675
673
|
this._associateStreamTo(stream, participant);
|
|
676
|
-
|
|
674
|
+
if (key) {
|
|
675
|
+
delete this._unassociatedVideoStreams[key];
|
|
676
|
+
}
|
|
677
677
|
delete this._unassociatedParticipants[participant.callId];
|
|
678
678
|
}
|
|
679
679
|
}
|
|
@@ -37,7 +37,7 @@ class SipRoom extends Room {
|
|
|
37
37
|
this.sendUnMuteStatus();
|
|
38
38
|
}
|
|
39
39
|
getLocalGuestName() {
|
|
40
|
-
// @ts-ignore
|
|
40
|
+
// @ts-ignore: private
|
|
41
41
|
return Wazo.Phone.phone?.client.userAgent?.options.displayName || null;
|
|
42
42
|
}
|
|
43
43
|
// Overridden to not listen to websocket messages
|
|
@@ -24,9 +24,8 @@ class Stream {
|
|
|
24
24
|
}
|
|
25
25
|
element.onloadedmetadata = () => {
|
|
26
26
|
const tracks = this.htmlStream ? this.htmlStream.getVideoTracks() : [];
|
|
27
|
-
tracks.forEach(track => {
|
|
27
|
+
tracks.forEach((track) => {
|
|
28
28
|
track.enabled = true;
|
|
29
|
-
// @ts-ignore
|
|
30
29
|
track.loaded = true;
|
|
31
30
|
});
|
|
32
31
|
};
|
|
@@ -24,7 +24,6 @@ describe('Participant', () => {
|
|
|
24
24
|
const room = new Room();
|
|
25
25
|
room.setMeetingUuid(meetingUuid);
|
|
26
26
|
const banMeetingParticipant = jest.fn();
|
|
27
|
-
// @ts-expect-error
|
|
28
27
|
getApiClient.mockImplementation(() => ({
|
|
29
28
|
calld: {
|
|
30
29
|
banMeetingParticipant,
|
|
@@ -50,7 +49,6 @@ describe('Participant', () => {
|
|
|
50
49
|
const room = new Room();
|
|
51
50
|
room.setMeetingUuid(meetingUuid);
|
|
52
51
|
const banMeetingParticipant = jest.fn();
|
|
53
|
-
// @ts-expect-error
|
|
54
52
|
getApiClient.mockImplementation(() => ({
|
|
55
53
|
calld: {
|
|
56
54
|
banMeetingParticipant,
|
|
@@ -3,8 +3,7 @@ import Wazo from '../../index';
|
|
|
3
3
|
describe('RemoteParticipant', () => {
|
|
4
4
|
it('should fall back on number when name is <unknown>', () => {
|
|
5
5
|
const number = '1234';
|
|
6
|
-
|
|
7
|
-
const participant = new Wazo.RemoteParticipant(null, {
|
|
6
|
+
const participant = new Wazo.RemoteParticipant({}, {
|
|
8
7
|
caller_id_name: '<unknown>',
|
|
9
8
|
caller_id_number: number,
|
|
10
9
|
});
|
package/esm/types/api/auth.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/api/au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;IAC7C,UAAU,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC9C,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,GAAG,YAAY,CAAC,CAAC;IAC7D,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7G,YAAY,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClD,YAAY,EAAE,CAAC,UAAU,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,GAAG,YAAY,CAAC,CAAC;IACpE,YAAY,EAAE,CAAC,QAAQ,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/C,gBAAgB,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxE,kBAAkB,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1E,mBAAmB,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E;iCAEwB,YAAY,WAAW,MAAM,KAAG,KAAK;AAA9D,wBA6LI"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import ApiRequester from '../utils/api-requester';
|
|
2
2
|
import CallLog from '../domain/CallLog';
|
|
3
3
|
export interface CallLogD {
|
|
4
|
-
search: (search: string, limit
|
|
5
|
-
searchBy: (field: string, value: string, limit
|
|
4
|
+
search: (search: string, limit?: number) => Promise<Array<CallLog>>;
|
|
5
|
+
searchBy: (field: string, value: string, limit?: number) => Promise<Array<CallLog>>;
|
|
6
6
|
listCallLogs: (offset?: number, limit?: number) => Promise<Array<CallLog>>;
|
|
7
|
-
listDistinctCallLogs: (offset: number, limit
|
|
7
|
+
listDistinctCallLogs: (offset: number, limit?: number, distinct?: string) => Promise<Array<CallLog>>;
|
|
8
8
|
listCallLogsFromDate: (from: Date, number: string) => Promise<Array<CallLog>>;
|
|
9
9
|
}
|
|
10
10
|
declare const _default: (client: ApiRequester, baseUrl: string) => CallLogD;
|