Built motion from commit 58b0471d.|2.6.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 _0x535f=['util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','error','code','OpenchannelTransferReport,\x20%s,\x20%s','message','result','catch'];(function(_0x609988,_0x507944){var _0x159984=function(_0x39d9ce){while(--_0x39d9ce){_0x609988['push'](_0x609988['shift']());}};_0x159984(++_0x507944);}(_0x535f,0x111));var _0xf535=function(_0x1a6156,_0x85c3c){_0x1a6156=_0x1a6156-0x0;var _0x480dda=_0x535f[_0x1a6156];return _0x480dda;};'use strict';var _=require('lodash');var util=require(_0xf535('0x0'));var moment=require(_0xf535('0x1'));var BPromise=require('bluebird');var rs=require(_0xf535('0x2'));var fs=require('fs');var Redis=require(_0xf535('0x3'));var db=require(_0xf535('0x4'))['db'];var utils=require(_0xf535('0x5'));var logger=require('../../config/logger')(_0xf535('0x6'));var config=require(_0xf535('0x7'));var jayson=require(_0xf535('0x8'));var client=jayson[_0xf535('0x9')][_0xf535('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xc74104,_0x580328,_0x510b86){return new BPromise(function(_0x17f72e,_0x156c64){return client[_0xf535('0xb')](_0xc74104,_0x510b86)['then'](function(_0x244189){logger[_0xf535('0xc')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x580328,'request\x20sent');logger[_0xf535('0xd')](_0xf535('0xe'),_0x580328,'request\x20sent',JSON['stringify'](_0x244189));if(_0x244189[_0xf535('0xf')]){if(_0x244189[_0xf535('0xf')][_0xf535('0x10')]===0x1f4){logger[_0xf535('0xf')](_0xf535('0x11'),_0x580328,_0x244189['error'][_0xf535('0x12')]);return _0x156c64(_0x244189[_0xf535('0xf')][_0xf535('0x12')]);}logger[_0xf535('0xf')](_0xf535('0x11'),_0x580328,_0x244189[_0xf535('0xf')][_0xf535('0x12')]);return _0x17f72e(_0x244189[_0xf535('0xf')][_0xf535('0x12')]);}else{logger[_0xf535('0xc')](_0xf535('0x11'),_0x580328,'request\x20sent');_0x17f72e(_0x244189[_0xf535('0x13')][_0xf535('0x12')]);}})[_0xf535('0x14')](function(_0x3ffb1b){logger[_0xf535('0xf')](_0xf535('0x11'),_0x580328,_0x3ffb1b);_0x156c64(_0x3ffb1b);});});}