Built motion from commit (unavailable).|2.3.93
[motion2.git] / server / services / routing / client.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 _0x093a=['result','catch','bluebird','../../config/logger','routing','Request','request','then','debug','rpc','error','message'];(function(_0x36c6eb,_0x4fb127){var _0x30675b=function(_0x3a788b){while(--_0x3a788b){_0x36c6eb['push'](_0x36c6eb['shift']());}};_0x30675b(++_0x4fb127);}(_0x093a,0x16a));var _0xa093=function(_0x4f34d8,_0x40f022){_0x4f34d8=_0x4f34d8-0x0;var _0xc97536=_0x093a[_0x4f34d8];return _0xc97536;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0xa093('0x0'));var logger=require(_0xa093('0x1'))(_0xa093('0x2'));var client=jayson['client']['http']({'port':0x2329});client[_0xa093('0x3')]=function(_0xfdf0ec,_0x28d105){return new BPromise(function(_0x11e7a6,_0x879539){return client[_0xa093('0x4')](_0xfdf0ec,_0x28d105)[_0xa093('0x5')](function(_0x145f58){logger[_0xa093('0x6')](_0xa093('0x7'),_0xa093('0x2'),_0xfdf0ec,_0x28d105,_0x145f58);if(_0x145f58[_0xa093('0x8')]){logger[_0xa093('0x8')](_0xa093('0x7'),_0xa093('0x2'),_0xfdf0ec,_0x145f58[_0xa093('0x8')][_0xa093('0x9')],_0x28d105);return _0x879539(_0x145f58[_0xa093('0x8')][_0xa093('0x9')]);}else{return _0x11e7a6(_0x145f58[_0xa093('0xa')]);}})[_0xa093('0xb')](function(_0x488dc9){logger[_0xa093('0x8')](_0xa093('0x7'),_0xa093('0x2'),_0xfdf0ec,_0x488dc9,_0x28d105);return _0x879539(_0x488dc9);});});};module['exports']=client;