Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / services / ami / trigger / integration / index.js
index df17163..2ab2b50 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 _0xacf7=['servicenow','exec','includes','toLowerCase','data1','data2','find','Configurations','data3','queue','routeId','outbound','log','EVENT\x20UNKNOWN','unmanaged','zoho','vtiger','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20account\x20#%s\x20not\x20found','lodash','util','./zendesk','./salesforce','./sugarcrm','./freshdesk','./zoho','./desk','./freshsales','zendesk','salesforce','sugarcrm','freshdesk','desk','dynamics365','freshsales'];(function(_0x539e7a,_0x486b31){var _0x402f1a=function(_0x27baf7){while(--_0x27baf7){_0x539e7a['push'](_0x539e7a['shift']());}};_0x402f1a(++_0x486b31);}(_0xacf7,0x14f));var _0x7acf=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xacf7[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x7acf('0x0'));var util=require(_0x7acf('0x1'));var zendesk=require(_0x7acf('0x2'));var salesforce=require(_0x7acf('0x3'));var sugarcrm=require(_0x7acf('0x4'));var freshdesk=require(_0x7acf('0x5'));var zoho=require(_0x7acf('0x6'));var desk=require(_0x7acf('0x7'));var vtiger=require('./vtiger');var servicenow=require('./servicenow');var dynamics365=require('./dynamics365');var freshsales=require(_0x7acf('0x8'));var integrations=[_0x7acf('0x9'),_0x7acf('0xa'),_0x7acf('0xb'),_0x7acf('0xc'),'zoho',_0x7acf('0xd'),'vtiger',_0x7acf('0xe'),_0x7acf('0xf'),_0x7acf('0x10')];exports[_0x7acf('0x11')]=function(_0x2f4e08,_0xaa91c1,_0x2ba347,_0x470bae,_0x310f3b,_0x3cc1cf){if(_0x2ba347){if(_[_0x7acf('0x12')](integrations,_0x2f4e08['data1'][_0x7acf('0x13')]())){try{var _0xbfd54e=null;var _0x3553cd='';var _0x577723=_0x2ba347[_0x2f4e08[_0x7acf('0x14')][_0x7acf('0x13')]()];if(_0x577723){var _0x243064=_0x577723[_0x2f4e08[_0x7acf('0x15')]];if(_0x243064){var _0x4972db=_[_0x7acf('0x16')](_0x243064[_0x7acf('0x17')],{'id':parseInt(_0x2f4e08[_0x7acf('0x18')],0xa)});if(_0x4972db){if(_0x470bae){if(_0x310f3b&&_0xaa91c1[_0x7acf('0x19')]){_0x3553cd=_0x7acf('0x19');}else if(_0xaa91c1[_0x7acf('0x1a')]){_0x3553cd=_0x7acf('0x1b');}else{console[_0x7acf('0x1c')](_0x7acf('0x1d'),_0xaa91c1);}}else{_0x3553cd=_0x7acf('0x1e');}switch(_0x2f4e08['data1'][_0x7acf('0x13')]()){case _0x7acf('0x9'):zendesk[_0x3553cd](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf);break;case'salesforce':salesforce[_0x3553cd](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf);break;case _0x7acf('0xb'):sugarcrm[_0x3553cd](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf);break;case'freshdesk':freshdesk[_0x3553cd](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf);break;case _0x7acf('0x1f'):zoho[_0x3553cd](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf);break;case _0x7acf('0xd'):desk[_0x3553cd](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf);break;case _0x7acf('0x20'):vtiger[_0x3553cd](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf);break;case _0x7acf('0xf'):freshsales['cs'](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf,_0x3553cd);break;case _0x7acf('0x10'):servicenow['cs'](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf,_0x3553cd);break;case _0x7acf('0xe'):dynamics365['cs'](_0x2f4e08,_0xaa91c1,_0x4972db,_0x470bae,_0x310f3b,_0x243064,_0x3cc1cf,_0x3553cd);break;default:console[_0x7acf('0x1c')](_0x7acf('0x21'));}}else{_0xbfd54e=require(_0x7acf('0x22'))(_0x2f4e08[_0x7acf('0x14')]['toLowerCase']());_0xbfd54e[_0x7acf('0x23')](_0x7acf('0x24'),util[_0x7acf('0x25')]('%s\x20configuration\x20#%s\x20not\x20found',_0x2f4e08[_0x7acf('0x14')][_0x7acf('0x13')](),_0x2f4e08['data3']));}}else{_0xbfd54e=require(_0x7acf('0x22'))(_0x2f4e08[_0x7acf('0x14')][_0x7acf('0x13')]());_0xbfd54e[_0x7acf('0x23')](_0x7acf('0x24'),util[_0x7acf('0x25')](_0x7acf('0x26'),_0x2f4e08['data1']['toLowerCase'](),_0x2f4e08[_0x7acf('0x15')]));}}else{}}catch(_0x4412c8){console['error'](_0x4412c8);}}}};
\ No newline at end of file