@wazo/sdk 0.37.24 → 0.37.28
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 +96 -58
- package/dist/wazo-sdk.js +6 -6
- package/esm/__tests__/api-client.test.js +14 -14
- package/esm/__tests__/web-rtc-client.test.js +130 -108
- package/esm/api/agentd.js +1 -1
- package/esm/api/amid.js +2 -2
- package/esm/api/application.js +1 -1
- package/esm/api/auth.js +1 -1
- package/esm/api/call-logd.js +3 -3
- package/esm/api/calld.js +1 -1
- package/esm/api/chatd.js +1 -1
- package/esm/api/confd.js +1 -1
- package/esm/api/ctid-ng.js +4 -4
- package/esm/api/dird.js +3 -3
- package/esm/api/webhookd.js +2 -2
- package/esm/api-client.js +14 -14
- package/esm/checker/Checker.js +155 -133
- package/esm/checker/checks/aor.js +14 -14
- package/esm/checker/checks/api.js +14 -14
- package/esm/checker/checks/index.js +145 -123
- package/esm/checker/checks/wazo-websocket.js +16 -16
- package/esm/checker/checks/webrtc-transport.js +130 -108
- package/esm/checker/checks/webrtc.js +130 -108
- package/esm/domain/AdHocAPIConference.js +14 -14
- package/esm/domain/CallLog.js +1 -1
- package/esm/domain/CallSession.js +15 -0
- package/esm/domain/Contact.js +2 -2
- package/esm/domain/Features.js +14 -14
- package/esm/domain/Phone/CTIPhone.js +43 -28
- package/esm/domain/Phone/WebRTCPhone.js +126 -90
- package/esm/domain/SFUNotAvailableError.js +9 -0
- package/esm/domain/__tests__/CallLog.test.js +1 -1
- package/esm/domain/__tests__/CallSession.test.js +15 -0
- package/esm/domain/__tests__/Contact.test.js +2 -2
- package/esm/domain/__tests__/IndirectTransfer.test.js +15 -0
- package/esm/domain/__tests__/Room.test.js +15 -0
- package/esm/index.js +415 -346
- package/esm/lib/WazoSessionDescriptionHandler.js +10 -5
- package/esm/service/CallApi.js +14 -14
- package/esm/service/IssueReporter.js +2 -2
- package/esm/service/__tests__/IssueReporter.test.js +2 -2
- package/esm/service/getApiClient.js +14 -14
- package/esm/simple/Auth.js +404 -336
- package/esm/simple/Configuration.js +404 -336
- package/esm/simple/Directory.js +14 -14
- package/esm/simple/Phone.js +404 -336
- package/esm/simple/Websocket.js +18 -18
- package/esm/simple/index.js +408 -340
- package/esm/simple/room/LocalParticipant.js +408 -340
- package/esm/simple/room/Participant.js +408 -340
- package/esm/simple/room/RemoteParticipant.js +408 -340
- package/esm/simple/room/Room.js +409 -341
- package/esm/simple/room/SipRoom.js +408 -340
- package/esm/simple/room/Stream.js +408 -340
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +408 -340
- package/esm/simple/utils.js +408 -340
- package/esm/utils/__tests__/api-requester.test.js +1 -1
- package/esm/utils/api-requester.js +1 -1
- package/esm/web-rtc-client.js +130 -108
- package/esm/websocket-client.js +16 -16
- package/lib/__tests__/api-client.test.js +14 -14
- package/lib/__tests__/web-rtc-client.test.js +130 -108
- package/lib/api/agentd.js +1 -1
- package/lib/api/amid.js +2 -2
- package/lib/api/application.js +1 -1
- package/lib/api/auth.js +1 -1
- package/lib/api/call-logd.js +3 -3
- package/lib/api/calld.js +1 -1
- package/lib/api/chatd.js +1 -1
- package/lib/api/confd.js +1 -1
- package/lib/api/ctid-ng.js +4 -4
- package/lib/api/dird.js +3 -3
- package/lib/api/webhookd.js +2 -2
- package/lib/api-client.js +14 -14
- package/lib/checker/Checker.js +155 -133
- package/lib/checker/checks/aor.js +14 -14
- package/lib/checker/checks/api.js +14 -14
- package/lib/checker/checks/index.js +145 -123
- package/lib/checker/checks/wazo-websocket.js +16 -16
- package/lib/checker/checks/webrtc-transport.js +130 -108
- package/lib/checker/checks/webrtc.js +130 -108
- package/lib/domain/AdHocAPIConference.js +14 -14
- package/lib/domain/CallLog.js +1 -1
- package/lib/domain/CallSession.js +15 -0
- package/lib/domain/Contact.js +2 -2
- package/lib/domain/Features.js +14 -14
- package/lib/domain/Phone/CTIPhone.js +43 -28
- package/lib/domain/Phone/WebRTCPhone.js +126 -89
- package/lib/domain/SFUNotAvailableError.js +11 -0
- package/lib/domain/__tests__/CallLog.test.js +1 -1
- package/lib/domain/__tests__/CallSession.test.js +15 -0
- package/lib/domain/__tests__/Contact.test.js +2 -2
- package/lib/domain/__tests__/IndirectTransfer.test.js +15 -0
- package/lib/domain/__tests__/Room.test.js +15 -0
- package/lib/index.js +415 -346
- package/lib/lib/WazoSessionDescriptionHandler.js +10 -5
- package/lib/service/CallApi.js +14 -14
- package/lib/service/IssueReporter.js +2 -2
- package/lib/service/__tests__/IssueReporter.test.js +2 -2
- package/lib/service/getApiClient.js +14 -14
- package/lib/simple/Auth.js +404 -336
- package/lib/simple/Configuration.js +404 -336
- package/lib/simple/Directory.js +14 -14
- package/lib/simple/Phone.js +404 -336
- package/lib/simple/Websocket.js +18 -18
- package/lib/simple/index.js +408 -340
- package/lib/simple/room/LocalParticipant.js +408 -340
- package/lib/simple/room/Participant.js +408 -340
- package/lib/simple/room/RemoteParticipant.js +408 -340
- package/lib/simple/room/Room.js +409 -341
- package/lib/simple/room/SipRoom.js +408 -340
- package/lib/simple/room/Stream.js +408 -340
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +408 -340
- package/lib/simple/utils.js +408 -340
- package/lib/utils/__tests__/api-requester.test.js +1 -1
- package/lib/utils/api-requester.js +1 -1
- package/lib/web-rtc-client.js +130 -108
- package/lib/websocket-client.js +16 -16
- package/package.json +1 -1
- package/src/domain/CallSession.js +16 -0
- package/src/domain/Contact.js +1 -1
- package/src/domain/Phone/WebRTCPhone.js +25 -4
- package/src/domain/SFUNotAvailableError.js +7 -0
- package/src/index.js +2 -0
- package/src/lib/WazoSessionDescriptionHandler.js +8 -3
- package/src/simple/Phone.js +2 -1
- package/src/simple/index.js +2 -0
- package/src/utils/api-requester.js +1 -1
- package/src/web-rtc-client.js +27 -10
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* */
|
|
4
|
+
class SFUNotAvailableError extends Error {
|
|
5
|
+
constructor(message = 'Sorry your user is not configured to support video conference') {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'SFUNotAvailableError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = SFUNotAvailableError;
|
|
@@ -39,8 +39,10 @@ var updateFrom = (instance , from ) => {
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
|
|
42
43
|
|
|
43
44
|
|
|
45
|
+
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
|
|
@@ -57,6 +59,7 @@ var updateFrom = (instance , from ) => {
|
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
|
|
62
|
+
|
|
60
63
|
|
|
61
64
|
|
|
62
65
|
class CallSession {
|
|
@@ -76,8 +79,12 @@ class CallSession {
|
|
|
76
79
|
|
|
77
80
|
|
|
78
81
|
|
|
82
|
+
|
|
83
|
+
|
|
79
84
|
|
|
80
85
|
|
|
86
|
+
|
|
87
|
+
|
|
81
88
|
|
|
82
89
|
|
|
83
90
|
|
|
@@ -115,6 +122,8 @@ class CallSession {
|
|
|
115
122
|
|
|
116
123
|
|
|
117
124
|
|
|
125
|
+
|
|
126
|
+
|
|
118
127
|
|
|
119
128
|
constructor({
|
|
120
129
|
answered,
|
|
@@ -128,6 +137,8 @@ class CallSession {
|
|
|
128
137
|
paused,
|
|
129
138
|
ringing,
|
|
130
139
|
startTime,
|
|
140
|
+
creationTime,
|
|
141
|
+
endTime,
|
|
131
142
|
cameraEnabled,
|
|
132
143
|
dialedExtension,
|
|
133
144
|
sipCallId,
|
|
@@ -140,12 +151,15 @@ class CallSession {
|
|
|
140
151
|
recording,
|
|
141
152
|
recordingPaused,
|
|
142
153
|
videoRemotelyDowngraded,
|
|
154
|
+
sipSession,
|
|
143
155
|
} ) {
|
|
144
156
|
this.callId = callId;
|
|
145
157
|
this.sipCallId = sipCallId;
|
|
146
158
|
this.displayName = displayName;
|
|
147
159
|
this.number = number;
|
|
160
|
+
this.creationTime = creationTime;
|
|
148
161
|
this.startTime = startTime;
|
|
162
|
+
this.endTime = endTime;
|
|
149
163
|
this.isCaller = isCaller;
|
|
150
164
|
this.answered = answered;
|
|
151
165
|
this.answeredBySystem = answeredBySystem;
|
|
@@ -164,6 +178,7 @@ class CallSession {
|
|
|
164
178
|
this.recording = recording || false;
|
|
165
179
|
this.recordingPaused = recordingPaused || false;
|
|
166
180
|
this.videoRemotelyDowngraded = videoRemotelyDowngraded;
|
|
181
|
+
this.sipSession = sipSession;
|
|
167
182
|
|
|
168
183
|
// Useful to compare instead of instanceof with minified code
|
|
169
184
|
this.type = 'CallSession';
|
|
@@ -46,7 +46,7 @@ const LINE_STATE = {
|
|
|
46
46
|
|
|
47
47
|
//
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
jsrsasign.KEYUTIL.getKey(swarmPublicKey);
|
|
50
50
|
|
|
51
51
|
//
|
|
52
52
|
|
|
@@ -700,7 +700,7 @@ class Contact {
|
|
|
700
700
|
this[key] = old[key] || this[key];
|
|
701
701
|
});
|
|
702
702
|
|
|
703
|
-
if (old.lineState
|
|
703
|
+
if (old.lineState) {
|
|
704
704
|
this.lineState = old.lineState;
|
|
705
705
|
}
|
|
706
706
|
|
|
@@ -39,8 +39,10 @@ var updateFrom = (instance , from ) => {
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
|
|
42
43
|
|
|
43
44
|
|
|
45
|
+
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
|
|
@@ -57,6 +59,7 @@ var updateFrom = (instance , from ) => {
|
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
|
|
62
|
+
|
|
60
63
|
|
|
61
64
|
|
|
62
65
|
class CallSession {
|
|
@@ -76,8 +79,12 @@ class CallSession {
|
|
|
76
79
|
|
|
77
80
|
|
|
78
81
|
|
|
82
|
+
|
|
83
|
+
|
|
79
84
|
|
|
80
85
|
|
|
86
|
+
|
|
87
|
+
|
|
81
88
|
|
|
82
89
|
|
|
83
90
|
|
|
@@ -115,6 +122,8 @@ class CallSession {
|
|
|
115
122
|
|
|
116
123
|
|
|
117
124
|
|
|
125
|
+
|
|
126
|
+
|
|
118
127
|
|
|
119
128
|
constructor({
|
|
120
129
|
answered,
|
|
@@ -128,6 +137,8 @@ class CallSession {
|
|
|
128
137
|
paused,
|
|
129
138
|
ringing,
|
|
130
139
|
startTime,
|
|
140
|
+
creationTime,
|
|
141
|
+
endTime,
|
|
131
142
|
cameraEnabled,
|
|
132
143
|
dialedExtension,
|
|
133
144
|
sipCallId,
|
|
@@ -140,12 +151,15 @@ class CallSession {
|
|
|
140
151
|
recording,
|
|
141
152
|
recordingPaused,
|
|
142
153
|
videoRemotelyDowngraded,
|
|
154
|
+
sipSession,
|
|
143
155
|
} ) {
|
|
144
156
|
this.callId = callId;
|
|
145
157
|
this.sipCallId = sipCallId;
|
|
146
158
|
this.displayName = displayName;
|
|
147
159
|
this.number = number;
|
|
160
|
+
this.creationTime = creationTime;
|
|
148
161
|
this.startTime = startTime;
|
|
162
|
+
this.endTime = endTime;
|
|
149
163
|
this.isCaller = isCaller;
|
|
150
164
|
this.answered = answered;
|
|
151
165
|
this.answeredBySystem = answeredBySystem;
|
|
@@ -164,6 +178,7 @@ class CallSession {
|
|
|
164
178
|
this.recording = recording || false;
|
|
165
179
|
this.recordingPaused = recordingPaused || false;
|
|
166
180
|
this.videoRemotelyDowngraded = videoRemotelyDowngraded;
|
|
181
|
+
this.sipSession = sipSession;
|
|
167
182
|
|
|
168
183
|
// Useful to compare instead of instanceof with minified code
|
|
169
184
|
this.type = 'CallSession';
|
|
@@ -39,8 +39,10 @@ var updateFrom = (instance , from ) => {
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
|
|
42
43
|
|
|
43
44
|
|
|
45
|
+
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
|
|
@@ -57,6 +59,7 @@ var updateFrom = (instance , from ) => {
|
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
|
|
62
|
+
|
|
60
63
|
|
|
61
64
|
|
|
62
65
|
class CallSession {
|
|
@@ -76,8 +79,12 @@ class CallSession {
|
|
|
76
79
|
|
|
77
80
|
|
|
78
81
|
|
|
82
|
+
|
|
83
|
+
|
|
79
84
|
|
|
80
85
|
|
|
86
|
+
|
|
87
|
+
|
|
81
88
|
|
|
82
89
|
|
|
83
90
|
|
|
@@ -115,6 +122,8 @@ class CallSession {
|
|
|
115
122
|
|
|
116
123
|
|
|
117
124
|
|
|
125
|
+
|
|
126
|
+
|
|
118
127
|
|
|
119
128
|
constructor({
|
|
120
129
|
answered,
|
|
@@ -128,6 +137,8 @@ class CallSession {
|
|
|
128
137
|
paused,
|
|
129
138
|
ringing,
|
|
130
139
|
startTime,
|
|
140
|
+
creationTime,
|
|
141
|
+
endTime,
|
|
131
142
|
cameraEnabled,
|
|
132
143
|
dialedExtension,
|
|
133
144
|
sipCallId,
|
|
@@ -140,12 +151,15 @@ class CallSession {
|
|
|
140
151
|
recording,
|
|
141
152
|
recordingPaused,
|
|
142
153
|
videoRemotelyDowngraded,
|
|
154
|
+
sipSession,
|
|
143
155
|
} ) {
|
|
144
156
|
this.callId = callId;
|
|
145
157
|
this.sipCallId = sipCallId;
|
|
146
158
|
this.displayName = displayName;
|
|
147
159
|
this.number = number;
|
|
160
|
+
this.creationTime = creationTime;
|
|
148
161
|
this.startTime = startTime;
|
|
162
|
+
this.endTime = endTime;
|
|
149
163
|
this.isCaller = isCaller;
|
|
150
164
|
this.answered = answered;
|
|
151
165
|
this.answeredBySystem = answeredBySystem;
|
|
@@ -164,6 +178,7 @@ class CallSession {
|
|
|
164
178
|
this.recording = recording || false;
|
|
165
179
|
this.recordingPaused = recordingPaused || false;
|
|
166
180
|
this.videoRemotelyDowngraded = videoRemotelyDowngraded;
|
|
181
|
+
this.sipSession = sipSession;
|
|
167
182
|
|
|
168
183
|
// Useful to compare instead of instanceof with minified code
|
|
169
184
|
this.type = 'CallSession';
|