Built motion from commit (unavailable).|2.5.10
[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 _0xc38a=['SmsTransferReport,\x20%s,\x20%s','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x2984c0,_0x233487){var _0x26eb73=function(_0x5c6a1f){while(--_0x5c6a1f){_0x2984c0['push'](_0x2984c0['shift']());}};_0x26eb73(++_0x233487);}(_0xc38a,0x193));var _0xac38=function(_0x100f8e,_0x1efaa3){_0x100f8e=_0x100f8e-0x0;var _0x5587df=_0xc38a[_0x100f8e];return _0x5587df;};'use strict';var _=require(_0xac38('0x0'));var util=require(_0xac38('0x1'));var moment=require(_0xac38('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xac38('0x3'));var db=require(_0xac38('0x4'))['db'];var utils=require(_0xac38('0x5'));var logger=require(_0xac38('0x6'))(_0xac38('0x7'));var config=require(_0xac38('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xac38('0x9')][_0xac38('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cc4d4,_0x43d54f,_0x2532d5){return new BPromise(function(_0x46b936,_0x525b09){return client['request'](_0x3cc4d4,_0x2532d5)[_0xac38('0xb')](function(_0x269f85){logger['info']('SmsTransferReport,\x20%s,\x20%s',_0x43d54f,_0xac38('0xc'));logger[_0xac38('0xd')](_0xac38('0xe'),_0x43d54f,'request\x20sent',JSON[_0xac38('0xf')](_0x269f85));if(_0x269f85[_0xac38('0x10')]){if(_0x269f85['error']['code']===0x1f4){logger[_0xac38('0x10')](_0xac38('0x11'),_0x43d54f,_0x269f85[_0xac38('0x10')][_0xac38('0x12')]);return _0x525b09(_0x269f85['error'][_0xac38('0x12')]);}logger[_0xac38('0x10')](_0xac38('0x11'),_0x43d54f,_0x269f85[_0xac38('0x10')][_0xac38('0x12')]);return _0x46b936(_0x269f85[_0xac38('0x10')][_0xac38('0x12')]);}else{logger['info']('SmsTransferReport,\x20%s,\x20%s',_0x43d54f,_0xac38('0xc'));_0x46b936(_0x269f85[_0xac38('0x13')][_0xac38('0x12')]);}})[_0xac38('0x14')](function(_0x350fda){logger[_0xac38('0x10')]('SmsTransferReport,\x20%s,\x20%s',_0x43d54f,_0x350fda);_0x525b09(_0x350fda);});});}