Built motion from commit 85328c08.|2.5.50
[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 _0x26d1=['OpenchannelTransferReport,\x20%s,\x20%s','message','lodash','moment','bluebird','randomstring','ioredis','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x494d1f,_0x3f72ff){var _0x457b6e=function(_0x38cb16){while(--_0x38cb16){_0x494d1f['push'](_0x494d1f['shift']());}};_0x457b6e(++_0x3f72ff);}(_0x26d1,0x8e));var _0x126d=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0x26d1[_0x2be8c2];return _0x97f531;};'use strict';var _=require(_0x126d('0x0'));var util=require('util');var moment=require(_0x126d('0x1'));var BPromise=require(_0x126d('0x2'));var rs=require(_0x126d('0x3'));var fs=require('fs');var Redis=require(_0x126d('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x126d('0x5'))('rpc');var config=require(_0x126d('0x6'));var jayson=require(_0x126d('0x7'));var client=jayson[_0x126d('0x8')][_0x126d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2b4dfc,_0x4e5e87,_0x2e668c){return new BPromise(function(_0x25ccc2,_0x7d6e4c){return client[_0x126d('0xa')](_0x2b4dfc,_0x2e668c)[_0x126d('0xb')](function(_0x1cf6fb){logger[_0x126d('0xc')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x4e5e87,_0x126d('0xd'));logger[_0x126d('0xe')](_0x126d('0xf'),_0x4e5e87,_0x126d('0xd'),JSON[_0x126d('0x10')](_0x1cf6fb));if(_0x1cf6fb['error']){if(_0x1cf6fb[_0x126d('0x11')]['code']===0x1f4){logger[_0x126d('0x11')](_0x126d('0x12'),_0x4e5e87,_0x1cf6fb[_0x126d('0x11')]['message']);return _0x7d6e4c(_0x1cf6fb[_0x126d('0x11')][_0x126d('0x13')]);}logger[_0x126d('0x11')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x4e5e87,_0x1cf6fb['error'][_0x126d('0x13')]);return _0x25ccc2(_0x1cf6fb[_0x126d('0x11')][_0x126d('0x13')]);}else{logger[_0x126d('0xc')](_0x126d('0x12'),_0x4e5e87,_0x126d('0xd'));_0x25ccc2(_0x1cf6fb['result'][_0x126d('0x13')]);}})['catch'](function(_0x352d72){logger['error'](_0x126d('0x12'),_0x4e5e87,_0x352d72);_0x7d6e4c(_0x352d72);});});}