Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / api / jscriptySessionReport / jscriptySessionReport.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 _0xfb7b=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','info','JscriptySessionReport,\x20%s,\x20%s','JscriptySessionReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','result','catch','lodash','util','moment','bluebird','ioredis'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xfb7b,0x1c9));var _0xbfb7=function(_0x3339dd,_0x8af397){_0x3339dd=_0x3339dd-0x0;var _0x4aaee2=_0xfb7b[_0x3339dd];return _0x4aaee2;};'use strict';var _=require(_0xbfb7('0x0'));var util=require(_0xbfb7('0x1'));var moment=require(_0xbfb7('0x2'));var BPromise=require(_0xbfb7('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbfb7('0x4'));var db=require(_0xbfb7('0x5'))['db'];var utils=require(_0xbfb7('0x6'));var logger=require(_0xbfb7('0x7'))(_0xbfb7('0x8'));var config=require(_0xbfb7('0x9'));var jayson=require(_0xbfb7('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3ac461,_0x172075,_0x36efb5){return new BPromise(function(_0x36391f,_0x48d7e9){return client[_0xbfb7('0xb')](_0x3ac461,_0x36efb5)['then'](function(_0x4f3b71){logger[_0xbfb7('0xc')](_0xbfb7('0xd'),_0x172075,'request\x20sent');logger['debug'](_0xbfb7('0xe'),_0x172075,_0xbfb7('0xf'),JSON[_0xbfb7('0x10')](_0x4f3b71));if(_0x4f3b71['error']){if(_0x4f3b71['error'][_0xbfb7('0x11')]===0x1f4){logger[_0xbfb7('0x12')](_0xbfb7('0xd'),_0x172075,_0x4f3b71[_0xbfb7('0x12')][_0xbfb7('0x13')]);return _0x48d7e9(_0x4f3b71[_0xbfb7('0x12')][_0xbfb7('0x13')]);}logger[_0xbfb7('0x12')](_0xbfb7('0xd'),_0x172075,_0x4f3b71[_0xbfb7('0x12')][_0xbfb7('0x13')]);return _0x36391f(_0x4f3b71['error'][_0xbfb7('0x13')]);}else{logger[_0xbfb7('0xc')](_0xbfb7('0xd'),_0x172075,_0xbfb7('0xf'));_0x36391f(_0x4f3b71[_0xbfb7('0x14')][_0xbfb7('0x13')]);}})[_0xbfb7('0x15')](function(_0xcbfcca){logger[_0xbfb7('0x12')]('JscriptySessionReport,\x20%s,\x20%s',_0x172075,_0xcbfcca);_0x48d7e9(_0xcbfcca);});});}