Built motion from commit (unavailable).|2.2.0
[motion2.git] / server / api / analyticTreeReport / analyticTreeReport.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 _0xf26c=['code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x32a28a,_0xf2e800){var _0x40c032=function(_0x170590){while(--_0x170590){_0x32a28a['push'](_0x32a28a['shift']());}};_0x40c032(++_0xf2e800);}(_0xf26c,0x68));var _0xcf26=function(_0x55795a,_0x53d9b5){_0x55795a=_0x55795a-0x0;var _0x26ffa5=_0xf26c[_0x55795a];return _0x26ffa5;};'use strict';var _=require(_0xcf26('0x0'));var util=require(_0xcf26('0x1'));var moment=require(_0xcf26('0x2'));var BPromise=require('bluebird');var rs=require(_0xcf26('0x3'));var fs=require('fs');var Redis=require(_0xcf26('0x4'));var db=require(_0xcf26('0x5'))['db'];var utils=require(_0xcf26('0x6'));var logger=require('../../config/logger')(_0xcf26('0x7'));var config=require(_0xcf26('0x8'));var jayson=require(_0xcf26('0x9'));var client=jayson[_0xcf26('0xa')][_0xcf26('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1ec823,_0x40972a,_0x296171){return new BPromise(function(_0xfe6800,_0x390070){return client[_0xcf26('0xc')](_0x1ec823,_0x296171)[_0xcf26('0xd')](function(_0x274742){logger[_0xcf26('0xe')](_0xcf26('0xf'),_0x40972a,_0xcf26('0x10'));logger[_0xcf26('0x11')](_0xcf26('0x12'),_0x40972a,'request\x20sent',JSON[_0xcf26('0x13')](_0x274742));if(_0x274742[_0xcf26('0x14')]){if(_0x274742[_0xcf26('0x14')][_0xcf26('0x15')]===0x1f4){logger[_0xcf26('0x14')]('AnalyticTreeReport,\x20%s,\x20%s',_0x40972a,_0x274742[_0xcf26('0x14')][_0xcf26('0x16')]);return _0x390070(_0x274742[_0xcf26('0x14')]['message']);}logger[_0xcf26('0x14')]('AnalyticTreeReport,\x20%s,\x20%s',_0x40972a,_0x274742[_0xcf26('0x14')]['message']);return _0xfe6800(_0x274742[_0xcf26('0x14')][_0xcf26('0x16')]);}else{logger[_0xcf26('0xe')](_0xcf26('0xf'),_0x40972a,_0xcf26('0x10'));_0xfe6800(_0x274742[_0xcf26('0x17')][_0xcf26('0x16')]);}})[_0xcf26('0x18')](function(_0x1533dd){logger[_0xcf26('0x14')]('AnalyticTreeReport,\x20%s,\x20%s',_0x40972a,_0x1533dd);_0x390070(_0x1533dd);});});}