Built motion from commit 980b26c3.|2.6.29
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 22df216..a457838 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4e34=['options','raw','then','stringify','AvgHandleTime','where','sequelize','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','COUNT','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','GetVoiceQueueHopperHistory','findAll','campaign','name','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetCampaignHopperHistory','ivrAnswerCallsDay','moment','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','http','request','info','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','error','code','message','CmHopperHistory,\x20%s,\x20%s','request\x20sent','catch','CreateCmHopperHistory','CmHopperHistory','body'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x4e34,0x19e));var _0x44e3=function(_0x5656a2,_0x2d29c2){_0x5656a2=_0x5656a2-0x0;var _0x48319e=_0x4e34[_0x5656a2];return _0x48319e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x44e3('0x0'));var BPromise=require(_0x44e3('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x44e3('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0x44e3('0x3'))(_0x44e3('0x4'));var config=require(_0x44e3('0x5'));var jayson=require('jayson/promise');var client=jayson['client'][_0x44e3('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x19e7de,_0x163879,_0x1ca56e){return new BPromise(function(_0x37b7d4,_0x196941){return client[_0x44e3('0x7')](_0x19e7de,_0x1ca56e)['then'](function(_0xf7e448){logger[_0x44e3('0x8')]('CmHopperHistory,\x20%s,\x20%s',_0x163879,'request\x20sent');logger[_0x44e3('0x9')](_0x44e3('0xa'),_0x163879,'request\x20sent',JSON['stringify'](_0xf7e448));if(_0xf7e448[_0x44e3('0xb')]){if(_0xf7e448[_0x44e3('0xb')][_0x44e3('0xc')]===0x1f4){logger[_0x44e3('0xb')]('CmHopperHistory,\x20%s,\x20%s',_0x163879,_0xf7e448[_0x44e3('0xb')][_0x44e3('0xd')]);return _0x196941(_0xf7e448[_0x44e3('0xb')][_0x44e3('0xd')]);}logger[_0x44e3('0xb')](_0x44e3('0xe'),_0x163879,_0xf7e448[_0x44e3('0xb')][_0x44e3('0xd')]);return _0x37b7d4(_0xf7e448['error'][_0x44e3('0xd')]);}else{logger['info'](_0x44e3('0xe'),_0x163879,_0x44e3('0xf'));_0x37b7d4(_0xf7e448['result'][_0x44e3('0xd')]);}})[_0x44e3('0x10')](function(_0x103eb0){logger[_0x44e3('0xb')](_0x44e3('0xe'),_0x163879,_0x103eb0);_0x196941(_0x103eb0);});});}exports[_0x44e3('0x11')]=function(_0x33128){var _0xe495c5=this;return new Promise(function(_0x14e44c,_0x5cc0ca){return db[_0x44e3('0x12')]['create'](_0x33128[_0x44e3('0x13')],{'raw':_0x33128['options']?_0x33128[_0x44e3('0x14')][_0x44e3('0x15')]===undefined?!![]:![]:!![]})[_0x44e3('0x16')](function(_0x4607ce){logger[_0x44e3('0x8')](_0x44e3('0x11'),_0x33128);logger[_0x44e3('0x9')](_0x44e3('0x11'),_0x33128,JSON[_0x44e3('0x17')](_0x4607ce));_0x14e44c(_0x4607ce);})[_0x44e3('0x10')](function(_0x25e2e1){logger['error']('CreateCmHopperHistory',_0x25e2e1[_0x44e3('0xd')],_0x33128);_0x5cc0ca(_0xe495c5['error'](0x1f4,_0x25e2e1[_0x44e3('0xd')]));});});};exports[_0x44e3('0x18')]=function(_0x579877){var _0x61a5cd=this;return new Promise(function(_0x372e9c,_0x39cde4){return db[_0x44e3('0x12')]['findAll']({'raw':_0x579877[_0x44e3('0x14')]?_0x579877[_0x44e3('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0x579877[_0x44e3('0x14')]?_0x579877[_0x44e3('0x14')][_0x44e3('0x19')]||null:null,'attributes':[[db[_0x44e3('0x1a')]['fn']('COUNT',db['sequelize'][_0x44e3('0x1b')]('id')),_0x44e3('0x1c')],[db[_0x44e3('0x1a')]['fn']('COUNT',db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')](_0x44e3('0x1e')))),_0x44e3('0x1f')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')]('`state`\x20=\x2010,\x201,\x20null'))),_0x44e3('0x21')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')]('`state`\x20=\x2011,\x201,\x20null'))),_0x44e3('0x22')],[db[_0x44e3('0x1a')]['fn']('AVG',db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')]['literal'](_0x44e3('0x23')))),_0x44e3('0x24')],[db[_0x44e3('0x1a')]['fn']('AVG',db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')](_0x44e3('0x25')))),'predictiveIntervalAvgTalktime']]})[_0x44e3('0x16')](function(_0x582cc1){logger[_0x44e3('0x8')](_0x44e3('0x18'),_0x579877);logger[_0x44e3('0x9')](_0x44e3('0x18'),_0x579877,JSON[_0x44e3('0x17')](_0x582cc1));_0x372e9c(_0x582cc1);})['catch'](function(_0x896d20){logger[_0x44e3('0xb')](_0x44e3('0x18'),_0x896d20[_0x44e3('0xd')],_0x579877);_0x39cde4(_0x61a5cd[_0x44e3('0xb')](0x1f4,_0x896d20[_0x44e3('0xd')]));});});};exports[_0x44e3('0x26')]=function(_0x439969){var _0x5f27e7=this;return new Promise(function(_0x279369,_0x508b5f){return db[_0x44e3('0x12')][_0x44e3('0x27')]({'raw':_0x439969[_0x44e3('0x14')]?_0x439969[_0x44e3('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0x439969[_0x44e3('0x14')]?_0x439969[_0x44e3('0x14')]['where']||null:null,'attributes':[[_0x44e3('0x28'),_0x44e3('0x29')],[db['sequelize']['fn'](_0x44e3('0x20'),db['sequelize']['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')]('`state`\x20=\x200,\x201,\x20null'))),_0x44e3('0x2a')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db['sequelize']['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')](_0x44e3('0x2b')))),_0x44e3('0x2c')],[db[_0x44e3('0x1a')]['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0x44e3('0x1d')](_0x44e3('0x1e')))),_0x44e3('0x2d')],[db[_0x44e3('0x1a')]['fn']('COUNT',db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')]('`state`\x20=\x205,\x201,\x20null'))),_0x44e3('0x2e')],[db[_0x44e3('0x1a')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x44e3('0x1a')]['literal']('`state`\x20=\x208,\x201,\x20null'))),_0x44e3('0x2f')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db['sequelize']['literal']('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x44e3('0x30')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')](_0x44e3('0x31')))),_0x44e3('0x32')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db['sequelize'][_0x44e3('0x1d')](_0x44e3('0x33')))),'outboundUnknownCallsDay'],[db['sequelize']['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')]['literal'](_0x44e3('0x34')))),_0x44e3('0x35')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')]('`state`\x20=\x2014,\x201,\x20null'))),_0x44e3('0x36')],[db[_0x44e3('0x1a')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')]('`state`\x20=\x2018,\x201,\x20null'))),_0x44e3('0x37')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')]('`state`\x20=\x2016,\x201,\x20null'))),_0x44e3('0x38')],[db[_0x44e3('0x1a')]['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')](_0x44e3('0x39')))),'outboundRejectCallsDay'],[db[_0x44e3('0x1a')]['fn']('COUNT',db[_0x44e3('0x1a')]['fn']('IF',db[_0x44e3('0x1a')][_0x44e3('0x1d')](_0x44e3('0x3a')))),_0x44e3('0x3b')]],'group':[_0x44e3('0x28')]})[_0x44e3('0x16')](function(_0x54a29e){logger[_0x44e3('0x8')](_0x44e3('0x26'),_0x439969);logger[_0x44e3('0x9')](_0x44e3('0x26'),_0x439969,JSON[_0x44e3('0x17')](_0x54a29e));_0x279369(_0x54a29e);})['catch'](function(_0x5ae500){logger[_0x44e3('0xb')](_0x44e3('0x26'),_0x5ae500[_0x44e3('0xd')],_0x439969);_0x508b5f(_0x5f27e7[_0x44e3('0xb')](0x1f4,_0x5ae500['message']));});});};exports[_0x44e3('0x3c')]=function(_0x4ecf98){var _0x309482=this;return new Promise(function(_0x10b36a,_0x361647){return db[_0x44e3('0x12')][_0x44e3('0x27')]({'raw':_0x4ecf98['options']?_0x4ecf98[_0x44e3('0x14')][_0x44e3('0x15')]===undefined?!![]:![]:!![],'where':_0x4ecf98[_0x44e3('0x14')]?_0x4ecf98[_0x44e3('0x14')][_0x44e3('0x19')]||null:null,'attributes':[[_0x44e3('0x28'),_0x44e3('0x29')],[db['sequelize']['fn'](_0x44e3('0x20'),db[_0x44e3('0x1a')][_0x44e3('0x1b')]('id')),'ivrTotalCallsDays'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x44e3('0x1a')]['literal']('`state`\x20=\x204,\x201,\x20null'))),_0x44e3('0x3d')]],'group':[_0x44e3('0x28')]})[_0x44e3('0x16')](function(_0x507e47){logger[_0x44e3('0x8')](_0x44e3('0x3c'),_0x4ecf98);logger[_0x44e3('0x9')](_0x44e3('0x3c'),_0x4ecf98,JSON['stringify'](_0x507e47));_0x10b36a(_0x507e47);})[_0x44e3('0x10')](function(_0x1ac34e){logger[_0x44e3('0xb')]('GetCampaignHopperHistory',_0x1ac34e[_0x44e3('0xd')],_0x4ecf98);_0x361647(_0x309482[_0x44e3('0xb')](0x1f4,_0x1ac34e[_0x44e3('0xd')]));});});};
\ No newline at end of file
+var _0x97f5=['CmHopperHistory','create','options','raw','CreateCmHopperHistory','debug','stringify','AvgHandleTime','where','COUNT','sequelize','col','predictiveIntervalTotalCalls','`state`\x20=\x204,\x201,\x20null','literal','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2012,\x201,\x20null','`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','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','findAll','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch'];(function(_0x1e6db3,_0x5643ac){var _0x1de886=function(_0x351318){while(--_0x351318){_0x1e6db3['push'](_0x1e6db3['shift']());}};_0x1de886(++_0x5643ac);}(_0x97f5,0x72));var _0x597f=function(_0x399fe2,_0x2a932e){_0x399fe2=_0x399fe2-0x0;var _0x2a1f77=_0x97f5[_0x399fe2];return _0x2a1f77;};'use strict';var _=require(_0x597f('0x0'));var util=require(_0x597f('0x1'));var moment=require(_0x597f('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x597f('0x3'));var db=require(_0x597f('0x4'))['db'];var utils=require(_0x597f('0x5'));var logger=require(_0x597f('0x6'))(_0x597f('0x7'));var config=require(_0x597f('0x8'));var jayson=require(_0x597f('0x9'));var client=jayson[_0x597f('0xa')][_0x597f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5f4eb9,_0x22b5d0,_0x20f0fc){return new BPromise(function(_0x1098e6,_0x40b1cd){return client[_0x597f('0xc')](_0x5f4eb9,_0x20f0fc)[_0x597f('0xd')](function(_0x5b293a){logger[_0x597f('0xe')](_0x597f('0xf'),_0x22b5d0,_0x597f('0x10'));logger['debug']('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x22b5d0,_0x597f('0x10'),JSON['stringify'](_0x5b293a));if(_0x5b293a[_0x597f('0x11')]){if(_0x5b293a[_0x597f('0x11')][_0x597f('0x12')]===0x1f4){logger['error'](_0x597f('0xf'),_0x22b5d0,_0x5b293a[_0x597f('0x11')][_0x597f('0x13')]);return _0x40b1cd(_0x5b293a[_0x597f('0x11')][_0x597f('0x13')]);}logger[_0x597f('0x11')](_0x597f('0xf'),_0x22b5d0,_0x5b293a[_0x597f('0x11')][_0x597f('0x13')]);return _0x1098e6(_0x5b293a[_0x597f('0x11')][_0x597f('0x13')]);}else{logger[_0x597f('0xe')](_0x597f('0xf'),_0x22b5d0,'request\x20sent');_0x1098e6(_0x5b293a[_0x597f('0x14')][_0x597f('0x13')]);}})[_0x597f('0x15')](function(_0x55eed9){logger[_0x597f('0x11')]('CmHopperHistory,\x20%s,\x20%s',_0x22b5d0,_0x55eed9);_0x40b1cd(_0x55eed9);});});}exports['CreateCmHopperHistory']=function(_0x507552){var _0x50f89a=this;return new Promise(function(_0x49f12b,_0x4dcc95){return db[_0x597f('0x16')][_0x597f('0x17')](_0x507552['body'],{'raw':_0x507552[_0x597f('0x18')]?_0x507552[_0x597f('0x18')][_0x597f('0x19')]===undefined?!![]:![]:!![]})[_0x597f('0xd')](function(_0x53b85e){logger['info'](_0x597f('0x1a'),_0x507552);logger[_0x597f('0x1b')](_0x597f('0x1a'),_0x507552,JSON[_0x597f('0x1c')](_0x53b85e));_0x49f12b(_0x53b85e);})['catch'](function(_0x4c13ab){logger[_0x597f('0x11')]('CreateCmHopperHistory',_0x4c13ab['message'],_0x507552);_0x4dcc95(_0x50f89a[_0x597f('0x11')](0x1f4,_0x4c13ab[_0x597f('0x13')]));});});};exports[_0x597f('0x1d')]=function(_0x4c44a7){var _0x553e9c=this;return new Promise(function(_0x51bc3c,_0x2cc8cd){return db[_0x597f('0x16')]['findAll']({'raw':_0x4c44a7[_0x597f('0x18')]?_0x4c44a7[_0x597f('0x18')][_0x597f('0x19')]===undefined?!![]:![]:!![],'where':_0x4c44a7['options']?_0x4c44a7['options'][_0x597f('0x1e')]||null:null,'attributes':[[db['sequelize']['fn'](_0x597f('0x1f'),db[_0x597f('0x20')][_0x597f('0x21')]('id')),_0x597f('0x22')],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db['sequelize']['literal'](_0x597f('0x23')))),'predictiveIntervalAnsweredCalls'],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x25')))),_0x597f('0x26')],[db['sequelize']['fn']('COUNT',db[_0x597f('0x20')]['fn']('IF',db['sequelize'][_0x597f('0x24')](_0x597f('0x27')))),_0x597f('0x28')],[db[_0x597f('0x20')]['fn']('AVG',db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')]['literal'](_0x597f('0x29')))),_0x597f('0x2a')],[db[_0x597f('0x20')]['fn']('AVG',db['sequelize']['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x2b')))),'predictiveIntervalAvgTalktime']]})['then'](function(_0x30e76e){logger[_0x597f('0xe')](_0x597f('0x1d'),_0x4c44a7);logger[_0x597f('0x1b')](_0x597f('0x1d'),_0x4c44a7,JSON['stringify'](_0x30e76e));_0x51bc3c(_0x30e76e);})[_0x597f('0x15')](function(_0xd050c2){logger[_0x597f('0x11')](_0x597f('0x1d'),_0xd050c2[_0x597f('0x13')],_0x4c44a7);_0x2cc8cd(_0x553e9c[_0x597f('0x11')](0x1f4,_0xd050c2[_0x597f('0x13')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x2f457d){var _0x47cbe2=this;return new Promise(function(_0x1b0c19,_0x4239cf){return db[_0x597f('0x16')]['findAll']({'raw':_0x2f457d[_0x597f('0x18')]?_0x2f457d['options'][_0x597f('0x19')]===undefined?!![]:![]:!![],'where':_0x2f457d[_0x597f('0x18')]?_0x2f457d[_0x597f('0x18')][_0x597f('0x1e')]||null:null,'attributes':[[_0x597f('0x2c'),_0x597f('0x2d')],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db['sequelize']['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x2e')))),'outboundNoSuchCallsDay'],[db['sequelize']['fn']('COUNT',db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')]('`state`\x20=\x203,\x201,\x20null'))),_0x597f('0x2f')],[db[_0x597f('0x20')]['fn']('COUNT',db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')]('`state`\x20=\x204,\x201,\x20null'))),'outboundAnswerCallsDay'],[db['sequelize']['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x30')))),_0x597f('0x31')],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')]['literal']('`state`\x20=\x208,\x201,\x20null'))),_0x597f('0x32')],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x33')))),'outboundDropCallsDayTimeout'],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x34')))),'outboundDropCallsDayCallersExit'],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')]['literal'](_0x597f('0x35')))),'outboundUnknownCallsDay'],[db['sequelize']['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x36')))),'outboundBlacklistCallsDay'],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x37')))),'outboundOriginateFailureCallsDay'],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db['sequelize']['literal'](_0x597f('0x38')))),_0x597f('0x39')],[db['sequelize']['fn'](_0x597f('0x1f'),db['sequelize']['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x3a')))),_0x597f('0x3b')],[db['sequelize']['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['fn']('IF',db[_0x597f('0x20')]['literal'](_0x597f('0x3c')))),'outboundRejectCallsDay'],[db[_0x597f('0x20')]['fn']('COUNT',db[_0x597f('0x20')]['fn']('IF',db['sequelize'][_0x597f('0x24')](_0x597f('0x3d')))),_0x597f('0x3e')]],'group':[_0x597f('0x2c')]})[_0x597f('0xd')](function(_0x2bac8b){logger[_0x597f('0xe')](_0x597f('0x3f'),_0x2f457d);logger[_0x597f('0x1b')]('GetVoiceQueueHopperHistory',_0x2f457d,JSON[_0x597f('0x1c')](_0x2bac8b));_0x1b0c19(_0x2bac8b);})['catch'](function(_0x2d8488){logger[_0x597f('0x11')]('GetVoiceQueueHopperHistory',_0x2d8488['message'],_0x2f457d);_0x4239cf(_0x47cbe2['error'](0x1f4,_0x2d8488[_0x597f('0x13')]));});});};exports[_0x597f('0x40')]=function(_0x199609){var _0x26f817=this;return new Promise(function(_0x4afa3a,_0x2ca00d){return db[_0x597f('0x16')][_0x597f('0x41')]({'raw':_0x199609[_0x597f('0x18')]?_0x199609[_0x597f('0x18')][_0x597f('0x19')]===undefined?!![]:![]:!![],'where':_0x199609['options']?_0x199609[_0x597f('0x18')][_0x597f('0x1e')]||null:null,'attributes':[[_0x597f('0x2c'),_0x597f('0x2d')],[db[_0x597f('0x20')]['fn'](_0x597f('0x1f'),db[_0x597f('0x20')]['col']('id')),_0x597f('0x42')],[db['sequelize']['fn'](_0x597f('0x1f'),db['sequelize']['fn']('IF',db[_0x597f('0x20')][_0x597f('0x24')](_0x597f('0x23')))),_0x597f('0x43')]],'group':[_0x597f('0x2c')]})['then'](function(_0x2625c1){logger[_0x597f('0xe')]('GetCampaignHopperHistory',_0x199609);logger[_0x597f('0x1b')](_0x597f('0x40'),_0x199609,JSON[_0x597f('0x1c')](_0x2625c1));_0x4afa3a(_0x2625c1);})[_0x597f('0x15')](function(_0x211112){logger[_0x597f('0x11')](_0x597f('0x40'),_0x211112[_0x597f('0x13')],_0x199609);_0x2ca00d(_0x26f817['error'](0x1f4,_0x211112[_0x597f('0x13')]));});});};
\ No newline at end of file