Built motion from commit (unavailable).|2.5.29
[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 _0xbbb7=['result','catch','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x44e5f6,_0x1cdb43){var _0x350e0e=function(_0x329ed1){while(--_0x329ed1){_0x44e5f6['push'](_0x44e5f6['shift']());}};_0x350e0e(++_0x1cdb43);}(_0xbbb7,0x142));var _0x7bbb=function(_0x29357d,_0x5e7009){_0x29357d=_0x29357d-0x0;var _0x3cc4e3=_0xbbb7[_0x29357d];return _0x3cc4e3;};'use strict';var _=require(_0x7bbb('0x0'));var util=require('util');var moment=require(_0x7bbb('0x1'));var BPromise=require(_0x7bbb('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7bbb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x7bbb('0x4'));var logger=require(_0x7bbb('0x5'))(_0x7bbb('0x6'));var config=require(_0x7bbb('0x7'));var jayson=require(_0x7bbb('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4f9864,_0x535be0,_0x4e22c5){return new BPromise(function(_0x288e98,_0x5d2387){return client[_0x7bbb('0x9')](_0x4f9864,_0x4e22c5)['then'](function(_0x306915){logger[_0x7bbb('0xa')](_0x7bbb('0xb'),_0x535be0,_0x7bbb('0xc'));logger['debug'](_0x7bbb('0xd'),_0x535be0,_0x7bbb('0xc'),JSON[_0x7bbb('0xe')](_0x306915));if(_0x306915[_0x7bbb('0xf')]){if(_0x306915[_0x7bbb('0xf')][_0x7bbb('0x10')]===0x1f4){logger[_0x7bbb('0xf')](_0x7bbb('0xb'),_0x535be0,_0x306915['error']['message']);return _0x5d2387(_0x306915['error'][_0x7bbb('0x11')]);}logger[_0x7bbb('0xf')]('FaxTransferReport,\x20%s,\x20%s',_0x535be0,_0x306915[_0x7bbb('0xf')]['message']);return _0x288e98(_0x306915[_0x7bbb('0xf')][_0x7bbb('0x11')]);}else{logger[_0x7bbb('0xa')](_0x7bbb('0xb'),_0x535be0,_0x7bbb('0xc'));_0x288e98(_0x306915[_0x7bbb('0x12')][_0x7bbb('0x11')]);}})[_0x7bbb('0x13')](function(_0x1b3602){logger[_0x7bbb('0xf')](_0x7bbb('0xb'),_0x535be0,_0x1b3602);_0x5d2387(_0x1b3602);});});}