Built motion from commit (unavailable).|2.5.24
[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 _0xeddd=['debug','rpc','error','message','result','catch','exports','jayson/promise','bluebird','../../config/logger','routing','http','request','then'];(function(_0x20b629,_0xd5ef6d){var _0x5c2541=function(_0x114a4a){while(--_0x114a4a){_0x20b629['push'](_0x20b629['shift']());}};_0x5c2541(++_0xd5ef6d);}(_0xeddd,0x69));var _0xdedd=function(_0x1969a7,_0x5a133a){_0x1969a7=_0x1969a7-0x0;var _0x3d665f=_0xeddd[_0x1969a7];return _0x3d665f;};'use strict';var jayson=require(_0xdedd('0x0'));var BPromise=require(_0xdedd('0x1'));var logger=require(_0xdedd('0x2'))(_0xdedd('0x3'));var client=jayson['client'][_0xdedd('0x4')]({'port':0x2329});client['Request']=function(_0x10de65,_0xd2ff49){return new BPromise(function(_0x56e22a,_0x37b819){return client[_0xdedd('0x5')](_0x10de65,_0xd2ff49)[_0xdedd('0x6')](function(_0x3e6b5a){logger[_0xdedd('0x7')](_0xdedd('0x8'),_0xdedd('0x3'),_0x10de65,_0xd2ff49,_0x3e6b5a);if(_0x3e6b5a[_0xdedd('0x9')]){logger[_0xdedd('0x9')](_0xdedd('0x8'),_0xdedd('0x3'),_0x10de65,_0x3e6b5a[_0xdedd('0x9')]['message'],_0xd2ff49);return _0x37b819(_0x3e6b5a[_0xdedd('0x9')][_0xdedd('0xa')]);}else{return _0x56e22a(_0x3e6b5a[_0xdedd('0xb')]);}})[_0xdedd('0xc')](function(_0x5db016){logger[_0xdedd('0x9')](_0xdedd('0x8'),_0xdedd('0x3'),_0x10de65,_0x5db016,_0xd2ff49);return _0x37b819(_0x5db016);});});};module[_0xdedd('0xd')]=client;