Built motion from commit (unavailable).|2.5.4
[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 _0x37cc=['http','request','then','info','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelTransferReport,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x3d074c,_0x42725f){var _0x250a80=function(_0x4bc742){while(--_0x4bc742){_0x3d074c['push'](_0x3d074c['shift']());}};_0x250a80(++_0x42725f);}(_0x37cc,0x185));var _0xc37c=function(_0x133e3b,_0x443cd6){_0x133e3b=_0x133e3b-0x0;var _0x199e72=_0x37cc[_0x133e3b];return _0x199e72;};'use strict';var _=require(_0xc37c('0x0'));var util=require(_0xc37c('0x1'));var moment=require(_0xc37c('0x2'));var BPromise=require(_0xc37c('0x3'));var rs=require(_0xc37c('0x4'));var fs=require('fs');var Redis=require(_0xc37c('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xc37c('0x6'))(_0xc37c('0x7'));var config=require(_0xc37c('0x8'));var jayson=require(_0xc37c('0x9'));var client=jayson[_0xc37c('0xa')][_0xc37c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xd8f098,_0x1eaa97,_0x3c5c63){return new BPromise(function(_0x483c8d,_0x15a756){return client[_0xc37c('0xc')](_0xd8f098,_0x3c5c63)[_0xc37c('0xd')](function(_0x3526b5){logger[_0xc37c('0xe')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x1eaa97,_0xc37c('0xf'));logger[_0xc37c('0x10')](_0xc37c('0x11'),_0x1eaa97,_0xc37c('0xf'),JSON[_0xc37c('0x12')](_0x3526b5));if(_0x3526b5[_0xc37c('0x13')]){if(_0x3526b5[_0xc37c('0x13')][_0xc37c('0x14')]===0x1f4){logger[_0xc37c('0x13')](_0xc37c('0x15'),_0x1eaa97,_0x3526b5[_0xc37c('0x13')]['message']);return _0x15a756(_0x3526b5['error'][_0xc37c('0x16')]);}logger[_0xc37c('0x13')](_0xc37c('0x15'),_0x1eaa97,_0x3526b5[_0xc37c('0x13')][_0xc37c('0x16')]);return _0x483c8d(_0x3526b5[_0xc37c('0x13')]['message']);}else{logger[_0xc37c('0xe')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x1eaa97,_0xc37c('0xf'));_0x483c8d(_0x3526b5[_0xc37c('0x17')][_0xc37c('0x16')]);}})[_0xc37c('0x18')](function(_0x674ccf){logger['error']('OpenchannelTransferReport,\x20%s,\x20%s',_0x1eaa97,_0x674ccf);_0x15a756(_0x674ccf);});});}