Built motion from commit (unavailable).|2.5.8
[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 _0xc43c=['then','debug','rpc','error','message','result','catch','exports','jayson/promise','bluebird','../../config/logger','routing','client','http','request'];(function(_0x3b4cc0,_0xc189e0){var _0x5f0ce4=function(_0x34733f){while(--_0x34733f){_0x3b4cc0['push'](_0x3b4cc0['shift']());}};_0x5f0ce4(++_0xc189e0);}(_0xc43c,0x152));var _0xcc43=function(_0x4ee6fe,_0x16e14a){_0x4ee6fe=_0x4ee6fe-0x0;var _0x4a542a=_0xc43c[_0x4ee6fe];return _0x4a542a;};'use strict';var jayson=require(_0xcc43('0x0'));var BPromise=require(_0xcc43('0x1'));var logger=require(_0xcc43('0x2'))(_0xcc43('0x3'));var client=jayson[_0xcc43('0x4')][_0xcc43('0x5')]({'port':0x2329});client['Request']=function(_0x162a11,_0x258c7e){return new BPromise(function(_0x5c21a3,_0x1b589f){return client[_0xcc43('0x6')](_0x162a11,_0x258c7e)[_0xcc43('0x7')](function(_0x17d1a2){logger[_0xcc43('0x8')](_0xcc43('0x9'),_0xcc43('0x3'),_0x162a11,_0x258c7e,_0x17d1a2);if(_0x17d1a2[_0xcc43('0xa')]){logger[_0xcc43('0xa')](_0xcc43('0x9'),'routing',_0x162a11,_0x17d1a2[_0xcc43('0xa')][_0xcc43('0xb')],_0x258c7e);return _0x1b589f(_0x17d1a2[_0xcc43('0xa')][_0xcc43('0xb')]);}else{return _0x5c21a3(_0x17d1a2[_0xcc43('0xc')]);}})[_0xcc43('0xd')](function(_0x486779){logger[_0xcc43('0xa')](_0xcc43('0x9'),_0xcc43('0x3'),_0x162a11,_0x486779,_0x258c7e);return _0x1b589f(_0x486779);});});};module[_0xcc43('0xe')]=client;