Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 54fcb9e..4c06a36 100644 (file)
@@ -1 +1 @@
-const a185_0x27c1=['ivrAnswerCallsDay','CreateCmHopperHistory','outboundAnswerCallsDay','campaign','stringify','`state`\x20=\x200,\x201,\x20null','raw','catch','outboundBusyCallsDay','ivrTotalCallsDays','predictiveIntervalAvgTalktime','sequelize','predictiveIntervalAvgHoldtime','info','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2010\x20,\x201,\x20null','error','findAll','`state`\x20=\x2010,\x201,\x20null','debug','`state`\x20=\x2016,\x201,\x20null','then','options','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','`state`\x20=\x203,\x201,\x20null','COUNT','AvgHandleTime','`state`\x20=\x205,\x201,\x20null','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','predictiveIntervalTotalCalls','GetCampaignHopperHistory','GetVoiceQueueHopperHistory','AVG','outboundNoSuchCallsDay','body','predictiveIntervalAnsweredCalls','where','outboundAnswerAgiCallsDay','predictiveIntervalDroppedCallsCallersExit','CmHopperHistory','message','`state`\x20=\x2011\x20,\x201,\x20null','../../mysqldb','outboundDropCallsDayTimeout','outboundCongestionCallsDay','outboundReCallsDay','name','`state`\x20=\x204,\x201,\x20null','`state`\x20=\x208,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','outboundUnknownCallsDay','`state`\x20=\x2014,\x201,\x20null','outboundNoAnswerCallsDay'];(function(_0x5b1bd4,_0x10fab2){const _0x27c1f9=function(_0x128e07){while(--_0x128e07){_0x5b1bd4['push'](_0x5b1bd4['shift']());}};_0x27c1f9(++_0x10fab2);}(a185_0x27c1,0x176));const a185_0x128e=function(_0x5b1bd4,_0x10fab2){_0x5b1bd4=_0x5b1bd4-0xa0;let _0x27c1f9=a185_0x27c1[_0x5b1bd4];return _0x27c1f9;};const a185_0x3e2256=a185_0x128e;'use strict';const db=require(a185_0x3e2256(0xcf))['db'],{fn,literal,col}=require(a185_0x3e2256(0xaf)),logger=require('../../config/logger')('rpc');exports[a185_0x3e2256(0xa5)]=function(_0x1e5440){const _0x2bb1b3=this;return new Promise(function(_0x13c8c9,_0x49266c){const _0x1d352a=a185_0x128e;return db[_0x1d352a(0xcc)]['create'](_0x1e5440[_0x1d352a(0xc7)],{'raw':_0x1e5440[_0x1d352a(0xba)]?_0x1e5440[_0x1d352a(0xba)]['raw']===undefined?!![]:![]:!![]})[_0x1d352a(0xb9)](function(_0x504dc8){const _0x3b6f84=_0x1d352a;logger[_0x3b6f84(0xb1)](_0x3b6f84(0xa5),_0x1e5440),logger[_0x3b6f84(0xb7)](_0x3b6f84(0xa5),_0x1e5440,JSON[_0x3b6f84(0xa8)](_0x504dc8)),_0x13c8c9(_0x504dc8);})[_0x1d352a(0xab)](function(_0x4ea900){const _0x5149d5=_0x1d352a;logger[_0x5149d5(0xb4)](_0x5149d5(0xa5),_0x4ea900[_0x5149d5(0xcd)],_0x1e5440),_0x49266c(_0x2bb1b3['error'](0x1f4,_0x4ea900[_0x5149d5(0xcd)]));});});},exports['AvgHandleTime']=function(_0x54f332){const _0x305454=this;return new Promise(function(_0x2409f5,_0x228c16){const _0x3accab=a185_0x128e;return db[_0x3accab(0xcc)][_0x3accab(0xb5)]({'raw':_0x54f332[_0x3accab(0xba)]?_0x54f332['options'][_0x3accab(0xaa)]===undefined?!![]:![]:!![],'where':_0x54f332['options']?_0x54f332[_0x3accab(0xba)][_0x3accab(0xc9)]||null:null,'attributes':[[fn(_0x3accab(0xbd),col('id')),_0x3accab(0xc2)],[fn(_0x3accab(0xbd),fn('IF',literal(_0x3accab(0xd4)))),_0x3accab(0xc8)],[fn(_0x3accab(0xbd),fn('IF',literal(_0x3accab(0xb6)))),_0x3accab(0xa0)],[fn(_0x3accab(0xbd),fn('IF',literal('`state`\x20=\x2011,\x201,\x20null'))),_0x3accab(0xcb)],[fn(_0x3accab(0xc5),fn('IF',literal('`state`\x20=\x204,\x20`holdtime`,\x20null'))),_0x3accab(0xb0)],[fn(_0x3accab(0xc5),fn('IF',literal('`state`\x20=\x204,\x20`talktime`,\x20null'))),_0x3accab(0xae)]]})[_0x3accab(0xb9)](function(_0x3c5199){const _0x16d599=_0x3accab;logger[_0x16d599(0xb1)](_0x16d599(0xbe),_0x54f332),logger['debug'](_0x16d599(0xbe),_0x54f332,JSON[_0x16d599(0xa8)](_0x3c5199)),_0x2409f5(_0x3c5199);})[_0x3accab(0xab)](function(_0x46f1a2){const _0xce102a=_0x3accab;logger[_0xce102a(0xb4)](_0xce102a(0xbe),_0x46f1a2[_0xce102a(0xcd)],_0x54f332),_0x228c16(_0x305454['error'](0x1f4,_0x46f1a2[_0xce102a(0xcd)]));});});},exports[a185_0x3e2256(0xc4)]=function(_0x3863ce){const _0x23ec6b=this;return new Promise(function(_0x5e03a1,_0x460326){const _0x287281=a185_0x128e;return db[_0x287281(0xcc)][_0x287281(0xb5)]({'raw':_0x3863ce[_0x287281(0xba)]?_0x3863ce[_0x287281(0xba)]['raw']===undefined?!![]:![]:!![],'where':_0x3863ce[_0x287281(0xba)]?_0x3863ce[_0x287281(0xba)][_0x287281(0xc9)]||null:null,'attributes':[[_0x287281(0xa7),_0x287281(0xd3)],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xa9)))),_0x287281(0xc6)],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xbc)))),_0x287281(0xa3)],[fn(_0x287281(0xbd),fn('IF',literal('`state`\x20=\x204,\x201,\x20null'))),_0x287281(0xa6)],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xbf)))),_0x287281(0xac)],[fn('COUNT',fn('IF',literal(_0x287281(0xd5)))),_0x287281(0xd1)],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xb3)))),_0x287281(0xd0)],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xce)))),_0x287281(0xc1)],[fn(_0x287281(0xbd),fn('IF',literal('`state`\x20=\x2012,\x201,\x20null'))),_0x287281(0xa1)],[fn('COUNT',fn('IF',literal('`state`\x20=\x2013,\x201,\x20null'))),'outboundBlacklistCallsDay'],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xa2)))),_0x287281(0xc0)],[fn(_0x287281(0xbd),fn('IF',literal('`state`\x20=\x2018,\x201,\x20null'))),'outboundRejectCallsDay'],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xb8)))),_0x287281(0xca)],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xb2)))),'outboundRejectCallsDay'],[fn(_0x287281(0xbd),fn('IF',literal(_0x287281(0xbb)))),_0x287281(0xd2)]],'group':['campaign']})[_0x287281(0xb9)](function(_0x4b3774){const _0x2442ad=_0x287281;logger[_0x2442ad(0xb1)]('GetVoiceQueueHopperHistory',_0x3863ce),logger[_0x2442ad(0xb7)]('GetVoiceQueueHopperHistory',_0x3863ce,JSON[_0x2442ad(0xa8)](_0x4b3774)),_0x5e03a1(_0x4b3774);})[_0x287281(0xab)](function(_0x25e3ad){const _0x5a3ba8=_0x287281;logger[_0x5a3ba8(0xb4)](_0x5a3ba8(0xc4),_0x25e3ad['message'],_0x3863ce),_0x460326(_0x23ec6b[_0x5a3ba8(0xb4)](0x1f4,_0x25e3ad[_0x5a3ba8(0xcd)]));});});},exports[a185_0x3e2256(0xc3)]=function(_0x3fd1c2){const _0x2947f6=this;return new Promise(function(_0x23f8b8,_0x9a1210){const _0x10dc4d=a185_0x128e;return db[_0x10dc4d(0xcc)][_0x10dc4d(0xb5)]({'raw':_0x3fd1c2[_0x10dc4d(0xba)]?_0x3fd1c2[_0x10dc4d(0xba)]['raw']===undefined?!![]:![]:!![],'where':_0x3fd1c2[_0x10dc4d(0xba)]?_0x3fd1c2[_0x10dc4d(0xba)]['where']||null:null,'attributes':[[_0x10dc4d(0xa7),_0x10dc4d(0xd3)],[fn(_0x10dc4d(0xbd),col('id')),_0x10dc4d(0xad)],[fn(_0x10dc4d(0xbd),fn('IF',literal(_0x10dc4d(0xd4)))),_0x10dc4d(0xa4)]],'group':[_0x10dc4d(0xa7)]})[_0x10dc4d(0xb9)](function(_0x4add83){const _0x231f40=_0x10dc4d;logger['info']('GetCampaignHopperHistory',_0x3fd1c2),logger[_0x231f40(0xb7)](_0x231f40(0xc3),_0x3fd1c2,JSON[_0x231f40(0xa8)](_0x4add83)),_0x23f8b8(_0x4add83);})[_0x10dc4d(0xab)](function(_0x23b59e){const _0x53946b=_0x10dc4d;logger[_0x53946b(0xb4)](_0x53946b(0xc3),_0x23b59e[_0x53946b(0xcd)],_0x3fd1c2),_0x9a1210(_0x2947f6[_0x53946b(0xb4)](0x1f4,_0x23b59e[_0x53946b(0xcd)]));});});};
\ No newline at end of file
+const a185_0x309e=['`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x2018,\x201,\x20null','predictiveIntervalAnsweredCalls','campaign','outboundUnknownCallsDay','outboundDropCallsDayTimeout','error','`state`\x20=\x2010,\x201,\x20null','outboundNoSuchCallsDay','catch','findAll','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x204,\x201,\x20null','outboundDropCallsDayCallersExit','CreateCmHopperHistory','name','ivrAnswerCallsDay','raw','then','sequelize','options','body','where','`state`\x20=\x2020,\x201,\x20null','CmHopperHistory','GetVoiceQueueHopperHistory','outboundRejectCallsDay','predictiveIntervalAvgTalktime','`state`\x20=\x2011\x20,\x201,\x20null','AVG','outboundOriginateFailureCallsDay','AvgHandleTime','debug','../../mysqldb','predictiveIntervalAvgHoldtime','outboundAnswerCallsDay','rpc','GetCampaignHopperHistory','stringify','info','message','`state`\x20=\x2016,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','COUNT','outboundBlacklistCallsDay'];(function(_0x29fbe4,_0x255065){const _0x309ee5=function(_0x3de546){while(--_0x3de546){_0x29fbe4['push'](_0x29fbe4['shift']());}};_0x309ee5(++_0x255065);}(a185_0x309e,0x1eb));const a185_0x3de5=function(_0x29fbe4,_0x255065){_0x29fbe4=_0x29fbe4-0x19e;let _0x309ee5=a185_0x309e[_0x29fbe4];return _0x309ee5;};const a185_0x37f05c=a185_0x3de5;'use strict';const db=require(a185_0x37f05c(0x1b6))['db'],{fn,literal,col}=require(a185_0x37f05c(0x1a8)),logger=require('../../config/logger')(a185_0x37f05c(0x1b9));exports[a185_0x37f05c(0x1a3)]=function(_0x3f8c24){const _0x31c1c0=this;return new Promise(function(_0x630304,_0x321b1f){const _0x33b6fc=a185_0x3de5;return db[_0x33b6fc(0x1ad)]['create'](_0x3f8c24[_0x33b6fc(0x1aa)],{'raw':_0x3f8c24['options']?_0x3f8c24[_0x33b6fc(0x1a9)]['raw']===undefined?!![]:![]:!![]})[_0x33b6fc(0x1a7)](function(_0x56e2e8){const _0x19f113=_0x33b6fc;logger[_0x19f113(0x1bc)](_0x19f113(0x1a3),_0x3f8c24),logger[_0x19f113(0x1b5)](_0x19f113(0x1a3),_0x3f8c24,JSON[_0x19f113(0x1bb)](_0x56e2e8)),_0x630304(_0x56e2e8);})['catch'](function(_0xc08139){const _0x9c81b5=_0x33b6fc;logger[_0x9c81b5(0x1cb)]('CreateCmHopperHistory',_0xc08139[_0x9c81b5(0x1bd)],_0x3f8c24),_0x321b1f(_0x31c1c0[_0x9c81b5(0x1cb)](0x1f4,_0xc08139[_0x9c81b5(0x1bd)]));});});},exports[a185_0x37f05c(0x1b4)]=function(_0x1fb37d){const _0x445aa8=this;return new Promise(function(_0x21e2e0,_0x4fa156){const _0x49db2f=a185_0x3de5;return db[_0x49db2f(0x1ad)][_0x49db2f(0x19f)]({'raw':_0x1fb37d['options']?_0x1fb37d[_0x49db2f(0x1a9)][_0x49db2f(0x1a6)]===undefined?!![]:![]:!![],'where':_0x1fb37d[_0x49db2f(0x1a9)]?_0x1fb37d[_0x49db2f(0x1a9)]['where']||null:null,'attributes':[[fn(_0x49db2f(0x1c1),col('id')),'predictiveIntervalTotalCalls'],[fn(_0x49db2f(0x1c1),fn('IF',literal(_0x49db2f(0x1a1)))),_0x49db2f(0x1c7)],[fn(_0x49db2f(0x1c1),fn('IF',literal(_0x49db2f(0x1cc)))),_0x49db2f(0x1a0)],[fn('COUNT',fn('IF',literal(_0x49db2f(0x1c4)))),'predictiveIntervalDroppedCallsCallersExit'],[fn(_0x49db2f(0x1b2),fn('IF',literal('`state`\x20=\x204,\x20`holdtime`,\x20null'))),_0x49db2f(0x1b7)],[fn(_0x49db2f(0x1b2),fn('IF',literal('`state`\x20=\x204,\x20`talktime`,\x20null'))),_0x49db2f(0x1b0)]]})[_0x49db2f(0x1a7)](function(_0x58fdc5){const _0x3a3ff2=_0x49db2f;logger[_0x3a3ff2(0x1bc)](_0x3a3ff2(0x1b4),_0x1fb37d),logger[_0x3a3ff2(0x1b5)](_0x3a3ff2(0x1b4),_0x1fb37d,JSON[_0x3a3ff2(0x1bb)](_0x58fdc5)),_0x21e2e0(_0x58fdc5);})[_0x49db2f(0x19e)](function(_0x5495de){const _0x14c760=_0x49db2f;logger[_0x14c760(0x1cb)](_0x14c760(0x1b4),_0x5495de[_0x14c760(0x1bd)],_0x1fb37d),_0x4fa156(_0x445aa8[_0x14c760(0x1cb)](0x1f4,_0x5495de[_0x14c760(0x1bd)]));});});},exports[a185_0x37f05c(0x1ae)]=function(_0x564980){const _0xbdbe4b=this;return new Promise(function(_0x526512,_0x2c33ea){const _0x21d90f=a185_0x3de5;return db[_0x21d90f(0x1ad)][_0x21d90f(0x19f)]({'raw':_0x564980[_0x21d90f(0x1a9)]?_0x564980[_0x21d90f(0x1a9)][_0x21d90f(0x1a6)]===undefined?!![]:![]:!![],'where':_0x564980[_0x21d90f(0x1a9)]?_0x564980[_0x21d90f(0x1a9)]['where']||null:null,'attributes':[['campaign',_0x21d90f(0x1a4)],[fn(_0x21d90f(0x1c1),fn('IF',literal('`state`\x20=\x200,\x201,\x20null'))),_0x21d90f(0x1cd)],[fn(_0x21d90f(0x1c1),fn('IF',literal('`state`\x20=\x203,\x201,\x20null'))),_0x21d90f(0x1c5)],[fn(_0x21d90f(0x1c1),fn('IF',literal(_0x21d90f(0x1a1)))),_0x21d90f(0x1b8)],[fn(_0x21d90f(0x1c1),fn('IF',literal('`state`\x20=\x205,\x201,\x20null'))),_0x21d90f(0x1bf)],[fn(_0x21d90f(0x1c1),fn('IF',literal('`state`\x20=\x208,\x201,\x20null'))),'outboundCongestionCallsDay'],[fn(_0x21d90f(0x1c1),fn('IF',literal(_0x21d90f(0x1c0)))),_0x21d90f(0x1ca)],[fn(_0x21d90f(0x1c1),fn('IF',literal(_0x21d90f(0x1b1)))),_0x21d90f(0x1a2)],[fn(_0x21d90f(0x1c1),fn('IF',literal('`state`\x20=\x2012,\x201,\x20null'))),_0x21d90f(0x1c9)],[fn('COUNT',fn('IF',literal('`state`\x20=\x2013,\x201,\x20null'))),_0x21d90f(0x1c2)],[fn(_0x21d90f(0x1c1),fn('IF',literal(_0x21d90f(0x1c3)))),_0x21d90f(0x1b3)],[fn(_0x21d90f(0x1c1),fn('IF',literal(_0x21d90f(0x1c6)))),_0x21d90f(0x1af)],[fn(_0x21d90f(0x1c1),fn('IF',literal(_0x21d90f(0x1be)))),'outboundAnswerAgiCallsDay'],[fn(_0x21d90f(0x1c1),fn('IF',literal(_0x21d90f(0x1ac)))),'outboundRejectCallsDay'],[fn(_0x21d90f(0x1c1),fn('IF',literal('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),'outboundReCallsDay']],'group':[_0x21d90f(0x1c8)]})[_0x21d90f(0x1a7)](function(_0x210777){const _0x568a24=_0x21d90f;logger[_0x568a24(0x1bc)](_0x568a24(0x1ae),_0x564980),logger[_0x568a24(0x1b5)](_0x568a24(0x1ae),_0x564980,JSON[_0x568a24(0x1bb)](_0x210777)),_0x526512(_0x210777);})[_0x21d90f(0x19e)](function(_0x41640a){const _0x3bb48d=_0x21d90f;logger[_0x3bb48d(0x1cb)](_0x3bb48d(0x1ae),_0x41640a[_0x3bb48d(0x1bd)],_0x564980),_0x2c33ea(_0xbdbe4b[_0x3bb48d(0x1cb)](0x1f4,_0x41640a[_0x3bb48d(0x1bd)]));});});},exports['GetCampaignHopperHistory']=function(_0xdf5921){const _0x4eb92e=this;return new Promise(function(_0x5b096e,_0x13f27b){const _0x466514=a185_0x3de5;return db['CmHopperHistory'][_0x466514(0x19f)]({'raw':_0xdf5921[_0x466514(0x1a9)]?_0xdf5921[_0x466514(0x1a9)][_0x466514(0x1a6)]===undefined?!![]:![]:!![],'where':_0xdf5921['options']?_0xdf5921[_0x466514(0x1a9)][_0x466514(0x1ab)]||null:null,'attributes':[['campaign',_0x466514(0x1a4)],[fn(_0x466514(0x1c1),col('id')),'ivrTotalCallsDays'],[fn(_0x466514(0x1c1),fn('IF',literal(_0x466514(0x1a1)))),_0x466514(0x1a5)]],'group':[_0x466514(0x1c8)]})[_0x466514(0x1a7)](function(_0x2373d1){const _0x172005=_0x466514;logger['info'](_0x172005(0x1ba),_0xdf5921),logger[_0x172005(0x1b5)](_0x172005(0x1ba),_0xdf5921,JSON[_0x172005(0x1bb)](_0x2373d1)),_0x5b096e(_0x2373d1);})['catch'](function(_0xff92f7){const _0x32eade=_0x466514;logger['error']('GetCampaignHopperHistory',_0xff92f7[_0x32eade(0x1bd)],_0xdf5921),_0x13f27b(_0x4eb92e[_0x32eade(0x1cb)](0x1f4,_0xff92f7['message']));});});};
\ No newline at end of file