Built motion from commit (unavailable).|2.5.15
[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 _0x7149=['../../config/environment','jayson/promise','http','request','then','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','FaxTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x7149,0x85));var _0x9714=function(_0x21f9d7,_0x35b296){_0x21f9d7=_0x21f9d7-0x0;var _0x41ec91=_0x7149[_0x21f9d7];return _0x41ec91;};'use strict';var _=require(_0x9714('0x0'));var util=require(_0x9714('0x1'));var moment=require(_0x9714('0x2'));var BPromise=require(_0x9714('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9714('0x4'));var db=require(_0x9714('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9714('0x6'));var config=require(_0x9714('0x7'));var jayson=require(_0x9714('0x8'));var client=jayson['client'][_0x9714('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xcbb94a,_0x2ac4df,_0x4d76ff){return new BPromise(function(_0x15e3bb,_0x4aedd5){return client[_0x9714('0xa')](_0xcbb94a,_0x4d76ff)[_0x9714('0xb')](function(_0x5be48f){logger[_0x9714('0xc')](_0x9714('0xd'),_0x2ac4df,_0x9714('0xe'));logger['debug'](_0x9714('0xf'),_0x2ac4df,_0x9714('0xe'),JSON['stringify'](_0x5be48f));if(_0x5be48f[_0x9714('0x10')]){if(_0x5be48f['error'][_0x9714('0x11')]===0x1f4){logger[_0x9714('0x10')](_0x9714('0xd'),_0x2ac4df,_0x5be48f[_0x9714('0x10')][_0x9714('0x12')]);return _0x4aedd5(_0x5be48f[_0x9714('0x10')][_0x9714('0x12')]);}logger[_0x9714('0x10')](_0x9714('0xd'),_0x2ac4df,_0x5be48f['error']['message']);return _0x15e3bb(_0x5be48f[_0x9714('0x10')][_0x9714('0x12')]);}else{logger[_0x9714('0xc')](_0x9714('0xd'),_0x2ac4df,_0x9714('0xe'));_0x15e3bb(_0x5be48f[_0x9714('0x13')][_0x9714('0x12')]);}})['catch'](function(_0xded233){logger[_0x9714('0x10')]('FaxTransferReport,\x20%s,\x20%s',_0x2ac4df,_0xded233);_0x4aedd5(_0xded233);});});}