Built motion from commit ecb45b58.|2.6.31
[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 _0xa4cb=['../../config/logger','../../config/environment','jayson/promise','then','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','FaxTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x837dad,_0x1d9098){var _0x1d62d3=function(_0x40b7c1){while(--_0x40b7c1){_0x837dad['push'](_0x837dad['shift']());}};_0x1d62d3(++_0x1d9098);}(_0xa4cb,0x104));var _0xba4c=function(_0x1502cf,_0x58273f){_0x1502cf=_0x1502cf-0x0;var _0x298cda=_0xa4cb[_0x1502cf];return _0x298cda;};'use strict';var _=require(_0xba4c('0x0'));var util=require(_0xba4c('0x1'));var moment=require(_0xba4c('0x2'));var BPromise=require(_0xba4c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xba4c('0x4'));var db=require(_0xba4c('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xba4c('0x6'))('rpc');var config=require(_0xba4c('0x7'));var jayson=require(_0xba4c('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4857eb,_0x30bb75,_0x427280){return new BPromise(function(_0x27de73,_0xf63e2d){return client['request'](_0x4857eb,_0x427280)[_0xba4c('0x9')](function(_0x538c50){logger[_0xba4c('0xa')](_0xba4c('0xb'),_0x30bb75,_0xba4c('0xc'));logger['debug'](_0xba4c('0xd'),_0x30bb75,_0xba4c('0xc'),JSON['stringify'](_0x538c50));if(_0x538c50[_0xba4c('0xe')]){if(_0x538c50[_0xba4c('0xe')][_0xba4c('0xf')]===0x1f4){logger[_0xba4c('0xe')](_0xba4c('0xb'),_0x30bb75,_0x538c50[_0xba4c('0xe')][_0xba4c('0x10')]);return _0xf63e2d(_0x538c50[_0xba4c('0xe')][_0xba4c('0x10')]);}logger['error'](_0xba4c('0xb'),_0x30bb75,_0x538c50[_0xba4c('0xe')][_0xba4c('0x10')]);return _0x27de73(_0x538c50[_0xba4c('0xe')][_0xba4c('0x10')]);}else{logger[_0xba4c('0xa')](_0xba4c('0xb'),_0x30bb75,_0xba4c('0xc'));_0x27de73(_0x538c50[_0xba4c('0x11')][_0xba4c('0x10')]);}})[_0xba4c('0x12')](function(_0x1ffb4f){logger[_0xba4c('0xe')](_0xba4c('0xb'),_0x30bb75,_0x1ffb4f);_0xf63e2d(_0x1ffb4f);});});}