Built motion from commit 9e1399f3.|2.5.37
[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 _0x6dc6=['code','message','FaxTransferReport,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x51b3b6,_0x57fc11){var _0xf6020=function(_0x86d377){while(--_0x86d377){_0x51b3b6['push'](_0x51b3b6['shift']());}};_0xf6020(++_0x57fc11);}(_0x6dc6,0xeb));var _0x66dc=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6dc6[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x66dc('0x0'));var util=require(_0x66dc('0x1'));var moment=require(_0x66dc('0x2'));var BPromise=require(_0x66dc('0x3'));var rs=require(_0x66dc('0x4'));var fs=require('fs');var Redis=require(_0x66dc('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x66dc('0x6'));var logger=require('../../config/logger')(_0x66dc('0x7'));var config=require(_0x66dc('0x8'));var jayson=require(_0x66dc('0x9'));var client=jayson[_0x66dc('0xa')][_0x66dc('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x32a390,_0xd3f65b,_0x159c09){return new BPromise(function(_0xe7756c,_0x5664eb){return client[_0x66dc('0xc')](_0x32a390,_0x159c09)[_0x66dc('0xd')](function(_0x1480fc){logger['info']('FaxTransferReport,\x20%s,\x20%s',_0xd3f65b,_0x66dc('0xe'));logger['debug'](_0x66dc('0xf'),_0xd3f65b,_0x66dc('0xe'),JSON[_0x66dc('0x10')](_0x1480fc));if(_0x1480fc['error']){if(_0x1480fc[_0x66dc('0x11')][_0x66dc('0x12')]===0x1f4){logger[_0x66dc('0x11')]('FaxTransferReport,\x20%s,\x20%s',_0xd3f65b,_0x1480fc[_0x66dc('0x11')]['message']);return _0x5664eb(_0x1480fc['error'][_0x66dc('0x13')]);}logger['error'](_0x66dc('0x14'),_0xd3f65b,_0x1480fc[_0x66dc('0x11')]['message']);return _0xe7756c(_0x1480fc[_0x66dc('0x11')][_0x66dc('0x13')]);}else{logger['info'](_0x66dc('0x14'),_0xd3f65b,_0x66dc('0xe'));_0xe7756c(_0x1480fc[_0x66dc('0x15')][_0x66dc('0x13')]);}})[_0x66dc('0x16')](function(_0x47d543){logger[_0x66dc('0x11')](_0x66dc('0x14'),_0xd3f65b,_0x47d543);_0x5664eb(_0x47d543);});});}