Built motion from commit ba71417a.|2.6.28
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 2b1c47a..ec94d13 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa261=['Agent','name','VoiceQueue','Queue','getCmHopper','unlockContact','getContactRecallMe','GetContactRecallMe','User','voicePause','db.CmHopper.UserId','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','handlePreviewRecallNotifications','../client','getContacts','Request','GetCmHopper','updateContacts','format','UpdateCmHopper','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','YYYY-MM-DD\x20HH:mm:ss','priority','DESC','ASC','getContactDialerIvr','Contact','scheduledat','GetContactDialerIvr','campaign','queue','MoveContactManagedDialer','CountReScheduled','getContactPreview','GetCmHopperPreview','CmContact'];(function(_0xf8baeb,_0x4c83e8){var _0x5997a4=function(_0x21afe3){while(--_0x21afe3){_0xf8baeb['push'](_0xf8baeb['shift']());}};_0x5997a4(++_0x4c83e8);}(_0xa261,0x1a3));var _0x1a26=function(_0x26aa03,_0x4970bc){_0x26aa03=_0x26aa03-0x0;var _0x586154=_0xa261[_0x26aa03];return _0x586154;};'use strict';var client=require(_0x1a26('0x0'));var moment=require('moment');exports[_0x1a26('0x1')]=function(_0x149e9b,_0x4010fc){return function(){return client[_0x1a26('0x2')](_0x1a26('0x3'),{'options':{'where':{'VoiceQueueId':_0x149e9b},'include':[{'model':'CmContact','as':'Contact'}],'limit':_0x4010fc,'raw':![]},'log':'getCmHopper'});};};exports[_0x1a26('0x4')]=function(_0x275b17,_0x2dad90,_0x392ee0){return function(){return client[_0x1a26('0x2')]('UpdateCmHopper',{'body':_0x275b17,'options':{'where':{'VoiceQueueId':_0x2dad90,'scheduledat':{'$lte':moment()[_0x1a26('0x5')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x392ee0},'log':_0x1a26('0x6')});};};exports[_0x1a26('0x7')]=function(_0x143db9){return client['Request'](_0x1a26('0x6'),{'body':_0x143db9,'options':{'where':{'ContactId':_0x143db9[_0x1a26('0x8')],'ListId':_0x143db9[_0x1a26('0x9')],'VoiceQueueId':_0x143db9[_0x1a26('0xa')],'CampaignId':_0x143db9[_0x1a26('0xb')]}},'log':'rescheduleContact'});};exports[_0x1a26('0xc')]=function(_0x1bf4fe,_0x46eb8a,_0x30deef){return function(){return client[_0x1a26('0x2')](_0x1a26('0xd'),{'options':{'where':{'VoiceQueueId':_0x1bf4fe,'ListId':_0x46eb8a,'ContactId':_0x30deef}},'log':'DestroyCmHopper'});};};exports[_0x1a26('0xe')]=function(_0x530548,_0x1e91e9,_0x19e7c3,_0xd3aede){return client['Request'](_0x1a26('0xf'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x530548,'active':![],'scheduledat':{'$lte':moment()[_0x1a26('0x5')](_0x1a26('0x10'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x1e91e9}}]},'order':[[_0x1a26('0x11'),_0x1a26('0x12')],['scheduledat',_0xd3aede],['id',_0x1a26('0x13')]],'raw':!![],'limit':_0x19e7c3},'log':_0x1a26('0xf')});};exports[_0x1a26('0x14')]=function(_0x43495c,_0xae2069,_0x344c79){return client['Request'](_0x1a26('0xf'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x43495c,'active':![],'scheduledat':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':'CmContact','as':_0x1a26('0x15')}],'order':[[_0x1a26('0x11'),_0x1a26('0x12')],[_0x1a26('0x16'),_0x344c79],['id','ASC']],'raw':!![],'limit':_0xae2069},'log':_0x1a26('0x17')});};exports['moveContactManagedDialer']=function(_0x42c8af,_0x2f7801){_0x42c8af[_0x1a26('0x18')]=_0x42c8af[_0x1a26('0x19')];return client['Request'](_0x1a26('0x1a'),{'body':_0x42c8af,'options':{'where':{'ContactId':_0x42c8af[_0x1a26('0x8')],'ListId':_0x42c8af[_0x1a26('0x9')],'VoiceQueueId':_0x42c8af[_0x1a26('0xa')],'CampaignId':_0x42c8af['CampaignId'],'active':_0x2f7801?undefined:!![]}},'log':'MoveContactManagedDialer'});};exports['countReScheduled']=function(_0x6550ee){return client[_0x1a26('0x2')](_0x1a26('0x1b'),{'options':{'where':{'VoiceQueueId':_0x6550ee['id']?_0x6550ee['id']||null:null}},'log':'countReScheduled'});};exports[_0x1a26('0x1c')]=function(_0x1c7f89){return function(){return client[_0x1a26('0x2')](_0x1a26('0x1d'),{'options':{'where':{'id':_0x1c7f89},'include':[{'model':_0x1a26('0x1e'),'as':_0x1a26('0x15')},{'model':'User','as':_0x1a26('0x1f'),'attributes':['id',_0x1a26('0x20')]},{'model':_0x1a26('0x21'),'as':_0x1a26('0x22'),'attributes':['id',_0x1a26('0x20')]}],'raw':!![]},'log':_0x1a26('0x23')});};};exports[_0x1a26('0x24')]=function(_0x255a69,_0x2168fc,_0x3d1ef6){return client[_0x1a26('0x2')]('UpdateCmHopper',{'body':_0x255a69,'options':{'where':{'id':_0x2168fc},'limit':_0x3d1ef6},'log':_0x1a26('0x6')});};exports[_0x1a26('0x25')]=function(_0x31533a,_0xcbacbd){return function(){return client[_0x1a26('0x2')](_0x1a26('0x26'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x31533a,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0xcbacbd}},'order':[['priority','DESC'],[_0x1a26('0x16'),_0x1a26('0x12')],['id','ASC']],'include':[{'model':_0x1a26('0x1e'),'as':_0x1a26('0x15')},{'model':_0x1a26('0x27'),'as':_0x1a26('0x1f'),'attributes':['id',_0x1a26('0x20'),_0x1a26('0x28')]}],'group':_0x1a26('0x29'),'raw':!![]},'log':'GetContactDialer'});};};exports['resetActiveCalls']=function(_0x234df8,_0x2602ab){return client[_0x1a26('0x2')](_0x1a26('0x2a'),{'body':_0x234df8,'options':_0x2602ab||{},'log':_0x1a26('0x2a')});};exports['handlePreviewRecallNotifications']=function(_0x5b1546,_0x366dfe,_0x59a7fd){return function(){return client[_0x1a26('0x2')](_0x1a26('0x2b'),{'body':{'where':{'voiceQueueIds':_0x5b1546,'interval':_0x366dfe,'availableAgentsIds':_0x59a7fd}},'log':_0x1a26('0x2c')});};};
\ No newline at end of file
+var _0x8ca9=['../client','moment','getContacts','Request','GetCmHopper','getCmHopper','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','DESC','scheduledat','ASC','CmContact','Contact','priority','moveContactManagedDialer','queue','MoveContactManagedDialer','CountReScheduled','countReScheduled','getContactPreview','User','Agent','VoiceQueue','name','getContactRecallMe','GetContactRecallMe','db.CmHopper.UserId','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications'];(function(_0x36c5b0,_0x5001da){var _0xf19333=function(_0x1e880a){while(--_0x1e880a){_0x36c5b0['push'](_0x36c5b0['shift']());}};_0xf19333(++_0x5001da);}(_0x8ca9,0x9c));var _0x98ca=function(_0x41c94e,_0x5bc19f){_0x41c94e=_0x41c94e-0x0;var _0x547c29=_0x8ca9[_0x41c94e];return _0x547c29;};'use strict';var client=require(_0x98ca('0x0'));var moment=require(_0x98ca('0x1'));exports[_0x98ca('0x2')]=function(_0x466360,_0x3d9153){return function(){return client[_0x98ca('0x3')](_0x98ca('0x4'),{'options':{'where':{'VoiceQueueId':_0x466360},'include':[{'model':'CmContact','as':'Contact'}],'limit':_0x3d9153,'raw':![]},'log':_0x98ca('0x5')});};};exports['updateContacts']=function(_0x442519,_0x48415d,_0x219619){return function(){return client[_0x98ca('0x3')](_0x98ca('0x6'),{'body':_0x442519,'options':{'where':{'VoiceQueueId':_0x48415d,'scheduledat':{'$lte':moment()[_0x98ca('0x7')](_0x98ca('0x8'))}},'limit':_0x219619},'log':_0x98ca('0x6')});};};exports[_0x98ca('0x9')]=function(_0x210234){return client[_0x98ca('0x3')](_0x98ca('0x6'),{'body':_0x210234,'options':{'where':{'ContactId':_0x210234[_0x98ca('0xa')],'ListId':_0x210234[_0x98ca('0xb')],'VoiceQueueId':_0x210234[_0x98ca('0xc')],'CampaignId':_0x210234[_0x98ca('0xd')]}},'log':_0x98ca('0x9')});};exports[_0x98ca('0xe')]=function(_0x276213,_0x17ee87,_0x496b46){return function(){return client[_0x98ca('0x3')](_0x98ca('0xf'),{'options':{'where':{'VoiceQueueId':_0x276213,'ListId':_0x17ee87,'ContactId':_0x496b46}},'log':_0x98ca('0xf')});};};exports[_0x98ca('0x10')]=function(_0x5687ab,_0xf78589,_0x6345be,_0x9a230e){return client[_0x98ca('0x3')](_0x98ca('0x11'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x5687ab,'active':![],'scheduledat':{'$lte':moment()[_0x98ca('0x7')](_0x98ca('0x8'))},'$or':[{'UserId':null},{'UserId':{'$in':_0xf78589}}]},'order':[['priority',_0x98ca('0x12')],[_0x98ca('0x13'),_0x9a230e],['id',_0x98ca('0x14')]],'raw':!![],'limit':_0x6345be},'log':_0x98ca('0x11')});};exports['getContactDialerIvr']=function(_0x238c1a,_0x3c2f65,_0xe9f8ad){return client[_0x98ca('0x3')](_0x98ca('0x11'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x238c1a,'active':![],'scheduledat':{'$lte':moment()[_0x98ca('0x7')](_0x98ca('0x8'))}},'include':[{'model':_0x98ca('0x15'),'as':_0x98ca('0x16')}],'order':[[_0x98ca('0x17'),_0x98ca('0x12')],['scheduledat',_0xe9f8ad],['id',_0x98ca('0x14')]],'raw':!![],'limit':_0x3c2f65},'log':'GetContactDialerIvr'});};exports[_0x98ca('0x18')]=function(_0x2fe568,_0x50f8b4){_0x2fe568['campaign']=_0x2fe568[_0x98ca('0x19')];return client[_0x98ca('0x3')](_0x98ca('0x1a'),{'body':_0x2fe568,'options':{'where':{'ContactId':_0x2fe568['ContactId'],'ListId':_0x2fe568[_0x98ca('0xb')],'VoiceQueueId':_0x2fe568[_0x98ca('0xc')],'CampaignId':_0x2fe568['CampaignId'],'active':_0x50f8b4?undefined:!![]}},'log':_0x98ca('0x1a')});};exports['countReScheduled']=function(_0x3fd0bd){return client[_0x98ca('0x3')](_0x98ca('0x1b'),{'options':{'where':{'VoiceQueueId':_0x3fd0bd['id']?_0x3fd0bd['id']||null:null}},'log':_0x98ca('0x1c')});};exports[_0x98ca('0x1d')]=function(_0xe5091e){return function(){return client[_0x98ca('0x3')]('GetCmHopperPreview',{'options':{'where':{'id':_0xe5091e},'include':[{'model':_0x98ca('0x15'),'as':'Contact'},{'model':_0x98ca('0x1e'),'as':_0x98ca('0x1f'),'attributes':['id','name']},{'model':_0x98ca('0x20'),'as':'Queue','attributes':['id',_0x98ca('0x21')]}],'raw':!![]},'log':'getCmHopper'});};};exports['unlockContact']=function(_0x14bfb4,_0x540f45,_0x342a83){return client[_0x98ca('0x3')](_0x98ca('0x6'),{'body':_0x14bfb4,'options':{'where':{'id':_0x540f45},'limit':_0x342a83},'log':_0x98ca('0x6')});};exports[_0x98ca('0x22')]=function(_0x1e7fcf,_0x11389a){return function(){return client[_0x98ca('0x3')](_0x98ca('0x23'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x1e7fcf,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0x98ca('0x8'))},'UserId':{'$in':_0x11389a}},'order':[['priority',_0x98ca('0x12')],[_0x98ca('0x13'),'DESC'],['id','ASC']],'include':[{'model':_0x98ca('0x15'),'as':'Contact'},{'model':_0x98ca('0x1e'),'as':'Agent','attributes':['id',_0x98ca('0x21'),'voicePause']}],'group':_0x98ca('0x24'),'raw':!![]},'log':_0x98ca('0x11')});};};exports['resetActiveCalls']=function(_0x3cda27,_0x3d863c){return client['Request'](_0x98ca('0x25'),{'body':_0x3cda27,'options':_0x3d863c||{},'log':_0x98ca('0x25')});};exports['handlePreviewRecallNotifications']=function(_0x1c9c5b,_0x428d75,_0x121c8b){return function(){return client[_0x98ca('0x3')](_0x98ca('0x26'),{'body':{'where':{'voiceQueueIds':_0x1c9c5b,'interval':_0x428d75,'availableAgentsIds':_0x121c8b}},'log':'handlePreviewRecallNotifications'});};};
\ No newline at end of file