Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / openchannelTransferReport / openchannelTransferReport.rpc.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 _0x5228=['../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis'];(function(_0x5a0ea2,_0x2c212d){var _0x5ec492=function(_0x1e33e6){while(--_0x1e33e6){_0x5a0ea2['push'](_0x5a0ea2['shift']());}};_0x5ec492(++_0x2c212d);}(_0x5228,0x10e));var _0x8522=function(_0x304d3f,_0x559e9d){_0x304d3f=_0x304d3f-0x0;var _0x1da477=_0x5228[_0x304d3f];return _0x1da477;};'use strict';var _=require(_0x8522('0x0'));var util=require('util');var moment=require(_0x8522('0x1'));var BPromise=require(_0x8522('0x2'));var rs=require(_0x8522('0x3'));var fs=require('fs');var Redis=require(_0x8522('0x4'));var db=require(_0x8522('0x5'))['db'];var utils=require(_0x8522('0x6'));var logger=require(_0x8522('0x7'))(_0x8522('0x8'));var config=require('../../config/environment');var jayson=require(_0x8522('0x9'));var client=jayson[_0x8522('0xa')][_0x8522('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x26e830,_0x2dc332,_0x2e3327){return new BPromise(function(_0x572df2,_0x1079af){return client[_0x8522('0xc')](_0x26e830,_0x2e3327)[_0x8522('0xd')](function(_0x5708d1){logger[_0x8522('0xe')](_0x8522('0xf'),_0x2dc332,_0x8522('0x10'));logger[_0x8522('0x11')](_0x8522('0x12'),_0x2dc332,_0x8522('0x10'),JSON[_0x8522('0x13')](_0x5708d1));if(_0x5708d1['error']){if(_0x5708d1[_0x8522('0x14')][_0x8522('0x15')]===0x1f4){logger['error'](_0x8522('0xf'),_0x2dc332,_0x5708d1[_0x8522('0x14')][_0x8522('0x16')]);return _0x1079af(_0x5708d1[_0x8522('0x14')][_0x8522('0x16')]);}logger[_0x8522('0x14')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x2dc332,_0x5708d1['error']['message']);return _0x572df2(_0x5708d1[_0x8522('0x14')]['message']);}else{logger[_0x8522('0xe')](_0x8522('0xf'),_0x2dc332,'request\x20sent');_0x572df2(_0x5708d1[_0x8522('0x17')][_0x8522('0x16')]);}})[_0x8522('0x18')](function(_0x59beb9){logger[_0x8522('0x14')](_0x8522('0xf'),_0x2dc332,_0x59beb9);_0x1079af(_0x59beb9);});});}