webitel-sdk 23.9.11 → 23.12.1
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 +22 -0
- 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 +34 -0
- 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/call.js +21 -0
- package/esm2015/socket/call.js.map +1 -1
- package/esm2015/socket/client.js +1 -0
- package/esm2015/socket/client.js.map +1 -1
- package/esm5/socket/call.js +33 -0
- package/esm5/socket/call.js.map +1 -1
- package/esm5/socket/client.js +1 -0
- package/esm5/socket/client.js.map +1 -1
- package/package.json +1 -1
- package/types/socket/call.d.ts +16 -2
- package/types/socket/call.d.ts.map +1 -1
- package/types/socket/client.d.ts.map +1 -1
package/bundles/index.esm.js
CHANGED
|
@@ -44926,6 +44926,7 @@ class Call {
|
|
|
44926
44926
|
this._eavesdrop = null;
|
|
44927
44927
|
this._autoAnswerTimerId = null;
|
|
44928
44928
|
this._activeCounter = 0;
|
|
44929
|
+
this.contact = null;
|
|
44929
44930
|
this.answeredAt = 0;
|
|
44930
44931
|
this.hangupAt = 0;
|
|
44931
44932
|
this.bridgedAt = 0;
|
|
@@ -45028,6 +45029,12 @@ class Call {
|
|
|
45028
45029
|
get eavesdropIsPrompt() {
|
|
45029
45030
|
return this.eavesdropState === EavesdropState.Prompt;
|
|
45030
45031
|
}
|
|
45032
|
+
get contactId() {
|
|
45033
|
+
return (this.contact && this.contact.id) || null;
|
|
45034
|
+
}
|
|
45035
|
+
get hideContact() {
|
|
45036
|
+
return this.contact && this.contact.hide;
|
|
45037
|
+
}
|
|
45031
45038
|
// todo
|
|
45032
45039
|
async getMember(req) {
|
|
45033
45040
|
if (!this.isMember) {
|
|
@@ -45082,6 +45089,7 @@ class Call {
|
|
|
45082
45089
|
if (bridged.queue) {
|
|
45083
45090
|
this.queue = bridged.queue;
|
|
45084
45091
|
}
|
|
45092
|
+
this.setContactData(bridged);
|
|
45085
45093
|
}
|
|
45086
45094
|
setHold(e) {
|
|
45087
45095
|
this.setState(e);
|
|
@@ -45096,6 +45104,7 @@ class Call {
|
|
|
45096
45104
|
this.queue = s.queue || null;
|
|
45097
45105
|
this.sipId = s.sip_id || null;
|
|
45098
45106
|
this.params = s.params;
|
|
45107
|
+
this.setContactData(s);
|
|
45099
45108
|
}
|
|
45100
45109
|
setPeerStreams(streams) {
|
|
45101
45110
|
if (!streams) {
|
|
@@ -45366,6 +45375,18 @@ class Call {
|
|
|
45366
45375
|
req.sendToCallId = this.parentId || null;
|
|
45367
45376
|
return this.client.inviteToUser(req);
|
|
45368
45377
|
}
|
|
45378
|
+
async setContact(contactId) {
|
|
45379
|
+
return this.client.request(`call_set_contact`, {
|
|
45380
|
+
id: this.id,
|
|
45381
|
+
contact_id: contactId,
|
|
45382
|
+
});
|
|
45383
|
+
}
|
|
45384
|
+
setContactData(e) {
|
|
45385
|
+
this.contact = {
|
|
45386
|
+
id: e.contact_id || null,
|
|
45387
|
+
hide: e.hide_contact || false,
|
|
45388
|
+
};
|
|
45389
|
+
}
|
|
45369
45390
|
}
|
|
45370
45391
|
|
|
45371
45392
|
function formatWebSocketUri(host) {
|
|
@@ -46305,6 +46326,7 @@ class Client extends EventEmitter {
|
|
|
46305
46326
|
break;
|
|
46306
46327
|
default:
|
|
46307
46328
|
if (e.name !== 'INVALID_STATE_ERROR') {
|
|
46329
|
+
// TODO: DEV-3409
|
|
46308
46330
|
this.emit('error', e);
|
|
46309
46331
|
}
|
|
46310
46332
|
}
|