Built motion from commit 42801a18.|2.6.28
[motion2.git] / server / services / agi / rpc / index.js
index db7ec1d..b18db3f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2cb=['getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','agentLogout','LogoutUser','moment','client','error','message','catch','getSquareProjects','production','getSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','CloudProvider','email','getSquareProjectById','ShowSquareProject','getVoiceQueueById','name','ShowVariable','getSquareOdbcById','ShowSquareOdbc','getUserById','ShowUser','getContactByPhone','GetContactByPhone','getTrunkById','ShowTrunk','getSoundById','ShowSound','getIntervalById','ShowInterval','Interval','getSmsAccountById','createSmsMessage','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','then','CreateCmContact'];(function(_0xc93926,_0x2d1292){var _0x30d7b0=function(_0x5133e6){while(--_0x5133e6){_0xc93926['push'](_0xc93926['shift']());}};_0x30d7b0(++_0x2d1292);}(_0xf2cb,0x130));var _0xbf2c=function(_0x40acd4,_0x1e2827){_0x40acd4=_0x40acd4-0x0;var _0x2c77a8=_0xf2cb[_0x40acd4];return _0x2c77a8;};'use strict';var _=require('lodash');var moment=require(_0xbf2c('0x0'));var jayson=require('jayson/promise');var client=jayson[_0xbf2c('0x1')]['http']({'port':0x2329});function request(_0x424f04,_0x5a97a1){return new Promise(function(_0x1ecb79,_0x41c649){return client['request'](_0x424f04,_0x5a97a1)['then'](function(_0x14b5e4){if(_0x14b5e4[_0xbf2c('0x2')]){return _0x41c649(_0x14b5e4[_0xbf2c('0x2')][_0xbf2c('0x3')]);}else{return _0x1ecb79(_0x14b5e4['result']);}})[_0xbf2c('0x4')](function(_0x584a08){return _0x41c649(_0x584a08);});});}exports[_0xbf2c('0x5')]=function(){return request('GetSquareProjects',{'options':{'raw':![],'attributes':['id','name',_0xbf2c('0x6')]}});};exports[_0xbf2c('0x7')]=function(_0xeb0e9d){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0xeb0e9d},'attributes':[_0xbf2c('0x6')]}});};exports[_0xbf2c('0x8')]=function(_0x2da108){return request(_0xbf2c('0x9'),{'options':{'raw':![],'where':{'id':_0x2da108},'include':[{'model':_0xbf2c('0xa'),'as':_0xbf2c('0xb'),'include':[{'model':_0xbf2c('0xc'),'as':_0xbf2c('0xc')}]}],'attributes':['id','name',_0xbf2c('0xd')],'smtp':!![]}});};exports[_0xbf2c('0xe')]=function(_0x1a8d23){return request(_0xbf2c('0xf'),{'options':{'where':{'id':_0x1a8d23},'attributes':['name']}});};exports[_0xbf2c('0x10')]=function(_0x5a160b){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x5a160b},'attributes':[_0xbf2c('0x11')]}});};exports['getVariableById']=function(_0x47df49){return request(_0xbf2c('0x12'),{'options':{'where':{'id':_0x47df49},'attributes':[_0xbf2c('0x11')]}});};exports[_0xbf2c('0x13')]=function(_0x334900){return request(_0xbf2c('0x14'),{'options':{'where':{'id':_0x334900},'attributes':['dsn']}});};exports[_0xbf2c('0x15')]=function(_0x5514b0){return request(_0xbf2c('0x16'),{'options':{'where':{'id':_0x5514b0},'attributes':[_0xbf2c('0x11')]}});};exports[_0xbf2c('0x17')]=function(_0x32a44d){return request(_0xbf2c('0x18'),{'options':{'where':{'phone':_0x32a44d['phone']},'attributes':['id']}});};exports[_0xbf2c('0x19')]=function(_0x1fbfe8){return request(_0xbf2c('0x1a'),{'options':{'where':{'id':_0x1fbfe8},'attributes':[_0xbf2c('0x11')]}});};exports[_0xbf2c('0x1b')]=function(_0x102cef){return request(_0xbf2c('0x1c'),{'options':{'where':{'id':_0x102cef},'attributes':['save_name']}});};exports[_0xbf2c('0x1d')]=function(_0x2a3adf){return request(_0xbf2c('0x1e'),{'options':{'raw':![],'where':{'id':_0x2a3adf},'include':[{'model':_0xbf2c('0x1f'),'as':'Intervals'}]}});};exports[_0xbf2c('0x20')]=function(_0x1f5515){return request('ShowSmsAccount',{'options':{'where':{'id':_0x1f5515},'attributes':['id',_0xbf2c('0x11')]}});};exports[_0xbf2c('0x21')]=function(_0x3f1cdb){return request('CreateSmsMessage',{'body':_0x3f1cdb});};exports['createSquareDetailsReport']=function(_0x31b070){return request(_0xbf2c('0x22'),{'body':_0x31b070});};exports[_0xbf2c('0x23')]=function(_0x2894ce){return request(_0xbf2c('0x24'),{'body':_[_0xbf2c('0x25')](_0x2894ce,{'project_name':_0x2894ce[_0xbf2c('0x26')],'prev_project_name':_0x2894ce['arg_2']||'','is_subproject':_0x2894ce['arg_2']?!![]:![],'leaveAt':moment()[_0xbf2c('0x27')](_0xbf2c('0x28'))})});};exports[_0xbf2c('0x29')]=function(_0x4314d6){return request(_0xbf2c('0x2a'),{'body':_0x4314d6});};exports[_0xbf2c('0x2b')]=function(_0x30ca){return request(_0xbf2c('0x2c'),{'body':_0x30ca});};exports[_0xbf2c('0x2d')]=function(_0x4f3191){return request(_0xbf2c('0x2e'),{'options':{'raw':![],'where':{'phone':_0x4f3191['phone'],'ListId':_0x4f3191[_0xbf2c('0x2f')]}}})[_0xbf2c('0x30')](function(_0x40e866){if(_0x40e866){return _0x40e866;}return request(_0xbf2c('0x31'),{'body':_0x4f3191});});};exports[_0xbf2c('0x32')]=function(_0x502943){return request(_0xbf2c('0x33'),{'options':{'where':{'id':_0x502943},'attributes':[_0xbf2c('0x11')]}});};exports[_0xbf2c('0x34')]=function(_0x13e238,_0x2cc8cb){return request(_0xbf2c('0x35'),{'body':{'interface':_0x2cc8cb},'options':{'where':_0x13e238}});};exports[_0xbf2c('0x36')]=function(_0x3462dd,_0x4d731d,_0x37cf35){return request(_0xbf2c('0x37'),{'body':{'type':_0x4d731d,'uniqueid':_0x37cf35},'options':{'where':_0x3462dd}});};exports[_0xbf2c('0x38')]=function(_0x5b93aa){return request('UnpauseUser',{'body':{},'options':{'where':_0x5b93aa}});};exports[_0xbf2c('0x39')]=function(_0x24e3cf){return request(_0xbf2c('0x3a'),{'body':{},'options':{'where':_0x24e3cf}});};
\ No newline at end of file
+var _0x402f=['then','CreateCmContact','ShowPause','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','lodash','jayson/promise','request','error','message','result','getSquareProjects','GetSquareProjects','name','production','getSquareProject','ShowSquareProject','getVoiceQueueById','ShowVoiceQueue','dsn','getUserById','ShowUser','getContactByPhone','GetContactByPhone','phone','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name','getIntervalById','ShowInterval','Intervals','ShowSmsAccount','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','arg_1','arg_2','format','CreateSquareRecording','createSquareMessage','CreateSquareMessage','ListId'];(function(_0x57411a,_0x59328f){var _0xd487ba=function(_0x2fb456){while(--_0x2fb456){_0x57411a['push'](_0x57411a['shift']());}};_0xd487ba(++_0x59328f);}(_0x402f,0x6f));var _0xf402=function(_0x45d570,_0xfd3b5c){_0x45d570=_0x45d570-0x0;var _0x37074d=_0x402f[_0x45d570];return _0x37074d;};'use strict';var _=require(_0xf402('0x0'));var moment=require('moment');var jayson=require(_0xf402('0x1'));var client=jayson['client']['http']({'port':0x2329});function request(_0x3ccbce,_0xe1847c){return new Promise(function(_0x86f726,_0x4a52b8){return client[_0xf402('0x2')](_0x3ccbce,_0xe1847c)['then'](function(_0x20c2cc){if(_0x20c2cc[_0xf402('0x3')]){return _0x4a52b8(_0x20c2cc[_0xf402('0x3')][_0xf402('0x4')]);}else{return _0x86f726(_0x20c2cc[_0xf402('0x5')]);}})['catch'](function(_0x4d1771){return _0x4a52b8(_0x4d1771);});});}exports[_0xf402('0x6')]=function(){return request(_0xf402('0x7'),{'options':{'raw':![],'attributes':['id',_0xf402('0x8'),_0xf402('0x9')]}});};exports[_0xf402('0xa')]=function(_0x298e44){return request(_0xf402('0xb'),{'options':{'raw':![],'where':{'name':_0x298e44},'attributes':[_0xf402('0x9')]}});};exports['getMailAccountById']=function(_0x120560){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x120560},'include':[{'model':'MailServerOut','as':'Smtp','include':[{'model':'CloudProvider','as':'CloudProvider'}]}],'attributes':['id',_0xf402('0x8'),'email'],'smtp':!![]}});};exports['getSquareProjectById']=function(_0x5d129b){return request(_0xf402('0xb'),{'options':{'where':{'id':_0x5d129b},'attributes':['name']}});};exports[_0xf402('0xc')]=function(_0xb3deb6){return request(_0xf402('0xd'),{'options':{'where':{'id':_0xb3deb6},'attributes':[_0xf402('0x8')]}});};exports['getVariableById']=function(_0x16767b){return request('ShowVariable',{'options':{'where':{'id':_0x16767b},'attributes':[_0xf402('0x8')]}});};exports['getSquareOdbcById']=function(_0x5cc240){return request('ShowSquareOdbc',{'options':{'where':{'id':_0x5cc240},'attributes':[_0xf402('0xe')]}});};exports[_0xf402('0xf')]=function(_0xd406bf){return request(_0xf402('0x10'),{'options':{'where':{'id':_0xd406bf},'attributes':[_0xf402('0x8')]}});};exports[_0xf402('0x11')]=function(_0x3ed3eb){return request(_0xf402('0x12'),{'options':{'where':{'phone':_0x3ed3eb[_0xf402('0x13')]},'attributes':['id']}});};exports[_0xf402('0x14')]=function(_0x5bb928){return request(_0xf402('0x15'),{'options':{'where':{'id':_0x5bb928},'attributes':[_0xf402('0x8')]}});};exports[_0xf402('0x16')]=function(_0xb47b61){return request(_0xf402('0x17'),{'options':{'where':{'id':_0xb47b61},'attributes':[_0xf402('0x18')]}});};exports[_0xf402('0x19')]=function(_0xf52248){return request(_0xf402('0x1a'),{'options':{'raw':![],'where':{'id':_0xf52248},'include':[{'model':'Interval','as':_0xf402('0x1b')}]}});};exports['getSmsAccountById']=function(_0x297a68){return request(_0xf402('0x1c'),{'options':{'where':{'id':_0x297a68},'attributes':['id',_0xf402('0x8')]}});};exports[_0xf402('0x1d')]=function(_0x20dca1){return request(_0xf402('0x1e'),{'body':_0x20dca1});};exports[_0xf402('0x1f')]=function(_0x28dce7){return request(_0xf402('0x20'),{'body':_0x28dce7});};exports[_0xf402('0x21')]=function(_0x3cbe98){return request(_0xf402('0x22'),{'body':_['merge'](_0x3cbe98,{'project_name':_0x3cbe98[_0xf402('0x23')],'prev_project_name':_0x3cbe98[_0xf402('0x24')]||'','is_subproject':_0x3cbe98[_0xf402('0x24')]?!![]:![],'leaveAt':moment()[_0xf402('0x25')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports['createSquareRecording']=function(_0x3e26d3){return request(_0xf402('0x26'),{'body':_0x3e26d3});};exports[_0xf402('0x27')]=function(_0xb7c8e4){return request(_0xf402('0x28'),{'body':_0xb7c8e4});};exports['createCmContact']=function(_0x39a38a){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x39a38a[_0xf402('0x13')],'ListId':_0x39a38a[_0xf402('0x29')]}}})[_0xf402('0x2a')](function(_0xb28d88){if(_0xb28d88){return _0xb28d88;}return request(_0xf402('0x2b'),{'body':_0x39a38a});});};exports['getPauseById']=function(_0xaeda0f){return request(_0xf402('0x2c'),{'options':{'where':{'id':_0xaeda0f},'attributes':[_0xf402('0x8')]}});};exports['agentLogin']=function(_0x4d86bd,_0x3ffab6){return request(_0xf402('0x2d'),{'body':{'interface':_0x3ffab6},'options':{'where':_0x4d86bd}});};exports[_0xf402('0x2e')]=function(_0x221d6d,_0x162cce,_0x4a593b){return request(_0xf402('0x2f'),{'body':{'type':_0x162cce,'uniqueid':_0x4a593b},'options':{'where':_0x221d6d}});};exports[_0xf402('0x30')]=function(_0x44aa26){return request(_0xf402('0x31'),{'body':{},'options':{'where':_0x44aa26}});};exports[_0xf402('0x32')]=function(_0x1bb9ae){return request('LogoutUser',{'body':{},'options':{'where':_0x1bb9ae}});};
\ No newline at end of file