webitel-sdk 23.12.1 → 23.12.2

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.
@@ -45094,6 +45094,17 @@ class Call {
45094
45094
  setHold(e) {
45095
45095
  this.setState(e);
45096
45096
  }
45097
+ setContactId(id) {
45098
+ if (!this.contact) {
45099
+ this.contact = {
45100
+ hide: false,
45101
+ id,
45102
+ };
45103
+ }
45104
+ else {
45105
+ this.contact.id = id;
45106
+ }
45107
+ }
45097
45108
  setInfo(s) {
45098
45109
  this.parentId = s.parent_id;
45099
45110
  this.destination = s.destination;
@@ -45787,6 +45798,7 @@ var NotificationActions;
45787
45798
  NotificationActions["HideMember"] = "hide_member";
45788
45799
  NotificationActions["HideAttempt"] = "hide_attempt";
45789
45800
  NotificationActions["WaitingList"] = "waiting_list";
45801
+ NotificationActions["SetContact"] = "set_contact";
45790
45802
  })(NotificationActions || (NotificationActions = {}));
45791
45803
 
45792
45804
  const SOCKET_URL_SUFFIX = 'websocket';
@@ -46410,6 +46422,15 @@ class Client extends EventEmitter {
46410
46422
  }
46411
46423
  }
46412
46424
  break;
46425
+ case NotificationActions.SetContact:
46426
+ if (e.body) {
46427
+ const contactId = e.body.contact_id;
46428
+ const call = this.callById(e.body.id);
46429
+ if (call) {
46430
+ call.setContactId(contactId);
46431
+ }
46432
+ }
46433
+ break;
46413
46434
  case NotificationActions.WaitingList:
46414
46435
  if (this.agent) {
46415
46436
  this.agent.setWaitingList(e.body);