Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 75ad0cf..f5c8791 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x067a=['ListId','VoiceQueueId','CampaignId','rescheduleContact','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','DESC','scheduledat','ASC','getContactDialerIvr','GetContactDialerIvr','moveContactManagedDialer','queue','MoveContactManagedDialer','CountReScheduled','getContactPreview','Agent','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','User','voicePause','db.CmHopper.UserId','../client','moment','getContacts','GetCmHopper','CmContact','Contact','getCmHopper','updateContacts','Request','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','ContactId'];(function(_0x1c22f2,_0x1f33f1){var _0xa5e8a4=function(_0x42cc08){while(--_0x42cc08){_0x1c22f2['push'](_0x1c22f2['shift']());}};_0xa5e8a4(++_0x1f33f1);}(_0x067a,0x197));var _0xa067=function(_0x5488ed,_0x388231){_0x5488ed=_0x5488ed-0x0;var _0x5c4ce3=_0x067a[_0x5488ed];return _0x5c4ce3;};'use strict';var client=require(_0xa067('0x0'));var moment=require(_0xa067('0x1'));var _=require('lodash');exports[_0xa067('0x2')]=function(_0x5054e0,_0x119e13){return function(){return client['Request'](_0xa067('0x3'),{'options':{'where':{'VoiceQueueId':_0x5054e0},'include':[{'model':_0xa067('0x4'),'as':_0xa067('0x5')}],'limit':_0x119e13,'raw':![]},'log':_0xa067('0x6')});};};exports[_0xa067('0x7')]=function(_0x296360,_0x2e2c3f,_0x4309fc){return function(){return client[_0xa067('0x8')](_0xa067('0x9'),{'body':_0x296360,'options':{'where':{'VoiceQueueId':_0x2e2c3f,'scheduledat':{'$lte':moment()[_0xa067('0xa')](_0xa067('0xb'))}},'limit':_0x4309fc},'log':'UpdateCmHopper'});};};exports['rescheduleContact']=function(_0x4a0bec){return function(){return client['Request'](_0xa067('0x9'),{'body':_0x4a0bec,'options':{'where':{'ContactId':_0x4a0bec[_0xa067('0xc')],'ListId':_0x4a0bec[_0xa067('0xd')],'VoiceQueueId':_0x4a0bec[_0xa067('0xe')],'CampaignId':_0x4a0bec[_0xa067('0xf')]}},'log':_0xa067('0x10')});};};exports[_0xa067('0x11')]=function(_0x361421,_0x4790b1,_0x2ee06d){return function(){return client[_0xa067('0x8')](_0xa067('0x12'),{'options':{'where':{'VoiceQueueId':_0x361421,'ListId':_0x4790b1,'ContactId':_0x2ee06d}},'log':'DestroyCmHopper'});};};exports[_0xa067('0x13')]=function(_0x2c42d6,_0x5317ad,_0x4f5045,_0xaeca7a){return function(){return client[_0xa067('0x8')](_0xa067('0x14'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x2c42d6,'active':![],'scheduledat':{'$lte':moment()[_0xa067('0xa')](_0xa067('0xb'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x5317ad}}]},'order':[[_0xa067('0x15'),_0xa067('0x16')],[_0xa067('0x17'),_0xaeca7a],['id',_0xa067('0x18')]],'raw':!![],'limit':_0x4f5045},'log':_0xa067('0x14')});};};exports[_0xa067('0x19')]=function(_0x526132,_0x51f683,_0x3ab000){return function(){return client[_0xa067('0x8')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x526132,'active':![],'scheduledat':{'$lte':moment()[_0xa067('0xa')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0xa067('0x4'),'as':_0xa067('0x5')}],'order':[[_0xa067('0x15'),_0xa067('0x16')],['scheduledat',_0x3ab000],['id',_0xa067('0x18')]],'raw':!![],'limit':_0x51f683},'log':_0xa067('0x1a')});};};exports[_0xa067('0x1b')]=function(_0x411a5f,_0x3b4501){return function(){_0x411a5f['campaign']=_0x411a5f[_0xa067('0x1c')];return client[_0xa067('0x8')]('MoveContactManagedDialer',{'body':_0x411a5f,'options':{'where':{'ContactId':_0x411a5f[_0xa067('0xc')],'ListId':_0x411a5f[_0xa067('0xd')],'VoiceQueueId':_0x411a5f[_0xa067('0xe')],'CampaignId':_0x411a5f['CampaignId'],'active':_0x3b4501?undefined:!![]}},'log':_0xa067('0x1d')});};};exports['countReScheduled']=function(_0x520a1f){return function(){return client[_0xa067('0x8')](_0xa067('0x1e'),{'options':{'where':{'VoiceQueueId':_0x520a1f['id']?_0x520a1f['id']||null:null}},'log':'countReScheduled'});};};exports[_0xa067('0x1f')]=function(_0xe03b1){return function(){return client['Request'](_0xa067('0x3'),{'options':{'where':{'id':_0xe03b1},'include':[{'model':'CmContact','as':'Contact'},{'model':'User','as':_0xa067('0x20'),'attributes':['id',_0xa067('0x21')]},{'model':_0xa067('0x22'),'as':_0xa067('0x23'),'attributes':['id','name']}],'raw':!![]},'log':_0xa067('0x6')});};};exports[_0xa067('0x24')]=function(_0x3c7f44,_0x5c961c,_0x7bd60b){return function(){return client[_0xa067('0x8')](_0xa067('0x9'),{'body':_0x3c7f44,'options':{'where':{'id':_0x5c961c},'limit':_0x7bd60b},'log':_0xa067('0x9')});};};exports[_0xa067('0x25')]=function(_0x23c7d5,_0x2fd254){return function(){return client[_0xa067('0x8')](_0xa067('0x26'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x23c7d5,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xa067('0xa')](_0xa067('0xb'))},'UserId':{'$in':_0x2fd254}},'order':[[_0xa067('0x15'),'DESC'],[_0xa067('0x17'),_0xa067('0x16')],['id',_0xa067('0x18')]],'include':[{'model':'CmContact','as':_0xa067('0x5')},{'model':_0xa067('0x27'),'as':_0xa067('0x20'),'attributes':['id',_0xa067('0x21'),_0xa067('0x28')]}],'group':_0xa067('0x29'),'raw':!![]},'log':_0xa067('0x14')});};};
\ No newline at end of file
+var _0xeaaf=['destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','DESC','scheduledat','ASC','getContactDialerIvr','priority','GetContactDialerIvr','moveContactManagedDialer','queue','MoveContactManagedDialer','ListId','countReScheduled','CountReScheduled','getContactPreview','GetCmHopper','User','Agent','name','Queue','unlockContact','getContactRecallMe','voicePause','db.CmHopper.UserId','../client','lodash','getContacts','Request','CmContact','Contact','getCmHopper','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','VoiceQueueId','CampaignId'];(function(_0x1c208e,_0x2a0a5b){var _0x5104ff=function(_0x3ca41f){while(--_0x3ca41f){_0x1c208e['push'](_0x1c208e['shift']());}};_0x5104ff(++_0x2a0a5b);}(_0xeaaf,0x92));var _0xfeaa=function(_0x3d342e,_0x4de669){_0x3d342e=_0x3d342e-0x0;var _0x5da437=_0xeaaf[_0x3d342e];return _0x5da437;};'use strict';var client=require(_0xfeaa('0x0'));var moment=require('moment');var _=require(_0xfeaa('0x1'));exports[_0xfeaa('0x2')]=function(_0xabea9d,_0x5557b0){return function(){return client[_0xfeaa('0x3')]('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0xabea9d},'include':[{'model':_0xfeaa('0x4'),'as':_0xfeaa('0x5')}],'limit':_0x5557b0,'raw':![]},'log':_0xfeaa('0x6')});};};exports['updateContacts']=function(_0x154b76,_0xfa5dd4,_0x3ce7d1){return function(){return client[_0xfeaa('0x3')](_0xfeaa('0x7'),{'body':_0x154b76,'options':{'where':{'VoiceQueueId':_0xfa5dd4,'scheduledat':{'$lte':moment()[_0xfeaa('0x8')](_0xfeaa('0x9'))}},'limit':_0x3ce7d1},'log':'UpdateCmHopper'});};};exports[_0xfeaa('0xa')]=function(_0x4754c0){return function(){return client['Request'](_0xfeaa('0x7'),{'body':_0x4754c0,'options':{'where':{'ContactId':_0x4754c0[_0xfeaa('0xb')],'ListId':_0x4754c0['ListId'],'VoiceQueueId':_0x4754c0[_0xfeaa('0xc')],'CampaignId':_0x4754c0[_0xfeaa('0xd')]}},'log':_0xfeaa('0xa')});};};exports[_0xfeaa('0xe')]=function(_0x879157,_0x7d63c3,_0x2f375f){return function(){return client[_0xfeaa('0x3')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x879157,'ListId':_0x7d63c3,'ContactId':_0x2f375f}},'log':_0xfeaa('0xf')});};};exports[_0xfeaa('0x10')]=function(_0x19b417,_0x79eff,_0x5a46d7,_0x1bae13){return function(){return client['Request'](_0xfeaa('0x11'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x19b417,'active':![],'scheduledat':{'$lte':moment()[_0xfeaa('0x8')](_0xfeaa('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x79eff}}]},'order':[['priority',_0xfeaa('0x12')],[_0xfeaa('0x13'),_0x1bae13],['id',_0xfeaa('0x14')]],'raw':!![],'limit':_0x5a46d7},'log':_0xfeaa('0x11')});};};exports[_0xfeaa('0x15')]=function(_0x782a53,_0x4b1b2c,_0xb8d6e6){return function(){return client[_0xfeaa('0x3')](_0xfeaa('0x11'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x782a53,'active':![],'scheduledat':{'$lte':moment()[_0xfeaa('0x8')](_0xfeaa('0x9'))}},'include':[{'model':_0xfeaa('0x4'),'as':_0xfeaa('0x5')}],'order':[[_0xfeaa('0x16'),_0xfeaa('0x12')],[_0xfeaa('0x13'),_0xb8d6e6],['id','ASC']],'raw':!![],'limit':_0x4b1b2c},'log':_0xfeaa('0x17')});};};exports[_0xfeaa('0x18')]=function(_0x4d4ac0,_0x2a65f7){return function(){_0x4d4ac0['campaign']=_0x4d4ac0[_0xfeaa('0x19')];return client['Request'](_0xfeaa('0x1a'),{'body':_0x4d4ac0,'options':{'where':{'ContactId':_0x4d4ac0[_0xfeaa('0xb')],'ListId':_0x4d4ac0[_0xfeaa('0x1b')],'VoiceQueueId':_0x4d4ac0[_0xfeaa('0xc')],'CampaignId':_0x4d4ac0[_0xfeaa('0xd')],'active':_0x2a65f7?undefined:!![]}},'log':_0xfeaa('0x1a')});};};exports[_0xfeaa('0x1c')]=function(_0x56c382){return function(){return client[_0xfeaa('0x3')](_0xfeaa('0x1d'),{'options':{'where':{'VoiceQueueId':_0x56c382['id']?_0x56c382['id']||null:null}},'log':_0xfeaa('0x1c')});};};exports[_0xfeaa('0x1e')]=function(_0x886e5a){return function(){return client[_0xfeaa('0x3')](_0xfeaa('0x1f'),{'options':{'where':{'id':_0x886e5a},'include':[{'model':_0xfeaa('0x4'),'as':_0xfeaa('0x5')},{'model':_0xfeaa('0x20'),'as':_0xfeaa('0x21'),'attributes':['id',_0xfeaa('0x22')]},{'model':'VoiceQueue','as':_0xfeaa('0x23'),'attributes':['id',_0xfeaa('0x22')]}],'raw':!![]},'log':'getCmHopper'});};};exports[_0xfeaa('0x24')]=function(_0x3bcf0d,_0x4b30c7,_0x49a59f){return function(){return client[_0xfeaa('0x3')](_0xfeaa('0x7'),{'body':_0x3bcf0d,'options':{'where':{'id':_0x4b30c7},'limit':_0x49a59f},'log':_0xfeaa('0x7')});};};exports[_0xfeaa('0x25')]=function(_0x21db33,_0x3fcbff){return function(){return client[_0xfeaa('0x3')]('GetContactRecallMe',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x21db33,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xfeaa('0x8')](_0xfeaa('0x9'))},'UserId':{'$in':_0x3fcbff}},'order':[[_0xfeaa('0x16'),_0xfeaa('0x12')],[_0xfeaa('0x13'),_0xfeaa('0x12')],['id',_0xfeaa('0x14')]],'include':[{'model':_0xfeaa('0x4'),'as':_0xfeaa('0x5')},{'model':'User','as':_0xfeaa('0x21'),'attributes':['id',_0xfeaa('0x22'),_0xfeaa('0x26')]}],'group':_0xfeaa('0x27'),'raw':!![]},'log':_0xfeaa('0x11')});};};
\ No newline at end of file