Built motion from commit (unavailable).|2.0.71
[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 _0xf3ff=['error','result','catch','rpc','exports','jayson/promise','../../config/logger','routing','client','http','Request','request','debug'];(function(_0x2b0acc,_0x4ae9d9){var _0x4d2cfb=function(_0x45a5c8){while(--_0x45a5c8){_0x2b0acc['push'](_0x2b0acc['shift']());}};_0x4d2cfb(++_0x4ae9d9);}(_0xf3ff,0xae));var _0xff3f=function(_0x48be4e,_0x1d0c3a){_0x48be4e=_0x48be4e-0x0;var _0x4df953=_0xf3ff[_0x48be4e];return _0x4df953;};'use strict';var jayson=require(_0xff3f('0x0'));var BPromise=require('bluebird');var logger=require(_0xff3f('0x1'))(_0xff3f('0x2'));var client=jayson[_0xff3f('0x3')][_0xff3f('0x4')]({'port':0x2329});client[_0xff3f('0x5')]=function(_0x262446,_0x4aa1dc){return new BPromise(function(_0x2c62cc,_0x30f58e){return client[_0xff3f('0x6')](_0x262446,_0x4aa1dc)['then'](function(_0x3591f9){logger[_0xff3f('0x7')]('rpc',_0xff3f('0x2'),_0x262446,_0x4aa1dc,_0x3591f9);if(_0x3591f9[_0xff3f('0x8')]){logger['error']('rpc','routing',_0x262446,_0x3591f9[_0xff3f('0x8')]['message'],_0x4aa1dc);return _0x30f58e(_0x3591f9[_0xff3f('0x8')]['message']);}else{return _0x2c62cc(_0x3591f9[_0xff3f('0x9')]);}})[_0xff3f('0xa')](function(_0x2a76e0){logger[_0xff3f('0x8')](_0xff3f('0xb'),_0xff3f('0x2'),_0x262446,_0x2a76e0,_0x4aa1dc);return _0x30f58e(_0x2a76e0);});});};module[_0xff3f('0xc')]=client;