Built motion from commit (unavailable).|2.5.19
[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 _0xa6e6=['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','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x42c8da,_0xa524a5){var _0x3a7206=function(_0x22d816){while(--_0x22d816){_0x42c8da['push'](_0x42c8da['shift']());}};_0x3a7206(++_0xa524a5);}(_0xa6e6,0x173));var _0x6a6e=function(_0x4c12ec,_0x2e9103){_0x4c12ec=_0x4c12ec-0x0;var _0x3ae42c=_0xa6e6[_0x4c12ec];return _0x3ae42c;};'use strict';var _=require(_0x6a6e('0x0'));var util=require('util');var moment=require(_0x6a6e('0x1'));var BPromise=require(_0x6a6e('0x2'));var rs=require(_0x6a6e('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6a6e('0x4'))['db'];var utils=require(_0x6a6e('0x5'));var logger=require(_0x6a6e('0x6'))('rpc');var config=require(_0x6a6e('0x7'));var jayson=require(_0x6a6e('0x8'));var client=jayson[_0x6a6e('0x9')][_0x6a6e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xa0c374,_0x137769,_0x4b1924){return new BPromise(function(_0x3db08b,_0x426f9c){return client[_0x6a6e('0xb')](_0xa0c374,_0x4b1924)[_0x6a6e('0xc')](function(_0xf47b18){logger[_0x6a6e('0xd')](_0x6a6e('0xe'),_0x137769,_0x6a6e('0xf'));logger[_0x6a6e('0x10')](_0x6a6e('0x11'),_0x137769,_0x6a6e('0xf'),JSON[_0x6a6e('0x12')](_0xf47b18));if(_0xf47b18[_0x6a6e('0x13')]){if(_0xf47b18[_0x6a6e('0x13')][_0x6a6e('0x14')]===0x1f4){logger['error'](_0x6a6e('0xe'),_0x137769,_0xf47b18[_0x6a6e('0x13')]['message']);return _0x426f9c(_0xf47b18[_0x6a6e('0x13')][_0x6a6e('0x15')]);}logger['error']('OpenchannelTransferReport,\x20%s,\x20%s',_0x137769,_0xf47b18['error'][_0x6a6e('0x15')]);return _0x3db08b(_0xf47b18[_0x6a6e('0x13')]['message']);}else{logger[_0x6a6e('0xd')](_0x6a6e('0xe'),_0x137769,'request\x20sent');_0x3db08b(_0xf47b18[_0x6a6e('0x16')][_0x6a6e('0x15')]);}})[_0x6a6e('0x17')](function(_0x3a38a3){logger[_0x6a6e('0x13')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x137769,_0x3a38a3);_0x426f9c(_0x3a38a3);});});}