Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / services / ami / trigger / integration / index.js
index 25d7d51..90ff412 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['dynamics365','freshsales','servicenow','exec','data1','toLowerCase','data2','find','Configurations','data3','queue','routeId','outbound','log','EVENT\x20UNKNOWN','unmanaged','freshdesk','vtiger','unknown\x20integration','../../../../config/logger','error','%s\x20configuration\x20#%s\x20not\x20found','[EXEC]','format','%s\x20account\x20#%s\x20not\x20found','lodash','util','./freshdesk','./zoho','./desk','./vtiger','./servicenow','zendesk','salesforce','sugarcrm','zoho','desk'];(function(_0x3927b0,_0x4e4afc){var _0x59cd88=function(_0x150ebc){while(--_0x150ebc){_0x3927b0['push'](_0x3927b0['shift']());}};_0x59cd88(++_0x4e4afc);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var zendesk=require('./zendesk');var salesforce=require('./salesforce');var sugarcrm=require('./sugarcrm');var freshdesk=require(_0x0d8b('0x2'));var zoho=require(_0x0d8b('0x3'));var desk=require(_0x0d8b('0x4'));var vtiger=require(_0x0d8b('0x5'));var servicenow=require(_0x0d8b('0x6'));var dynamics365=require('./dynamics365');var freshsales=require('./freshsales');var integrations=[_0x0d8b('0x7'),_0x0d8b('0x8'),_0x0d8b('0x9'),'freshdesk',_0x0d8b('0xa'),_0x0d8b('0xb'),'vtiger',_0x0d8b('0xc'),_0x0d8b('0xd'),_0x0d8b('0xe')];exports[_0x0d8b('0xf')]=function(_0x28ff7f,_0x1cac62,_0x2c5e9e,_0x28f87c,_0x48fa16,_0x3c4bfa){if(_0x2c5e9e){if(_['includes'](integrations,_0x28ff7f[_0x0d8b('0x10')][_0x0d8b('0x11')]())){try{var _0x340cc4=null;var _0x92cdd8='';var _0x35a07b=_0x2c5e9e[_0x28ff7f[_0x0d8b('0x10')][_0x0d8b('0x11')]()];if(_0x35a07b){var _0x31a8cc=_0x35a07b[_0x28ff7f[_0x0d8b('0x12')]];if(_0x31a8cc){var _0x2ce75e=_[_0x0d8b('0x13')](_0x31a8cc[_0x0d8b('0x14')],{'id':parseInt(_0x28ff7f[_0x0d8b('0x15')],0xa)});if(_0x2ce75e){if(_0x28f87c){if(_0x48fa16&&_0x1cac62[_0x0d8b('0x16')]){_0x92cdd8='queue';}else if(_0x1cac62[_0x0d8b('0x17')]){_0x92cdd8=_0x0d8b('0x18');}else{console[_0x0d8b('0x19')](_0x0d8b('0x1a'),_0x1cac62);}}else{_0x92cdd8=_0x0d8b('0x1b');}switch(_0x28ff7f['data1'][_0x0d8b('0x11')]()){case _0x0d8b('0x7'):zendesk[_0x92cdd8](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa);break;case _0x0d8b('0x8'):salesforce[_0x92cdd8](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa);break;case _0x0d8b('0x9'):sugarcrm[_0x92cdd8](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa);break;case _0x0d8b('0x1c'):freshdesk[_0x92cdd8](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa);break;case _0x0d8b('0xa'):zoho[_0x92cdd8](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa);break;case _0x0d8b('0xb'):desk[_0x92cdd8](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa);break;case _0x0d8b('0x1d'):vtiger[_0x92cdd8](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa);break;case'freshsales':freshsales['cs'](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa,_0x92cdd8);break;case _0x0d8b('0xe'):servicenow['cs'](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa,_0x92cdd8);break;case _0x0d8b('0xc'):dynamics365['cs'](_0x28ff7f,_0x1cac62,_0x2ce75e,_0x28f87c,_0x48fa16,_0x31a8cc,_0x3c4bfa,_0x92cdd8);break;default:console[_0x0d8b('0x19')](_0x0d8b('0x1e'));}}else{_0x340cc4=require(_0x0d8b('0x1f'))(_0x28ff7f[_0x0d8b('0x10')][_0x0d8b('0x11')]());_0x340cc4[_0x0d8b('0x20')]('[EXEC]',util['format'](_0x0d8b('0x21'),_0x28ff7f['data1']['toLowerCase'](),_0x28ff7f['data3']));}}else{_0x340cc4=require(_0x0d8b('0x1f'))(_0x28ff7f[_0x0d8b('0x10')][_0x0d8b('0x11')]());_0x340cc4[_0x0d8b('0x20')](_0x0d8b('0x22'),util[_0x0d8b('0x23')](_0x0d8b('0x24'),_0x28ff7f[_0x0d8b('0x10')][_0x0d8b('0x11')](),_0x28ff7f['data2']));}}else{}}catch(_0xe8bbee){console[_0x0d8b('0x20')](_0xe8bbee);}}}};
\ No newline at end of file
+var _0x743f=['Configurations','queue','routeId','outbound','log','unmanaged','toLowerCase','zendesk','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','data3','%s\x20account\x20#%s\x20not\x20found','lodash','./sugarcrm','./zoho','./servicenow','./dynamics365','./freshsales','salesforce','sugarcrm','freshdesk','zoho','desk','vtiger','dynamics365','servicenow','exec','includes','data1','data2','find'];(function(_0x34fea5,_0x499475){var _0x1878a8=function(_0x1a11f8){while(--_0x1a11f8){_0x34fea5['push'](_0x34fea5['shift']());}};_0x1878a8(++_0x499475);}(_0x743f,0x9c));var _0xf743=function(_0x19e08e,_0x417e6d){_0x19e08e=_0x19e08e-0x0;var _0x3214ee=_0x743f[_0x19e08e];return _0x3214ee;};'use strict';var _=require(_0xf743('0x0'));var util=require('util');var zendesk=require('./zendesk');var salesforce=require('./salesforce');var sugarcrm=require(_0xf743('0x1'));var freshdesk=require('./freshdesk');var zoho=require(_0xf743('0x2'));var desk=require('./desk');var vtiger=require('./vtiger');var servicenow=require(_0xf743('0x3'));var dynamics365=require(_0xf743('0x4'));var freshsales=require(_0xf743('0x5'));var integrations=['zendesk',_0xf743('0x6'),_0xf743('0x7'),_0xf743('0x8'),_0xf743('0x9'),_0xf743('0xa'),_0xf743('0xb'),_0xf743('0xc'),'freshsales',_0xf743('0xd')];exports[_0xf743('0xe')]=function(_0x44ec66,_0x3ced9f,_0x523b52,_0x654673,_0x57d9f6,_0x33f934){if(_0x523b52){if(_[_0xf743('0xf')](integrations,_0x44ec66[_0xf743('0x10')]['toLowerCase']())){try{var _0x4c1ced=null;var _0x3219be='';var _0x38c366=_0x523b52[_0x44ec66[_0xf743('0x10')]['toLowerCase']()];if(_0x38c366){var _0x306092=_0x38c366[_0x44ec66[_0xf743('0x11')]];if(_0x306092){var _0x1427ec=_[_0xf743('0x12')](_0x306092[_0xf743('0x13')],{'id':parseInt(_0x44ec66['data3'],0xa)});if(_0x1427ec){if(_0x654673){if(_0x57d9f6&&_0x3ced9f[_0xf743('0x14')]){_0x3219be=_0xf743('0x14');}else if(_0x3ced9f[_0xf743('0x15')]){_0x3219be=_0xf743('0x16');}else{console[_0xf743('0x17')]('EVENT\x20UNKNOWN',_0x3ced9f);}}else{_0x3219be=_0xf743('0x18');}switch(_0x44ec66[_0xf743('0x10')][_0xf743('0x19')]()){case _0xf743('0x1a'):zendesk[_0x3219be](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934);break;case'salesforce':salesforce[_0x3219be](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934);break;case _0xf743('0x7'):sugarcrm[_0x3219be](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934);break;case _0xf743('0x8'):freshdesk[_0x3219be](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934);break;case _0xf743('0x9'):zoho[_0x3219be](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934);break;case _0xf743('0xa'):desk[_0x3219be](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934);break;case _0xf743('0xb'):vtiger[_0x3219be](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934);break;case'freshsales':freshsales['cs'](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934,_0x3219be);break;case _0xf743('0xd'):servicenow['cs'](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934,_0x3219be);break;case _0xf743('0xc'):dynamics365['cs'](_0x44ec66,_0x3ced9f,_0x1427ec,_0x654673,_0x57d9f6,_0x306092,_0x33f934,_0x3219be);break;default:console['log'](_0xf743('0x1b'));}}else{_0x4c1ced=require(_0xf743('0x1c'))(_0x44ec66[_0xf743('0x10')][_0xf743('0x19')]());_0x4c1ced[_0xf743('0x1d')](_0xf743('0x1e'),util[_0xf743('0x1f')](_0xf743('0x20'),_0x44ec66[_0xf743('0x10')]['toLowerCase'](),_0x44ec66[_0xf743('0x21')]));}}else{_0x4c1ced=require('../../../../config/logger')(_0x44ec66[_0xf743('0x10')][_0xf743('0x19')]());_0x4c1ced[_0xf743('0x1d')](_0xf743('0x1e'),util['format'](_0xf743('0x22'),_0x44ec66['data1']['toLowerCase'](),_0x44ec66['data2']));}}else{}}catch(_0x26d6e9){console[_0xf743('0x1d')](_0x26d6e9);}}}};
\ No newline at end of file