Built motion from commit (unavailable).|2.5.10
[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 _0xaf1d=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','ChatTransferReport,\x20%s,\x20%s','request\x20sent','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash'];(function(_0x56c9fe,_0x153e1c){var _0xc54f93=function(_0x32d90f){while(--_0x32d90f){_0x56c9fe['push'](_0x56c9fe['shift']());}};_0xc54f93(++_0x153e1c);}(_0xaf1d,0x95));var _0xdaf1=function(_0x2f8b82,_0x28d46f){_0x2f8b82=_0x2f8b82-0x0;var _0x1d6cbf=_0xaf1d[_0x2f8b82];return _0x1d6cbf;};'use strict';var _=require(_0xdaf1('0x0'));var util=require(_0xdaf1('0x1'));var moment=require(_0xdaf1('0x2'));var BPromise=require(_0xdaf1('0x3'));var rs=require(_0xdaf1('0x4'));var fs=require('fs');var Redis=require(_0xdaf1('0x5'));var db=require(_0xdaf1('0x6'))['db'];var utils=require(_0xdaf1('0x7'));var logger=require(_0xdaf1('0x8'))(_0xdaf1('0x9'));var config=require(_0xdaf1('0xa'));var jayson=require(_0xdaf1('0xb'));var client=jayson[_0xdaf1('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x570970,_0x33c57b,_0xee0636){return new BPromise(function(_0x35b098,_0x33c5a4){return client[_0xdaf1('0xd')](_0x570970,_0xee0636)[_0xdaf1('0xe')](function(_0x2c7601){logger[_0xdaf1('0xf')](_0xdaf1('0x10'),_0x33c57b,_0xdaf1('0x11'));logger['debug'](_0xdaf1('0x12'),_0x33c57b,_0xdaf1('0x11'),JSON[_0xdaf1('0x13')](_0x2c7601));if(_0x2c7601['error']){if(_0x2c7601[_0xdaf1('0x14')][_0xdaf1('0x15')]===0x1f4){logger['error'](_0xdaf1('0x10'),_0x33c57b,_0x2c7601['error'][_0xdaf1('0x16')]);return _0x33c5a4(_0x2c7601['error'][_0xdaf1('0x16')]);}logger['error'](_0xdaf1('0x10'),_0x33c57b,_0x2c7601['error'][_0xdaf1('0x16')]);return _0x35b098(_0x2c7601[_0xdaf1('0x14')][_0xdaf1('0x16')]);}else{logger[_0xdaf1('0xf')](_0xdaf1('0x10'),_0x33c57b,'request\x20sent');_0x35b098(_0x2c7601[_0xdaf1('0x17')][_0xdaf1('0x16')]);}})[_0xdaf1('0x18')](function(_0x50c68a){logger[_0xdaf1('0x14')]('ChatTransferReport,\x20%s,\x20%s',_0x33c57b,_0x50c68a);_0x33c5a4(_0x50c68a);});});}