Built motion from commit (unavailable).|2.5.14
[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 _0x4249=['then','request\x20sent','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','FaxTransferReport,\x20%s,\x20%s','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','http','request'];(function(_0x4ad4c3,_0x5bc645){var _0x42cdba=function(_0x2a36b4){while(--_0x2a36b4){_0x4ad4c3['push'](_0x4ad4c3['shift']());}};_0x42cdba(++_0x5bc645);}(_0x4249,0xa5));var _0x9424=function(_0x391a68,_0x25b598){_0x391a68=_0x391a68-0x0;var _0x29f68e=_0x4249[_0x391a68];return _0x29f68e;};'use strict';var _=require(_0x9424('0x0'));var util=require(_0x9424('0x1'));var moment=require(_0x9424('0x2'));var BPromise=require('bluebird');var rs=require(_0x9424('0x3'));var fs=require('fs');var Redis=require(_0x9424('0x4'));var db=require(_0x9424('0x5'))['db'];var utils=require(_0x9424('0x6'));var logger=require('../../config/logger')(_0x9424('0x7'));var config=require(_0x9424('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x9424('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x515b37,_0x128267,_0x5c4d5f){return new BPromise(function(_0x455e2d,_0x3a02e8){return client[_0x9424('0xa')](_0x515b37,_0x5c4d5f)[_0x9424('0xb')](function(_0x5d849a){logger['info']('FaxTransferReport,\x20%s,\x20%s',_0x128267,_0x9424('0xc'));logger['debug'](_0x9424('0xd'),_0x128267,_0x9424('0xc'),JSON[_0x9424('0xe')](_0x5d849a));if(_0x5d849a[_0x9424('0xf')]){if(_0x5d849a[_0x9424('0xf')][_0x9424('0x10')]===0x1f4){logger[_0x9424('0xf')]('FaxTransferReport,\x20%s,\x20%s',_0x128267,_0x5d849a[_0x9424('0xf')][_0x9424('0x11')]);return _0x3a02e8(_0x5d849a['error'][_0x9424('0x11')]);}logger['error']('FaxTransferReport,\x20%s,\x20%s',_0x128267,_0x5d849a[_0x9424('0xf')][_0x9424('0x11')]);return _0x455e2d(_0x5d849a[_0x9424('0xf')][_0x9424('0x11')]);}else{logger[_0x9424('0x12')](_0x9424('0x13'),_0x128267,'request\x20sent');_0x455e2d(_0x5d849a[_0x9424('0x14')][_0x9424('0x11')]);}})[_0x9424('0x15')](function(_0x1df69b){logger[_0x9424('0xf')](_0x9424('0x13'),_0x128267,_0x1df69b);_0x3a02e8(_0x1df69b);});});}