Built motion from commit (unavailable).|2.5.2
[motion2.git] / server / api / analyticExtractedReport / analyticExtractedReport.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 _0x62ea=['rpc','../../config/environment','jayson/promise','client','http','request','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils'];(function(_0x3e201d,_0x349e8e){var _0x572624=function(_0x3e701c){while(--_0x3e701c){_0x3e201d['push'](_0x3e201d['shift']());}};_0x572624(++_0x349e8e);}(_0x62ea,0x189));var _0xa62e=function(_0x2f2cb6,_0x5f5576){_0x2f2cb6=_0x2f2cb6-0x0;var _0x33c4a7=_0x62ea[_0x2f2cb6];return _0x33c4a7;};'use strict';var _=require('lodash');var util=require(_0xa62e('0x0'));var moment=require(_0xa62e('0x1'));var BPromise=require(_0xa62e('0x2'));var rs=require(_0xa62e('0x3'));var fs=require('fs');var Redis=require(_0xa62e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xa62e('0x5'));var logger=require('../../config/logger')(_0xa62e('0x6'));var config=require(_0xa62e('0x7'));var jayson=require(_0xa62e('0x8'));var client=jayson[_0xa62e('0x9')][_0xa62e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x31b571,_0x1e46c7,_0x4a9806){return new BPromise(function(_0x42a992,_0x45e4be){return client[_0xa62e('0xb')](_0x31b571,_0x4a9806)['then'](function(_0xd5caa8){logger['info'](_0xa62e('0xc'),_0x1e46c7,_0xa62e('0xd'));logger[_0xa62e('0xe')](_0xa62e('0xf'),_0x1e46c7,'request\x20sent',JSON['stringify'](_0xd5caa8));if(_0xd5caa8[_0xa62e('0x10')]){if(_0xd5caa8['error'][_0xa62e('0x11')]===0x1f4){logger[_0xa62e('0x10')](_0xa62e('0xc'),_0x1e46c7,_0xd5caa8[_0xa62e('0x10')][_0xa62e('0x12')]);return _0x45e4be(_0xd5caa8['error'][_0xa62e('0x12')]);}logger['error'](_0xa62e('0xc'),_0x1e46c7,_0xd5caa8[_0xa62e('0x10')][_0xa62e('0x12')]);return _0x42a992(_0xd5caa8[_0xa62e('0x10')][_0xa62e('0x12')]);}else{logger['info'](_0xa62e('0xc'),_0x1e46c7,_0xa62e('0xd'));_0x42a992(_0xd5caa8[_0xa62e('0x13')][_0xa62e('0x12')]);}})[_0xa62e('0x14')](function(_0x333145){logger['error'](_0xa62e('0xc'),_0x1e46c7,_0x333145);_0x45e4be(_0x333145);});});}