Built motion from commit (unavailable).|2.5.9
[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 _0xa74a=['catch','lodash','util','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0xe2d092,_0x2a0ef3){var _0x31e036=function(_0x2f5b14){while(--_0x2f5b14){_0xe2d092['push'](_0xe2d092['shift']());}};_0x31e036(++_0x2a0ef3);}(_0xa74a,0x1ef));var _0xaa74=function(_0x4240d8,_0x4dba1b){_0x4240d8=_0x4240d8-0x0;var _0x3b42d4=_0xa74a[_0x4240d8];return _0x3b42d4;};'use strict';var _=require(_0xaa74('0x0'));var util=require(_0xaa74('0x1'));var moment=require('moment');var BPromise=require(_0xaa74('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xaa74('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xaa74('0x4'));var logger=require(_0xaa74('0x5'))(_0xaa74('0x6'));var config=require(_0xaa74('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xaa74('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x43004a,_0x2cefb0,_0x26aa4e){return new BPromise(function(_0x409d84,_0x12471b){return client['request'](_0x43004a,_0x26aa4e)['then'](function(_0x27c1ff){logger[_0xaa74('0x9')](_0xaa74('0xa'),_0x2cefb0,_0xaa74('0xb'));logger['debug'](_0xaa74('0xc'),_0x2cefb0,_0xaa74('0xb'),JSON[_0xaa74('0xd')](_0x27c1ff));if(_0x27c1ff[_0xaa74('0xe')]){if(_0x27c1ff[_0xaa74('0xe')][_0xaa74('0xf')]===0x1f4){logger[_0xaa74('0xe')](_0xaa74('0xa'),_0x2cefb0,_0x27c1ff[_0xaa74('0xe')][_0xaa74('0x10')]);return _0x12471b(_0x27c1ff['error'][_0xaa74('0x10')]);}logger[_0xaa74('0xe')]('FaxTransferReport,\x20%s,\x20%s',_0x2cefb0,_0x27c1ff[_0xaa74('0xe')]['message']);return _0x409d84(_0x27c1ff['error'][_0xaa74('0x10')]);}else{logger[_0xaa74('0x9')]('FaxTransferReport,\x20%s,\x20%s',_0x2cefb0,_0xaa74('0xb'));_0x409d84(_0x27c1ff[_0xaa74('0x11')]['message']);}})[_0xaa74('0x12')](function(_0x300626){logger['error'](_0xaa74('0xa'),_0x2cefb0,_0x300626);_0x12471b(_0x300626);});});}