Built motion from commit (unavailable).|2.4.18
[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 _0x1cfd=['jayson/promise','client','http','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x2e0dad,_0x30e121){var _0x5058fa=function(_0x279da4){while(--_0x279da4){_0x2e0dad['push'](_0x2e0dad['shift']());}};_0x5058fa(++_0x30e121);}(_0x1cfd,0x1db));var _0xd1cf=function(_0x14f7e5,_0x39527b){_0x14f7e5=_0x14f7e5-0x0;var _0xc2cdb9=_0x1cfd[_0x14f7e5];return _0xc2cdb9;};'use strict';var _=require(_0xd1cf('0x0'));var util=require(_0xd1cf('0x1'));var moment=require(_0xd1cf('0x2'));var BPromise=require(_0xd1cf('0x3'));var rs=require(_0xd1cf('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd1cf('0x5'))['db'];var utils=require(_0xd1cf('0x6'));var logger=require(_0xd1cf('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xd1cf('0x8'));var client=jayson[_0xd1cf('0x9')][_0xd1cf('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4a4879,_0x1bf822,_0x123b1d){return new BPromise(function(_0x36e860,_0x2f74dd){return client['request'](_0x4a4879,_0x123b1d)[_0xd1cf('0xb')](function(_0x69e911){logger[_0xd1cf('0xc')](_0xd1cf('0xd'),_0x1bf822,_0xd1cf('0xe'));logger[_0xd1cf('0xf')](_0xd1cf('0x10'),_0x1bf822,'request\x20sent',JSON[_0xd1cf('0x11')](_0x69e911));if(_0x69e911[_0xd1cf('0x12')]){if(_0x69e911[_0xd1cf('0x12')][_0xd1cf('0x13')]===0x1f4){logger[_0xd1cf('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x1bf822,_0x69e911[_0xd1cf('0x12')][_0xd1cf('0x14')]);return _0x2f74dd(_0x69e911[_0xd1cf('0x12')][_0xd1cf('0x14')]);}logger[_0xd1cf('0x12')](_0xd1cf('0xd'),_0x1bf822,_0x69e911['error'][_0xd1cf('0x14')]);return _0x36e860(_0x69e911[_0xd1cf('0x12')]['message']);}else{logger[_0xd1cf('0xc')](_0xd1cf('0xd'),_0x1bf822,_0xd1cf('0xe'));_0x36e860(_0x69e911[_0xd1cf('0x15')][_0xd1cf('0x14')]);}})[_0xd1cf('0x16')](function(_0x3180bd){logger[_0xd1cf('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x1bf822,_0x3180bd);_0x2f74dd(_0x3180bd);});});}