Built motion from commit fade34fd.|2.5.41
[motion2.git] / server / services / agi / rpc / index.js
index 5c715c6..7708a0a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf303=['util','jayson/promise','http','then','error','message','result','catch','ShowSquareProject','production','getMailAccountById','ShowMailAccount','Smtp','name','email','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','getVariableById','getSquareOdbcById','ShowSquareOdbc','getUserById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSquareDetailsReport','createSquareReport','arg_1','arg_2','format','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ListId','CreateCmContact','getPauseById','agentLogin','agentPause','PauseUser','agentUnpause','LogoutUser','bluebird','lodash'];(function(_0x263807,_0x512490){var _0x594c2a=function(_0x35bd1b){while(--_0x35bd1b){_0x263807['push'](_0x263807['shift']());}};_0x594c2a(++_0x512490);}(_0xf303,0x68));var _0x3f30=function(_0x5c30e9,_0x153bbd){_0x5c30e9=_0x5c30e9-0x0;var _0x4875f7=_0xf303[_0x5c30e9];return _0x4875f7;};'use strict';var BPromise=require(_0x3f30('0x0'));var moment=require('moment');var _=require(_0x3f30('0x1'));var util=require(_0x3f30('0x2'));var jayson=require(_0x3f30('0x3'));var client=jayson['client'][_0x3f30('0x4')]({'port':0x2329});function request(_0x1949b8,_0x5d1598){return new BPromise(function(_0x2cdcc6,_0x48db5f){return client['request'](_0x1949b8,_0x5d1598)[_0x3f30('0x5')](function(_0x12daa2){if(_0x12daa2['error']){return _0x48db5f(_0x12daa2[_0x3f30('0x6')][_0x3f30('0x7')]);}else{return _0x2cdcc6(_0x12daa2[_0x3f30('0x8')]);}})[_0x3f30('0x9')](function(_0x3608dd){return _0x48db5f(_0x3608dd);});});}exports['getSquareProject']=function(_0xa2ba8c){return request(_0x3f30('0xa'),{'options':{'raw':![],'where':{'name':_0xa2ba8c},'attributes':[_0x3f30('0xb')]}});};exports[_0x3f30('0xc')]=function(_0x2e2ed4){return request(_0x3f30('0xd'),{'options':{'raw':![],'where':{'id':_0x2e2ed4},'include':[{'model':'MailServerOut','as':_0x3f30('0xe')}],'attributes':['id',_0x3f30('0xf'),_0x3f30('0x10')]}});};exports[_0x3f30('0x11')]=function(_0x244722){return request(_0x3f30('0xa'),{'options':{'where':{'id':_0x244722},'attributes':[_0x3f30('0xf')]}});};exports[_0x3f30('0x12')]=function(_0x52723a){return request(_0x3f30('0x13'),{'options':{'where':{'id':_0x52723a},'attributes':[_0x3f30('0xf')]}});};exports[_0x3f30('0x14')]=function(_0x971b83){return request('ShowVariable',{'options':{'where':{'id':_0x971b83},'attributes':[_0x3f30('0xf')]}});};exports[_0x3f30('0x15')]=function(_0x11fc5b){return request(_0x3f30('0x16'),{'options':{'where':{'id':_0x11fc5b},'attributes':['dsn']}});};exports[_0x3f30('0x17')]=function(_0x5f20c0){return request('ShowUser',{'options':{'where':{'id':_0x5f20c0},'attributes':['name']}});};exports['getTrunkById']=function(_0x3235d3){return request(_0x3f30('0x18'),{'options':{'where':{'id':_0x3235d3},'attributes':[_0x3f30('0xf')]}});};exports[_0x3f30('0x19')]=function(_0x160dbd){return request(_0x3f30('0x1a'),{'options':{'where':{'id':_0x160dbd},'attributes':[_0x3f30('0x1b')]}});};exports[_0x3f30('0x1c')]=function(_0x54e618){return request(_0x3f30('0x1d'),{'options':{'raw':![],'where':{'id':_0x54e618},'include':[{'model':_0x3f30('0x1e'),'as':_0x3f30('0x1f')}]}});};exports[_0x3f30('0x20')]=function(_0xb452d){return request(_0x3f30('0x21'),{'options':{'where':{'id':_0xb452d},'attributes':['id','name']}});};exports[_0x3f30('0x22')]=function(_0x102bfa){return request('CreateSmsMessage',{'body':_0x102bfa});};exports['createSquareDetailsReport']=function(_0x2f3228){return request(_0x3f30('0x23'),{'body':_0x2f3228});};exports[_0x3f30('0x24')]=function(_0x2ac13b){return request('CreateSquareReport',{'body':_['merge'](_0x2ac13b,{'project_name':_0x2ac13b[_0x3f30('0x25')],'prev_project_name':_0x2ac13b[_0x3f30('0x26')]||'','is_subproject':_0x2ac13b[_0x3f30('0x26')]?!![]:![],'leaveAt':moment()[_0x3f30('0x27')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports[_0x3f30('0x28')]=function(_0x4ed791){return request(_0x3f30('0x29'),{'body':_0x4ed791});};exports[_0x3f30('0x2a')]=function(_0x458f17){return request(_0x3f30('0x2b'),{'body':_0x458f17});};exports[_0x3f30('0x2c')]=function(_0x571ad1){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x571ad1['phone'],'ListId':_0x571ad1[_0x3f30('0x2d')]}}})['then'](function(_0xbde623){if(_0xbde623){return _0xbde623;}return request(_0x3f30('0x2e'),{'body':_0x571ad1});});};exports[_0x3f30('0x2f')]=function(_0x5d5e80){return request('ShowPause',{'options':{'where':{'id':_0x5d5e80},'attributes':['name']}});};exports[_0x3f30('0x30')]=function(_0x87d8cc,_0x1440f7){return request('LoginUser',{'body':{'interface':_0x1440f7},'options':{'where':_0x87d8cc}});};exports[_0x3f30('0x31')]=function(_0x38bdcd,_0x454cad,_0x4316ea){return request(_0x3f30('0x32'),{'body':{'type':_0x454cad,'uniqueid':_0x4316ea},'options':{'where':_0x38bdcd}});};exports[_0x3f30('0x33')]=function(_0x526317){return request('UnpauseUser',{'body':{},'options':{'where':_0x526317}});};exports['agentLogout']=function(_0x43dfc5){return request(_0x3f30('0x34'),{'body':{},'options':{'where':_0x43dfc5}});};
\ No newline at end of file
+var _0xff25=['http','request','then','message','result','catch','getSquareProject','production','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','name','email','getSquareProjectById','ShowSquareProject','getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','ShowUser','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Interval','Intervals','ShowSmsAccount','createSmsMessage','createSquareDetailsReport','createSquareReport','CreateSquareReport','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','CreateSquareMessage','createCmContact','ShowCmHopper','CreateCmContact','ShowPause','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','bluebird','moment','lodash','util','jayson/promise','client'];(function(_0x1138c5,_0x2d6eb9){var _0x352cb3=function(_0x45f6e4){while(--_0x45f6e4){_0x1138c5['push'](_0x1138c5['shift']());}};_0x352cb3(++_0x2d6eb9);}(_0xff25,0x190));var _0x5ff2=function(_0x6b6b71,_0x26dda3){_0x6b6b71=_0x6b6b71-0x0;var _0x12ccb9=_0xff25[_0x6b6b71];return _0x12ccb9;};'use strict';var BPromise=require(_0x5ff2('0x0'));var moment=require(_0x5ff2('0x1'));var _=require(_0x5ff2('0x2'));var util=require(_0x5ff2('0x3'));var jayson=require(_0x5ff2('0x4'));var client=jayson[_0x5ff2('0x5')][_0x5ff2('0x6')]({'port':0x2329});function request(_0x381301,_0x2e7773){return new BPromise(function(_0x2f7ec6,_0x1caaad){return client[_0x5ff2('0x7')](_0x381301,_0x2e7773)[_0x5ff2('0x8')](function(_0x435954){if(_0x435954['error']){return _0x1caaad(_0x435954['error'][_0x5ff2('0x9')]);}else{return _0x2f7ec6(_0x435954[_0x5ff2('0xa')]);}})[_0x5ff2('0xb')](function(_0x1716ff){return _0x1caaad(_0x1716ff);});});}exports[_0x5ff2('0xc')]=function(_0x44c107){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x44c107},'attributes':[_0x5ff2('0xd')]}});};exports[_0x5ff2('0xe')]=function(_0x971a1f){return request(_0x5ff2('0xf'),{'options':{'raw':![],'where':{'id':_0x971a1f},'include':[{'model':_0x5ff2('0x10'),'as':_0x5ff2('0x11')}],'attributes':['id',_0x5ff2('0x12'),_0x5ff2('0x13')]}});};exports[_0x5ff2('0x14')]=function(_0x72b5e5){return request(_0x5ff2('0x15'),{'options':{'where':{'id':_0x72b5e5},'attributes':[_0x5ff2('0x12')]}});};exports[_0x5ff2('0x16')]=function(_0x19362f){return request(_0x5ff2('0x17'),{'options':{'where':{'id':_0x19362f},'attributes':[_0x5ff2('0x12')]}});};exports[_0x5ff2('0x18')]=function(_0x1e978c){return request(_0x5ff2('0x19'),{'options':{'where':{'id':_0x1e978c},'attributes':['name']}});};exports[_0x5ff2('0x1a')]=function(_0x1dec30){return request(_0x5ff2('0x1b'),{'options':{'where':{'id':_0x1dec30},'attributes':[_0x5ff2('0x1c')]}});};exports[_0x5ff2('0x1d')]=function(_0x310f7e){return request(_0x5ff2('0x1e'),{'options':{'where':{'id':_0x310f7e},'attributes':[_0x5ff2('0x12')]}});};exports[_0x5ff2('0x1f')]=function(_0x1bba2f){return request(_0x5ff2('0x20'),{'options':{'where':{'id':_0x1bba2f},'attributes':[_0x5ff2('0x12')]}});};exports[_0x5ff2('0x21')]=function(_0x13736f){return request(_0x5ff2('0x22'),{'options':{'where':{'id':_0x13736f},'attributes':[_0x5ff2('0x23')]}});};exports[_0x5ff2('0x24')]=function(_0x415255){return request(_0x5ff2('0x25'),{'options':{'raw':![],'where':{'id':_0x415255},'include':[{'model':_0x5ff2('0x26'),'as':_0x5ff2('0x27')}]}});};exports['getSmsAccountById']=function(_0x3b5216){return request(_0x5ff2('0x28'),{'options':{'where':{'id':_0x3b5216},'attributes':['id',_0x5ff2('0x12')]}});};exports[_0x5ff2('0x29')]=function(_0x17d76d){return request('CreateSmsMessage',{'body':_0x17d76d});};exports[_0x5ff2('0x2a')]=function(_0x29842f){return request('CreateSquareDetailsReport',{'body':_0x29842f});};exports[_0x5ff2('0x2b')]=function(_0xb99364){return request(_0x5ff2('0x2c'),{'body':_['merge'](_0xb99364,{'project_name':_0xb99364['arg_1'],'prev_project_name':_0xb99364[_0x5ff2('0x2d')]||'','is_subproject':_0xb99364[_0x5ff2('0x2d')]?!![]:![],'leaveAt':moment()[_0x5ff2('0x2e')](_0x5ff2('0x2f'))})});};exports['createSquareRecording']=function(_0x2dda21){return request('CreateSquareRecording',{'body':_0x2dda21});};exports['createSquareMessage']=function(_0x524799){return request(_0x5ff2('0x30'),{'body':_0x524799});};exports[_0x5ff2('0x31')]=function(_0x47fb7a){return request(_0x5ff2('0x32'),{'options':{'raw':![],'where':{'phone':_0x47fb7a['phone'],'ListId':_0x47fb7a['ListId']}}})[_0x5ff2('0x8')](function(_0x21409d){if(_0x21409d){return _0x21409d;}return request(_0x5ff2('0x33'),{'body':_0x47fb7a});});};exports['getPauseById']=function(_0x2fc1b1){return request(_0x5ff2('0x34'),{'options':{'where':{'id':_0x2fc1b1},'attributes':[_0x5ff2('0x12')]}});};exports['agentLogin']=function(_0x344d13,_0x263215){return request('LoginUser',{'body':{'interface':_0x263215},'options':{'where':_0x344d13}});};exports[_0x5ff2('0x35')]=function(_0xf8cf27,_0x533e60,_0x544eb4){return request(_0x5ff2('0x36'),{'body':{'type':_0x533e60,'uniqueid':_0x544eb4},'options':{'where':_0xf8cf27}});};exports[_0x5ff2('0x37')]=function(_0x32e0e6){return request(_0x5ff2('0x38'),{'body':{},'options':{'where':_0x32e0e6}});};exports[_0x5ff2('0x39')]=function(_0x123c6a){return request('LogoutUser',{'body':{},'options':{'where':_0x123c6a}});};
\ No newline at end of file