Built motion from commit (unavailable).|2.5.29
[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 _0x6ce6=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x379984,_0x35c427){var _0x5f2298=function(_0x28984d){while(--_0x28984d){_0x379984['push'](_0x379984['shift']());}};_0x5f2298(++_0x35c427);}(_0x6ce6,0x72));var _0x66ce=function(_0x1b0049,_0x1d8e04){_0x1b0049=_0x1b0049-0x0;var _0x1738b0=_0x6ce6[_0x1b0049];return _0x1738b0;};'use strict';var _=require('lodash');var util=require(_0x66ce('0x0'));var moment=require(_0x66ce('0x1'));var BPromise=require(_0x66ce('0x2'));var rs=require(_0x66ce('0x3'));var fs=require('fs');var Redis=require(_0x66ce('0x4'));var db=require(_0x66ce('0x5'))['db'];var utils=require(_0x66ce('0x6'));var logger=require(_0x66ce('0x7'))(_0x66ce('0x8'));var config=require(_0x66ce('0x9'));var jayson=require(_0x66ce('0xa'));var client=jayson[_0x66ce('0xb')][_0x66ce('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x586d1a,_0x5baa9a,_0x25f661){return new BPromise(function(_0x1eb2b0,_0x40c9a8){return client[_0x66ce('0xd')](_0x586d1a,_0x25f661)[_0x66ce('0xe')](function(_0x3ee062){logger['info'](_0x66ce('0xf'),_0x5baa9a,_0x66ce('0x10'));logger['debug'](_0x66ce('0x11'),_0x5baa9a,_0x66ce('0x10'),JSON[_0x66ce('0x12')](_0x3ee062));if(_0x3ee062[_0x66ce('0x13')]){if(_0x3ee062[_0x66ce('0x13')][_0x66ce('0x14')]===0x1f4){logger[_0x66ce('0x13')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x5baa9a,_0x3ee062['error'][_0x66ce('0x15')]);return _0x40c9a8(_0x3ee062[_0x66ce('0x13')][_0x66ce('0x15')]);}logger[_0x66ce('0x13')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x5baa9a,_0x3ee062[_0x66ce('0x13')][_0x66ce('0x15')]);return _0x1eb2b0(_0x3ee062[_0x66ce('0x13')][_0x66ce('0x15')]);}else{logger['info'](_0x66ce('0xf'),_0x5baa9a,_0x66ce('0x10'));_0x1eb2b0(_0x3ee062[_0x66ce('0x16')][_0x66ce('0x15')]);}})[_0x66ce('0x17')](function(_0x339bda){logger[_0x66ce('0x13')](_0x66ce('0xf'),_0x5baa9a,_0x339bda);_0x40c9a8(_0x339bda);});});}