Built motion from commit (unavailable).|2.5.11
[motion2.git] / server / api / openchannelTransferReport / openchannelTransferReport.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 _0x5c17=['catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','OpenchannelTransferReport,\x20%s,\x20%s','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result'];(function(_0x36c331,_0x237d5a){var _0x1c4653=function(_0x4d1fab){while(--_0x4d1fab){_0x36c331['push'](_0x36c331['shift']());}};_0x1c4653(++_0x237d5a);}(_0x5c17,0x1ba));var _0x75c1=function(_0x36429b,_0x1b12e9){_0x36429b=_0x36429b-0x0;var _0x2ebfc0=_0x5c17[_0x36429b];return _0x2ebfc0;};'use strict';var _=require(_0x75c1('0x0'));var util=require(_0x75c1('0x1'));var moment=require('moment');var BPromise=require(_0x75c1('0x2'));var rs=require(_0x75c1('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x75c1('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x75c1('0x5'))(_0x75c1('0x6'));var config=require(_0x75c1('0x7'));var jayson=require(_0x75c1('0x8'));var client=jayson[_0x75c1('0x9')][_0x75c1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x43a58a,_0x3c80fe,_0x2b98bd){return new BPromise(function(_0x4a729f,_0x904874){return client['request'](_0x43a58a,_0x2b98bd)['then'](function(_0x110d36){logger[_0x75c1('0xb')](_0x75c1('0xc'),_0x3c80fe,'request\x20sent');logger[_0x75c1('0xd')](_0x75c1('0xe'),_0x3c80fe,_0x75c1('0xf'),JSON[_0x75c1('0x10')](_0x110d36));if(_0x110d36['error']){if(_0x110d36[_0x75c1('0x11')]['code']===0x1f4){logger['error'](_0x75c1('0xc'),_0x3c80fe,_0x110d36[_0x75c1('0x11')][_0x75c1('0x12')]);return _0x904874(_0x110d36[_0x75c1('0x11')]['message']);}logger[_0x75c1('0x11')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x3c80fe,_0x110d36[_0x75c1('0x11')]['message']);return _0x4a729f(_0x110d36[_0x75c1('0x11')][_0x75c1('0x12')]);}else{logger['info']('OpenchannelTransferReport,\x20%s,\x20%s',_0x3c80fe,_0x75c1('0xf'));_0x4a729f(_0x110d36[_0x75c1('0x13')]['message']);}})[_0x75c1('0x14')](function(_0x3f14f8){logger[_0x75c1('0x11')](_0x75c1('0xc'),_0x3c80fe,_0x3f14f8);_0x904874(_0x3f14f8);});});}