Built motion from commit (unavailable).|2.5.0
[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 _0x1f75=['http','Request','request','then','debug','rpc','error','message','result','catch','routing','exports','jayson/promise','bluebird','../../config/logger','client'];(function(_0x43779b,_0x142556){var _0x4d9bba=function(_0x23e98a){while(--_0x23e98a){_0x43779b['push'](_0x43779b['shift']());}};_0x4d9bba(++_0x142556);}(_0x1f75,0x12c));var _0x51f7=function(_0x42245d,_0x51758f){_0x42245d=_0x42245d-0x0;var _0x4b211a=_0x1f75[_0x42245d];return _0x4b211a;};'use strict';var jayson=require(_0x51f7('0x0'));var BPromise=require(_0x51f7('0x1'));var logger=require(_0x51f7('0x2'))('routing');var client=jayson[_0x51f7('0x3')][_0x51f7('0x4')]({'port':0x2329});client[_0x51f7('0x5')]=function(_0x11265a,_0x3df27f){return new BPromise(function(_0x4e6fc,_0x205684){return client[_0x51f7('0x6')](_0x11265a,_0x3df27f)[_0x51f7('0x7')](function(_0x22fc29){logger[_0x51f7('0x8')](_0x51f7('0x9'),'routing',_0x11265a,_0x3df27f,_0x22fc29);if(_0x22fc29[_0x51f7('0xa')]){logger[_0x51f7('0xa')](_0x51f7('0x9'),'routing',_0x11265a,_0x22fc29['error'][_0x51f7('0xb')],_0x3df27f);return _0x205684(_0x22fc29[_0x51f7('0xa')]['message']);}else{return _0x4e6fc(_0x22fc29[_0x51f7('0xc')]);}})[_0x51f7('0xd')](function(_0x5f4a51){logger['error'](_0x51f7('0x9'),_0x51f7('0xe'),_0x11265a,_0x5f4a51,_0x3df27f);return _0x205684(_0x5f4a51);});});};module[_0x51f7('0xf')]=client;