0ecf6547ab36f7d120bde5782b79d38d540e6325
[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 _0xd2b5=['../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatQueue/chatQueue.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/trigger/trigger.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareProject/squareProject.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappInteraction/whatsappInteraction.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','../api/whatsappQueue/whatsappQueue.rpc','http','rpc','port','localhost','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','default','RPC\x20listening\x20on\x20','jayson/promise','bluebird','lodash','../config/environment','listen','merge','../api/user/user.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceDialReport/voiceDialReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailAccount/mailAccount.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxAccount/faxAccount.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsMessage/smsMessage.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc'];(function(_0x17c183,_0x4c648e){var _0x2b6782=function(_0x263e18){while(--_0x263e18){_0x17c183['push'](_0x17c183['shift']());}};_0x2b6782(++_0x4c648e);}(_0xd2b5,0x141));var _0x5d2b=function(_0x2f2aca,_0x56d541){_0x2f2aca=_0x2f2aca-0x0;var _0x18494b=_0xd2b5[_0x2f2aca];return _0x18494b;};'use strict';var jayson=require(_0x5d2b('0x0'));var BPromise=require(_0x5d2b('0x1'));var _=require(_0x5d2b('0x2'));var config=require(_0x5d2b('0x3'));exports[_0x5d2b('0x4')]=function(){return new BPromise(function(_0x60a851,_0x271350){var _0x1ed9c0={};_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x6')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/voiceExtension/voiceExtension.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x7')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x8')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x9')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0xa')));_0x1ed9c0=_['merge'](_0x1ed9c0,require('../api/voiceAgentReport/voiceAgentReport.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0xb')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0xc')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0xd')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0xe')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0xf')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/mailServerIn/mailServerIn.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x10')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/mailQueue/mailQueue.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/mailInteraction/mailInteraction.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x11')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x12')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x13')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x14')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/faxApplication/faxApplication.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/faxInteraction/faxInteraction.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x15')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x16')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x17')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x18')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x19')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x1a')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x1b')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x1c')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x1d')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x1e')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x1f')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x20')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x21')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/chatMessage/chatMessage.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x22')));_0x1ed9c0=_['merge'](_0x1ed9c0,require('../api/cmContact/cmContact.rpc'));_0x1ed9c0=_['merge'](_0x1ed9c0,require('../api/cmHopper/cmHopper.rpc'));_0x1ed9c0=_['merge'](_0x1ed9c0,require('../api/cmHopperBlack/cmHopperBlack.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/cmHopperFinal/cmHopperFinal.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x23')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x24')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x25')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x26')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/sound/sound.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/template/template.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x27')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/variable/variable.rpc'));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x28')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/intSugarcrmAccount/intSugarcrmAccount.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x29')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x2a')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x2b')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x2c')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x2d')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x2e')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x2f')));_0x1ed9c0=_['merge'](_0x1ed9c0,require('../api/intFreshsalesAccount/intFreshsalesAccount.rpc'));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x30')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x31')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/squareReport/squareReport.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x32')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x33')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x34')));_0x1ed9c0=_['merge'](_0x1ed9c0,require('../api/squareRecording/squareRecording.rpc'));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x35')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x36')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x37')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require('../api/plugin/plugin.rpc'));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x38')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x39')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x3a')));_0x1ed9c0=_[_0x5d2b('0x5')](_0x1ed9c0,require(_0x5d2b('0x3b')));_0x1ed9c0=_['merge'](_0x1ed9c0,require(_0x5d2b('0x3c')));var _0x5d9473=jayson['server'](_0x1ed9c0)[_0x5d2b('0x3d')]();var _0x5449b8=config[_0x5d2b('0x3e')][_0x5d2b('0x3f')]||config[_0x5d2b('0x3f')]+0x1;var _0x2a15a0=config['rpc']['ip']||_0x5d2b('0x40');_0x5d9473['on']('error',function(_0x594241){return _0x271350(_0x594241);});_0x5d9473[_0x5d2b('0x4')](_0x5449b8,_0x2a15a0,function(){console[_0x5d2b('0x41')](_0x5d2b('0x42'),_0x2a15a0,_0x5449b8);require(_0x5d2b('0x43'))[_0x5d2b('0x44')]();return _0x60a851(_0x5d2b('0x45')+_0x2a15a0+':'+_0x5449b8);});});};