Built motion from commit 43538d75.|2.5.35
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 91731b7..3888b31 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3b98=['ContactId','ListId','VoiceQueueId','CampaignId','DestroyCmHopper','getContactDialer','GetContactDialer','priority','scheduledat','ASC','getContactDialerIvr','DESC','GetContactDialerIvr','moveContactManagedDialer','campaign','MoveContactManagedDialer','countReScheduled','CountReScheduled','GetCmHopperPreview','User','Agent','name','VoiceQueue','getCmHopper','unlockContact','getContactRecallMe','db.CmHopper.UserId','../client','lodash','getContacts','Request','GetCmHopper','CmContact','Contact','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact'];(function(_0x2f4afc,_0x1d0f82){var _0x47490c=function(_0x597cb0){while(--_0x597cb0){_0x2f4afc['push'](_0x2f4afc['shift']());}};_0x47490c(++_0x1d0f82);}(_0x3b98,0xff));var _0x83b9=function(_0x3c984c,_0x2840a2){_0x3c984c=_0x3c984c-0x0;var _0xffad89=_0x3b98[_0x3c984c];return _0xffad89;};'use strict';var client=require(_0x83b9('0x0'));var moment=require('moment');var _=require(_0x83b9('0x1'));exports[_0x83b9('0x2')]=function(_0x55866d,_0x2019a9){return function(){return client[_0x83b9('0x3')](_0x83b9('0x4'),{'options':{'where':{'VoiceQueueId':_0x55866d},'include':[{'model':_0x83b9('0x5'),'as':_0x83b9('0x6')}],'limit':_0x2019a9,'raw':![]},'log':'getCmHopper'});};};exports['updateContacts']=function(_0x3bc9f0,_0x5ac912,_0x297926){return function(){return client['Request'](_0x83b9('0x7'),{'body':_0x3bc9f0,'options':{'where':{'VoiceQueueId':_0x5ac912,'scheduledat':{'$lte':moment()[_0x83b9('0x8')](_0x83b9('0x9'))}},'limit':_0x297926},'log':_0x83b9('0x7')});};};exports[_0x83b9('0xa')]=function(_0x5529dd){return function(){return client[_0x83b9('0x3')]('UpdateCmHopper',{'body':_0x5529dd,'options':{'where':{'ContactId':_0x5529dd[_0x83b9('0xb')],'ListId':_0x5529dd[_0x83b9('0xc')],'VoiceQueueId':_0x5529dd[_0x83b9('0xd')],'CampaignId':_0x5529dd[_0x83b9('0xe')]}},'log':_0x83b9('0xa')});};};exports['destroyContact']=function(_0x100cae,_0xd4b439,_0x2210e2){return function(){return client[_0x83b9('0x3')](_0x83b9('0xf'),{'options':{'where':{'VoiceQueueId':_0x100cae,'ListId':_0xd4b439,'ContactId':_0x2210e2}},'log':_0x83b9('0xf')});};};exports[_0x83b9('0x10')]=function(_0x4364be,_0x15acd9,_0xeef4ab,_0x22774e){return function(){return client[_0x83b9('0x3')](_0x83b9('0x11'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x4364be,'active':![],'scheduledat':{'$lte':moment()[_0x83b9('0x8')](_0x83b9('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x15acd9}}]},'order':[[_0x83b9('0x12'),'DESC'],[_0x83b9('0x13'),_0x22774e],['id',_0x83b9('0x14')]],'raw':!![],'limit':_0xeef4ab},'log':_0x83b9('0x11')});};};exports[_0x83b9('0x15')]=function(_0x589c8b,_0x53734b,_0x50a5f7){return function(){return client['Request'](_0x83b9('0x11'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x589c8b,'active':![],'scheduledat':{'$lte':moment()[_0x83b9('0x8')](_0x83b9('0x9'))}},'include':[{'model':_0x83b9('0x5'),'as':_0x83b9('0x6')}],'order':[[_0x83b9('0x12'),_0x83b9('0x16')],[_0x83b9('0x13'),_0x50a5f7],['id','ASC']],'raw':!![],'limit':_0x53734b},'log':_0x83b9('0x17')});};};exports[_0x83b9('0x18')]=function(_0x28099b,_0x400ae8){return function(){_0x28099b[_0x83b9('0x19')]=_0x28099b['queue'];return client[_0x83b9('0x3')]('MoveContactManagedDialer',{'body':_0x28099b,'options':{'where':{'ContactId':_0x28099b[_0x83b9('0xb')],'ListId':_0x28099b['ListId'],'VoiceQueueId':_0x28099b['VoiceQueueId'],'CampaignId':_0x28099b['CampaignId'],'active':_0x400ae8?undefined:!![]}},'log':_0x83b9('0x1a')});};};exports[_0x83b9('0x1b')]=function(_0x578060){return function(){return client['Request'](_0x83b9('0x1c'),{'options':{'where':{'VoiceQueueId':_0x578060['id']?_0x578060['id']||null:null}},'log':'countReScheduled'});};};exports['getContactPreview']=function(_0x5ee0cb){return function(){return client['Request'](_0x83b9('0x1d'),{'options':{'where':{'id':_0x5ee0cb},'include':[{'model':_0x83b9('0x5'),'as':_0x83b9('0x6')},{'model':_0x83b9('0x1e'),'as':_0x83b9('0x1f'),'attributes':['id',_0x83b9('0x20')]},{'model':_0x83b9('0x21'),'as':'Queue','attributes':['id',_0x83b9('0x20')]}],'raw':!![]},'log':_0x83b9('0x22')});};};exports[_0x83b9('0x23')]=function(_0x5b9bce,_0x2ea6c0,_0x475399){return function(){return client['Request'](_0x83b9('0x7'),{'body':_0x5b9bce,'options':{'where':{'id':_0x2ea6c0},'limit':_0x475399},'log':_0x83b9('0x7')});};};exports[_0x83b9('0x24')]=function(_0x3929d2,_0xe1f7ce){return function(){return client[_0x83b9('0x3')]('GetContactRecallMe',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x3929d2,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x83b9('0x8')](_0x83b9('0x9'))},'UserId':{'$in':_0xe1f7ce}},'order':[[_0x83b9('0x12'),_0x83b9('0x16')],[_0x83b9('0x13'),_0x83b9('0x16')],['id','ASC']],'include':[{'model':_0x83b9('0x5'),'as':_0x83b9('0x6')},{'model':_0x83b9('0x1e'),'as':_0x83b9('0x1f'),'attributes':['id',_0x83b9('0x20'),'voicePause']}],'group':_0x83b9('0x25'),'raw':!![]},'log':_0x83b9('0x11')});};};
\ No newline at end of file
+var _0x9f09=['unlockContact','GetContactRecallMe','User','voicePause','db.CmHopper.UserId','../client','moment','getContacts','Request','GetCmHopper','CmContact','Contact','getCmHopper','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','ListId','rescheduleContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','DESC','scheduledat','ASC','getContactDialerIvr','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','ContactId','CampaignId','countReScheduled','CountReScheduled','getContactPreview','name','VoiceQueue','Queue'];(function(_0x338851,_0x4a493a){var _0x5dd0e8=function(_0x4b6f78){while(--_0x4b6f78){_0x338851['push'](_0x338851['shift']());}};_0x5dd0e8(++_0x4a493a);}(_0x9f09,0x195));var _0x99f0=function(_0x747852,_0x4c02f6){_0x747852=_0x747852-0x0;var _0x8d373a=_0x9f09[_0x747852];return _0x8d373a;};'use strict';var client=require(_0x99f0('0x0'));var moment=require(_0x99f0('0x1'));var _=require('lodash');exports[_0x99f0('0x2')]=function(_0x5713e2,_0xb3a4f5){return function(){return client[_0x99f0('0x3')](_0x99f0('0x4'),{'options':{'where':{'VoiceQueueId':_0x5713e2},'include':[{'model':_0x99f0('0x5'),'as':_0x99f0('0x6')}],'limit':_0xb3a4f5,'raw':![]},'log':_0x99f0('0x7')});};};exports[_0x99f0('0x8')]=function(_0x5ccebf,_0x389276,_0x12565b){return function(){return client['Request'](_0x99f0('0x9'),{'body':_0x5ccebf,'options':{'where':{'VoiceQueueId':_0x389276,'scheduledat':{'$lte':moment()[_0x99f0('0xa')](_0x99f0('0xb'))}},'limit':_0x12565b},'log':_0x99f0('0x9')});};};exports['rescheduleContact']=function(_0x5f4e82){return function(){return client[_0x99f0('0x3')](_0x99f0('0x9'),{'body':_0x5f4e82,'options':{'where':{'ContactId':_0x5f4e82['ContactId'],'ListId':_0x5f4e82[_0x99f0('0xc')],'VoiceQueueId':_0x5f4e82['VoiceQueueId'],'CampaignId':_0x5f4e82['CampaignId']}},'log':_0x99f0('0xd')});};};exports['destroyContact']=function(_0x2020e2,_0xcfadf0,_0x5dc23d){return function(){return client[_0x99f0('0x3')](_0x99f0('0xe'),{'options':{'where':{'VoiceQueueId':_0x2020e2,'ListId':_0xcfadf0,'ContactId':_0x5dc23d}},'log':'DestroyCmHopper'});};};exports[_0x99f0('0xf')]=function(_0x411a03,_0x5bc4fe,_0x490b35,_0x292125){return function(){return client[_0x99f0('0x3')](_0x99f0('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x411a03,'active':![],'scheduledat':{'$lte':moment()['format'](_0x99f0('0xb'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x5bc4fe}}]},'order':[[_0x99f0('0x11'),_0x99f0('0x12')],[_0x99f0('0x13'),_0x292125],['id',_0x99f0('0x14')]],'raw':!![],'limit':_0x490b35},'log':_0x99f0('0x10')});};};exports[_0x99f0('0x15')]=function(_0x3f3ce9,_0x54d0a1,_0x123a14){return function(){return client[_0x99f0('0x3')](_0x99f0('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x3f3ce9,'active':![],'scheduledat':{'$lte':moment()['format'](_0x99f0('0xb'))}},'include':[{'model':_0x99f0('0x5'),'as':_0x99f0('0x6')}],'order':[[_0x99f0('0x11'),_0x99f0('0x12')],[_0x99f0('0x13'),_0x123a14],['id',_0x99f0('0x14')]],'raw':!![],'limit':_0x54d0a1},'log':_0x99f0('0x16')});};};exports[_0x99f0('0x17')]=function(_0x3887b4,_0x51c37e){return function(){_0x3887b4[_0x99f0('0x18')]=_0x3887b4[_0x99f0('0x19')];return client[_0x99f0('0x3')](_0x99f0('0x1a'),{'body':_0x3887b4,'options':{'where':{'ContactId':_0x3887b4[_0x99f0('0x1b')],'ListId':_0x3887b4[_0x99f0('0xc')],'VoiceQueueId':_0x3887b4['VoiceQueueId'],'CampaignId':_0x3887b4[_0x99f0('0x1c')],'active':_0x51c37e?undefined:!![]}},'log':_0x99f0('0x1a')});};};exports[_0x99f0('0x1d')]=function(_0x3673f6){return function(){return client['Request'](_0x99f0('0x1e'),{'options':{'where':{'VoiceQueueId':_0x3673f6['id']?_0x3673f6['id']||null:null}},'log':'countReScheduled'});};};exports[_0x99f0('0x1f')]=function(_0x2d7a2d){return function(){return client['Request']('GetCmHopperPreview',{'options':{'where':{'id':_0x2d7a2d},'include':[{'model':'CmContact','as':_0x99f0('0x6')},{'model':'User','as':'Agent','attributes':['id',_0x99f0('0x20')]},{'model':_0x99f0('0x21'),'as':_0x99f0('0x22'),'attributes':['id',_0x99f0('0x20')]}],'raw':!![]},'log':_0x99f0('0x7')});};};exports[_0x99f0('0x23')]=function(_0x53d3e6,_0x417c5b,_0x9ca798){return function(){return client[_0x99f0('0x3')](_0x99f0('0x9'),{'body':_0x53d3e6,'options':{'where':{'id':_0x417c5b},'limit':_0x9ca798},'log':_0x99f0('0x9')});};};exports['getContactRecallMe']=function(_0xfb888e,_0x2b8fbc){return function(){return client[_0x99f0('0x3')](_0x99f0('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0xfb888e,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x99f0('0xa')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x2b8fbc}},'order':[[_0x99f0('0x11'),_0x99f0('0x12')],[_0x99f0('0x13'),_0x99f0('0x12')],['id',_0x99f0('0x14')]],'include':[{'model':_0x99f0('0x5'),'as':'Contact'},{'model':_0x99f0('0x25'),'as':'Agent','attributes':['id',_0x99f0('0x20'),_0x99f0('0x26')]}],'group':_0x99f0('0x27'),'raw':!![]},'log':_0x99f0('0x10')});};};
\ No newline at end of file