618f09001b5c10a3195d069fd6b3c349179aff67
[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 _0x47ac=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','jayson/promise','client','http','request','then','info','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','FaxTransferReport,\x20%s,\x20%s','message','result','lodash'];(function(_0x28487d,_0x49eee8){var _0x2d9242=function(_0x5e0b0a){while(--_0x5e0b0a){_0x28487d['push'](_0x28487d['shift']());}};_0x2d9242(++_0x49eee8);}(_0x47ac,0x113));var _0xc47a=function(_0x75e77e,_0xb0323){_0x75e77e=_0x75e77e-0x0;var _0x43eff5=_0x47ac[_0x75e77e];return _0x43eff5;};'use strict';var _=require(_0xc47a('0x0'));var util=require(_0xc47a('0x1'));var moment=require(_0xc47a('0x2'));var BPromise=require(_0xc47a('0x3'));var rs=require(_0xc47a('0x4'));var fs=require('fs');var Redis=require(_0xc47a('0x5'));var db=require(_0xc47a('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xc47a('0x7'));var config=require('../../config/environment');var jayson=require(_0xc47a('0x8'));var client=jayson[_0xc47a('0x9')][_0xc47a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x172b2f,_0x5ee1fd,_0x31b505){return new BPromise(function(_0x1b6d6c,_0x512fec){return client[_0xc47a('0xb')](_0x172b2f,_0x31b505)[_0xc47a('0xc')](function(_0x331d96){logger[_0xc47a('0xd')]('FaxTransferReport,\x20%s,\x20%s',_0x5ee1fd,'request\x20sent');logger[_0xc47a('0xe')](_0xc47a('0xf'),_0x5ee1fd,_0xc47a('0x10'),JSON[_0xc47a('0x11')](_0x331d96));if(_0x331d96[_0xc47a('0x12')]){if(_0x331d96['error'][_0xc47a('0x13')]===0x1f4){logger['error'](_0xc47a('0x14'),_0x5ee1fd,_0x331d96[_0xc47a('0x12')]['message']);return _0x512fec(_0x331d96['error'][_0xc47a('0x15')]);}logger[_0xc47a('0x12')](_0xc47a('0x14'),_0x5ee1fd,_0x331d96[_0xc47a('0x12')]['message']);return _0x1b6d6c(_0x331d96[_0xc47a('0x12')][_0xc47a('0x15')]);}else{logger['info']('FaxTransferReport,\x20%s,\x20%s',_0x5ee1fd,_0xc47a('0x10'));_0x1b6d6c(_0x331d96[_0xc47a('0x16')][_0xc47a('0x15')]);}})['catch'](function(_0x3dc1a4){logger[_0xc47a('0x12')](_0xc47a('0x14'),_0x5ee1fd,_0x3dc1a4);_0x512fec(_0x3dc1a4);});});}