@wazo/sdk 0.39.14 → 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/amid.js +12 -4
- 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 +23 -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/amid.d.ts.map +1 -1
- 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/amid.js +12 -4
- 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 +23 -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/amid.d.ts.map +1 -1
- 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/amid.ts +13 -4
- 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 +60 -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
|
@@ -7,7 +7,6 @@ describe('Room', () => {
|
|
|
7
7
|
const number = 'some-number';
|
|
8
8
|
const room = new Room({
|
|
9
9
|
id: 'some-id',
|
|
10
|
-
// @ts-expect-error
|
|
11
10
|
connectedCallSession: new CallSession({
|
|
12
11
|
number,
|
|
13
12
|
}),
|
|
@@ -31,11 +30,9 @@ describe('Room', () => {
|
|
|
31
30
|
});
|
|
32
31
|
describe('on connect call', () => {
|
|
33
32
|
it('should add call to room', async () => {
|
|
34
|
-
// @ts-expect-error
|
|
35
33
|
const room = new Room({
|
|
36
34
|
id: 'some-id',
|
|
37
35
|
});
|
|
38
|
-
// @ts-expect-error
|
|
39
36
|
const callSession = new CallSession({
|
|
40
37
|
callId: 'some-call-id',
|
|
41
38
|
});
|
|
@@ -46,11 +43,9 @@ describe('Room', () => {
|
|
|
46
43
|
describe('on room has call', () => {
|
|
47
44
|
describe('given no connected call', () => {
|
|
48
45
|
it('should be false', async () => {
|
|
49
|
-
// @ts-expect-error
|
|
50
46
|
const room = new Room({
|
|
51
47
|
connectedCallSession: null,
|
|
52
48
|
});
|
|
53
|
-
// @ts-expect-error
|
|
54
49
|
const callSession = new CallSession({});
|
|
55
50
|
const roomHasCall = room.has(callSession);
|
|
56
51
|
expect(roomHasCall).toBeFalsy();
|
|
@@ -58,11 +53,9 @@ describe('Room', () => {
|
|
|
58
53
|
});
|
|
59
54
|
describe('given a connected call', () => {
|
|
60
55
|
it('should be true if same calls', async () => {
|
|
61
|
-
// @ts-expect-error
|
|
62
56
|
const callSession = new CallSession({
|
|
63
57
|
callId: 'some-call-id',
|
|
64
58
|
});
|
|
65
|
-
// @ts-expect-error
|
|
66
59
|
const room = new Room({
|
|
67
60
|
connectedCallSession: callSession,
|
|
68
61
|
});
|
|
@@ -70,15 +63,12 @@ describe('Room', () => {
|
|
|
70
63
|
expect(roomHasCall).toBeTruthy();
|
|
71
64
|
});
|
|
72
65
|
it('should be false if different calls', async () => {
|
|
73
|
-
// @ts-expect-error
|
|
74
66
|
const call1 = new CallSession({
|
|
75
67
|
callId: 'some-call-id',
|
|
76
68
|
});
|
|
77
|
-
// @ts-expect-error
|
|
78
69
|
const call2 = new CallSession({
|
|
79
70
|
callId: 'some-other-call-id',
|
|
80
71
|
});
|
|
81
|
-
// @ts-expect-error
|
|
82
72
|
const room = new Room({
|
|
83
73
|
connectedCallSession: call1,
|
|
84
74
|
});
|
|
@@ -92,7 +82,6 @@ describe('Room', () => {
|
|
|
92
82
|
const participants = [{}];
|
|
93
83
|
const room = new Room({
|
|
94
84
|
connectedCallSession: null,
|
|
95
|
-
// @ts-expect-error
|
|
96
85
|
participants,
|
|
97
86
|
});
|
|
98
87
|
const participantUuid = 'some-uuid';
|
|
@@ -105,7 +94,6 @@ describe('Room', () => {
|
|
|
105
94
|
describe('on room has call with id', () => {
|
|
106
95
|
describe('given no connected call', () => {
|
|
107
96
|
it('should be false', async () => {
|
|
108
|
-
// @ts-expect-error
|
|
109
97
|
const room = new Room({
|
|
110
98
|
connectedCallSession: null,
|
|
111
99
|
});
|
|
@@ -117,9 +105,7 @@ describe('Room', () => {
|
|
|
117
105
|
describe('given a connected call', () => {
|
|
118
106
|
it('should be true if same calls', async () => {
|
|
119
107
|
const callId = 'some-call-id';
|
|
120
|
-
// @ts-expect-error
|
|
121
108
|
const room = new Room({
|
|
122
|
-
// @ts-expect-error
|
|
123
109
|
connectedCallSession: new CallSession({
|
|
124
110
|
callId,
|
|
125
111
|
}),
|
|
@@ -129,9 +115,7 @@ describe('Room', () => {
|
|
|
129
115
|
});
|
|
130
116
|
it('should be false if different calls', async () => {
|
|
131
117
|
const callId = 'some-call-id';
|
|
132
|
-
// @ts-expect-error
|
|
133
118
|
const room = new Room({
|
|
134
|
-
// @ts-expect-error
|
|
135
119
|
connectedCallSession: new CallSession({
|
|
136
120
|
callId: 'some-other-call-id',
|
|
137
121
|
}),
|
|
@@ -145,7 +129,6 @@ describe('Room', () => {
|
|
|
145
129
|
it('should updated participant with corresponding UUID', async () => {
|
|
146
130
|
const uuid = 'some-uuid';
|
|
147
131
|
const room = new Room({
|
|
148
|
-
// @ts-expect-error
|
|
149
132
|
participants: [{
|
|
150
133
|
uuid,
|
|
151
134
|
talking: true,
|
|
@@ -159,7 +142,6 @@ describe('Room', () => {
|
|
|
159
142
|
});
|
|
160
143
|
it('should add participant when not found', async () => {
|
|
161
144
|
const uuid = 'some-uuid';
|
|
162
|
-
// @ts-expect-error
|
|
163
145
|
const room = new Room({
|
|
164
146
|
participants: [],
|
|
165
147
|
});
|
|
@@ -171,16 +153,14 @@ describe('Room', () => {
|
|
|
171
153
|
});
|
|
172
154
|
describe('on updated participant by extension', () => {
|
|
173
155
|
it('should updated participant with corresponding extension', async () => {
|
|
174
|
-
const extension = 1234;
|
|
156
|
+
const extension = '1234';
|
|
175
157
|
const room = new Room({
|
|
176
158
|
participants: [{
|
|
177
|
-
// @ts-expect-error
|
|
178
159
|
extension,
|
|
179
160
|
talking: false,
|
|
180
161
|
}],
|
|
181
162
|
});
|
|
182
163
|
expect(room.participants[0].talking).toBeFalsy();
|
|
183
|
-
// @ts-expect-error
|
|
184
164
|
const updatedRoom = room.updateParticipantByExtension(extension, {
|
|
185
165
|
talking: true,
|
|
186
166
|
});
|
|
@@ -189,9 +169,7 @@ describe('Room', () => {
|
|
|
189
169
|
});
|
|
190
170
|
describe('on disconnect', () => {
|
|
191
171
|
it('should destroy connected call', async () => {
|
|
192
|
-
// @ts-expect-error
|
|
193
172
|
const room = new Room({
|
|
194
|
-
// @ts-expect-error
|
|
195
173
|
connectedCallSession: new CallSession({}),
|
|
196
174
|
});
|
|
197
175
|
expect(room.connectedCallSession).not.toBeNull();
|
|
@@ -203,7 +181,6 @@ describe('Room', () => {
|
|
|
203
181
|
it('should remove participant with corresponding UUID', async () => {
|
|
204
182
|
const uuid = 'some-uuid';
|
|
205
183
|
const room = new Room({
|
|
206
|
-
// @ts-expect-error
|
|
207
184
|
participants: [{
|
|
208
185
|
uuid,
|
|
209
186
|
}],
|
|
@@ -217,7 +194,6 @@ describe('Room', () => {
|
|
|
217
194
|
it('should remove participant with corresponding UUID', async () => {
|
|
218
195
|
const extension = 'some-extension';
|
|
219
196
|
const room = new Room({
|
|
220
|
-
// @ts-expect-error
|
|
221
197
|
participants: [{
|
|
222
198
|
extension,
|
|
223
199
|
}],
|
|
@@ -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) {
|