Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / services / ami / trigger / integration / index.js
index 49df99c..b0b4779 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfecf=['./freshsales','salesforce','sugarcrm','freshdesk','zoho','vtiger','dynamics365','freshsales','servicenow','exec','data1','toLowerCase','find','Configurations','data3','queue','outbound','EVENT\x20UNKNOWN','unmanaged','zendesk','desk','log','unknown\x20integration','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','../../../../config/logger','%s\x20account\x20#%s\x20not\x20found','data2','util','./freshdesk','./zoho','./desk','./vtiger','./servicenow'];(function(_0x3c357e,_0x4c3edf){var _0x5cec9c=function(_0x428f21){while(--_0x428f21){_0x3c357e['push'](_0x3c357e['shift']());}};_0x5cec9c(++_0x4c3edf);}(_0xfecf,0x1f2));var _0xffec=function(_0x59a71e,_0x5710cb){_0x59a71e=_0x59a71e-0x0;var _0x25e6d4=_0xfecf[_0x59a71e];return _0x25e6d4;};'use strict';var _=require('lodash');var util=require(_0xffec('0x0'));var zendesk=require('./zendesk');var salesforce=require('./salesforce');var sugarcrm=require('./sugarcrm');var freshdesk=require(_0xffec('0x1'));var zoho=require(_0xffec('0x2'));var desk=require(_0xffec('0x3'));var vtiger=require(_0xffec('0x4'));var servicenow=require(_0xffec('0x5'));var dynamics365=require('./dynamics365');var freshsales=require(_0xffec('0x6'));var integrations=['zendesk',_0xffec('0x7'),_0xffec('0x8'),_0xffec('0x9'),_0xffec('0xa'),'desk',_0xffec('0xb'),_0xffec('0xc'),_0xffec('0xd'),_0xffec('0xe')];exports[_0xffec('0xf')]=function(_0x34788b,_0x21fbcd,_0x4d4652,_0x4e9cec,_0x509dbc,_0x3be1f3){if(_0x4d4652){if(_['includes'](integrations,_0x34788b[_0xffec('0x10')][_0xffec('0x11')]())){try{var _0x37ee7a=null;var _0x401848='';var _0x3b6f20=_0x4d4652[_0x34788b[_0xffec('0x10')][_0xffec('0x11')]()];if(_0x3b6f20){var _0x2433bf=_0x3b6f20[_0x34788b['data2']];if(_0x2433bf){var _0x2d1603=_[_0xffec('0x12')](_0x2433bf[_0xffec('0x13')],{'id':parseInt(_0x34788b[_0xffec('0x14')],0xa)});if(_0x2d1603){if(_0x4e9cec){if(_0x509dbc&&_0x21fbcd[_0xffec('0x15')]){_0x401848=_0xffec('0x15');}else if(_0x21fbcd['routeId']){_0x401848=_0xffec('0x16');}else{console['log'](_0xffec('0x17'),_0x21fbcd);}}else{_0x401848=_0xffec('0x18');}switch(_0x34788b['data1'][_0xffec('0x11')]()){case _0xffec('0x19'):zendesk[_0x401848](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3);break;case'salesforce':salesforce[_0x401848](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3);break;case _0xffec('0x8'):sugarcrm[_0x401848](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3);break;case'freshdesk':freshdesk[_0x401848](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3);break;case _0xffec('0xa'):zoho[_0x401848](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3);break;case _0xffec('0x1a'):desk[_0x401848](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3);break;case'vtiger':vtiger[_0x401848](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3);break;case _0xffec('0xd'):freshsales['cs'](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3,_0x401848);break;case _0xffec('0xe'):servicenow['cs'](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3,_0x401848);break;case'dynamics365':dynamics365['cs'](_0x34788b,_0x21fbcd,_0x2d1603,_0x4e9cec,_0x509dbc,_0x2433bf,_0x3be1f3,_0x401848);break;default:console[_0xffec('0x1b')](_0xffec('0x1c'));}}else{_0x37ee7a=require('../../../../config/logger')(_0x34788b[_0xffec('0x10')][_0xffec('0x11')]());_0x37ee7a[_0xffec('0x1d')](_0xffec('0x1e'),util[_0xffec('0x1f')](_0xffec('0x20'),_0x34788b[_0xffec('0x10')]['toLowerCase'](),_0x34788b[_0xffec('0x14')]));}}else{_0x37ee7a=require(_0xffec('0x21'))(_0x34788b['data1'][_0xffec('0x11')]());_0x37ee7a[_0xffec('0x1d')](_0xffec('0x1e'),util[_0xffec('0x1f')](_0xffec('0x22'),_0x34788b[_0xffec('0x10')][_0xffec('0x11')](),_0x34788b[_0xffec('0x23')]));}}else{}}catch(_0x38e059){console['error'](_0x38e059);}}}};
\ No newline at end of file
+var _0xce22=['queue','routeId','outbound','log','freshdesk','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','%s\x20account\x20#%s\x20not\x20found','lodash','util','./zendesk','./salesforce','./sugarcrm','./zoho','./vtiger','./servicenow','./dynamics365','./freshsales','zendesk','salesforce','sugarcrm','zoho','desk','vtiger','dynamics365','freshsales','servicenow','includes','data1','toLowerCase','data2','Configurations','data3'];(function(_0x252249,_0x51b202){var _0x1c1548=function(_0x33685d){while(--_0x33685d){_0x252249['push'](_0x252249['shift']());}};_0x1c1548(++_0x51b202);}(_0xce22,0xea));var _0x2ce2=function(_0x1507b0,_0x444936){_0x1507b0=_0x1507b0-0x0;var _0x39e688=_0xce22[_0x1507b0];return _0x39e688;};'use strict';var _=require(_0x2ce2('0x0'));var util=require(_0x2ce2('0x1'));var zendesk=require(_0x2ce2('0x2'));var salesforce=require(_0x2ce2('0x3'));var sugarcrm=require(_0x2ce2('0x4'));var freshdesk=require('./freshdesk');var zoho=require(_0x2ce2('0x5'));var desk=require('./desk');var vtiger=require(_0x2ce2('0x6'));var servicenow=require(_0x2ce2('0x7'));var dynamics365=require(_0x2ce2('0x8'));var freshsales=require(_0x2ce2('0x9'));var integrations=[_0x2ce2('0xa'),_0x2ce2('0xb'),_0x2ce2('0xc'),'freshdesk',_0x2ce2('0xd'),_0x2ce2('0xe'),_0x2ce2('0xf'),_0x2ce2('0x10'),_0x2ce2('0x11'),_0x2ce2('0x12')];exports['exec']=function(_0x25d27e,_0x3c2e05,_0x561dae,_0x26218a,_0x3c9b36,_0x524303){if(_0x561dae){if(_[_0x2ce2('0x13')](integrations,_0x25d27e[_0x2ce2('0x14')][_0x2ce2('0x15')]())){try{var _0x3dbbbe=null;var _0x4b2407='';var _0x1b4a4f=_0x561dae[_0x25d27e[_0x2ce2('0x14')][_0x2ce2('0x15')]()];if(_0x1b4a4f){var _0x5efaa1=_0x1b4a4f[_0x25d27e[_0x2ce2('0x16')]];if(_0x5efaa1){var _0x4d3490=_['find'](_0x5efaa1[_0x2ce2('0x17')],{'id':parseInt(_0x25d27e[_0x2ce2('0x18')],0xa)});if(_0x4d3490){if(_0x26218a){if(_0x3c9b36&&_0x3c2e05[_0x2ce2('0x19')]){_0x4b2407=_0x2ce2('0x19');}else if(_0x3c2e05[_0x2ce2('0x1a')]){_0x4b2407=_0x2ce2('0x1b');}else{console[_0x2ce2('0x1c')]('EVENT\x20UNKNOWN',_0x3c2e05);}}else{_0x4b2407='unmanaged';}switch(_0x25d27e['data1'][_0x2ce2('0x15')]()){case _0x2ce2('0xa'):zendesk[_0x4b2407](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303);break;case _0x2ce2('0xb'):salesforce[_0x4b2407](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303);break;case _0x2ce2('0xc'):sugarcrm[_0x4b2407](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303);break;case _0x2ce2('0x1d'):freshdesk[_0x4b2407](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303);break;case'zoho':zoho[_0x4b2407](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303);break;case _0x2ce2('0xe'):desk[_0x4b2407](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303);break;case'vtiger':vtiger[_0x4b2407](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303);break;case _0x2ce2('0x11'):freshsales['cs'](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303,_0x4b2407);break;case _0x2ce2('0x12'):servicenow['cs'](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303,_0x4b2407);break;case _0x2ce2('0x10'):dynamics365['cs'](_0x25d27e,_0x3c2e05,_0x4d3490,_0x26218a,_0x3c9b36,_0x5efaa1,_0x524303,_0x4b2407);break;default:console[_0x2ce2('0x1c')](_0x2ce2('0x1e'));}}else{_0x3dbbbe=require(_0x2ce2('0x1f'))(_0x25d27e['data1']['toLowerCase']());_0x3dbbbe[_0x2ce2('0x20')](_0x2ce2('0x21'),util[_0x2ce2('0x22')](_0x2ce2('0x23'),_0x25d27e['data1']['toLowerCase'](),_0x25d27e['data3']));}}else{_0x3dbbbe=require(_0x2ce2('0x1f'))(_0x25d27e[_0x2ce2('0x14')]['toLowerCase']());_0x3dbbbe[_0x2ce2('0x20')](_0x2ce2('0x21'),util[_0x2ce2('0x22')](_0x2ce2('0x24'),_0x25d27e[_0x2ce2('0x14')][_0x2ce2('0x15')](),_0x25d27e[_0x2ce2('0x16')]));}}else{}}catch(_0x5c748f){console['error'](_0x5c748f);}}}};
\ No newline at end of file