Built motion from commit (unavailable).|2.4.7
[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 _0xbf0e=['../../config/environment','client','then','info','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelTransferReport,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x5d3aee,_0xe7253c){var _0x4af652=function(_0x5baab9){while(--_0x5baab9){_0x5d3aee['push'](_0x5d3aee['shift']());}};_0x4af652(++_0xe7253c);}(_0xbf0e,0x16e));var _0xebf0=function(_0x514c23,_0x41850f){_0x514c23=_0x514c23-0x0;var _0x54ec62=_0xbf0e[_0x514c23];return _0x54ec62;};'use strict';var _=require(_0xebf0('0x0'));var util=require('util');var moment=require(_0xebf0('0x1'));var BPromise=require(_0xebf0('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xebf0('0x3'));var db=require(_0xebf0('0x4'))['db'];var utils=require(_0xebf0('0x5'));var logger=require(_0xebf0('0x6'))(_0xebf0('0x7'));var config=require(_0xebf0('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xebf0('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4e6ca6,_0x14e9ea,_0x36b9b5){return new BPromise(function(_0x45dad2,_0xceebc1){return client['request'](_0x4e6ca6,_0x36b9b5)[_0xebf0('0xa')](function(_0xb4e33c){logger[_0xebf0('0xb')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x14e9ea,_0xebf0('0xc'));logger[_0xebf0('0xd')](_0xebf0('0xe'),_0x14e9ea,_0xebf0('0xc'),JSON[_0xebf0('0xf')](_0xb4e33c));if(_0xb4e33c[_0xebf0('0x10')]){if(_0xb4e33c['error'][_0xebf0('0x11')]===0x1f4){logger['error'](_0xebf0('0x12'),_0x14e9ea,_0xb4e33c['error'][_0xebf0('0x13')]);return _0xceebc1(_0xb4e33c[_0xebf0('0x10')][_0xebf0('0x13')]);}logger[_0xebf0('0x10')](_0xebf0('0x12'),_0x14e9ea,_0xb4e33c[_0xebf0('0x10')]['message']);return _0x45dad2(_0xb4e33c[_0xebf0('0x10')][_0xebf0('0x13')]);}else{logger[_0xebf0('0xb')](_0xebf0('0x12'),_0x14e9ea,_0xebf0('0xc'));_0x45dad2(_0xb4e33c[_0xebf0('0x14')][_0xebf0('0x13')]);}})[_0xebf0('0x15')](function(_0x5b9216){logger[_0xebf0('0x10')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x14e9ea,_0x5b9216);_0xceebc1(_0x5b9216);});});}