Built motion from commit 64a6f4bc.|2.6.26
[motion2.git] / server / services / agi / rpc / index.js
index b50156c..a753ee4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x956a=['agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','moment','jayson/promise','client','http','error','result','catch','getSquareProjects','GetSquareProjects','name','production','ShowSquareProject','getMailAccountById','Smtp','CloudProvider','email','getSquareProjectById','getVoiceQueueById','getVariableById','dsn','getUserById','ShowUser','getContactByPhone','phone','getTrunkById','ShowTrunk','ShowSound','save_name','getIntervalById','ShowInterval','Interval','Intervals','getSmsAccountById','ShowSmsAccount','CreateSmsMessage','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','then','CreateCmContact','getPauseById','agentLogin','LoginUser'];(function(_0xdc0397,_0x20d1f1){var _0x553d02=function(_0x364781){while(--_0x364781){_0xdc0397['push'](_0xdc0397['shift']());}};_0x553d02(++_0x20d1f1);}(_0x956a,0xb6));var _0xa956=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x956a[_0x21a9d9];return _0x46adce;};'use strict';var _=require('lodash');var moment=require(_0xa956('0x0'));var jayson=require(_0xa956('0x1'));var client=jayson[_0xa956('0x2')][_0xa956('0x3')]({'port':0x2329});function request(_0x12daaa,_0x24b6c4){return new Promise(function(_0x331696,_0x38c808){return client['request'](_0x12daaa,_0x24b6c4)['then'](function(_0x283ac0){if(_0x283ac0[_0xa956('0x4')]){return _0x38c808(_0x283ac0[_0xa956('0x4')]['message']);}else{return _0x331696(_0x283ac0[_0xa956('0x5')]);}})[_0xa956('0x6')](function(_0x1265dd){return _0x38c808(_0x1265dd);});});}exports[_0xa956('0x7')]=function(){return request(_0xa956('0x8'),{'options':{'raw':![],'attributes':['id',_0xa956('0x9'),_0xa956('0xa')]}});};exports['getSquareProject']=function(_0x1b5e23){return request(_0xa956('0xb'),{'options':{'raw':![],'where':{'name':_0x1b5e23},'attributes':['production']}});};exports[_0xa956('0xc')]=function(_0x10b1b0){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x10b1b0},'include':[{'model':'MailServerOut','as':_0xa956('0xd'),'include':[{'model':_0xa956('0xe'),'as':_0xa956('0xe')}]}],'attributes':['id','name',_0xa956('0xf')],'smtp':!![]}});};exports[_0xa956('0x10')]=function(_0x21d323){return request('ShowSquareProject',{'options':{'where':{'id':_0x21d323},'attributes':['name']}});};exports[_0xa956('0x11')]=function(_0x48ac9f){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x48ac9f},'attributes':[_0xa956('0x9')]}});};exports[_0xa956('0x12')]=function(_0x2044d2){return request('ShowVariable',{'options':{'where':{'id':_0x2044d2},'attributes':['name']}});};exports['getSquareOdbcById']=function(_0x1e74d4){return request('ShowSquareOdbc',{'options':{'where':{'id':_0x1e74d4},'attributes':[_0xa956('0x13')]}});};exports[_0xa956('0x14')]=function(_0x5681ce){return request(_0xa956('0x15'),{'options':{'where':{'id':_0x5681ce},'attributes':[_0xa956('0x9')]}});};exports[_0xa956('0x16')]=function(_0x5c7baf){return request('GetContactByPhone',{'options':{'where':{'phone':_0x5c7baf[_0xa956('0x17')]},'attributes':['id']}});};exports[_0xa956('0x18')]=function(_0x2b23bc){return request(_0xa956('0x19'),{'options':{'where':{'id':_0x2b23bc},'attributes':['name']}});};exports['getSoundById']=function(_0x4ae9ef){return request(_0xa956('0x1a'),{'options':{'where':{'id':_0x4ae9ef},'attributes':[_0xa956('0x1b')]}});};exports[_0xa956('0x1c')]=function(_0x2af038){return request(_0xa956('0x1d'),{'options':{'raw':![],'where':{'id':_0x2af038},'include':[{'model':_0xa956('0x1e'),'as':_0xa956('0x1f')}]}});};exports[_0xa956('0x20')]=function(_0x450ab7){return request(_0xa956('0x21'),{'options':{'where':{'id':_0x450ab7},'attributes':['id',_0xa956('0x9')]}});};exports['createSmsMessage']=function(_0x1d7fd9){return request(_0xa956('0x22'),{'body':_0x1d7fd9});};exports['createSquareDetailsReport']=function(_0xc59ab0){return request(_0xa956('0x23'),{'body':_0xc59ab0});};exports[_0xa956('0x24')]=function(_0x238d16){return request(_0xa956('0x25'),{'body':_['merge'](_0x238d16,{'project_name':_0x238d16[_0xa956('0x26')],'prev_project_name':_0x238d16[_0xa956('0x27')]||'','is_subproject':_0x238d16[_0xa956('0x27')]?!![]:![],'leaveAt':moment()[_0xa956('0x28')](_0xa956('0x29'))})});};exports[_0xa956('0x2a')]=function(_0x443877){return request(_0xa956('0x2b'),{'body':_0x443877});};exports[_0xa956('0x2c')]=function(_0x4ae8bb){return request(_0xa956('0x2d'),{'body':_0x4ae8bb});};exports[_0xa956('0x2e')]=function(_0x1f5005){return request(_0xa956('0x2f'),{'options':{'raw':![],'where':{'phone':_0x1f5005[_0xa956('0x17')],'ListId':_0x1f5005[_0xa956('0x30')]}}})[_0xa956('0x31')](function(_0x1c43c6){if(_0x1c43c6){return _0x1c43c6;}return request(_0xa956('0x32'),{'body':_0x1f5005});});};exports[_0xa956('0x33')]=function(_0x52288c){return request('ShowPause',{'options':{'where':{'id':_0x52288c},'attributes':[_0xa956('0x9')]}});};exports[_0xa956('0x34')]=function(_0x561ef8,_0x5aaabc){return request(_0xa956('0x35'),{'body':{'interface':_0x5aaabc},'options':{'where':_0x561ef8}});};exports[_0xa956('0x36')]=function(_0x3386dc,_0x462e21,_0x41e442){return request(_0xa956('0x37'),{'body':{'type':_0x462e21,'uniqueid':_0x41e442},'options':{'where':_0x3386dc}});};exports[_0xa956('0x38')]=function(_0x33b13a){return request(_0xa956('0x39'),{'body':{},'options':{'where':_0x33b13a}});};exports[_0xa956('0x3a')]=function(_0x568245){return request('LogoutUser',{'body':{},'options':{'where':_0x568245}});};
\ No newline at end of file
+var _0xd493=['getSquareProject','ShowSquareProject','getMailAccountById','ShowMailAccount','Smtp','CloudProvider','email','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','getContactByPhone','GetContactByPhone','getTrunkById','ShowTrunk','getSoundById','save_name','getIntervalById','ShowInterval','Interval','Intervals','ShowSmsAccount','createSmsMessage','createSquareDetailsReport','CreateSquareReport','merge','arg_1','arg_2','YYYY-MM-DD\x20HH:mm:ss','createSquareMessage','createCmContact','ShowCmHopper','phone','ListId','then','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','agentUnpause','UnpauseUser','lodash','jayson/promise','client','request','error','message','result','getSquareProjects','GetSquareProjects','name','production'];(function(_0x1fcd24,_0x2bc0f1){var _0x34f30f=function(_0x308b29){while(--_0x308b29){_0x1fcd24['push'](_0x1fcd24['shift']());}};_0x34f30f(++_0x2bc0f1);}(_0xd493,0x1bd));var _0x3d49=function(_0x48af02,_0xa58dcf){_0x48af02=_0x48af02-0x0;var _0xa8280a=_0xd493[_0x48af02];return _0xa8280a;};'use strict';var _=require(_0x3d49('0x0'));var moment=require('moment');var jayson=require(_0x3d49('0x1'));var client=jayson[_0x3d49('0x2')]['http']({'port':0x2329});function request(_0x4c751d,_0x4a877d){return new Promise(function(_0x58dce8,_0x439989){return client[_0x3d49('0x3')](_0x4c751d,_0x4a877d)['then'](function(_0x5905c6){if(_0x5905c6[_0x3d49('0x4')]){return _0x439989(_0x5905c6[_0x3d49('0x4')][_0x3d49('0x5')]);}else{return _0x58dce8(_0x5905c6[_0x3d49('0x6')]);}})['catch'](function(_0x3d2d14){return _0x439989(_0x3d2d14);});});}exports[_0x3d49('0x7')]=function(){return request(_0x3d49('0x8'),{'options':{'raw':![],'attributes':['id',_0x3d49('0x9'),_0x3d49('0xa')]}});};exports[_0x3d49('0xb')]=function(_0x3d347e){return request(_0x3d49('0xc'),{'options':{'raw':![],'where':{'name':_0x3d347e},'attributes':[_0x3d49('0xa')]}});};exports[_0x3d49('0xd')]=function(_0x5bac1c){return request(_0x3d49('0xe'),{'options':{'raw':![],'where':{'id':_0x5bac1c},'include':[{'model':'MailServerOut','as':_0x3d49('0xf'),'include':[{'model':_0x3d49('0x10'),'as':_0x3d49('0x10')}]}],'attributes':['id',_0x3d49('0x9'),_0x3d49('0x11')],'smtp':!![]}});};exports[_0x3d49('0x12')]=function(_0x423240){return request(_0x3d49('0xc'),{'options':{'where':{'id':_0x423240},'attributes':[_0x3d49('0x9')]}});};exports[_0x3d49('0x13')]=function(_0x342cf7){return request(_0x3d49('0x14'),{'options':{'where':{'id':_0x342cf7},'attributes':[_0x3d49('0x9')]}});};exports['getVariableById']=function(_0x143d42){return request(_0x3d49('0x15'),{'options':{'where':{'id':_0x143d42},'attributes':[_0x3d49('0x9')]}});};exports[_0x3d49('0x16')]=function(_0x1dc095){return request(_0x3d49('0x17'),{'options':{'where':{'id':_0x1dc095},'attributes':[_0x3d49('0x18')]}});};exports[_0x3d49('0x19')]=function(_0x7126d5){return request('ShowUser',{'options':{'where':{'id':_0x7126d5},'attributes':[_0x3d49('0x9')]}});};exports[_0x3d49('0x1a')]=function(_0x42d858){return request(_0x3d49('0x1b'),{'options':{'where':{'phone':_0x42d858['phone']},'attributes':['id']}});};exports[_0x3d49('0x1c')]=function(_0x46313e){return request(_0x3d49('0x1d'),{'options':{'where':{'id':_0x46313e},'attributes':['name']}});};exports[_0x3d49('0x1e')]=function(_0x51f17c){return request('ShowSound',{'options':{'where':{'id':_0x51f17c},'attributes':[_0x3d49('0x1f')]}});};exports[_0x3d49('0x20')]=function(_0x245d87){return request(_0x3d49('0x21'),{'options':{'raw':![],'where':{'id':_0x245d87},'include':[{'model':_0x3d49('0x22'),'as':_0x3d49('0x23')}]}});};exports['getSmsAccountById']=function(_0x29240e){return request(_0x3d49('0x24'),{'options':{'where':{'id':_0x29240e},'attributes':['id',_0x3d49('0x9')]}});};exports[_0x3d49('0x25')]=function(_0x2125ee){return request('CreateSmsMessage',{'body':_0x2125ee});};exports[_0x3d49('0x26')]=function(_0xed879c){return request('CreateSquareDetailsReport',{'body':_0xed879c});};exports['createSquareReport']=function(_0x1b87af){return request(_0x3d49('0x27'),{'body':_[_0x3d49('0x28')](_0x1b87af,{'project_name':_0x1b87af[_0x3d49('0x29')],'prev_project_name':_0x1b87af[_0x3d49('0x2a')]||'','is_subproject':_0x1b87af[_0x3d49('0x2a')]?!![]:![],'leaveAt':moment()['format'](_0x3d49('0x2b'))})});};exports['createSquareRecording']=function(_0x353f92){return request('CreateSquareRecording',{'body':_0x353f92});};exports[_0x3d49('0x2c')]=function(_0x1bc6d3){return request('CreateSquareMessage',{'body':_0x1bc6d3});};exports[_0x3d49('0x2d')]=function(_0x125b52){return request(_0x3d49('0x2e'),{'options':{'raw':![],'where':{'phone':_0x125b52[_0x3d49('0x2f')],'ListId':_0x125b52[_0x3d49('0x30')]}}})[_0x3d49('0x31')](function(_0xccc754){if(_0xccc754){return _0xccc754;}return request('CreateCmContact',{'body':_0x125b52});});};exports[_0x3d49('0x32')]=function(_0x2fb486){return request(_0x3d49('0x33'),{'options':{'where':{'id':_0x2fb486},'attributes':[_0x3d49('0x9')]}});};exports[_0x3d49('0x34')]=function(_0x1d90c4,_0x421aa4){return request(_0x3d49('0x35'),{'body':{'interface':_0x421aa4},'options':{'where':_0x1d90c4}});};exports[_0x3d49('0x36')]=function(_0x371eef,_0x2bfbdc,_0x28bb85){return request('PauseUser',{'body':{'type':_0x2bfbdc,'uniqueid':_0x28bb85},'options':{'where':_0x371eef}});};exports[_0x3d49('0x37')]=function(_0x4056c1){return request(_0x3d49('0x38'),{'body':{},'options':{'where':_0x4056c1}});};exports['agentLogout']=function(_0x450160){return request('LogoutUser',{'body':{},'options':{'where':_0x450160}});};
\ No newline at end of file