Built motion from commit (unavailable).|2.5.14
[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 _0x4cc6=['catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result'];(function(_0xae7c2f,_0xf31e04){var _0x5d7001=function(_0x4eeadb){while(--_0x4eeadb){_0xae7c2f['push'](_0xae7c2f['shift']());}};_0x5d7001(++_0xf31e04);}(_0x4cc6,0xd9));var _0x64cc=function(_0x3e112d,_0x2bb132){_0x3e112d=_0x3e112d-0x0;var _0x531c31=_0x4cc6[_0x3e112d];return _0x531c31;};'use strict';var _=require(_0x64cc('0x0'));var util=require(_0x64cc('0x1'));var moment=require(_0x64cc('0x2'));var BPromise=require(_0x64cc('0x3'));var rs=require(_0x64cc('0x4'));var fs=require('fs');var Redis=require(_0x64cc('0x5'));var db=require(_0x64cc('0x6'))['db'];var utils=require(_0x64cc('0x7'));var logger=require('../../config/logger')(_0x64cc('0x8'));var config=require(_0x64cc('0x9'));var jayson=require(_0x64cc('0xa'));var client=jayson['client'][_0x64cc('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x254374,_0x227e0d,_0x7c0aa4){return new BPromise(function(_0x346368,_0x40ce39){return client[_0x64cc('0xc')](_0x254374,_0x7c0aa4)[_0x64cc('0xd')](function(_0x233659){logger['info'](_0x64cc('0xe'),_0x227e0d,_0x64cc('0xf'));logger[_0x64cc('0x10')](_0x64cc('0x11'),_0x227e0d,_0x64cc('0xf'),JSON[_0x64cc('0x12')](_0x233659));if(_0x233659[_0x64cc('0x13')]){if(_0x233659['error']['code']===0x1f4){logger[_0x64cc('0x13')](_0x64cc('0xe'),_0x227e0d,_0x233659[_0x64cc('0x13')]['message']);return _0x40ce39(_0x233659[_0x64cc('0x13')][_0x64cc('0x14')]);}logger['error'](_0x64cc('0xe'),_0x227e0d,_0x233659[_0x64cc('0x13')][_0x64cc('0x14')]);return _0x346368(_0x233659['error'][_0x64cc('0x14')]);}else{logger[_0x64cc('0x15')](_0x64cc('0xe'),_0x227e0d,_0x64cc('0xf'));_0x346368(_0x233659[_0x64cc('0x16')][_0x64cc('0x14')]);}})[_0x64cc('0x17')](function(_0x3562c7){logger[_0x64cc('0x13')]('AnalyticFieldReport,\x20%s,\x20%s',_0x227e0d,_0x3562c7);_0x40ce39(_0x3562c7);});});}