Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / services / ami / trigger / integration / index.js
index 233fd21..98fbc28 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf28a=['./sugarcrm','./freshdesk','./zoho','./desk','./servicenow','./dynamics365','./freshsales','zendesk','salesforce','sugarcrm','zoho','desk','vtiger','dynamics365','freshsales','includes','data1','toLowerCase','data2','Configurations','routeId','log','freshdesk','servicenow','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','data3','%s\x20account\x20#%s\x20not\x20found','lodash','util','./zendesk'];(function(_0x4d8a8f,_0x2afd4c){var _0xfc4adc=function(_0xb89886){while(--_0xb89886){_0x4d8a8f['push'](_0x4d8a8f['shift']());}};_0xfc4adc(++_0x2afd4c);}(_0xf28a,0x1c4));var _0xaf28=function(_0x4f7857,_0x29cf95){_0x4f7857=_0x4f7857-0x0;var _0x158705=_0xf28a[_0x4f7857];return _0x158705;};'use strict';var _=require(_0xaf28('0x0'));var util=require(_0xaf28('0x1'));var zendesk=require(_0xaf28('0x2'));var salesforce=require('./salesforce');var sugarcrm=require(_0xaf28('0x3'));var freshdesk=require(_0xaf28('0x4'));var zoho=require(_0xaf28('0x5'));var desk=require(_0xaf28('0x6'));var vtiger=require('./vtiger');var servicenow=require(_0xaf28('0x7'));var dynamics365=require(_0xaf28('0x8'));var freshsales=require(_0xaf28('0x9'));var integrations=[_0xaf28('0xa'),_0xaf28('0xb'),_0xaf28('0xc'),'freshdesk',_0xaf28('0xd'),_0xaf28('0xe'),_0xaf28('0xf'),_0xaf28('0x10'),_0xaf28('0x11'),'servicenow'];exports['exec']=function(_0x3b25dc,_0x3e2022,_0x1a90d5,_0x3a967f,_0x443f8a,_0x32a032){if(_0x1a90d5){if(_[_0xaf28('0x12')](integrations,_0x3b25dc[_0xaf28('0x13')][_0xaf28('0x14')]())){try{var _0x39ee5d=null;var _0x18ede1='';var _0x526c5e=_0x1a90d5[_0x3b25dc[_0xaf28('0x13')][_0xaf28('0x14')]()];if(_0x526c5e){var _0x15ed2e=_0x526c5e[_0x3b25dc[_0xaf28('0x15')]];if(_0x15ed2e){var _0x592cdf=_['find'](_0x15ed2e[_0xaf28('0x16')],{'id':parseInt(_0x3b25dc['data3'],0xa)});if(_0x592cdf){if(_0x3a967f){if(_0x443f8a&&_0x3e2022['queue']){_0x18ede1='queue';}else if(_0x3e2022[_0xaf28('0x17')]){_0x18ede1='outbound';}else{console[_0xaf28('0x18')]('EVENT\x20UNKNOWN',_0x3e2022);}}else{_0x18ede1='unmanaged';}switch(_0x3b25dc[_0xaf28('0x13')]['toLowerCase']()){case _0xaf28('0xa'):zendesk[_0x18ede1](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032);break;case _0xaf28('0xb'):salesforce[_0x18ede1](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032);break;case _0xaf28('0xc'):sugarcrm[_0x18ede1](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032);break;case _0xaf28('0x19'):freshdesk[_0x18ede1](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032);break;case _0xaf28('0xd'):zoho[_0x18ede1](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032);break;case _0xaf28('0xe'):desk[_0x18ede1](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032);break;case _0xaf28('0xf'):vtiger[_0x18ede1](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032);break;case _0xaf28('0x11'):freshsales['cs'](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032,_0x18ede1);break;case _0xaf28('0x1a'):servicenow['cs'](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032,_0x18ede1);break;case _0xaf28('0x10'):dynamics365['cs'](_0x3b25dc,_0x3e2022,_0x592cdf,_0x3a967f,_0x443f8a,_0x15ed2e,_0x32a032,_0x18ede1);break;default:console[_0xaf28('0x18')](_0xaf28('0x1b'));}}else{_0x39ee5d=require(_0xaf28('0x1c'))(_0x3b25dc[_0xaf28('0x13')][_0xaf28('0x14')]());_0x39ee5d[_0xaf28('0x1d')](_0xaf28('0x1e'),util[_0xaf28('0x1f')](_0xaf28('0x20'),_0x3b25dc[_0xaf28('0x13')][_0xaf28('0x14')](),_0x3b25dc[_0xaf28('0x21')]));}}else{_0x39ee5d=require(_0xaf28('0x1c'))(_0x3b25dc[_0xaf28('0x13')][_0xaf28('0x14')]());_0x39ee5d[_0xaf28('0x1d')](_0xaf28('0x1e'),util['format'](_0xaf28('0x22'),_0x3b25dc[_0xaf28('0x13')][_0xaf28('0x14')](),_0x3b25dc['data2']));}}else{}}catch(_0x2d4640){console['error'](_0x2d4640);}}}};
\ No newline at end of file
+var _0x5643=['salesforce','sugarcrm','freshdesk','desk','vtiger','dynamics365','freshsales','includes','data1','toLowerCase','find','Configurations','data3','queue','outbound','log','zendesk','zoho','servicenow','../../../../config/logger','error','[EXEC]','format','%s\x20account\x20#%s\x20not\x20found','data2','util','./zendesk','./salesforce','./sugarcrm','./freshdesk','./zoho','./vtiger','./servicenow','./dynamics365'];(function(_0xb81593,_0x53ffad){var _0x57bfae=function(_0x2f67d5){while(--_0x2f67d5){_0xb81593['push'](_0xb81593['shift']());}};_0x57bfae(++_0x53ffad);}(_0x5643,0xe5));var _0x3564=function(_0x1552fa,_0x40edec){_0x1552fa=_0x1552fa-0x0;var _0x173c1e=_0x5643[_0x1552fa];return _0x173c1e;};'use strict';var _=require('lodash');var util=require(_0x3564('0x0'));var zendesk=require(_0x3564('0x1'));var salesforce=require(_0x3564('0x2'));var sugarcrm=require(_0x3564('0x3'));var freshdesk=require(_0x3564('0x4'));var zoho=require(_0x3564('0x5'));var desk=require('./desk');var vtiger=require(_0x3564('0x6'));var servicenow=require(_0x3564('0x7'));var dynamics365=require(_0x3564('0x8'));var freshsales=require('./freshsales');var integrations=['zendesk',_0x3564('0x9'),_0x3564('0xa'),_0x3564('0xb'),'zoho',_0x3564('0xc'),_0x3564('0xd'),_0x3564('0xe'),_0x3564('0xf'),'servicenow'];exports['exec']=function(_0x10ba76,_0x4dac39,_0x506be0,_0x5c7e6b,_0x2aa708,_0x5d9507){if(_0x506be0){if(_[_0x3564('0x10')](integrations,_0x10ba76['data1']['toLowerCase']())){try{var _0x2314db=null;var _0x554632='';var _0x3c40e3=_0x506be0[_0x10ba76[_0x3564('0x11')][_0x3564('0x12')]()];if(_0x3c40e3){var _0x1e17b4=_0x3c40e3[_0x10ba76['data2']];if(_0x1e17b4){var _0x5e157f=_[_0x3564('0x13')](_0x1e17b4[_0x3564('0x14')],{'id':parseInt(_0x10ba76[_0x3564('0x15')],0xa)});if(_0x5e157f){if(_0x5c7e6b){if(_0x2aa708&&_0x4dac39[_0x3564('0x16')]){_0x554632='queue';}else if(_0x4dac39['routeId']){_0x554632=_0x3564('0x17');}else{console[_0x3564('0x18')]('EVENT\x20UNKNOWN',_0x4dac39);}}else{_0x554632='unmanaged';}switch(_0x10ba76['data1'][_0x3564('0x12')]()){case _0x3564('0x19'):zendesk[_0x554632](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507);break;case _0x3564('0x9'):salesforce[_0x554632](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507);break;case _0x3564('0xa'):sugarcrm[_0x554632](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507);break;case _0x3564('0xb'):freshdesk[_0x554632](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507);break;case _0x3564('0x1a'):zoho[_0x554632](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507);break;case _0x3564('0xc'):desk[_0x554632](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507);break;case _0x3564('0xd'):vtiger[_0x554632](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507);break;case _0x3564('0xf'):freshsales['cs'](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507,_0x554632);break;case _0x3564('0x1b'):servicenow['cs'](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507,_0x554632);break;case'dynamics365':dynamics365['cs'](_0x10ba76,_0x4dac39,_0x5e157f,_0x5c7e6b,_0x2aa708,_0x1e17b4,_0x5d9507,_0x554632);break;default:console[_0x3564('0x18')]('unknown\x20integration');}}else{_0x2314db=require(_0x3564('0x1c'))(_0x10ba76['data1'][_0x3564('0x12')]());_0x2314db[_0x3564('0x1d')](_0x3564('0x1e'),util[_0x3564('0x1f')]('%s\x20configuration\x20#%s\x20not\x20found',_0x10ba76[_0x3564('0x11')]['toLowerCase'](),_0x10ba76[_0x3564('0x15')]));}}else{_0x2314db=require(_0x3564('0x1c'))(_0x10ba76[_0x3564('0x11')]['toLowerCase']());_0x2314db[_0x3564('0x1d')](_0x3564('0x1e'),util[_0x3564('0x1f')](_0x3564('0x20'),_0x10ba76[_0x3564('0x11')][_0x3564('0x12')](),_0x10ba76[_0x3564('0x21')]));}}else{}}catch(_0x4b2d59){console['error'](_0x4b2d59);}}}};
\ No newline at end of file