Built motion from commit (unavailable).|2.5.27
[motion2.git] / server / api / faxTransferReport / faxTransferReport.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 _0x12c7=['client','http','request','then','info','FaxTransferReport,\x20%s,\x20%s','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x5d5892,_0xe4dc7b){var _0x46b936=function(_0x452e67){while(--_0x452e67){_0x5d5892['push'](_0x5d5892['shift']());}};_0x46b936(++_0xe4dc7b);}(_0x12c7,0x112));var _0x712c=function(_0x4ea569,_0x290307){_0x4ea569=_0x4ea569-0x0;var _0x51399a=_0x12c7[_0x4ea569];return _0x51399a;};'use strict';var _=require(_0x712c('0x0'));var util=require(_0x712c('0x1'));var moment=require(_0x712c('0x2'));var BPromise=require(_0x712c('0x3'));var rs=require(_0x712c('0x4'));var fs=require('fs');var Redis=require(_0x712c('0x5'));var db=require(_0x712c('0x6'))['db'];var utils=require(_0x712c('0x7'));var logger=require(_0x712c('0x8'))(_0x712c('0x9'));var config=require(_0x712c('0xa'));var jayson=require(_0x712c('0xb'));var client=jayson[_0x712c('0xc')][_0x712c('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x1f6670,_0x1715c3,_0x3aee18){return new BPromise(function(_0x22e9b8,_0x2fcc86){return client[_0x712c('0xe')](_0x1f6670,_0x3aee18)[_0x712c('0xf')](function(_0x582f3d){logger[_0x712c('0x10')](_0x712c('0x11'),_0x1715c3,'request\x20sent');logger[_0x712c('0x12')](_0x712c('0x13'),_0x1715c3,_0x712c('0x14'),JSON[_0x712c('0x15')](_0x582f3d));if(_0x582f3d[_0x712c('0x16')]){if(_0x582f3d[_0x712c('0x16')][_0x712c('0x17')]===0x1f4){logger['error'](_0x712c('0x11'),_0x1715c3,_0x582f3d[_0x712c('0x16')][_0x712c('0x18')]);return _0x2fcc86(_0x582f3d[_0x712c('0x16')][_0x712c('0x18')]);}logger['error'](_0x712c('0x11'),_0x1715c3,_0x582f3d[_0x712c('0x16')][_0x712c('0x18')]);return _0x22e9b8(_0x582f3d[_0x712c('0x16')][_0x712c('0x18')]);}else{logger[_0x712c('0x10')](_0x712c('0x11'),_0x1715c3,_0x712c('0x14'));_0x22e9b8(_0x582f3d[_0x712c('0x19')][_0x712c('0x18')]);}})['catch'](function(_0x10570f){logger[_0x712c('0x16')](_0x712c('0x11'),_0x1715c3,_0x10570f);_0x2fcc86(_0x10570f);});});}