1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xf680=['Request','request','then','debug','rpc','error','message','result','catch','exports','jayson/promise','bluebird','../../config/logger','routing','client','http'];(function(_0x134c2e,_0x3573c4){var _0x2825db=function(_0x2a574d){while(--_0x2a574d){_0x134c2e['push'](_0x134c2e['shift']());}};_0x2825db(++_0x3573c4);}(_0xf680,0x1ea));var _0x0f68=function(_0x1913d4,_0xde8b51){_0x1913d4=_0x1913d4-0x0;var _0xcbed2=_0xf680[_0x1913d4];return _0xcbed2;};'use strict';var jayson=require(_0x0f68('0x0'));var BPromise=require(_0x0f68('0x1'));var logger=require(_0x0f68('0x2'))(_0x0f68('0x3'));var client=jayson[_0x0f68('0x4')][_0x0f68('0x5')]({'port':0x2329});client[_0x0f68('0x6')]=function(_0x137170,_0xfcdc83){return new BPromise(function(_0x48eadb,_0x1cc266){return client[_0x0f68('0x7')](_0x137170,_0xfcdc83)[_0x0f68('0x8')](function(_0x581031){logger[_0x0f68('0x9')](_0x0f68('0xa'),_0x0f68('0x3'),_0x137170,_0xfcdc83,_0x581031);if(_0x581031[_0x0f68('0xb')]){logger[_0x0f68('0xb')](_0x0f68('0xa'),'routing',_0x137170,_0x581031[_0x0f68('0xb')][_0x0f68('0xc')],_0xfcdc83);return _0x1cc266(_0x581031[_0x0f68('0xb')][_0x0f68('0xc')]);}else{return _0x48eadb(_0x581031[_0x0f68('0xd')]);}})[_0x0f68('0xe')](function(_0x1bf1fd){logger[_0x0f68('0xb')](_0x0f68('0xa'),_0x0f68('0x3'),_0x137170,_0x1bf1fd,_0xfcdc83);return _0x1cc266(_0x1bf1fd);});});};module[_0x0f68('0xf')]=client;