Built motion from commit 7158bc59.|2.5.42
[motion2.git] / server / services / agi / rpc / index.js
index f8047fb..42644cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e45=['getIntervalById','ShowInterval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','createCmContact','phone','ListId','CreateCmContact','agentLogin','agentPause','PauseUser','agentUnpause','agentLogout','bluebird','moment','lodash','util','jayson/promise','client','http','request','then','error','result','catch','getSquareProject','ShowSquareProject','production','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','name','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','ShowVariable','ShowSquareOdbc','dsn','getUserById','ShowUser','getSoundById','ShowSound','save_name'];(function(_0x16b0bd,_0x1731a3){var _0x5c30a3=function(_0x3972d4){while(--_0x3972d4){_0x16b0bd['push'](_0x16b0bd['shift']());}};_0x5c30a3(++_0x1731a3);}(_0x6e45,0x1b9));var _0x56e4=function(_0x12c9be,_0xe23d5){_0x12c9be=_0x12c9be-0x0;var _0x4b4fcf=_0x6e45[_0x12c9be];return _0x4b4fcf;};'use strict';var BPromise=require(_0x56e4('0x0'));var moment=require(_0x56e4('0x1'));var _=require(_0x56e4('0x2'));var util=require(_0x56e4('0x3'));var jayson=require(_0x56e4('0x4'));var client=jayson[_0x56e4('0x5')][_0x56e4('0x6')]({'port':0x2329});function request(_0x3b62db,_0x568f9e){return new BPromise(function(_0x3d5d54,_0x279541){return client[_0x56e4('0x7')](_0x3b62db,_0x568f9e)[_0x56e4('0x8')](function(_0x428a5e){if(_0x428a5e[_0x56e4('0x9')]){return _0x279541(_0x428a5e['error']['message']);}else{return _0x3d5d54(_0x428a5e[_0x56e4('0xa')]);}})[_0x56e4('0xb')](function(_0x2a7d55){return _0x279541(_0x2a7d55);});});}exports[_0x56e4('0xc')]=function(_0x266405){return request(_0x56e4('0xd'),{'options':{'raw':![],'where':{'name':_0x266405},'attributes':[_0x56e4('0xe')]}});};exports[_0x56e4('0xf')]=function(_0x25f28d){return request(_0x56e4('0x10'),{'options':{'raw':![],'where':{'id':_0x25f28d},'include':[{'model':_0x56e4('0x11'),'as':_0x56e4('0x12')}],'attributes':['id',_0x56e4('0x13'),'email']}});};exports[_0x56e4('0x14')]=function(_0x3db180){return request(_0x56e4('0xd'),{'options':{'where':{'id':_0x3db180},'attributes':['name']}});};exports[_0x56e4('0x15')]=function(_0xe33152){return request(_0x56e4('0x16'),{'options':{'where':{'id':_0xe33152},'attributes':[_0x56e4('0x13')]}});};exports['getVariableById']=function(_0x2d4ff5){return request(_0x56e4('0x17'),{'options':{'where':{'id':_0x2d4ff5},'attributes':['name']}});};exports['getSquareOdbcById']=function(_0x4a52e0){return request(_0x56e4('0x18'),{'options':{'where':{'id':_0x4a52e0},'attributes':[_0x56e4('0x19')]}});};exports[_0x56e4('0x1a')]=function(_0x4e853a){return request(_0x56e4('0x1b'),{'options':{'where':{'id':_0x4e853a},'attributes':[_0x56e4('0x13')]}});};exports['getTrunkById']=function(_0x25e755){return request('ShowTrunk',{'options':{'where':{'id':_0x25e755},'attributes':[_0x56e4('0x13')]}});};exports[_0x56e4('0x1c')]=function(_0x382fda){return request(_0x56e4('0x1d'),{'options':{'where':{'id':_0x382fda},'attributes':[_0x56e4('0x1e')]}});};exports[_0x56e4('0x1f')]=function(_0xb3bed7){return request(_0x56e4('0x20'),{'options':{'raw':![],'where':{'id':_0xb3bed7},'include':[{'model':'Interval','as':_0x56e4('0x21')}]}});};exports[_0x56e4('0x22')]=function(_0x4c1764){return request(_0x56e4('0x23'),{'options':{'where':{'id':_0x4c1764},'attributes':['id',_0x56e4('0x13')]}});};exports[_0x56e4('0x24')]=function(_0x295fec){return request(_0x56e4('0x25'),{'body':_0x295fec});};exports[_0x56e4('0x26')]=function(_0x2dd4b1){return request(_0x56e4('0x27'),{'body':_0x2dd4b1});};exports[_0x56e4('0x28')]=function(_0x194a1e){return request(_0x56e4('0x29'),{'body':_[_0x56e4('0x2a')](_0x194a1e,{'project_name':_0x194a1e[_0x56e4('0x2b')],'prev_project_name':_0x194a1e[_0x56e4('0x2c')]||'','is_subproject':_0x194a1e[_0x56e4('0x2c')]?!![]:![],'leaveAt':moment()[_0x56e4('0x2d')](_0x56e4('0x2e'))})});};exports[_0x56e4('0x2f')]=function(_0x48cac9){return request(_0x56e4('0x30'),{'body':_0x48cac9});};exports[_0x56e4('0x31')]=function(_0x2c68cc){return request('CreateSquareMessage',{'body':_0x2c68cc});};exports[_0x56e4('0x32')]=function(_0x5f122c){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x5f122c[_0x56e4('0x33')],'ListId':_0x5f122c[_0x56e4('0x34')]}}})[_0x56e4('0x8')](function(_0x443164){if(_0x443164){return _0x443164;}return request(_0x56e4('0x35'),{'body':_0x5f122c});});};exports['getPauseById']=function(_0x25aea6){return request('ShowPause',{'options':{'where':{'id':_0x25aea6},'attributes':[_0x56e4('0x13')]}});};exports[_0x56e4('0x36')]=function(_0x547f78,_0x200725){return request('LoginUser',{'body':{'interface':_0x200725},'options':{'where':_0x547f78}});};exports[_0x56e4('0x37')]=function(_0x3ecb00,_0x2ace6f,_0xaac61a){return request(_0x56e4('0x38'),{'body':{'type':_0x2ace6f,'uniqueid':_0xaac61a},'options':{'where':_0x3ecb00}});};exports[_0x56e4('0x39')]=function(_0x4b92c2){return request('UnpauseUser',{'body':{},'options':{'where':_0x4b92c2}});};exports[_0x56e4('0x3a')]=function(_0x2ba4f0){return request('LogoutUser',{'body':{},'options':{'where':_0x2ba4f0}});};
\ No newline at end of file
+var _0xa131=['CreateCmContact','getPauseById','agentLogin','LoginUser','agentPause','PauseUser','UnpauseUser','agentLogout','LogoutUser','moment','lodash','util','client','http','request','then','error','message','result','getSquareProject','production','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','email','getSquareProjectById','name','getVoiceQueueById','getSquareOdbcById','ShowSquareOdbc','dsn','getTrunkById','ShowSound','save_name','getIntervalById','Interval','Intervals','ShowSmsAccount','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','CreateSquareReport','merge','arg_1','arg_2','format','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','phone','ListId'];(function(_0x53d729,_0x1a2198){var _0x568f90=function(_0x48bd5b){while(--_0x48bd5b){_0x53d729['push'](_0x53d729['shift']());}};_0x568f90(++_0x1a2198);}(_0xa131,0x117));var _0x1a13=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xa131[_0x4cf98e];return _0x1623ac;};'use strict';var BPromise=require('bluebird');var moment=require(_0x1a13('0x0'));var _=require(_0x1a13('0x1'));var util=require(_0x1a13('0x2'));var jayson=require('jayson/promise');var client=jayson[_0x1a13('0x3')][_0x1a13('0x4')]({'port':0x2329});function request(_0xef4257,_0x3439d4){return new BPromise(function(_0x46c5c1,_0x1e13b0){return client[_0x1a13('0x5')](_0xef4257,_0x3439d4)[_0x1a13('0x6')](function(_0x563b78){if(_0x563b78['error']){return _0x1e13b0(_0x563b78[_0x1a13('0x7')][_0x1a13('0x8')]);}else{return _0x46c5c1(_0x563b78[_0x1a13('0x9')]);}})['catch'](function(_0x574c09){return _0x1e13b0(_0x574c09);});});}exports[_0x1a13('0xa')]=function(_0x131a94){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x131a94},'attributes':[_0x1a13('0xb')]}});};exports[_0x1a13('0xc')]=function(_0x11fafd){return request(_0x1a13('0xd'),{'options':{'raw':![],'where':{'id':_0x11fafd},'include':[{'model':_0x1a13('0xe'),'as':_0x1a13('0xf')}],'attributes':['id','name',_0x1a13('0x10')]}});};exports[_0x1a13('0x11')]=function(_0x1b7b4c){return request('ShowSquareProject',{'options':{'where':{'id':_0x1b7b4c},'attributes':[_0x1a13('0x12')]}});};exports[_0x1a13('0x13')]=function(_0x18fbfc){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x18fbfc},'attributes':[_0x1a13('0x12')]}});};exports['getVariableById']=function(_0x47ab13){return request('ShowVariable',{'options':{'where':{'id':_0x47ab13},'attributes':[_0x1a13('0x12')]}});};exports[_0x1a13('0x14')]=function(_0x166847){return request(_0x1a13('0x15'),{'options':{'where':{'id':_0x166847},'attributes':[_0x1a13('0x16')]}});};exports['getUserById']=function(_0x5baaf7){return request('ShowUser',{'options':{'where':{'id':_0x5baaf7},'attributes':[_0x1a13('0x12')]}});};exports[_0x1a13('0x17')]=function(_0x3c2a6d){return request('ShowTrunk',{'options':{'where':{'id':_0x3c2a6d},'attributes':[_0x1a13('0x12')]}});};exports['getSoundById']=function(_0x4ca8db){return request(_0x1a13('0x18'),{'options':{'where':{'id':_0x4ca8db},'attributes':[_0x1a13('0x19')]}});};exports[_0x1a13('0x1a')]=function(_0x55967b){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x55967b},'include':[{'model':_0x1a13('0x1b'),'as':_0x1a13('0x1c')}]}});};exports['getSmsAccountById']=function(_0x1e3332){return request(_0x1a13('0x1d'),{'options':{'where':{'id':_0x1e3332},'attributes':['id',_0x1a13('0x12')]}});};exports['createSmsMessage']=function(_0x438f98){return request(_0x1a13('0x1e'),{'body':_0x438f98});};exports[_0x1a13('0x1f')]=function(_0x1e2972){return request(_0x1a13('0x20'),{'body':_0x1e2972});};exports['createSquareReport']=function(_0x357029){return request(_0x1a13('0x21'),{'body':_[_0x1a13('0x22')](_0x357029,{'project_name':_0x357029[_0x1a13('0x23')],'prev_project_name':_0x357029[_0x1a13('0x24')]||'','is_subproject':_0x357029[_0x1a13('0x24')]?!![]:![],'leaveAt':moment()[_0x1a13('0x25')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports['createSquareRecording']=function(_0x17dcb4){return request(_0x1a13('0x26'),{'body':_0x17dcb4});};exports[_0x1a13('0x27')]=function(_0x9af236){return request(_0x1a13('0x28'),{'body':_0x9af236});};exports[_0x1a13('0x29')]=function(_0x5eadb1){return request(_0x1a13('0x2a'),{'options':{'raw':![],'where':{'phone':_0x5eadb1[_0x1a13('0x2b')],'ListId':_0x5eadb1[_0x1a13('0x2c')]}}})[_0x1a13('0x6')](function(_0x2d0a41){if(_0x2d0a41){return _0x2d0a41;}return request(_0x1a13('0x2d'),{'body':_0x5eadb1});});};exports[_0x1a13('0x2e')]=function(_0x12c7dd){return request('ShowPause',{'options':{'where':{'id':_0x12c7dd},'attributes':[_0x1a13('0x12')]}});};exports[_0x1a13('0x2f')]=function(_0xedafc4,_0x25779d){return request(_0x1a13('0x30'),{'body':{'interface':_0x25779d},'options':{'where':_0xedafc4}});};exports[_0x1a13('0x31')]=function(_0x9a3ed4,_0x1acd36,_0x21665e){return request(_0x1a13('0x32'),{'body':{'type':_0x1acd36,'uniqueid':_0x21665e},'options':{'where':_0x9a3ed4}});};exports['agentUnpause']=function(_0x284891){return request(_0x1a13('0x33'),{'body':{},'options':{'where':_0x284891}});};exports[_0x1a13('0x34')]=function(_0x1f5e2d){return request(_0x1a13('0x35'),{'body':{},'options':{'where':_0x1f5e2d}});};
\ No newline at end of file