Built motion from commit (unavailable).|2.5.29
[motion2.git] / server / services / ami / trigger / integration / index.js
index a43e21d..02c751f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x087b=['format','%s\x20configuration\x20#%s\x20not\x20found','lodash','util','./sugarcrm','./zoho','./desk','./vtiger','./servicenow','./dynamics365','./freshsales','zendesk','salesforce','sugarcrm','freshdesk','zoho','desk','vtiger','dynamics365','freshsales','servicenow','exec','includes','data1','toLowerCase','data2','find','Configurations','data3','queue','routeId','log','EVENT\x20UNKNOWN','error','[EXEC]'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x087b,0x11a));var _0xb087=function(_0x5f309e,_0x66e31){_0x5f309e=_0x5f309e-0x0;var _0x487b5e=_0x087b[_0x5f309e];return _0x487b5e;};'use strict';var _=require(_0xb087('0x0'));var util=require(_0xb087('0x1'));var zendesk=require('./zendesk');var salesforce=require('./salesforce');var sugarcrm=require(_0xb087('0x2'));var freshdesk=require('./freshdesk');var zoho=require(_0xb087('0x3'));var desk=require(_0xb087('0x4'));var vtiger=require(_0xb087('0x5'));var servicenow=require(_0xb087('0x6'));var dynamics365=require(_0xb087('0x7'));var freshsales=require(_0xb087('0x8'));var integrations=[_0xb087('0x9'),_0xb087('0xa'),_0xb087('0xb'),_0xb087('0xc'),_0xb087('0xd'),_0xb087('0xe'),_0xb087('0xf'),_0xb087('0x10'),_0xb087('0x11'),_0xb087('0x12')];exports[_0xb087('0x13')]=function(_0x583d25,_0x244abc,_0x108451,_0x903a16,_0x3bce7a,_0x3b45c1){if(_0x108451){if(_[_0xb087('0x14')](integrations,_0x583d25[_0xb087('0x15')]['toLowerCase']())){try{var _0x189e2b=null;var _0x31f977='';var _0x323656=_0x108451[_0x583d25['data1'][_0xb087('0x16')]()];if(_0x323656){var _0x3f145e=_0x323656[_0x583d25[_0xb087('0x17')]];if(_0x3f145e){var _0x46410b=_[_0xb087('0x18')](_0x3f145e[_0xb087('0x19')],{'id':parseInt(_0x583d25[_0xb087('0x1a')],0xa)});if(_0x46410b){if(_0x903a16){if(_0x3bce7a&&_0x244abc[_0xb087('0x1b')]){_0x31f977=_0xb087('0x1b');}else if(_0x244abc[_0xb087('0x1c')]){_0x31f977='outbound';}else{console[_0xb087('0x1d')](_0xb087('0x1e'),_0x244abc);}}else{_0x31f977='unmanaged';}switch(_0x583d25[_0xb087('0x15')][_0xb087('0x16')]()){case _0xb087('0x9'):zendesk[_0x31f977](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1);break;case'salesforce':salesforce[_0x31f977](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1);break;case _0xb087('0xb'):sugarcrm[_0x31f977](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1);break;case _0xb087('0xc'):freshdesk[_0x31f977](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1);break;case _0xb087('0xd'):zoho[_0x31f977](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1);break;case _0xb087('0xe'):desk[_0x31f977](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1);break;case'vtiger':vtiger[_0x31f977](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1);break;case _0xb087('0x11'):freshsales['cs'](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1,_0x31f977);break;case _0xb087('0x12'):servicenow['cs'](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1,_0x31f977);break;case _0xb087('0x10'):dynamics365['cs'](_0x583d25,_0x244abc,_0x46410b,_0x903a16,_0x3bce7a,_0x3f145e,_0x3b45c1,_0x31f977);break;default:console[_0xb087('0x1d')]('unknown\x20integration');}}else{_0x189e2b=require('../../../../config/logger')(_0x583d25['data1']['toLowerCase']());_0x189e2b[_0xb087('0x1f')](_0xb087('0x20'),util[_0xb087('0x21')](_0xb087('0x22'),_0x583d25[_0xb087('0x15')][_0xb087('0x16')](),_0x583d25[_0xb087('0x1a')]));}}else{_0x189e2b=require('../../../../config/logger')(_0x583d25[_0xb087('0x15')][_0xb087('0x16')]());_0x189e2b[_0xb087('0x1f')](_0xb087('0x20'),util[_0xb087('0x21')]('%s\x20account\x20#%s\x20not\x20found',_0x583d25[_0xb087('0x15')][_0xb087('0x16')](),_0x583d25['data2']));}}else{}}catch(_0x5a2dc6){console['error'](_0x5a2dc6);}}}};
\ No newline at end of file
+var _0xefda=['./sugarcrm','./zoho','./desk','./vtiger','./servicenow','./dynamics365','./freshsales','salesforce','sugarcrm','freshdesk','zoho','vtiger','dynamics365','freshsales','includes','data1','toLowerCase','data2','find','Configurations','queue','routeId','outbound','log','EVENT\x20UNKNOWN','unmanaged','zendesk','desk','servicenow','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','%s\x20account\x20#%s\x20not\x20found','lodash','./salesforce'];(function(_0x20e764,_0x19811d){var _0x4ebc22=function(_0x4d9bdf){while(--_0x4d9bdf){_0x20e764['push'](_0x20e764['shift']());}};_0x4ebc22(++_0x19811d);}(_0xefda,0x96));var _0xaefd=function(_0x4314c9,_0x1a6d36){_0x4314c9=_0x4314c9-0x0;var _0x1f8798=_0xefda[_0x4314c9];return _0x1f8798;};'use strict';var _=require(_0xaefd('0x0'));var util=require('util');var zendesk=require('./zendesk');var salesforce=require(_0xaefd('0x1'));var sugarcrm=require(_0xaefd('0x2'));var freshdesk=require('./freshdesk');var zoho=require(_0xaefd('0x3'));var desk=require(_0xaefd('0x4'));var vtiger=require(_0xaefd('0x5'));var servicenow=require(_0xaefd('0x6'));var dynamics365=require(_0xaefd('0x7'));var freshsales=require(_0xaefd('0x8'));var integrations=['zendesk',_0xaefd('0x9'),_0xaefd('0xa'),_0xaefd('0xb'),_0xaefd('0xc'),'desk',_0xaefd('0xd'),_0xaefd('0xe'),_0xaefd('0xf'),'servicenow'];exports['exec']=function(_0x54a3b1,_0xa6239d,_0x16b36e,_0x20135c,_0x35eea5,_0x10272a){if(_0x16b36e){if(_[_0xaefd('0x10')](integrations,_0x54a3b1[_0xaefd('0x11')][_0xaefd('0x12')]())){try{var _0x27be0f=null;var _0x382983='';var _0x2a310c=_0x16b36e[_0x54a3b1['data1'][_0xaefd('0x12')]()];if(_0x2a310c){var _0x4ac467=_0x2a310c[_0x54a3b1[_0xaefd('0x13')]];if(_0x4ac467){var _0x1725af=_[_0xaefd('0x14')](_0x4ac467[_0xaefd('0x15')],{'id':parseInt(_0x54a3b1['data3'],0xa)});if(_0x1725af){if(_0x20135c){if(_0x35eea5&&_0xa6239d[_0xaefd('0x16')]){_0x382983=_0xaefd('0x16');}else if(_0xa6239d[_0xaefd('0x17')]){_0x382983=_0xaefd('0x18');}else{console[_0xaefd('0x19')](_0xaefd('0x1a'),_0xa6239d);}}else{_0x382983=_0xaefd('0x1b');}switch(_0x54a3b1[_0xaefd('0x11')]['toLowerCase']()){case _0xaefd('0x1c'):zendesk[_0x382983](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a);break;case _0xaefd('0x9'):salesforce[_0x382983](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a);break;case _0xaefd('0xa'):sugarcrm[_0x382983](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a);break;case _0xaefd('0xb'):freshdesk[_0x382983](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a);break;case _0xaefd('0xc'):zoho[_0x382983](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a);break;case _0xaefd('0x1d'):desk[_0x382983](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a);break;case'vtiger':vtiger[_0x382983](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a);break;case _0xaefd('0xf'):freshsales['cs'](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a,_0x382983);break;case _0xaefd('0x1e'):servicenow['cs'](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a,_0x382983);break;case _0xaefd('0xe'):dynamics365['cs'](_0x54a3b1,_0xa6239d,_0x1725af,_0x20135c,_0x35eea5,_0x4ac467,_0x10272a,_0x382983);break;default:console[_0xaefd('0x19')](_0xaefd('0x1f'));}}else{_0x27be0f=require(_0xaefd('0x20'))(_0x54a3b1['data1'][_0xaefd('0x12')]());_0x27be0f[_0xaefd('0x21')](_0xaefd('0x22'),util[_0xaefd('0x23')](_0xaefd('0x24'),_0x54a3b1['data1']['toLowerCase'](),_0x54a3b1['data3']));}}else{_0x27be0f=require(_0xaefd('0x20'))(_0x54a3b1[_0xaefd('0x11')][_0xaefd('0x12')]());_0x27be0f['error'](_0xaefd('0x22'),util['format'](_0xaefd('0x25'),_0x54a3b1[_0xaefd('0x11')][_0xaefd('0x12')](),_0x54a3b1['data2']));}}else{}}catch(_0x435413){console[_0xaefd('0x21')](_0x435413);}}}};
\ No newline at end of file