UNPKG

@nethesis/phone-island

Version:
3 lines (2 loc) 2.64 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("react");var e=require("../utils/genericFunctions/eventDispatch.js");require("../node_modules/tslib/tslib.es6.js"),require("../store/index.js");var n={},t=null;function i(){0!==Object.keys(n).length?(e.eventDispatch("phone-island-parking-update",n),n={},t=null):t=null}exports.dispatchAlreadyLogin=function(){e.eventDispatch("phone-island-user-already-login",{})},exports.dispatchConversations=function(n,t){var i,s=((i={})[n.username]={conversations:null==n?void 0:n.conversations,status:null==n?void 0:n.status,sipuseragent:null==n?void 0:n.sipuseragent,username:null==n?void 0:n.username,port:null==n?void 0:n.port,dnd:null==n?void 0:n.dnd,number:null==n?void 0:n.exten,ip:null==n?void 0:n.ip,exten:null==n?void 0:n.exten,name:null==n?void 0:n.name,extensionType:t},i);e.eventDispatch("phone-island-conversations",s)},exports.dispatchCurrentUserQueueCallConnected=function(n){e.eventDispatch("phone-island-current-user-queue-call-connected",n)},exports.dispatchCurrentUserQueueCallWaiting=function(n){e.eventDispatch("phone-island-current-user-queue-call-waiting",n)},exports.dispatchDefaultDeviceUpdate=function(n){e.eventDispatch("phone-island-default-device-updated",{id:n})},exports.dispatchExtensions=function(n){var t,i=((t={})[n.username]={conversations:null==n?void 0:n.conversations,status:null==n?void 0:n.status,sipuseragent:null==n?void 0:n.sipuseragent,username:null==n?void 0:n.username,port:null==n?void 0:n.port,dnd:null==n?void 0:n.dnd,number:null==n?void 0:n.exten,ip:null==n?void 0:n.ip,exten:null==n?void 0:n.exten,name:null==n?void 0:n.name},t);e.eventDispatch("phone-island-extensions-update",i)},exports.dispatchMainPresence=function(n){var t,i=((t={})[n.mainPresence.username]={mainPresence:n.mainPresence.status},t);e.eventDispatch("phone-island-main-presence",i)},exports.dispatchParkingUpdate=function(s){(null==s?void 0:s.parking)?(n[s.parking]=s,t||(t=setTimeout(i,200))):e.eventDispatch("phone-island-parking-update",{})},exports.dispatchQueueMemberUpdate=function(n){var t,i=((t={})[n.member]=n,t);e.eventDispatch("phone-island-queue-member-update",i)},exports.dispatchQueueUpdate=function(n){var t,i=((t={})[n.queue]=n,t);e.eventDispatch("phone-island-queue-update",i)},exports.dispatchServerReload=function(){e.eventDispatch("phone-island-server-reloaded",{})},exports.dispatchUrlCall=function(n,t){var i={url:n,urlType:t};e.eventDispatch("phone-island-action-physical",{urlCallObject:i})},exports.dispatchVideoCallStarted=function(n){e.eventDispatch("phone-island-video-call-started",n)}; //# sourceMappingURL=SocketEvents.js.map