webitel-sdk 23.7.15 → 23.7.17
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/bundles/index.esm.js +30 -32
- package/bundles/index.esm.js.map +1 -1
- package/bundles/index.esm.min.js +1 -1
- package/bundles/index.esm.min.js.map +1 -1
- package/bundles/index.umd.js +32 -33
- package/bundles/index.umd.js.map +1 -1
- package/bundles/index.umd.min.js +1 -1
- package/bundles/index.umd.min.js.map +1 -1
- package/esm2015/socket/agent.js +30 -32
- package/esm2015/socket/agent.js.map +1 -1
- package/esm5/socket/agent.js +32 -33
- package/esm5/socket/agent.js.map +1 -1
- package/package.json +1 -1
- package/types/socket/agent.d.ts +0 -1
- package/types/socket/agent.d.ts.map +1 -1
package/bundles/index.esm.js
CHANGED
|
@@ -43152,42 +43152,36 @@ class Agent {
|
|
|
43152
43152
|
get stateDuration() {
|
|
43153
43153
|
return Math.round((Date.now() - this.lastStatusChange) / 1000);
|
|
43154
43154
|
}
|
|
43155
|
-
// todo need refactor
|
|
43156
43155
|
setWaitingList(e) {
|
|
43157
43156
|
if (e) {
|
|
43158
|
-
const list = e.list;
|
|
43159
43157
|
this.waitingListCalls.length = 0;
|
|
43160
43158
|
this.waitingListChats.length = 0;
|
|
43161
|
-
|
|
43162
|
-
|
|
43163
|
-
|
|
43164
|
-
|
|
43165
|
-
|
|
43166
|
-
|
|
43167
|
-
|
|
43168
|
-
|
|
43169
|
-
|
|
43170
|
-
|
|
43171
|
-
|
|
43172
|
-
|
|
43173
|
-
|
|
43174
|
-
|
|
43175
|
-
|
|
43176
|
-
|
|
43177
|
-
|
|
43178
|
-
|
|
43179
|
-
|
|
43180
|
-
|
|
43181
|
-
|
|
43182
|
-
|
|
43183
|
-
|
|
43184
|
-
|
|
43185
|
-
|
|
43186
|
-
|
|
43187
|
-
});
|
|
43188
|
-
break;
|
|
43189
|
-
default:
|
|
43190
|
-
}
|
|
43159
|
+
if (this.status !== AgentStatus.Online) {
|
|
43160
|
+
return;
|
|
43161
|
+
}
|
|
43162
|
+
for (const el of (e.calls || [])) {
|
|
43163
|
+
this.waitingListCalls.push({
|
|
43164
|
+
displayName: el.communication.name || '',
|
|
43165
|
+
displayNumber: el.communication.destination || '',
|
|
43166
|
+
attemptId: el.attempt_id,
|
|
43167
|
+
sessionId: el.session_id,
|
|
43168
|
+
deadline: el.deadline,
|
|
43169
|
+
queue: el.queue,
|
|
43170
|
+
wait: el.wait,
|
|
43171
|
+
});
|
|
43172
|
+
}
|
|
43173
|
+
for (const el of (e.chats || [])) {
|
|
43174
|
+
this.waitingListChats.push({
|
|
43175
|
+
chat: el.communication.chat || '',
|
|
43176
|
+
displayName: el.communication.name || '',
|
|
43177
|
+
message: el.communication.msg || '',
|
|
43178
|
+
peer: el.communication.destination || '',
|
|
43179
|
+
attemptId: el.attempt_id,
|
|
43180
|
+
sessionId: el.session_id,
|
|
43181
|
+
deadline: el.deadline,
|
|
43182
|
+
queue: el.queue,
|
|
43183
|
+
wait: el.wait,
|
|
43184
|
+
});
|
|
43191
43185
|
}
|
|
43192
43186
|
}
|
|
43193
43187
|
}
|
|
@@ -43360,6 +43354,10 @@ class Agent {
|
|
|
43360
43354
|
this.info.on_demand = e.on_demand || false;
|
|
43361
43355
|
this.initChannels(e.channels);
|
|
43362
43356
|
}
|
|
43357
|
+
else {
|
|
43358
|
+
this.waitingListCalls.length = 0;
|
|
43359
|
+
this.waitingListChats.length = 0;
|
|
43360
|
+
}
|
|
43363
43361
|
this.info.status = e.status;
|
|
43364
43362
|
this.info.status_payload = e.status_payload ? e.status_payload : null;
|
|
43365
43363
|
this.lastStatusChange = Date.now();
|