Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 17b31e8..f595faf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4fc2=['request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','create','body','options','raw','CreateCmHopperHistory','AvgHandleTime','CmHopperHistory','findAll','where','sequelize','col','predictiveIntervalTotalCalls','COUNT','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','name','`state`\x20=\x200,\x201,\x20null','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundReCallsDay','campaign','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','info','CmHopperHistory,\x20%s,\x20%s'];(function(_0x318696,_0x5069a5){var _0x16ef65=function(_0xbfa794){while(--_0xbfa794){_0x318696['push'](_0x318696['shift']());}};_0x16ef65(++_0x5069a5);}(_0x4fc2,0x111));var _0x24fc=function(_0x129253,_0x58e440){_0x129253=_0x129253-0x0;var _0x2e8565=_0x4fc2[_0x129253];return _0x2e8565;};'use strict';var _=require(_0x24fc('0x0'));var util=require(_0x24fc('0x1'));var moment=require(_0x24fc('0x2'));var BPromise=require(_0x24fc('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x24fc('0x4'));var db=require(_0x24fc('0x5'))['db'];var utils=require(_0x24fc('0x6'));var logger=require('../../config/logger')(_0x24fc('0x7'));var config=require(_0x24fc('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x24fc('0x9')][_0x24fc('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4889f4,_0x115851,_0x22a0c8){return new BPromise(function(_0x220f9a,_0x123eff){return client[_0x24fc('0xb')](_0x4889f4,_0x22a0c8)[_0x24fc('0xc')](function(_0x5afdf1){logger[_0x24fc('0xd')](_0x24fc('0xe'),_0x115851,_0x24fc('0xf'));logger[_0x24fc('0x10')](_0x24fc('0x11'),_0x115851,_0x24fc('0xf'),JSON[_0x24fc('0x12')](_0x5afdf1));if(_0x5afdf1[_0x24fc('0x13')]){if(_0x5afdf1['error'][_0x24fc('0x14')]===0x1f4){logger[_0x24fc('0x13')]('CmHopperHistory,\x20%s,\x20%s',_0x115851,_0x5afdf1[_0x24fc('0x13')][_0x24fc('0x15')]);return _0x123eff(_0x5afdf1[_0x24fc('0x13')][_0x24fc('0x15')]);}logger[_0x24fc('0x13')](_0x24fc('0xe'),_0x115851,_0x5afdf1['error'][_0x24fc('0x15')]);return _0x220f9a(_0x5afdf1[_0x24fc('0x13')][_0x24fc('0x15')]);}else{logger[_0x24fc('0xd')]('CmHopperHistory,\x20%s,\x20%s',_0x115851,_0x24fc('0xf'));_0x220f9a(_0x5afdf1['result'][_0x24fc('0x15')]);}})[_0x24fc('0x16')](function(_0x218fb6){logger[_0x24fc('0x13')](_0x24fc('0xe'),_0x115851,_0x218fb6);_0x123eff(_0x218fb6);});});}exports['CreateCmHopperHistory']=function(_0x23873c){var _0x1cb3d0=this;return new Promise(function(_0x6cfa0a,_0x8ac114){return db['CmHopperHistory'][_0x24fc('0x17')](_0x23873c[_0x24fc('0x18')],{'raw':_0x23873c[_0x24fc('0x19')]?_0x23873c['options'][_0x24fc('0x1a')]===undefined?!![]:![]:!![]})[_0x24fc('0xc')](function(_0xbf1d6b){logger[_0x24fc('0xd')]('CreateCmHopperHistory',_0x23873c);logger[_0x24fc('0x10')]('CreateCmHopperHistory',_0x23873c,JSON[_0x24fc('0x12')](_0xbf1d6b));_0x6cfa0a(_0xbf1d6b);})['catch'](function(_0x3ed464){logger[_0x24fc('0x13')](_0x24fc('0x1b'),_0x3ed464['message'],_0x23873c);_0x8ac114(_0x1cb3d0[_0x24fc('0x13')](0x1f4,_0x3ed464['message']));});});};exports[_0x24fc('0x1c')]=function(_0x2bb93a){var _0x36a9b4=this;return new Promise(function(_0x34b5b2,_0x3296fc){return db[_0x24fc('0x1d')][_0x24fc('0x1e')]({'raw':_0x2bb93a[_0x24fc('0x19')]?_0x2bb93a[_0x24fc('0x19')][_0x24fc('0x1a')]===undefined?!![]:![]:!![],'where':_0x2bb93a['options']?_0x2bb93a[_0x24fc('0x19')][_0x24fc('0x1f')]||null:null,'attributes':[[db[_0x24fc('0x20')]['fn']('COUNT',db[_0x24fc('0x20')][_0x24fc('0x21')]('id')),_0x24fc('0x22')],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db['sequelize'][_0x24fc('0x24')](_0x24fc('0x25')))),_0x24fc('0x26')],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db['sequelize']['fn']('IF',db['sequelize']['literal'](_0x24fc('0x27')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')]['literal'](_0x24fc('0x28')))),_0x24fc('0x29')],[db['sequelize']['fn'](_0x24fc('0x2a'),db[_0x24fc('0x20')]['fn']('IF',db['sequelize']['literal'](_0x24fc('0x2b')))),'predictiveIntervalAvgHoldtime'],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x2a'),db['sequelize']['fn']('IF',db[_0x24fc('0x20')][_0x24fc('0x24')](_0x24fc('0x2c')))),_0x24fc('0x2d')]]})[_0x24fc('0xc')](function(_0x1e205d){logger[_0x24fc('0xd')](_0x24fc('0x1c'),_0x2bb93a);logger[_0x24fc('0x10')]('AvgHandleTime',_0x2bb93a,JSON[_0x24fc('0x12')](_0x1e205d));_0x34b5b2(_0x1e205d);})[_0x24fc('0x16')](function(_0x2fbe30){logger[_0x24fc('0x13')](_0x24fc('0x1c'),_0x2fbe30['message'],_0x2bb93a);_0x3296fc(_0x36a9b4['error'](0x1f4,_0x2fbe30[_0x24fc('0x15')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x22ef18){var _0x38798d=this;return new Promise(function(_0x10399f,_0x41b408){return db['CmHopperHistory'][_0x24fc('0x1e')]({'raw':_0x22ef18['options']?_0x22ef18[_0x24fc('0x19')][_0x24fc('0x1a')]===undefined?!![]:![]:!![],'where':_0x22ef18[_0x24fc('0x19')]?_0x22ef18[_0x24fc('0x19')][_0x24fc('0x1f')]||null:null,'attributes':[['campaign',_0x24fc('0x2e')],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db['sequelize'][_0x24fc('0x24')](_0x24fc('0x2f')))),'outboundNoSuchCallsDay'],[db[_0x24fc('0x20')]['fn']('COUNT',db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')][_0x24fc('0x24')](_0x24fc('0x30')))),_0x24fc('0x31')],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db['sequelize'][_0x24fc('0x24')](_0x24fc('0x25')))),_0x24fc('0x32')],[db['sequelize']['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db['sequelize'][_0x24fc('0x24')](_0x24fc('0x33')))),_0x24fc('0x34')],[db['sequelize']['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db['sequelize'][_0x24fc('0x24')](_0x24fc('0x35')))),_0x24fc('0x36')],[db[_0x24fc('0x20')]['fn']('COUNT',db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')][_0x24fc('0x24')](_0x24fc('0x37')))),_0x24fc('0x38')],[db['sequelize']['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')][_0x24fc('0x24')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x24fc('0x39')],[db[_0x24fc('0x20')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x24fc('0x20')]['literal']('`state`\x20=\x2012,\x201,\x20null'))),_0x24fc('0x3a')],[db['sequelize']['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')]['literal'](_0x24fc('0x3b')))),_0x24fc('0x3c')],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')][_0x24fc('0x24')](_0x24fc('0x3d')))),'outboundOriginateFailureCallsDay'],[db['sequelize']['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')]['literal']('`state`\x20=\x2018,\x201,\x20null'))),_0x24fc('0x3e')],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')][_0x24fc('0x24')](_0x24fc('0x3f')))),_0x24fc('0x40')],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db[_0x24fc('0x20')]['literal'](_0x24fc('0x41')))),_0x24fc('0x3e')],[db[_0x24fc('0x20')]['fn'](_0x24fc('0x23'),db[_0x24fc('0x20')]['fn']('IF',db['sequelize'][_0x24fc('0x24')]('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),_0x24fc('0x42')]],'group':[_0x24fc('0x43')]})[_0x24fc('0xc')](function(_0x41ddfb){logger[_0x24fc('0xd')](_0x24fc('0x44'),_0x22ef18);logger['debug'](_0x24fc('0x44'),_0x22ef18,JSON[_0x24fc('0x12')](_0x41ddfb));_0x10399f(_0x41ddfb);})[_0x24fc('0x16')](function(_0x31a2ef){logger[_0x24fc('0x13')](_0x24fc('0x44'),_0x31a2ef['message'],_0x22ef18);_0x41b408(_0x38798d[_0x24fc('0x13')](0x1f4,_0x31a2ef[_0x24fc('0x15')]));});});};exports[_0x24fc('0x45')]=function(_0x1b69ad){var _0x3e739d=this;return new Promise(function(_0x385968,_0x1ffd5b){return db['CmHopperHistory'][_0x24fc('0x1e')]({'raw':_0x1b69ad[_0x24fc('0x19')]?_0x1b69ad['options'][_0x24fc('0x1a')]===undefined?!![]:![]:!![],'where':_0x1b69ad[_0x24fc('0x19')]?_0x1b69ad[_0x24fc('0x19')][_0x24fc('0x1f')]||null:null,'attributes':[[_0x24fc('0x43'),_0x24fc('0x2e')],[db['sequelize']['fn'](_0x24fc('0x23'),db['sequelize'][_0x24fc('0x21')]('id')),_0x24fc('0x46')],[db['sequelize']['fn'](_0x24fc('0x23'),db['sequelize']['fn']('IF',db[_0x24fc('0x20')]['literal'](_0x24fc('0x25')))),_0x24fc('0x47')]],'group':['campaign']})[_0x24fc('0xc')](function(_0x5d6539){logger[_0x24fc('0xd')](_0x24fc('0x45'),_0x1b69ad);logger['debug'](_0x24fc('0x45'),_0x1b69ad,JSON[_0x24fc('0x12')](_0x5d6539));_0x385968(_0x5d6539);})[_0x24fc('0x16')](function(_0x47179d){logger[_0x24fc('0x13')]('GetCampaignHopperHistory',_0x47179d[_0x24fc('0x15')],_0x1b69ad);_0x1ffd5b(_0x3e739d[_0x24fc('0x13')](0x1f4,_0x47179d[_0x24fc('0x15')]));});});};
\ No newline at end of file
+var _0x6cb4=['../../config/environment','client','request','info','request\x20sent','debug','stringify','error','CmHopperHistory,\x20%s,\x20%s','message','result','catch','CmHopperHistory','create','body','options','raw','then','CreateCmHopperHistory','AvgHandleTime','findAll','COUNT','sequelize','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','AVG','predictiveIntervalAvgTalktime','GetVoiceQueueHopperHistory','campaign','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','GetCampaignHopperHistory','where','name','ivrTotalCallsDays','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x1347f8,_0x233feb){var _0x218368=function(_0x3f4ca3){while(--_0x3f4ca3){_0x1347f8['push'](_0x1347f8['shift']());}};_0x218368(++_0x233feb);}(_0x6cb4,0xff));var _0x46cb=function(_0x33a949,_0x2e2458){_0x33a949=_0x33a949-0x0;var _0x2056ed=_0x6cb4[_0x33a949];return _0x2056ed;};'use strict';var _=require(_0x46cb('0x0'));var util=require(_0x46cb('0x1'));var moment=require(_0x46cb('0x2'));var BPromise=require(_0x46cb('0x3'));var rs=require(_0x46cb('0x4'));var fs=require('fs');var Redis=require(_0x46cb('0x5'));var db=require(_0x46cb('0x6'))['db'];var utils=require(_0x46cb('0x7'));var logger=require(_0x46cb('0x8'))('rpc');var config=require(_0x46cb('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x46cb('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x11262d,_0x148d0f,_0x31b35b){return new BPromise(function(_0x2d6c29,_0x24b4f5){return client[_0x46cb('0xb')](_0x11262d,_0x31b35b)['then'](function(_0x3d7663){logger[_0x46cb('0xc')]('CmHopperHistory,\x20%s,\x20%s',_0x148d0f,_0x46cb('0xd'));logger[_0x46cb('0xe')]('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x148d0f,_0x46cb('0xd'),JSON[_0x46cb('0xf')](_0x3d7663));if(_0x3d7663['error']){if(_0x3d7663['error']['code']===0x1f4){logger[_0x46cb('0x10')](_0x46cb('0x11'),_0x148d0f,_0x3d7663[_0x46cb('0x10')][_0x46cb('0x12')]);return _0x24b4f5(_0x3d7663['error'][_0x46cb('0x12')]);}logger[_0x46cb('0x10')](_0x46cb('0x11'),_0x148d0f,_0x3d7663[_0x46cb('0x10')][_0x46cb('0x12')]);return _0x2d6c29(_0x3d7663[_0x46cb('0x10')][_0x46cb('0x12')]);}else{logger[_0x46cb('0xc')](_0x46cb('0x11'),_0x148d0f,_0x46cb('0xd'));_0x2d6c29(_0x3d7663[_0x46cb('0x13')]['message']);}})[_0x46cb('0x14')](function(_0x5796d2){logger[_0x46cb('0x10')]('CmHopperHistory,\x20%s,\x20%s',_0x148d0f,_0x5796d2);_0x24b4f5(_0x5796d2);});});}exports['CreateCmHopperHistory']=function(_0x4e3454){var _0x1b6646=this;return new Promise(function(_0x1f2891,_0x4df1f0){return db[_0x46cb('0x15')][_0x46cb('0x16')](_0x4e3454[_0x46cb('0x17')],{'raw':_0x4e3454[_0x46cb('0x18')]?_0x4e3454[_0x46cb('0x18')][_0x46cb('0x19')]===undefined?!![]:![]:!![]})[_0x46cb('0x1a')](function(_0x149483){logger[_0x46cb('0xc')](_0x46cb('0x1b'),_0x4e3454);logger[_0x46cb('0xe')](_0x46cb('0x1b'),_0x4e3454,JSON[_0x46cb('0xf')](_0x149483));_0x1f2891(_0x149483);})[_0x46cb('0x14')](function(_0x1fb467){logger[_0x46cb('0x10')](_0x46cb('0x1b'),_0x1fb467[_0x46cb('0x12')],_0x4e3454);_0x4df1f0(_0x1b6646[_0x46cb('0x10')](0x1f4,_0x1fb467[_0x46cb('0x12')]));});});};exports[_0x46cb('0x1c')]=function(_0x40e0e5){var _0x5a1338=this;return new Promise(function(_0x4d663e,_0x6588f3){return db[_0x46cb('0x15')][_0x46cb('0x1d')]({'raw':_0x40e0e5[_0x46cb('0x18')]?_0x40e0e5[_0x46cb('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x40e0e5[_0x46cb('0x18')]?_0x40e0e5['options']['where']||null:null,'attributes':[[db['sequelize']['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')][_0x46cb('0x20')]('id')),_0x46cb('0x21')],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x23')))),_0x46cb('0x24')],[db['sequelize']['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db['sequelize']['literal'](_0x46cb('0x25')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x26')))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0x46cb('0x1f')]['fn']('AVG',db[_0x46cb('0x1f')]['fn']('IF',db[_0x46cb('0x1f')]['literal'](_0x46cb('0x27')))),_0x46cb('0x28')],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x29'),db[_0x46cb('0x1f')]['fn']('IF',db['sequelize'][_0x46cb('0x22')]('`state`\x20=\x204,\x20`talktime`,\x20null'))),_0x46cb('0x2a')]]})[_0x46cb('0x1a')](function(_0x2630e0){logger['info'](_0x46cb('0x1c'),_0x40e0e5);logger[_0x46cb('0xe')]('AvgHandleTime',_0x40e0e5,JSON[_0x46cb('0xf')](_0x2630e0));_0x4d663e(_0x2630e0);})[_0x46cb('0x14')](function(_0x3ba467){logger[_0x46cb('0x10')](_0x46cb('0x1c'),_0x3ba467[_0x46cb('0x12')],_0x40e0e5);_0x6588f3(_0x5a1338[_0x46cb('0x10')](0x1f4,_0x3ba467[_0x46cb('0x12')]));});});};exports[_0x46cb('0x2b')]=function(_0xe4504e){var _0xba5e93=this;return new Promise(function(_0x4f0fb6,_0x5f1df0){return db['CmHopperHistory'][_0x46cb('0x1d')]({'raw':_0xe4504e[_0x46cb('0x18')]?_0xe4504e[_0x46cb('0x18')][_0x46cb('0x19')]===undefined?!![]:![]:!![],'where':_0xe4504e[_0x46cb('0x18')]?_0xe4504e[_0x46cb('0x18')]['where']||null:null,'attributes':[[_0x46cb('0x2c'),'name'],[db['sequelize']['fn'](_0x46cb('0x1e'),db['sequelize']['fn']('IF',db['sequelize'][_0x46cb('0x22')]('`state`\x20=\x200,\x201,\x20null'))),'outboundNoSuchCallsDay'],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x2d')))),_0x46cb('0x2e')],[db['sequelize']['fn'](_0x46cb('0x1e'),db['sequelize']['fn']('IF',db[_0x46cb('0x1f')]['literal'](_0x46cb('0x23')))),_0x46cb('0x2f')],[db[_0x46cb('0x1f')]['fn']('COUNT',db[_0x46cb('0x1f')]['fn']('IF',db[_0x46cb('0x1f')]['literal'](_0x46cb('0x30')))),_0x46cb('0x31')],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db['sequelize']['literal'](_0x46cb('0x32')))),'outboundCongestionCallsDay'],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db['sequelize']['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x33')))),'outboundDropCallsDayTimeout'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x34')))),_0x46cb('0x35')],[db[_0x46cb('0x1f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')]('`state`\x20=\x2012,\x201,\x20null'))),_0x46cb('0x36')],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x37')))),'outboundBlacklistCallsDay'],[db['sequelize']['fn'](_0x46cb('0x1e'),db['sequelize']['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x38')))),'outboundOriginateFailureCallsDay'],[db[_0x46cb('0x1f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x39')))),_0x46cb('0x3a')],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db['sequelize']['literal'](_0x46cb('0x3b')))),_0x46cb('0x3c')],[db['sequelize']['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db[_0x46cb('0x1f')][_0x46cb('0x22')](_0x46cb('0x3d')))),'outboundRejectCallsDay'],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db['sequelize'][_0x46cb('0x22')]('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),'outboundReCallsDay']],'group':[_0x46cb('0x2c')]})[_0x46cb('0x1a')](function(_0x2fe0b1){logger[_0x46cb('0xc')](_0x46cb('0x2b'),_0xe4504e);logger['debug'](_0x46cb('0x2b'),_0xe4504e,JSON[_0x46cb('0xf')](_0x2fe0b1));_0x4f0fb6(_0x2fe0b1);})['catch'](function(_0x51a103){logger[_0x46cb('0x10')](_0x46cb('0x2b'),_0x51a103[_0x46cb('0x12')],_0xe4504e);_0x5f1df0(_0xba5e93['error'](0x1f4,_0x51a103[_0x46cb('0x12')]));});});};exports[_0x46cb('0x3e')]=function(_0x434df9){var _0x61aef9=this;return new Promise(function(_0x46407d,_0x3f415d){return db[_0x46cb('0x15')][_0x46cb('0x1d')]({'raw':_0x434df9[_0x46cb('0x18')]?_0x434df9['options'][_0x46cb('0x19')]===undefined?!![]:![]:!![],'where':_0x434df9['options']?_0x434df9[_0x46cb('0x18')][_0x46cb('0x3f')]||null:null,'attributes':[[_0x46cb('0x2c'),_0x46cb('0x40')],[db['sequelize']['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')][_0x46cb('0x20')]('id')),_0x46cb('0x41')],[db[_0x46cb('0x1f')]['fn'](_0x46cb('0x1e'),db[_0x46cb('0x1f')]['fn']('IF',db[_0x46cb('0x1f')]['literal']('`state`\x20=\x204,\x201,\x20null'))),'ivrAnswerCallsDay']],'group':['campaign']})[_0x46cb('0x1a')](function(_0xdb582b){logger['info'](_0x46cb('0x3e'),_0x434df9);logger[_0x46cb('0xe')](_0x46cb('0x3e'),_0x434df9,JSON['stringify'](_0xdb582b));_0x46407d(_0xdb582b);})['catch'](function(_0x1ad6fc){logger['error'](_0x46cb('0x3e'),_0x1ad6fc[_0x46cb('0x12')],_0x434df9);_0x3f415d(_0x61aef9[_0x46cb('0x10')](0x1f4,_0x1ad6fc[_0x46cb('0x12')]));});});};
\ No newline at end of file