Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 9b2aa6f..d992bd9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x45f6=['GetCmHopperPreview','User','VoiceQueue','Queue','name','GetContactRecallMe','voicePause','db.CmHopper.UserId','../client','lodash','getContacts','Request','GetCmHopper','CmContact','getCmHopper','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','GetContactDialer','priority','DESC','scheduledat','ASC','getContactDialerIvr','Contact','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','ListId','countReScheduled','getContactPreview'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0x45f6,0x77));var _0x645f=function(_0x513047,_0x2199c5){_0x513047=_0x513047-0x0;var _0x15b779=_0x45f6[_0x513047];return _0x15b779;};'use strict';var client=require(_0x645f('0x0'));var moment=require('moment');var _=require(_0x645f('0x1'));exports[_0x645f('0x2')]=function(_0x427cd1,_0x3c8e89){return function(){return client[_0x645f('0x3')](_0x645f('0x4'),{'options':{'where':{'VoiceQueueId':_0x427cd1},'include':[{'model':_0x645f('0x5'),'as':'Contact'}],'limit':_0x3c8e89,'raw':![]},'log':_0x645f('0x6')});};};exports['updateContacts']=function(_0x551eb5,_0x4eb34c,_0x5ad307){return function(){return client[_0x645f('0x3')](_0x645f('0x7'),{'body':_0x551eb5,'options':{'where':{'VoiceQueueId':_0x4eb34c,'scheduledat':{'$lte':moment()[_0x645f('0x8')](_0x645f('0x9'))}},'limit':_0x5ad307},'log':_0x645f('0x7')});};};exports[_0x645f('0xa')]=function(_0x2e002f){return function(){return client[_0x645f('0x3')](_0x645f('0x7'),{'body':_0x2e002f,'options':{'where':{'ContactId':_0x2e002f['ContactId'],'ListId':_0x2e002f['ListId'],'VoiceQueueId':_0x2e002f[_0x645f('0xb')],'CampaignId':_0x2e002f[_0x645f('0xc')]}},'log':'rescheduleContact'});};};exports[_0x645f('0xd')]=function(_0x4f53cb,_0x1b2bc1,_0x5d83f0){return function(){return client[_0x645f('0x3')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x4f53cb,'ListId':_0x1b2bc1,'ContactId':_0x5d83f0}},'log':_0x645f('0xe')});};};exports['getContactDialer']=function(_0x5418ba,_0x1b188b,_0x2e3ad2,_0x110ff5){return function(){return client[_0x645f('0x3')](_0x645f('0xf'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5418ba,'active':![],'scheduledat':{'$lte':moment()[_0x645f('0x8')](_0x645f('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x1b188b}}]},'order':[[_0x645f('0x10'),_0x645f('0x11')],[_0x645f('0x12'),_0x110ff5],['id',_0x645f('0x13')]],'raw':!![],'limit':_0x2e3ad2},'log':_0x645f('0xf')});};};exports[_0x645f('0x14')]=function(_0x470bfb,_0x33ec36,_0x3bf8df){return function(){return client[_0x645f('0x3')](_0x645f('0xf'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x470bfb,'active':![],'scheduledat':{'$lte':moment()[_0x645f('0x8')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':'CmContact','as':_0x645f('0x15')}],'order':[[_0x645f('0x10'),_0x645f('0x11')],[_0x645f('0x12'),_0x3bf8df],['id','ASC']],'raw':!![],'limit':_0x33ec36},'log':'GetContactDialerIvr'});};};exports[_0x645f('0x16')]=function(_0x36e1af,_0x41fbba){return function(){_0x36e1af[_0x645f('0x17')]=_0x36e1af[_0x645f('0x18')];return client[_0x645f('0x3')](_0x645f('0x19'),{'body':_0x36e1af,'options':{'where':{'ContactId':_0x36e1af['ContactId'],'ListId':_0x36e1af[_0x645f('0x1a')],'VoiceQueueId':_0x36e1af[_0x645f('0xb')],'CampaignId':_0x36e1af[_0x645f('0xc')],'active':_0x41fbba?undefined:!![]}},'log':_0x645f('0x19')});};};exports['countReScheduled']=function(_0x5b85ed){return function(){return client[_0x645f('0x3')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x5b85ed['id']?_0x5b85ed['id']||null:null}},'log':_0x645f('0x1b')});};};exports[_0x645f('0x1c')]=function(_0x5e5971){return function(){return client[_0x645f('0x3')](_0x645f('0x1d'),{'options':{'where':{'id':_0x5e5971},'include':[{'model':_0x645f('0x5'),'as':_0x645f('0x15')},{'model':_0x645f('0x1e'),'as':'Agent','attributes':['id','name']},{'model':_0x645f('0x1f'),'as':_0x645f('0x20'),'attributes':['id',_0x645f('0x21')]}],'raw':!![]},'log':'getCmHopper'});};};exports['unlockContact']=function(_0x4906df,_0x41ba17,_0x5d9753){return function(){return client[_0x645f('0x3')]('UpdateCmHopper',{'body':_0x4906df,'options':{'where':{'id':_0x41ba17},'limit':_0x5d9753},'log':_0x645f('0x7')});};};exports['getContactRecallMe']=function(_0x782530,_0x26212d){return function(){return client[_0x645f('0x3')](_0x645f('0x22'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x782530,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x645f('0x8')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x26212d}},'order':[[_0x645f('0x10'),_0x645f('0x11')],[_0x645f('0x12'),_0x645f('0x11')],['id',_0x645f('0x13')]],'include':[{'model':_0x645f('0x5'),'as':_0x645f('0x15')},{'model':_0x645f('0x1e'),'as':'Agent','attributes':['id',_0x645f('0x21'),_0x645f('0x23')]}],'group':_0x645f('0x24'),'raw':!![]},'log':_0x645f('0xf')});};};
\ No newline at end of file
+var _0x9d95=['priority','ASC','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','VoiceQueueId','CountReScheduled','countReScheduled','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','GetContactRecallMe','Contact','voicePause','../client','lodash','getContacts','Request','CmContact','getCmHopper','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','ContactId','ListId','CampaignId','rescheduleContact','destroyContact','DestroyCmHopper','GetContactDialer','DESC','scheduledat','getContactDialerIvr'];(function(_0x3b72d4,_0x25f720){var _0x309cce=function(_0x40e163){while(--_0x40e163){_0x3b72d4['push'](_0x3b72d4['shift']());}};_0x309cce(++_0x25f720);}(_0x9d95,0x88));var _0x59d9=function(_0x171920,_0x51f908){_0x171920=_0x171920-0x0;var _0x24b7da=_0x9d95[_0x171920];return _0x24b7da;};'use strict';var client=require(_0x59d9('0x0'));var moment=require('moment');var _=require(_0x59d9('0x1'));exports[_0x59d9('0x2')]=function(_0x48b346,_0x451deb){return function(){return client[_0x59d9('0x3')]('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x48b346},'include':[{'model':_0x59d9('0x4'),'as':'Contact'}],'limit':_0x451deb,'raw':![]},'log':_0x59d9('0x5')});};};exports[_0x59d9('0x6')]=function(_0x1df246,_0x23b964,_0xff3b7f){return function(){return client[_0x59d9('0x3')](_0x59d9('0x7'),{'body':_0x1df246,'options':{'where':{'VoiceQueueId':_0x23b964,'scheduledat':{'$lte':moment()[_0x59d9('0x8')](_0x59d9('0x9'))}},'limit':_0xff3b7f},'log':_0x59d9('0x7')});};};exports['rescheduleContact']=function(_0x126f74){return function(){return client[_0x59d9('0x3')](_0x59d9('0x7'),{'body':_0x126f74,'options':{'where':{'ContactId':_0x126f74[_0x59d9('0xa')],'ListId':_0x126f74[_0x59d9('0xb')],'VoiceQueueId':_0x126f74['VoiceQueueId'],'CampaignId':_0x126f74[_0x59d9('0xc')]}},'log':_0x59d9('0xd')});};};exports[_0x59d9('0xe')]=function(_0x46eb7e,_0x4f9f13,_0xdd0aa8){return function(){return client[_0x59d9('0x3')](_0x59d9('0xf'),{'options':{'where':{'VoiceQueueId':_0x46eb7e,'ListId':_0x4f9f13,'ContactId':_0xdd0aa8}},'log':'DestroyCmHopper'});};};exports['getContactDialer']=function(_0x5784b3,_0x20793d,_0x131b6e,_0x45e621){return function(){return client['Request'](_0x59d9('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5784b3,'active':![],'scheduledat':{'$lte':moment()[_0x59d9('0x8')](_0x59d9('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x20793d}}]},'order':[['priority',_0x59d9('0x11')],[_0x59d9('0x12'),_0x45e621],['id','ASC']],'raw':!![],'limit':_0x131b6e},'log':_0x59d9('0x10')});};};exports[_0x59d9('0x13')]=function(_0x5362ef,_0xeec45,_0xcda013){return function(){return client[_0x59d9('0x3')](_0x59d9('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x5362ef,'active':![],'scheduledat':{'$lte':moment()['format'](_0x59d9('0x9'))}},'include':[{'model':_0x59d9('0x4'),'as':'Contact'}],'order':[[_0x59d9('0x14'),_0x59d9('0x11')],['scheduledat',_0xcda013],['id',_0x59d9('0x15')]],'raw':!![],'limit':_0xeec45},'log':_0x59d9('0x16')});};};exports[_0x59d9('0x17')]=function(_0x284b9e,_0x36e380){return function(){_0x284b9e[_0x59d9('0x18')]=_0x284b9e[_0x59d9('0x19')];return client[_0x59d9('0x3')](_0x59d9('0x1a'),{'body':_0x284b9e,'options':{'where':{'ContactId':_0x284b9e[_0x59d9('0xa')],'ListId':_0x284b9e[_0x59d9('0xb')],'VoiceQueueId':_0x284b9e[_0x59d9('0x1b')],'CampaignId':_0x284b9e[_0x59d9('0xc')],'active':_0x36e380?undefined:!![]}},'log':_0x59d9('0x1a')});};};exports['countReScheduled']=function(_0x3601b7){return function(){return client[_0x59d9('0x3')](_0x59d9('0x1c'),{'options':{'where':{'VoiceQueueId':_0x3601b7['id']?_0x3601b7['id']||null:null}},'log':_0x59d9('0x1d')});};};exports['getContactPreview']=function(_0x368475){return function(){return client['Request'](_0x59d9('0x1e'),{'options':{'where':{'id':_0x368475},'include':[{'model':_0x59d9('0x4'),'as':'Contact'},{'model':_0x59d9('0x1f'),'as':_0x59d9('0x20'),'attributes':['id',_0x59d9('0x21')]},{'model':_0x59d9('0x22'),'as':_0x59d9('0x23'),'attributes':['id',_0x59d9('0x21')]}],'raw':!![]},'log':_0x59d9('0x5')});};};exports['unlockContact']=function(_0x58642f,_0x328233,_0x453430){return function(){return client[_0x59d9('0x3')]('UpdateCmHopper',{'body':_0x58642f,'options':{'where':{'id':_0x328233},'limit':_0x453430},'log':'UpdateCmHopper'});};};exports['getContactRecallMe']=function(_0x5eeb44,_0x52082c){return function(){return client[_0x59d9('0x3')](_0x59d9('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5eeb44,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x59d9('0x8')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x52082c}},'order':[[_0x59d9('0x14'),'DESC'],[_0x59d9('0x12'),_0x59d9('0x11')],['id',_0x59d9('0x15')]],'include':[{'model':_0x59d9('0x4'),'as':_0x59d9('0x25')},{'model':_0x59d9('0x1f'),'as':_0x59d9('0x20'),'attributes':['id',_0x59d9('0x21'),_0x59d9('0x26')]}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0x59d9('0x10')});};};
\ No newline at end of file