Built motion from commit (unavailable).|2.5.14
[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 _0xf6af=['catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x5c2362,_0x20efcc){var _0x259677=function(_0x509cf2){while(--_0x509cf2){_0x5c2362['push'](_0x5c2362['shift']());}};_0x259677(++_0x20efcc);}(_0xf6af,0xb0));var _0xff6a=function(_0x19c4fe,_0x3f793a){_0x19c4fe=_0x19c4fe-0x0;var _0x1c4084=_0xf6af[_0x19c4fe];return _0x1c4084;};'use strict';var _=require(_0xff6a('0x0'));var util=require('util');var moment=require(_0xff6a('0x1'));var BPromise=require(_0xff6a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xff6a('0x3'));var db=require(_0xff6a('0x4'))['db'];var utils=require(_0xff6a('0x5'));var logger=require(_0xff6a('0x6'))(_0xff6a('0x7'));var config=require(_0xff6a('0x8'));var jayson=require(_0xff6a('0x9'));var client=jayson[_0xff6a('0xa')][_0xff6a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xb0374a,_0x4b933f,_0x2cbed0){return new BPromise(function(_0x401bf7,_0x2d3e7a){return client[_0xff6a('0xc')](_0xb0374a,_0x2cbed0)[_0xff6a('0xd')](function(_0x586bf9){logger[_0xff6a('0xe')](_0xff6a('0xf'),_0x4b933f,_0xff6a('0x10'));logger[_0xff6a('0x11')](_0xff6a('0x12'),_0x4b933f,'request\x20sent',JSON[_0xff6a('0x13')](_0x586bf9));if(_0x586bf9[_0xff6a('0x14')]){if(_0x586bf9['error'][_0xff6a('0x15')]===0x1f4){logger[_0xff6a('0x14')](_0xff6a('0xf'),_0x4b933f,_0x586bf9[_0xff6a('0x14')]['message']);return _0x2d3e7a(_0x586bf9[_0xff6a('0x14')][_0xff6a('0x16')]);}logger[_0xff6a('0x14')](_0xff6a('0xf'),_0x4b933f,_0x586bf9[_0xff6a('0x14')][_0xff6a('0x16')]);return _0x401bf7(_0x586bf9['error']['message']);}else{logger['info'](_0xff6a('0xf'),_0x4b933f,_0xff6a('0x10'));_0x401bf7(_0x586bf9[_0xff6a('0x17')][_0xff6a('0x16')]);}})[_0xff6a('0x18')](function(_0x4f77a9){logger[_0xff6a('0x14')](_0xff6a('0xf'),_0x4b933f,_0x4f77a9);_0x2d3e7a(_0x4f77a9);});});}