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 _0x37cc=['bluebird','../../config/logger','routing','client','http','request','then','debug','rpc','error','message','result','catch','exports','jayson/promise'];(function(_0x587cb6,_0x3089b6){var _0x458102=function(_0x513f58){while(--_0x513f58){_0x587cb6['push'](_0x587cb6['shift']());}};_0x458102(++_0x3089b6);}(_0x37cc,0x185));var _0xc37c=function(_0x327cbf,_0x114362){_0x327cbf=_0x327cbf-0x0;var _0x409cb8=_0x37cc[_0x327cbf];return _0x409cb8;};'use strict';var jayson=require(_0xc37c('0x0'));var BPromise=require(_0xc37c('0x1'));var logger=require(_0xc37c('0x2'))(_0xc37c('0x3'));var client=jayson[_0xc37c('0x4')][_0xc37c('0x5')]({'port':0x2329});client['Request']=function(_0x55b158,_0x334d3c){return new BPromise(function(_0x946e3b,_0x310b02){return client[_0xc37c('0x6')](_0x55b158,_0x334d3c)[_0xc37c('0x7')](function(_0x582100){logger[_0xc37c('0x8')](_0xc37c('0x9'),_0xc37c('0x3'),_0x55b158,_0x334d3c,_0x582100);if(_0x582100['error']){logger[_0xc37c('0xa')](_0xc37c('0x9'),_0xc37c('0x3'),_0x55b158,_0x582100[_0xc37c('0xa')][_0xc37c('0xb')],_0x334d3c);return _0x310b02(_0x582100['error'][_0xc37c('0xb')]);}else{return _0x946e3b(_0x582100[_0xc37c('0xc')]);}})[_0xc37c('0xd')](function(_0x262372){logger[_0xc37c('0xa')](_0xc37c('0x9'),_0xc37c('0x3'),_0x55b158,_0x262372,_0x334d3c);return _0x310b02(_0x262372);});});};module[_0xc37c('0xe')]=client;