Built motion from commit (unavailable).|2.5.21
[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 _0x225c=['client','Request','request','then','debug','rpc','routing','error','message','catch','jayson/promise','bluebird'];(function(_0x4d0ddb,_0x5f4040){var _0x4a3d9a=function(_0x1ade40){while(--_0x1ade40){_0x4d0ddb['push'](_0x4d0ddb['shift']());}};_0x4a3d9a(++_0x5f4040);}(_0x225c,0x106));var _0xc225=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x225c[_0xa464c9];return _0x3d73c4;};'use strict';var jayson=require(_0xc225('0x0'));var BPromise=require(_0xc225('0x1'));var logger=require('../../config/logger')('routing');var client=jayson[_0xc225('0x2')]['http']({'port':0x2329});client[_0xc225('0x3')]=function(_0xc96c33,_0x4778ea){return new BPromise(function(_0x41eccd,_0x7a87bf){return client[_0xc225('0x4')](_0xc96c33,_0x4778ea)[_0xc225('0x5')](function(_0x54be3a){logger[_0xc225('0x6')](_0xc225('0x7'),_0xc225('0x8'),_0xc96c33,_0x4778ea,_0x54be3a);if(_0x54be3a[_0xc225('0x9')]){logger[_0xc225('0x9')]('rpc',_0xc225('0x8'),_0xc96c33,_0x54be3a['error'][_0xc225('0xa')],_0x4778ea);return _0x7a87bf(_0x54be3a[_0xc225('0x9')][_0xc225('0xa')]);}else{return _0x41eccd(_0x54be3a['result']);}})[_0xc225('0xb')](function(_0x1f2f4f){logger[_0xc225('0x9')](_0xc225('0x7'),_0xc225('0x8'),_0xc96c33,_0x1f2f4f,_0x4778ea);return _0x7a87bf(_0x1f2f4f);});});};module['exports']=client;