Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / services / ami / index.js
index f4c80ea..78233ba 100644 (file)
@@ -1 +1 @@
-const a1064_0x543a=['./rpc/integrations/freshsales','./server','initAgents','getVoiceCallReports','./rpc/integrations/desk','initServicenowAccounts','./rpc/cmHopperHistory','initFreshsalesAccounts','initCampaigns','sync','get','initSalesforceAccounts','initTemplates','getAgents','initTriggers','getVoiceExtensions','./preview','moment','getVtigerAccounts','getSalesforceAccounts','./rpc/voiceQueueReport','./rpc/template','getFaxAccounts','./rpc/integrations/salesforce','getTelephones','initZendeskAccounts','getZendeskAccounts','./rpc/integrations/zoho','getCampaignHopperHistory','getVoiceQueueReports','getVoiceQueueHopperHistory','./rpc/integrations/servicenow','then','resolve','getFreshsalesAccounts','./report','getVoiceQueues','initDynamics365Accounts','getTrunks','./rpc/trunk','./rpc/integrations/freshdesk','getFreshdeskAccounts','log','hour','initVoiceQueues','getDynamics365Accounts','getZohoAccounts','initVoiceCallReports','./rpc/trigger','./rpc/campaign','./rpc/voiceCallReport','getSugarcrmAccounts','./rpc/integrations/sugarcrm','initVoiceQueueHopperHistory','getTriggers','./rpc/integrations/vtiger','./fax','initVoiceQueueReports'];(function(_0x5c3107,_0x543a16){const _0x2dd012=function(_0x426e4d){while(--_0x426e4d){_0x5c3107['push'](_0x5c3107['shift']());}};_0x2dd012(++_0x543a16);}(a1064_0x543a,0x194));const a1064_0x2dd0=function(_0x5c3107,_0x543a16){_0x5c3107=_0x5c3107-0x0;let _0x2dd012=a1064_0x543a[_0x5c3107];return _0x2dd012;};const _0x38dbcc=a1064_0x2dd0;'use strict';require('../../globals');const moment=require(_0x38dbcc('0x13')),server=require(_0x38dbcc('0x3')),Realtime=require('./realtime'),Report=require(_0x38dbcc('0x25')),Preview=require(_0x38dbcc('0x12')),Fax=require(_0x38dbcc('0x0')),user=require('./rpc/user'),voiceQueue=require('./rpc/voiceQueue'),voiceQueueReport=require(_0x38dbcc('0x16')),voiceCallReport=require(_0x38dbcc('0x34')),trunk=require(_0x38dbcc('0x29')),trigger=require(_0x38dbcc('0x32')),template=require(_0x38dbcc('0x17')),cmHopperHistory=require(_0x38dbcc('0x8')),campaign=require(_0x38dbcc('0x33')),voiceExtension=require('./rpc/voiceExtension'),faxAccount=require('./rpc/faxAccount'),zendesk=require('./rpc/integrations/zendesk'),salesforce=require(_0x38dbcc('0x19')),sugarcrm=require(_0x38dbcc('0x36')),freshdesk=require(_0x38dbcc('0x2a')),desk=require(_0x38dbcc('0x6')),zoho=require(_0x38dbcc('0x1d')),vtiger=require(_0x38dbcc('0x39')),freshsales=require(_0x38dbcc('0x2')),servicenow=require(_0x38dbcc('0x21')),dynamics365=require('./rpc/integrations/dynamics365'),realtime=new Realtime(),report=new Report(realtime),preview=new Preview(realtime),fax=new Fax(realtime);let isTrue=!![],initP=!![];function ifMidnight(){const _0x3ca49a=_0x38dbcc;moment()[_0x3ca49a('0xc')](_0x3ca49a('0x2d'))===0x0&&initP&&(initP=![],isTrue=!![],initParams()),moment()[_0x3ca49a('0xc')](_0x3ca49a('0x2d'))===0x1&&isTrue&&(isTrue=![],initP=!![]);}function initRealtime(){const _0x27f412=_0x38dbcc;return ifMidnight(),Promise['resolve']()[_0x27f412('0x22')](user[_0x27f412('0xf')]())['then'](realtime[_0x27f412('0x4')]())['then'](user[_0x27f412('0x1a')]())[_0x27f412('0x22')](realtime['initTelephones']())[_0x27f412('0x22')](trunk[_0x27f412('0x28')]())['then'](realtime['initTrunks']())[_0x27f412('0x22')](voiceQueue[_0x27f412('0x26')]())['then'](realtime[_0x27f412('0x2e')]())[_0x27f412('0x22')](trigger[_0x27f412('0x38')]())[_0x27f412('0x22')](realtime[_0x27f412('0x10')]())['then'](template['getTemplates']())[_0x27f412('0x22')](realtime[_0x27f412('0xe')]())['then'](zendesk[_0x27f412('0x1c')]())[_0x27f412('0x22')](realtime[_0x27f412('0x1b')]())['then'](salesforce[_0x27f412('0x15')]())['then'](realtime[_0x27f412('0xd')]())['then'](sugarcrm[_0x27f412('0x35')]())['then'](realtime['initSugarcrmAccounts']())['then'](freshdesk[_0x27f412('0x2b')]())[_0x27f412('0x22')](realtime['initFreshdeskAccounts']())[_0x27f412('0x22')](desk['getDeskAccounts']())[_0x27f412('0x22')](realtime['initDeskAccounts']())[_0x27f412('0x22')](zoho[_0x27f412('0x30')]())[_0x27f412('0x22')](realtime['initZohoAccounts']())[_0x27f412('0x22')](vtiger[_0x27f412('0x14')]())[_0x27f412('0x22')](realtime['initVtigerAccounts']())['then'](freshsales[_0x27f412('0x24')]())[_0x27f412('0x22')](realtime[_0x27f412('0x9')]())[_0x27f412('0x22')](servicenow['getServicenowAccounts']())[_0x27f412('0x22')](realtime[_0x27f412('0x7')]())[_0x27f412('0x22')](dynamics365[_0x27f412('0x2f')]())['then'](realtime[_0x27f412('0x27')]())[_0x27f412('0x22')](campaign['getCampaigns']())['then'](realtime[_0x27f412('0xa')]())['then'](voiceExtension[_0x27f412('0x11')]())['then'](realtime['initVoiceExtensions']())[_0x27f412('0x22')](faxAccount[_0x27f412('0x18')]())[_0x27f412('0x22')](realtime['initFaxAccounts']())[_0x27f412('0x22')](function(){return realtime;});}function initParams(){const _0xe169d9=_0x38dbcc;return Promise[_0xe169d9('0x23')]()[_0xe169d9('0x22')](voiceQueueReport[_0xe169d9('0x1f')]())['then'](realtime[_0xe169d9('0x1')]())[_0xe169d9('0x22')](cmHopperHistory[_0xe169d9('0x20')]())[_0xe169d9('0x22')](realtime[_0xe169d9('0x37')]())['then'](cmHopperHistory[_0xe169d9('0x1e')]())[_0xe169d9('0x22')](realtime['initCampaignHopperHistory']())[_0xe169d9('0x22')](voiceCallReport[_0xe169d9('0x5')]())[_0xe169d9('0x22')](realtime[_0xe169d9('0x31')]())[_0xe169d9('0x22')](function(){})['catch'](function(_0x426e4d){const _0x415117=_0xe169d9;console[_0x415117('0x2c')](_0x426e4d);});}function main(){const _0x2f9494=_0x38dbcc;return server['listen'](realtime,preview,fax)[_0x2f9494('0x22')](function(){return initRealtime();})['then'](function(){return initParams();})[_0x2f9494('0x22')](function(){const _0x5d92db=_0x2f9494;report[_0x5d92db('0xb')](),setInterval(initRealtime,0x1388);})['catch'](function(_0x26e5bf){const _0x13a4c4=_0x2f9494;console[_0x13a4c4('0x2c')](_0x26e5bf);});}main();
\ No newline at end of file
+const a1064_0x421f=['initVoiceQueueReports','getZendeskAccounts','./rpc/integrations/zendesk','log','./rpc/integrations/salesforce','initVoiceExtensions','./rpc/integrations/sugarcrm','getFreshdeskAccounts','initCampaigns','getDynamics365Accounts','catch','./rpc/integrations/servicenow','./preview','getVoiceQueueHopperHistory','initVoiceCallReports','initVtigerAccounts','initFaxAccounts','getVoiceQueueReports','getFreshsalesAccounts','initZendeskAccounts','initDeskAccounts','./rpc/faxAccount','initFreshdeskAccounts','./rpc/campaign','getZohoAccounts','listen','./rpc/user','moment','initServicenowAccounts','getVoiceQueues','getTelephones','resolve','initFreshsalesAccounts','initDynamics365Accounts','getTemplates','getCampaignHopperHistory','getFaxAccounts','./rpc/trunk','hour','./rpc/integrations/freshsales','getVtigerAccounts','initSugarcrmAccounts','./report','../../globals','initSalesforceAccounts','./rpc/integrations/zoho','initVoiceQueues','getTriggers','getTrunks','./rpc/voiceQueueReport','./server','getServicenowAccounts','sync','then','./rpc/integrations/desk','initTrunks'];(function(_0x6476ba,_0x421f25){const _0x4acbbd=function(_0x4e5af6){while(--_0x4e5af6){_0x6476ba['push'](_0x6476ba['shift']());}};_0x4acbbd(++_0x421f25);}(a1064_0x421f,0xa4));const a1064_0x4acb=function(_0x6476ba,_0x421f25){_0x6476ba=_0x6476ba-0x0;let _0x4acbbd=a1064_0x421f[_0x6476ba];return _0x4acbbd;};const _0x487d4b=a1064_0x4acb;'use strict';require(_0x487d4b('0x2f'));const moment=require(_0x487d4b('0x1f')),server=require(_0x487d4b('0x36')),Realtime=require('./realtime'),Report=require(_0x487d4b('0x2e')),Preview=require(_0x487d4b('0x10')),Fax=require('./fax'),user=require(_0x487d4b('0x1e')),voiceQueue=require('./rpc/voiceQueue'),voiceQueueReport=require(_0x487d4b('0x35')),voiceCallReport=require('./rpc/voiceCallReport'),trunk=require(_0x487d4b('0x29')),trigger=require('./rpc/trigger'),template=require('./rpc/template'),cmHopperHistory=require('./rpc/cmHopperHistory'),campaign=require(_0x487d4b('0x1b')),voiceExtension=require('./rpc/voiceExtension'),faxAccount=require(_0x487d4b('0x19')),zendesk=require(_0x487d4b('0x6')),salesforce=require(_0x487d4b('0x8')),sugarcrm=require(_0x487d4b('0xa')),freshdesk=require('./rpc/integrations/freshdesk'),desk=require(_0x487d4b('0x2')),zoho=require(_0x487d4b('0x31')),vtiger=require('./rpc/integrations/vtiger'),freshsales=require(_0x487d4b('0x2b')),servicenow=require(_0x487d4b('0xf')),dynamics365=require('./rpc/integrations/dynamics365'),realtime=new Realtime(),report=new Report(realtime),preview=new Preview(realtime),fax=new Fax(realtime);let isTrue=!![],initP=!![];function ifMidnight(){const _0x2046d7=_0x487d4b;moment()['get'](_0x2046d7('0x2a'))===0x0&&initP&&(initP=![],isTrue=!![],initParams()),moment()['get'](_0x2046d7('0x2a'))===0x1&&isTrue&&(isTrue=![],initP=!![]);}function initRealtime(){const _0x4cf42c=_0x487d4b;return ifMidnight(),Promise[_0x4cf42c('0x23')]()[_0x4cf42c('0x1')](user['getAgents']())[_0x4cf42c('0x1')](realtime['initAgents']())[_0x4cf42c('0x1')](user[_0x4cf42c('0x22')]())['then'](realtime['initTelephones']())[_0x4cf42c('0x1')](trunk[_0x4cf42c('0x34')]())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x3')]())['then'](voiceQueue[_0x4cf42c('0x21')]())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x32')]())['then'](trigger[_0x4cf42c('0x33')]())[_0x4cf42c('0x1')](realtime['initTriggers']())[_0x4cf42c('0x1')](template[_0x4cf42c('0x26')]())[_0x4cf42c('0x1')](realtime['initTemplates']())[_0x4cf42c('0x1')](zendesk[_0x4cf42c('0x5')]())['then'](realtime[_0x4cf42c('0x17')]())[_0x4cf42c('0x1')](salesforce['getSalesforceAccounts']())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x30')]())[_0x4cf42c('0x1')](sugarcrm['getSugarcrmAccounts']())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x2d')]())['then'](freshdesk[_0x4cf42c('0xb')]())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x1a')]())[_0x4cf42c('0x1')](desk['getDeskAccounts']())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x18')]())[_0x4cf42c('0x1')](zoho[_0x4cf42c('0x1c')]())[_0x4cf42c('0x1')](realtime['initZohoAccounts']())[_0x4cf42c('0x1')](vtiger[_0x4cf42c('0x2c')]())['then'](realtime[_0x4cf42c('0x13')]())[_0x4cf42c('0x1')](freshsales[_0x4cf42c('0x16')]())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x24')]())[_0x4cf42c('0x1')](servicenow[_0x4cf42c('0x37')]())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x20')]())['then'](dynamics365[_0x4cf42c('0xd')]())['then'](realtime[_0x4cf42c('0x25')]())['then'](campaign['getCampaigns']())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0xc')]())[_0x4cf42c('0x1')](voiceExtension['getVoiceExtensions']())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x9')]())[_0x4cf42c('0x1')](faxAccount[_0x4cf42c('0x28')]())[_0x4cf42c('0x1')](realtime[_0x4cf42c('0x14')]())['then'](function(){return realtime;});}function initParams(){const _0x2669d5=_0x487d4b;return Promise[_0x2669d5('0x23')]()[_0x2669d5('0x1')](voiceQueueReport[_0x2669d5('0x15')]())['then'](realtime[_0x2669d5('0x4')]())['then'](cmHopperHistory[_0x2669d5('0x11')]())[_0x2669d5('0x1')](realtime['initVoiceQueueHopperHistory']())[_0x2669d5('0x1')](cmHopperHistory[_0x2669d5('0x27')]())[_0x2669d5('0x1')](realtime['initCampaignHopperHistory']())[_0x2669d5('0x1')](voiceCallReport['getVoiceCallReports']())['then'](realtime[_0x2669d5('0x12')]())['then'](function(){})[_0x2669d5('0xe')](function(_0x4e5af6){console['log'](_0x4e5af6);});}function main(){const _0x183f4b=_0x487d4b;return server[_0x183f4b('0x1d')](realtime,preview,fax)[_0x183f4b('0x1')](function(){return initRealtime();})[_0x183f4b('0x1')](function(){return initParams();})[_0x183f4b('0x1')](function(){const _0x29bbe8=_0x183f4b;report[_0x29bbe8('0x0')](),setInterval(initRealtime,0x1388);})[_0x183f4b('0xe')](function(_0x22f6d0){const _0x46a5b0=_0x183f4b;console[_0x46a5b0('0x7')](_0x22f6d0);});}main();
\ No newline at end of file