ebcdc604409cde45fdbaf1d58aa2222719923916
[motion2.git] / server / rpc / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x0f34=['../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailAccount/mailAccount.rpc','../api/mailQueue/mailQueue.rpc','../api/mailApplication/mailApplication.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxAccount/faxAccount.rpc','../api/faxApplication/faxApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/chatInteraction/chatInteraction.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc','../api/template/template.rpc','../api/variable/variable.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/squareProject/squareProject.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappInteraction/whatsappInteraction.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','../api/whatsappQueue/whatsappQueue.rpc','server','http','port','rpc','localhost','listen','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','jayson/promise','bluebird','lodash','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceAgentReport/voiceAgentReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc'];(function(_0x223049,_0x36d987){var _0x5e3729=function(_0x21cd70){while(--_0x21cd70){_0x223049['push'](_0x223049['shift']());}};_0x5e3729(++_0x36d987);}(_0x0f34,0xc3));var _0x40f3=function(_0x4b4c68,_0x14d416){_0x4b4c68=_0x4b4c68-0x0;var _0x1686e6=_0x0f34[_0x4b4c68];return _0x1686e6;};'use strict';var jayson=require(_0x40f3('0x0'));var BPromise=require(_0x40f3('0x1'));var _=require(_0x40f3('0x2'));var config=require('../config/environment');exports['listen']=function(){return new BPromise(function(_0x1bf180,_0x3da2e7){var _0x202c81={};_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x4')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x5')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x6')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x7')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/voiceCallReport/voiceCallReport.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/voiceDialReport/voiceDialReport.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x8')));_0x202c81=_['merge'](_0x202c81,require('../api/voiceQueueReport/voiceQueueReport.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x9')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0xa')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0xb')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0xc')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0xd')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0xe')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0xf')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/mailInteraction/mailInteraction.rpc'));_0x202c81=_['merge'](_0x202c81,require('../api/mailMessage/mailMessage.rpc'));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x10')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x11')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x12')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x13')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x14')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x15')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x16')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x17')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x18')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x19')));_0x202c81=_['merge'](_0x202c81,require('../api/smsMessage/smsMessage.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x1a')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x1b')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x1c')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x1d')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/openchannelQueue/openchannelQueue.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/openchannelQueueReport/openchannelQueueReport.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x1e')));_0x202c81=_['merge'](_0x202c81,require('../api/chatMessage/chatMessage.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/chatQueue/chatQueue.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/cmContact/cmContact.rpc'));_0x202c81=_['merge'](_0x202c81,require('../api/cmHopper/cmHopper.rpc'));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x1f')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x20')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x21')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/reportAgentPreview/reportAgentPreview.rpc'));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x22')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x23')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x24')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x25')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/trigger/trigger.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x26')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x27')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x28')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/intDeskAccount/intDeskAccount.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/intZohoAccount/intZohoAccount.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x29')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x2a')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/intVtigerAccount/intVtigerAccount.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x2b')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x2c')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x2d')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x2e')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x2f')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x30')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x31')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require('../api/squareOdbc/squareOdbc.rpc'));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x32')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x33')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x34')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x35')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x36')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x37')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x38')));_0x202c81=_['merge'](_0x202c81,require(_0x40f3('0x39')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x3a')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x3b')));_0x202c81=_[_0x40f3('0x3')](_0x202c81,require(_0x40f3('0x3c')));var _0x2c9405=jayson[_0x40f3('0x3d')](_0x202c81)[_0x40f3('0x3e')]();var _0x5e153b=config['rpc'][_0x40f3('0x3f')]||config[_0x40f3('0x3f')]+0x1;var _0x9a5e64=config[_0x40f3('0x40')]['ip']||_0x40f3('0x41');_0x2c9405['on']('error',function(_0x5c959a){return _0x3da2e7(_0x5c959a);});_0x2c9405[_0x40f3('0x42')](_0x5e153b,_0x9a5e64,function(){console[_0x40f3('0x43')](_0x40f3('0x44'),_0x9a5e64,_0x5e153b);require('../config/triggers')['default']();return _0x1bf180('RPC\x20listening\x20on\x20'+_0x9a5e64+':'+_0x5e153b);});});};