Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / services / ami / trigger / integration / index.js
index d1e1623..2ab2b50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb62e=['./salesforce','./freshdesk','./zoho','./desk','./vtiger','./servicenow','./dynamics365','zendesk','salesforce','sugarcrm','zoho','desk','vtiger','dynamics365','exec','includes','data1','toLowerCase','data2','find','data3','queue','outbound','log','EVENT\x20UNKNOWN','unmanaged','freshdesk','servicenow','unknown\x20integration','../../../../config/logger','format','%s\x20configuration\x20#%s\x20not\x20found','error','[EXEC]','lodash','util','./zendesk'];(function(_0x298699,_0x4394cc){var _0x353c03=function(_0x8aa6b1){while(--_0x8aa6b1){_0x298699['push'](_0x298699['shift']());}};_0x353c03(++_0x4394cc);}(_0xb62e,0x1de));var _0xeb62=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xb62e[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0xeb62('0x0'));var util=require(_0xeb62('0x1'));var zendesk=require(_0xeb62('0x2'));var salesforce=require(_0xeb62('0x3'));var sugarcrm=require('./sugarcrm');var freshdesk=require(_0xeb62('0x4'));var zoho=require(_0xeb62('0x5'));var desk=require(_0xeb62('0x6'));var vtiger=require(_0xeb62('0x7'));var servicenow=require(_0xeb62('0x8'));var dynamics365=require(_0xeb62('0x9'));var freshsales=require('./freshsales');var integrations=[_0xeb62('0xa'),_0xeb62('0xb'),_0xeb62('0xc'),'freshdesk',_0xeb62('0xd'),_0xeb62('0xe'),_0xeb62('0xf'),_0xeb62('0x10'),'freshsales','servicenow'];exports[_0xeb62('0x11')]=function(_0x40584b,_0x6d5e94,_0xf93c21,_0x2fe923,_0xc91abc,_0x35afc3){if(_0xf93c21){if(_[_0xeb62('0x12')](integrations,_0x40584b[_0xeb62('0x13')][_0xeb62('0x14')]())){try{var _0x4a493c=null;var _0x422daf='';var _0xcc11c4=_0xf93c21[_0x40584b[_0xeb62('0x13')][_0xeb62('0x14')]()];if(_0xcc11c4){var _0x55a629=_0xcc11c4[_0x40584b[_0xeb62('0x15')]];if(_0x55a629){var _0x2fbad2=_[_0xeb62('0x16')](_0x55a629['Configurations'],{'id':parseInt(_0x40584b[_0xeb62('0x17')],0xa)});if(_0x2fbad2){if(_0x2fe923){if(_0xc91abc&&_0x6d5e94[_0xeb62('0x18')]){_0x422daf=_0xeb62('0x18');}else if(_0x6d5e94['routeId']){_0x422daf=_0xeb62('0x19');}else{console[_0xeb62('0x1a')](_0xeb62('0x1b'),_0x6d5e94);}}else{_0x422daf=_0xeb62('0x1c');}switch(_0x40584b[_0xeb62('0x13')][_0xeb62('0x14')]()){case _0xeb62('0xa'):zendesk[_0x422daf](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3);break;case _0xeb62('0xb'):salesforce[_0x422daf](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3);break;case _0xeb62('0xc'):sugarcrm[_0x422daf](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3);break;case _0xeb62('0x1d'):freshdesk[_0x422daf](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3);break;case _0xeb62('0xd'):zoho[_0x422daf](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3);break;case _0xeb62('0xe'):desk[_0x422daf](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3);break;case _0xeb62('0xf'):vtiger[_0x422daf](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3);break;case'freshsales':freshsales['cs'](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3,_0x422daf);break;case _0xeb62('0x1e'):servicenow['cs'](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3,_0x422daf);break;case _0xeb62('0x10'):dynamics365['cs'](_0x40584b,_0x6d5e94,_0x2fbad2,_0x2fe923,_0xc91abc,_0x55a629,_0x35afc3,_0x422daf);break;default:console[_0xeb62('0x1a')](_0xeb62('0x1f'));}}else{_0x4a493c=require(_0xeb62('0x20'))(_0x40584b[_0xeb62('0x13')][_0xeb62('0x14')]());_0x4a493c['error']('[EXEC]',util[_0xeb62('0x21')](_0xeb62('0x22'),_0x40584b[_0xeb62('0x13')][_0xeb62('0x14')](),_0x40584b[_0xeb62('0x17')]));}}else{_0x4a493c=require('../../../../config/logger')(_0x40584b['data1'][_0xeb62('0x14')]());_0x4a493c[_0xeb62('0x23')](_0xeb62('0x24'),util[_0xeb62('0x21')]('%s\x20account\x20#%s\x20not\x20found',_0x40584b['data1'][_0xeb62('0x14')](),_0x40584b['data2']));}}else{}}catch(_0x448327){console['error'](_0x448327);}}}};
\ 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