Built motion from commit (unavailable).|2.0.80
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 5f8dd11..173082d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c5a=['Contact','updateContacts','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','UpdateCmHopper','ContactId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','scheduledat','ASC','DESC','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','ListId','countReScheduled','CountReScheduled','getContactPreview','GetCmHopper','User','name','VoiceQueue','getCmHopper','getContactRecallMe','GetContactRecallMe','db.CmHopper.UserId','../client','moment','getContacts','Request','CmContact'];(function(_0x491a7f,_0x28bb80){var _0x3d8f44=function(_0xdaa716){while(--_0xdaa716){_0x491a7f['push'](_0x491a7f['shift']());}};_0x3d8f44(++_0x28bb80);}(_0x9c5a,0x1c3));var _0xa9c5=function(_0x22abb1,_0x43f326){_0x22abb1=_0x22abb1-0x0;var _0x308ecb=_0x9c5a[_0x22abb1];return _0x308ecb;};'use strict';var client=require(_0xa9c5('0x0'));var moment=require(_0xa9c5('0x1'));var _=require('lodash');exports[_0xa9c5('0x2')]=function(_0x1cd14d,_0x1d0ee9){return function(){return client[_0xa9c5('0x3')]('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x1cd14d},'include':[{'model':_0xa9c5('0x4'),'as':_0xa9c5('0x5')}],'limit':_0x1d0ee9,'raw':![]},'log':'getCmHopper'});};};exports[_0xa9c5('0x6')]=function(_0x4d9c7a,_0x394d84,_0x3df556){return function(){return client['Request']('UpdateCmHopper',{'body':_0x4d9c7a,'options':{'where':{'VoiceQueueId':_0x394d84,'scheduledat':{'$lte':moment()[_0xa9c5('0x7')](_0xa9c5('0x8'))}},'limit':_0x3df556},'log':'UpdateCmHopper'});};};exports[_0xa9c5('0x9')]=function(_0x97f9e2){return function(){return client['Request'](_0xa9c5('0xa'),{'body':_0x97f9e2,'options':{'where':{'ContactId':_0x97f9e2[_0xa9c5('0xb')],'ListId':_0x97f9e2['ListId'],'VoiceQueueId':_0x97f9e2['VoiceQueueId'],'CampaignId':_0x97f9e2[_0xa9c5('0xc')]}},'log':_0xa9c5('0x9')});};};exports[_0xa9c5('0xd')]=function(_0x4b72b0,_0x34c948,_0x4492a4){return function(){return client[_0xa9c5('0x3')](_0xa9c5('0xe'),{'options':{'where':{'VoiceQueueId':_0x4b72b0,'ListId':_0x34c948,'ContactId':_0x4492a4}},'log':_0xa9c5('0xe')});};};exports[_0xa9c5('0xf')]=function(_0x5915ad,_0x390ca2,_0x1276d2,_0x7df76d){return function(){return client[_0xa9c5('0x3')](_0xa9c5('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5915ad,'active':![],'scheduledat':{'$lte':moment()[_0xa9c5('0x7')](_0xa9c5('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x390ca2}}]},'include':[{'model':_0xa9c5('0x4'),'as':_0xa9c5('0x5')}],'order':[[_0xa9c5('0x11'),'DESC'],[_0xa9c5('0x12'),_0x7df76d],['id',_0xa9c5('0x13')]],'raw':!![],'limit':_0x1276d2},'log':_0xa9c5('0x10')});};};exports['getContactDialerIvr']=function(_0x2cda1b,_0x1142d9,_0x2b9ac5){return function(){return client[_0xa9c5('0x3')](_0xa9c5('0x10'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x2cda1b,'active':![],'scheduledat':{'$lte':moment()[_0xa9c5('0x7')](_0xa9c5('0x8'))}},'include':[{'model':_0xa9c5('0x4'),'as':_0xa9c5('0x5')}],'order':[[_0xa9c5('0x11'),_0xa9c5('0x14')],[_0xa9c5('0x12'),_0x2b9ac5],['id','ASC']],'raw':!![],'limit':_0x1142d9},'log':_0xa9c5('0x15')});};};exports[_0xa9c5('0x16')]=function(_0x541c77,_0x5d2115){return function(){_0x541c77[_0xa9c5('0x17')]=_0x541c77[_0xa9c5('0x18')];return client[_0xa9c5('0x3')](_0xa9c5('0x19'),{'body':_0x541c77,'options':{'where':{'ContactId':_0x541c77[_0xa9c5('0xb')],'ListId':_0x541c77[_0xa9c5('0x1a')],'VoiceQueueId':_0x541c77['VoiceQueueId'],'CampaignId':_0x541c77['CampaignId'],'active':_0x5d2115?undefined:!![]}},'log':_0xa9c5('0x19')});};};exports[_0xa9c5('0x1b')]=function(_0x4b0f05){return function(){return client[_0xa9c5('0x3')](_0xa9c5('0x1c'),{'options':{'where':{'VoiceQueueId':_0x4b0f05['id']?_0x4b0f05['id']||null:null}},'log':_0xa9c5('0x1b')});};};exports[_0xa9c5('0x1d')]=function(_0x4cbba1){return function(){return client[_0xa9c5('0x3')](_0xa9c5('0x1e'),{'options':{'where':{'id':_0x4cbba1},'include':[{'model':'CmContact','as':'Contact'},{'model':_0xa9c5('0x1f'),'as':'Agent','attributes':['id',_0xa9c5('0x20')]},{'model':_0xa9c5('0x21'),'as':'Queue','attributes':['id',_0xa9c5('0x20')]}],'raw':!![]},'log':_0xa9c5('0x22')});};};exports['unlockContact']=function(_0x413edf,_0x32baf9,_0x198cdf){return function(){return client[_0xa9c5('0x3')](_0xa9c5('0xa'),{'body':_0x413edf,'options':{'where':{'id':_0x32baf9},'limit':_0x198cdf},'log':'UpdateCmHopper'});};};exports[_0xa9c5('0x23')]=function(_0x4cee90,_0x3c3da7){return function(){return client[_0xa9c5('0x3')](_0xa9c5('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x4cee90,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0xa9c5('0x8'))},'UserId':{'$in':_0x3c3da7}},'order':[[_0xa9c5('0x11'),'DESC'],[_0xa9c5('0x12'),_0xa9c5('0x14')],['id',_0xa9c5('0x13')]],'include':[{'model':_0xa9c5('0x4'),'as':_0xa9c5('0x5')}],'group':_0xa9c5('0x25'),'raw':!![]},'log':_0xa9c5('0x10')});};};
\ No newline at end of file
+var _0xe14b=['User','Agent','name','VoiceQueue','getContactRecallMe','GetContactRecallMe','DESC','../client','moment','GetCmHopper','getCmHopper','updateContacts','Request','UpdateCmHopper','rescheduleContact','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','YYYY-MM-DD\x20HH:mm:ss','CmContact','Contact','priority','scheduledat','ASC','GetContactDialer','getContactDialerIvr','format','GetContactDialerIvr','moveContactManagedDialer','campaign','ContactId','countReScheduled','getContactPreview'];(function(_0x5b8ef6,_0x108ed9){var _0x4bf31d=function(_0x1da95d){while(--_0x1da95d){_0x5b8ef6['push'](_0x5b8ef6['shift']());}};_0x4bf31d(++_0x108ed9);}(_0xe14b,0x93));var _0xbe14=function(_0x6bc0da,_0x5e62a9){_0x6bc0da=_0x6bc0da-0x0;var _0x27ee7d=_0xe14b[_0x6bc0da];return _0x27ee7d;};'use strict';var client=require(_0xbe14('0x0'));var moment=require(_0xbe14('0x1'));var _=require('lodash');exports['getContacts']=function(_0x11c3a0,_0x36393a){return function(){return client['Request'](_0xbe14('0x2'),{'options':{'where':{'VoiceQueueId':_0x11c3a0},'include':[{'model':'CmContact','as':'Contact'}],'limit':_0x36393a,'raw':![]},'log':_0xbe14('0x3')});};};exports[_0xbe14('0x4')]=function(_0x1fe204,_0x1ff100,_0x1d9ade){return function(){return client[_0xbe14('0x5')](_0xbe14('0x6'),{'body':_0x1fe204,'options':{'where':{'VoiceQueueId':_0x1ff100,'scheduledat':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x1d9ade},'log':'UpdateCmHopper'});};};exports[_0xbe14('0x7')]=function(_0x6fceff){return function(){return client[_0xbe14('0x5')](_0xbe14('0x6'),{'body':_0x6fceff,'options':{'where':{'ContactId':_0x6fceff['ContactId'],'ListId':_0x6fceff['ListId'],'VoiceQueueId':_0x6fceff[_0xbe14('0x8')],'CampaignId':_0x6fceff[_0xbe14('0x9')]}},'log':'rescheduleContact'});};};exports[_0xbe14('0xa')]=function(_0x35aa19,_0x886a5e,_0x3d38c2){return function(){return client[_0xbe14('0x5')](_0xbe14('0xb'),{'options':{'where':{'VoiceQueueId':_0x35aa19,'ListId':_0x886a5e,'ContactId':_0x3d38c2}},'log':_0xbe14('0xb')});};};exports[_0xbe14('0xc')]=function(_0x16893f,_0xa2cf72,_0x1e4826,_0x33fd54){return function(){return client[_0xbe14('0x5')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x16893f,'active':![],'scheduledat':{'$lte':moment()['format'](_0xbe14('0xd'))},'$or':[{'UserId':null},{'UserId':{'$in':_0xa2cf72}}]},'include':[{'model':_0xbe14('0xe'),'as':_0xbe14('0xf')}],'order':[[_0xbe14('0x10'),'DESC'],[_0xbe14('0x11'),_0x33fd54],['id',_0xbe14('0x12')]],'raw':!![],'limit':_0x1e4826},'log':_0xbe14('0x13')});};};exports[_0xbe14('0x14')]=function(_0x38f1ea,_0x29ab73,_0x17ae86){return function(){return client['Request'](_0xbe14('0x13'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x38f1ea,'active':![],'scheduledat':{'$lte':moment()[_0xbe14('0x15')](_0xbe14('0xd'))}},'include':[{'model':_0xbe14('0xe'),'as':_0xbe14('0xf')}],'order':[[_0xbe14('0x10'),'DESC'],[_0xbe14('0x11'),_0x17ae86],['id',_0xbe14('0x12')]],'raw':!![],'limit':_0x29ab73},'log':_0xbe14('0x16')});};};exports[_0xbe14('0x17')]=function(_0x188ec4,_0x51dc0b){return function(){_0x188ec4[_0xbe14('0x18')]=_0x188ec4['queue'];return client[_0xbe14('0x5')]('MoveContactManagedDialer',{'body':_0x188ec4,'options':{'where':{'ContactId':_0x188ec4[_0xbe14('0x19')],'ListId':_0x188ec4['ListId'],'VoiceQueueId':_0x188ec4[_0xbe14('0x8')],'CampaignId':_0x188ec4[_0xbe14('0x9')],'active':_0x51dc0b?undefined:!![]}},'log':'MoveContactManagedDialer'});};};exports[_0xbe14('0x1a')]=function(_0x4d4190){return function(){return client[_0xbe14('0x5')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x4d4190['id']?_0x4d4190['id']||null:null}},'log':_0xbe14('0x1a')});};};exports[_0xbe14('0x1b')]=function(_0x1ee9c1){return function(){return client[_0xbe14('0x5')](_0xbe14('0x2'),{'options':{'where':{'id':_0x1ee9c1},'include':[{'model':_0xbe14('0xe'),'as':'Contact'},{'model':_0xbe14('0x1c'),'as':_0xbe14('0x1d'),'attributes':['id',_0xbe14('0x1e')]},{'model':_0xbe14('0x1f'),'as':'Queue','attributes':['id',_0xbe14('0x1e')]}],'raw':!![]},'log':_0xbe14('0x3')});};};exports['unlockContact']=function(_0x3c3613,_0x3b3e84,_0x1c7cc7){return function(){return client[_0xbe14('0x5')](_0xbe14('0x6'),{'body':_0x3c3613,'options':{'where':{'id':_0x3b3e84},'limit':_0x1c7cc7},'log':_0xbe14('0x6')});};};exports[_0xbe14('0x20')]=function(_0x2b05cb,_0x4168c8){return function(){return client[_0xbe14('0x5')](_0xbe14('0x21'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x2b05cb,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xbe14('0x15')](_0xbe14('0xd'))},'UserId':{'$in':_0x4168c8}},'order':[[_0xbe14('0x10'),_0xbe14('0x22')],[_0xbe14('0x11'),_0xbe14('0x22')],['id',_0xbe14('0x12')]],'include':[{'model':_0xbe14('0xe'),'as':_0xbe14('0xf')}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0xbe14('0x13')});};};
\ No newline at end of file