Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / services / ami / rpc / cmHopper.js
index de437d0..9fc07eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa358=['User','name','voicePause','../client','moment','lodash','getContacts','Request','GetCmHopper','CmContact','Contact','getCmHopper','updateContacts','UpdateCmHopper','format','ContactId','ListId','VoiceQueueId','rescheduleContact','destroyContact','DestroyCmHopper','getContactDialer','priority','DESC','scheduledat','ASC','GetContactDialer','getContactDialerIvr','YYYY-MM-DD\x20HH:mm:ss','campaign','queue','MoveContactManagedDialer','CampaignId','countReScheduled','getContactPreview','GetCmHopperPreview','Agent','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe'];(function(_0x5e0eab,_0xb0b0b4){var _0x1de770=function(_0x1fc0f9){while(--_0x1fc0f9){_0x5e0eab['push'](_0x5e0eab['shift']());}};_0x1de770(++_0xb0b0b4);}(_0xa358,0xd5));var _0x8a35=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa358[_0x14add3];return _0x4a174f;};'use strict';var client=require(_0x8a35('0x0'));var moment=require(_0x8a35('0x1'));var _=require(_0x8a35('0x2'));exports[_0x8a35('0x3')]=function(_0xdee485,_0x5e85ad){return function(){return client[_0x8a35('0x4')](_0x8a35('0x5'),{'options':{'where':{'VoiceQueueId':_0xdee485},'include':[{'model':_0x8a35('0x6'),'as':_0x8a35('0x7')}],'limit':_0x5e85ad,'raw':![]},'log':_0x8a35('0x8')});};};exports[_0x8a35('0x9')]=function(_0x42ea34,_0x1fe84e,_0xab3d99){return function(){return client[_0x8a35('0x4')](_0x8a35('0xa'),{'body':_0x42ea34,'options':{'where':{'VoiceQueueId':_0x1fe84e,'scheduledat':{'$lte':moment()[_0x8a35('0xb')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0xab3d99},'log':_0x8a35('0xa')});};};exports['rescheduleContact']=function(_0x2c35d1){return function(){return client['Request']('UpdateCmHopper',{'body':_0x2c35d1,'options':{'where':{'ContactId':_0x2c35d1[_0x8a35('0xc')],'ListId':_0x2c35d1[_0x8a35('0xd')],'VoiceQueueId':_0x2c35d1[_0x8a35('0xe')],'CampaignId':_0x2c35d1['CampaignId']}},'log':_0x8a35('0xf')});};};exports[_0x8a35('0x10')]=function(_0x1e0218,_0x514ca6,_0x108b89){return function(){return client[_0x8a35('0x4')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x1e0218,'ListId':_0x514ca6,'ContactId':_0x108b89}},'log':_0x8a35('0x11')});};};exports[_0x8a35('0x12')]=function(_0x46ea40,_0x557e3e,_0x562eaf,_0x102f63){return function(){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x46ea40,'active':![],'scheduledat':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x557e3e}}]},'order':[[_0x8a35('0x13'),_0x8a35('0x14')],[_0x8a35('0x15'),_0x102f63],['id',_0x8a35('0x16')]],'raw':!![],'limit':_0x562eaf},'log':_0x8a35('0x17')});};};exports[_0x8a35('0x18')]=function(_0x25e6f1,_0x10fbff,_0x2208b7){return function(){return client[_0x8a35('0x4')](_0x8a35('0x17'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x25e6f1,'active':![],'scheduledat':{'$lte':moment()[_0x8a35('0xb')](_0x8a35('0x19'))}},'include':[{'model':_0x8a35('0x6'),'as':_0x8a35('0x7')}],'order':[['priority',_0x8a35('0x14')],['scheduledat',_0x2208b7],['id',_0x8a35('0x16')]],'raw':!![],'limit':_0x10fbff},'log':'GetContactDialerIvr'});};};exports['moveContactManagedDialer']=function(_0x2a6962,_0x58e495){return function(){_0x2a6962[_0x8a35('0x1a')]=_0x2a6962[_0x8a35('0x1b')];return client[_0x8a35('0x4')](_0x8a35('0x1c'),{'body':_0x2a6962,'options':{'where':{'ContactId':_0x2a6962['ContactId'],'ListId':_0x2a6962[_0x8a35('0xd')],'VoiceQueueId':_0x2a6962[_0x8a35('0xe')],'CampaignId':_0x2a6962[_0x8a35('0x1d')],'active':_0x58e495?undefined:!![]}},'log':_0x8a35('0x1c')});};};exports[_0x8a35('0x1e')]=function(_0x22de86){return function(){return client[_0x8a35('0x4')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x22de86['id']?_0x22de86['id']||null:null}},'log':_0x8a35('0x1e')});};};exports[_0x8a35('0x1f')]=function(_0x520dae){return function(){return client[_0x8a35('0x4')](_0x8a35('0x20'),{'options':{'where':{'id':_0x520dae},'include':[{'model':_0x8a35('0x6'),'as':_0x8a35('0x7')},{'model':'User','as':_0x8a35('0x21'),'attributes':['id','name']},{'model':_0x8a35('0x22'),'as':_0x8a35('0x23'),'attributes':['id','name']}],'raw':!![]},'log':_0x8a35('0x8')});};};exports[_0x8a35('0x24')]=function(_0xad9c6f,_0x19e9ad,_0x24c068){return function(){return client[_0x8a35('0x4')](_0x8a35('0xa'),{'body':_0xad9c6f,'options':{'where':{'id':_0x19e9ad},'limit':_0x24c068},'log':_0x8a35('0xa')});};};exports[_0x8a35('0x25')]=function(_0x56649f,_0x44a1ff){return function(){return client[_0x8a35('0x4')](_0x8a35('0x26'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x56649f,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x8a35('0xb')](_0x8a35('0x19'))},'UserId':{'$in':_0x44a1ff}},'order':[[_0x8a35('0x13'),'DESC'],[_0x8a35('0x15'),_0x8a35('0x14')],['id',_0x8a35('0x16')]],'include':[{'model':_0x8a35('0x6'),'as':_0x8a35('0x7')},{'model':_0x8a35('0x27'),'as':'Agent','attributes':['id',_0x8a35('0x28'),_0x8a35('0x29')]}],'group':'db.CmHopper.UserId','raw':!![]},'log':_0x8a35('0x17')});};};
\ No newline at end of file
+var _0x8832=['db.CmHopper.UserId','../client','moment','Request','GetCmHopper','CmContact','Contact','UpdateCmHopper','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','format','priority','scheduledat','ASC','getContactDialerIvr','DESC','campaign','queue','MoveContactManagedDialer','VoiceQueueId','countReScheduled','getContactPreview','GetCmHopperPreview','User','name','VoiceQueue','unlockContact','getContactRecallMe','GetContactRecallMe','voicePause'];(function(_0x7e2eb0,_0x17cd58){var _0xd92de4=function(_0x5d005b){while(--_0x5d005b){_0x7e2eb0['push'](_0x7e2eb0['shift']());}};_0xd92de4(++_0x17cd58);}(_0x8832,0x14e));var _0x2883=function(_0x2e8bff,_0x403eda){_0x2e8bff=_0x2e8bff-0x0;var _0x417e11=_0x8832[_0x2e8bff];return _0x417e11;};'use strict';var client=require(_0x2883('0x0'));var moment=require(_0x2883('0x1'));var _=require('lodash');exports['getContacts']=function(_0x296754,_0x5c7891){return function(){return client[_0x2883('0x2')](_0x2883('0x3'),{'options':{'where':{'VoiceQueueId':_0x296754},'include':[{'model':_0x2883('0x4'),'as':_0x2883('0x5')}],'limit':_0x5c7891,'raw':![]},'log':'getCmHopper'});};};exports['updateContacts']=function(_0x55deba,_0x370d75,_0x1b250b){return function(){return client[_0x2883('0x2')](_0x2883('0x6'),{'body':_0x55deba,'options':{'where':{'VoiceQueueId':_0x370d75,'scheduledat':{'$lte':moment()['format'](_0x2883('0x7'))}},'limit':_0x1b250b},'log':_0x2883('0x6')});};};exports[_0x2883('0x8')]=function(_0x2d44f5){return function(){return client['Request'](_0x2883('0x6'),{'body':_0x2d44f5,'options':{'where':{'ContactId':_0x2d44f5[_0x2883('0x9')],'ListId':_0x2d44f5[_0x2883('0xa')],'VoiceQueueId':_0x2d44f5['VoiceQueueId'],'CampaignId':_0x2d44f5[_0x2883('0xb')]}},'log':_0x2883('0x8')});};};exports[_0x2883('0xc')]=function(_0x6989fd,_0x381fb8,_0x3f7fa4){return function(){return client[_0x2883('0x2')](_0x2883('0xd'),{'options':{'where':{'VoiceQueueId':_0x6989fd,'ListId':_0x381fb8,'ContactId':_0x3f7fa4}},'log':'DestroyCmHopper'});};};exports[_0x2883('0xe')]=function(_0x29fa76,_0x4acffb,_0x18c92e,_0x26960e){return function(){return client[_0x2883('0x2')](_0x2883('0xf'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x29fa76,'active':![],'scheduledat':{'$lte':moment()[_0x2883('0x10')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x4acffb}}]},'order':[[_0x2883('0x11'),'DESC'],[_0x2883('0x12'),_0x26960e],['id',_0x2883('0x13')]],'raw':!![],'limit':_0x18c92e},'log':_0x2883('0xf')});};};exports[_0x2883('0x14')]=function(_0x513408,_0x343559,_0x2c3f04){return function(){return client[_0x2883('0x2')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x513408,'active':![],'scheduledat':{'$lte':moment()[_0x2883('0x10')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0x2883('0x4'),'as':'Contact'}],'order':[['priority',_0x2883('0x15')],[_0x2883('0x12'),_0x2c3f04],['id',_0x2883('0x13')]],'raw':!![],'limit':_0x343559},'log':'GetContactDialerIvr'});};};exports['moveContactManagedDialer']=function(_0x332492,_0x5b6c0c){return function(){_0x332492[_0x2883('0x16')]=_0x332492[_0x2883('0x17')];return client['Request'](_0x2883('0x18'),{'body':_0x332492,'options':{'where':{'ContactId':_0x332492['ContactId'],'ListId':_0x332492['ListId'],'VoiceQueueId':_0x332492[_0x2883('0x19')],'CampaignId':_0x332492[_0x2883('0xb')],'active':_0x5b6c0c?undefined:!![]}},'log':_0x2883('0x18')});};};exports[_0x2883('0x1a')]=function(_0x3a444b){return function(){return client[_0x2883('0x2')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x3a444b['id']?_0x3a444b['id']||null:null}},'log':'countReScheduled'});};};exports[_0x2883('0x1b')]=function(_0x4f4cc1){return function(){return client['Request'](_0x2883('0x1c'),{'options':{'where':{'id':_0x4f4cc1},'include':[{'model':_0x2883('0x4'),'as':'Contact'},{'model':_0x2883('0x1d'),'as':'Agent','attributes':['id',_0x2883('0x1e')]},{'model':_0x2883('0x1f'),'as':'Queue','attributes':['id','name']}],'raw':!![]},'log':'getCmHopper'});};};exports[_0x2883('0x20')]=function(_0x2c8faa,_0x1a3c1a,_0xec3d0a){return function(){return client['Request'](_0x2883('0x6'),{'body':_0x2c8faa,'options':{'where':{'id':_0x1a3c1a},'limit':_0xec3d0a},'log':_0x2883('0x6')});};};exports[_0x2883('0x21')]=function(_0x595252,_0x491b33){return function(){return client[_0x2883('0x2')](_0x2883('0x22'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x595252,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x2883('0x10')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x491b33}},'order':[[_0x2883('0x11'),_0x2883('0x15')],[_0x2883('0x12'),_0x2883('0x15')],['id',_0x2883('0x13')]],'include':[{'model':_0x2883('0x4'),'as':_0x2883('0x5')},{'model':_0x2883('0x1d'),'as':'Agent','attributes':['id',_0x2883('0x1e'),_0x2883('0x23')]}],'group':_0x2883('0x24'),'raw':!![]},'log':_0x2883('0xf')});};};
\ No newline at end of file