Built motion from commit (unavailable).|2.5.26
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 7e525cc..c1a211b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc0d2=['UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','ListId','VoiceQueueId','rescheduleContact','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','DESC','scheduledat','ASC','getContactDialerIvr','CmContact','GetContactDialerIvr','moveContactManagedDialer','campaign','MoveContactManagedDialer','ContactId','CampaignId','countReScheduled','CountReScheduled','getContactPreview','User','Agent','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','voicePause','db.CmHopper.UserId','../client','moment','Request','Contact','getCmHopper','updateContacts'];(function(_0x2f3c77,_0x250177){var _0x54ab49=function(_0x2b3e0b){while(--_0x2b3e0b){_0x2f3c77['push'](_0x2f3c77['shift']());}};_0x54ab49(++_0x250177);}(_0xc0d2,0x1e6));var _0x2c0d=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0xc0d2[_0x5d4607];return _0x5e4a86;};'use strict';var client=require(_0x2c0d('0x0'));var moment=require(_0x2c0d('0x1'));var _=require('lodash');exports['getContacts']=function(_0x536bfe,_0x10d196){return function(){return client[_0x2c0d('0x2')]('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x536bfe},'include':[{'model':'CmContact','as':_0x2c0d('0x3')}],'limit':_0x10d196,'raw':![]},'log':_0x2c0d('0x4')});};};exports[_0x2c0d('0x5')]=function(_0x293715,_0x52900b,_0x24102e){return function(){return client[_0x2c0d('0x2')](_0x2c0d('0x6'),{'body':_0x293715,'options':{'where':{'VoiceQueueId':_0x52900b,'scheduledat':{'$lte':moment()[_0x2c0d('0x7')](_0x2c0d('0x8'))}},'limit':_0x24102e},'log':_0x2c0d('0x6')});};};exports['rescheduleContact']=function(_0x4abe37){return function(){return client[_0x2c0d('0x2')](_0x2c0d('0x6'),{'body':_0x4abe37,'options':{'where':{'ContactId':_0x4abe37['ContactId'],'ListId':_0x4abe37[_0x2c0d('0x9')],'VoiceQueueId':_0x4abe37[_0x2c0d('0xa')],'CampaignId':_0x4abe37['CampaignId']}},'log':_0x2c0d('0xb')});};};exports[_0x2c0d('0xc')]=function(_0x424290,_0x1ff9a1,_0xf694ac){return function(){return client[_0x2c0d('0x2')](_0x2c0d('0xd'),{'options':{'where':{'VoiceQueueId':_0x424290,'ListId':_0x1ff9a1,'ContactId':_0xf694ac}},'log':'DestroyCmHopper'});};};exports[_0x2c0d('0xe')]=function(_0x2f2b9a,_0x218f12,_0x55f0d9,_0x4920c8){return function(){return client[_0x2c0d('0x2')](_0x2c0d('0xf'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x2f2b9a,'active':![],'scheduledat':{'$lte':moment()['format'](_0x2c0d('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x218f12}}]},'order':[[_0x2c0d('0x10'),_0x2c0d('0x11')],[_0x2c0d('0x12'),_0x4920c8],['id',_0x2c0d('0x13')]],'raw':!![],'limit':_0x55f0d9},'log':_0x2c0d('0xf')});};};exports[_0x2c0d('0x14')]=function(_0x156ec5,_0x4f8c25,_0xc53c36){return function(){return client[_0x2c0d('0x2')](_0x2c0d('0xf'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x156ec5,'active':![],'scheduledat':{'$lte':moment()[_0x2c0d('0x7')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0x2c0d('0x15'),'as':_0x2c0d('0x3')}],'order':[[_0x2c0d('0x10'),_0x2c0d('0x11')],[_0x2c0d('0x12'),_0xc53c36],['id',_0x2c0d('0x13')]],'raw':!![],'limit':_0x4f8c25},'log':_0x2c0d('0x16')});};};exports[_0x2c0d('0x17')]=function(_0x37d5d0,_0x306285){return function(){_0x37d5d0[_0x2c0d('0x18')]=_0x37d5d0['queue'];return client[_0x2c0d('0x2')](_0x2c0d('0x19'),{'body':_0x37d5d0,'options':{'where':{'ContactId':_0x37d5d0[_0x2c0d('0x1a')],'ListId':_0x37d5d0['ListId'],'VoiceQueueId':_0x37d5d0[_0x2c0d('0xa')],'CampaignId':_0x37d5d0[_0x2c0d('0x1b')],'active':_0x306285?undefined:!![]}},'log':'MoveContactManagedDialer'});};};exports[_0x2c0d('0x1c')]=function(_0x35ebf5){return function(){return client[_0x2c0d('0x2')](_0x2c0d('0x1d'),{'options':{'where':{'VoiceQueueId':_0x35ebf5['id']?_0x35ebf5['id']||null:null}},'log':'countReScheduled'});};};exports[_0x2c0d('0x1e')]=function(_0x473376){return function(){return client[_0x2c0d('0x2')]('GetCmHopperPreview',{'options':{'where':{'id':_0x473376},'include':[{'model':_0x2c0d('0x15'),'as':_0x2c0d('0x3')},{'model':_0x2c0d('0x1f'),'as':_0x2c0d('0x20'),'attributes':['id',_0x2c0d('0x21')]},{'model':_0x2c0d('0x22'),'as':_0x2c0d('0x23'),'attributes':['id','name']}],'raw':!![]},'log':_0x2c0d('0x4')});};};exports[_0x2c0d('0x24')]=function(_0x575449,_0x25204c,_0x2b52d4){return function(){return client[_0x2c0d('0x2')](_0x2c0d('0x6'),{'body':_0x575449,'options':{'where':{'id':_0x25204c},'limit':_0x2b52d4},'log':'UpdateCmHopper'});};};exports[_0x2c0d('0x25')]=function(_0x65adf5,_0x2ffc25){return function(){return client[_0x2c0d('0x2')](_0x2c0d('0x26'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x65adf5,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x2c0d('0x7')](_0x2c0d('0x8'))},'UserId':{'$in':_0x2ffc25}},'order':[[_0x2c0d('0x10'),'DESC'],[_0x2c0d('0x12'),'DESC'],['id',_0x2c0d('0x13')]],'include':[{'model':_0x2c0d('0x15'),'as':_0x2c0d('0x3')},{'model':'User','as':_0x2c0d('0x20'),'attributes':['id',_0x2c0d('0x21'),_0x2c0d('0x27')]}],'group':_0x2c0d('0x28'),'raw':!![]},'log':_0x2c0d('0xf')});};};
\ No newline at end of file
+var _0x0a14=['Request','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','priority','scheduledat','ASC','getContactDialerIvr','DESC','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','countReScheduled','GetCmHopperPreview','VoiceQueue','Queue','name','unlockContact','GetContactRecallMe','User','Agent','db.CmHopper.UserId','moment','lodash','getContacts','CmContact','Contact','getCmHopper','updateContacts'];(function(_0x5cefbf,_0x4795ea){var _0x3e201e=function(_0x2c7340){while(--_0x2c7340){_0x5cefbf['push'](_0x5cefbf['shift']());}};_0x3e201e(++_0x4795ea);}(_0x0a14,0x111));var _0x40a1=function(_0x37fd4c,_0x319798){_0x37fd4c=_0x37fd4c-0x0;var _0xcb1134=_0x0a14[_0x37fd4c];return _0xcb1134;};'use strict';var client=require('../client');var moment=require(_0x40a1('0x0'));var _=require(_0x40a1('0x1'));exports[_0x40a1('0x2')]=function(_0x110706,_0x35599c){return function(){return client['Request']('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0x110706},'include':[{'model':_0x40a1('0x3'),'as':_0x40a1('0x4')}],'limit':_0x35599c,'raw':![]},'log':_0x40a1('0x5')});};};exports[_0x40a1('0x6')]=function(_0x5282c8,_0x9c9c4,_0x527441){return function(){return client[_0x40a1('0x7')](_0x40a1('0x8'),{'body':_0x5282c8,'options':{'where':{'VoiceQueueId':_0x9c9c4,'scheduledat':{'$lte':moment()[_0x40a1('0x9')](_0x40a1('0xa'))}},'limit':_0x527441},'log':'UpdateCmHopper'});};};exports[_0x40a1('0xb')]=function(_0x1dea0f){return function(){return client[_0x40a1('0x7')](_0x40a1('0x8'),{'body':_0x1dea0f,'options':{'where':{'ContactId':_0x1dea0f[_0x40a1('0xc')],'ListId':_0x1dea0f[_0x40a1('0xd')],'VoiceQueueId':_0x1dea0f[_0x40a1('0xe')],'CampaignId':_0x1dea0f[_0x40a1('0xf')]}},'log':_0x40a1('0xb')});};};exports[_0x40a1('0x10')]=function(_0x5d7f6b,_0x476b71,_0x3c9f75){return function(){return client[_0x40a1('0x7')](_0x40a1('0x11'),{'options':{'where':{'VoiceQueueId':_0x5d7f6b,'ListId':_0x476b71,'ContactId':_0x3c9f75}},'log':'DestroyCmHopper'});};};exports[_0x40a1('0x12')]=function(_0x114057,_0x159cef,_0x1153c,_0x4367ea){return function(){return client[_0x40a1('0x7')](_0x40a1('0x13'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x114057,'active':![],'scheduledat':{'$lte':moment()[_0x40a1('0x9')](_0x40a1('0xa'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x159cef}}]},'order':[[_0x40a1('0x14'),'DESC'],[_0x40a1('0x15'),_0x4367ea],['id',_0x40a1('0x16')]],'raw':!![],'limit':_0x1153c},'log':_0x40a1('0x13')});};};exports[_0x40a1('0x17')]=function(_0x9ef6f2,_0x4ff810,_0x1c15bb){return function(){return client[_0x40a1('0x7')](_0x40a1('0x13'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x9ef6f2,'active':![],'scheduledat':{'$lte':moment()['format'](_0x40a1('0xa'))}},'include':[{'model':_0x40a1('0x3'),'as':_0x40a1('0x4')}],'order':[[_0x40a1('0x14'),_0x40a1('0x18')],[_0x40a1('0x15'),_0x1c15bb],['id',_0x40a1('0x16')]],'raw':!![],'limit':_0x4ff810},'log':_0x40a1('0x19')});};};exports[_0x40a1('0x1a')]=function(_0x445491,_0x5d78f7){return function(){_0x445491[_0x40a1('0x1b')]=_0x445491[_0x40a1('0x1c')];return client['Request']('MoveContactManagedDialer',{'body':_0x445491,'options':{'where':{'ContactId':_0x445491[_0x40a1('0xc')],'ListId':_0x445491[_0x40a1('0xd')],'VoiceQueueId':_0x445491[_0x40a1('0xe')],'CampaignId':_0x445491[_0x40a1('0xf')],'active':_0x5d78f7?undefined:!![]}},'log':_0x40a1('0x1d')});};};exports[_0x40a1('0x1e')]=function(_0x4384b7){return function(){return client['Request']('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x4384b7['id']?_0x4384b7['id']||null:null}},'log':'countReScheduled'});};};exports['getContactPreview']=function(_0x305a4c){return function(){return client[_0x40a1('0x7')](_0x40a1('0x1f'),{'options':{'where':{'id':_0x305a4c},'include':[{'model':_0x40a1('0x3'),'as':_0x40a1('0x4')},{'model':'User','as':'Agent','attributes':['id','name']},{'model':_0x40a1('0x20'),'as':_0x40a1('0x21'),'attributes':['id',_0x40a1('0x22')]}],'raw':!![]},'log':_0x40a1('0x5')});};};exports[_0x40a1('0x23')]=function(_0x236119,_0x3521ee,_0x299657){return function(){return client['Request'](_0x40a1('0x8'),{'body':_0x236119,'options':{'where':{'id':_0x3521ee},'limit':_0x299657},'log':_0x40a1('0x8')});};};exports['getContactRecallMe']=function(_0x1af7b6,_0x1ee1ba){return function(){return client[_0x40a1('0x7')](_0x40a1('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x1af7b6,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x40a1('0x9')](_0x40a1('0xa'))},'UserId':{'$in':_0x1ee1ba}},'order':[[_0x40a1('0x14'),'DESC'],[_0x40a1('0x15'),_0x40a1('0x18')],['id',_0x40a1('0x16')]],'include':[{'model':_0x40a1('0x3'),'as':_0x40a1('0x4')},{'model':_0x40a1('0x25'),'as':_0x40a1('0x26'),'attributes':['id',_0x40a1('0x22'),'voicePause']}],'group':_0x40a1('0x27'),'raw':!![]},'log':_0x40a1('0x13')});};};
\ No newline at end of file