Built motion from commit (unavailable).|2.3.4
[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 _0xf603=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','code','error','message','lodash','util'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xf603,0x124));var _0x3f60=function(_0x259c61,_0x3225b7){_0x259c61=_0x259c61-0x0;var _0x335391=_0xf603[_0x259c61];return _0x335391;};'use strict';var _=require(_0x3f60('0x0'));var util=require(_0x3f60('0x1'));var moment=require('moment');var BPromise=require(_0x3f60('0x2'));var rs=require(_0x3f60('0x3'));var fs=require('fs');var Redis=require(_0x3f60('0x4'));var db=require(_0x3f60('0x5'))['db'];var utils=require(_0x3f60('0x6'));var logger=require(_0x3f60('0x7'))(_0x3f60('0x8'));var config=require(_0x3f60('0x9'));var jayson=require(_0x3f60('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x49a08c,_0x413b11,_0x43ec55){return new BPromise(function(_0x75bb34,_0x297c05){return client[_0x3f60('0xb')](_0x49a08c,_0x43ec55)[_0x3f60('0xc')](function(_0xb49f89){logger[_0x3f60('0xd')](_0x3f60('0xe'),_0x413b11,_0x3f60('0xf'));logger[_0x3f60('0x10')](_0x3f60('0x11'),_0x413b11,_0x3f60('0xf'),JSON['stringify'](_0xb49f89));if(_0xb49f89['error']){if(_0xb49f89['error'][_0x3f60('0x12')]===0x1f4){logger[_0x3f60('0x13')](_0x3f60('0xe'),_0x413b11,_0xb49f89['error'][_0x3f60('0x14')]);return _0x297c05(_0xb49f89[_0x3f60('0x13')]['message']);}logger[_0x3f60('0x13')](_0x3f60('0xe'),_0x413b11,_0xb49f89['error'][_0x3f60('0x14')]);return _0x75bb34(_0xb49f89['error'][_0x3f60('0x14')]);}else{logger[_0x3f60('0xd')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x413b11,_0x3f60('0xf'));_0x75bb34(_0xb49f89['result'][_0x3f60('0x14')]);}})['catch'](function(_0x219f16){logger[_0x3f60('0x13')](_0x3f60('0xe'),_0x413b11,_0x219f16);_0x297c05(_0x219f16);});});}