Built motion from commit 42801a18.|2.6.28
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 8a8173b..636219f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3b4=['outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','ivrTotalCallsDays','ivrAnswerCallsDay','GetCampaignHopperHistory','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','CmHopperHistory,\x20%s,\x20%s','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','AvgHandleTime','findAll','where','sequelize','COUNT','col','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','then','GetVoiceQueueHopperHistory','campaign','name','outboundNoSuchCallsDay'];(function(_0x484c03,_0x13c1d2){var _0x294127=function(_0x45a834){while(--_0x45a834){_0x484c03['push'](_0x484c03['shift']());}};_0x294127(++_0x13c1d2);}(_0xd3b4,0x1e9));var _0x4d3b=function(_0x351260,_0x3275ae){_0x351260=_0x351260-0x0;var _0x3303bb=_0xd3b4[_0x351260];return _0x3303bb;};'use strict';var _=require(_0x4d3b('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x4d3b('0x1'));var rs=require(_0x4d3b('0x2'));var fs=require('fs');var Redis=require(_0x4d3b('0x3'));var db=require(_0x4d3b('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4d3b('0x5'))('rpc');var config=require(_0x4d3b('0x6'));var jayson=require(_0x4d3b('0x7'));var client=jayson[_0x4d3b('0x8')][_0x4d3b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xe4511c,_0x64ad89,_0x331043){return new BPromise(function(_0x7b17b9,_0x207a6e){return client[_0x4d3b('0xa')](_0xe4511c,_0x331043)['then'](function(_0x30e71a){logger['info'](_0x4d3b('0xb'),_0x64ad89,'request\x20sent');logger[_0x4d3b('0xc')](_0x4d3b('0xd'),_0x64ad89,_0x4d3b('0xe'),JSON[_0x4d3b('0xf')](_0x30e71a));if(_0x30e71a[_0x4d3b('0x10')]){if(_0x30e71a[_0x4d3b('0x10')][_0x4d3b('0x11')]===0x1f4){logger[_0x4d3b('0x10')](_0x4d3b('0xb'),_0x64ad89,_0x30e71a[_0x4d3b('0x10')][_0x4d3b('0x12')]);return _0x207a6e(_0x30e71a[_0x4d3b('0x10')]['message']);}logger[_0x4d3b('0x10')](_0x4d3b('0xb'),_0x64ad89,_0x30e71a[_0x4d3b('0x10')][_0x4d3b('0x12')]);return _0x7b17b9(_0x30e71a[_0x4d3b('0x10')][_0x4d3b('0x12')]);}else{logger[_0x4d3b('0x13')](_0x4d3b('0xb'),_0x64ad89,_0x4d3b('0xe'));_0x7b17b9(_0x30e71a[_0x4d3b('0x14')]['message']);}})[_0x4d3b('0x15')](function(_0x53c21a){logger[_0x4d3b('0x10')](_0x4d3b('0xb'),_0x64ad89,_0x53c21a);_0x207a6e(_0x53c21a);});});}exports[_0x4d3b('0x16')]=function(_0x408b9b){var _0x4f5ac6=this;return new Promise(function(_0x2f8a24,_0x393b68){return db[_0x4d3b('0x17')][_0x4d3b('0x18')](_0x408b9b[_0x4d3b('0x19')],{'raw':_0x408b9b[_0x4d3b('0x1a')]?_0x408b9b[_0x4d3b('0x1a')][_0x4d3b('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x44da95){logger[_0x4d3b('0x13')](_0x4d3b('0x16'),_0x408b9b);logger[_0x4d3b('0xc')](_0x4d3b('0x16'),_0x408b9b,JSON['stringify'](_0x44da95));_0x2f8a24(_0x44da95);})[_0x4d3b('0x15')](function(_0x19c4c0){logger[_0x4d3b('0x10')]('CreateCmHopperHistory',_0x19c4c0[_0x4d3b('0x12')],_0x408b9b);_0x393b68(_0x4f5ac6['error'](0x1f4,_0x19c4c0[_0x4d3b('0x12')]));});});};exports[_0x4d3b('0x1c')]=function(_0xc3fe1d){var _0x5b94fc=this;return new Promise(function(_0x26c9ca,_0x31bd95){return db[_0x4d3b('0x17')][_0x4d3b('0x1d')]({'raw':_0xc3fe1d['options']?_0xc3fe1d[_0x4d3b('0x1a')][_0x4d3b('0x1b')]===undefined?!![]:![]:!![],'where':_0xc3fe1d[_0x4d3b('0x1a')]?_0xc3fe1d[_0x4d3b('0x1a')][_0x4d3b('0x1e')]||null:null,'attributes':[[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')][_0x4d3b('0x21')]('id')),'predictiveIntervalTotalCalls'],[db[_0x4d3b('0x1f')]['fn']('COUNT',db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')](_0x4d3b('0x23')))),_0x4d3b('0x24')],[db[_0x4d3b('0x1f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x4d3b('0x1f')]['literal']('`state`\x20=\x2010,\x201,\x20null'))),_0x4d3b('0x25')],[db['sequelize']['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')]('`state`\x20=\x2011,\x201,\x20null'))),'predictiveIntervalDroppedCallsCallersExit'],[db['sequelize']['fn'](_0x4d3b('0x26'),db['sequelize']['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')](_0x4d3b('0x27')))),_0x4d3b('0x28')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x26'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')](_0x4d3b('0x29')))),'predictiveIntervalAvgTalktime']]})[_0x4d3b('0x2a')](function(_0x4978b6){logger['info'](_0x4d3b('0x1c'),_0xc3fe1d);logger[_0x4d3b('0xc')](_0x4d3b('0x1c'),_0xc3fe1d,JSON[_0x4d3b('0xf')](_0x4978b6));_0x26c9ca(_0x4978b6);})[_0x4d3b('0x15')](function(_0x1aa962){logger[_0x4d3b('0x10')](_0x4d3b('0x1c'),_0x1aa962[_0x4d3b('0x12')],_0xc3fe1d);_0x31bd95(_0x5b94fc[_0x4d3b('0x10')](0x1f4,_0x1aa962['message']));});});};exports[_0x4d3b('0x2b')]=function(_0x5ab93b){var _0x550596=this;return new Promise(function(_0x319bcf,_0x48e72c){return db[_0x4d3b('0x17')][_0x4d3b('0x1d')]({'raw':_0x5ab93b['options']?_0x5ab93b['options'][_0x4d3b('0x1b')]===undefined?!![]:![]:!![],'where':_0x5ab93b[_0x4d3b('0x1a')]?_0x5ab93b[_0x4d3b('0x1a')]['where']||null:null,'attributes':[[_0x4d3b('0x2c'),_0x4d3b('0x2d')],[db[_0x4d3b('0x1f')]['fn']('COUNT',db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')]('`state`\x20=\x200,\x201,\x20null'))),_0x4d3b('0x2e')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')]('`state`\x20=\x203,\x201,\x20null'))),_0x4d3b('0x2f')],[db[_0x4d3b('0x1f')]['fn']('COUNT',db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')]['literal']('`state`\x20=\x204,\x201,\x20null'))),_0x4d3b('0x30')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')](_0x4d3b('0x31')))),_0x4d3b('0x32')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db['sequelize'][_0x4d3b('0x22')](_0x4d3b('0x33')))),'outboundCongestionCallsDay'],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db['sequelize']['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')](_0x4d3b('0x34')))),'outboundDropCallsDayTimeout'],[db['sequelize']['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x4d3b('0x35')],[db[_0x4d3b('0x1f')]['fn']('COUNT',db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')]['literal'](_0x4d3b('0x36')))),_0x4d3b('0x37')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')]('`state`\x20=\x2013,\x201,\x20null'))),_0x4d3b('0x38')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')]('`state`\x20=\x2014,\x201,\x20null'))),_0x4d3b('0x39')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')](_0x4d3b('0x3a')))),_0x4d3b('0x3b')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db[_0x4d3b('0x1f')]['literal'](_0x4d3b('0x3c')))),_0x4d3b('0x3d')],[db[_0x4d3b('0x1f')]['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db['sequelize'][_0x4d3b('0x22')]('`state`\x20=\x2020,\x201,\x20null'))),_0x4d3b('0x3b')],[db['sequelize']['fn'](_0x4d3b('0x20'),db['sequelize']['fn']('IF',db[_0x4d3b('0x1f')][_0x4d3b('0x22')](_0x4d3b('0x3e')))),_0x4d3b('0x3f')]],'group':[_0x4d3b('0x2c')]})[_0x4d3b('0x2a')](function(_0x171499){logger[_0x4d3b('0x13')](_0x4d3b('0x2b'),_0x5ab93b);logger[_0x4d3b('0xc')](_0x4d3b('0x2b'),_0x5ab93b,JSON[_0x4d3b('0xf')](_0x171499));_0x319bcf(_0x171499);})['catch'](function(_0x381e23){logger[_0x4d3b('0x10')](_0x4d3b('0x2b'),_0x381e23[_0x4d3b('0x12')],_0x5ab93b);_0x48e72c(_0x550596['error'](0x1f4,_0x381e23[_0x4d3b('0x12')]));});});};exports['GetCampaignHopperHistory']=function(_0x15c904){var _0xe32799=this;return new Promise(function(_0x292b2f,_0x515cb6){return db[_0x4d3b('0x17')][_0x4d3b('0x1d')]({'raw':_0x15c904[_0x4d3b('0x1a')]?_0x15c904[_0x4d3b('0x1a')][_0x4d3b('0x1b')]===undefined?!![]:![]:!![],'where':_0x15c904['options']?_0x15c904[_0x4d3b('0x1a')][_0x4d3b('0x1e')]||null:null,'attributes':[[_0x4d3b('0x2c'),_0x4d3b('0x2d')],[db[_0x4d3b('0x1f')]['fn']('COUNT',db[_0x4d3b('0x1f')]['col']('id')),_0x4d3b('0x40')],[db['sequelize']['fn'](_0x4d3b('0x20'),db[_0x4d3b('0x1f')]['fn']('IF',db['sequelize'][_0x4d3b('0x22')]('`state`\x20=\x204,\x201,\x20null'))),_0x4d3b('0x41')]],'group':[_0x4d3b('0x2c')]})[_0x4d3b('0x2a')](function(_0x462b76){logger['info'](_0x4d3b('0x42'),_0x15c904);logger[_0x4d3b('0xc')](_0x4d3b('0x42'),_0x15c904,JSON[_0x4d3b('0xf')](_0x462b76));_0x292b2f(_0x462b76);})[_0x4d3b('0x15')](function(_0x27a8d7){logger['error'](_0x4d3b('0x42'),_0x27a8d7[_0x4d3b('0x12')],_0x15c904);_0x515cb6(_0xe32799['error'](0x1f4,_0x27a8d7[_0x4d3b('0x12')]));});});};
\ No newline at end of file
+var _0x13f7=['GetCampaignHopperHistory','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','http','request','then','info','CmHopperHistory,\x20%s,\x20%s','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','CreateCmHopperHistory','CmHopperHistory','create','body','options','stringify','AvgHandleTime','findAll','raw','where','sequelize','COUNT','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','`state`\x20=\x204,\x20`holdtime`,\x20null','AVG','`state`\x20=\x204,\x20`talktime`,\x20null','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','`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','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','ivrTotalCallsDays','ivrAnswerCallsDay'];(function(_0x10e45e,_0x53efa5){var _0x444495=function(_0x24a734){while(--_0x24a734){_0x10e45e['push'](_0x10e45e['shift']());}};_0x444495(++_0x53efa5);}(_0x13f7,0x164));var _0x713f=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x13f7[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x713f('0x0'));var util=require(_0x713f('0x1'));var moment=require(_0x713f('0x2'));var BPromise=require(_0x713f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x713f('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x713f('0x5'));var logger=require(_0x713f('0x6'))(_0x713f('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x713f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2571f6,_0x57616c,_0x4f7a31){return new BPromise(function(_0x2a47f5,_0x59874f){return client[_0x713f('0x9')](_0x2571f6,_0x4f7a31)[_0x713f('0xa')](function(_0x3f594c){logger[_0x713f('0xb')](_0x713f('0xc'),_0x57616c,'request\x20sent');logger[_0x713f('0xd')](_0x713f('0xe'),_0x57616c,_0x713f('0xf'),JSON['stringify'](_0x3f594c));if(_0x3f594c[_0x713f('0x10')]){if(_0x3f594c[_0x713f('0x10')][_0x713f('0x11')]===0x1f4){logger[_0x713f('0x10')](_0x713f('0xc'),_0x57616c,_0x3f594c[_0x713f('0x10')][_0x713f('0x12')]);return _0x59874f(_0x3f594c[_0x713f('0x10')][_0x713f('0x12')]);}logger[_0x713f('0x10')](_0x713f('0xc'),_0x57616c,_0x3f594c[_0x713f('0x10')][_0x713f('0x12')]);return _0x2a47f5(_0x3f594c[_0x713f('0x10')]['message']);}else{logger[_0x713f('0xb')](_0x713f('0xc'),_0x57616c,'request\x20sent');_0x2a47f5(_0x3f594c[_0x713f('0x13')][_0x713f('0x12')]);}})[_0x713f('0x14')](function(_0x332b29){logger[_0x713f('0x10')](_0x713f('0xc'),_0x57616c,_0x332b29);_0x59874f(_0x332b29);});});}exports[_0x713f('0x15')]=function(_0x5a4501){var _0x55e850=this;return new Promise(function(_0x1f88ba,_0x49792d){return db[_0x713f('0x16')][_0x713f('0x17')](_0x5a4501[_0x713f('0x18')],{'raw':_0x5a4501[_0x713f('0x19')]?_0x5a4501['options']['raw']===undefined?!![]:![]:!![]})[_0x713f('0xa')](function(_0x184bfc){logger['info']('CreateCmHopperHistory',_0x5a4501);logger['debug'](_0x713f('0x15'),_0x5a4501,JSON[_0x713f('0x1a')](_0x184bfc));_0x1f88ba(_0x184bfc);})['catch'](function(_0x1f45be){logger[_0x713f('0x10')](_0x713f('0x15'),_0x1f45be[_0x713f('0x12')],_0x5a4501);_0x49792d(_0x55e850[_0x713f('0x10')](0x1f4,_0x1f45be[_0x713f('0x12')]));});});};exports[_0x713f('0x1b')]=function(_0x23a2e2){var _0x1b6fc1=this;return new Promise(function(_0x3dc44c,_0x193d69){return db[_0x713f('0x16')][_0x713f('0x1c')]({'raw':_0x23a2e2[_0x713f('0x19')]?_0x23a2e2[_0x713f('0x19')][_0x713f('0x1d')]===undefined?!![]:![]:!![],'where':_0x23a2e2[_0x713f('0x19')]?_0x23a2e2['options'][_0x713f('0x1e')]||null:null,'attributes':[[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')][_0x713f('0x21')]('id')),_0x713f('0x22')],[db[_0x713f('0x1f')]['fn']('COUNT',db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x24')))),'predictiveIntervalAnsweredCalls'],[db['sequelize']['fn']('COUNT',db[_0x713f('0x1f')]['fn']('IF',db['sequelize'][_0x713f('0x23')](_0x713f('0x25')))),_0x713f('0x26')],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x27')))),_0x713f('0x28')],[db['sequelize']['fn']('AVG',db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x29')))),'predictiveIntervalAvgHoldtime'],[db[_0x713f('0x1f')]['fn'](_0x713f('0x2a'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x2b')))),'predictiveIntervalAvgTalktime']]})['then'](function(_0x11dfc2){logger[_0x713f('0xb')]('AvgHandleTime',_0x23a2e2);logger['debug'](_0x713f('0x1b'),_0x23a2e2,JSON[_0x713f('0x1a')](_0x11dfc2));_0x3dc44c(_0x11dfc2);})[_0x713f('0x14')](function(_0x402246){logger[_0x713f('0x10')]('AvgHandleTime',_0x402246[_0x713f('0x12')],_0x23a2e2);_0x193d69(_0x1b6fc1[_0x713f('0x10')](0x1f4,_0x402246[_0x713f('0x12')]));});});};exports[_0x713f('0x2c')]=function(_0xfdf0e){var _0x4fa1d9=this;return new Promise(function(_0x4a8999,_0xae87ea){return db[_0x713f('0x16')][_0x713f('0x1c')]({'raw':_0xfdf0e[_0x713f('0x19')]?_0xfdf0e[_0x713f('0x19')][_0x713f('0x1d')]===undefined?!![]:![]:!![],'where':_0xfdf0e['options']?_0xfdf0e['options']['where']||null:null,'attributes':[[_0x713f('0x2d'),_0x713f('0x2e')],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x2f')))),_0x713f('0x30')],[db[_0x713f('0x1f')]['fn']('COUNT',db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x31')))),_0x713f('0x32')],[db['sequelize']['fn']('COUNT',db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')]('`state`\x20=\x204,\x201,\x20null'))),'outboundAnswerCallsDay'],[db[_0x713f('0x1f')]['fn']('COUNT',db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')]['literal'](_0x713f('0x33')))),'outboundBusyCallsDay'],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x34')))),_0x713f('0x35')],[db['sequelize']['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x36')))),_0x713f('0x37')],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')]['literal'](_0x713f('0x38')))),_0x713f('0x39')],[db[_0x713f('0x1f')]['fn']('COUNT',db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x3a')))),'outboundUnknownCallsDay'],[db[_0x713f('0x1f')]['fn']('COUNT',db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')]('`state`\x20=\x2013,\x201,\x20null'))),_0x713f('0x3b')],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db['sequelize'][_0x713f('0x23')](_0x713f('0x3c')))),_0x713f('0x3d')],[db['sequelize']['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x3e')))),'outboundRejectCallsDay'],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db['sequelize'][_0x713f('0x23')]('`state`\x20=\x2016,\x201,\x20null'))),_0x713f('0x3f')],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x40')))),_0x713f('0x41')],[db[_0x713f('0x1f')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x42')))),_0x713f('0x43')]],'group':[_0x713f('0x2d')]})[_0x713f('0xa')](function(_0x5aba02){logger[_0x713f('0xb')](_0x713f('0x2c'),_0xfdf0e);logger['debug'](_0x713f('0x2c'),_0xfdf0e,JSON[_0x713f('0x1a')](_0x5aba02));_0x4a8999(_0x5aba02);})[_0x713f('0x14')](function(_0x3d9391){logger[_0x713f('0x10')](_0x713f('0x2c'),_0x3d9391[_0x713f('0x12')],_0xfdf0e);_0xae87ea(_0x4fa1d9['error'](0x1f4,_0x3d9391[_0x713f('0x12')]));});});};exports['GetCampaignHopperHistory']=function(_0x1dfa64){var _0x24a35f=this;return new Promise(function(_0x64fe7d,_0x2de6ce){return db[_0x713f('0x16')][_0x713f('0x1c')]({'raw':_0x1dfa64[_0x713f('0x19')]?_0x1dfa64['options'][_0x713f('0x1d')]===undefined?!![]:![]:!![],'where':_0x1dfa64['options']?_0x1dfa64[_0x713f('0x19')][_0x713f('0x1e')]||null:null,'attributes':[[_0x713f('0x2d'),'name'],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['col']('id')),_0x713f('0x44')],[db[_0x713f('0x1f')]['fn'](_0x713f('0x20'),db[_0x713f('0x1f')]['fn']('IF',db[_0x713f('0x1f')][_0x713f('0x23')](_0x713f('0x24')))),_0x713f('0x45')]],'group':[_0x713f('0x2d')]})['then'](function(_0x5d164b){logger[_0x713f('0xb')](_0x713f('0x46'),_0x1dfa64);logger['debug'](_0x713f('0x46'),_0x1dfa64,JSON['stringify'](_0x5d164b));_0x64fe7d(_0x5d164b);})[_0x713f('0x14')](function(_0x40652a){logger[_0x713f('0x10')](_0x713f('0x46'),_0x40652a[_0x713f('0x12')],_0x1dfa64);_0x2de6ce(_0x24a35f[_0x713f('0x10')](0x1f4,_0x40652a[_0x713f('0x12')]));});});};
\ No newline at end of file