Built motion from commit 1fd437e9.|2.6.19
[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 _0x210c=['catch','exports','jayson/promise','bluebird','../../config/logger','routing','client','http','Request','request','rpc','error','message','result'];(function(_0x39afbe,_0x5b50c9){var _0x24311d=function(_0x295280){while(--_0x295280){_0x39afbe['push'](_0x39afbe['shift']());}};_0x24311d(++_0x5b50c9);}(_0x210c,0xf0));var _0xc210=function(_0x4a9beb,_0x159482){_0x4a9beb=_0x4a9beb-0x0;var _0x2d4c58=_0x210c[_0x4a9beb];return _0x2d4c58;};'use strict';var jayson=require(_0xc210('0x0'));var BPromise=require(_0xc210('0x1'));var logger=require(_0xc210('0x2'))(_0xc210('0x3'));var client=jayson[_0xc210('0x4')][_0xc210('0x5')]({'port':0x2329});client[_0xc210('0x6')]=function(_0x2f8223,_0x5a882b){return new BPromise(function(_0x128db3,_0x4fa6b6){return client[_0xc210('0x7')](_0x2f8223,_0x5a882b)['then'](function(_0x2f71d1){logger['debug'](_0xc210('0x8'),_0xc210('0x3'),_0x2f8223,_0x5a882b,_0x2f71d1);if(_0x2f71d1['error']){logger[_0xc210('0x9')](_0xc210('0x8'),_0xc210('0x3'),_0x2f8223,_0x2f71d1['error']['message'],_0x5a882b);return _0x4fa6b6(_0x2f71d1[_0xc210('0x9')][_0xc210('0xa')]);}else{return _0x128db3(_0x2f71d1[_0xc210('0xb')]);}})[_0xc210('0xc')](function(_0x2adf1b){logger['error'](_0xc210('0x8'),'routing',_0x2f8223,_0x2adf1b,_0x5a882b);return _0x4fa6b6(_0x2adf1b);});});};module[_0xc210('0xd')]=client;