d461662879a6c5a1f2b0a421657c58881e499026
[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 _0xbc95=['routing','../rpc/openchannelQueueReport','../rpc/faxQueueReport','../lib/rule-engine','format','%s.%s.%s','IntervalId','isNil','Intervals','map','interval','channel','message','interaction','transfer','applications','isArray','length','app','.js','toLowerCase','autoreply','appdata','mail','push','slice','join','dialogflowv2','amazonlex','tag','TagId','tvox','getMustacheRender','account','notificationTemplate','split','ContactId','./interval','condition','intervals','./applications/','consequence','priority','Push\x20new\x20rule','\x20|\x20','Please\x20create\x20a\x20new\x20file\x20under','rules','info','stringify','matchPath','emit','complete','No\x20applications\x20to\x20execute','error','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','end','QueueReport','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','capacity','hasOwnProperty','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','listen','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird'];(function(_0x4044c2,_0x2f2ad6){var _0x15b5fb=function(_0x3f2c5f){while(--_0x3f2c5f){_0x4044c2['push'](_0x4044c2['shift']());}};_0x15b5fb(++_0x2f2ad6);}(_0xbc95,0x1f4));var _0x5bc9=function(_0x1d4bdb,_0x58f77b){_0x1d4bdb=_0x1d4bdb-0x0;var _0x288bea=_0xbc95[_0x1d4bdb];return _0x288bea;};'use strict';var _=require(_0x5bc9('0x0'));var util=require(_0x5bc9('0x1'));var path=require(_0x5bc9('0x2'));var fs=require('fs');var jayson=require(_0x5bc9('0x3'));var BPromise=require(_0x5bc9('0x4'));var utils=require('./applications/utils');var sUtils=require('./applications/strategy/util');var logger=require('../../../config/logger')(_0x5bc9('0x5'));var rpc={'openchannelQueueReport':require(_0x5bc9('0x6')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require('../rpc/smsQueueReport'),'faxQueueReport':require(_0x5bc9('0x7')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x5bc9('0x8'));function getId(_0x4bdc20,_0x49ab1a,_0x6cc9f1){return util[_0x5bc9('0x9')](_0x5bc9('0xa'),_0x4bdc20,_0x49ab1a||0x0,_0x6cc9f1||0x0);}function getIntervals(_0x357d27,_0x24d4b3){var _0x2caa35=[];if(!_['isNil'](_0x24d4b3[_0x5bc9('0xb')])&&!_['isNil'](_0x357d27[_0x24d4b3['IntervalId']])&&!_[_0x5bc9('0xc')](_0x357d27[_0x24d4b3['IntervalId']][_0x5bc9('0xd')])){_0x2caa35=_[_0x5bc9('0xe')](_0x357d27[_0x24d4b3[_0x5bc9('0xb')]][_0x5bc9('0xd')],_0x5bc9('0xf'));}else if(!_['isNil'](_0x24d4b3[_0x5bc9('0xf')])){_0x2caa35=[_0x24d4b3[_0x5bc9('0xf')]];}return _0x2caa35;}exports['listen']=function(_0x1e345a){_0x1e345a['rules']={};return new BPromise(function(_0x48a2c2,_0x767740){var _0x11341a={'Start':function(_0x298800){var _0x16cf5f=this;return new Promise(function(_0x443185,_0x33053f){if(_0x298800){try{var _0x5db036=[];var _0x49e2a2=getId(_0x298800[_0x5bc9('0x10')],_0x298800[_0x5bc9('0x11')]?_0x298800['message']['id']:0x0,_0x298800[_0x5bc9('0x12')]?_0x298800[_0x5bc9('0x12')]['id']:0x0);var _0x20e02d=sUtils['checkWaitingNotifications'](_0x1e345a,_0x298800);if(_0x298800[_0x5bc9('0x13')]||!_0x20e02d&&_0x298800[_0x5bc9('0x14')]&&_[_0x5bc9('0x15')](_0x298800['applications'])&&_0x298800[_0x5bc9('0x14')]['length']){for(var _0x102ab2=0x0;_0x102ab2<_0x298800[_0x5bc9('0x14')][_0x5bc9('0x16')];_0x102ab2+=0x1){var _0x242bb4=_0x298800[_0x5bc9('0x14')][_0x102ab2];if(fs['existsSync'](path['join'](__dirname,_0x5bc9('0x14'),_0x242bb4[_0x5bc9('0x17')]+_0x5bc9('0x18')))){var _0x4433ab=[];switch(_0x242bb4[_0x5bc9('0x17')][_0x5bc9('0x19')]()){case _0x5bc9('0x1a'):var _0x37f3aa=_0x242bb4[_0x5bc9('0x1b')]['split'](',');if(_0x298800[_0x5bc9('0x10')]===_0x5bc9('0x1c')){_0x4433ab[_0x5bc9('0x1d')](_0x37f3aa[0x0]);_0x4433ab[_0x5bc9('0x1d')](_0x37f3aa[0x1]);_0x4433ab['push'](_0x37f3aa[_0x5bc9('0x1e')](0x2,_0x37f3aa['length'])[_0x5bc9('0x1f')](','));}else{_0x4433ab[_0x5bc9('0x1d')](_0x37f3aa[0x0]);_0x4433ab[_0x5bc9('0x1d')](_0x37f3aa[_0x5bc9('0x1e')](0x1,_0x37f3aa['length'])[_0x5bc9('0x1f')](','));}break;case'dialogflow':var _0x4cb942=_0x242bb4[_0x5bc9('0x1b')]['split'](',');_0x4433ab[_0x5bc9('0x1d')](_0x4cb942[0x0]);_0x4433ab['push'](_0x4cb942[0x1]);_0x4433ab['push'](_0x4cb942[_0x5bc9('0x1e')](0x2,_0x4cb942[_0x5bc9('0x16')])[_0x5bc9('0x1f')](','));break;case _0x5bc9('0x20'):var _0x2ff10a=_0x242bb4[_0x5bc9('0x1b')]['split'](',');_0x4433ab['push'](_0x2ff10a[0x0]);_0x4433ab['push'](_0x2ff10a[0x1]);_0x4433ab['push'](_0x2ff10a[0x2]);_0x4433ab[_0x5bc9('0x1d')](_0x2ff10a[0x3]);_0x4433ab[_0x5bc9('0x1d')](_0x2ff10a[_0x5bc9('0x1e')](0x4,_0x2ff10a[_0x5bc9('0x16')])[_0x5bc9('0x1f')](','));break;case _0x5bc9('0x21'):var _0x73a4d2=_0x242bb4[_0x5bc9('0x1b')]['split'](',');_0x4433ab[_0x5bc9('0x1d')](_0x73a4d2[0x0]);_0x4433ab['push'](_0x73a4d2[0x1]);_0x4433ab['push'](_0x73a4d2[0x2]);_0x4433ab[_0x5bc9('0x1d')](_0x73a4d2[0x3]);_0x4433ab[_0x5bc9('0x1d')](_0x73a4d2[_0x5bc9('0x1e')](0x4,_0x73a4d2['length'])['join'](','));break;case'message':_0x4433ab[_0x5bc9('0x1d')](_0x242bb4[_0x5bc9('0x1b')]);break;case _0x5bc9('0x22'):_0x4433ab[_0x5bc9('0x1d')](_0x242bb4[_0x5bc9('0x23')]);_0x4433ab[_0x5bc9('0x1d')](_0x242bb4[_0x5bc9('0x1b')]);break;case _0x5bc9('0x24'):var _0x4fda67=utils[_0x5bc9('0x25')](_0x298800[_0x5bc9('0x26')][_0x5bc9('0x27')],_0x298800);var _0x43f827=_0x242bb4[_0x5bc9('0x1b')][_0x5bc9('0x28')](',');_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x0]);_0x4433ab['push'](_0x43f827[0x1]);_0x4433ab['push'](_0x43f827[0x2]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x3]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x4]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x5]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x6]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x7]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x8]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0x9]);_0x4433ab[_0x5bc9('0x1d')](_0x43f827[0xa]);_0x4433ab[_0x5bc9('0x1d')](_0x298800['interaction']['id']);_0x4433ab[_0x5bc9('0x1d')](_0x298800[_0x5bc9('0x11')]['id']);_0x4433ab[_0x5bc9('0x1d')](_0x242bb4['ChatWebsiteId']);_0x4433ab['push'](_0x298800[_0x5bc9('0x12')][_0x5bc9('0x29')]);_0x4433ab[_0x5bc9('0x1d')](_0x298800['body']['body']);_0x4433ab[_0x5bc9('0x1d')](_0x4fda67);break;default:_0x4433ab=_['isNil'](_0x242bb4[_0x5bc9('0x1b')])?[]:_0x242bb4[_0x5bc9('0x1b')]['split'](',');}var _0x22a736={'id':util[_0x5bc9('0x9')]('%s:%s:%s',_0x49e2a2,_0x242bb4['id'],_0x242bb4['app']),'condition':require(_0x5bc9('0x2a'))[_0x5bc9('0x2b')](_0x49e2a2,getIntervals(_0x1e345a[_0x5bc9('0x2c')],_0x242bb4),_0x1e345a),'consequence':require(_0x5bc9('0x2d')+_0x242bb4[_0x5bc9('0x17')])[_0x5bc9('0x2e')](_0x49e2a2,_0x4433ab,_0x1e345a,_0x298800),'p':_0x242bb4[_0x5bc9('0x2f')]||0x0};logger['info'](_0x5bc9('0x30'),_0x22a736['id'],'on\x20interval',getIntervals(_0x1e345a[_0x5bc9('0x2c')],_0x242bb4)['join'](_0x5bc9('0x31')));_0x5db036['push'](_0x22a736);}else{logger['error'](_0x5bc9('0x32'),path['join'](__dirname,_0x5bc9('0x14'),_0x242bb4[_0x5bc9('0x17')]+'.js'));}}_0x1e345a[_0x5bc9('0x33')][_0x49e2a2]=new RuleEngine(_0x5db036);_0x1e345a[_0x5bc9('0x33')][_0x49e2a2]['execute'](_0x298800,function(_0x315fea){logger[_0x5bc9('0x34')]('Applications\x20executed',JSON[_0x5bc9('0x35')](_0x315fea[_0x5bc9('0x36')]));if(_0x1e345a[_0x5bc9('0x33')][_0x49e2a2]){_0x1e345a[_0x5bc9('0x33')][_0x49e2a2][_0x5bc9('0x37')](_0x5bc9('0x38'));}});return _0x443185({'code':0xc8,'message':_0x298800});}else{if(_0x20e02d){logger[_0x5bc9('0x34')](util[_0x5bc9('0x9')]('Skipped\x20routing\x20for\x20%s',_0x49e2a2));}else{logger[_0x5bc9('0x34')](_0x5bc9('0x39'));}return _0x443185({'code':0xc8,'message':_0x298800});}}catch(_0x29f69c){logger[_0x5bc9('0x3a')](_0x29f69c[_0x5bc9('0x3b')]);return _0x33053f(_0x16cf5f[_0x5bc9('0x3a')](0x1f4,_0x29f69c));}}return _0x33053f(_0x5bc9('0x3c'));});},'AcceptMessage':function(_0x395940){var _0x2c767f=this;return new Promise(function(_0x590a66,_0x2be96b){if(_0x395940[_0x5bc9('0x3d')]&&_0x395940[_0x5bc9('0x3d')]['id']){if(_0x1e345a[_0x5bc9('0x3e')][_0x395940['agent']['id']]){_0x1e345a[_0x5bc9('0x3e')][_0x395940[_0x5bc9('0x3d')]['id']][_0x5bc9('0x3f')]=![];_0x1e345a[_0x5bc9('0x3e')][_0x395940[_0x5bc9('0x3d')]['id']][_0x5bc9('0x40')]=undefined;}}if(_0x395940['message']&&_0x395940[_0x5bc9('0x11')]['id']){try{var _0xd90ff9=getId(_0x395940['channel'],_0x395940['message']?_0x395940[_0x5bc9('0x11')]['id']:0x0,_0x395940[_0x5bc9('0x12')]?_0x395940['interaction']['id']:0x0);if(_0x1e345a[_0x5bc9('0x33')][_0xd90ff9]){_0x1e345a[_0x5bc9('0x33')][_0xd90ff9][_0x5bc9('0x37')](_0x5bc9('0x41'));if(rpc[_0x395940[_0x5bc9('0x10')]+_0x5bc9('0x42')]){rpc[_0x395940[_0x5bc9('0x10')]+'QueueReport']['update'](_0xd90ff9,{'UserId':_0x395940[_0x5bc9('0x11')][_0x5bc9('0x43')]})[_0x5bc9('0x44')](function(){logger[_0x5bc9('0x3a')](_0x5bc9('0x45'));});}}return _0x590a66({'code':0xc8,'message':_0x395940});}catch(_0x32bb65){logger['error'](_0x32bb65['stack']);return _0x2be96b(_0x2c767f['error'](0x1f4,_0x32bb65));}}logger[_0x5bc9('0x3a')](_0x5bc9('0x46'));return _0x2be96b(_0x2c767f['error'](0x1f4,_0x5bc9('0x46')));});},'RejectMessage':function(_0x2636fc){var _0x410995=this;return new Promise(function(_0x341d2b,_0x3f9067){if(_0x2636fc[_0x5bc9('0x3d')]&&_0x2636fc[_0x5bc9('0x3d')]['id']){try{if(_0x1e345a[_0x5bc9('0x3e')][_0x2636fc[_0x5bc9('0x3d')]['id']]){_0x1e345a[_0x5bc9('0x3e')][_0x2636fc[_0x5bc9('0x3d')]['id']][_0x5bc9('0x3f')]=![];_0x1e345a[_0x5bc9('0x3e')][_0x2636fc['agent']['id']][_0x5bc9('0x40')]=undefined;}return _0x341d2b({'code':0xc8,'message':_0x2636fc});}catch(_0x568577){logger['error'](_0x568577['stack']);return _0x3f9067(_0x410995[_0x5bc9('0x3a')](0x1f4,_0x568577));}}logger['error'](_0x5bc9('0x46'));return _0x3f9067(_0x410995[_0x5bc9('0x3a')](0x1f4,_0x5bc9('0x46')));});},'AbandonInteraction':function(_0x2ec2b6){var _0x3863c0=this;return new Promise(function(_0x907ff,_0x57cba7){if(_0x2ec2b6[_0x5bc9('0x10')]&&_0x2ec2b6[_0x5bc9('0x12')]&&_0x2ec2b6[_0x5bc9('0x12')]['id']){try{var _0x28fe28=getId(_0x2ec2b6[_0x5bc9('0x10')],_0x2ec2b6[_0x5bc9('0x11')]?_0x2ec2b6[_0x5bc9('0x11')]['id']:0x0,_0x2ec2b6[_0x5bc9('0x12')]?_0x2ec2b6[_0x5bc9('0x12')]['id']:0x0);if(_0x1e345a[_0x5bc9('0x33')][_0x28fe28]){_0x1e345a[_0x5bc9('0x33')][_0x28fe28][_0x5bc9('0x37')](_0x5bc9('0x41'));}return _0x907ff({'code':0xc8,'message':_0x2ec2b6});}catch(_0x158643){logger[_0x5bc9('0x3a')](_0x158643[_0x5bc9('0x3b')]);return _0x57cba7(_0x3863c0[_0x5bc9('0x3a')](0x1f4,_0x158643));}}logger['error']('message\x20is\x20empty');return _0x57cba7(_0x3863c0[_0x5bc9('0x3a')](0x1f4,_0x5bc9('0x46')));});},'AgentCapacity':function(_0x334119){var _0x4fa74d=this;return new Promise(function(_0x1b4e32,_0x4c4bbb){if(_0x1e345a['agents']['hasOwnProperty'](_0x334119['id'])){for(var _0x2d96d0 in _0x334119[_0x5bc9('0x47')]){if(_0x334119[_0x5bc9('0x47')][_0x5bc9('0x48')](_0x2d96d0)){if(_0x1e345a['agents'][_0x334119['id']][_0x5bc9('0x48')](_0x2d96d0+'CurrentCapacity')){_0x1e345a[_0x5bc9('0x3e')][_0x334119['id']][_0x2d96d0+_0x5bc9('0x49')]=parseInt(_0x334119['capacity'][_0x2d96d0],0xa);}}}_0x1e345a[_0x5bc9('0x3e')][_0x334119['id']][_0x5bc9('0x4a')]();return _0x1b4e32({'code':0xc8,'message':_0x1e345a['agents'][_0x334119['id']]});}else{return _0x4c4bbb(_0x4fa74d['error'](0x1f4,_0x5bc9('0x4b')));}});},'Agents':function(_0xb3ab0a){return new Promise(function(_0x35cc49){var _0x221efd=_[_0x5bc9('0x4c')](_0x1e345a[_0x5bc9('0x3e')]);if(_0xb3ab0a&&_0xb3ab0a['id']){var _0x4ae73d=_[_0x5bc9('0x4d')](_0x221efd,function(_0x47edab){return _0x47edab['id']===_0xb3ab0a['id'];});_0x35cc49(_0x4ae73d);}else{_0x35cc49({'count':_0x221efd['length'],'rows':_0x221efd});}});},'ChatQueues':function(){return new Promise(function(_0x542834){var _0x1c20ed=[];for(var _0x23b711 in _0x1e345a[_0x5bc9('0x4e')]){if(_0x1e345a['chatQueues']['hasOwnProperty'](_0x23b711)){var _0x2b17b5=_0x1e345a[_0x5bc9('0x4e')][_0x23b711];var _0x542aa9={'id':_0x2b17b5['id'],'available':_0x2b17b5[_0x5bc9('0x4f')],'loggedIn':_0x2b17b5[_0x5bc9('0x50')],'name':_0x2b17b5[_0x5bc9('0x51')],'paused':_0x2b17b5[_0x5bc9('0x52')],'waiting':_0x2b17b5[_0x5bc9('0x53')]};_0x1c20ed[_0x5bc9('0x1d')](_0x542aa9);}}_0x542834({'count':_0x1c20ed[_0x5bc9('0x16')],'rows':_0x1c20ed});});},'MailQueues':function(){return new Promise(function(_0x447e80){var _0x2328e3=[];for(var _0x3d5d27 in _0x1e345a[_0x5bc9('0x54')]){if(_0x1e345a[_0x5bc9('0x54')][_0x5bc9('0x48')](_0x3d5d27)){var _0x5f20e5=_0x1e345a['mailQueues'][_0x3d5d27];var _0x635317={'id':_0x5f20e5['id'],'available':_0x5f20e5[_0x5bc9('0x4f')],'loggedIn':_0x5f20e5[_0x5bc9('0x50')],'name':_0x5f20e5['name'],'paused':_0x5f20e5[_0x5bc9('0x52')],'waiting':_0x5f20e5[_0x5bc9('0x53')]};_0x2328e3[_0x5bc9('0x1d')](_0x635317);}}_0x447e80({'count':_0x2328e3[_0x5bc9('0x16')],'rows':_0x2328e3});});},'OpenchannelQueues':function(){return new Promise(function(_0x5739a3){var _0x1234ca=[];for(var _0x5a7930 in _0x1e345a['openchannelQueues']){if(_0x1e345a[_0x5bc9('0x55')][_0x5bc9('0x48')](_0x5a7930)){var _0x3b1d25=_0x1e345a['openchannelQueues'][_0x5a7930];var _0x55e667={'id':_0x3b1d25['id'],'available':_0x3b1d25['available'],'loggedIn':_0x3b1d25[_0x5bc9('0x50')],'name':_0x3b1d25['name'],'paused':_0x3b1d25[_0x5bc9('0x52')],'waiting':_0x3b1d25[_0x5bc9('0x53')]};_0x1234ca['push'](_0x55e667);}}_0x5739a3({'count':_0x1234ca[_0x5bc9('0x16')],'rows':_0x1234ca});});},'SmsQueues':function(){return new Promise(function(_0x965d1){var _0x5210df=[];for(var _0x4b0ff0 in _0x1e345a[_0x5bc9('0x56')]){if(_0x1e345a[_0x5bc9('0x56')][_0x5bc9('0x48')](_0x4b0ff0)){var _0x256fb1=_0x1e345a['smsQueues'][_0x4b0ff0];var _0x3593d0={'id':_0x256fb1['id'],'available':_0x256fb1[_0x5bc9('0x4f')],'loggedIn':_0x256fb1[_0x5bc9('0x50')],'name':_0x256fb1[_0x5bc9('0x51')],'paused':_0x256fb1[_0x5bc9('0x52')],'waiting':_0x256fb1[_0x5bc9('0x53')]};_0x5210df[_0x5bc9('0x1d')](_0x3593d0);}}_0x965d1({'count':_0x5210df[_0x5bc9('0x16')],'rows':_0x5210df});});},'FaxQueues':function(){return new Promise(function(_0x1cc032){var _0x2ceae8=[];for(var _0x3bc38b in _0x1e345a['faxQueues']){if(_0x1e345a['faxQueues'][_0x5bc9('0x48')](_0x3bc38b)){var _0x1e4a93=_0x1e345a[_0x5bc9('0x57')][_0x3bc38b];var _0x1c153e={'id':_0x1e4a93['id'],'available':_0x1e4a93[_0x5bc9('0x4f')],'loggedIn':_0x1e4a93['loggedIn'],'name':_0x1e4a93[_0x5bc9('0x51')],'paused':_0x1e4a93['paused'],'waiting':_0x1e4a93[_0x5bc9('0x53')]};_0x2ceae8[_0x5bc9('0x1d')](_0x1c153e);}}_0x1cc032({'count':_0x2ceae8[_0x5bc9('0x16')],'rows':_0x2ceae8});});},'WhatsappQueues':function(){return new Promise(function(_0x233378){var _0x35955d=[];for(var _0xda6b15 in _0x1e345a[_0x5bc9('0x58')]){if(_0x1e345a[_0x5bc9('0x58')][_0x5bc9('0x48')](_0xda6b15)){var _0x3381a0=_0x1e345a['whatsappQueues'][_0xda6b15];var _0x5d1a91={'id':_0x3381a0['id'],'available':_0x3381a0[_0x5bc9('0x4f')],'loggedIn':_0x3381a0[_0x5bc9('0x50')],'name':_0x3381a0[_0x5bc9('0x51')],'paused':_0x3381a0[_0x5bc9('0x52')],'waiting':_0x3381a0[_0x5bc9('0x53')]};_0x35955d[_0x5bc9('0x1d')](_0x5d1a91);}}_0x233378({'count':_0x35955d[_0x5bc9('0x16')],'rows':_0x35955d});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x3f47c5){var _0x211812=_['values'](_0x1e345a[_0x5bc9('0x59')]);_0x3f47c5({'count':_0x211812[_0x5bc9('0x16')],'rows':_0x211812});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x4e7286){var _0xa7acbf=_[_0x5bc9('0x4c')](_0x1e345a[_0x5bc9('0x5a')]);_0x4e7286({'count':_0xa7acbf[_0x5bc9('0x16')],'rows':_0xa7acbf});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x2416b4){var _0x4b1b63=_['values'](_0x1e345a[_0x5bc9('0x5b')]);_0x2416b4({'count':_0x4b1b63[_0x5bc9('0x16')],'rows':_0x4b1b63});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0xa67332){var _0x572d64=_[_0x5bc9('0x4c')](_0x1e345a['smsQueuesWaitingInteractions']);_0xa67332({'count':_0x572d64[_0x5bc9('0x16')],'rows':_0x572d64});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0xf2c589){var _0x514d57=_['values'](_0x1e345a[_0x5bc9('0x5c')]);_0xf2c589({'count':_0x514d57[_0x5bc9('0x16')],'rows':_0x514d57});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x4cce77){var _0x2ef48f=_['values'](_0x1e345a[_0x5bc9('0x5d')]);_0x4cce77({'count':_0x2ef48f['length'],'rows':_0x2ef48f});});}};var _0x275ab7=jayson[_0x5bc9('0x5e')](_0x11341a)[_0x5bc9('0x5f')]();_0x275ab7['on'](_0x5bc9('0x3a'),function(_0x4fe72c){logger[_0x5bc9('0x3a')](JSON[_0x5bc9('0x35')](_0x4fe72c));return _0x767740(_0x4fe72c);});_0x275ab7[_0x5bc9('0x60')](0x232c,_0x5bc9('0x61'),function(){console[_0x5bc9('0x62')](_0x5bc9('0x63'),0x232c);return _0x48a2c2(_0x5bc9('0x64')+0x232c);});});};