Built motion from commit db94841.|2.5.3
[motion2.git] / server / services / agi / rpc / index.js
index 2f89240..b6f14ce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe0de=['CreateSquareMessage','createCmContact','ShowCmHopper','ListId','CreateCmContact','getPauseById','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','lodash','util','jayson/promise','client','http','request','then','error','message','result','production','getMailAccountById','MailServerOut','Smtp','name','email','ShowSquareProject','getVoiceQueueById','ShowVoiceQueue','getVariableById','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','ShowUser','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSmsMessage','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','createSquareMessage'];(function(_0x1e9bf5,_0x2b8466){var _0x3e43a0=function(_0x4f74dd){while(--_0x4f74dd){_0x1e9bf5['push'](_0x1e9bf5['shift']());}};_0x3e43a0(++_0x2b8466);}(_0xe0de,0x1e4));var _0xee0d=function(_0x58c2e7,_0x464720){_0x58c2e7=_0x58c2e7-0x0;var _0x24ea33=_0xe0de[_0x58c2e7];return _0x24ea33;};'use strict';var BPromise=require('bluebird');var moment=require('moment');var _=require(_0xee0d('0x0'));var util=require(_0xee0d('0x1'));var jayson=require(_0xee0d('0x2'));var client=jayson[_0xee0d('0x3')][_0xee0d('0x4')]({'port':0x2329});function request(_0x539544,_0x38f8aa){return new BPromise(function(_0x21e708,_0xf308dd){return client[_0xee0d('0x5')](_0x539544,_0x38f8aa)[_0xee0d('0x6')](function(_0x985ba3){if(_0x985ba3[_0xee0d('0x7')]){return _0xf308dd(_0x985ba3['error'][_0xee0d('0x8')]);}else{return _0x21e708(_0x985ba3[_0xee0d('0x9')]);}})['catch'](function(_0x4b31a8){return _0xf308dd(_0x4b31a8);});});}exports['getSquareProject']=function(_0x23d092){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x23d092},'attributes':[_0xee0d('0xa')]}});};exports[_0xee0d('0xb')]=function(_0x241227){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x241227},'include':[{'model':_0xee0d('0xc'),'as':_0xee0d('0xd')}],'attributes':['id',_0xee0d('0xe'),_0xee0d('0xf')]}});};exports['getSquareProjectById']=function(_0x42c5ce){return request(_0xee0d('0x10'),{'options':{'where':{'id':_0x42c5ce},'attributes':['name']}});};exports[_0xee0d('0x11')]=function(_0x11d810){return request(_0xee0d('0x12'),{'options':{'where':{'id':_0x11d810},'attributes':['name']}});};exports[_0xee0d('0x13')]=function(_0x2b1c4a){return request('ShowVariable',{'options':{'where':{'id':_0x2b1c4a},'attributes':['name']}});};exports[_0xee0d('0x14')]=function(_0x2823b7){return request(_0xee0d('0x15'),{'options':{'where':{'id':_0x2823b7},'attributes':[_0xee0d('0x16')]}});};exports[_0xee0d('0x17')]=function(_0x56f77f){return request(_0xee0d('0x18'),{'options':{'where':{'id':_0x56f77f},'attributes':[_0xee0d('0xe')]}});};exports[_0xee0d('0x19')]=function(_0x2769db){return request(_0xee0d('0x1a'),{'options':{'where':{'id':_0x2769db},'attributes':['name']}});};exports[_0xee0d('0x1b')]=function(_0x19a94e){return request(_0xee0d('0x1c'),{'options':{'where':{'id':_0x19a94e},'attributes':[_0xee0d('0x1d')]}});};exports[_0xee0d('0x1e')]=function(_0x4e4628){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x4e4628},'include':[{'model':_0xee0d('0x1f'),'as':_0xee0d('0x20')}]}});};exports[_0xee0d('0x21')]=function(_0x2d9e3f){return request(_0xee0d('0x22'),{'options':{'where':{'id':_0x2d9e3f},'attributes':['id',_0xee0d('0xe')]}});};exports[_0xee0d('0x23')]=function(_0x284a0d){return request(_0xee0d('0x24'),{'body':_0x284a0d});};exports['createSquareDetailsReport']=function(_0x20de85){return request(_0xee0d('0x25'),{'body':_0x20de85});};exports[_0xee0d('0x26')]=function(_0x1aaae9){return request(_0xee0d('0x27'),{'body':_[_0xee0d('0x28')](_0x1aaae9,{'project_name':_0x1aaae9[_0xee0d('0x29')],'prev_project_name':_0x1aaae9[_0xee0d('0x2a')]||'','is_subproject':_0x1aaae9[_0xee0d('0x2a')]?!![]:![],'leaveAt':moment()[_0xee0d('0x2b')](_0xee0d('0x2c'))})});};exports[_0xee0d('0x2d')]=function(_0x5e647c){return request('CreateSquareRecording',{'body':_0x5e647c});};exports[_0xee0d('0x2e')]=function(_0x1c9302){return request(_0xee0d('0x2f'),{'body':_0x1c9302});};exports[_0xee0d('0x30')]=function(_0x26dfbe){return request(_0xee0d('0x31'),{'options':{'raw':![],'where':{'phone':_0x26dfbe['phone'],'ListId':_0x26dfbe[_0xee0d('0x32')]}}})['then'](function(_0x42851e){if(_0x42851e){return _0x42851e;}return request(_0xee0d('0x33'),{'body':_0x26dfbe});});};exports[_0xee0d('0x34')]=function(_0x2c567e){return request('ShowPause',{'options':{'where':{'id':_0x2c567e},'attributes':['name']}});};exports['agentLogin']=function(_0x2565e4,_0x46a634){return request(_0xee0d('0x35'),{'body':{'interface':_0x46a634},'options':{'where':_0x2565e4}});};exports[_0xee0d('0x36')]=function(_0x52a3c6,_0x5598ae,_0x14f7b4){return request(_0xee0d('0x37'),{'body':{'type':_0x5598ae,'uniqueid':_0x14f7b4},'options':{'where':_0x52a3c6}});};exports[_0xee0d('0x38')]=function(_0x2092cf){return request(_0xee0d('0x39'),{'body':{},'options':{'where':_0x2092cf}});};exports[_0xee0d('0x3a')]=function(_0x57cb19){return request('LogoutUser',{'body':{},'options':{'where':_0x57cb19}});};
\ No newline at end of file
+var _0x6ae7=['lodash','util','jayson/promise','http','request','then','error','result','getSquareProject','ShowSquareProject','production','ShowMailAccount','MailServerOut','Smtp','name','email','getSquareProjectById','getVariableById','getSquareOdbcById','dsn','getUserById','ShowUser','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','ShowInterval','Interval','Intervals','getSmsAccountById','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','CreateSquareReport','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createCmContact','ShowCmHopper','phone','ListId','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','LogoutUser'];(function(_0x432fca,_0xb0b1b5){var _0x3adba4=function(_0x5e3ae4){while(--_0x5e3ae4){_0x432fca['push'](_0x432fca['shift']());}};_0x3adba4(++_0xb0b1b5);}(_0x6ae7,0x6e));var _0x76ae=function(_0x2b784d,_0x4eb8e0){_0x2b784d=_0x2b784d-0x0;var _0x886ee8=_0x6ae7[_0x2b784d];return _0x886ee8;};'use strict';var BPromise=require('bluebird');var moment=require('moment');var _=require(_0x76ae('0x0'));var util=require(_0x76ae('0x1'));var jayson=require(_0x76ae('0x2'));var client=jayson['client'][_0x76ae('0x3')]({'port':0x2329});function request(_0x9fb618,_0x163beb){return new BPromise(function(_0x2d61d2,_0xca4f84){return client[_0x76ae('0x4')](_0x9fb618,_0x163beb)[_0x76ae('0x5')](function(_0x537226){if(_0x537226['error']){return _0xca4f84(_0x537226[_0x76ae('0x6')]['message']);}else{return _0x2d61d2(_0x537226[_0x76ae('0x7')]);}})['catch'](function(_0x20d61c){return _0xca4f84(_0x20d61c);});});}exports[_0x76ae('0x8')]=function(_0x2e618d){return request(_0x76ae('0x9'),{'options':{'raw':![],'where':{'name':_0x2e618d},'attributes':[_0x76ae('0xa')]}});};exports['getMailAccountById']=function(_0x316426){return request(_0x76ae('0xb'),{'options':{'raw':![],'where':{'id':_0x316426},'include':[{'model':_0x76ae('0xc'),'as':_0x76ae('0xd')}],'attributes':['id',_0x76ae('0xe'),_0x76ae('0xf')]}});};exports[_0x76ae('0x10')]=function(_0x1c6b79){return request(_0x76ae('0x9'),{'options':{'where':{'id':_0x1c6b79},'attributes':['name']}});};exports['getVoiceQueueById']=function(_0x43baa1){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x43baa1},'attributes':[_0x76ae('0xe')]}});};exports[_0x76ae('0x11')]=function(_0x159c5b){return request('ShowVariable',{'options':{'where':{'id':_0x159c5b},'attributes':['name']}});};exports[_0x76ae('0x12')]=function(_0x211962){return request('ShowSquareOdbc',{'options':{'where':{'id':_0x211962},'attributes':[_0x76ae('0x13')]}});};exports[_0x76ae('0x14')]=function(_0x4dda9a){return request(_0x76ae('0x15'),{'options':{'where':{'id':_0x4dda9a},'attributes':['name']}});};exports[_0x76ae('0x16')]=function(_0x4b98bc){return request(_0x76ae('0x17'),{'options':{'where':{'id':_0x4b98bc},'attributes':[_0x76ae('0xe')]}});};exports[_0x76ae('0x18')]=function(_0x3ef9ee){return request(_0x76ae('0x19'),{'options':{'where':{'id':_0x3ef9ee},'attributes':[_0x76ae('0x1a')]}});};exports['getIntervalById']=function(_0x301c2e){return request(_0x76ae('0x1b'),{'options':{'raw':![],'where':{'id':_0x301c2e},'include':[{'model':_0x76ae('0x1c'),'as':_0x76ae('0x1d')}]}});};exports[_0x76ae('0x1e')]=function(_0x18fc66){return request('ShowSmsAccount',{'options':{'where':{'id':_0x18fc66},'attributes':['id','name']}});};exports[_0x76ae('0x1f')]=function(_0x487bd0){return request(_0x76ae('0x20'),{'body':_0x487bd0});};exports[_0x76ae('0x21')]=function(_0x31c867){return request(_0x76ae('0x22'),{'body':_0x31c867});};exports['createSquareReport']=function(_0x352ac4){return request(_0x76ae('0x23'),{'body':_['merge'](_0x352ac4,{'project_name':_0x352ac4[_0x76ae('0x24')],'prev_project_name':_0x352ac4[_0x76ae('0x25')]||'','is_subproject':_0x352ac4[_0x76ae('0x25')]?!![]:![],'leaveAt':moment()[_0x76ae('0x26')](_0x76ae('0x27'))})});};exports[_0x76ae('0x28')]=function(_0xca4ebb){return request(_0x76ae('0x29'),{'body':_0xca4ebb});};exports['createSquareMessage']=function(_0x5e958a){return request('CreateSquareMessage',{'body':_0x5e958a});};exports[_0x76ae('0x2a')]=function(_0x561db3){return request(_0x76ae('0x2b'),{'options':{'raw':![],'where':{'phone':_0x561db3[_0x76ae('0x2c')],'ListId':_0x561db3[_0x76ae('0x2d')]}}})[_0x76ae('0x5')](function(_0x478df6){if(_0x478df6){return _0x478df6;}return request('CreateCmContact',{'body':_0x561db3});});};exports[_0x76ae('0x2e')]=function(_0x580805){return request(_0x76ae('0x2f'),{'options':{'where':{'id':_0x580805},'attributes':['name']}});};exports[_0x76ae('0x30')]=function(_0x1a19c1,_0x453022){return request(_0x76ae('0x31'),{'body':{'interface':_0x453022},'options':{'where':_0x1a19c1}});};exports[_0x76ae('0x32')]=function(_0x3fd64c,_0x4f0525,_0x2dfe5e){return request(_0x76ae('0x33'),{'body':{'type':_0x4f0525,'uniqueid':_0x2dfe5e},'options':{'where':_0x3fd64c}});};exports[_0x76ae('0x34')]=function(_0x502c3f){return request(_0x76ae('0x35'),{'body':{},'options':{'where':_0x502c3f}});};exports['agentLogout']=function(_0x5bf637){return request(_0x76ae('0x36'),{'body':{},'options':{'where':_0x5bf637}});};
\ No newline at end of file