Built motion from commit e02f907f.|2.6.14
[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 _0x394e=['error','code','message','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x14b625,_0x16f1c0){var _0x955ac=function(_0x17845d){while(--_0x17845d){_0x14b625['push'](_0x14b625['shift']());}};_0x955ac(++_0x16f1c0);}(_0x394e,0x88));var _0xe394=function(_0x225a65,_0x106e43){_0x225a65=_0x225a65-0x0;var _0x240f37=_0x394e[_0x225a65];return _0x240f37;};'use strict';var _=require(_0xe394('0x0'));var util=require(_0xe394('0x1'));var moment=require('moment');var BPromise=require(_0xe394('0x2'));var rs=require(_0xe394('0x3'));var fs=require('fs');var Redis=require(_0xe394('0x4'));var db=require(_0xe394('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xe394('0x6'))(_0xe394('0x7'));var config=require(_0xe394('0x8'));var jayson=require(_0xe394('0x9'));var client=jayson[_0xe394('0xa')][_0xe394('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x337bff,_0x169910,_0xad826e){return new BPromise(function(_0x267d68,_0x1220a2){return client['request'](_0x337bff,_0xad826e)['then'](function(_0x5962d2){logger[_0xe394('0xc')](_0xe394('0xd'),_0x169910,_0xe394('0xe'));logger[_0xe394('0xf')](_0xe394('0x10'),_0x169910,_0xe394('0xe'),JSON[_0xe394('0x11')](_0x5962d2));if(_0x5962d2[_0xe394('0x12')]){if(_0x5962d2[_0xe394('0x12')][_0xe394('0x13')]===0x1f4){logger[_0xe394('0x12')](_0xe394('0xd'),_0x169910,_0x5962d2['error']['message']);return _0x1220a2(_0x5962d2['error'][_0xe394('0x14')]);}logger[_0xe394('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x169910,_0x5962d2[_0xe394('0x12')][_0xe394('0x14')]);return _0x267d68(_0x5962d2[_0xe394('0x12')][_0xe394('0x14')]);}else{logger[_0xe394('0xc')](_0xe394('0xd'),_0x169910,'request\x20sent');_0x267d68(_0x5962d2['result'][_0xe394('0x14')]);}})[_0xe394('0x15')](function(_0x3f11e7){logger[_0xe394('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x169910,_0x3f11e7);_0x1220a2(_0x3f11e7);});});}