Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / services / agi / rpc / index.js
index a343e58..1186f50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed1a=['email','name','getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','ShowUser','GetContactByPhone','getTrunkById','ShowSound','save_name','ShowInterval','Interval','Intervals','ShowSmsAccount','CreateSmsMessage','CreateSquareDetailsReport','createSquareReport','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','CreateSquareRecording','phone','ListId','CreateCmContact','getPauseById','ShowPause','agentLogin','agentPause','PauseUser','agentUnpause','UnpauseUser','LogoutUser','bluebird','moment','lodash','util','jayson/promise','client','http','request','then','error','message','result','getSquareProject','ShowSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','Smtp'];(function(_0x455b2b,_0x2ce376){var _0xb41208=function(_0x3eec71){while(--_0x3eec71){_0x455b2b['push'](_0x455b2b['shift']());}};_0xb41208(++_0x2ce376);}(_0xed1a,0x1e6));var _0xaed1=function(_0x25f686,_0x199629){_0x25f686=_0x25f686-0x0;var _0x54ad10=_0xed1a[_0x25f686];return _0x54ad10;};'use strict';var BPromise=require(_0xaed1('0x0'));var moment=require(_0xaed1('0x1'));var _=require(_0xaed1('0x2'));var util=require(_0xaed1('0x3'));var jayson=require(_0xaed1('0x4'));var client=jayson[_0xaed1('0x5')][_0xaed1('0x6')]({'port':0x2329});function request(_0x5221e4,_0x4b513e){return new BPromise(function(_0x2fa594,_0x5438dc){return client[_0xaed1('0x7')](_0x5221e4,_0x4b513e)[_0xaed1('0x8')](function(_0x15e372){if(_0x15e372['error']){return _0x5438dc(_0x15e372[_0xaed1('0x9')][_0xaed1('0xa')]);}else{return _0x2fa594(_0x15e372[_0xaed1('0xb')]);}})['catch'](function(_0x197020){return _0x5438dc(_0x197020);});});}exports[_0xaed1('0xc')]=function(_0x1fbc39){return request(_0xaed1('0xd'),{'options':{'raw':![],'where':{'name':_0x1fbc39},'attributes':['production']}});};exports[_0xaed1('0xe')]=function(_0x43600f){return request(_0xaed1('0xf'),{'options':{'raw':![],'where':{'id':_0x43600f},'include':[{'model':_0xaed1('0x10'),'as':_0xaed1('0x11')}],'attributes':['id','name',_0xaed1('0x12')]}});};exports['getSquareProjectById']=function(_0x1bf860){return request(_0xaed1('0xd'),{'options':{'where':{'id':_0x1bf860},'attributes':[_0xaed1('0x13')]}});};exports[_0xaed1('0x14')]=function(_0x361fdf){return request(_0xaed1('0x15'),{'options':{'where':{'id':_0x361fdf},'attributes':['name']}});};exports[_0xaed1('0x16')]=function(_0x212366){return request(_0xaed1('0x17'),{'options':{'where':{'id':_0x212366},'attributes':['name']}});};exports[_0xaed1('0x18')]=function(_0xac46e4){return request(_0xaed1('0x19'),{'options':{'where':{'id':_0xac46e4},'attributes':[_0xaed1('0x1a')]}});};exports[_0xaed1('0x1b')]=function(_0x39b102){return request(_0xaed1('0x1c'),{'options':{'where':{'id':_0x39b102},'attributes':[_0xaed1('0x13')]}});};exports['getContactByPhone']=function(_0x11c656){return request(_0xaed1('0x1d'),{'options':{'where':{'phone':_0x11c656['phone']},'attributes':['id']}});};exports[_0xaed1('0x1e')]=function(_0x3e4279){return request('ShowTrunk',{'options':{'where':{'id':_0x3e4279},'attributes':[_0xaed1('0x13')]}});};exports['getSoundById']=function(_0x3c869e){return request(_0xaed1('0x1f'),{'options':{'where':{'id':_0x3c869e},'attributes':[_0xaed1('0x20')]}});};exports['getIntervalById']=function(_0x1a0fc2){return request(_0xaed1('0x21'),{'options':{'raw':![],'where':{'id':_0x1a0fc2},'include':[{'model':_0xaed1('0x22'),'as':_0xaed1('0x23')}]}});};exports['getSmsAccountById']=function(_0x1a92a9){return request(_0xaed1('0x24'),{'options':{'where':{'id':_0x1a92a9},'attributes':['id',_0xaed1('0x13')]}});};exports['createSmsMessage']=function(_0x32111a){return request(_0xaed1('0x25'),{'body':_0x32111a});};exports['createSquareDetailsReport']=function(_0x36b43f){return request(_0xaed1('0x26'),{'body':_0x36b43f});};exports[_0xaed1('0x27')]=function(_0x328f44){return request('CreateSquareReport',{'body':_['merge'](_0x328f44,{'project_name':_0x328f44[_0xaed1('0x28')],'prev_project_name':_0x328f44['arg_2']||'','is_subproject':_0x328f44[_0xaed1('0x29')]?!![]:![],'leaveAt':moment()[_0xaed1('0x2a')](_0xaed1('0x2b'))})});};exports['createSquareRecording']=function(_0x34888b){return request(_0xaed1('0x2c'),{'body':_0x34888b});};exports['createSquareMessage']=function(_0x28adeb){return request('CreateSquareMessage',{'body':_0x28adeb});};exports['createCmContact']=function(_0x19cbf4){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x19cbf4[_0xaed1('0x2d')],'ListId':_0x19cbf4[_0xaed1('0x2e')]}}})[_0xaed1('0x8')](function(_0x3da6ef){if(_0x3da6ef){return _0x3da6ef;}return request(_0xaed1('0x2f'),{'body':_0x19cbf4});});};exports[_0xaed1('0x30')]=function(_0x10992f){return request(_0xaed1('0x31'),{'options':{'where':{'id':_0x10992f},'attributes':['name']}});};exports[_0xaed1('0x32')]=function(_0x3e2d31,_0x2f6d03){return request('LoginUser',{'body':{'interface':_0x2f6d03},'options':{'where':_0x3e2d31}});};exports[_0xaed1('0x33')]=function(_0x306992,_0xaf9b77,_0x588ab1){return request(_0xaed1('0x34'),{'body':{'type':_0xaf9b77,'uniqueid':_0x588ab1},'options':{'where':_0x306992}});};exports[_0xaed1('0x35')]=function(_0xe4e04c){return request(_0xaed1('0x36'),{'body':{},'options':{'where':_0xe4e04c}});};exports['agentLogout']=function(_0x32672a){return request(_0xaed1('0x37'),{'body':{},'options':{'where':_0x32672a}});};
\ No newline at end of file
+var _0xe4d5=['ShowSquareOdbc','dsn','getUserById','ShowUser','getContactByPhone','phone','getTrunkById','getSoundById','save_name','getIntervalById','ShowInterval','Interval','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','arg_1','arg_2','format','createSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ListId','CreateCmContact','ShowPause','PauseUser','UnpauseUser','agentLogout','LogoutUser','bluebird','util','jayson/promise','client','http','request','then','error','message','result','getSquareProject','ShowSquareProject','production','getMailAccountById','MailServerOut','name','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById'];(function(_0x250264,_0x88940b){var _0x4cda8a=function(_0x2258d0){while(--_0x2258d0){_0x250264['push'](_0x250264['shift']());}};_0x4cda8a(++_0x88940b);}(_0xe4d5,0x89));var _0x5e4d=function(_0x18a378,_0x46dc75){_0x18a378=_0x18a378-0x0;var _0x23760a=_0xe4d5[_0x18a378];return _0x23760a;};'use strict';var BPromise=require(_0x5e4d('0x0'));var moment=require('moment');var _=require('lodash');var util=require(_0x5e4d('0x1'));var jayson=require(_0x5e4d('0x2'));var client=jayson[_0x5e4d('0x3')][_0x5e4d('0x4')]({'port':0x2329});function request(_0x412f7d,_0x2166e7){return new BPromise(function(_0x2d2837,_0xb63e4){return client[_0x5e4d('0x5')](_0x412f7d,_0x2166e7)[_0x5e4d('0x6')](function(_0x4659eb){if(_0x4659eb[_0x5e4d('0x7')]){return _0xb63e4(_0x4659eb[_0x5e4d('0x7')][_0x5e4d('0x8')]);}else{return _0x2d2837(_0x4659eb[_0x5e4d('0x9')]);}})['catch'](function(_0x58281a){return _0xb63e4(_0x58281a);});});}exports[_0x5e4d('0xa')]=function(_0x10cec8){return request(_0x5e4d('0xb'),{'options':{'raw':![],'where':{'name':_0x10cec8},'attributes':[_0x5e4d('0xc')]}});};exports[_0x5e4d('0xd')]=function(_0x593542){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x593542},'include':[{'model':_0x5e4d('0xe'),'as':'Smtp'}],'attributes':['id',_0x5e4d('0xf'),'email']}});};exports[_0x5e4d('0x10')]=function(_0x53d17e){return request(_0x5e4d('0xb'),{'options':{'where':{'id':_0x53d17e},'attributes':[_0x5e4d('0xf')]}});};exports[_0x5e4d('0x11')]=function(_0x19bb2c){return request(_0x5e4d('0x12'),{'options':{'where':{'id':_0x19bb2c},'attributes':['name']}});};exports[_0x5e4d('0x13')]=function(_0x4e806d){return request(_0x5e4d('0x14'),{'options':{'where':{'id':_0x4e806d},'attributes':['name']}});};exports[_0x5e4d('0x15')]=function(_0x529480){return request(_0x5e4d('0x16'),{'options':{'where':{'id':_0x529480},'attributes':[_0x5e4d('0x17')]}});};exports[_0x5e4d('0x18')]=function(_0x13b989){return request(_0x5e4d('0x19'),{'options':{'where':{'id':_0x13b989},'attributes':[_0x5e4d('0xf')]}});};exports[_0x5e4d('0x1a')]=function(_0x2b20b7){return request('GetContactByPhone',{'options':{'where':{'phone':_0x2b20b7[_0x5e4d('0x1b')]},'attributes':['id']}});};exports[_0x5e4d('0x1c')]=function(_0x538c75){return request('ShowTrunk',{'options':{'where':{'id':_0x538c75},'attributes':['name']}});};exports[_0x5e4d('0x1d')]=function(_0x166995){return request('ShowSound',{'options':{'where':{'id':_0x166995},'attributes':[_0x5e4d('0x1e')]}});};exports[_0x5e4d('0x1f')]=function(_0x2197ab){return request(_0x5e4d('0x20'),{'options':{'raw':![],'where':{'id':_0x2197ab},'include':[{'model':_0x5e4d('0x21'),'as':'Intervals'}]}});};exports[_0x5e4d('0x22')]=function(_0x23181d){return request(_0x5e4d('0x23'),{'options':{'where':{'id':_0x23181d},'attributes':['id',_0x5e4d('0xf')]}});};exports[_0x5e4d('0x24')]=function(_0x52c4cd){return request(_0x5e4d('0x25'),{'body':_0x52c4cd});};exports[_0x5e4d('0x26')]=function(_0x5d44b1){return request('CreateSquareDetailsReport',{'body':_0x5d44b1});};exports['createSquareReport']=function(_0x39bc9d){return request('CreateSquareReport',{'body':_['merge'](_0x39bc9d,{'project_name':_0x39bc9d[_0x5e4d('0x27')],'prev_project_name':_0x39bc9d[_0x5e4d('0x28')]||'','is_subproject':_0x39bc9d[_0x5e4d('0x28')]?!![]:![],'leaveAt':moment()[_0x5e4d('0x29')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports[_0x5e4d('0x2a')]=function(_0x350582){return request('CreateSquareRecording',{'body':_0x350582});};exports[_0x5e4d('0x2b')]=function(_0x2fc464){return request(_0x5e4d('0x2c'),{'body':_0x2fc464});};exports[_0x5e4d('0x2d')]=function(_0x21351c){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x21351c['phone'],'ListId':_0x21351c[_0x5e4d('0x2e')]}}})['then'](function(_0x434074){if(_0x434074){return _0x434074;}return request(_0x5e4d('0x2f'),{'body':_0x21351c});});};exports['getPauseById']=function(_0x500cc2){return request(_0x5e4d('0x30'),{'options':{'where':{'id':_0x500cc2},'attributes':[_0x5e4d('0xf')]}});};exports['agentLogin']=function(_0x51ee21,_0x5715cf){return request('LoginUser',{'body':{'interface':_0x5715cf},'options':{'where':_0x51ee21}});};exports['agentPause']=function(_0xe56433,_0x1048b1,_0x22cfef){return request(_0x5e4d('0x31'),{'body':{'type':_0x1048b1,'uniqueid':_0x22cfef},'options':{'where':_0xe56433}});};exports['agentUnpause']=function(_0x2089ca){return request(_0x5e4d('0x32'),{'body':{},'options':{'where':_0x2089ca}});};exports[_0x5e4d('0x33')]=function(_0x2f596d){return request(_0x5e4d('0x34'),{'body':{},'options':{'where':_0x2f596d}});};
\ No newline at end of file