Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 3522079..a93e6a5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf388=['`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','ivrAnswerCallsDay','GetCampaignHopperHistory','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','request','then','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','create','body','options','raw','CreateCmHopperHistory','AvgHandleTime','CmHopperHistory','findAll','where','COUNT','sequelize','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','`state`\x20=\x203,\x201,\x20null','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit'];(function(_0x102323,_0x4d3d95){var _0x234e42=function(_0x2a2f93){while(--_0x2a2f93){_0x102323['push'](_0x102323['shift']());}};_0x234e42(++_0x4d3d95);}(_0xf388,0xe0));var _0x8f38=function(_0xf8b747,_0x146c26){_0xf8b747=_0xf8b747-0x0;var _0xcf0206=_0xf388[_0xf8b747];return _0xcf0206;};'use strict';var _=require('lodash');var util=require(_0x8f38('0x0'));var moment=require(_0x8f38('0x1'));var BPromise=require('bluebird');var rs=require(_0x8f38('0x2'));var fs=require('fs');var Redis=require(_0x8f38('0x3'));var db=require(_0x8f38('0x4'))['db'];var utils=require(_0x8f38('0x5'));var logger=require(_0x8f38('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x8f38('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x34d638,_0x376b82,_0x3aef32){return new BPromise(function(_0x3cfaba,_0x2d285f){return client[_0x8f38('0x8')](_0x34d638,_0x3aef32)[_0x8f38('0x9')](function(_0x5429ae){logger['info'](_0x8f38('0xa'),_0x376b82,_0x8f38('0xb'));logger[_0x8f38('0xc')](_0x8f38('0xd'),_0x376b82,'request\x20sent',JSON[_0x8f38('0xe')](_0x5429ae));if(_0x5429ae['error']){if(_0x5429ae[_0x8f38('0xf')][_0x8f38('0x10')]===0x1f4){logger['error'](_0x8f38('0xa'),_0x376b82,_0x5429ae[_0x8f38('0xf')][_0x8f38('0x11')]);return _0x2d285f(_0x5429ae['error'][_0x8f38('0x11')]);}logger['error']('CmHopperHistory,\x20%s,\x20%s',_0x376b82,_0x5429ae[_0x8f38('0xf')][_0x8f38('0x11')]);return _0x3cfaba(_0x5429ae[_0x8f38('0xf')][_0x8f38('0x11')]);}else{logger[_0x8f38('0x12')](_0x8f38('0xa'),_0x376b82,_0x8f38('0xb'));_0x3cfaba(_0x5429ae[_0x8f38('0x13')][_0x8f38('0x11')]);}})[_0x8f38('0x14')](function(_0x26dd6b){logger['error'](_0x8f38('0xa'),_0x376b82,_0x26dd6b);_0x2d285f(_0x26dd6b);});});}exports['CreateCmHopperHistory']=function(_0x45358e){var _0x27ea67=this;return new Promise(function(_0x1d8958,_0x40e8a9){return db['CmHopperHistory'][_0x8f38('0x15')](_0x45358e[_0x8f38('0x16')],{'raw':_0x45358e[_0x8f38('0x17')]?_0x45358e[_0x8f38('0x17')][_0x8f38('0x18')]===undefined?!![]:![]:!![]})[_0x8f38('0x9')](function(_0x1aef8c){logger['info'](_0x8f38('0x19'),_0x45358e);logger[_0x8f38('0xc')]('CreateCmHopperHistory',_0x45358e,JSON[_0x8f38('0xe')](_0x1aef8c));_0x1d8958(_0x1aef8c);})['catch'](function(_0x5d288d){logger['error'](_0x8f38('0x19'),_0x5d288d[_0x8f38('0x11')],_0x45358e);_0x40e8a9(_0x27ea67['error'](0x1f4,_0x5d288d[_0x8f38('0x11')]));});});};exports[_0x8f38('0x1a')]=function(_0x2c35aa){var _0x3cd2c6=this;return new Promise(function(_0x539685,_0x588200){return db[_0x8f38('0x1b')][_0x8f38('0x1c')]({'raw':_0x2c35aa[_0x8f38('0x17')]?_0x2c35aa[_0x8f38('0x17')][_0x8f38('0x18')]===undefined?!![]:![]:!![],'where':_0x2c35aa[_0x8f38('0x17')]?_0x2c35aa['options'][_0x8f38('0x1d')]||null:null,'attributes':[[db['sequelize']['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')][_0x8f38('0x20')]('id')),_0x8f38('0x21')],[db[_0x8f38('0x1f')]['fn']('COUNT',db[_0x8f38('0x1f')]['fn']('IF',db['sequelize'][_0x8f38('0x22')](_0x8f38('0x23')))),'predictiveIntervalAnsweredCalls'],[db['sequelize']['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')]['literal'](_0x8f38('0x24')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x25')))),_0x8f38('0x26')],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x27'),db[_0x8f38('0x1f')]['fn']('IF',db['sequelize'][_0x8f38('0x22')](_0x8f38('0x28')))),_0x8f38('0x29')],[db[_0x8f38('0x1f')]['fn']('AVG',db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x2a')))),_0x8f38('0x2b')]]})[_0x8f38('0x9')](function(_0x13ae9b){logger[_0x8f38('0x12')]('AvgHandleTime',_0x2c35aa);logger[_0x8f38('0xc')](_0x8f38('0x1a'),_0x2c35aa,JSON[_0x8f38('0xe')](_0x13ae9b));_0x539685(_0x13ae9b);})['catch'](function(_0x31a860){logger[_0x8f38('0xf')]('AvgHandleTime',_0x31a860[_0x8f38('0x11')],_0x2c35aa);_0x588200(_0x3cd2c6[_0x8f38('0xf')](0x1f4,_0x31a860[_0x8f38('0x11')]));});});};exports[_0x8f38('0x2c')]=function(_0x1ef1ab){var _0x2cdb99=this;return new Promise(function(_0x1e8a17,_0x5e4208){return db['CmHopperHistory']['findAll']({'raw':_0x1ef1ab[_0x8f38('0x17')]?_0x1ef1ab[_0x8f38('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x1ef1ab[_0x8f38('0x17')]?_0x1ef1ab[_0x8f38('0x17')]['where']||null:null,'attributes':[[_0x8f38('0x2d'),_0x8f38('0x2e')],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x1e'),db['sequelize']['fn']('IF',db['sequelize'][_0x8f38('0x22')](_0x8f38('0x2f')))),'outboundNoSuchCallsDay'],[db[_0x8f38('0x1f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x30')))),'outboundNoAnswerCallsDay'],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')]('`state`\x20=\x204,\x201,\x20null'))),_0x8f38('0x31')],[db[_0x8f38('0x1f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x32')))),_0x8f38('0x33')],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')]['literal'](_0x8f38('0x34')))),_0x8f38('0x35')],[db['sequelize']['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x8f38('0x36')],[db[_0x8f38('0x1f')]['fn']('COUNT',db[_0x8f38('0x1f')]['fn']('IF',db['sequelize'][_0x8f38('0x22')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x8f38('0x37')],[db[_0x8f38('0x1f')]['fn']('COUNT',db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')]['literal'](_0x8f38('0x38')))),_0x8f38('0x39')],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x3a')))),_0x8f38('0x3b')],[db['sequelize']['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x3c')))),'outboundOriginateFailureCallsDay'],[db[_0x8f38('0x1f')]['fn']('COUNT',db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x3d')))),'outboundRejectCallsDay'],[db['sequelize']['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x3e')))),_0x8f38('0x3f')],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x40')))),_0x8f38('0x41')],[db[_0x8f38('0x1f')]['fn']('COUNT',db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')](_0x8f38('0x42')))),_0x8f38('0x43')]],'group':[_0x8f38('0x2d')]})[_0x8f38('0x9')](function(_0x1af0e8){logger[_0x8f38('0x12')](_0x8f38('0x2c'),_0x1ef1ab);logger[_0x8f38('0xc')]('GetVoiceQueueHopperHistory',_0x1ef1ab,JSON[_0x8f38('0xe')](_0x1af0e8));_0x1e8a17(_0x1af0e8);})[_0x8f38('0x14')](function(_0x596456){logger[_0x8f38('0xf')](_0x8f38('0x2c'),_0x596456['message'],_0x1ef1ab);_0x5e4208(_0x2cdb99[_0x8f38('0xf')](0x1f4,_0x596456['message']));});});};exports['GetCampaignHopperHistory']=function(_0x5c223a){var _0x1490c1=this;return new Promise(function(_0x58ead9,_0xeaa5ac){return db[_0x8f38('0x1b')][_0x8f38('0x1c')]({'raw':_0x5c223a['options']?_0x5c223a[_0x8f38('0x17')][_0x8f38('0x18')]===undefined?!![]:![]:!![],'where':_0x5c223a['options']?_0x5c223a[_0x8f38('0x17')][_0x8f38('0x1d')]||null:null,'attributes':[['campaign',_0x8f38('0x2e')],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')][_0x8f38('0x20')]('id')),'ivrTotalCallsDays'],[db[_0x8f38('0x1f')]['fn'](_0x8f38('0x1e'),db[_0x8f38('0x1f')]['fn']('IF',db[_0x8f38('0x1f')][_0x8f38('0x22')]('`state`\x20=\x204,\x201,\x20null'))),_0x8f38('0x44')]],'group':[_0x8f38('0x2d')]})[_0x8f38('0x9')](function(_0x626c8a){logger[_0x8f38('0x12')](_0x8f38('0x45'),_0x5c223a);logger['debug'](_0x8f38('0x45'),_0x5c223a,JSON[_0x8f38('0xe')](_0x626c8a));_0x58ead9(_0x626c8a);})['catch'](function(_0x5c8520){logger[_0x8f38('0xf')]('GetCampaignHopperHistory',_0x5c8520[_0x8f38('0x11')],_0x5c223a);_0xeaa5ac(_0x1490c1[_0x8f38('0xf')](0x1f4,_0x5c8520['message']));});});};
\ No newline at end of file
+var _0xa068=['`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','create','body','options','CreateCmHopperHistory','AvgHandleTime','CmHopperHistory','findAll','raw','where','sequelize','COUNT','predictiveIntervalAnsweredCalls','literal','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','AVG','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','outboundNoAnswerCallsDay','`state`\x20=\x204,\x201,\x20null','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','outboundBlacklistCallsDay'];(function(_0x3f9f91,_0x20cec2){var _0x4becf1=function(_0x19ede6){while(--_0x19ede6){_0x3f9f91['push'](_0x3f9f91['shift']());}};_0x4becf1(++_0x20cec2);}(_0xa068,0x1bb));var _0x8a06=function(_0x2501a3,_0x188e11){_0x2501a3=_0x2501a3-0x0;var _0x3b3eda=_0xa068[_0x2501a3];return _0x3b3eda;};'use strict';var _=require(_0x8a06('0x0'));var util=require(_0x8a06('0x1'));var moment=require(_0x8a06('0x2'));var BPromise=require(_0x8a06('0x3'));var rs=require(_0x8a06('0x4'));var fs=require('fs');var Redis=require(_0x8a06('0x5'));var db=require(_0x8a06('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x8a06('0x7'))(_0x8a06('0x8'));var config=require(_0x8a06('0x9'));var jayson=require(_0x8a06('0xa'));var client=jayson[_0x8a06('0xb')][_0x8a06('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4eb623,_0x37cb4d,_0x198946){return new BPromise(function(_0x1028a5,_0x7d445b){return client[_0x8a06('0xd')](_0x4eb623,_0x198946)[_0x8a06('0xe')](function(_0x2d1aa2){logger[_0x8a06('0xf')](_0x8a06('0x10'),_0x37cb4d,_0x8a06('0x11'));logger[_0x8a06('0x12')](_0x8a06('0x13'),_0x37cb4d,'request\x20sent',JSON[_0x8a06('0x14')](_0x2d1aa2));if(_0x2d1aa2['error']){if(_0x2d1aa2[_0x8a06('0x15')][_0x8a06('0x16')]===0x1f4){logger[_0x8a06('0x15')]('CmHopperHistory,\x20%s,\x20%s',_0x37cb4d,_0x2d1aa2['error']['message']);return _0x7d445b(_0x2d1aa2[_0x8a06('0x15')][_0x8a06('0x17')]);}logger['error'](_0x8a06('0x10'),_0x37cb4d,_0x2d1aa2[_0x8a06('0x15')][_0x8a06('0x17')]);return _0x1028a5(_0x2d1aa2[_0x8a06('0x15')][_0x8a06('0x17')]);}else{logger[_0x8a06('0xf')](_0x8a06('0x10'),_0x37cb4d,_0x8a06('0x11'));_0x1028a5(_0x2d1aa2[_0x8a06('0x18')][_0x8a06('0x17')]);}})[_0x8a06('0x19')](function(_0x4a25a6){logger[_0x8a06('0x15')]('CmHopperHistory,\x20%s,\x20%s',_0x37cb4d,_0x4a25a6);_0x7d445b(_0x4a25a6);});});}exports['CreateCmHopperHistory']=function(_0x2db1ff){var _0x2a07ef=this;return new Promise(function(_0x40e177,_0x134e76){return db['CmHopperHistory'][_0x8a06('0x1a')](_0x2db1ff[_0x8a06('0x1b')],{'raw':_0x2db1ff[_0x8a06('0x1c')]?_0x2db1ff[_0x8a06('0x1c')]['raw']===undefined?!![]:![]:!![]})[_0x8a06('0xe')](function(_0xd245fb){logger['info'](_0x8a06('0x1d'),_0x2db1ff);logger[_0x8a06('0x12')](_0x8a06('0x1d'),_0x2db1ff,JSON['stringify'](_0xd245fb));_0x40e177(_0xd245fb);})[_0x8a06('0x19')](function(_0x556fc2){logger[_0x8a06('0x15')](_0x8a06('0x1d'),_0x556fc2['message'],_0x2db1ff);_0x134e76(_0x2a07ef['error'](0x1f4,_0x556fc2[_0x8a06('0x17')]));});});};exports[_0x8a06('0x1e')]=function(_0x1e3ab4){var _0x1e5b52=this;return new Promise(function(_0x877f56,_0x49a66e){return db[_0x8a06('0x1f')][_0x8a06('0x20')]({'raw':_0x1e3ab4[_0x8a06('0x1c')]?_0x1e3ab4[_0x8a06('0x1c')][_0x8a06('0x21')]===undefined?!![]:![]:!![],'where':_0x1e3ab4[_0x8a06('0x1c')]?_0x1e3ab4['options'][_0x8a06('0x22')]||null:null,'attributes':[[db[_0x8a06('0x23')]['fn'](_0x8a06('0x24'),db['sequelize']['col']('id')),'predictiveIntervalTotalCalls'],[db[_0x8a06('0x23')]['fn']('COUNT',db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')]['literal']('`state`\x20=\x204,\x201,\x20null'))),_0x8a06('0x25')],[db['sequelize']['fn'](_0x8a06('0x24'),db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')](_0x8a06('0x27')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x8a06('0x23')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')](_0x8a06('0x28')))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0x8a06('0x23')]['fn'](_0x8a06('0x29'),db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')]['literal']('`state`\x20=\x204,\x20`holdtime`,\x20null'))),_0x8a06('0x2a')],[db['sequelize']['fn'](_0x8a06('0x29'),db['sequelize']['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')]('`state`\x20=\x204,\x20`talktime`,\x20null'))),_0x8a06('0x2b')]]})[_0x8a06('0xe')](function(_0x35467d){logger[_0x8a06('0xf')](_0x8a06('0x1e'),_0x1e3ab4);logger[_0x8a06('0x12')](_0x8a06('0x1e'),_0x1e3ab4,JSON[_0x8a06('0x14')](_0x35467d));_0x877f56(_0x35467d);})[_0x8a06('0x19')](function(_0x2aa6ac){logger['error'](_0x8a06('0x1e'),_0x2aa6ac[_0x8a06('0x17')],_0x1e3ab4);_0x49a66e(_0x1e5b52[_0x8a06('0x15')](0x1f4,_0x2aa6ac[_0x8a06('0x17')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x5d8442){var _0x5ece8a=this;return new Promise(function(_0x2e05ee,_0x57dd0e){return db[_0x8a06('0x1f')][_0x8a06('0x20')]({'raw':_0x5d8442[_0x8a06('0x1c')]?_0x5d8442[_0x8a06('0x1c')][_0x8a06('0x21')]===undefined?!![]:![]:!![],'where':_0x5d8442['options']?_0x5d8442[_0x8a06('0x1c')][_0x8a06('0x22')]||null:null,'attributes':[[_0x8a06('0x2c'),_0x8a06('0x2d')],[db[_0x8a06('0x23')]['fn'](_0x8a06('0x24'),db[_0x8a06('0x23')]['fn']('IF',db['sequelize'][_0x8a06('0x26')](_0x8a06('0x2e')))),_0x8a06('0x2f')],[db['sequelize']['fn'](_0x8a06('0x24'),db[_0x8a06('0x23')]['fn']('IF',db['sequelize'][_0x8a06('0x26')]('`state`\x20=\x203,\x201,\x20null'))),_0x8a06('0x30')],[db[_0x8a06('0x23')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x8a06('0x23')]['literal'](_0x8a06('0x31')))),_0x8a06('0x32')],[db[_0x8a06('0x23')]['fn']('COUNT',db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')](_0x8a06('0x33')))),_0x8a06('0x34')],[db['sequelize']['fn'](_0x8a06('0x24'),db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')]['literal']('`state`\x20=\x208,\x201,\x20null'))),_0x8a06('0x35')],[db[_0x8a06('0x23')]['fn'](_0x8a06('0x24'),db['sequelize']['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')](_0x8a06('0x36')))),_0x8a06('0x37')],[db['sequelize']['fn']('COUNT',db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')](_0x8a06('0x38')))),_0x8a06('0x39')],[db[_0x8a06('0x23')]['fn'](_0x8a06('0x24'),db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')](_0x8a06('0x3a')))),_0x8a06('0x3b')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')]('`state`\x20=\x2013,\x201,\x20null'))),_0x8a06('0x3c')],[db['sequelize']['fn'](_0x8a06('0x24'),db['sequelize']['fn']('IF',db[_0x8a06('0x23')]['literal'](_0x8a06('0x3d')))),_0x8a06('0x3e')],[db[_0x8a06('0x23')]['fn'](_0x8a06('0x24'),db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')]['literal'](_0x8a06('0x3f')))),_0x8a06('0x40')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0x8a06('0x26')](_0x8a06('0x41')))),'outboundAnswerAgiCallsDay'],[db[_0x8a06('0x23')]['fn'](_0x8a06('0x24'),db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')]['literal'](_0x8a06('0x42')))),'outboundRejectCallsDay'],[db[_0x8a06('0x23')]['fn'](_0x8a06('0x24'),db['sequelize']['fn']('IF',db[_0x8a06('0x23')][_0x8a06('0x26')](_0x8a06('0x43')))),'outboundReCallsDay']],'group':['campaign']})[_0x8a06('0xe')](function(_0x22227d){logger[_0x8a06('0xf')](_0x8a06('0x44'),_0x5d8442);logger['debug']('GetVoiceQueueHopperHistory',_0x5d8442,JSON[_0x8a06('0x14')](_0x22227d));_0x2e05ee(_0x22227d);})[_0x8a06('0x19')](function(_0x1cdd80){logger[_0x8a06('0x15')](_0x8a06('0x44'),_0x1cdd80[_0x8a06('0x17')],_0x5d8442);_0x57dd0e(_0x5ece8a[_0x8a06('0x15')](0x1f4,_0x1cdd80[_0x8a06('0x17')]));});});};exports[_0x8a06('0x45')]=function(_0x519172){var _0xc29308=this;return new Promise(function(_0x289e48,_0x4730d1){return db['CmHopperHistory']['findAll']({'raw':_0x519172['options']?_0x519172[_0x8a06('0x1c')][_0x8a06('0x21')]===undefined?!![]:![]:!![],'where':_0x519172[_0x8a06('0x1c')]?_0x519172[_0x8a06('0x1c')][_0x8a06('0x22')]||null:null,'attributes':[[_0x8a06('0x2c'),'name'],[db[_0x8a06('0x23')]['fn'](_0x8a06('0x24'),db['sequelize']['col']('id')),_0x8a06('0x46')],[db[_0x8a06('0x23')]['fn']('COUNT',db[_0x8a06('0x23')]['fn']('IF',db[_0x8a06('0x23')]['literal'](_0x8a06('0x31')))),_0x8a06('0x47')]],'group':['campaign']})[_0x8a06('0xe')](function(_0x2261ea){logger[_0x8a06('0xf')]('GetCampaignHopperHistory',_0x519172);logger[_0x8a06('0x12')](_0x8a06('0x45'),_0x519172,JSON['stringify'](_0x2261ea));_0x289e48(_0x2261ea);})[_0x8a06('0x19')](function(_0x49b31a){logger[_0x8a06('0x15')](_0x8a06('0x45'),_0x49b31a[_0x8a06('0x17')],_0x519172);_0x4730d1(_0xc29308[_0x8a06('0x15')](0x1f4,_0x49b31a['message']));});});};
\ No newline at end of file