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 _0x2209=['Request','request','then','debug','rpc','error','message','catch','exports','jayson/promise','bluebird','../../config/logger','routing','client'];(function(_0x2dbd5e,_0x202f18){var _0x41855f=function(_0x1c8ed3){while(--_0x1c8ed3){_0x2dbd5e['push'](_0x2dbd5e['shift']());}};_0x41855f(++_0x202f18);}(_0x2209,0x95));var _0x9220=function(_0x204969,_0x5d506e){_0x204969=_0x204969-0x0;var _0x53b296=_0x2209[_0x204969];return _0x53b296;};'use strict';var jayson=require(_0x9220('0x0'));var BPromise=require(_0x9220('0x1'));var logger=require(_0x9220('0x2'))(_0x9220('0x3'));var client=jayson[_0x9220('0x4')]['http']({'port':0x2329});client[_0x9220('0x5')]=function(_0x5cc72c,_0x348220){return new BPromise(function(_0x2fddae,_0xd76b9c){return client[_0x9220('0x6')](_0x5cc72c,_0x348220)[_0x9220('0x7')](function(_0x300ed6){logger[_0x9220('0x8')](_0x9220('0x9'),_0x9220('0x3'),_0x5cc72c,_0x348220,_0x300ed6);if(_0x300ed6['error']){logger[_0x9220('0xa')](_0x9220('0x9'),'routing',_0x5cc72c,_0x300ed6[_0x9220('0xa')][_0x9220('0xb')],_0x348220);return _0xd76b9c(_0x300ed6[_0x9220('0xa')][_0x9220('0xb')]);}else{return _0x2fddae(_0x300ed6['result']);}})[_0x9220('0xc')](function(_0x1cafe6){logger[_0x9220('0xa')](_0x9220('0x9'),_0x9220('0x3'),_0x5cc72c,_0x1cafe6,_0x348220);return _0xd76b9c(_0x1cafe6);});});};module[_0x9220('0xd')]=client;