Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / routing / 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 _0xfc4b=['initAgents','getIntervals','initIntervals','getOpenchannelQueues','initOpenchannelQueues','getChatQueues','initChatQueues','initSmsQueues','getMailQueues','initMailQueues','getFaxQueues','initFaxQueues','initWhatsappQueues','listen','catch','log','./server','./realtime','./rpc/user','./rpc/interval','./rpc/openchannelQueue','./rpc/chatQueue','./rpc/smsQueue','./rpc/mailQueue','./rpc/faxQueue','then','getAgents'];(function(_0x424a9a,_0x2dd9af){var _0xa7831c=function(_0x512534){while(--_0x512534){_0x424a9a['push'](_0x424a9a['shift']());}};_0xa7831c(++_0x2dd9af);}(_0xfc4b,0xe8));var _0xbfc4=function(_0x523ac2,_0x18dbe9){_0x523ac2=_0x523ac2-0x0;var _0x5e91aa=_0xfc4b[_0x523ac2];return _0x5e91aa;};'use strict';var BPromise=require('bluebird');var server=require(_0xbfc4('0x0'));var Realtime=require(_0xbfc4('0x1'));var user=require(_0xbfc4('0x2'));var interval=require(_0xbfc4('0x3'));var openchannelQueue=require(_0xbfc4('0x4'));var chatQueue=require(_0xbfc4('0x5'));var smsQueue=require(_0xbfc4('0x6'));var mailQueue=require(_0xbfc4('0x7'));var faxQueue=require(_0xbfc4('0x8'));var whatsappQueue=require('./rpc/whatsappQueue');var realtime=new Realtime();function initRealtime(){return BPromise['resolve']()[_0xbfc4('0x9')](user[_0xbfc4('0xa')]())[_0xbfc4('0x9')](realtime[_0xbfc4('0xb')]())[_0xbfc4('0x9')](interval[_0xbfc4('0xc')]())[_0xbfc4('0x9')](realtime[_0xbfc4('0xd')]())[_0xbfc4('0x9')](openchannelQueue[_0xbfc4('0xe')]())[_0xbfc4('0x9')](realtime[_0xbfc4('0xf')]())[_0xbfc4('0x9')](chatQueue[_0xbfc4('0x10')]())[_0xbfc4('0x9')](realtime[_0xbfc4('0x11')]())[_0xbfc4('0x9')](smsQueue['getSmsQueues']())[_0xbfc4('0x9')](realtime[_0xbfc4('0x12')]())[_0xbfc4('0x9')](mailQueue[_0xbfc4('0x13')]())[_0xbfc4('0x9')](realtime[_0xbfc4('0x14')]())['then'](faxQueue[_0xbfc4('0x15')]())[_0xbfc4('0x9')](realtime[_0xbfc4('0x16')]())[_0xbfc4('0x9')](whatsappQueue['getWhatsappQueues']())[_0xbfc4('0x9')](realtime[_0xbfc4('0x17')]())[_0xbfc4('0x9')](function(){return realtime;});}function main(){return server[_0xbfc4('0x18')](realtime)[_0xbfc4('0x9')](function(_0x40b795){return initRealtime();})[_0xbfc4('0x9')](function(_0x373840){return setInterval(initRealtime,0x1388);})[_0xbfc4('0x19')](function(_0x215d90){console[_0xbfc4('0x1a')](_0x215d90);});}main();