Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / chatTransferReport / chatTransferReport.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 _0x14f1=['result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','request\x20sent','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify','code','ChatTransferReport,\x20%s,\x20%s','message','error'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x14f1,0x15b));var _0x114f=function(_0x3efdc1,_0xef6c70){_0x3efdc1=_0x3efdc1-0x0;var _0xa84920=_0x14f1[_0x3efdc1];return _0xa84920;};'use strict';var _=require('lodash');var util=require(_0x114f('0x0'));var moment=require(_0x114f('0x1'));var BPromise=require(_0x114f('0x2'));var rs=require(_0x114f('0x3'));var fs=require('fs');var Redis=require(_0x114f('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x114f('0x5'));var logger=require(_0x114f('0x6'))(_0x114f('0x7'));var config=require(_0x114f('0x8'));var jayson=require(_0x114f('0x9'));var client=jayson[_0x114f('0xa')][_0x114f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x49cb08,_0x3a3985,_0x402873){return new BPromise(function(_0x538262,_0xe7fb20){return client['request'](_0x49cb08,_0x402873)['then'](function(_0xd73293){logger[_0x114f('0xc')]('ChatTransferReport,\x20%s,\x20%s',_0x3a3985,_0x114f('0xd'));logger[_0x114f('0xe')](_0x114f('0xf'),_0x3a3985,_0x114f('0xd'),JSON[_0x114f('0x10')](_0xd73293));if(_0xd73293['error']){if(_0xd73293['error'][_0x114f('0x11')]===0x1f4){logger['error'](_0x114f('0x12'),_0x3a3985,_0xd73293['error'][_0x114f('0x13')]);return _0xe7fb20(_0xd73293['error'][_0x114f('0x13')]);}logger[_0x114f('0x14')](_0x114f('0x12'),_0x3a3985,_0xd73293[_0x114f('0x14')][_0x114f('0x13')]);return _0x538262(_0xd73293[_0x114f('0x14')][_0x114f('0x13')]);}else{logger[_0x114f('0xc')](_0x114f('0x12'),_0x3a3985,_0x114f('0xd'));_0x538262(_0xd73293[_0x114f('0x15')]['message']);}})[_0x114f('0x16')](function(_0x1e0a2b){logger[_0x114f('0x14')]('ChatTransferReport,\x20%s,\x20%s',_0x3a3985,_0x1e0a2b);_0xe7fb20(_0x1e0a2b);});});}