Built motion from commit (unavailable).|2.5.30
[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 _0xc279=['error','code','message','result','catch','lodash','util','moment','randomstring','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s'];(function(_0x27948a,_0x1a9566){var _0x4b2eb6=function(_0x5d8339){while(--_0x5d8339){_0x27948a['push'](_0x27948a['shift']());}};_0x4b2eb6(++_0x1a9566);}(_0xc279,0x16a));var _0x9c27=function(_0x4a6bb7,_0x208f42){_0x4a6bb7=_0x4a6bb7-0x0;var _0x47afd8=_0xc279[_0x4a6bb7];return _0x47afd8;};'use strict';var _=require(_0x9c27('0x0'));var util=require(_0x9c27('0x1'));var moment=require(_0x9c27('0x2'));var BPromise=require('bluebird');var rs=require(_0x9c27('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x9c27('0x4'));var logger=require(_0x9c27('0x5'))('rpc');var config=require(_0x9c27('0x6'));var jayson=require(_0x9c27('0x7'));var client=jayson[_0x9c27('0x8')][_0x9c27('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3524d8,_0x2f7512,_0x41994b){return new BPromise(function(_0x1e0a61,_0x252a7c){return client['request'](_0x3524d8,_0x41994b)[_0x9c27('0xa')](function(_0x2ded39){logger[_0x9c27('0xb')](_0x9c27('0xc'),_0x2f7512,_0x9c27('0xd'));logger[_0x9c27('0xe')](_0x9c27('0xf'),_0x2f7512,_0x9c27('0xd'),JSON['stringify'](_0x2ded39));if(_0x2ded39[_0x9c27('0x10')]){if(_0x2ded39[_0x9c27('0x10')][_0x9c27('0x11')]===0x1f4){logger['error'](_0x9c27('0xc'),_0x2f7512,_0x2ded39[_0x9c27('0x10')][_0x9c27('0x12')]);return _0x252a7c(_0x2ded39['error'][_0x9c27('0x12')]);}logger['error'](_0x9c27('0xc'),_0x2f7512,_0x2ded39[_0x9c27('0x10')][_0x9c27('0x12')]);return _0x1e0a61(_0x2ded39[_0x9c27('0x10')][_0x9c27('0x12')]);}else{logger['info']('FaxTransferReport,\x20%s,\x20%s',_0x2f7512,'request\x20sent');_0x1e0a61(_0x2ded39[_0x9c27('0x13')][_0x9c27('0x12')]);}})[_0x9c27('0x14')](function(_0x1f5c34){logger['error']('FaxTransferReport,\x20%s,\x20%s',_0x2f7512,_0x1f5c34);_0x252a7c(_0x1f5c34);});});}