Built motion from commit (unavailable).|2.5.12
[motion2.git] / server / api / analyticCustomReport / analyticCustomReport.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 _0xd668=['code','message','info','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','AnalyticCustomReport,\x20%s,\x20%s','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','request\x20sent','error'];(function(_0xfabc7b,_0x1e3a6c){var _0x401779=function(_0x1a32c8){while(--_0x1a32c8){_0xfabc7b['push'](_0xfabc7b['shift']());}};_0x401779(++_0x1e3a6c);}(_0xd668,0x15e));var _0x8d66=function(_0x2cbd2c,_0x3a4649){_0x2cbd2c=_0x2cbd2c-0x0;var _0x1e8fc1=_0xd668[_0x2cbd2c];return _0x1e8fc1;};'use strict';var _=require(_0x8d66('0x0'));var util=require(_0x8d66('0x1'));var moment=require(_0x8d66('0x2'));var BPromise=require(_0x8d66('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8d66('0x4'))['db'];var utils=require(_0x8d66('0x5'));var logger=require(_0x8d66('0x6'))(_0x8d66('0x7'));var config=require(_0x8d66('0x8'));var jayson=require(_0x8d66('0x9'));var client=jayson[_0x8d66('0xa')][_0x8d66('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5a4a94,_0x5324d9,_0x2f9e14){return new BPromise(function(_0xb83e19,_0x89e9c5){return client[_0x8d66('0xc')](_0x5a4a94,_0x2f9e14)[_0x8d66('0xd')](function(_0x1be178){logger['info'](_0x8d66('0xe'),_0x5324d9,'request\x20sent');logger['debug'](_0x8d66('0xf'),_0x5324d9,_0x8d66('0x10'),JSON['stringify'](_0x1be178));if(_0x1be178[_0x8d66('0x11')]){if(_0x1be178['error'][_0x8d66('0x12')]===0x1f4){logger[_0x8d66('0x11')](_0x8d66('0xe'),_0x5324d9,_0x1be178[_0x8d66('0x11')][_0x8d66('0x13')]);return _0x89e9c5(_0x1be178[_0x8d66('0x11')][_0x8d66('0x13')]);}logger['error'](_0x8d66('0xe'),_0x5324d9,_0x1be178[_0x8d66('0x11')][_0x8d66('0x13')]);return _0xb83e19(_0x1be178[_0x8d66('0x11')][_0x8d66('0x13')]);}else{logger[_0x8d66('0x14')](_0x8d66('0xe'),_0x5324d9,'request\x20sent');_0xb83e19(_0x1be178[_0x8d66('0x15')]['message']);}})[_0x8d66('0x16')](function(_0x57ad76){logger[_0x8d66('0x11')]('AnalyticCustomReport,\x20%s,\x20%s',_0x5324d9,_0x57ad76);_0x89e9c5(_0x57ad76);});});}