Built motion from commit (unavailable).|2.5.30
[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 _0xa261=['../../config/logger','routing','client','http','Request','request','then','debug','error','rpc','message','result','catch','exports','jayson/promise'];(function(_0x39e84d,_0x11931d){var _0x1991bc=function(_0xc81e32){while(--_0xc81e32){_0x39e84d['push'](_0x39e84d['shift']());}};_0x1991bc(++_0x11931d);}(_0xa261,0x1a3));var _0x1a26=function(_0x878967,_0x351d5f){_0x878967=_0x878967-0x0;var _0x3b916b=_0xa261[_0x878967];return _0x3b916b;};'use strict';var jayson=require(_0x1a26('0x0'));var BPromise=require('bluebird');var logger=require(_0x1a26('0x1'))(_0x1a26('0x2'));var client=jayson[_0x1a26('0x3')][_0x1a26('0x4')]({'port':0x2329});client[_0x1a26('0x5')]=function(_0x54f768,_0x52360d){return new BPromise(function(_0x52a165,_0x10bec5){return client[_0x1a26('0x6')](_0x54f768,_0x52360d)[_0x1a26('0x7')](function(_0x392ee0){logger[_0x1a26('0x8')]('rpc',_0x1a26('0x2'),_0x54f768,_0x52360d,_0x392ee0);if(_0x392ee0['error']){logger[_0x1a26('0x9')](_0x1a26('0xa'),_0x1a26('0x2'),_0x54f768,_0x392ee0['error'][_0x1a26('0xb')],_0x52360d);return _0x10bec5(_0x392ee0[_0x1a26('0x9')][_0x1a26('0xb')]);}else{return _0x52a165(_0x392ee0[_0x1a26('0xc')]);}})[_0x1a26('0xd')](function(_0x576f93){logger[_0x1a26('0x9')](_0x1a26('0xa'),_0x1a26('0x2'),_0x54f768,_0x576f93,_0x52360d);return _0x10bec5(_0x576f93);});});};module[_0x1a26('0xe')]=client;