Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / smsTransferReport / smsTransferReport.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 _0xa79a=['debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','request','then','info','SmsTransferReport,\x20%s,\x20%s','request\x20sent'];(function(_0x5ed54b,_0x3a2827){var _0x4b58c7=function(_0x19d3b6){while(--_0x19d3b6){_0x5ed54b['push'](_0x5ed54b['shift']());}};_0x4b58c7(++_0x3a2827);}(_0xa79a,0x143));var _0xaa79=function(_0x4df557,_0x27a29e){_0x4df557=_0x4df557-0x0;var _0x50c0df=_0xa79a[_0x4df557];return _0x50c0df;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xaa79('0x0'));var rs=require(_0xaa79('0x1'));var fs=require('fs');var Redis=require(_0xaa79('0x2'));var db=require(_0xaa79('0x3'))['db'];var utils=require(_0xaa79('0x4'));var logger=require(_0xaa79('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xaa79('0x6'));var client=jayson['client'][_0xaa79('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x56eaed,_0x12ee3c,_0x505e84){return new BPromise(function(_0x1a7066,_0x34d2f5){return client[_0xaa79('0x8')](_0x56eaed,_0x505e84)[_0xaa79('0x9')](function(_0x1a13cb){logger[_0xaa79('0xa')](_0xaa79('0xb'),_0x12ee3c,_0xaa79('0xc'));logger[_0xaa79('0xd')](_0xaa79('0xe'),_0x12ee3c,_0xaa79('0xc'),JSON[_0xaa79('0xf')](_0x1a13cb));if(_0x1a13cb['error']){if(_0x1a13cb['error'][_0xaa79('0x10')]===0x1f4){logger[_0xaa79('0x11')](_0xaa79('0xb'),_0x12ee3c,_0x1a13cb[_0xaa79('0x11')][_0xaa79('0x12')]);return _0x34d2f5(_0x1a13cb['error'][_0xaa79('0x12')]);}logger[_0xaa79('0x11')](_0xaa79('0xb'),_0x12ee3c,_0x1a13cb[_0xaa79('0x11')][_0xaa79('0x12')]);return _0x1a7066(_0x1a13cb[_0xaa79('0x11')][_0xaa79('0x12')]);}else{logger[_0xaa79('0xa')](_0xaa79('0xb'),_0x12ee3c,_0xaa79('0xc'));_0x1a7066(_0x1a13cb[_0xaa79('0x13')][_0xaa79('0x12')]);}})[_0xaa79('0x14')](function(_0x2bbc95){logger['error']('SmsTransferReport,\x20%s,\x20%s',_0x12ee3c,_0x2bbc95);_0x34d2f5(_0x2bbc95);});});}