Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / services / routing / server / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xf66b=['agents','busy','end','QueueReport','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','busyQueue','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','find','chatQueues','loggedIn','paused','mailQueues','available','waiting','openchannelQueues','name','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','values','mailQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','stringify','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','../rpc/openchannelQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','applications','isArray','length','existsSync','join','app','toLowerCase','autoreply','appdata','split','mail','push','slice','dialogflow','dialogflowv2','amazonlex','tag','TagId','tvox','getMustacheRender','account','notificationTemplate','ChatWebsiteId','body','%s:%s:%s','condition','./applications/','consequence','priority','info','Push\x20new\x20rule','on\x20interval','intervals','Please\x20create\x20a\x20new\x20file\x20under','.js','Applications\x20executed','emit','complete','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','error','stack','routing\x20is\x20empty','agent'];(function(_0x214742,_0x51809d){var _0x54a1a4=function(_0x4cf9df){while(--_0x4cf9df){_0x214742['push'](_0x214742['shift']());}};_0x54a1a4(++_0x51809d);}(_0xf66b,0x1cc));var _0xbf66=function(_0x187ee1,_0x3fd1e6){_0x187ee1=_0x187ee1-0x0;var _0x388160=_0xf66b[_0x187ee1];return _0x388160;};'use strict';var _=require(_0xbf66('0x0'));var util=require(_0xbf66('0x1'));var path=require(_0xbf66('0x2'));var fs=require('fs');var jayson=require(_0xbf66('0x3'));var BPromise=require(_0xbf66('0x4'));var utils=require(_0xbf66('0x5'));var sUtils=require(_0xbf66('0x6'));var logger=require(_0xbf66('0x7'))('routing');var rpc={'openchannelQueueReport':require(_0xbf66('0x8')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require(_0xbf66('0x9')),'smsQueueReport':require(_0xbf66('0xa')),'faxQueueReport':require(_0xbf66('0xb')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0xbf66('0xc'));function getId(_0x58ecb5,_0x3fe001,_0x12f222){return util[_0xbf66('0xd')](_0xbf66('0xe'),_0x58ecb5,_0x3fe001||0x0,_0x12f222||0x0);}function getIntervals(_0x409d9b,_0x143168){var _0x3c9b50=[];if(!_[_0xbf66('0xf')](_0x143168[_0xbf66('0x10')])&&!_[_0xbf66('0xf')](_0x409d9b[_0x143168['IntervalId']])&&!_[_0xbf66('0xf')](_0x409d9b[_0x143168['IntervalId']][_0xbf66('0x11')])){_0x3c9b50=_[_0xbf66('0x12')](_0x409d9b[_0x143168[_0xbf66('0x10')]]['Intervals'],_0xbf66('0x13'));}else if(!_[_0xbf66('0xf')](_0x143168[_0xbf66('0x13')])){_0x3c9b50=[_0x143168[_0xbf66('0x13')]];}return _0x3c9b50;}exports[_0xbf66('0x14')]=function(_0x15cd1e){_0x15cd1e[_0xbf66('0x15')]={};return new BPromise(function(_0x7fc574,_0x3f7c1a){var _0x155197={'Start':function(_0x2100e9){var _0xc916b4=this;return new Promise(function(_0xa793ba,_0x5e2ae3){if(_0x2100e9){try{var _0x190a42=[];var _0x5e976a=getId(_0x2100e9[_0xbf66('0x16')],_0x2100e9[_0xbf66('0x17')]?_0x2100e9[_0xbf66('0x17')]['id']:0x0,_0x2100e9[_0xbf66('0x18')]?_0x2100e9['interaction']['id']:0x0);var _0x1ee2e9=sUtils[_0xbf66('0x19')](_0x15cd1e,_0x2100e9);if(!_0x1ee2e9&&_0x2100e9[_0xbf66('0x1a')]&&_[_0xbf66('0x1b')](_0x2100e9[_0xbf66('0x1a')])&&_0x2100e9[_0xbf66('0x1a')][_0xbf66('0x1c')]){for(var _0x1775bb=0x0;_0x1775bb<_0x2100e9[_0xbf66('0x1a')][_0xbf66('0x1c')];_0x1775bb+=0x1){var _0x1c7f0e=_0x2100e9[_0xbf66('0x1a')][_0x1775bb];if(fs[_0xbf66('0x1d')](path[_0xbf66('0x1e')](__dirname,'applications',_0x1c7f0e[_0xbf66('0x1f')]+'.js'))){var _0x449927=[];switch(_0x1c7f0e[_0xbf66('0x1f')][_0xbf66('0x20')]()){case _0xbf66('0x21'):var _0x11fc1d=_0x1c7f0e[_0xbf66('0x22')][_0xbf66('0x23')](',');if(_0x2100e9['channel']===_0xbf66('0x24')){_0x449927[_0xbf66('0x25')](_0x11fc1d[0x0]);_0x449927[_0xbf66('0x25')](_0x11fc1d[0x1]);_0x449927['push'](_0x11fc1d[_0xbf66('0x26')](0x2,_0x11fc1d['length'])[_0xbf66('0x1e')](','));}else{_0x449927[_0xbf66('0x25')](_0x11fc1d[0x0]);_0x449927['push'](_0x11fc1d[_0xbf66('0x26')](0x1,_0x11fc1d['length'])[_0xbf66('0x1e')](','));}break;case _0xbf66('0x27'):var _0x375fd5=_0x1c7f0e['appdata'][_0xbf66('0x23')](',');_0x449927['push'](_0x375fd5[0x0]);_0x449927[_0xbf66('0x25')](_0x375fd5[0x1]);_0x449927['push'](_0x375fd5[_0xbf66('0x26')](0x2,_0x375fd5[_0xbf66('0x1c')])['join'](','));break;case _0xbf66('0x28'):var _0x39ab7b=_0x1c7f0e['appdata'][_0xbf66('0x23')](',');_0x449927[_0xbf66('0x25')](_0x39ab7b[0x0]);_0x449927[_0xbf66('0x25')](_0x39ab7b[0x1]);_0x449927[_0xbf66('0x25')](_0x39ab7b[0x2]);_0x449927[_0xbf66('0x25')](_0x39ab7b[0x3]);_0x449927['push'](_0x39ab7b[_0xbf66('0x26')](0x4,_0x39ab7b['length'])[_0xbf66('0x1e')](','));break;case _0xbf66('0x29'):var _0x25563e=_0x1c7f0e[_0xbf66('0x22')][_0xbf66('0x23')](',');_0x449927[_0xbf66('0x25')](_0x25563e[0x0]);_0x449927[_0xbf66('0x25')](_0x25563e[0x1]);_0x449927[_0xbf66('0x25')](_0x25563e[0x2]);_0x449927['push'](_0x25563e[0x3]);_0x449927[_0xbf66('0x25')](_0x25563e[_0xbf66('0x26')](0x4,_0x25563e[_0xbf66('0x1c')])[_0xbf66('0x1e')](','));break;case'message':_0x449927[_0xbf66('0x25')](_0x1c7f0e['appdata']);break;case _0xbf66('0x2a'):_0x449927[_0xbf66('0x25')](_0x1c7f0e[_0xbf66('0x2b')]);_0x449927[_0xbf66('0x25')](_0x1c7f0e[_0xbf66('0x22')]);break;case _0xbf66('0x2c'):var _0x16aec0=utils[_0xbf66('0x2d')](_0x2100e9[_0xbf66('0x2e')][_0xbf66('0x2f')],_0x2100e9);var _0x3c8ced=_0x1c7f0e[_0xbf66('0x22')][_0xbf66('0x23')](',');_0x449927[_0xbf66('0x25')](_0x3c8ced[0x0]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0x1]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0x2]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0x3]);_0x449927['push'](_0x3c8ced[0x4]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0x5]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0x6]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0x7]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0x8]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0x9]);_0x449927[_0xbf66('0x25')](_0x3c8ced[0xa]);_0x449927[_0xbf66('0x25')](_0x2100e9[_0xbf66('0x18')]['id']);_0x449927[_0xbf66('0x25')](_0x2100e9[_0xbf66('0x17')]['id']);_0x449927[_0xbf66('0x25')](_0x1c7f0e[_0xbf66('0x30')]);_0x449927['push'](_0x2100e9[_0xbf66('0x18')]['ContactId']);_0x449927[_0xbf66('0x25')](_0x2100e9['body'][_0xbf66('0x31')]);_0x449927['push'](_0x16aec0);break;default:_0x449927=_['isNil'](_0x1c7f0e[_0xbf66('0x22')])?[]:_0x1c7f0e['appdata'][_0xbf66('0x23')](',');}var _0x189192={'id':util[_0xbf66('0xd')](_0xbf66('0x32'),_0x5e976a,_0x1c7f0e['id'],_0x1c7f0e[_0xbf66('0x1f')]),'condition':require('./interval')[_0xbf66('0x33')](_0x5e976a,getIntervals(_0x15cd1e['intervals'],_0x1c7f0e),_0x15cd1e),'consequence':require(_0xbf66('0x34')+_0x1c7f0e['app'])[_0xbf66('0x35')](_0x5e976a,_0x449927,_0x15cd1e,_0x2100e9),'p':_0x1c7f0e[_0xbf66('0x36')]||0x0};logger[_0xbf66('0x37')](_0xbf66('0x38'),_0x189192['id'],_0xbf66('0x39'),getIntervals(_0x15cd1e[_0xbf66('0x3a')],_0x1c7f0e)[_0xbf66('0x1e')]('\x20|\x20'));_0x190a42[_0xbf66('0x25')](_0x189192);}else{logger['error'](_0xbf66('0x3b'),path[_0xbf66('0x1e')](__dirname,_0xbf66('0x1a'),_0x1c7f0e[_0xbf66('0x1f')]+_0xbf66('0x3c')));}}_0x15cd1e['rules'][_0x5e976a]=new RuleEngine(_0x190a42);_0x15cd1e[_0xbf66('0x15')][_0x5e976a]['execute'](_0x2100e9,function(_0x2903a0){logger[_0xbf66('0x37')](_0xbf66('0x3d'),JSON['stringify'](_0x2903a0['matchPath']));if(_0x15cd1e[_0xbf66('0x15')][_0x5e976a]){_0x15cd1e['rules'][_0x5e976a][_0xbf66('0x3e')](_0xbf66('0x3f'));}});return _0xa793ba({'code':0xc8,'message':_0x2100e9});}else{if(_0x1ee2e9){logger[_0xbf66('0x37')](util[_0xbf66('0xd')](_0xbf66('0x40'),_0x5e976a));}else{logger[_0xbf66('0x37')](_0xbf66('0x41'));}return _0xa793ba({'code':0xc8,'message':_0x2100e9});}}catch(_0x35e225){logger[_0xbf66('0x42')](_0x35e225[_0xbf66('0x43')]);return _0x5e2ae3(_0xc916b4[_0xbf66('0x42')](0x1f4,_0x35e225));}}return _0x5e2ae3(_0xbf66('0x44'));});},'AcceptMessage':function(_0x3a6d02){var _0x5d30e6=this;return new Promise(function(_0x1282b9,_0x15114d){if(_0x3a6d02[_0xbf66('0x45')]&&_0x3a6d02['agent']['id']){if(_0x15cd1e[_0xbf66('0x46')][_0x3a6d02[_0xbf66('0x45')]['id']]){_0x15cd1e['agents'][_0x3a6d02[_0xbf66('0x45')]['id']][_0xbf66('0x47')]=![];_0x15cd1e[_0xbf66('0x46')][_0x3a6d02[_0xbf66('0x45')]['id']]['busyQueue']=undefined;}}if(_0x3a6d02[_0xbf66('0x17')]&&_0x3a6d02[_0xbf66('0x17')]['id']){try{var _0x549fd0=getId(_0x3a6d02[_0xbf66('0x16')],_0x3a6d02[_0xbf66('0x17')]?_0x3a6d02[_0xbf66('0x17')]['id']:0x0,_0x3a6d02['interaction']?_0x3a6d02[_0xbf66('0x18')]['id']:0x0);if(_0x15cd1e[_0xbf66('0x15')][_0x549fd0]){_0x15cd1e[_0xbf66('0x15')][_0x549fd0][_0xbf66('0x3e')](_0xbf66('0x48'));if(rpc[_0x3a6d02['channel']+_0xbf66('0x49')]){rpc[_0x3a6d02[_0xbf66('0x16')]+_0xbf66('0x49')]['update'](_0x549fd0,{'UserId':_0x3a6d02['message']['UserId']})[_0xbf66('0x4a')](function(){logger[_0xbf66('0x42')](_0xbf66('0x4b'));});}}return _0x1282b9({'code':0xc8,'message':_0x3a6d02});}catch(_0x1dc5c0){logger[_0xbf66('0x42')](_0x1dc5c0[_0xbf66('0x43')]);return _0x15114d(_0x5d30e6[_0xbf66('0x42')](0x1f4,_0x1dc5c0));}}logger[_0xbf66('0x42')](_0xbf66('0x4c'));return _0x15114d(_0x5d30e6['error'](0x1f4,'message\x20is\x20empty'));});},'RejectMessage':function(_0x1857cb){var _0x42ca37=this;return new Promise(function(_0x33b9e5,_0x257ea6){if(_0x1857cb['agent']&&_0x1857cb[_0xbf66('0x45')]['id']){try{if(_0x15cd1e['agents'][_0x1857cb[_0xbf66('0x45')]['id']]){_0x15cd1e[_0xbf66('0x46')][_0x1857cb['agent']['id']][_0xbf66('0x47')]=![];_0x15cd1e[_0xbf66('0x46')][_0x1857cb[_0xbf66('0x45')]['id']][_0xbf66('0x4d')]=undefined;}return _0x33b9e5({'code':0xc8,'message':_0x1857cb});}catch(_0x1f057d){logger['error'](_0x1f057d[_0xbf66('0x43')]);return _0x257ea6(_0x42ca37[_0xbf66('0x42')](0x1f4,_0x1f057d));}}logger['error']('message\x20is\x20empty');return _0x257ea6(_0x42ca37[_0xbf66('0x42')](0x1f4,_0xbf66('0x4c')));});},'AbandonInteraction':function(_0x4cd4a9){var _0x60b893=this;return new Promise(function(_0x5b5743,_0x5c60d5){if(_0x4cd4a9[_0xbf66('0x16')]&&_0x4cd4a9[_0xbf66('0x18')]&&_0x4cd4a9[_0xbf66('0x18')]['id']){try{var _0x1e53bd=getId(_0x4cd4a9[_0xbf66('0x16')],_0x4cd4a9['message']?_0x4cd4a9[_0xbf66('0x17')]['id']:0x0,_0x4cd4a9[_0xbf66('0x18')]?_0x4cd4a9[_0xbf66('0x18')]['id']:0x0);if(_0x15cd1e[_0xbf66('0x15')][_0x1e53bd]){_0x15cd1e[_0xbf66('0x15')][_0x1e53bd]['emit'](_0xbf66('0x48'));}return _0x5b5743({'code':0xc8,'message':_0x4cd4a9});}catch(_0x20f0e1){logger[_0xbf66('0x42')](_0x20f0e1['stack']);return _0x5c60d5(_0x60b893[_0xbf66('0x42')](0x1f4,_0x20f0e1));}}logger[_0xbf66('0x42')](_0xbf66('0x4c'));return _0x5c60d5(_0x60b893[_0xbf66('0x42')](0x1f4,_0xbf66('0x4c')));});},'AgentCapacity':function(_0x2d895e){var _0x4b2270=this;return new Promise(function(_0x46a2b7,_0x306a4d){if(_0x15cd1e[_0xbf66('0x46')][_0xbf66('0x4e')](_0x2d895e['id'])){for(var _0x4a1ce7 in _0x2d895e[_0xbf66('0x4f')]){if(_0x2d895e['capacity'][_0xbf66('0x4e')](_0x4a1ce7)){if(_0x15cd1e[_0xbf66('0x46')][_0x2d895e['id']]['hasOwnProperty'](_0x4a1ce7+_0xbf66('0x50'))){_0x15cd1e[_0xbf66('0x46')][_0x2d895e['id']][_0x4a1ce7+_0xbf66('0x50')]=parseInt(_0x2d895e[_0xbf66('0x4f')][_0x4a1ce7],0xa);}}}_0x15cd1e['agents'][_0x2d895e['id']][_0xbf66('0x51')]();return _0x46a2b7({'code':0xc8,'message':_0x15cd1e[_0xbf66('0x46')][_0x2d895e['id']]});}else{return _0x306a4d(_0x4b2270[_0xbf66('0x42')](0x1f4,_0xbf66('0x52')));}});},'Agents':function(_0x105324){return new Promise(function(_0x2feaeb){var _0x37d98c=_['values'](_0x15cd1e['agents']);if(_0x105324&&_0x105324['id']){var _0x50552f=_[_0xbf66('0x53')](_0x37d98c,function(_0x1ba00f){return _0x1ba00f['id']===_0x105324['id'];});_0x2feaeb(_0x50552f);}else{_0x2feaeb({'count':_0x37d98c[_0xbf66('0x1c')],'rows':_0x37d98c});}});},'ChatQueues':function(){return new Promise(function(_0x44f715){var _0x3b3ad3=[];for(var _0x5cd000 in _0x15cd1e['chatQueues']){if(_0x15cd1e[_0xbf66('0x54')]['hasOwnProperty'](_0x5cd000)){var _0x3bf42d=_0x15cd1e[_0xbf66('0x54')][_0x5cd000];var _0x47a332={'id':_0x3bf42d['id'],'available':_0x3bf42d['available'],'loggedIn':_0x3bf42d[_0xbf66('0x55')],'name':_0x3bf42d['name'],'paused':_0x3bf42d[_0xbf66('0x56')],'waiting':_0x3bf42d['waiting']};_0x3b3ad3[_0xbf66('0x25')](_0x47a332);}}_0x44f715({'count':_0x3b3ad3[_0xbf66('0x1c')],'rows':_0x3b3ad3});});},'MailQueues':function(){return new Promise(function(_0x1e0f69){var _0x4bd476=[];for(var _0x34a80e in _0x15cd1e[_0xbf66('0x57')]){if(_0x15cd1e['mailQueues'][_0xbf66('0x4e')](_0x34a80e)){var _0x378dac=_0x15cd1e['mailQueues'][_0x34a80e];var _0x196896={'id':_0x378dac['id'],'available':_0x378dac[_0xbf66('0x58')],'loggedIn':_0x378dac[_0xbf66('0x55')],'name':_0x378dac['name'],'paused':_0x378dac[_0xbf66('0x56')],'waiting':_0x378dac[_0xbf66('0x59')]};_0x4bd476['push'](_0x196896);}}_0x1e0f69({'count':_0x4bd476[_0xbf66('0x1c')],'rows':_0x4bd476});});},'OpenchannelQueues':function(){return new Promise(function(_0x18bc72){var _0x1ddfdb=[];for(var _0x2e5101 in _0x15cd1e[_0xbf66('0x5a')]){if(_0x15cd1e[_0xbf66('0x5a')][_0xbf66('0x4e')](_0x2e5101)){var _0x46fa6f=_0x15cd1e[_0xbf66('0x5a')][_0x2e5101];var _0x21cac0={'id':_0x46fa6f['id'],'available':_0x46fa6f['available'],'loggedIn':_0x46fa6f[_0xbf66('0x55')],'name':_0x46fa6f[_0xbf66('0x5b')],'paused':_0x46fa6f['paused'],'waiting':_0x46fa6f[_0xbf66('0x59')]};_0x1ddfdb[_0xbf66('0x25')](_0x21cac0);}}_0x18bc72({'count':_0x1ddfdb[_0xbf66('0x1c')],'rows':_0x1ddfdb});});},'SmsQueues':function(){return new Promise(function(_0x26bb25){var _0x1e0650=[];for(var _0xa726e1 in _0x15cd1e[_0xbf66('0x5c')]){if(_0x15cd1e[_0xbf66('0x5c')][_0xbf66('0x4e')](_0xa726e1)){var _0x121228=_0x15cd1e[_0xbf66('0x5c')][_0xa726e1];var _0x3e7ba5={'id':_0x121228['id'],'available':_0x121228['available'],'loggedIn':_0x121228[_0xbf66('0x55')],'name':_0x121228['name'],'paused':_0x121228['paused'],'waiting':_0x121228[_0xbf66('0x59')]};_0x1e0650[_0xbf66('0x25')](_0x3e7ba5);}}_0x26bb25({'count':_0x1e0650[_0xbf66('0x1c')],'rows':_0x1e0650});});},'FaxQueues':function(){return new Promise(function(_0x574a41){var _0x23413c=[];for(var _0x414e0a in _0x15cd1e[_0xbf66('0x5d')]){if(_0x15cd1e[_0xbf66('0x5d')][_0xbf66('0x4e')](_0x414e0a)){var _0x724710=_0x15cd1e[_0xbf66('0x5d')][_0x414e0a];var _0x20c1a4={'id':_0x724710['id'],'available':_0x724710['available'],'loggedIn':_0x724710[_0xbf66('0x55')],'name':_0x724710[_0xbf66('0x5b')],'paused':_0x724710[_0xbf66('0x56')],'waiting':_0x724710[_0xbf66('0x59')]};_0x23413c[_0xbf66('0x25')](_0x20c1a4);}}_0x574a41({'count':_0x23413c['length'],'rows':_0x23413c});});},'WhatsappQueues':function(){return new Promise(function(_0x304c42){var _0x28a30a=[];for(var _0x3c301f in _0x15cd1e[_0xbf66('0x5e')]){if(_0x15cd1e['whatsappQueues']['hasOwnProperty'](_0x3c301f)){var _0x91d8dd=_0x15cd1e[_0xbf66('0x5e')][_0x3c301f];var _0x1e3db6={'id':_0x91d8dd['id'],'available':_0x91d8dd[_0xbf66('0x58')],'loggedIn':_0x91d8dd[_0xbf66('0x55')],'name':_0x91d8dd[_0xbf66('0x5b')],'paused':_0x91d8dd['paused'],'waiting':_0x91d8dd[_0xbf66('0x59')]};_0x28a30a[_0xbf66('0x25')](_0x1e3db6);}}_0x304c42({'count':_0x28a30a[_0xbf66('0x1c')],'rows':_0x28a30a});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x12a647){var _0x5b913c=_['values'](_0x15cd1e[_0xbf66('0x5f')]);_0x12a647({'count':_0x5b913c['length'],'rows':_0x5b913c});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x5bb684){var _0x277592=_[_0xbf66('0x60')](_0x15cd1e[_0xbf66('0x61')]);_0x5bb684({'count':_0x277592[_0xbf66('0x1c')],'rows':_0x277592});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x368d21){var _0x5815aa=_[_0xbf66('0x60')](_0x15cd1e['openchannelQueuesWaitingInteractions']);_0x368d21({'count':_0x5815aa[_0xbf66('0x1c')],'rows':_0x5815aa});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x29e9ac){var _0x507dda=_[_0xbf66('0x60')](_0x15cd1e[_0xbf66('0x62')]);_0x29e9ac({'count':_0x507dda[_0xbf66('0x1c')],'rows':_0x507dda});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x5ac5bc){var _0x962628=_[_0xbf66('0x60')](_0x15cd1e[_0xbf66('0x63')]);_0x5ac5bc({'count':_0x962628['length'],'rows':_0x962628});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x5fca78){var _0x24f4c9=_[_0xbf66('0x60')](_0x15cd1e[_0xbf66('0x64')]);_0x5fca78({'count':_0x24f4c9[_0xbf66('0x1c')],'rows':_0x24f4c9});});}};var _0x51c76a=jayson[_0xbf66('0x65')](_0x155197)[_0xbf66('0x66')]();_0x51c76a['on'](_0xbf66('0x42'),function(_0x22ce9d){logger[_0xbf66('0x42')](JSON[_0xbf66('0x67')](_0x22ce9d));return _0x3f7c1a(_0x22ce9d);});_0x51c76a[_0xbf66('0x14')](0x232c,'127.0.0.1',function(){console['log'](_0xbf66('0x68'),0x232c);return _0x7fc574(_0xbf66('0x69')+0x232c);});});};