Built motion from commit (unavailable).|2.4.4
[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 _0x08e9=['lodash','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','request','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch'];(function(_0x39e853,_0x16d356){var _0x3a0ddb=function(_0x3fef8c){while(--_0x3fef8c){_0x39e853['push'](_0x39e853['shift']());}};_0x3a0ddb(++_0x16d356);}(_0x08e9,0x156));var _0x908e=function(_0x13f159,_0x15c20d){_0x13f159=_0x13f159-0x0;var _0x11a6a9=_0x08e9[_0x13f159];return _0x11a6a9;};'use strict';var _=require(_0x908e('0x0'));var util=require('util');var moment=require(_0x908e('0x1'));var BPromise=require(_0x908e('0x2'));var rs=require(_0x908e('0x3'));var fs=require('fs');var Redis=require(_0x908e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x908e('0x5'));var logger=require('../../config/logger')(_0x908e('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x242bc1,_0x2387ca,_0x12e4c8){return new BPromise(function(_0x18a714,_0x1801d9){return client[_0x908e('0x7')](_0x242bc1,_0x12e4c8)['then'](function(_0x5d40e3){logger[_0x908e('0x8')](_0x908e('0x9'),_0x2387ca,_0x908e('0xa'));logger[_0x908e('0xb')](_0x908e('0xc'),_0x2387ca,_0x908e('0xa'),JSON[_0x908e('0xd')](_0x5d40e3));if(_0x5d40e3[_0x908e('0xe')]){if(_0x5d40e3[_0x908e('0xe')]['code']===0x1f4){logger[_0x908e('0xe')](_0x908e('0x9'),_0x2387ca,_0x5d40e3['error'][_0x908e('0xf')]);return _0x1801d9(_0x5d40e3[_0x908e('0xe')]['message']);}logger[_0x908e('0xe')]('FaxTransferReport,\x20%s,\x20%s',_0x2387ca,_0x5d40e3['error'][_0x908e('0xf')]);return _0x18a714(_0x5d40e3[_0x908e('0xe')][_0x908e('0xf')]);}else{logger[_0x908e('0x8')](_0x908e('0x9'),_0x2387ca,'request\x20sent');_0x18a714(_0x5d40e3[_0x908e('0x10')][_0x908e('0xf')]);}})[_0x908e('0x11')](function(_0x3fee23){logger[_0x908e('0xe')]('FaxTransferReport,\x20%s,\x20%s',_0x2387ca,_0x3fee23);_0x1801d9(_0x3fee23);});});}