Built motion from commit (unavailable).|2.5.31
[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 _0xe002=['debug','rpc','error','routing','message','catch','exports','jayson/promise','bluebird','../../config/logger','client','http','Request','request','then'];(function(_0x934425,_0x5af72f){var _0x31d596=function(_0x219869){while(--_0x219869){_0x934425['push'](_0x934425['shift']());}};_0x31d596(++_0x5af72f);}(_0xe002,0xf7));var _0x2e00=function(_0x10dc64,_0x11bb29){_0x10dc64=_0x10dc64-0x0;var _0x9cf98d=_0xe002[_0x10dc64];return _0x9cf98d;};'use strict';var jayson=require(_0x2e00('0x0'));var BPromise=require(_0x2e00('0x1'));var logger=require(_0x2e00('0x2'))('routing');var client=jayson[_0x2e00('0x3')][_0x2e00('0x4')]({'port':0x2329});client[_0x2e00('0x5')]=function(_0x5ea0f5,_0x34f964){return new BPromise(function(_0xba44f2,_0x2cb0ac){return client[_0x2e00('0x6')](_0x5ea0f5,_0x34f964)[_0x2e00('0x7')](function(_0x120155){logger[_0x2e00('0x8')](_0x2e00('0x9'),'routing',_0x5ea0f5,_0x34f964,_0x120155);if(_0x120155[_0x2e00('0xa')]){logger[_0x2e00('0xa')]('rpc',_0x2e00('0xb'),_0x5ea0f5,_0x120155[_0x2e00('0xa')][_0x2e00('0xc')],_0x34f964);return _0x2cb0ac(_0x120155[_0x2e00('0xa')]['message']);}else{return _0xba44f2(_0x120155['result']);}})[_0x2e00('0xd')](function(_0x217799){logger[_0x2e00('0xa')]('rpc',_0x2e00('0xb'),_0x5ea0f5,_0x217799,_0x34f964);return _0x2cb0ac(_0x217799);});});};module[_0x2e00('0xe')]=client;