Built motion from commit (unavailable).|2.5.21
[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 _0xf12f=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','error','code','OpenchannelTransferReport,\x20%s,\x20%s','message','result','catch'];(function(_0x3fd9d8,_0x9a1892){var _0x181131=function(_0x5a0d16){while(--_0x5a0d16){_0x3fd9d8['push'](_0x3fd9d8['shift']());}};_0x181131(++_0x9a1892);}(_0xf12f,0x78));var _0xff12=function(_0x4f2cfb,_0x28eaca){_0x4f2cfb=_0x4f2cfb-0x0;var _0x4dfc09=_0xf12f[_0x4f2cfb];return _0x4dfc09;};'use strict';var _=require('lodash');var util=require(_0xff12('0x0'));var moment=require(_0xff12('0x1'));var BPromise=require(_0xff12('0x2'));var rs=require(_0xff12('0x3'));var fs=require('fs');var Redis=require(_0xff12('0x4'));var db=require(_0xff12('0x5'))['db'];var utils=require(_0xff12('0x6'));var logger=require(_0xff12('0x7'))(_0xff12('0x8'));var config=require('../../config/environment');var jayson=require(_0xff12('0x9'));var client=jayson[_0xff12('0xa')][_0xff12('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x53d02f,_0x85537c,_0xad3920){return new BPromise(function(_0x38c663,_0x3dfdab){return client[_0xff12('0xc')](_0x53d02f,_0xad3920)[_0xff12('0xd')](function(_0x39a9cc){logger[_0xff12('0xe')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x85537c,_0xff12('0xf'));logger[_0xff12('0x10')](_0xff12('0x11'),_0x85537c,_0xff12('0xf'),JSON['stringify'](_0x39a9cc));if(_0x39a9cc[_0xff12('0x12')]){if(_0x39a9cc[_0xff12('0x12')][_0xff12('0x13')]===0x1f4){logger[_0xff12('0x12')](_0xff12('0x14'),_0x85537c,_0x39a9cc[_0xff12('0x12')][_0xff12('0x15')]);return _0x3dfdab(_0x39a9cc['error'][_0xff12('0x15')]);}logger[_0xff12('0x12')](_0xff12('0x14'),_0x85537c,_0x39a9cc[_0xff12('0x12')][_0xff12('0x15')]);return _0x38c663(_0x39a9cc[_0xff12('0x12')][_0xff12('0x15')]);}else{logger[_0xff12('0xe')](_0xff12('0x14'),_0x85537c,'request\x20sent');_0x38c663(_0x39a9cc[_0xff12('0x16')][_0xff12('0x15')]);}})[_0xff12('0x17')](function(_0x21162b){logger[_0xff12('0x12')](_0xff12('0x14'),_0x85537c,_0x21162b);_0x3dfdab(_0x21162b);});});}