Built motion from commit (unavailable).|2.5.9
[motion2.git] / server / api / analyticFieldReport / analyticFieldReport.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 _0x5e2f=['../../config/utils','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','code','AnalyticFieldReport,\x20%s,\x20%s','message','result','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x3b0da2,_0x306d66){var _0x45a240=function(_0x557598){while(--_0x557598){_0x3b0da2['push'](_0x3b0da2['shift']());}};_0x45a240(++_0x306d66);}(_0x5e2f,0xf7));var _0xf5e2=function(_0x950ed,_0x3f7409){_0x950ed=_0x950ed-0x0;var _0x3305cb=_0x5e2f[_0x950ed];return _0x3305cb;};'use strict';var _=require('lodash');var util=require(_0xf5e2('0x0'));var moment=require(_0xf5e2('0x1'));var BPromise=require(_0xf5e2('0x2'));var rs=require(_0xf5e2('0x3'));var fs=require('fs');var Redis=require(_0xf5e2('0x4'));var db=require(_0xf5e2('0x5'))['db'];var utils=require(_0xf5e2('0x6'));var logger=require('../../config/logger')(_0xf5e2('0x7'));var config=require('../../config/environment');var jayson=require(_0xf5e2('0x8'));var client=jayson[_0xf5e2('0x9')][_0xf5e2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x54b8fc,_0x25159a,_0x24f3cb){return new BPromise(function(_0x1495d1,_0x2522f8){return client[_0xf5e2('0xb')](_0x54b8fc,_0x24f3cb)[_0xf5e2('0xc')](function(_0x1a07bb){logger[_0xf5e2('0xd')]('AnalyticFieldReport,\x20%s,\x20%s',_0x25159a,_0xf5e2('0xe'));logger[_0xf5e2('0xf')](_0xf5e2('0x10'),_0x25159a,_0xf5e2('0xe'),JSON[_0xf5e2('0x11')](_0x1a07bb));if(_0x1a07bb[_0xf5e2('0x12')]){if(_0x1a07bb[_0xf5e2('0x12')][_0xf5e2('0x13')]===0x1f4){logger[_0xf5e2('0x12')](_0xf5e2('0x14'),_0x25159a,_0x1a07bb['error'][_0xf5e2('0x15')]);return _0x2522f8(_0x1a07bb[_0xf5e2('0x12')]['message']);}logger[_0xf5e2('0x12')](_0xf5e2('0x14'),_0x25159a,_0x1a07bb['error'][_0xf5e2('0x15')]);return _0x1495d1(_0x1a07bb[_0xf5e2('0x12')]['message']);}else{logger[_0xf5e2('0xd')]('AnalyticFieldReport,\x20%s,\x20%s',_0x25159a,_0xf5e2('0xe'));_0x1495d1(_0x1a07bb[_0xf5e2('0x16')][_0xf5e2('0x15')]);}})['catch'](function(_0x2541d9){logger['error']('AnalyticFieldReport,\x20%s,\x20%s',_0x25159a,_0x2541d9);_0x2522f8(_0x2541d9);});});}