webitel-sdk 26.4.32 → 26.4.33
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/index.cjs +10 -2
- package/index.cjs.map +1 -1
- package/index.mjs +10 -2
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/socket/agent.d.ts +2 -0
- package/socket/agent.d.ts.map +1 -1
- package/version.d.ts +1 -1
package/index.mjs
CHANGED
|
@@ -66709,7 +66709,7 @@ _defineProperty(SipPhone$1, "userAgent", `Webitel-Phone/${version$1}`);
|
|
|
66709
66709
|
_defineProperty(SipPhone$1, "sipVersion", version$1);
|
|
66710
66710
|
//#endregion
|
|
66711
66711
|
//#region src/version.ts
|
|
66712
|
-
const version = "26.4.
|
|
66712
|
+
const version = "26.4.33";
|
|
66713
66713
|
//#endregion
|
|
66714
66714
|
//#region src/socket/errors.ts
|
|
66715
66715
|
/**
|
|
@@ -67719,6 +67719,7 @@ var Agent = class {
|
|
|
67719
67719
|
_defineProperty(this, "_channels", void 0);
|
|
67720
67720
|
_defineProperty(this, "_listOfflineMembers", void 0);
|
|
67721
67721
|
_defineProperty(this, "lastStatusChange", void 0);
|
|
67722
|
+
_defineProperty(this, "_waitingChatsSize", 0);
|
|
67722
67723
|
this.task = /* @__PURE__ */ new Map();
|
|
67723
67724
|
this._channels = /* @__PURE__ */ new Map();
|
|
67724
67725
|
this.initChannels(info.channels);
|
|
@@ -67736,6 +67737,9 @@ var Agent = class {
|
|
|
67736
67737
|
get agentId() {
|
|
67737
67738
|
return this.info.agent_id;
|
|
67738
67739
|
}
|
|
67740
|
+
get waitingChatsSize() {
|
|
67741
|
+
return this._waitingChatsSize;
|
|
67742
|
+
}
|
|
67739
67743
|
/**
|
|
67740
67744
|
* Метод, що повертає статус "On Demand".
|
|
67741
67745
|
* @method
|
|
@@ -67839,6 +67843,7 @@ var Agent = class {
|
|
|
67839
67843
|
if (e) {
|
|
67840
67844
|
this.waitingListCalls.length = 0;
|
|
67841
67845
|
this.waitingListChats.length = 0;
|
|
67846
|
+
this._waitingChatsSize = 0;
|
|
67842
67847
|
if (this.status !== "online") return;
|
|
67843
67848
|
for (const el of e.calls || []) this.waitingListCalls.push({
|
|
67844
67849
|
displayName: el.communication.name || "",
|
|
@@ -67849,6 +67854,7 @@ var Agent = class {
|
|
|
67849
67854
|
queue: el.queue,
|
|
67850
67855
|
wait: el.wait
|
|
67851
67856
|
});
|
|
67857
|
+
if (Array.isArray(e.chats)) this._waitingChatsSize = e.chats.length;
|
|
67852
67858
|
for (const el of e.chats || []) {
|
|
67853
67859
|
this.waitingListChats.push({
|
|
67854
67860
|
chat: el.communication.chat || "",
|
|
@@ -67874,7 +67880,8 @@ var Agent = class {
|
|
|
67874
67880
|
deleteWaitingAttempt(e) {
|
|
67875
67881
|
if (e) {
|
|
67876
67882
|
const attemptId = e.attempt_id;
|
|
67877
|
-
if (
|
|
67883
|
+
if (removeWaitingList(this.waitingListCalls, attemptId)) return;
|
|
67884
|
+
if (removeWaitingList(this.waitingListChats, attemptId)) this._waitingChatsSize--;
|
|
67878
67885
|
}
|
|
67879
67886
|
}
|
|
67880
67887
|
/**
|
|
@@ -68078,6 +68085,7 @@ var Agent = class {
|
|
|
68078
68085
|
} else {
|
|
68079
68086
|
this.waitingListCalls.length = 0;
|
|
68080
68087
|
this.waitingListChats.length = 0;
|
|
68088
|
+
this._waitingChatsSize = 0;
|
|
68081
68089
|
}
|
|
68082
68090
|
this.info.online_status = formatStatusPreset(e.status_preset);
|
|
68083
68091
|
this.info.status = e.status;
|