Built motion from commit 10af8726.|2.6.34
[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 _0xc59e=['rpc','../../config/environment','jayson/promise','client','http','request','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc59e,0x144));var _0xec59=function(_0x3517f4,_0x9a8b5){_0x3517f4=_0x3517f4-0x0;var _0x408c32=_0xc59e[_0x3517f4];return _0x408c32;};'use strict';var _=require(_0xec59('0x0'));var util=require(_0xec59('0x1'));var moment=require(_0xec59('0x2'));var BPromise=require(_0xec59('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xec59('0x4'));var db=require(_0xec59('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xec59('0x6'));var config=require(_0xec59('0x7'));var jayson=require(_0xec59('0x8'));var client=jayson[_0xec59('0x9')][_0xec59('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2a90dd,_0x572622,_0x25aa98){return new BPromise(function(_0x440186,_0x26f2bc){return client[_0xec59('0xb')](_0x2a90dd,_0x25aa98)['then'](function(_0x4c8289){logger[_0xec59('0xc')](_0xec59('0xd'),_0x572622,_0xec59('0xe'));logger[_0xec59('0xf')](_0xec59('0x10'),_0x572622,_0xec59('0xe'),JSON['stringify'](_0x4c8289));if(_0x4c8289['error']){if(_0x4c8289[_0xec59('0x11')][_0xec59('0x12')]===0x1f4){logger[_0xec59('0x11')]('FaxTransferReport,\x20%s,\x20%s',_0x572622,_0x4c8289[_0xec59('0x11')][_0xec59('0x13')]);return _0x26f2bc(_0x4c8289[_0xec59('0x11')][_0xec59('0x13')]);}logger[_0xec59('0x11')](_0xec59('0xd'),_0x572622,_0x4c8289[_0xec59('0x11')][_0xec59('0x13')]);return _0x440186(_0x4c8289[_0xec59('0x11')][_0xec59('0x13')]);}else{logger[_0xec59('0xc')](_0xec59('0xd'),_0x572622,'request\x20sent');_0x440186(_0x4c8289[_0xec59('0x14')]['message']);}})[_0xec59('0x15')](function(_0x33b4a9){logger[_0xec59('0x11')](_0xec59('0xd'),_0x572622,_0x33b4a9);_0x26f2bc(_0x33b4a9);});});}