Built motion from commit 1fa89557.|2.6.10
[motion2.git] / server / services / ami / trigger / integration / index.js
index b9ad57a..42742fb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbf2a=['toLowerCase','data2','Configurations','data3','queue','outbound','log','EVENT\x20UNKNOWN','unmanaged','salesforce','freshdesk','unknown\x20integration','error','format','../../../../config/logger','[EXEC]','lodash','util','./zendesk','./sugarcrm','./desk','./vtiger','./servicenow','./freshsales','zendesk','zoho','desk','vtiger','dynamics365','freshsales','servicenow','exec','includes','data1'];(function(_0x3c147b,_0xd62258){var _0x324d34=function(_0x544a33){while(--_0x544a33){_0x3c147b['push'](_0x3c147b['shift']());}};_0x324d34(++_0xd62258);}(_0xbf2a,0x1ec));var _0xabf2=function(_0x59118a,_0xb6849e){_0x59118a=_0x59118a-0x0;var _0x1600df=_0xbf2a[_0x59118a];return _0x1600df;};'use strict';var _=require(_0xabf2('0x0'));var util=require(_0xabf2('0x1'));var zendesk=require(_0xabf2('0x2'));var salesforce=require('./salesforce');var sugarcrm=require(_0xabf2('0x3'));var freshdesk=require('./freshdesk');var zoho=require('./zoho');var desk=require(_0xabf2('0x4'));var vtiger=require(_0xabf2('0x5'));var servicenow=require(_0xabf2('0x6'));var dynamics365=require('./dynamics365');var freshsales=require(_0xabf2('0x7'));var integrations=[_0xabf2('0x8'),'salesforce','sugarcrm','freshdesk',_0xabf2('0x9'),_0xabf2('0xa'),_0xabf2('0xb'),_0xabf2('0xc'),_0xabf2('0xd'),_0xabf2('0xe')];exports[_0xabf2('0xf')]=function(_0x2bc342,_0x219bb5,_0x407be8,_0x48d679,_0x53f778,_0xff512f){if(_0x407be8){if(_[_0xabf2('0x10')](integrations,_0x2bc342[_0xabf2('0x11')][_0xabf2('0x12')]())){try{var _0xc81f19=null;var _0x369a9e='';var _0xd73f84=_0x407be8[_0x2bc342['data1'][_0xabf2('0x12')]()];if(_0xd73f84){var _0x5eb60e=_0xd73f84[_0x2bc342[_0xabf2('0x13')]];if(_0x5eb60e){var _0x34e603=_['find'](_0x5eb60e[_0xabf2('0x14')],{'id':parseInt(_0x2bc342[_0xabf2('0x15')],0xa)});if(_0x34e603){if(_0x48d679){if(_0x53f778&&_0x219bb5[_0xabf2('0x16')]){_0x369a9e=_0xabf2('0x16');}else if(_0x219bb5['routeId']){_0x369a9e=_0xabf2('0x17');}else{console[_0xabf2('0x18')](_0xabf2('0x19'),_0x219bb5);}}else{_0x369a9e=_0xabf2('0x1a');}switch(_0x2bc342[_0xabf2('0x11')][_0xabf2('0x12')]()){case _0xabf2('0x8'):zendesk[_0x369a9e](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f);break;case _0xabf2('0x1b'):salesforce[_0x369a9e](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f);break;case'sugarcrm':sugarcrm[_0x369a9e](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f);break;case _0xabf2('0x1c'):freshdesk[_0x369a9e](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f);break;case _0xabf2('0x9'):zoho[_0x369a9e](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f);break;case _0xabf2('0xa'):desk[_0x369a9e](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f);break;case _0xabf2('0xb'):vtiger[_0x369a9e](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f);break;case _0xabf2('0xd'):freshsales['cs'](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f,_0x369a9e);break;case _0xabf2('0xe'):servicenow['cs'](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f,_0x369a9e);break;case'dynamics365':dynamics365['cs'](_0x2bc342,_0x219bb5,_0x34e603,_0x48d679,_0x53f778,_0x5eb60e,_0xff512f,_0x369a9e);break;default:console[_0xabf2('0x18')](_0xabf2('0x1d'));}}else{_0xc81f19=require('../../../../config/logger')(_0x2bc342[_0xabf2('0x11')][_0xabf2('0x12')]());_0xc81f19[_0xabf2('0x1e')]('[EXEC]',util[_0xabf2('0x1f')]('%s\x20configuration\x20#%s\x20not\x20found',_0x2bc342[_0xabf2('0x11')][_0xabf2('0x12')](),_0x2bc342[_0xabf2('0x15')]));}}else{_0xc81f19=require(_0xabf2('0x20'))(_0x2bc342['data1'][_0xabf2('0x12')]());_0xc81f19[_0xabf2('0x1e')](_0xabf2('0x21'),util[_0xabf2('0x1f')]('%s\x20account\x20#%s\x20not\x20found',_0x2bc342[_0xabf2('0x11')][_0xabf2('0x12')](),_0x2bc342[_0xabf2('0x13')]));}}else{}}catch(_0xc30480){console[_0xabf2('0x1e')](_0xc30480);}}}};
\ No newline at end of file
+var _0xc7b4=['EVENT\x20UNKNOWN','unmanaged','sugarcrm','freshdesk','vtiger','servicenow','unknown\x20integration','../../../../config/logger','error','format','[EXEC]','lodash','util','./zendesk','./salesforce','./sugarcrm','./freshdesk','./zoho','./desk','./vtiger','./freshsales','zendesk','salesforce','zoho','desk','dynamics365','freshsales','data1','toLowerCase','data2','Configurations','data3','queue','routeId','outbound','log'];(function(_0x20039e,_0x1059eb){var _0x33de2c=function(_0x3d3ce2){while(--_0x3d3ce2){_0x20039e['push'](_0x20039e['shift']());}};_0x33de2c(++_0x1059eb);}(_0xc7b4,0x9b));var _0x4c7b=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xc7b4[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x4c7b('0x0'));var util=require(_0x4c7b('0x1'));var zendesk=require(_0x4c7b('0x2'));var salesforce=require(_0x4c7b('0x3'));var sugarcrm=require(_0x4c7b('0x4'));var freshdesk=require(_0x4c7b('0x5'));var zoho=require(_0x4c7b('0x6'));var desk=require(_0x4c7b('0x7'));var vtiger=require(_0x4c7b('0x8'));var servicenow=require('./servicenow');var dynamics365=require('./dynamics365');var freshsales=require(_0x4c7b('0x9'));var integrations=[_0x4c7b('0xa'),_0x4c7b('0xb'),'sugarcrm','freshdesk',_0x4c7b('0xc'),_0x4c7b('0xd'),'vtiger',_0x4c7b('0xe'),_0x4c7b('0xf'),'servicenow'];exports['exec']=function(_0x2e51d0,_0x13d002,_0x26ab88,_0x136357,_0x32b8e2,_0x3295ab){if(_0x26ab88){if(_['includes'](integrations,_0x2e51d0[_0x4c7b('0x10')][_0x4c7b('0x11')]())){try{var _0x3a1d0b=null;var _0x583408='';var _0x582623=_0x26ab88[_0x2e51d0[_0x4c7b('0x10')]['toLowerCase']()];if(_0x582623){var _0x162aff=_0x582623[_0x2e51d0[_0x4c7b('0x12')]];if(_0x162aff){var _0xf954ca=_['find'](_0x162aff[_0x4c7b('0x13')],{'id':parseInt(_0x2e51d0[_0x4c7b('0x14')],0xa)});if(_0xf954ca){if(_0x136357){if(_0x32b8e2&&_0x13d002[_0x4c7b('0x15')]){_0x583408=_0x4c7b('0x15');}else if(_0x13d002[_0x4c7b('0x16')]){_0x583408=_0x4c7b('0x17');}else{console[_0x4c7b('0x18')](_0x4c7b('0x19'),_0x13d002);}}else{_0x583408=_0x4c7b('0x1a');}switch(_0x2e51d0[_0x4c7b('0x10')][_0x4c7b('0x11')]()){case _0x4c7b('0xa'):zendesk[_0x583408](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab);break;case _0x4c7b('0xb'):salesforce[_0x583408](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab);break;case _0x4c7b('0x1b'):sugarcrm[_0x583408](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab);break;case _0x4c7b('0x1c'):freshdesk[_0x583408](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab);break;case'zoho':zoho[_0x583408](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab);break;case _0x4c7b('0xd'):desk[_0x583408](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab);break;case _0x4c7b('0x1d'):vtiger[_0x583408](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab);break;case _0x4c7b('0xf'):freshsales['cs'](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab,_0x583408);break;case _0x4c7b('0x1e'):servicenow['cs'](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab,_0x583408);break;case'dynamics365':dynamics365['cs'](_0x2e51d0,_0x13d002,_0xf954ca,_0x136357,_0x32b8e2,_0x162aff,_0x3295ab,_0x583408);break;default:console[_0x4c7b('0x18')](_0x4c7b('0x1f'));}}else{_0x3a1d0b=require(_0x4c7b('0x20'))(_0x2e51d0[_0x4c7b('0x10')][_0x4c7b('0x11')]());_0x3a1d0b[_0x4c7b('0x21')]('[EXEC]',util[_0x4c7b('0x22')]('%s\x20configuration\x20#%s\x20not\x20found',_0x2e51d0['data1'][_0x4c7b('0x11')](),_0x2e51d0['data3']));}}else{_0x3a1d0b=require(_0x4c7b('0x20'))(_0x2e51d0[_0x4c7b('0x10')][_0x4c7b('0x11')]());_0x3a1d0b['error'](_0x4c7b('0x23'),util[_0x4c7b('0x22')]('%s\x20account\x20#%s\x20not\x20found',_0x2e51d0[_0x4c7b('0x10')]['toLowerCase'](),_0x2e51d0['data2']));}}else{}}catch(_0x5ef4c5){console[_0x4c7b('0x21')](_0x5ef4c5);}}}};
\ No newline at end of file