Built motion from commit (unavailable).|2.4.11
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 58f9540..087003e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9354=['`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','campaign','GetVoiceQueueHopperHistory','ivrAnswerCallsDay','GetCampaignHopperHistory','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','error','message','result','catch','CreateCmHopperHistory','create','body','options','then','stringify','CmHopperHistory','findAll','raw','where','sequelize','COUNT','col','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','literal','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','AvgHandleTime','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','`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','`state`\x20=\x2013,\x201,\x20null','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null'];(function(_0x3e725d,_0x4ac3db){var _0x3e0b8f=function(_0x3eb14d){while(--_0x3eb14d){_0x3e725d['push'](_0x3e725d['shift']());}};_0x3e0b8f(++_0x4ac3db);}(_0x9354,0x96));var _0x4935=function(_0x1139d0,_0x41e5f8){_0x1139d0=_0x1139d0-0x0;var _0xcc01a6=_0x9354[_0x1139d0];return _0xcc01a6;};'use strict';var _=require('lodash');var util=require(_0x4935('0x0'));var moment=require(_0x4935('0x1'));var BPromise=require('bluebird');var rs=require(_0x4935('0x2'));var fs=require('fs');var Redis=require(_0x4935('0x3'));var db=require(_0x4935('0x4'))['db'];var utils=require(_0x4935('0x5'));var logger=require('../../config/logger')(_0x4935('0x6'));var config=require(_0x4935('0x7'));var jayson=require(_0x4935('0x8'));var client=jayson[_0x4935('0x9')][_0x4935('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2e47bd,_0x118d36,_0x2d735e){return new BPromise(function(_0x10793e,_0x4c9902){return client[_0x4935('0xb')](_0x2e47bd,_0x2d735e)['then'](function(_0x2aac9a){logger[_0x4935('0xc')](_0x4935('0xd'),_0x118d36,_0x4935('0xe'));logger[_0x4935('0xf')](_0x4935('0x10'),_0x118d36,'request\x20sent',JSON['stringify'](_0x2aac9a));if(_0x2aac9a[_0x4935('0x11')]){if(_0x2aac9a['error']['code']===0x1f4){logger[_0x4935('0x11')](_0x4935('0xd'),_0x118d36,_0x2aac9a[_0x4935('0x11')][_0x4935('0x12')]);return _0x4c9902(_0x2aac9a[_0x4935('0x11')][_0x4935('0x12')]);}logger[_0x4935('0x11')](_0x4935('0xd'),_0x118d36,_0x2aac9a[_0x4935('0x11')][_0x4935('0x12')]);return _0x10793e(_0x2aac9a[_0x4935('0x11')][_0x4935('0x12')]);}else{logger[_0x4935('0xc')](_0x4935('0xd'),_0x118d36,_0x4935('0xe'));_0x10793e(_0x2aac9a[_0x4935('0x13')]['message']);}})[_0x4935('0x14')](function(_0x46526a){logger[_0x4935('0x11')](_0x4935('0xd'),_0x118d36,_0x46526a);_0x4c9902(_0x46526a);});});}exports[_0x4935('0x15')]=function(_0x429ef3){var _0x4ebc63=this;return new Promise(function(_0xd70eff,_0x145277){return db['CmHopperHistory'][_0x4935('0x16')](_0x429ef3[_0x4935('0x17')],{'raw':_0x429ef3[_0x4935('0x18')]?_0x429ef3['options']['raw']===undefined?!![]:![]:!![]})[_0x4935('0x19')](function(_0x6b849f){logger[_0x4935('0xc')](_0x4935('0x15'),_0x429ef3);logger[_0x4935('0xf')](_0x4935('0x15'),_0x429ef3,JSON[_0x4935('0x1a')](_0x6b849f));_0xd70eff(_0x6b849f);})[_0x4935('0x14')](function(_0x58b2f3){logger[_0x4935('0x11')](_0x4935('0x15'),_0x58b2f3[_0x4935('0x12')],_0x429ef3);_0x145277(_0x4ebc63[_0x4935('0x11')](0x1f4,_0x58b2f3[_0x4935('0x12')]));});});};exports['AvgHandleTime']=function(_0x4dc1f5){var _0x36e76a=this;return new Promise(function(_0x142fdf,_0x3786ff){return db[_0x4935('0x1b')][_0x4935('0x1c')]({'raw':_0x4dc1f5[_0x4935('0x18')]?_0x4dc1f5[_0x4935('0x18')][_0x4935('0x1d')]===undefined?!![]:![]:!![],'where':_0x4dc1f5[_0x4935('0x18')]?_0x4dc1f5[_0x4935('0x18')][_0x4935('0x1e')]||null:null,'attributes':[[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')][_0x4935('0x21')]('id')),'predictiveIntervalTotalCalls'],[db['sequelize']['fn']('COUNT',db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')]['literal'](_0x4935('0x22')))),_0x4935('0x23')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')](_0x4935('0x25')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db['sequelize']['fn']('IF',db['sequelize'][_0x4935('0x24')]('`state`\x20=\x2011,\x201,\x20null'))),_0x4935('0x26')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x27'),db['sequelize']['fn']('IF',db['sequelize'][_0x4935('0x24')](_0x4935('0x28')))),'predictiveIntervalAvgHoldtime'],[db[_0x4935('0x1f')]['fn'](_0x4935('0x27'),db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')]('`state`\x20=\x204,\x20`talktime`,\x20null'))),'predictiveIntervalAvgTalktime']]})[_0x4935('0x19')](function(_0x1016cc){logger['info']('AvgHandleTime',_0x4dc1f5);logger[_0x4935('0xf')]('AvgHandleTime',_0x4dc1f5,JSON[_0x4935('0x1a')](_0x1016cc));_0x142fdf(_0x1016cc);})[_0x4935('0x14')](function(_0x2305f8){logger[_0x4935('0x11')](_0x4935('0x29'),_0x2305f8[_0x4935('0x12')],_0x4dc1f5);_0x3786ff(_0x36e76a['error'](0x1f4,_0x2305f8[_0x4935('0x12')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x365e83){var _0x5db44b=this;return new Promise(function(_0x279708,_0x4c5a4e){return db[_0x4935('0x1b')][_0x4935('0x1c')]({'raw':_0x365e83[_0x4935('0x18')]?_0x365e83[_0x4935('0x18')][_0x4935('0x1d')]===undefined?!![]:![]:!![],'where':_0x365e83[_0x4935('0x18')]?_0x365e83[_0x4935('0x18')]['where']||null:null,'attributes':[['campaign',_0x4935('0x2a')],[db['sequelize']['fn']('COUNT',db[_0x4935('0x1f')]['fn']('IF',db['sequelize'][_0x4935('0x24')](_0x4935('0x2b')))),_0x4935('0x2c')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db['sequelize']['fn']('IF',db['sequelize'][_0x4935('0x24')](_0x4935('0x2d')))),_0x4935('0x2e')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')]('`state`\x20=\x204,\x201,\x20null'))),'outboundAnswerCallsDay'],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db['sequelize']['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')](_0x4935('0x2f')))),_0x4935('0x30')],[db['sequelize']['fn']('COUNT',db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')]['literal'](_0x4935('0x31')))),_0x4935('0x32')],[db[_0x4935('0x1f')]['fn']('COUNT',db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')](_0x4935('0x33')))),_0x4935('0x34')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')](_0x4935('0x35')))),_0x4935('0x36')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')](_0x4935('0x37')))),'outboundUnknownCallsDay'],[db[_0x4935('0x1f')]['fn']('COUNT',db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')](_0x4935('0x38')))),'outboundBlacklistCallsDay'],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')](_0x4935('0x39')))),_0x4935('0x3a')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')]['fn']('IF',db['sequelize'][_0x4935('0x24')](_0x4935('0x3b')))),'outboundRejectCallsDay'],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')][_0x4935('0x24')](_0x4935('0x3c')))),_0x4935('0x3d')],[db[_0x4935('0x1f')]['fn']('COUNT',db[_0x4935('0x1f')]['fn']('IF',db['sequelize']['literal'](_0x4935('0x3e')))),_0x4935('0x3f')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db[_0x4935('0x1f')]['fn']('IF',db['sequelize'][_0x4935('0x24')](_0x4935('0x40')))),_0x4935('0x41')]],'group':[_0x4935('0x42')]})[_0x4935('0x19')](function(_0x8196b4){logger[_0x4935('0xc')](_0x4935('0x43'),_0x365e83);logger[_0x4935('0xf')](_0x4935('0x43'),_0x365e83,JSON['stringify'](_0x8196b4));_0x279708(_0x8196b4);})[_0x4935('0x14')](function(_0x4e99bb){logger[_0x4935('0x11')](_0x4935('0x43'),_0x4e99bb['message'],_0x365e83);_0x4c5a4e(_0x5db44b[_0x4935('0x11')](0x1f4,_0x4e99bb['message']));});});};exports['GetCampaignHopperHistory']=function(_0x4b11eb){var _0x126f53=this;return new Promise(function(_0x2e66e4,_0x2f946d){return db[_0x4935('0x1b')][_0x4935('0x1c')]({'raw':_0x4b11eb['options']?_0x4b11eb['options'][_0x4935('0x1d')]===undefined?!![]:![]:!![],'where':_0x4b11eb[_0x4935('0x18')]?_0x4b11eb[_0x4935('0x18')]['where']||null:null,'attributes':[[_0x4935('0x42'),_0x4935('0x2a')],[db[_0x4935('0x1f')]['fn'](_0x4935('0x20'),db['sequelize'][_0x4935('0x21')]('id')),'ivrTotalCallsDays'],[db['sequelize']['fn']('COUNT',db[_0x4935('0x1f')]['fn']('IF',db[_0x4935('0x1f')]['literal'](_0x4935('0x22')))),_0x4935('0x44')]],'group':['campaign']})[_0x4935('0x19')](function(_0x38fd67){logger[_0x4935('0xc')](_0x4935('0x45'),_0x4b11eb);logger[_0x4935('0xf')](_0x4935('0x45'),_0x4b11eb,JSON[_0x4935('0x1a')](_0x38fd67));_0x2e66e4(_0x38fd67);})['catch'](function(_0x31b426){logger['error']('GetCampaignHopperHistory',_0x31b426[_0x4935('0x12')],_0x4b11eb);_0x2f946d(_0x126f53[_0x4935('0x11')](0x1f4,_0x31b426['message']));});});};
\ No newline at end of file
+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(_0x568363,_0x2e79a7){var _0x47f0ed=function(_0x7d922b){while(--_0x7d922b){_0x568363['push'](_0x568363['shift']());}};_0x47f0ed(++_0x2e79a7);}(_0x96cc,0x16c));var _0xc96c=function(_0x32e4fa,_0x2b7dec){_0x32e4fa=_0x32e4fa-0x0;var _0x516f49=_0x96cc[_0x32e4fa];return _0x516f49;};'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