Built motion from commit c0cdc9d8.|2.6.28
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index ee99d1c..2588cdc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5bc5=['`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','AvgHandleTime','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2011\x20,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','GetCampaignHopperHistory','raw','col','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','message','CreateCmHopperHistory','create','options','catch','CmHopperHistory','findAll','where','sequelize','COUNT','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout'];(function(_0x62c958,_0x2bfdbc){var _0x57ec61=function(_0x5c0094){while(--_0x5c0094){_0x62c958['push'](_0x62c958['shift']());}};_0x57ec61(++_0x2bfdbc);}(_0x5bc5,0xb2));var _0x55bc=function(_0x3cba93,_0x5c2fd8){_0x3cba93=_0x3cba93-0x0;var _0x4a2991=_0x5bc5[_0x3cba93];return _0x4a2991;};'use strict';var _=require(_0x55bc('0x0'));var util=require(_0x55bc('0x1'));var moment=require(_0x55bc('0x2'));var BPromise=require(_0x55bc('0x3'));var rs=require(_0x55bc('0x4'));var fs=require('fs');var Redis=require(_0x55bc('0x5'));var db=require(_0x55bc('0x6'))['db'];var utils=require(_0x55bc('0x7'));var logger=require(_0x55bc('0x8'))(_0x55bc('0x9'));var config=require(_0x55bc('0xa'));var jayson=require(_0x55bc('0xb'));var client=jayson[_0x55bc('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4d78d6,_0x5719c9,_0x2a612b){return new BPromise(function(_0x38839e,_0x4d0610){return client[_0x55bc('0xd')](_0x4d78d6,_0x2a612b)[_0x55bc('0xe')](function(_0xc535ac){logger[_0x55bc('0xf')](_0x55bc('0x10'),_0x5719c9,_0x55bc('0x11'));logger[_0x55bc('0x12')](_0x55bc('0x13'),_0x5719c9,'request\x20sent',JSON[_0x55bc('0x14')](_0xc535ac));if(_0xc535ac[_0x55bc('0x15')]){if(_0xc535ac[_0x55bc('0x15')]['code']===0x1f4){logger[_0x55bc('0x15')]('CmHopperHistory,\x20%s,\x20%s',_0x5719c9,_0xc535ac[_0x55bc('0x15')][_0x55bc('0x16')]);return _0x4d0610(_0xc535ac[_0x55bc('0x15')]['message']);}logger[_0x55bc('0x15')]('CmHopperHistory,\x20%s,\x20%s',_0x5719c9,_0xc535ac[_0x55bc('0x15')][_0x55bc('0x16')]);return _0x38839e(_0xc535ac[_0x55bc('0x15')]['message']);}else{logger[_0x55bc('0xf')](_0x55bc('0x10'),_0x5719c9,'request\x20sent');_0x38839e(_0xc535ac['result'][_0x55bc('0x16')]);}})['catch'](function(_0x482eea){logger[_0x55bc('0x15')](_0x55bc('0x10'),_0x5719c9,_0x482eea);_0x4d0610(_0x482eea);});});}exports[_0x55bc('0x17')]=function(_0x4e1764){var _0xed8b9e=this;return new Promise(function(_0x10f68f,_0x247abd){return db['CmHopperHistory'][_0x55bc('0x18')](_0x4e1764['body'],{'raw':_0x4e1764[_0x55bc('0x19')]?_0x4e1764['options']['raw']===undefined?!![]:![]:!![]})[_0x55bc('0xe')](function(_0x390af6){logger[_0x55bc('0xf')]('CreateCmHopperHistory',_0x4e1764);logger['debug']('CreateCmHopperHistory',_0x4e1764,JSON[_0x55bc('0x14')](_0x390af6));_0x10f68f(_0x390af6);})[_0x55bc('0x1a')](function(_0x4da0b8){logger['error'](_0x55bc('0x17'),_0x4da0b8[_0x55bc('0x16')],_0x4e1764);_0x247abd(_0xed8b9e[_0x55bc('0x15')](0x1f4,_0x4da0b8[_0x55bc('0x16')]));});});};exports['AvgHandleTime']=function(_0x21a3be){var _0x4f65cd=this;return new Promise(function(_0x540d89,_0x3e6254){return db[_0x55bc('0x1b')][_0x55bc('0x1c')]({'raw':_0x21a3be[_0x55bc('0x19')]?_0x21a3be[_0x55bc('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x21a3be[_0x55bc('0x19')]?_0x21a3be[_0x55bc('0x19')][_0x55bc('0x1d')]||null:null,'attributes':[[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['col']('id')),_0x55bc('0x20')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x22')))),_0x55bc('0x23')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')]['literal'](_0x55bc('0x24')))),_0x55bc('0x25')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize'][_0x55bc('0x21')](_0x55bc('0x26')))),_0x55bc('0x27')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x28'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x29')))),'predictiveIntervalAvgHoldtime'],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x28'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x2a')))),_0x55bc('0x2b')]]})['then'](function(_0x29976c){logger[_0x55bc('0xf')]('AvgHandleTime',_0x21a3be);logger[_0x55bc('0x12')](_0x55bc('0x2c'),_0x21a3be,JSON[_0x55bc('0x14')](_0x29976c));_0x540d89(_0x29976c);})[_0x55bc('0x1a')](function(_0x22e333){logger['error']('AvgHandleTime',_0x22e333[_0x55bc('0x16')],_0x21a3be);_0x3e6254(_0x4f65cd[_0x55bc('0x15')](0x1f4,_0x22e333[_0x55bc('0x16')]));});});};exports[_0x55bc('0x2d')]=function(_0xc034d9){var _0x3320db=this;return new Promise(function(_0x42977b,_0x38d0f9){return db['CmHopperHistory'][_0x55bc('0x1c')]({'raw':_0xc034d9[_0x55bc('0x19')]?_0xc034d9[_0x55bc('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0xc034d9['options']?_0xc034d9[_0x55bc('0x19')][_0x55bc('0x1d')]||null:null,'attributes':[[_0x55bc('0x2e'),_0x55bc('0x2f')],[db['sequelize']['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x30')))),_0x55bc('0x31')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db['sequelize']['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x32')))),_0x55bc('0x33')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')]['literal'](_0x55bc('0x22')))),_0x55bc('0x34')],[db['sequelize']['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x35')))),_0x55bc('0x36')],[db[_0x55bc('0x1e')]['fn']('COUNT',db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')]('`state`\x20=\x208,\x201,\x20null'))),_0x55bc('0x37')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize'][_0x55bc('0x21')]('`state`\x20=\x2010\x20,\x201,\x20null'))),'outboundDropCallsDayTimeout'],[db[_0x55bc('0x1e')]['fn']('COUNT',db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x38')))),'outboundDropCallsDayCallersExit'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')]('`state`\x20=\x2012,\x201,\x20null'))),_0x55bc('0x39')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize'][_0x55bc('0x21')](_0x55bc('0x3a')))),_0x55bc('0x3b')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db['sequelize']['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x3c')))),_0x55bc('0x3d')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize'][_0x55bc('0x21')](_0x55bc('0x3e')))),_0x55bc('0x3f')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x40')))),_0x55bc('0x41')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')]['literal']('`state`\x20=\x2020,\x201,\x20null'))),_0x55bc('0x3f')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db['sequelize']['fn']('IF',db[_0x55bc('0x1e')]['literal'](_0x55bc('0x42')))),'outboundReCallsDay']],'group':[_0x55bc('0x2e')]})['then'](function(_0x1ba9f3){logger[_0x55bc('0xf')](_0x55bc('0x2d'),_0xc034d9);logger['debug'](_0x55bc('0x2d'),_0xc034d9,JSON[_0x55bc('0x14')](_0x1ba9f3));_0x42977b(_0x1ba9f3);})[_0x55bc('0x1a')](function(_0x38c402){logger[_0x55bc('0x15')]('GetVoiceQueueHopperHistory',_0x38c402[_0x55bc('0x16')],_0xc034d9);_0x38d0f9(_0x3320db['error'](0x1f4,_0x38c402[_0x55bc('0x16')]));});});};exports[_0x55bc('0x43')]=function(_0x2d6f82){var _0x21cc1c=this;return new Promise(function(_0x44edf0,_0x137887){return db[_0x55bc('0x1b')][_0x55bc('0x1c')]({'raw':_0x2d6f82[_0x55bc('0x19')]?_0x2d6f82[_0x55bc('0x19')][_0x55bc('0x44')]===undefined?!![]:![]:!![],'where':_0x2d6f82[_0x55bc('0x19')]?_0x2d6f82[_0x55bc('0x19')][_0x55bc('0x1d')]||null:null,'attributes':[[_0x55bc('0x2e'),'name'],[db[_0x55bc('0x1e')]['fn']('COUNT',db[_0x55bc('0x1e')][_0x55bc('0x45')]('id')),_0x55bc('0x46')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize']['literal'](_0x55bc('0x22')))),_0x55bc('0x47')]],'group':[_0x55bc('0x2e')]})['then'](function(_0x266b11){logger[_0x55bc('0xf')]('GetCampaignHopperHistory',_0x2d6f82);logger[_0x55bc('0x12')](_0x55bc('0x43'),_0x2d6f82,JSON['stringify'](_0x266b11));_0x44edf0(_0x266b11);})[_0x55bc('0x1a')](function(_0x1b481a){logger[_0x55bc('0x15')]('GetCampaignHopperHistory',_0x1b481a[_0x55bc('0x16')],_0x2d6f82);_0x137887(_0x21cc1c[_0x55bc('0x15')](0x1f4,_0x1b481a[_0x55bc('0x16')]));});});};
\ No newline at end of file
+var _0x85cf=['options','raw','then','findAll','where','sequelize','col','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','COUNT','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','AvgHandleTime','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`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','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','ivrAnswerCallsDay','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','request','info','debug','request\x20sent','stringify','error','code','CmHopperHistory,\x20%s,\x20%s','message','result','catch','CreateCmHopperHistory','CmHopperHistory','create'];(function(_0x46a4bb,_0x2b1149){var _0x45660f=function(_0x1fe1b5){while(--_0x1fe1b5){_0x46a4bb['push'](_0x46a4bb['shift']());}};_0x45660f(++_0x2b1149);}(_0x85cf,0x76));var _0xf85c=function(_0x2abd03,_0x15bd78){_0x2abd03=_0x2abd03-0x0;var _0x397306=_0x85cf[_0x2abd03];return _0x397306;};'use strict';var _=require('lodash');var util=require(_0xf85c('0x0'));var moment=require(_0xf85c('0x1'));var BPromise=require(_0xf85c('0x2'));var rs=require(_0xf85c('0x3'));var fs=require('fs');var Redis=require(_0xf85c('0x4'));var db=require(_0xf85c('0x5'))['db'];var utils=require(_0xf85c('0x6'));var logger=require(_0xf85c('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xf85c('0x8'));var client=jayson[_0xf85c('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x386a60,_0x41d08d,_0xe1be83){return new BPromise(function(_0x1bebcf,_0x1857d9){return client[_0xf85c('0xa')](_0x386a60,_0xe1be83)['then'](function(_0x25aa6e){logger[_0xf85c('0xb')]('CmHopperHistory,\x20%s,\x20%s',_0x41d08d,'request\x20sent');logger[_0xf85c('0xc')]('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x41d08d,_0xf85c('0xd'),JSON[_0xf85c('0xe')](_0x25aa6e));if(_0x25aa6e[_0xf85c('0xf')]){if(_0x25aa6e['error'][_0xf85c('0x10')]===0x1f4){logger[_0xf85c('0xf')](_0xf85c('0x11'),_0x41d08d,_0x25aa6e[_0xf85c('0xf')]['message']);return _0x1857d9(_0x25aa6e[_0xf85c('0xf')][_0xf85c('0x12')]);}logger[_0xf85c('0xf')](_0xf85c('0x11'),_0x41d08d,_0x25aa6e['error'][_0xf85c('0x12')]);return _0x1bebcf(_0x25aa6e['error'][_0xf85c('0x12')]);}else{logger['info'](_0xf85c('0x11'),_0x41d08d,'request\x20sent');_0x1bebcf(_0x25aa6e[_0xf85c('0x13')]['message']);}})[_0xf85c('0x14')](function(_0x30b768){logger[_0xf85c('0xf')](_0xf85c('0x11'),_0x41d08d,_0x30b768);_0x1857d9(_0x30b768);});});}exports[_0xf85c('0x15')]=function(_0x5260c5){var _0x495854=this;return new Promise(function(_0x389693,_0x5a4a80){return db[_0xf85c('0x16')][_0xf85c('0x17')](_0x5260c5['body'],{'raw':_0x5260c5[_0xf85c('0x18')]?_0x5260c5[_0xf85c('0x18')][_0xf85c('0x19')]===undefined?!![]:![]:!![]})[_0xf85c('0x1a')](function(_0x41ff9e){logger['info'](_0xf85c('0x15'),_0x5260c5);logger['debug'](_0xf85c('0x15'),_0x5260c5,JSON[_0xf85c('0xe')](_0x41ff9e));_0x389693(_0x41ff9e);})['catch'](function(_0x5e7c08){logger[_0xf85c('0xf')](_0xf85c('0x15'),_0x5e7c08[_0xf85c('0x12')],_0x5260c5);_0x5a4a80(_0x495854[_0xf85c('0xf')](0x1f4,_0x5e7c08[_0xf85c('0x12')]));});});};exports['AvgHandleTime']=function(_0x903fe6){var _0xae5462=this;return new Promise(function(_0x550cf3,_0x5c819f){return db[_0xf85c('0x16')][_0xf85c('0x1b')]({'raw':_0x903fe6[_0xf85c('0x18')]?_0x903fe6['options'][_0xf85c('0x19')]===undefined?!![]:![]:!![],'where':_0x903fe6['options']?_0x903fe6['options'][_0xf85c('0x1c')]||null:null,'attributes':[[db[_0xf85c('0x1d')]['fn']('COUNT',db[_0xf85c('0x1d')][_0xf85c('0x1e')]('id')),'predictiveIntervalTotalCalls'],[db[_0xf85c('0x1d')]['fn']('COUNT',db[_0xf85c('0x1d')]['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x20')))),_0xf85c('0x21')],[db['sequelize']['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x23')))),_0xf85c('0x24')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')]('`state`\x20=\x2011,\x201,\x20null'))),_0xf85c('0x25')],[db['sequelize']['fn'](_0xf85c('0x26'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x27')))),_0xf85c('0x28')],[db[_0xf85c('0x1d')]['fn']('AVG',db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x29')))),_0xf85c('0x2a')]]})[_0xf85c('0x1a')](function(_0x13c5fd){logger[_0xf85c('0xb')]('AvgHandleTime',_0x903fe6);logger['debug'](_0xf85c('0x2b'),_0x903fe6,JSON['stringify'](_0x13c5fd));_0x550cf3(_0x13c5fd);})[_0xf85c('0x14')](function(_0x3e9355){logger[_0xf85c('0xf')]('AvgHandleTime',_0x3e9355[_0xf85c('0x12')],_0x903fe6);_0x5c819f(_0xae5462[_0xf85c('0xf')](0x1f4,_0x3e9355['message']));});});};exports['GetVoiceQueueHopperHistory']=function(_0x55c877){var _0x56bac2=this;return new Promise(function(_0x34e08d,_0x3d45f3){return db['CmHopperHistory'][_0xf85c('0x1b')]({'raw':_0x55c877[_0xf85c('0x18')]?_0x55c877[_0xf85c('0x18')][_0xf85c('0x19')]===undefined?!![]:![]:!![],'where':_0x55c877[_0xf85c('0x18')]?_0x55c877['options'][_0xf85c('0x1c')]||null:null,'attributes':[[_0xf85c('0x2c'),_0xf85c('0x2d')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')]['literal'](_0xf85c('0x2e')))),_0xf85c('0x2f')],[db[_0xf85c('0x1d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x30')))),_0xf85c('0x31')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x20')))),_0xf85c('0x32')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x33')))),_0xf85c('0x34')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x35')))),_0xf85c('0x36')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x37')))),_0xf85c('0x38')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x39')))),_0xf85c('0x3a')],[db[_0xf85c('0x1d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xf85c('0x1d')]['literal'](_0xf85c('0x3b')))),'outboundUnknownCallsDay'],[db[_0xf85c('0x1d')]['fn']('COUNT',db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')]['literal']('`state`\x20=\x2013,\x201,\x20null'))),_0xf85c('0x3c')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db['sequelize']['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x3d')))),'outboundOriginateFailureCallsDay'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x3e')))),_0xf85c('0x3f')],[db['sequelize']['fn']('COUNT',db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')]['literal'](_0xf85c('0x40')))),_0xf85c('0x41')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db['sequelize']['literal']('`state`\x20=\x2020,\x201,\x20null'))),_0xf85c('0x3f')],[db['sequelize']['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')]['literal'](_0xf85c('0x42')))),_0xf85c('0x43')]],'group':[_0xf85c('0x2c')]})[_0xf85c('0x1a')](function(_0x1e72ec){logger[_0xf85c('0xb')](_0xf85c('0x44'),_0x55c877);logger['debug'](_0xf85c('0x44'),_0x55c877,JSON[_0xf85c('0xe')](_0x1e72ec));_0x34e08d(_0x1e72ec);})[_0xf85c('0x14')](function(_0x54ec6c){logger[_0xf85c('0xf')](_0xf85c('0x44'),_0x54ec6c[_0xf85c('0x12')],_0x55c877);_0x3d45f3(_0x56bac2[_0xf85c('0xf')](0x1f4,_0x54ec6c['message']));});});};exports[_0xf85c('0x45')]=function(_0x51cd31){var _0x4edb2d=this;return new Promise(function(_0x1bc2ce,_0xd478ad){return db[_0xf85c('0x16')][_0xf85c('0x1b')]({'raw':_0x51cd31['options']?_0x51cd31['options'][_0xf85c('0x19')]===undefined?!![]:![]:!![],'where':_0x51cd31[_0xf85c('0x18')]?_0x51cd31['options']['where']||null:null,'attributes':[['campaign',_0xf85c('0x2d')],[db['sequelize']['fn']('COUNT',db[_0xf85c('0x1d')]['col']('id')),'ivrTotalCallsDays'],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x20')))),_0xf85c('0x46')]],'group':[_0xf85c('0x2c')]})['then'](function(_0x227a93){logger['info']('GetCampaignHopperHistory',_0x51cd31);logger[_0xf85c('0xc')](_0xf85c('0x45'),_0x51cd31,JSON[_0xf85c('0xe')](_0x227a93));_0x1bc2ce(_0x227a93);})['catch'](function(_0x4601fb){logger[_0xf85c('0xf')](_0xf85c('0x45'),_0x4601fb[_0xf85c('0x12')],_0x51cd31);_0xd478ad(_0x4edb2d['error'](0x1f4,_0x4601fb[_0xf85c('0x12')]));});});};
\ No newline at end of file