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 _0xad2c=['message','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelTransferReport,\x20%s,\x20%s'];(function(_0x2a9d5a,_0x223fe2){var _0x3a9722=function(_0x7637fb){while(--_0x7637fb){_0x2a9d5a['push'](_0x2a9d5a['shift']());}};_0x3a9722(++_0x223fe2);}(_0xad2c,0x13a));var _0xcad2=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0xad2c[_0xbca1b1];return _0x4e1686;};'use strict';var _=require(_0xcad2('0x0'));var util=require(_0xcad2('0x1'));var moment=require(_0xcad2('0x2'));var BPromise=require('bluebird');var rs=require(_0xcad2('0x3'));var fs=require('fs');var Redis=require(_0xcad2('0x4'));var db=require(_0xcad2('0x5'))['db'];var utils=require(_0xcad2('0x6'));var logger=require(_0xcad2('0x7'))('rpc');var config=require(_0xcad2('0x8'));var jayson=require(_0xcad2('0x9'));var client=jayson[_0xcad2('0xa')][_0xcad2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2ab190,_0xdadb5,_0x1f6f46){return new BPromise(function(_0x2c3483,_0x4fd657){return client[_0xcad2('0xc')](_0x2ab190,_0x1f6f46)[_0xcad2('0xd')](function(_0x3a2d16){logger[_0xcad2('0xe')]('OpenchannelTransferReport,\x20%s,\x20%s',_0xdadb5,_0xcad2('0xf'));logger[_0xcad2('0x10')](_0xcad2('0x11'),_0xdadb5,_0xcad2('0xf'),JSON[_0xcad2('0x12')](_0x3a2d16));if(_0x3a2d16[_0xcad2('0x13')]){if(_0x3a2d16[_0xcad2('0x13')][_0xcad2('0x14')]===0x1f4){logger[_0xcad2('0x13')](_0xcad2('0x15'),_0xdadb5,_0x3a2d16[_0xcad2('0x13')][_0xcad2('0x16')]);return _0x4fd657(_0x3a2d16[_0xcad2('0x13')][_0xcad2('0x16')]);}logger['error'](_0xcad2('0x15'),_0xdadb5,_0x3a2d16[_0xcad2('0x13')][_0xcad2('0x16')]);return _0x2c3483(_0x3a2d16[_0xcad2('0x13')][_0xcad2('0x16')]);}else{logger[_0xcad2('0xe')](_0xcad2('0x15'),_0xdadb5,'request\x20sent');_0x2c3483(_0x3a2d16['result'][_0xcad2('0x16')]);}})[_0xcad2('0x17')](function(_0x400b0b){logger[_0xcad2('0x13')](_0xcad2('0x15'),_0xdadb5,_0x400b0b);_0x4fd657(_0x400b0b);});});}