Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / services / ami / trigger / integration / index.js
index df17163..20a8ab2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f54=['Configurations','data3','queue','routeId','outbound','log','EVENT\x20UNKNOWN','unmanaged','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','%s\x20account\x20#%s\x20not\x20found','util','./zendesk','./salesforce','./sugarcrm','./freshdesk','./desk','./vtiger','./servicenow','./dynamics365','./freshsales','zendesk','salesforce','sugarcrm','freshdesk','zoho','desk','vtiger','dynamics365','freshsales','exec','includes','data1','toLowerCase','data2'];(function(_0xadd567,_0xc48bf6){var _0x1cf3d4=function(_0x321196){while(--_0x321196){_0xadd567['push'](_0xadd567['shift']());}};_0x1cf3d4(++_0xc48bf6);}(_0x3f54,0xd2));var _0x43f5=function(_0x216d45,_0x4989fe){_0x216d45=_0x216d45-0x0;var _0xbaac0b=_0x3f54[_0x216d45];return _0xbaac0b;};'use strict';var _=require('lodash');var util=require(_0x43f5('0x0'));var zendesk=require(_0x43f5('0x1'));var salesforce=require(_0x43f5('0x2'));var sugarcrm=require(_0x43f5('0x3'));var freshdesk=require(_0x43f5('0x4'));var zoho=require('./zoho');var desk=require(_0x43f5('0x5'));var vtiger=require(_0x43f5('0x6'));var servicenow=require(_0x43f5('0x7'));var dynamics365=require(_0x43f5('0x8'));var freshsales=require(_0x43f5('0x9'));var integrations=[_0x43f5('0xa'),_0x43f5('0xb'),_0x43f5('0xc'),_0x43f5('0xd'),_0x43f5('0xe'),_0x43f5('0xf'),_0x43f5('0x10'),_0x43f5('0x11'),_0x43f5('0x12'),'servicenow'];exports[_0x43f5('0x13')]=function(_0x338028,_0x6b8fdc,_0x32f2c5,_0x22fbe1,_0x2c94c5,_0x2f0695){if(_0x32f2c5){if(_[_0x43f5('0x14')](integrations,_0x338028[_0x43f5('0x15')][_0x43f5('0x16')]())){try{var _0x240a02=null;var _0x25f84e='';var _0x2c80c9=_0x32f2c5[_0x338028[_0x43f5('0x15')][_0x43f5('0x16')]()];if(_0x2c80c9){var _0x4b89c9=_0x2c80c9[_0x338028[_0x43f5('0x17')]];if(_0x4b89c9){var _0x29f2dc=_['find'](_0x4b89c9[_0x43f5('0x18')],{'id':parseInt(_0x338028[_0x43f5('0x19')],0xa)});if(_0x29f2dc){if(_0x22fbe1){if(_0x2c94c5&&_0x6b8fdc[_0x43f5('0x1a')]){_0x25f84e=_0x43f5('0x1a');}else if(_0x6b8fdc[_0x43f5('0x1b')]){_0x25f84e=_0x43f5('0x1c');}else{console[_0x43f5('0x1d')](_0x43f5('0x1e'),_0x6b8fdc);}}else{_0x25f84e=_0x43f5('0x1f');}switch(_0x338028[_0x43f5('0x15')][_0x43f5('0x16')]()){case _0x43f5('0xa'):zendesk[_0x25f84e](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695);break;case'salesforce':salesforce[_0x25f84e](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695);break;case _0x43f5('0xc'):sugarcrm[_0x25f84e](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695);break;case _0x43f5('0xd'):freshdesk[_0x25f84e](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695);break;case _0x43f5('0xe'):zoho[_0x25f84e](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695);break;case _0x43f5('0xf'):desk[_0x25f84e](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695);break;case _0x43f5('0x10'):vtiger[_0x25f84e](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695);break;case _0x43f5('0x12'):freshsales['cs'](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695,_0x25f84e);break;case'servicenow':servicenow['cs'](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695,_0x25f84e);break;case _0x43f5('0x11'):dynamics365['cs'](_0x338028,_0x6b8fdc,_0x29f2dc,_0x22fbe1,_0x2c94c5,_0x4b89c9,_0x2f0695,_0x25f84e);break;default:console[_0x43f5('0x1d')](_0x43f5('0x20'));}}else{_0x240a02=require(_0x43f5('0x21'))(_0x338028[_0x43f5('0x15')][_0x43f5('0x16')]());_0x240a02[_0x43f5('0x22')](_0x43f5('0x23'),util[_0x43f5('0x24')](_0x43f5('0x25'),_0x338028[_0x43f5('0x15')]['toLowerCase'](),_0x338028[_0x43f5('0x19')]));}}else{_0x240a02=require(_0x43f5('0x21'))(_0x338028[_0x43f5('0x15')][_0x43f5('0x16')]());_0x240a02[_0x43f5('0x22')]('[EXEC]',util[_0x43f5('0x24')](_0x43f5('0x26'),_0x338028[_0x43f5('0x15')]['toLowerCase'](),_0x338028['data2']));}}else{}}catch(_0x327eaa){console['error'](_0x327eaa);}}}};
\ No newline at end of file
+var _0xccd1=['toLowerCase','data2','find','queue','routeId','log','EVENT\x20UNKNOWN','freshsales','servicenow','unknown\x20integration','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','data3','%s\x20account\x20#%s\x20not\x20found','lodash','./zendesk','./salesforce','./freshdesk','./desk','./vtiger','./servicenow','./freshsales','zendesk','salesforce','freshdesk','zoho','desk','vtiger','dynamics365','exec','includes','data1'];(function(_0x21a1a6,_0x1474bf){var _0x5cec0e=function(_0x13abb9){while(--_0x13abb9){_0x21a1a6['push'](_0x21a1a6['shift']());}};_0x5cec0e(++_0x1474bf);}(_0xccd1,0x1bc));var _0x1ccd=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xccd1[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x1ccd('0x0'));var util=require('util');var zendesk=require(_0x1ccd('0x1'));var salesforce=require(_0x1ccd('0x2'));var sugarcrm=require('./sugarcrm');var freshdesk=require(_0x1ccd('0x3'));var zoho=require('./zoho');var desk=require(_0x1ccd('0x4'));var vtiger=require(_0x1ccd('0x5'));var servicenow=require(_0x1ccd('0x6'));var dynamics365=require('./dynamics365');var freshsales=require(_0x1ccd('0x7'));var integrations=[_0x1ccd('0x8'),_0x1ccd('0x9'),'sugarcrm',_0x1ccd('0xa'),_0x1ccd('0xb'),_0x1ccd('0xc'),_0x1ccd('0xd'),_0x1ccd('0xe'),'freshsales','servicenow'];exports[_0x1ccd('0xf')]=function(_0x7793f4,_0x59953a,_0x4127d5,_0x162477,_0x31e9e4,_0x5c5851){if(_0x4127d5){if(_[_0x1ccd('0x10')](integrations,_0x7793f4[_0x1ccd('0x11')]['toLowerCase']())){try{var _0x29b416=null;var _0x4bbd8c='';var _0x591ac2=_0x4127d5[_0x7793f4[_0x1ccd('0x11')][_0x1ccd('0x12')]()];if(_0x591ac2){var _0x2f6f4e=_0x591ac2[_0x7793f4[_0x1ccd('0x13')]];if(_0x2f6f4e){var _0x15443d=_[_0x1ccd('0x14')](_0x2f6f4e['Configurations'],{'id':parseInt(_0x7793f4['data3'],0xa)});if(_0x15443d){if(_0x162477){if(_0x31e9e4&&_0x59953a[_0x1ccd('0x15')]){_0x4bbd8c=_0x1ccd('0x15');}else if(_0x59953a[_0x1ccd('0x16')]){_0x4bbd8c='outbound';}else{console[_0x1ccd('0x17')](_0x1ccd('0x18'),_0x59953a);}}else{_0x4bbd8c='unmanaged';}switch(_0x7793f4[_0x1ccd('0x11')]['toLowerCase']()){case _0x1ccd('0x8'):zendesk[_0x4bbd8c](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851);break;case _0x1ccd('0x9'):salesforce[_0x4bbd8c](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851);break;case'sugarcrm':sugarcrm[_0x4bbd8c](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851);break;case _0x1ccd('0xa'):freshdesk[_0x4bbd8c](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851);break;case'zoho':zoho[_0x4bbd8c](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851);break;case _0x1ccd('0xc'):desk[_0x4bbd8c](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851);break;case _0x1ccd('0xd'):vtiger[_0x4bbd8c](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851);break;case _0x1ccd('0x19'):freshsales['cs'](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851,_0x4bbd8c);break;case _0x1ccd('0x1a'):servicenow['cs'](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851,_0x4bbd8c);break;case _0x1ccd('0xe'):dynamics365['cs'](_0x7793f4,_0x59953a,_0x15443d,_0x162477,_0x31e9e4,_0x2f6f4e,_0x5c5851,_0x4bbd8c);break;default:console[_0x1ccd('0x17')](_0x1ccd('0x1b'));}}else{_0x29b416=require('../../../../config/logger')(_0x7793f4[_0x1ccd('0x11')][_0x1ccd('0x12')]());_0x29b416['error'](_0x1ccd('0x1c'),util[_0x1ccd('0x1d')](_0x1ccd('0x1e'),_0x7793f4['data1']['toLowerCase'](),_0x7793f4[_0x1ccd('0x1f')]));}}else{_0x29b416=require('../../../../config/logger')(_0x7793f4[_0x1ccd('0x11')][_0x1ccd('0x12')]());_0x29b416['error'](_0x1ccd('0x1c'),util[_0x1ccd('0x1d')](_0x1ccd('0x20'),_0x7793f4[_0x1ccd('0x11')][_0x1ccd('0x12')](),_0x7793f4[_0x1ccd('0x13')]));}}else{}}catch(_0x2ec58d){console['error'](_0x2ec58d);}}}};
\ No newline at end of file