Built motion from commit 91ed41ac.|2.5.44
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 90e4fe3..a860324 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb320=['name','VoiceQueue','Queue','unlockContact','getContactRecallMe','voicePause','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','moment','lodash','Request','GetCmHopper','getCmHopper','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','DESC','ASC','getContactDialerIvr','CmContact','Contact','scheduledat','GetContactDialerIvr','moveContactManagedDialer','campaign','MoveContactManagedDialer','VoiceQueueId','countReScheduled','getContactPreview','GetCmHopperPreview','User','Agent'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb320,0x13e));var _0x0b32=function(_0x26efac,_0x21ab8a){_0x26efac=_0x26efac-0x0;var _0x8482e4=_0xb320[_0x26efac];return _0x8482e4;};'use strict';var client=require('../client');var moment=require(_0x0b32('0x0'));var _=require(_0x0b32('0x1'));exports['getContacts']=function(_0x3c8785,_0x5ad1a9){return function(){return client[_0x0b32('0x2')](_0x0b32('0x3'),{'options':{'where':{'VoiceQueueId':_0x3c8785},'include':[{'model':'CmContact','as':'Contact'}],'limit':_0x5ad1a9,'raw':![]},'log':_0x0b32('0x4')});};};exports[_0x0b32('0x5')]=function(_0xa65f4e,_0xa2a2b0,_0x59cb92){return function(){return client[_0x0b32('0x2')](_0x0b32('0x6'),{'body':_0xa65f4e,'options':{'where':{'VoiceQueueId':_0xa2a2b0,'scheduledat':{'$lte':moment()[_0x0b32('0x7')](_0x0b32('0x8'))}},'limit':_0x59cb92},'log':'UpdateCmHopper'});};};exports[_0x0b32('0x9')]=function(_0x838ac7){return function(){return client[_0x0b32('0x2')](_0x0b32('0x6'),{'body':_0x838ac7,'options':{'where':{'ContactId':_0x838ac7[_0x0b32('0xa')],'ListId':_0x838ac7[_0x0b32('0xb')],'VoiceQueueId':_0x838ac7['VoiceQueueId'],'CampaignId':_0x838ac7[_0x0b32('0xc')]}},'log':'rescheduleContact'});};};exports[_0x0b32('0xd')]=function(_0x332df8,_0x1f0cd0,_0x105fec){return function(){return client[_0x0b32('0x2')](_0x0b32('0xe'),{'options':{'where':{'VoiceQueueId':_0x332df8,'ListId':_0x1f0cd0,'ContactId':_0x105fec}},'log':_0x0b32('0xe')});};};exports[_0x0b32('0xf')]=function(_0x1828d3,_0x90c6b,_0x361049,_0x7f0cc5){return function(){return client['Request'](_0x0b32('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x1828d3,'active':![],'scheduledat':{'$lte':moment()[_0x0b32('0x7')](_0x0b32('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x90c6b}}]},'order':[[_0x0b32('0x11'),_0x0b32('0x12')],['scheduledat',_0x7f0cc5],['id',_0x0b32('0x13')]],'raw':!![],'limit':_0x361049},'log':'GetContactDialer'});};};exports[_0x0b32('0x14')]=function(_0x5e2809,_0x460fbe,_0x13ca70){return function(){return client[_0x0b32('0x2')](_0x0b32('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x5e2809,'active':![],'scheduledat':{'$lte':moment()['format'](_0x0b32('0x8'))}},'include':[{'model':_0x0b32('0x15'),'as':_0x0b32('0x16')}],'order':[['priority',_0x0b32('0x12')],[_0x0b32('0x17'),_0x13ca70],['id','ASC']],'raw':!![],'limit':_0x460fbe},'log':_0x0b32('0x18')});};};exports[_0x0b32('0x19')]=function(_0x17b2b8,_0x1931b9){return function(){_0x17b2b8[_0x0b32('0x1a')]=_0x17b2b8['queue'];return client['Request'](_0x0b32('0x1b'),{'body':_0x17b2b8,'options':{'where':{'ContactId':_0x17b2b8[_0x0b32('0xa')],'ListId':_0x17b2b8['ListId'],'VoiceQueueId':_0x17b2b8[_0x0b32('0x1c')],'CampaignId':_0x17b2b8['CampaignId'],'active':_0x1931b9?undefined:!![]}},'log':'MoveContactManagedDialer'});};};exports[_0x0b32('0x1d')]=function(_0x1d9c6d){return function(){return client[_0x0b32('0x2')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x1d9c6d['id']?_0x1d9c6d['id']||null:null}},'log':_0x0b32('0x1d')});};};exports[_0x0b32('0x1e')]=function(_0x36980a){return function(){return client['Request'](_0x0b32('0x1f'),{'options':{'where':{'id':_0x36980a},'include':[{'model':_0x0b32('0x15'),'as':'Contact'},{'model':_0x0b32('0x20'),'as':_0x0b32('0x21'),'attributes':['id',_0x0b32('0x22')]},{'model':_0x0b32('0x23'),'as':_0x0b32('0x24'),'attributes':['id',_0x0b32('0x22')]}],'raw':!![]},'log':_0x0b32('0x4')});};};exports[_0x0b32('0x25')]=function(_0x51c0c6,_0x36f82f,_0x246348){return function(){return client[_0x0b32('0x2')]('UpdateCmHopper',{'body':_0x51c0c6,'options':{'where':{'id':_0x36f82f},'limit':_0x246348},'log':'UpdateCmHopper'});};};exports[_0x0b32('0x26')]=function(_0x4829a6,_0x205daf){return function(){return client[_0x0b32('0x2')]('GetContactRecallMe',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x4829a6,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x0b32('0x7')](_0x0b32('0x8'))},'UserId':{'$in':_0x205daf}},'order':[['priority','DESC'],[_0x0b32('0x17'),_0x0b32('0x12')],['id',_0x0b32('0x13')]],'include':[{'model':'CmContact','as':_0x0b32('0x16')},{'model':_0x0b32('0x20'),'as':_0x0b32('0x21'),'attributes':['id',_0x0b32('0x22'),_0x0b32('0x27')]}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0x0b32('0x10')});};};exports[_0x0b32('0x28')]=function(_0xb36f2){return function(){return client[_0x0b32('0x2')](_0x0b32('0x29'),{'body':_0xb36f2,'options':{},'log':_0x0b32('0x29')});};};exports[_0x0b32('0x2a')]=function(_0x54bfd5,_0x3f303d){return function(){return client['Request'](_0x0b32('0x2b'),{'body':{'where':{'voiceQueueId':_0x54bfd5,'interval':_0x3f303d}},'log':_0x0b32('0x2a')});};};
\ No newline at end of file
+var _0xc6f1=['getContactDialer','GetContactDialer','format','DESC','scheduledat','ASC','getContactDialerIvr','priority','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','ListId','CampaignId','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','VoiceQueue','unlockContact','getContactRecallMe','GetContactRecallMe','name','voicePause','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','moment','lodash','getContacts','Request','GetCmHopper','CmContact','Contact','getCmHopper','UpdateCmHopper','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','VoiceQueueId','DestroyCmHopper'];(function(_0x55d2d9,_0x1cc28d){var _0x3cc7bf=function(_0x5755b6){while(--_0x5755b6){_0x55d2d9['push'](_0x55d2d9['shift']());}};_0x3cc7bf(++_0x1cc28d);}(_0xc6f1,0xcd));var _0x1c6f=function(_0x4b4b0e,_0x6c674){_0x4b4b0e=_0x4b4b0e-0x0;var _0x4c2d91=_0xc6f1[_0x4b4b0e];return _0x4c2d91;};'use strict';var client=require(_0x1c6f('0x0'));var moment=require(_0x1c6f('0x1'));var _=require(_0x1c6f('0x2'));exports[_0x1c6f('0x3')]=function(_0x158dc5,_0x1a0576){return function(){return client[_0x1c6f('0x4')](_0x1c6f('0x5'),{'options':{'where':{'VoiceQueueId':_0x158dc5},'include':[{'model':_0x1c6f('0x6'),'as':_0x1c6f('0x7')}],'limit':_0x1a0576,'raw':![]},'log':_0x1c6f('0x8')});};};exports['updateContacts']=function(_0x7eb3f8,_0x57a951,_0x13422c){return function(){return client[_0x1c6f('0x4')](_0x1c6f('0x9'),{'body':_0x7eb3f8,'options':{'where':{'VoiceQueueId':_0x57a951,'scheduledat':{'$lte':moment()['format'](_0x1c6f('0xa'))}},'limit':_0x13422c},'log':_0x1c6f('0x9')});};};exports[_0x1c6f('0xb')]=function(_0x14c8fe){return function(){return client[_0x1c6f('0x4')]('UpdateCmHopper',{'body':_0x14c8fe,'options':{'where':{'ContactId':_0x14c8fe[_0x1c6f('0xc')],'ListId':_0x14c8fe['ListId'],'VoiceQueueId':_0x14c8fe[_0x1c6f('0xd')],'CampaignId':_0x14c8fe['CampaignId']}},'log':_0x1c6f('0xb')});};};exports['destroyContact']=function(_0x211b2c,_0x57ce1e,_0x2d7e28){return function(){return client[_0x1c6f('0x4')](_0x1c6f('0xe'),{'options':{'where':{'VoiceQueueId':_0x211b2c,'ListId':_0x57ce1e,'ContactId':_0x2d7e28}},'log':_0x1c6f('0xe')});};};exports[_0x1c6f('0xf')]=function(_0x246420,_0x2d551d,_0x3ea132,_0x1806f6){return function(){return client['Request'](_0x1c6f('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x246420,'active':![],'scheduledat':{'$lte':moment()[_0x1c6f('0x11')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x2d551d}}]},'order':[['priority',_0x1c6f('0x12')],[_0x1c6f('0x13'),_0x1806f6],['id',_0x1c6f('0x14')]],'raw':!![],'limit':_0x3ea132},'log':_0x1c6f('0x10')});};};exports[_0x1c6f('0x15')]=function(_0x55a5b5,_0x49061f,_0x34444a){return function(){return client['Request'](_0x1c6f('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x55a5b5,'active':![],'scheduledat':{'$lte':moment()['format'](_0x1c6f('0xa'))}},'include':[{'model':_0x1c6f('0x6'),'as':'Contact'}],'order':[[_0x1c6f('0x16'),'DESC'],[_0x1c6f('0x13'),_0x34444a],['id',_0x1c6f('0x14')]],'raw':!![],'limit':_0x49061f},'log':_0x1c6f('0x17')});};};exports[_0x1c6f('0x18')]=function(_0x3618c4,_0x4a6ba7){return function(){_0x3618c4[_0x1c6f('0x19')]=_0x3618c4[_0x1c6f('0x1a')];return client[_0x1c6f('0x4')]('MoveContactManagedDialer',{'body':_0x3618c4,'options':{'where':{'ContactId':_0x3618c4[_0x1c6f('0xc')],'ListId':_0x3618c4[_0x1c6f('0x1b')],'VoiceQueueId':_0x3618c4[_0x1c6f('0xd')],'CampaignId':_0x3618c4[_0x1c6f('0x1c')],'active':_0x4a6ba7?undefined:!![]}},'log':'MoveContactManagedDialer'});};};exports[_0x1c6f('0x1d')]=function(_0x15b4c5){return function(){return client[_0x1c6f('0x4')](_0x1c6f('0x1e'),{'options':{'where':{'VoiceQueueId':_0x15b4c5['id']?_0x15b4c5['id']||null:null}},'log':_0x1c6f('0x1d')});};};exports[_0x1c6f('0x1f')]=function(_0x30ee1a){return function(){return client['Request'](_0x1c6f('0x20'),{'options':{'where':{'id':_0x30ee1a},'include':[{'model':'CmContact','as':_0x1c6f('0x7')},{'model':_0x1c6f('0x21'),'as':_0x1c6f('0x22'),'attributes':['id','name']},{'model':_0x1c6f('0x23'),'as':'Queue','attributes':['id','name']}],'raw':!![]},'log':_0x1c6f('0x8')});};};exports[_0x1c6f('0x24')]=function(_0x199cd4,_0x16b340,_0x482da8){return function(){return client[_0x1c6f('0x4')](_0x1c6f('0x9'),{'body':_0x199cd4,'options':{'where':{'id':_0x16b340},'limit':_0x482da8},'log':_0x1c6f('0x9')});};};exports[_0x1c6f('0x25')]=function(_0x3794fd,_0x469100){return function(){return client[_0x1c6f('0x4')](_0x1c6f('0x26'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x3794fd,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0x1c6f('0xa'))},'UserId':{'$in':_0x469100}},'order':[['priority',_0x1c6f('0x12')],[_0x1c6f('0x13'),_0x1c6f('0x12')],['id','ASC']],'include':[{'model':_0x1c6f('0x6'),'as':_0x1c6f('0x7')},{'model':_0x1c6f('0x21'),'as':_0x1c6f('0x22'),'attributes':['id',_0x1c6f('0x27'),_0x1c6f('0x28')]}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0x1c6f('0x10')});};};exports['resetActiveCalls']=function(_0x4059c4){return function(){return client[_0x1c6f('0x4')](_0x1c6f('0x29'),{'body':_0x4059c4,'options':{},'log':_0x1c6f('0x29')});};};exports[_0x1c6f('0x2a')]=function(_0x1f62ec,_0x4f29a2){return function(){return client[_0x1c6f('0x4')](_0x1c6f('0x2b'),{'body':{'where':{'voiceQueueId':_0x1f62ec,'interval':_0x4f29a2}},'log':_0x1c6f('0x2a')});};};
\ No newline at end of file