Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 79b95a1..0245f27 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x539d=['handlePreviewRecallNotifications','../client','getContacts','GetCmHopper','CmContact','Contact','getCmHopper','updateContacts','Request','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','DESC','scheduledat','ASC','getContactDialerIvr','GetContactDialerIvr','moveContactManagedDialer','queue','MoveContactManagedDialer','ContactId','ListId','countReScheduled','CountReScheduled','GetCmHopperPreview','Agent','VoiceQueue','Queue','name','getContactRecallMe','User','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls'];(function(_0x3ab05d,_0x378119){var _0x125014=function(_0x21239a){while(--_0x21239a){_0x3ab05d['push'](_0x3ab05d['shift']());}};_0x125014(++_0x378119);}(_0x539d,0x17b));var _0xd539=function(_0x4aa662,_0x1cc90c){_0x4aa662=_0x4aa662-0x0;var _0x336478=_0x539d[_0x4aa662];return _0x336478;};'use strict';var client=require(_0xd539('0x0'));var moment=require('moment');exports[_0xd539('0x1')]=function(_0x1c859a,_0x4f0303){return function(){return client['Request'](_0xd539('0x2'),{'options':{'where':{'VoiceQueueId':_0x1c859a},'include':[{'model':_0xd539('0x3'),'as':_0xd539('0x4')}],'limit':_0x4f0303,'raw':![]},'log':_0xd539('0x5')});};};exports[_0xd539('0x6')]=function(_0x4c9697,_0x341dd4,_0x158719){return function(){return client[_0xd539('0x7')](_0xd539('0x8'),{'body':_0x4c9697,'options':{'where':{'VoiceQueueId':_0x341dd4,'scheduledat':{'$lte':moment()[_0xd539('0x9')](_0xd539('0xa'))}},'limit':_0x158719},'log':'UpdateCmHopper'});};};exports[_0xd539('0xb')]=function(_0x2015a5){return client[_0xd539('0x7')](_0xd539('0x8'),{'body':_0x2015a5,'options':{'where':{'ContactId':_0x2015a5['ContactId'],'ListId':_0x2015a5['ListId'],'VoiceQueueId':_0x2015a5[_0xd539('0xc')],'CampaignId':_0x2015a5[_0xd539('0xd')]}},'log':_0xd539('0xb')});};exports[_0xd539('0xe')]=function(_0x424b1a,_0x3c59d1,_0x2367f1){return function(){return client[_0xd539('0x7')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x424b1a,'ListId':_0x3c59d1,'ContactId':_0x2367f1}},'log':_0xd539('0xf')});};};exports[_0xd539('0x10')]=function(_0x191f6e,_0x4b3461,_0x1391f8,_0xac445e){return client['Request'](_0xd539('0x11'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x191f6e,'active':![],'scheduledat':{'$lte':moment()[_0xd539('0x9')](_0xd539('0xa'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x4b3461}}]},'order':[[_0xd539('0x12'),_0xd539('0x13')],[_0xd539('0x14'),_0xac445e],['id',_0xd539('0x15')]],'raw':!![],'limit':_0x1391f8},'log':_0xd539('0x11')});};exports[_0xd539('0x16')]=function(_0x17f7bf,_0x460f3c,_0x54d8ff){return client[_0xd539('0x7')](_0xd539('0x11'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x17f7bf,'active':![],'scheduledat':{'$lte':moment()[_0xd539('0x9')](_0xd539('0xa'))}},'include':[{'model':_0xd539('0x3'),'as':_0xd539('0x4')}],'order':[[_0xd539('0x12'),_0xd539('0x13')],['scheduledat',_0x54d8ff],['id','ASC']],'raw':!![],'limit':_0x460f3c},'log':_0xd539('0x17')});};exports[_0xd539('0x18')]=function(_0x3edf97,_0xad186e){_0x3edf97['campaign']=_0x3edf97[_0xd539('0x19')];return client[_0xd539('0x7')](_0xd539('0x1a'),{'body':_0x3edf97,'options':{'where':{'ContactId':_0x3edf97[_0xd539('0x1b')],'ListId':_0x3edf97[_0xd539('0x1c')],'VoiceQueueId':_0x3edf97[_0xd539('0xc')],'CampaignId':_0x3edf97[_0xd539('0xd')],'active':_0xad186e?undefined:!![]}},'log':_0xd539('0x1a')});};exports[_0xd539('0x1d')]=function(_0x56c100){return client[_0xd539('0x7')](_0xd539('0x1e'),{'options':{'where':{'VoiceQueueId':_0x56c100['id']?_0x56c100['id']||null:null}},'log':_0xd539('0x1d')});};exports['getContactPreview']=function(_0x564cf2){return function(){return client[_0xd539('0x7')](_0xd539('0x1f'),{'options':{'where':{'id':_0x564cf2},'include':[{'model':_0xd539('0x3'),'as':_0xd539('0x4')},{'model':'User','as':_0xd539('0x20'),'attributes':['id','name']},{'model':_0xd539('0x21'),'as':_0xd539('0x22'),'attributes':['id',_0xd539('0x23')]}],'raw':!![]},'log':_0xd539('0x5')});};};exports['unlockContact']=function(_0x4c836d,_0x24f94c,_0x40720f){return client['Request']('UpdateCmHopper',{'body':_0x4c836d,'options':{'where':{'id':_0x24f94c},'limit':_0x40720f},'log':'UpdateCmHopper'});};exports[_0xd539('0x24')]=function(_0x406710,_0x66b2ab){return function(){return client[_0xd539('0x7')]('GetContactRecallMe',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x406710,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xd539('0x9')](_0xd539('0xa'))},'UserId':{'$in':_0x66b2ab}},'order':[['priority',_0xd539('0x13')],[_0xd539('0x14'),_0xd539('0x13')],['id',_0xd539('0x15')]],'include':[{'model':_0xd539('0x3'),'as':'Contact'},{'model':_0xd539('0x25'),'as':'Agent','attributes':['id',_0xd539('0x23'),'voicePause']}],'group':_0xd539('0x26'),'raw':!![]},'log':'GetContactDialer'});};};exports[_0xd539('0x27')]=function(_0x3edee2,_0xca69e5){return client[_0xd539('0x7')](_0xd539('0x28'),{'body':_0x3edee2,'options':_0xca69e5||{},'log':_0xd539('0x28')});};exports[_0xd539('0x29')]=function(_0xcc2339,_0x3a6647,_0x400a07){return function(){return client[_0xd539('0x7')]('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueIds':_0xcc2339,'interval':_0x3a6647,'availableAgentsIds':_0x400a07}},'log':_0xd539('0x29')});};};
\ No newline at end of file
+var _0xc99e=['GetContactDialer','priority','DESC','scheduledat','ASC','getContactDialerIvr','GetContactDialerIvr','moveContactManagedDialer','MoveContactManagedDialer','CampaignId','countReScheduled','CountReScheduled','getContactPreview','User','Agent','name','VoiceQueue','unlockContact','UpdateCmHopper','getContactRecallMe','GetContactRecallMe','voicePause','db.CmHopper.UserId','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','moment','getContacts','Request','CmContact','Contact','getCmHopper','updateContacts','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','VoiceQueueId','destroyContact','DestroyCmHopper'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0xc99e,0x6e));var _0xec99=function(_0x163163,_0x467df1){_0x163163=_0x163163-0x0;var _0x4be8c=_0xc99e[_0x163163];return _0x4be8c;};'use strict';var client=require(_0xec99('0x0'));var moment=require(_0xec99('0x1'));exports[_0xec99('0x2')]=function(_0x1d5800,_0x22b65c){return function(){return client[_0xec99('0x3')]('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x1d5800},'include':[{'model':_0xec99('0x4'),'as':_0xec99('0x5')}],'limit':_0x22b65c,'raw':![]},'log':_0xec99('0x6')});};};exports[_0xec99('0x7')]=function(_0x1b5c37,_0x39821d,_0x451dd4){return function(){return client[_0xec99('0x3')]('UpdateCmHopper',{'body':_0x1b5c37,'options':{'where':{'VoiceQueueId':_0x39821d,'scheduledat':{'$lte':moment()[_0xec99('0x8')](_0xec99('0x9'))}},'limit':_0x451dd4},'log':'UpdateCmHopper'});};};exports[_0xec99('0xa')]=function(_0xc0a747){return client['Request']('UpdateCmHopper',{'body':_0xc0a747,'options':{'where':{'ContactId':_0xc0a747[_0xec99('0xb')],'ListId':_0xc0a747[_0xec99('0xc')],'VoiceQueueId':_0xc0a747[_0xec99('0xd')],'CampaignId':_0xc0a747['CampaignId']}},'log':_0xec99('0xa')});};exports[_0xec99('0xe')]=function(_0x1853d7,_0x33e223,_0x45947c){return function(){return client[_0xec99('0x3')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x1853d7,'ListId':_0x33e223,'ContactId':_0x45947c}},'log':_0xec99('0xf')});};};exports['getContactDialer']=function(_0xe1a114,_0x53d44e,_0x2c7cc9,_0x57bf4c){return client['Request'](_0xec99('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0xe1a114,'active':![],'scheduledat':{'$lte':moment()['format'](_0xec99('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x53d44e}}]},'order':[[_0xec99('0x11'),_0xec99('0x12')],[_0xec99('0x13'),_0x57bf4c],['id',_0xec99('0x14')]],'raw':!![],'limit':_0x2c7cc9},'log':_0xec99('0x10')});};exports[_0xec99('0x15')]=function(_0x4e03db,_0x304db7,_0x52d9a7){return client[_0xec99('0x3')](_0xec99('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x4e03db,'active':![],'scheduledat':{'$lte':moment()[_0xec99('0x8')](_0xec99('0x9'))}},'include':[{'model':'CmContact','as':'Contact'}],'order':[['priority',_0xec99('0x12')],[_0xec99('0x13'),_0x52d9a7],['id',_0xec99('0x14')]],'raw':!![],'limit':_0x304db7},'log':_0xec99('0x16')});};exports[_0xec99('0x17')]=function(_0x1edaf9,_0x1644a8){_0x1edaf9['campaign']=_0x1edaf9['queue'];return client[_0xec99('0x3')](_0xec99('0x18'),{'body':_0x1edaf9,'options':{'where':{'ContactId':_0x1edaf9['ContactId'],'ListId':_0x1edaf9[_0xec99('0xc')],'VoiceQueueId':_0x1edaf9[_0xec99('0xd')],'CampaignId':_0x1edaf9[_0xec99('0x19')],'active':_0x1644a8?undefined:!![]}},'log':_0xec99('0x18')});};exports[_0xec99('0x1a')]=function(_0x3c2e16){return client[_0xec99('0x3')](_0xec99('0x1b'),{'options':{'where':{'VoiceQueueId':_0x3c2e16['id']?_0x3c2e16['id']||null:null}},'log':_0xec99('0x1a')});};exports[_0xec99('0x1c')]=function(_0x5c374e){return function(){return client[_0xec99('0x3')]('GetCmHopperPreview',{'options':{'where':{'id':_0x5c374e},'include':[{'model':'CmContact','as':'Contact'},{'model':_0xec99('0x1d'),'as':_0xec99('0x1e'),'attributes':['id',_0xec99('0x1f')]},{'model':_0xec99('0x20'),'as':'Queue','attributes':['id',_0xec99('0x1f')]}],'raw':!![]},'log':_0xec99('0x6')});};};exports[_0xec99('0x21')]=function(_0x40bdcc,_0x3c62eb,_0x8b0181){return client[_0xec99('0x3')](_0xec99('0x22'),{'body':_0x40bdcc,'options':{'where':{'id':_0x3c62eb},'limit':_0x8b0181},'log':_0xec99('0x22')});};exports[_0xec99('0x23')]=function(_0x153bde,_0x575ab4){return function(){return client[_0xec99('0x3')](_0xec99('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x153bde,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0xec99('0x9'))},'UserId':{'$in':_0x575ab4}},'order':[[_0xec99('0x11'),_0xec99('0x12')],['scheduledat',_0xec99('0x12')],['id',_0xec99('0x14')]],'include':[{'model':_0xec99('0x4'),'as':_0xec99('0x5')},{'model':_0xec99('0x1d'),'as':_0xec99('0x1e'),'attributes':['id','name',_0xec99('0x25')]}],'group':_0xec99('0x26'),'raw':!![]},'log':_0xec99('0x10')});};};exports['resetActiveCalls']=function(_0x49acae,_0x545450){return client[_0xec99('0x3')]('ResetActiveCalls',{'body':_0x49acae,'options':_0x545450||{},'log':_0xec99('0x27')});};exports[_0xec99('0x28')]=function(_0x65e062,_0x15ccf3,_0x3b350d){return function(){return client['Request'](_0xec99('0x29'),{'body':{'where':{'voiceQueueIds':_0x65e062,'interval':_0x15ccf3,'availableAgentsIds':_0x3b350d}},'log':_0xec99('0x28')});};};
\ No newline at end of file