Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / services / agi / rpc / index.js
index d18a403..d048d63 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a65=['lodash','util','jayson/promise','client','http','request','then','error','message','result','catch','getSquareProject','production','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','name','email','getSquareProjectById','getVoiceQueueById','ShowSquareOdbc','dsn','ShowTrunk','ShowSound','save_name','ShowInterval','Interval','ShowSmsAccount','createSmsMessage','createSquareReport','merge','arg_1','YYYY-MM-DD\x20HH:mm:ss','CreateSquareMessage','phone','ListId','getPauseById','agentLogin','LoginUser','agentPause','agentUnpause','UnpauseUser','agentLogout','LogoutUser','moment'];(function(_0x1a4e0f,_0x5a6381){var _0x1435d1=function(_0x2dd5f5){while(--_0x2dd5f5){_0x1a4e0f['push'](_0x1a4e0f['shift']());}};_0x1435d1(++_0x5a6381);}(_0x4a65,0x16f));var _0x54a6=function(_0xd051df,_0xbf70d1){_0xd051df=_0xd051df-0x0;var _0x4378d7=_0x4a65[_0xd051df];return _0x4378d7;};'use strict';var BPromise=require('bluebird');var moment=require(_0x54a6('0x0'));var _=require(_0x54a6('0x1'));var util=require(_0x54a6('0x2'));var jayson=require(_0x54a6('0x3'));var client=jayson[_0x54a6('0x4')][_0x54a6('0x5')]({'port':0x2329});function request(_0x4f147a,_0x10aeda){return new BPromise(function(_0x1b9f30,_0x255f7b){return client[_0x54a6('0x6')](_0x4f147a,_0x10aeda)[_0x54a6('0x7')](function(_0xc9e68a){if(_0xc9e68a[_0x54a6('0x8')]){return _0x255f7b(_0xc9e68a[_0x54a6('0x8')][_0x54a6('0x9')]);}else{return _0x1b9f30(_0xc9e68a[_0x54a6('0xa')]);}})[_0x54a6('0xb')](function(_0x560c17){return _0x255f7b(_0x560c17);});});}exports[_0x54a6('0xc')]=function(_0x40a069){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x40a069},'attributes':[_0x54a6('0xd')]}});};exports[_0x54a6('0xe')]=function(_0x24c1bf){return request(_0x54a6('0xf'),{'options':{'raw':![],'where':{'id':_0x24c1bf},'include':[{'model':_0x54a6('0x10'),'as':_0x54a6('0x11')}],'attributes':['id',_0x54a6('0x12'),_0x54a6('0x13')]}});};exports[_0x54a6('0x14')]=function(_0x4a4df7){return request('ShowSquareProject',{'options':{'where':{'id':_0x4a4df7},'attributes':['name']}});};exports[_0x54a6('0x15')]=function(_0x527de2){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x527de2},'attributes':[_0x54a6('0x12')]}});};exports['getVariableById']=function(_0x350538){return request('ShowVariable',{'options':{'where':{'id':_0x350538},'attributes':[_0x54a6('0x12')]}});};exports['getSquareOdbcById']=function(_0x1020ff){return request(_0x54a6('0x16'),{'options':{'where':{'id':_0x1020ff},'attributes':[_0x54a6('0x17')]}});};exports['getUserById']=function(_0x30c3ad){return request('ShowUser',{'options':{'where':{'id':_0x30c3ad},'attributes':[_0x54a6('0x12')]}});};exports['getTrunkById']=function(_0x27c0e){return request(_0x54a6('0x18'),{'options':{'where':{'id':_0x27c0e},'attributes':[_0x54a6('0x12')]}});};exports['getSoundById']=function(_0x34ef9c){return request(_0x54a6('0x19'),{'options':{'where':{'id':_0x34ef9c},'attributes':[_0x54a6('0x1a')]}});};exports['getIntervalById']=function(_0x4efbc2){return request(_0x54a6('0x1b'),{'options':{'raw':![],'where':{'id':_0x4efbc2},'include':[{'model':_0x54a6('0x1c'),'as':'Intervals'}]}});};exports['getSmsAccountById']=function(_0x430292){return request(_0x54a6('0x1d'),{'options':{'where':{'id':_0x430292},'attributes':['id',_0x54a6('0x12')]}});};exports[_0x54a6('0x1e')]=function(_0x191416){return request('CreateSmsMessage',{'body':_0x191416});};exports['createSquareDetailsReport']=function(_0x4d1067){return request('CreateSquareDetailsReport',{'body':_0x4d1067});};exports[_0x54a6('0x1f')]=function(_0x2292e2){return request('CreateSquareReport',{'body':_[_0x54a6('0x20')](_0x2292e2,{'project_name':_0x2292e2[_0x54a6('0x21')],'prev_project_name':_0x2292e2['arg_2']||'','is_subproject':_0x2292e2['arg_2']?!![]:![],'leaveAt':moment()['format'](_0x54a6('0x22'))})});};exports['createSquareRecording']=function(_0x777a93){return request('CreateSquareRecording',{'body':_0x777a93});};exports['createSquareMessage']=function(_0x558b92){return request(_0x54a6('0x23'),{'body':_0x558b92});};exports['createCmContact']=function(_0x2974d7){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x2974d7[_0x54a6('0x24')],'ListId':_0x2974d7[_0x54a6('0x25')]}}})[_0x54a6('0x7')](function(_0x24e914){if(_0x24e914){return _0x24e914;}return request('CreateCmContact',{'body':_0x2974d7});});};exports[_0x54a6('0x26')]=function(_0x34808a){return request('ShowPause',{'options':{'where':{'id':_0x34808a},'attributes':[_0x54a6('0x12')]}});};exports[_0x54a6('0x27')]=function(_0x341793,_0x2a40e3){return request(_0x54a6('0x28'),{'body':{'interface':_0x2a40e3},'options':{'where':_0x341793}});};exports[_0x54a6('0x29')]=function(_0x4fe736,_0x3d40b9,_0x1fcb39){return request('PauseUser',{'body':{'type':_0x3d40b9,'uniqueid':_0x1fcb39},'options':{'where':_0x4fe736}});};exports[_0x54a6('0x2a')]=function(_0x248564){return request(_0x54a6('0x2b'),{'body':{},'options':{'where':_0x248564}});};exports[_0x54a6('0x2c')]=function(_0x39a27f){return request(_0x54a6('0x2d'),{'body':{},'options':{'where':_0x39a27f}});};
\ No newline at end of file
+var _0xf2f3=['CreateSmsMessage','CreateSquareDetailsReport','CreateSquareReport','merge','arg_1','arg_2','format','createSquareRecording','createSquareMessage','CreateSquareMessage','ListId','CreateCmContact','getPauseById','agentLogin','LoginUser','agentPause','agentUnpause','UnpauseUser','LogoutUser','moment','lodash','util','client','http','request','then','error','message','result','catch','getSquareProject','ShowSquareProject','production','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','email','getSquareProjectById','name','ShowVoiceQueue','getVariableById','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','getTrunkById','ShowTrunk','getSoundById','save_name','getIntervalById','Interval','getSmsAccountById','ShowSmsAccount','createSmsMessage'];(function(_0x3f0b30,_0x159bc8){var _0x2748a5=function(_0x3b42cc){while(--_0x3b42cc){_0x3f0b30['push'](_0x3f0b30['shift']());}};_0x2748a5(++_0x159bc8);}(_0xf2f3,0x15d));var _0x3f2f=function(_0x5130e1,_0x5c9a45){_0x5130e1=_0x5130e1-0x0;var _0x1e9e35=_0xf2f3[_0x5130e1];return _0x1e9e35;};'use strict';var BPromise=require('bluebird');var moment=require(_0x3f2f('0x0'));var _=require(_0x3f2f('0x1'));var util=require(_0x3f2f('0x2'));var jayson=require('jayson/promise');var client=jayson[_0x3f2f('0x3')][_0x3f2f('0x4')]({'port':0x2329});function request(_0x363002,_0x4b0e9e){return new BPromise(function(_0x54ae3d,_0x4749a5){return client[_0x3f2f('0x5')](_0x363002,_0x4b0e9e)[_0x3f2f('0x6')](function(_0x13227a){if(_0x13227a[_0x3f2f('0x7')]){return _0x4749a5(_0x13227a[_0x3f2f('0x7')][_0x3f2f('0x8')]);}else{return _0x54ae3d(_0x13227a[_0x3f2f('0x9')]);}})[_0x3f2f('0xa')](function(_0x2c54f8){return _0x4749a5(_0x2c54f8);});});}exports[_0x3f2f('0xb')]=function(_0x438f59){return request(_0x3f2f('0xc'),{'options':{'raw':![],'where':{'name':_0x438f59},'attributes':[_0x3f2f('0xd')]}});};exports[_0x3f2f('0xe')]=function(_0x5bb9b2){return request(_0x3f2f('0xf'),{'options':{'raw':![],'where':{'id':_0x5bb9b2},'include':[{'model':_0x3f2f('0x10'),'as':_0x3f2f('0x11')}],'attributes':['id','name',_0x3f2f('0x12')]}});};exports[_0x3f2f('0x13')]=function(_0x5e6169){return request('ShowSquareProject',{'options':{'where':{'id':_0x5e6169},'attributes':[_0x3f2f('0x14')]}});};exports['getVoiceQueueById']=function(_0x55a491){return request(_0x3f2f('0x15'),{'options':{'where':{'id':_0x55a491},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x16')]=function(_0x55e319){return request('ShowVariable',{'options':{'where':{'id':_0x55e319},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x17')]=function(_0x1ef904){return request(_0x3f2f('0x18'),{'options':{'where':{'id':_0x1ef904},'attributes':[_0x3f2f('0x19')]}});};exports[_0x3f2f('0x1a')]=function(_0x1d3fb7){return request('ShowUser',{'options':{'where':{'id':_0x1d3fb7},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x1b')]=function(_0x32ac1c){return request(_0x3f2f('0x1c'),{'options':{'where':{'id':_0x32ac1c},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x1d')]=function(_0xb1602f){return request('ShowSound',{'options':{'where':{'id':_0xb1602f},'attributes':[_0x3f2f('0x1e')]}});};exports[_0x3f2f('0x1f')]=function(_0x286d84){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x286d84},'include':[{'model':_0x3f2f('0x20'),'as':'Intervals'}]}});};exports[_0x3f2f('0x21')]=function(_0x28a669){return request(_0x3f2f('0x22'),{'options':{'where':{'id':_0x28a669},'attributes':['id',_0x3f2f('0x14')]}});};exports[_0x3f2f('0x23')]=function(_0x3800d6){return request(_0x3f2f('0x24'),{'body':_0x3800d6});};exports['createSquareDetailsReport']=function(_0xa6488d){return request(_0x3f2f('0x25'),{'body':_0xa6488d});};exports['createSquareReport']=function(_0x335c59){return request(_0x3f2f('0x26'),{'body':_[_0x3f2f('0x27')](_0x335c59,{'project_name':_0x335c59[_0x3f2f('0x28')],'prev_project_name':_0x335c59[_0x3f2f('0x29')]||'','is_subproject':_0x335c59[_0x3f2f('0x29')]?!![]:![],'leaveAt':moment()[_0x3f2f('0x2a')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports[_0x3f2f('0x2b')]=function(_0x443024){return request('CreateSquareRecording',{'body':_0x443024});};exports[_0x3f2f('0x2c')]=function(_0x117753){return request(_0x3f2f('0x2d'),{'body':_0x117753});};exports['createCmContact']=function(_0x68bb0d){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x68bb0d['phone'],'ListId':_0x68bb0d[_0x3f2f('0x2e')]}}})[_0x3f2f('0x6')](function(_0x422763){if(_0x422763){return _0x422763;}return request(_0x3f2f('0x2f'),{'body':_0x68bb0d});});};exports[_0x3f2f('0x30')]=function(_0x57d989){return request('ShowPause',{'options':{'where':{'id':_0x57d989},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x31')]=function(_0x13195f,_0x449674){return request(_0x3f2f('0x32'),{'body':{'interface':_0x449674},'options':{'where':_0x13195f}});};exports[_0x3f2f('0x33')]=function(_0x2916fa,_0x2fde83,_0x544b4b){return request('PauseUser',{'body':{'type':_0x2fde83,'uniqueid':_0x544b4b},'options':{'where':_0x2916fa}});};exports[_0x3f2f('0x34')]=function(_0x4420c0){return request(_0x3f2f('0x35'),{'body':{},'options':{'where':_0x4420c0}});};exports['agentLogout']=function(_0x3f510c){return request(_0x3f2f('0x36'),{'body':{},'options':{'where':_0x3f510c}});};
\ No newline at end of file