Built motion from commit da617fac.|2.6.6
[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 _0xd86a=['debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent'];(function(_0x56c70f,_0x4e4493){var _0x3812ed=function(_0x25460f){while(--_0x25460f){_0x56c70f['push'](_0x56c70f['shift']());}};_0x3812ed(++_0x4e4493);}(_0xd86a,0x11a));var _0xad86=function(_0x2bf466,_0x4929a5){_0x2bf466=_0x2bf466-0x0;var _0x856885=_0xd86a[_0x2bf466];return _0x856885;};'use strict';var _=require(_0xad86('0x0'));var util=require(_0xad86('0x1'));var moment=require(_0xad86('0x2'));var BPromise=require(_0xad86('0x3'));var rs=require(_0xad86('0x4'));var fs=require('fs');var Redis=require(_0xad86('0x5'));var db=require(_0xad86('0x6'))['db'];var utils=require(_0xad86('0x7'));var logger=require(_0xad86('0x8'))(_0xad86('0x9'));var config=require(_0xad86('0xa'));var jayson=require(_0xad86('0xb'));var client=jayson[_0xad86('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x462e3c,_0x2b89c5,_0x4e03ae){return new BPromise(function(_0x3b3927,_0x1976b3){return client[_0xad86('0xd')](_0x462e3c,_0x4e03ae)[_0xad86('0xe')](function(_0x144ed8){logger[_0xad86('0xf')](_0xad86('0x10'),_0x2b89c5,_0xad86('0x11'));logger[_0xad86('0x12')](_0xad86('0x13'),_0x2b89c5,_0xad86('0x11'),JSON[_0xad86('0x14')](_0x144ed8));if(_0x144ed8[_0xad86('0x15')]){if(_0x144ed8[_0xad86('0x15')][_0xad86('0x16')]===0x1f4){logger[_0xad86('0x15')](_0xad86('0x10'),_0x2b89c5,_0x144ed8[_0xad86('0x15')][_0xad86('0x17')]);return _0x1976b3(_0x144ed8['error']['message']);}logger[_0xad86('0x15')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x2b89c5,_0x144ed8['error'][_0xad86('0x17')]);return _0x3b3927(_0x144ed8[_0xad86('0x15')][_0xad86('0x17')]);}else{logger[_0xad86('0xf')](_0xad86('0x10'),_0x2b89c5,_0xad86('0x11'));_0x3b3927(_0x144ed8[_0xad86('0x18')][_0xad86('0x17')]);}})['catch'](function(_0x53bf97){logger[_0xad86('0x15')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x2b89c5,_0x53bf97);_0x1976b3(_0x53bf97);});});}