Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 607c2be..a0a8420 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x96cc=['`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','GetCampaignHopperHistory','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','debug','AvgHandleTime','findAll','where','sequelize','col','predictiveIntervalTotalCalls','COUNT','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','`state`\x20=\x204,\x20`holdtime`,\x20null','AVG','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','outboundNoAnswerCallsDay','outboundAnswerCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayCallersExit'];(function(_0x55f549,_0x4f90ac){var _0x589a78=function(_0x4b2cc3){while(--_0x4b2cc3){_0x55f549['push'](_0x55f549['shift']());}};_0x589a78(++_0x4f90ac);}(_0x96cc,0x16c));var _0xc96c=function(_0x25f39c,_0x4f231a){_0x25f39c=_0x25f39c-0x0;var _0x19bb4a=_0x96cc[_0x25f39c];return _0x19bb4a;};'use strict';var _=require(_0xc96c('0x0'));var util=require('util');var moment=require(_0xc96c('0x1'));var BPromise=require('bluebird');var rs=require(_0xc96c('0x2'));var fs=require('fs');var Redis=require(_0xc96c('0x3'));var db=require(_0xc96c('0x4'))['db'];var utils=require(_0xc96c('0x5'));var logger=require(_0xc96c('0x6'))(_0xc96c('0x7'));var config=require(_0xc96c('0x8'));var jayson=require(_0xc96c('0x9'));var client=jayson[_0xc96c('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x10b411,_0x18eb9c,_0x408afb){return new BPromise(function(_0x86c1a8,_0x13363d){return client[_0xc96c('0xb')](_0x10b411,_0x408afb)[_0xc96c('0xc')](function(_0x54e765){logger[_0xc96c('0xd')](_0xc96c('0xe'),_0x18eb9c,_0xc96c('0xf'));logger['debug'](_0xc96c('0x10'),_0x18eb9c,'request\x20sent',JSON[_0xc96c('0x11')](_0x54e765));if(_0x54e765['error']){if(_0x54e765[_0xc96c('0x12')][_0xc96c('0x13')]===0x1f4){logger[_0xc96c('0x12')](_0xc96c('0xe'),_0x18eb9c,_0x54e765['error'][_0xc96c('0x14')]);return _0x13363d(_0x54e765[_0xc96c('0x12')][_0xc96c('0x14')]);}logger[_0xc96c('0x12')]('CmHopperHistory,\x20%s,\x20%s',_0x18eb9c,_0x54e765[_0xc96c('0x12')][_0xc96c('0x14')]);return _0x86c1a8(_0x54e765[_0xc96c('0x12')][_0xc96c('0x14')]);}else{logger[_0xc96c('0xd')](_0xc96c('0xe'),_0x18eb9c,_0xc96c('0xf'));_0x86c1a8(_0x54e765[_0xc96c('0x15')][_0xc96c('0x14')]);}})[_0xc96c('0x16')](function(_0x861230){logger['error']('CmHopperHistory,\x20%s,\x20%s',_0x18eb9c,_0x861230);_0x13363d(_0x861230);});});}exports[_0xc96c('0x17')]=function(_0x99c402){var _0x16b6ce=this;return new Promise(function(_0x2ae19a,_0x4aa6a3){return db[_0xc96c('0x18')][_0xc96c('0x19')](_0x99c402[_0xc96c('0x1a')],{'raw':_0x99c402[_0xc96c('0x1b')]?_0x99c402[_0xc96c('0x1b')][_0xc96c('0x1c')]===undefined?!![]:![]:!![]})[_0xc96c('0xc')](function(_0x41daba){logger[_0xc96c('0xd')](_0xc96c('0x17'),_0x99c402);logger[_0xc96c('0x1d')](_0xc96c('0x17'),_0x99c402,JSON[_0xc96c('0x11')](_0x41daba));_0x2ae19a(_0x41daba);})[_0xc96c('0x16')](function(_0x325c54){logger[_0xc96c('0x12')](_0xc96c('0x17'),_0x325c54['message'],_0x99c402);_0x4aa6a3(_0x16b6ce[_0xc96c('0x12')](0x1f4,_0x325c54[_0xc96c('0x14')]));});});};exports[_0xc96c('0x1e')]=function(_0x10ae21){var _0x2b1df9=this;return new Promise(function(_0x35f480,_0x40f23d){return db[_0xc96c('0x18')][_0xc96c('0x1f')]({'raw':_0x10ae21[_0xc96c('0x1b')]?_0x10ae21['options'][_0xc96c('0x1c')]===undefined?!![]:![]:!![],'where':_0x10ae21[_0xc96c('0x1b')]?_0x10ae21[_0xc96c('0x1b')][_0xc96c('0x20')]||null:null,'attributes':[[db['sequelize']['fn']('COUNT',db[_0xc96c('0x21')][_0xc96c('0x22')]('id')),_0xc96c('0x23')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x26')))),_0xc96c('0x27')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')]['literal'](_0xc96c('0x28')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db['sequelize'][_0xc96c('0x25')](_0xc96c('0x29')))),_0xc96c('0x2a')],[db[_0xc96c('0x21')]['fn']('AVG',db['sequelize']['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x2b')))),'predictiveIntervalAvgHoldtime'],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x2c'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')]['literal'](_0xc96c('0x2d')))),_0xc96c('0x2e')]]})['then'](function(_0x2b1dec){logger[_0xc96c('0xd')](_0xc96c('0x1e'),_0x10ae21);logger[_0xc96c('0x1d')](_0xc96c('0x1e'),_0x10ae21,JSON[_0xc96c('0x11')](_0x2b1dec));_0x35f480(_0x2b1dec);})['catch'](function(_0x35dfb7){logger[_0xc96c('0x12')](_0xc96c('0x1e'),_0x35dfb7[_0xc96c('0x14')],_0x10ae21);_0x40f23d(_0x2b1df9[_0xc96c('0x12')](0x1f4,_0x35dfb7[_0xc96c('0x14')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x56b5c9){var _0x33b4bb=this;return new Promise(function(_0x156d0f,_0x5006ec){return db['CmHopperHistory'][_0xc96c('0x1f')]({'raw':_0x56b5c9[_0xc96c('0x1b')]?_0x56b5c9[_0xc96c('0x1b')][_0xc96c('0x1c')]===undefined?!![]:![]:!![],'where':_0x56b5c9[_0xc96c('0x1b')]?_0x56b5c9[_0xc96c('0x1b')][_0xc96c('0x20')]||null:null,'attributes':[[_0xc96c('0x2f'),_0xc96c('0x30')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db['sequelize']['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x31')))),_0xc96c('0x32')],[db['sequelize']['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')]['literal']('`state`\x20=\x203,\x201,\x20null'))),_0xc96c('0x33')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db['sequelize']['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x26')))),_0xc96c('0x34')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')]('`state`\x20=\x205,\x201,\x20null'))),'outboundBusyCallsDay'],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')]['literal']('`state`\x20=\x208,\x201,\x20null'))),_0xc96c('0x35')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x36')))),'outboundDropCallsDayTimeout'],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')]['literal']('`state`\x20=\x2011\x20,\x201,\x20null'))),_0xc96c('0x37')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x38')))),_0xc96c('0x39')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')]('`state`\x20=\x2013,\x201,\x20null'))),_0xc96c('0x3a')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db['sequelize'][_0xc96c('0x25')]('`state`\x20=\x2014,\x201,\x20null'))),_0xc96c('0x3b')],[db[_0xc96c('0x21')]['fn']('COUNT',db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x3c')))),_0xc96c('0x3d')],[db[_0xc96c('0x21')]['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0xc96c('0x25')]('`state`\x20=\x2016,\x201,\x20null'))),_0xc96c('0x3e')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x3f')))),_0xc96c('0x3d')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db['sequelize']['fn']('IF',db[_0xc96c('0x21')][_0xc96c('0x25')](_0xc96c('0x40')))),_0xc96c('0x41')]],'group':[_0xc96c('0x2f')]})[_0xc96c('0xc')](function(_0xad88c3){logger[_0xc96c('0xd')]('GetVoiceQueueHopperHistory',_0x56b5c9);logger['debug']('GetVoiceQueueHopperHistory',_0x56b5c9,JSON['stringify'](_0xad88c3));_0x156d0f(_0xad88c3);})[_0xc96c('0x16')](function(_0x46c6fb){logger[_0xc96c('0x12')](_0xc96c('0x42'),_0x46c6fb[_0xc96c('0x14')],_0x56b5c9);_0x5006ec(_0x33b4bb[_0xc96c('0x12')](0x1f4,_0x46c6fb[_0xc96c('0x14')]));});});};exports['GetCampaignHopperHistory']=function(_0x47115b){var _0x48dc98=this;return new Promise(function(_0x3c4b60,_0x103e90){return db[_0xc96c('0x18')][_0xc96c('0x1f')]({'raw':_0x47115b[_0xc96c('0x1b')]?_0x47115b['options'][_0xc96c('0x1c')]===undefined?!![]:![]:!![],'where':_0x47115b[_0xc96c('0x1b')]?_0x47115b[_0xc96c('0x1b')][_0xc96c('0x20')]||null:null,'attributes':[[_0xc96c('0x2f'),_0xc96c('0x30')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')][_0xc96c('0x22')]('id')),_0xc96c('0x43')],[db[_0xc96c('0x21')]['fn'](_0xc96c('0x24'),db[_0xc96c('0x21')]['fn']('IF',db['sequelize'][_0xc96c('0x25')](_0xc96c('0x26')))),_0xc96c('0x44')]],'group':[_0xc96c('0x2f')]})[_0xc96c('0xc')](function(_0x55219a){logger[_0xc96c('0xd')](_0xc96c('0x45'),_0x47115b);logger[_0xc96c('0x1d')](_0xc96c('0x45'),_0x47115b,JSON['stringify'](_0x55219a));_0x3c4b60(_0x55219a);})[_0xc96c('0x16')](function(_0x4629ce){logger['error']('GetCampaignHopperHistory',_0x4629ce['message'],_0x47115b);_0x103e90(_0x48dc98[_0xc96c('0x12')](0x1f4,_0x4629ce[_0xc96c('0x14')]));});});};
\ No newline at end of file
+var _0xb688=['../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CmHopperHistory','create','body','options','raw','CreateCmHopperHistory','AvgHandleTime','findAll','where','sequelize','predictiveIntervalAnsweredCalls','COUNT','literal','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','AVG','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','stringify','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','outboundNoAnswerCallsDay','`state`\x20=\x204,\x201,\x20null','outboundAnswerCallsDay','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundRejectCallsDay','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetCampaignHopperHistory','col','ivrTotalCallsDays','ivrAnswerCallsDay','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x4212c1,_0xb66a71){var _0x224635=function(_0x4f48c3){while(--_0x4f48c3){_0x4212c1['push'](_0x4212c1['shift']());}};_0x224635(++_0xb66a71);}(_0xb688,0xcf));var _0x8b68=function(_0xffad61,_0x5f0282){_0xffad61=_0xffad61-0x0;var _0x33ef10=_0xb688[_0xffad61];return _0x33ef10;};'use strict';var _=require('lodash');var util=require(_0x8b68('0x0'));var moment=require(_0x8b68('0x1'));var BPromise=require(_0x8b68('0x2'));var rs=require(_0x8b68('0x3'));var fs=require('fs');var Redis=require(_0x8b68('0x4'));var db=require(_0x8b68('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x8b68('0x6'))(_0x8b68('0x7'));var config=require(_0x8b68('0x8'));var jayson=require(_0x8b68('0x9'));var client=jayson['client'][_0x8b68('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x57ee56,_0x37677d,_0x2bbffd){return new BPromise(function(_0x130892,_0xa5571b){return client[_0x8b68('0xb')](_0x57ee56,_0x2bbffd)[_0x8b68('0xc')](function(_0x261753){logger[_0x8b68('0xd')](_0x8b68('0xe'),_0x37677d,_0x8b68('0xf'));logger[_0x8b68('0x10')](_0x8b68('0x11'),_0x37677d,_0x8b68('0xf'),JSON['stringify'](_0x261753));if(_0x261753[_0x8b68('0x12')]){if(_0x261753[_0x8b68('0x12')][_0x8b68('0x13')]===0x1f4){logger[_0x8b68('0x12')](_0x8b68('0xe'),_0x37677d,_0x261753[_0x8b68('0x12')][_0x8b68('0x14')]);return _0xa5571b(_0x261753[_0x8b68('0x12')][_0x8b68('0x14')]);}logger['error'](_0x8b68('0xe'),_0x37677d,_0x261753['error']['message']);return _0x130892(_0x261753[_0x8b68('0x12')][_0x8b68('0x14')]);}else{logger[_0x8b68('0xd')]('CmHopperHistory,\x20%s,\x20%s',_0x37677d,'request\x20sent');_0x130892(_0x261753[_0x8b68('0x15')]['message']);}})[_0x8b68('0x16')](function(_0xb44923){logger[_0x8b68('0x12')](_0x8b68('0xe'),_0x37677d,_0xb44923);_0xa5571b(_0xb44923);});});}exports['CreateCmHopperHistory']=function(_0xd17693){var _0x203dd4=this;return new Promise(function(_0x4a68c7,_0x42b3bd){return db[_0x8b68('0x17')][_0x8b68('0x18')](_0xd17693[_0x8b68('0x19')],{'raw':_0xd17693[_0x8b68('0x1a')]?_0xd17693['options'][_0x8b68('0x1b')]===undefined?!![]:![]:!![]})[_0x8b68('0xc')](function(_0x59e9b1){logger[_0x8b68('0xd')](_0x8b68('0x1c'),_0xd17693);logger[_0x8b68('0x10')]('CreateCmHopperHistory',_0xd17693,JSON['stringify'](_0x59e9b1));_0x4a68c7(_0x59e9b1);})[_0x8b68('0x16')](function(_0x59cb26){logger[_0x8b68('0x12')](_0x8b68('0x1c'),_0x59cb26[_0x8b68('0x14')],_0xd17693);_0x42b3bd(_0x203dd4[_0x8b68('0x12')](0x1f4,_0x59cb26[_0x8b68('0x14')]));});});};exports[_0x8b68('0x1d')]=function(_0x59bb8a){var _0x1a6fe8=this;return new Promise(function(_0x46e827,_0x4ca77d){return db[_0x8b68('0x17')][_0x8b68('0x1e')]({'raw':_0x59bb8a[_0x8b68('0x1a')]?_0x59bb8a['options']['raw']===undefined?!![]:![]:!![],'where':_0x59bb8a['options']?_0x59bb8a[_0x8b68('0x1a')][_0x8b68('0x1f')]||null:null,'attributes':[[db[_0x8b68('0x20')]['fn']('COUNT',db[_0x8b68('0x20')]['col']('id')),'predictiveIntervalTotalCalls'],[db[_0x8b68('0x20')]['fn']('COUNT',db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')]['literal']('`state`\x20=\x204,\x201,\x20null'))),_0x8b68('0x21')],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x24')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x8b68('0x20')]['fn']('COUNT',db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')]['literal'](_0x8b68('0x25')))),_0x8b68('0x26')],[db[_0x8b68('0x20')]['fn']('AVG',db['sequelize']['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x27')))),_0x8b68('0x28')],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x29'),db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x2a')))),_0x8b68('0x2b')]]})[_0x8b68('0xc')](function(_0x232fa9){logger[_0x8b68('0xd')](_0x8b68('0x1d'),_0x59bb8a);logger[_0x8b68('0x10')](_0x8b68('0x1d'),_0x59bb8a,JSON[_0x8b68('0x2c')](_0x232fa9));_0x46e827(_0x232fa9);})[_0x8b68('0x16')](function(_0x18dfae){logger[_0x8b68('0x12')](_0x8b68('0x1d'),_0x18dfae['message'],_0x59bb8a);_0x4ca77d(_0x1a6fe8['error'](0x1f4,_0x18dfae[_0x8b68('0x14')]));});});};exports[_0x8b68('0x2d')]=function(_0x23554d){var _0xb9b5b1=this;return new Promise(function(_0xf2154f,_0xce486c){return db[_0x8b68('0x17')][_0x8b68('0x1e')]({'raw':_0x23554d['options']?_0x23554d[_0x8b68('0x1a')][_0x8b68('0x1b')]===undefined?!![]:![]:!![],'where':_0x23554d[_0x8b68('0x1a')]?_0x23554d[_0x8b68('0x1a')][_0x8b68('0x1f')]||null:null,'attributes':[[_0x8b68('0x2e'),_0x8b68('0x2f')],[db[_0x8b68('0x20')]['fn']('COUNT',db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x30')))),_0x8b68('0x31')],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db['sequelize']['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')]('`state`\x20=\x203,\x201,\x20null'))),_0x8b68('0x32')],[db[_0x8b68('0x20')]['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize']['literal'](_0x8b68('0x33')))),_0x8b68('0x34')],[db['sequelize']['fn'](_0x8b68('0x22'),db['sequelize']['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')]('`state`\x20=\x205,\x201,\x20null'))),_0x8b68('0x35')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x36')))),_0x8b68('0x37')],[db['sequelize']['fn'](_0x8b68('0x22'),db['sequelize']['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x8b68('0x38')],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db[_0x8b68('0x20')]['fn']('IF',db['sequelize'][_0x8b68('0x23')](_0x8b68('0x39')))),_0x8b68('0x3a')],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x3b')))),_0x8b68('0x3c')],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x3d')))),'outboundBlacklistCallsDay'],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db['sequelize']['fn']('IF',db[_0x8b68('0x20')]['literal']('`state`\x20=\x2014,\x201,\x20null'))),'outboundOriginateFailureCallsDay'],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')]['literal']('`state`\x20=\x2018,\x201,\x20null'))),_0x8b68('0x3e')],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db['sequelize']['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')]('`state`\x20=\x2016,\x201,\x20null'))),_0x8b68('0x3f')],[db[_0x8b68('0x20')]['fn']('COUNT',db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')]['literal'](_0x8b68('0x40')))),_0x8b68('0x3e')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x41')))),_0x8b68('0x42')]],'group':['campaign']})['then'](function(_0x4492fd){logger[_0x8b68('0xd')](_0x8b68('0x2d'),_0x23554d);logger['debug'](_0x8b68('0x2d'),_0x23554d,JSON[_0x8b68('0x2c')](_0x4492fd));_0xf2154f(_0x4492fd);})[_0x8b68('0x16')](function(_0x4dda69){logger[_0x8b68('0x12')]('GetVoiceQueueHopperHistory',_0x4dda69[_0x8b68('0x14')],_0x23554d);_0xce486c(_0xb9b5b1[_0x8b68('0x12')](0x1f4,_0x4dda69['message']));});});};exports[_0x8b68('0x43')]=function(_0x25842e){var _0x6ac18=this;return new Promise(function(_0xcd88b4,_0x8cc614){return db['CmHopperHistory'][_0x8b68('0x1e')]({'raw':_0x25842e[_0x8b68('0x1a')]?_0x25842e[_0x8b68('0x1a')][_0x8b68('0x1b')]===undefined?!![]:![]:!![],'where':_0x25842e[_0x8b68('0x1a')]?_0x25842e[_0x8b68('0x1a')][_0x8b68('0x1f')]||null:null,'attributes':[[_0x8b68('0x2e'),'name'],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db[_0x8b68('0x20')][_0x8b68('0x44')]('id')),_0x8b68('0x45')],[db[_0x8b68('0x20')]['fn'](_0x8b68('0x22'),db[_0x8b68('0x20')]['fn']('IF',db[_0x8b68('0x20')][_0x8b68('0x23')](_0x8b68('0x33')))),_0x8b68('0x46')]],'group':[_0x8b68('0x2e')]})[_0x8b68('0xc')](function(_0x28e7aa){logger[_0x8b68('0xd')](_0x8b68('0x43'),_0x25842e);logger[_0x8b68('0x10')](_0x8b68('0x43'),_0x25842e,JSON[_0x8b68('0x2c')](_0x28e7aa));_0xcd88b4(_0x28e7aa);})['catch'](function(_0xaac776){logger['error']('GetCampaignHopperHistory',_0xaac776[_0x8b68('0x14')],_0x25842e);_0x8cc614(_0x6ac18['error'](0x1f4,_0xaac776[_0x8b68('0x14')]));});});};
\ No newline at end of file