Built motion from commit (unavailable).|2.5.30
[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 _0x5f4e=['info','SmsTransferReport,\x20%s,\x20%s','request\x20sent','SmsTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then'];(function(_0xb7b104,_0x460753){var _0xcfc490=function(_0x3f00c7){while(--_0x3f00c7){_0xb7b104['push'](_0xb7b104['shift']());}};_0xcfc490(++_0x460753);}(_0x5f4e,0x183));var _0xe5f4=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x5f4e[_0x502c7d];return _0x30b7ed;};'use strict';var _=require('lodash');var util=require(_0xe5f4('0x0'));var moment=require(_0xe5f4('0x1'));var BPromise=require('bluebird');var rs=require(_0xe5f4('0x2'));var fs=require('fs');var Redis=require(_0xe5f4('0x3'));var db=require(_0xe5f4('0x4'))['db'];var utils=require(_0xe5f4('0x5'));var logger=require(_0xe5f4('0x6'))('rpc');var config=require(_0xe5f4('0x7'));var jayson=require(_0xe5f4('0x8'));var client=jayson['client'][_0xe5f4('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x106a48,_0x141863,_0x2251fb){return new BPromise(function(_0x2cbcb2,_0x5aa6a7){return client[_0xe5f4('0xa')](_0x106a48,_0x2251fb)[_0xe5f4('0xb')](function(_0x900769){logger[_0xe5f4('0xc')](_0xe5f4('0xd'),_0x141863,_0xe5f4('0xe'));logger['debug'](_0xe5f4('0xf'),_0x141863,_0xe5f4('0xe'),JSON['stringify'](_0x900769));if(_0x900769['error']){if(_0x900769[_0xe5f4('0x10')][_0xe5f4('0x11')]===0x1f4){logger[_0xe5f4('0x10')](_0xe5f4('0xd'),_0x141863,_0x900769['error'][_0xe5f4('0x12')]);return _0x5aa6a7(_0x900769[_0xe5f4('0x10')][_0xe5f4('0x12')]);}logger['error'](_0xe5f4('0xd'),_0x141863,_0x900769['error'][_0xe5f4('0x12')]);return _0x2cbcb2(_0x900769['error'][_0xe5f4('0x12')]);}else{logger[_0xe5f4('0xc')](_0xe5f4('0xd'),_0x141863,'request\x20sent');_0x2cbcb2(_0x900769[_0xe5f4('0x13')][_0xe5f4('0x12')]);}})[_0xe5f4('0x14')](function(_0x192553){logger[_0xe5f4('0x10')]('SmsTransferReport,\x20%s,\x20%s',_0x141863,_0x192553);_0x5aa6a7(_0x192553);});});}