Built motion from commit da24aabd.|2.6.20
[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 _0x9ec7=['http','Request','request','then','debug','rpc','routing','error','result','catch','jayson/promise','bluebird','../../config/logger','client'];(function(_0x4612df,_0x37a8f7){var _0x2804c6=function(_0x2b1979){while(--_0x2b1979){_0x4612df['push'](_0x4612df['shift']());}};_0x2804c6(++_0x37a8f7);}(_0x9ec7,0x88));var _0x79ec=function(_0x8a4c2a,_0xb64761){_0x8a4c2a=_0x8a4c2a-0x0;var _0x5055cc=_0x9ec7[_0x8a4c2a];return _0x5055cc;};'use strict';var jayson=require(_0x79ec('0x0'));var BPromise=require(_0x79ec('0x1'));var logger=require(_0x79ec('0x2'))('routing');var client=jayson[_0x79ec('0x3')][_0x79ec('0x4')]({'port':0x2329});client[_0x79ec('0x5')]=function(_0xca3688,_0x184937){return new BPromise(function(_0x4fcdf8,_0x4b89f8){return client[_0x79ec('0x6')](_0xca3688,_0x184937)[_0x79ec('0x7')](function(_0x344b19){logger[_0x79ec('0x8')](_0x79ec('0x9'),_0x79ec('0xa'),_0xca3688,_0x184937,_0x344b19);if(_0x344b19['error']){logger[_0x79ec('0xb')](_0x79ec('0x9'),_0x79ec('0xa'),_0xca3688,_0x344b19[_0x79ec('0xb')]['message'],_0x184937);return _0x4b89f8(_0x344b19[_0x79ec('0xb')]['message']);}else{return _0x4fcdf8(_0x344b19[_0x79ec('0xc')]);}})[_0x79ec('0xd')](function(_0x2022e2){logger[_0x79ec('0xb')](_0x79ec('0x9'),_0x79ec('0xa'),_0xca3688,_0x2022e2,_0x184937);return _0x4b89f8(_0x2022e2);});});};module['exports']=client;