Built motion from commit ff78e754.|2.6.29
[motion2.git] / server / services / ami / rpc / cmHopper.js
index 5485be4..e9e8c0a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd2f5=['VoiceQueueId','CampaignId','DestroyCmHopper','GetContactDialer','DESC','scheduledat','ASC','getContactDialerIvr','Request','priority','campaign','queue','MoveContactManagedDialer','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','voicePause','db.CmHopper.UserId','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','getContacts','GetCmHopper','CmContact','Contact','getCmHopper','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId'];(function(_0x2e6118,_0x34b718){var _0x5ad0e9=function(_0x3e1d72){while(--_0x3e1d72){_0x2e6118['push'](_0x2e6118['shift']());}};_0x5ad0e9(++_0x34b718);}(_0xd2f5,0x144));var _0x5d2f=function(_0x58ca12,_0x2583ee){_0x58ca12=_0x58ca12-0x0;var _0x170aa3=_0xd2f5[_0x58ca12];return _0x170aa3;};'use strict';var client=require(_0x5d2f('0x0'));var moment=require('moment');exports[_0x5d2f('0x1')]=function(_0x58ee4e,_0x2a7bb2){return function(){return client['Request'](_0x5d2f('0x2'),{'options':{'where':{'VoiceQueueId':_0x58ee4e},'include':[{'model':_0x5d2f('0x3'),'as':_0x5d2f('0x4')}],'limit':_0x2a7bb2,'raw':![]},'log':_0x5d2f('0x5')});};};exports[_0x5d2f('0x6')]=function(_0x3cda2a,_0x2392df,_0x16e9fa){return function(){return client['Request'](_0x5d2f('0x7'),{'body':_0x3cda2a,'options':{'where':{'VoiceQueueId':_0x2392df,'scheduledat':{'$lte':moment()[_0x5d2f('0x8')](_0x5d2f('0x9'))}},'limit':_0x16e9fa},'log':_0x5d2f('0x7')});};};exports[_0x5d2f('0xa')]=function(_0xb7b530){return client['Request'](_0x5d2f('0x7'),{'body':_0xb7b530,'options':{'where':{'ContactId':_0xb7b530[_0x5d2f('0xb')],'ListId':_0xb7b530['ListId'],'VoiceQueueId':_0xb7b530[_0x5d2f('0xc')],'CampaignId':_0xb7b530[_0x5d2f('0xd')]}},'log':_0x5d2f('0xa')});};exports['destroyContact']=function(_0x39b43b,_0x401bdb,_0x439475){return function(){return client['Request']('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x39b43b,'ListId':_0x401bdb,'ContactId':_0x439475}},'log':_0x5d2f('0xe')});};};exports['getContactDialer']=function(_0x293e95,_0x25ae37,_0x5e6a95,_0x663b11){return client['Request'](_0x5d2f('0xf'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x293e95,'active':![],'scheduledat':{'$lte':moment()[_0x5d2f('0x8')](_0x5d2f('0x9'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x25ae37}}]},'order':[['priority',_0x5d2f('0x10')],[_0x5d2f('0x11'),_0x663b11],['id',_0x5d2f('0x12')]],'raw':!![],'limit':_0x5e6a95},'log':_0x5d2f('0xf')});};exports[_0x5d2f('0x13')]=function(_0x5796f6,_0x27b8a3,_0x33a931){return client[_0x5d2f('0x14')](_0x5d2f('0xf'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x5796f6,'active':![],'scheduledat':{'$lte':moment()['format'](_0x5d2f('0x9'))}},'include':[{'model':_0x5d2f('0x3'),'as':_0x5d2f('0x4')}],'order':[[_0x5d2f('0x15'),_0x5d2f('0x10')],[_0x5d2f('0x11'),_0x33a931],['id',_0x5d2f('0x12')]],'raw':!![],'limit':_0x27b8a3},'log':'GetContactDialerIvr'});};exports['moveContactManagedDialer']=function(_0x4d3959,_0x3814b1){_0x4d3959[_0x5d2f('0x16')]=_0x4d3959[_0x5d2f('0x17')];return client[_0x5d2f('0x14')](_0x5d2f('0x18'),{'body':_0x4d3959,'options':{'where':{'ContactId':_0x4d3959['ContactId'],'ListId':_0x4d3959['ListId'],'VoiceQueueId':_0x4d3959[_0x5d2f('0xc')],'CampaignId':_0x4d3959['CampaignId'],'active':_0x3814b1?undefined:!![]}},'log':_0x5d2f('0x18')});};exports[_0x5d2f('0x19')]=function(_0x102304){return client[_0x5d2f('0x14')](_0x5d2f('0x1a'),{'options':{'where':{'VoiceQueueId':_0x102304['id']?_0x102304['id']||null:null}},'log':_0x5d2f('0x19')});};exports[_0x5d2f('0x1b')]=function(_0x20439c){return function(){return client['Request'](_0x5d2f('0x1c'),{'options':{'where':{'id':_0x20439c},'include':[{'model':_0x5d2f('0x3'),'as':_0x5d2f('0x4')},{'model':_0x5d2f('0x1d'),'as':_0x5d2f('0x1e'),'attributes':['id',_0x5d2f('0x1f')]},{'model':_0x5d2f('0x20'),'as':_0x5d2f('0x21'),'attributes':['id','name']}],'raw':!![]},'log':_0x5d2f('0x5')});};};exports[_0x5d2f('0x22')]=function(_0x3d1b95,_0x3446a0,_0x185a2b){return client['Request'](_0x5d2f('0x7'),{'body':_0x3d1b95,'options':{'where':{'id':_0x3446a0},'limit':_0x185a2b},'log':_0x5d2f('0x7')});};exports[_0x5d2f('0x23')]=function(_0x3063f4,_0x536f1d){return function(){return client[_0x5d2f('0x14')](_0x5d2f('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x3063f4,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0x5d2f('0x9'))},'UserId':{'$in':_0x536f1d}},'order':[[_0x5d2f('0x15'),_0x5d2f('0x10')],['scheduledat',_0x5d2f('0x10')],['id',_0x5d2f('0x12')]],'include':[{'model':_0x5d2f('0x3'),'as':_0x5d2f('0x4')},{'model':_0x5d2f('0x1d'),'as':_0x5d2f('0x1e'),'attributes':['id','name',_0x5d2f('0x25')]}],'group':_0x5d2f('0x26'),'raw':!![]},'log':_0x5d2f('0xf')});};};exports['resetActiveCalls']=function(_0x5b7c0b,_0xc29c98){return client[_0x5d2f('0x14')](_0x5d2f('0x27'),{'body':_0x5b7c0b,'options':_0xc29c98||{},'log':_0x5d2f('0x27')});};exports[_0x5d2f('0x28')]=function(_0xdb1071,_0xb74a4d,_0x3bcdc9){return function(){return client[_0x5d2f('0x14')](_0x5d2f('0x29'),{'body':{'where':{'voiceQueueIds':_0xdb1071,'interval':_0xb74a4d,'availableAgentsIds':_0x3bcdc9}},'log':_0x5d2f('0x28')});};};
\ No newline at end of file
+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(_0xc1a4cf,_0x17141b){var _0x2930d1=function(_0x2e6e7a){while(--_0x2e6e7a){_0xc1a4cf['push'](_0xc1a4cf['shift']());}};_0x2930d1(++_0x17141b);}(_0xa261,0x1a3));var _0x1a26=function(_0xf4990,_0x3a56ad){_0xf4990=_0xf4990-0x0;var _0xd973e8=_0xa261[_0xf4990];return _0xd973e8;};'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