Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / openchannelTransferReport / openchannelTransferReport.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 _0x8f85=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelTransferReport,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird'];(function(_0x32897b,_0x21bee8){var _0x4394ce=function(_0x2b7a5b){while(--_0x2b7a5b){_0x32897b['push'](_0x32897b['shift']());}};_0x4394ce(++_0x21bee8);}(_0x8f85,0x1b5));var _0x58f8=function(_0xaa1b3e,_0x47d976){_0xaa1b3e=_0xaa1b3e-0x0;var _0x454d7d=_0x8f85[_0xaa1b3e];return _0x454d7d;};'use strict';var _=require(_0x58f8('0x0'));var util=require(_0x58f8('0x1'));var moment=require('moment');var BPromise=require(_0x58f8('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x58f8('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x58f8('0x4'))(_0x58f8('0x5'));var config=require(_0x58f8('0x6'));var jayson=require(_0x58f8('0x7'));var client=jayson[_0x58f8('0x8')][_0x58f8('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3ad1c1,_0x481e3b,_0x4190ef){return new BPromise(function(_0x26b365,_0x51f7f1){return client[_0x58f8('0xa')](_0x3ad1c1,_0x4190ef)[_0x58f8('0xb')](function(_0xeb7bfc){logger[_0x58f8('0xc')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x481e3b,_0x58f8('0xd'));logger['debug'](_0x58f8('0xe'),_0x481e3b,_0x58f8('0xd'),JSON[_0x58f8('0xf')](_0xeb7bfc));if(_0xeb7bfc[_0x58f8('0x10')]){if(_0xeb7bfc[_0x58f8('0x10')][_0x58f8('0x11')]===0x1f4){logger[_0x58f8('0x10')](_0x58f8('0x12'),_0x481e3b,_0xeb7bfc['error'][_0x58f8('0x13')]);return _0x51f7f1(_0xeb7bfc[_0x58f8('0x10')]['message']);}logger[_0x58f8('0x10')](_0x58f8('0x12'),_0x481e3b,_0xeb7bfc[_0x58f8('0x10')][_0x58f8('0x13')]);return _0x26b365(_0xeb7bfc[_0x58f8('0x10')][_0x58f8('0x13')]);}else{logger['info'](_0x58f8('0x12'),_0x481e3b,_0x58f8('0xd'));_0x26b365(_0xeb7bfc[_0x58f8('0x14')][_0x58f8('0x13')]);}})[_0x58f8('0x15')](function(_0x57a0a4){logger[_0x58f8('0x10')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x481e3b,_0x57a0a4);_0x51f7f1(_0x57a0a4);});});}