Built motion from commit (unavailable).|2.5.7
[motion2.git] / server / services / email / 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 _0x7f90=['error','message','result','rpc','jayson/promise','bluebird','../../config/logger','routing','client','request','then','debug'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7f90,0xf4));var _0x07f9=function(_0xae76fd,_0x88f18f){_0xae76fd=_0xae76fd-0x0;var _0x338282=_0x7f90[_0xae76fd];return _0x338282;};'use strict';var jayson=require(_0x07f9('0x0'));var BPromise=require(_0x07f9('0x1'));var logger=require(_0x07f9('0x2'))(_0x07f9('0x3'));var client=jayson[_0x07f9('0x4')]['http']({'port':0x2329});client['Request']=function(_0x15b548,_0x132ae4){return new BPromise(function(_0x574e7d,_0x36a0f1){return client[_0x07f9('0x5')](_0x15b548,_0x132ae4)[_0x07f9('0x6')](function(_0x449544){logger[_0x07f9('0x7')]('rpc','routing',_0x15b548,_0x132ae4,_0x449544);if(_0x449544[_0x07f9('0x8')]){logger[_0x07f9('0x8')]('rpc',_0x07f9('0x3'),_0x15b548,_0x449544['error'][_0x07f9('0x9')],_0x132ae4);return _0x36a0f1(_0x449544[_0x07f9('0x8')][_0x07f9('0x9')]);}else{return _0x574e7d(_0x449544[_0x07f9('0xa')]);}})['catch'](function(_0x45e27){logger[_0x07f9('0x8')](_0x07f9('0xb'),_0x07f9('0x3'),_0x15b548,_0x45e27,_0x132ae4);return _0x36a0f1(_0x45e27);});});};module['exports']=client;