Built motion from commit d69f4380.|2.6.29
[motion2.git] / server / services / agi / rpc / index.js
index 79160cc..a2c9564 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf9bb=['getContactByPhone','GetContactByPhone','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','Interval','ShowSmsAccount','CreateSmsMessage','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','createSquareMessage','ShowCmHopper','phone','ListId','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','lodash','moment','jayson/promise','http','request','then','error','catch','getSquareProjects','GetSquareProjects','name','production','getSquareProject','ShowSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','CloudProvider','email','getVoiceQueueById','getVariableById','ShowVariable','getSquareOdbcById','dsn','getUserById','ShowUser'];(function(_0x38eb23,_0x196e8b){var _0x48506a=function(_0x36edb0){while(--_0x36edb0){_0x38eb23['push'](_0x38eb23['shift']());}};_0x48506a(++_0x196e8b);}(_0xf9bb,0x14d));var _0xbf9b=function(_0x40bdb3,_0x5a81f2){_0x40bdb3=_0x40bdb3-0x0;var _0xeac086=_0xf9bb[_0x40bdb3];return _0xeac086;};'use strict';var _=require(_0xbf9b('0x0'));var moment=require(_0xbf9b('0x1'));var jayson=require(_0xbf9b('0x2'));var client=jayson['client'][_0xbf9b('0x3')]({'port':0x2329});function request(_0x303ac3,_0x592295){return new Promise(function(_0x4e5db7,_0x190028){return client[_0xbf9b('0x4')](_0x303ac3,_0x592295)[_0xbf9b('0x5')](function(_0x20b0c5){if(_0x20b0c5[_0xbf9b('0x6')]){return _0x190028(_0x20b0c5[_0xbf9b('0x6')]['message']);}else{return _0x4e5db7(_0x20b0c5['result']);}})[_0xbf9b('0x7')](function(_0x493147){return _0x190028(_0x493147);});});}exports[_0xbf9b('0x8')]=function(){return request(_0xbf9b('0x9'),{'options':{'raw':![],'attributes':['id',_0xbf9b('0xa'),_0xbf9b('0xb')]}});};exports[_0xbf9b('0xc')]=function(_0x1437cd){return request(_0xbf9b('0xd'),{'options':{'raw':![],'where':{'name':_0x1437cd},'attributes':['production']}});};exports[_0xbf9b('0xe')]=function(_0x1cde49){return request(_0xbf9b('0xf'),{'options':{'raw':![],'where':{'id':_0x1cde49},'include':[{'model':_0xbf9b('0x10'),'as':_0xbf9b('0x11'),'include':[{'model':_0xbf9b('0x12'),'as':'CloudProvider'}]}],'attributes':['id',_0xbf9b('0xa'),_0xbf9b('0x13')],'smtp':!![]}});};exports['getSquareProjectById']=function(_0x201e31){return request(_0xbf9b('0xd'),{'options':{'where':{'id':_0x201e31},'attributes':[_0xbf9b('0xa')]}});};exports[_0xbf9b('0x14')]=function(_0x5d842d){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x5d842d},'attributes':[_0xbf9b('0xa')]}});};exports[_0xbf9b('0x15')]=function(_0x182b05){return request(_0xbf9b('0x16'),{'options':{'where':{'id':_0x182b05},'attributes':[_0xbf9b('0xa')]}});};exports[_0xbf9b('0x17')]=function(_0x1ec0e){return request('ShowSquareOdbc',{'options':{'where':{'id':_0x1ec0e},'attributes':[_0xbf9b('0x18')]}});};exports[_0xbf9b('0x19')]=function(_0x4f99da){return request(_0xbf9b('0x1a'),{'options':{'where':{'id':_0x4f99da},'attributes':[_0xbf9b('0xa')]}});};exports[_0xbf9b('0x1b')]=function(_0x1dac71){return request(_0xbf9b('0x1c'),{'options':{'where':{'phone':_0x1dac71['phone']},'attributes':['id']}});};exports[_0xbf9b('0x1d')]=function(_0x29b1e5){return request(_0xbf9b('0x1e'),{'options':{'where':{'id':_0x29b1e5},'attributes':[_0xbf9b('0xa')]}});};exports[_0xbf9b('0x1f')]=function(_0x19fbee){return request(_0xbf9b('0x20'),{'options':{'where':{'id':_0x19fbee},'attributes':[_0xbf9b('0x21')]}});};exports[_0xbf9b('0x22')]=function(_0x136268){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x136268},'include':[{'model':_0xbf9b('0x23'),'as':'Intervals'}]}});};exports['getSmsAccountById']=function(_0x38439b){return request(_0xbf9b('0x24'),{'options':{'where':{'id':_0x38439b},'attributes':['id','name']}});};exports['createSmsMessage']=function(_0x483ca1){return request(_0xbf9b('0x25'),{'body':_0x483ca1});};exports['createSquareDetailsReport']=function(_0x24336c){return request(_0xbf9b('0x26'),{'body':_0x24336c});};exports[_0xbf9b('0x27')]=function(_0x524597){return request(_0xbf9b('0x28'),{'body':_[_0xbf9b('0x29')](_0x524597,{'project_name':_0x524597[_0xbf9b('0x2a')],'prev_project_name':_0x524597[_0xbf9b('0x2b')]||'','is_subproject':_0x524597[_0xbf9b('0x2b')]?!![]:![],'leaveAt':moment()[_0xbf9b('0x2c')](_0xbf9b('0x2d'))})});};exports[_0xbf9b('0x2e')]=function(_0x3444f1){return request('CreateSquareRecording',{'body':_0x3444f1});};exports[_0xbf9b('0x2f')]=function(_0x41b5f3){return request('CreateSquareMessage',{'body':_0x41b5f3});};exports['createCmContact']=function(_0x1614fe){return request(_0xbf9b('0x30'),{'options':{'raw':![],'where':{'phone':_0x1614fe[_0xbf9b('0x31')],'ListId':_0x1614fe[_0xbf9b('0x32')]}}})[_0xbf9b('0x5')](function(_0xb60470){if(_0xb60470){return _0xb60470;}return request('CreateCmContact',{'body':_0x1614fe});});};exports['getPauseById']=function(_0x49d77f){return request(_0xbf9b('0x33'),{'options':{'where':{'id':_0x49d77f},'attributes':[_0xbf9b('0xa')]}});};exports[_0xbf9b('0x34')]=function(_0x41d29d,_0xa21698){return request(_0xbf9b('0x35'),{'body':{'interface':_0xa21698},'options':{'where':_0x41d29d}});};exports[_0xbf9b('0x36')]=function(_0x14eff8,_0x2ad702,_0x3f8f1b){return request(_0xbf9b('0x37'),{'body':{'type':_0x2ad702,'uniqueid':_0x3f8f1b},'options':{'where':_0x14eff8}});};exports[_0xbf9b('0x38')]=function(_0x4baded){return request(_0xbf9b('0x39'),{'body':{},'options':{'where':_0x4baded}});};exports[_0xbf9b('0x3a')]=function(_0x17a2e4){return request(_0xbf9b('0x3b'),{'body':{},'options':{'where':_0x17a2e4}});};
\ No newline at end of file
+var _0x0d6a=['getPauseById','ShowPause','agentLogin','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','lodash','moment','client','http','request','then','error','message','result','catch','getSquareProjects','name','getSquareProject','ShowSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','CloudProvider','email','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','getVariableById','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','getContactByPhone','phone','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Interval','getSmsAccountById','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','CreateCmContact'];(function(_0xfa634c,_0x414e0e){var _0x73e478=function(_0xac2a51){while(--_0xac2a51){_0xfa634c['push'](_0xfa634c['shift']());}};_0x73e478(++_0x414e0e);}(_0x0d6a,0xc9));var _0xa0d6=function(_0x513aa5,_0x1fba79){_0x513aa5=_0x513aa5-0x0;var _0x1a1a7c=_0x0d6a[_0x513aa5];return _0x1a1a7c;};'use strict';var _=require(_0xa0d6('0x0'));var moment=require(_0xa0d6('0x1'));var jayson=require('jayson/promise');var client=jayson[_0xa0d6('0x2')][_0xa0d6('0x3')]({'port':0x2329});function request(_0x37e078,_0xa452b8){return new Promise(function(_0x71d654,_0x236047){return client[_0xa0d6('0x4')](_0x37e078,_0xa452b8)[_0xa0d6('0x5')](function(_0x3ed624){if(_0x3ed624[_0xa0d6('0x6')]){return _0x236047(_0x3ed624['error'][_0xa0d6('0x7')]);}else{return _0x71d654(_0x3ed624[_0xa0d6('0x8')]);}})[_0xa0d6('0x9')](function(_0x11f5f9){return _0x236047(_0x11f5f9);});});}exports[_0xa0d6('0xa')]=function(){return request('GetSquareProjects',{'options':{'raw':![],'attributes':['id',_0xa0d6('0xb'),'production']}});};exports[_0xa0d6('0xc')]=function(_0x49ede5){return request(_0xa0d6('0xd'),{'options':{'raw':![],'where':{'name':_0x49ede5},'attributes':['production']}});};exports[_0xa0d6('0xe')]=function(_0x831250){return request(_0xa0d6('0xf'),{'options':{'raw':![],'where':{'id':_0x831250},'include':[{'model':_0xa0d6('0x10'),'as':_0xa0d6('0x11'),'include':[{'model':_0xa0d6('0x12'),'as':'CloudProvider'}]}],'attributes':['id',_0xa0d6('0xb'),_0xa0d6('0x13')],'smtp':!![]}});};exports[_0xa0d6('0x14')]=function(_0x5db766){return request(_0xa0d6('0xd'),{'options':{'where':{'id':_0x5db766},'attributes':[_0xa0d6('0xb')]}});};exports[_0xa0d6('0x15')]=function(_0x31b97b){return request(_0xa0d6('0x16'),{'options':{'where':{'id':_0x31b97b},'attributes':[_0xa0d6('0xb')]}});};exports[_0xa0d6('0x17')]=function(_0x4a0f3a){return request('ShowVariable',{'options':{'where':{'id':_0x4a0f3a},'attributes':[_0xa0d6('0xb')]}});};exports[_0xa0d6('0x18')]=function(_0xb21e34){return request(_0xa0d6('0x19'),{'options':{'where':{'id':_0xb21e34},'attributes':[_0xa0d6('0x1a')]}});};exports[_0xa0d6('0x1b')]=function(_0x82e7b6){return request('ShowUser',{'options':{'where':{'id':_0x82e7b6},'attributes':[_0xa0d6('0xb')]}});};exports[_0xa0d6('0x1c')]=function(_0x20c387){return request('GetContactByPhone',{'options':{'where':{'phone':_0x20c387[_0xa0d6('0x1d')]},'attributes':['id']}});};exports['getTrunkById']=function(_0x1dc618){return request('ShowTrunk',{'options':{'where':{'id':_0x1dc618},'attributes':[_0xa0d6('0xb')]}});};exports[_0xa0d6('0x1e')]=function(_0x205cff){return request(_0xa0d6('0x1f'),{'options':{'where':{'id':_0x205cff},'attributes':[_0xa0d6('0x20')]}});};exports[_0xa0d6('0x21')]=function(_0x5a78ec){return request(_0xa0d6('0x22'),{'options':{'raw':![],'where':{'id':_0x5a78ec},'include':[{'model':_0xa0d6('0x23'),'as':'Intervals'}]}});};exports[_0xa0d6('0x24')]=function(_0x51c67e){return request('ShowSmsAccount',{'options':{'where':{'id':_0x51c67e},'attributes':['id',_0xa0d6('0xb')]}});};exports[_0xa0d6('0x25')]=function(_0x181606){return request(_0xa0d6('0x26'),{'body':_0x181606});};exports[_0xa0d6('0x27')]=function(_0x233faa){return request(_0xa0d6('0x28'),{'body':_0x233faa});};exports[_0xa0d6('0x29')]=function(_0x3f15d0){return request(_0xa0d6('0x2a'),{'body':_['merge'](_0x3f15d0,{'project_name':_0x3f15d0[_0xa0d6('0x2b')],'prev_project_name':_0x3f15d0[_0xa0d6('0x2c')]||'','is_subproject':_0x3f15d0[_0xa0d6('0x2c')]?!![]:![],'leaveAt':moment()[_0xa0d6('0x2d')](_0xa0d6('0x2e'))})});};exports[_0xa0d6('0x2f')]=function(_0x3ebb88){return request(_0xa0d6('0x30'),{'body':_0x3ebb88});};exports[_0xa0d6('0x31')]=function(_0x28abb2){return request(_0xa0d6('0x32'),{'body':_0x28abb2});};exports[_0xa0d6('0x33')]=function(_0x414b84){return request(_0xa0d6('0x34'),{'options':{'raw':![],'where':{'phone':_0x414b84[_0xa0d6('0x1d')],'ListId':_0x414b84[_0xa0d6('0x35')]}}})[_0xa0d6('0x5')](function(_0x3dfa5a){if(_0x3dfa5a){return _0x3dfa5a;}return request(_0xa0d6('0x36'),{'body':_0x414b84});});};exports[_0xa0d6('0x37')]=function(_0x184a5a){return request(_0xa0d6('0x38'),{'options':{'where':{'id':_0x184a5a},'attributes':[_0xa0d6('0xb')]}});};exports[_0xa0d6('0x39')]=function(_0x4a30e1,_0x1a811f){return request('LoginUser',{'body':{'interface':_0x1a811f},'options':{'where':_0x4a30e1}});};exports[_0xa0d6('0x3a')]=function(_0x266675,_0x369196,_0x525c40){return request(_0xa0d6('0x3b'),{'body':{'type':_0x369196,'uniqueid':_0x525c40},'options':{'where':_0x266675}});};exports[_0xa0d6('0x3c')]=function(_0x5e7084){return request(_0xa0d6('0x3d'),{'body':{},'options':{'where':_0x5e7084}});};exports[_0xa0d6('0x3e')]=function(_0x556746){return request(_0xa0d6('0x3f'),{'body':{},'options':{'where':_0x556746}});};
\ No newline at end of file