Built motion from commit 87cd5f02.|2.5.48
[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 _0x8098=['message','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x8900b4,_0x4f02ee){var _0x4a7b0a=function(_0x24578b){while(--_0x24578b){_0x8900b4['push'](_0x8900b4['shift']());}};_0x4a7b0a(++_0x4f02ee);}(_0x8098,0x1ba));var _0x8809=function(_0xee34e4,_0x475367){_0xee34e4=_0xee34e4-0x0;var _0x50479e=_0x8098[_0xee34e4];return _0x50479e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x8809('0x0'));var BPromise=require(_0x8809('0x1'));var rs=require(_0x8809('0x2'));var fs=require('fs');var Redis=require(_0x8809('0x3'));var db=require(_0x8809('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x8809('0x5'))(_0x8809('0x6'));var config=require(_0x8809('0x7'));var jayson=require(_0x8809('0x8'));var client=jayson['client'][_0x8809('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2af39c,_0x54880c,_0x3f4bee){return new BPromise(function(_0x3fd084,_0x181e8b){return client[_0x8809('0xa')](_0x2af39c,_0x3f4bee)[_0x8809('0xb')](function(_0x34f85f){logger[_0x8809('0xc')](_0x8809('0xd'),_0x54880c,_0x8809('0xe'));logger[_0x8809('0xf')](_0x8809('0x10'),_0x54880c,_0x8809('0xe'),JSON[_0x8809('0x11')](_0x34f85f));if(_0x34f85f[_0x8809('0x12')]){if(_0x34f85f[_0x8809('0x12')][_0x8809('0x13')]===0x1f4){logger['error'](_0x8809('0xd'),_0x54880c,_0x34f85f[_0x8809('0x12')]['message']);return _0x181e8b(_0x34f85f[_0x8809('0x12')][_0x8809('0x14')]);}logger['error']('OpenchannelTransferReport,\x20%s,\x20%s',_0x54880c,_0x34f85f[_0x8809('0x12')][_0x8809('0x14')]);return _0x3fd084(_0x34f85f[_0x8809('0x12')][_0x8809('0x14')]);}else{logger[_0x8809('0xc')](_0x8809('0xd'),_0x54880c,_0x8809('0xe'));_0x3fd084(_0x34f85f['result'][_0x8809('0x14')]);}})[_0x8809('0x15')](function(_0x494814){logger[_0x8809('0x12')](_0x8809('0xd'),_0x54880c,_0x494814);_0x181e8b(_0x494814);});});}