cb040061926209881e36b56ba3ffdb3001acc3a1
[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 _0xbbbd=['request\x20sent','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelTransferReport,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xbbbd,0x86));var _0xdbbb=function(_0xc8a931,_0x260690){_0xc8a931=_0xc8a931-0x0;var _0x28bd27=_0xbbbd[_0xc8a931];return _0x28bd27;};'use strict';var _=require(_0xdbbb('0x0'));var util=require(_0xdbbb('0x1'));var moment=require(_0xdbbb('0x2'));var BPromise=require(_0xdbbb('0x3'));var rs=require(_0xdbbb('0x4'));var fs=require('fs');var Redis=require(_0xdbbb('0x5'));var db=require(_0xdbbb('0x6'))['db'];var utils=require(_0xdbbb('0x7'));var logger=require(_0xdbbb('0x8'))(_0xdbbb('0x9'));var config=require(_0xdbbb('0xa'));var jayson=require(_0xdbbb('0xb'));var client=jayson['client'][_0xdbbb('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x42ea38,_0x197916,_0x478756){return new BPromise(function(_0x463ea6,_0x28a1fd){return client[_0xdbbb('0xd')](_0x42ea38,_0x478756)[_0xdbbb('0xe')](function(_0x2def2e){logger[_0xdbbb('0xf')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x197916,_0xdbbb('0x10'));logger['debug'](_0xdbbb('0x11'),_0x197916,'request\x20sent',JSON[_0xdbbb('0x12')](_0x2def2e));if(_0x2def2e[_0xdbbb('0x13')]){if(_0x2def2e[_0xdbbb('0x13')][_0xdbbb('0x14')]===0x1f4){logger[_0xdbbb('0x13')](_0xdbbb('0x15'),_0x197916,_0x2def2e[_0xdbbb('0x13')][_0xdbbb('0x16')]);return _0x28a1fd(_0x2def2e[_0xdbbb('0x13')]['message']);}logger[_0xdbbb('0x13')](_0xdbbb('0x15'),_0x197916,_0x2def2e[_0xdbbb('0x13')][_0xdbbb('0x16')]);return _0x463ea6(_0x2def2e[_0xdbbb('0x13')][_0xdbbb('0x16')]);}else{logger[_0xdbbb('0xf')](_0xdbbb('0x15'),_0x197916,_0xdbbb('0x10'));_0x463ea6(_0x2def2e[_0xdbbb('0x17')][_0xdbbb('0x16')]);}})[_0xdbbb('0x18')](function(_0x203feb){logger[_0xdbbb('0x13')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x197916,_0x203feb);_0x28a1fd(_0x203feb);});});}