22f96678bd4758759215a7d17a3a02cad52eca3e
[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 _0x5812=['../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/openchannelApplication/openchannelApplication.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatMessage/chatMessage.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopperBlack/cmHopperBlack.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/intZohoAccount/intZohoAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.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/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueue/whatsappQueue.rpc','port','rpc','localhost','error','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','default','RPC\x20listening\x20on\x20','jayson/promise','lodash','../config/environment','listen','merge','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailQueue/mailQueue.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5812,0x13d));var _0x2581=function(_0x32bd90,_0x14674b){_0x32bd90=_0x32bd90-0x0;var _0xa286b7=_0x5812[_0x32bd90];return _0xa286b7;};'use strict';var jayson=require(_0x2581('0x0'));var BPromise=require('bluebird');var _=require(_0x2581('0x1'));var config=require(_0x2581('0x2'));exports[_0x2581('0x3')]=function(){return new BPromise(function(_0x3ffca,_0xf9eb38){var _0x4292b2={};_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/user/user.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x5')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x6')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x7')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x8')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/voiceDialReport/voiceDialReport.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/voiceAgentReport/voiceAgentReport.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x9')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0xa')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0xb')));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0xc')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/userVoiceQueueRt/userVoiceQueueRt.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0xd')));_0x4292b2=_['merge'](_0x4292b2,require('../api/mailAccount/mailAccount.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0xe')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0xf')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x10')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x11')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x12')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x13')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x14')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x15')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x16')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x17')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x18')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x19')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x1a')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/smsMessage/smsMessage.rpc'));_0x4292b2=_['merge'](_0x4292b2,require('../api/smsQueue/smsQueue.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x1b')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/openchannelInteraction/openchannelInteraction.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x1c')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x1d')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/openchannelQueueReport/openchannelQueueReport.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x1e')));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x1f')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x20')));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x21')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/cmHopper/cmHopper.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x22')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/cmHopperFinal/cmHopperFinal.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x23')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/reportAgentPreview/reportAgentPreview.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x24')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x25')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x26')));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x27')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/trigger/trigger.rpc'));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x28')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x29')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x2a')));_0x4292b2=_['merge'](_0x4292b2,require('../api/intDeskAccount/intDeskAccount.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x2b')));_0x4292b2=_['merge'](_0x4292b2,require('../api/intZendeskAccount/intZendeskAccount.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x2c')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/intVtigerAccount/intVtigerAccount.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/intServicenowAccount/intServicenowAccount.rpc'));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x2d')));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x2e')));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x2f')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x30')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x31')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x32')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/squareOdbc/squareOdbc.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/squareProject/squareProject.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x33')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x34')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x35')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x36')));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x37')));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x38')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/whatsappInteraction/whatsappInteraction.rpc'));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require(_0x2581('0x39')));_0x4292b2=_[_0x2581('0x4')](_0x4292b2,require('../api/whatsappQueueReport/whatsappQueueReport.rpc'));_0x4292b2=_['merge'](_0x4292b2,require(_0x2581('0x3a')));var _0x1dd493=jayson['server'](_0x4292b2)['http']();var _0xc0ee5a=config['rpc'][_0x2581('0x3b')]||config['port']+0x1;var _0x3e833e=config[_0x2581('0x3c')]['ip']||_0x2581('0x3d');_0x1dd493['on'](_0x2581('0x3e'),function(_0x411f63){return _0xf9eb38(_0x411f63);});_0x1dd493[_0x2581('0x3')](_0xc0ee5a,_0x3e833e,function(){console[_0x2581('0x3f')](_0x2581('0x40'),_0x3e833e,_0xc0ee5a);require('../config/triggers')[_0x2581('0x41')]();return _0x3ffca(_0x2581('0x42')+_0x3e833e+':'+_0xc0ee5a);});});};