Built motion from commit (unavailable).|2.0.76
[motion2.git] / server / api / rpc / rpc.controller.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 _0x22c9=['INTERACTION','SIP/','agent','internal','AgentCapacity','telephones','Telephones','trunks','Trunks','campaigns','chatQueues','showChatQueues','mailQueues','showMailQueues','mailAccounts','MailAccounts','openchannelQueues','smsQueues','showSmsQueues','SmsQueues','faxQueues','FaxQueues','showFaxQueues','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','MailQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','FaxQueuesWaitingInteractions','queueNotify','chat','Website','Account','findOne','\x20Queue\x20not\x20found','Message','Interaction','update','queue','MessageId','From','QueueId','create','Start','*,*,*,*','agentNotify','channel','Channel\x20field\x20is\x20mandatory','capitalize','User','Agent\x20not\x20found','messageId','InteractionId','agentTransferTimeout','bluebird','moment','lodash','../../mysqldb','../../config/logger','api','http','client','request','error','code','message','catch','status','json','sendStatus','name','send','isNil','rows','find','voiceChannels','then','voiceChannelMixMonitor','VoiceChannelMixMonitor','query','params','voiceChannelStopMixMonitor','merge','voiceQueues','VoiceQueues','showVoiceQueues','voiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','voiceQueuesChannel','VoiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','outbound','OutboundChannels','Agents','agentCapacity','body','interaction','user','MemberReport','findAll','length','format','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','findOrCreate'];(function(_0x5f046f,_0x4e1683){var _0x14df04=function(_0x549554){while(--_0x549554){_0x5f046f['push'](_0x5f046f['shift']());}};_0x14df04(++_0x4e1683);}(_0x22c9,0x1e6));var _0x922c=function(_0x3635ce,_0x33a6f9){_0x3635ce=_0x3635ce-0x0;var _0x97ecd0=_0x22c9[_0x3635ce];return _0x97ecd0;};'use strict';var BPromise=require(_0x922c('0x0'));var moment=require(_0x922c('0x1'));var _=require(_0x922c('0x2'));var db=require(_0x922c('0x3'))['db'];var logger=require(_0x922c('0x4'))(_0x922c('0x5'));var jayson=require('jayson/promise');var amiClient=jayson['client'][_0x922c('0x6')]({'port':0x232a});var mailClient=jayson['client'][_0x922c('0x6')]({'port':0x232b});var routingClient=jayson[_0x922c('0x7')][_0x922c('0x6')]({'port':0x232c});function respondWithRpcPromise(_0x503650,_0x4f7468,_0x3b1d9d){return new BPromise(function(_0x42bea4,_0x1be699){var _0x151341=_0x3b1d9d?_0x3b1d9d:amiClient;return _0x151341[_0x922c('0x8')](_0x503650,_0x4f7468)['then'](function(_0x221675){if(_0x221675[_0x922c('0x9')]){if(_0x221675[_0x922c('0x9')][_0x922c('0xa')]===0x1f4){return _0x1be699(_0x221675[_0x922c('0x9')][_0x922c('0xb')]);}return _0x42bea4(_0x221675[_0x922c('0x9')][_0x922c('0xb')]);}else{_0x42bea4(_0x221675['result']);}})[_0x922c('0xc')](function(_0x161540){_0x1be699(_0x161540);});});}function respondWithResult(_0x426695,_0xe90513){_0xe90513=_0xe90513||0xc8;return function(_0x5c2d1d){if(_0x5c2d1d){return _0x426695[_0x922c('0xd')](_0xe90513)[_0x922c('0xe')](_0x5c2d1d);}return _0x426695[_0x922c('0xf')](0x194);};}function handleError(_0x9b26a5,_0x6fe9b1){_0x6fe9b1=_0x6fe9b1||0x1f4;return function(_0x3e31f2){logger['error'](_0x3e31f2['stack']);if(_0x3e31f2[_0x922c('0x10')]){delete _0x3e31f2[_0x922c('0x10')];}_0x9b26a5[_0x922c('0xd')](_0x6fe9b1)[_0x922c('0x11')](_0x3e31f2);};}function findById(_0x957bb4){return function(_0x5347f4){if(!_[_0x922c('0x12')](_0x957bb4)&&!_[_0x922c('0x12')](_0x5347f4)&&!_[_0x922c('0x12')](_0x5347f4[_0x922c('0x13')])){return _[_0x922c('0x14')](_0x5347f4['rows'],function(_0x2eb036){return _0x2eb036['id']==_0x957bb4;});}return null;};}exports[_0x922c('0x15')]=function(_0x5ba5cd,_0xcad783){return respondWithRpcPromise('VoiceChannels',_0x5ba5cd['query'])[_0x922c('0x16')](respondWithResult(_0xcad783,null))['catch'](handleError(_0xcad783,null));};exports[_0x922c('0x17')]=function(_0x4c51f3,_0x2fa36e){return respondWithRpcPromise(_0x922c('0x18'),_['merge'](_0x4c51f3[_0x922c('0x19')],_0x4c51f3[_0x922c('0x1a')]))[_0x922c('0x16')](respondWithResult(_0x2fa36e,null))['catch'](handleError(_0x2fa36e,null));};exports[_0x922c('0x1b')]=function(_0x1e1dd6,_0x57f214){return respondWithRpcPromise('VoiceChannelStopMixMonitor',_[_0x922c('0x1c')](_0x1e1dd6[_0x922c('0x19')],_0x1e1dd6[_0x922c('0x1a')]))[_0x922c('0x16')](respondWithResult(_0x57f214,null))[_0x922c('0xc')](handleError(_0x57f214,null));};exports[_0x922c('0x1d')]=function(_0xfbe168,_0x29a03e){return respondWithRpcPromise(_0x922c('0x1e'),_0xfbe168['query'])['then'](respondWithResult(_0x29a03e,null))['catch'](handleError(_0x29a03e,null));};exports[_0x922c('0x1f')]=function(_0x3c9fea,_0x35d9f3){return respondWithRpcPromise(_0x922c('0x1e'),_0x3c9fea['query'])['then'](findById(_0x3c9fea[_0x922c('0x1a')]['id']))['then'](respondWithResult(_0x35d9f3,null))[_0x922c('0xc')](handleError(_0x35d9f3,null));};exports[_0x922c('0x20')]=function(_0x5ff786,_0x3922ed){return respondWithRpcPromise('VoiceQueuesPreview',_[_0x922c('0x1c')](_0x5ff786[_0x922c('0x19')],_0x5ff786[_0x922c('0x1a')]))[_0x922c('0x16')](respondWithResult(_0x3922ed,null))['catch'](handleError(_0x3922ed,null));};exports[_0x922c('0x21')]=function(_0x4c2008,_0x339900){return respondWithRpcPromise(_0x922c('0x22'),_0x4c2008[_0x922c('0x19')])[_0x922c('0x16')](respondWithResult(_0x339900,null))[_0x922c('0xc')](handleError(_0x339900,null));};exports[_0x922c('0x23')]=function(_0x129064,_0x1c57c8){return respondWithRpcPromise(_0x922c('0x24'),_['merge'](_0x129064[_0x922c('0x19')],_0x129064[_0x922c('0x1a')]))['then'](respondWithResult(_0x1c57c8,null))[_0x922c('0xc')](handleError(_0x1c57c8,null));};exports[_0x922c('0x25')]=function(_0x4061b9,_0x1ca603){return respondWithRpcPromise(_0x922c('0x26'),_[_0x922c('0x1c')](_0x4061b9[_0x922c('0x19')],_0x4061b9[_0x922c('0x1a')]))[_0x922c('0x16')](respondWithResult(_0x1ca603,null))[_0x922c('0xc')](handleError(_0x1ca603,null));};exports[_0x922c('0x27')]=function(_0xa0630f,_0xe0ff5f){return respondWithRpcPromise('VoiceQueuesChannelRedirect',_[_0x922c('0x1c')](_0xa0630f[_0x922c('0x19')],_0xa0630f[_0x922c('0x1a')]))[_0x922c('0x16')](respondWithResult(_0xe0ff5f,null))[_0x922c('0xc')](handleError(_0xe0ff5f,null));};exports[_0x922c('0x28')]=function(_0x241633,_0x1e0ed8){return respondWithRpcPromise('Outbound',_0x241633[_0x922c('0x19')])[_0x922c('0x16')](respondWithResult(_0x1e0ed8,null))['catch'](handleError(_0x1e0ed8,null));};exports['outboundChannels']=function(_0x274e5e,_0x39a623){return respondWithRpcPromise(_0x922c('0x29'),_0x274e5e[_0x922c('0x19')])[_0x922c('0x16')](respondWithResult(_0x39a623,null))[_0x922c('0xc')](handleError(_0x39a623,null));};exports['agents']=function(_0x187e9a,_0xfeec37){var _0x3f2065;return respondWithRpcPromise('Agents',_0x187e9a['query'])[_0x922c('0x16')](function(_0x58852b){_0x3f2065=_0x58852b;return respondWithRpcPromise(_0x922c('0x2a'),_0x187e9a[_0x922c('0x19')],routingClient);})[_0x922c('0x16')](function(_0x4c5cc3){return _[_0x922c('0x1c')]({},_0x4c5cc3,_0x3f2065);})[_0x922c('0x16')](respondWithResult(_0xfeec37,null))[_0x922c('0xc')](handleError(_0xfeec37,null));};exports[_0x922c('0x2b')]=function(_0x261b7a,_0x2f0410){if(_0x261b7a[_0x922c('0x2c')]&&_0x261b7a['body'][_0x922c('0x2d')]&&_0x261b7a[_0x922c('0x2e')]&&_0x261b7a['user'][_0x922c('0x10')]){for(var _0x36c6fc in _0x261b7a['body'][_0x922c('0x2d')]){if(_0x261b7a['body'][_0x922c('0x2d')]['hasOwnProperty'](_0x36c6fc)){db[_0x922c('0x2f')][_0x922c('0x30')]({'where':{'channel':_0x36c6fc,'membername':_0x261b7a[_0x922c('0x2e')][_0x922c('0x10')],'type':'INTERACTION','exitAt':null,'uniqueid':_0x261b7a[_0x922c('0x2c')][_0x922c('0x2d')][_0x36c6fc]&&_0x261b7a[_0x922c('0x2c')][_0x922c('0x2d')][_0x36c6fc][_0x922c('0x31')]?{'$notIn':_0x261b7a[_0x922c('0x2c')]['interaction'][_0x36c6fc]}:{'$ne':null}}})[_0x922c('0x16')](function(_0x3162fd){var _0x52a076=moment()[_0x922c('0x32')](_0x922c('0x33'));for(var _0xc7f74b=0x0,_0x1ef140=_0x3162fd['length'];_0xc7f74b<_0x1ef140;_0xc7f74b+=0x1){_0x3162fd[_0xc7f74b][_0x922c('0x34')]({'exitAt':_0x52a076});}});for(var _0x1042c5=0x0;_0x1042c5<_0x261b7a[_0x922c('0x2c')][_0x922c('0x2d')][_0x36c6fc][_0x922c('0x31')];_0x1042c5+=0x1){db[_0x922c('0x2f')][_0x922c('0x35')]({'where':{'channel':_0x36c6fc,'membername':_0x261b7a[_0x922c('0x2e')][_0x922c('0x10')],'type':_0x922c('0x36'),'uniqueid':_0x261b7a[_0x922c('0x2c')][_0x922c('0x2d')][_0x36c6fc][_0x1042c5],'exitAt':null},'defaults':{'channel':_0x36c6fc,'membername':_0x261b7a['user'][_0x922c('0x10')],'interface':_0x922c('0x37')+_0x261b7a['user'][_0x922c('0x10')],'type':_0x922c('0x36'),'enterAt':moment()[_0x922c('0x32')]('YYYY-MM-DD\x20HH:mm:ss'),'role':_0x922c('0x38'),'internal':_0x261b7a['user'][_0x922c('0x39')],'uniqueid':_0x261b7a['body']['interaction'][_0x36c6fc][_0x1042c5]}});}}}}return respondWithRpcPromise(_0x922c('0x3a'),{'id':_0x261b7a[_0x922c('0x1a')]['id'],'capacity':_0x261b7a[_0x922c('0x2c')]['capacity']},routingClient)[_0x922c('0x16')](respondWithResult(_0x2f0410,null))[_0x922c('0xc')](handleError(_0x2f0410,null));};exports[_0x922c('0x3b')]=function(_0x5ad13d,_0x1bbab6){return respondWithRpcPromise(_0x922c('0x3c'),_0x5ad13d[_0x922c('0x19')])['then'](respondWithResult(_0x1bbab6,null))[_0x922c('0xc')](handleError(_0x1bbab6,null));};exports[_0x922c('0x3d')]=function(_0x3376c1,_0x57a055){return respondWithRpcPromise(_0x922c('0x3e'),_0x3376c1[_0x922c('0x19')])[_0x922c('0x16')](respondWithResult(_0x57a055,null))[_0x922c('0xc')](handleError(_0x57a055,null));};exports[_0x922c('0x3f')]=function(_0x560d4e,_0x1dad15){return respondWithRpcPromise('Campaigns',_0x560d4e[_0x922c('0x19')])[_0x922c('0x16')](respondWithResult(_0x1dad15,null))[_0x922c('0xc')](handleError(_0x1dad15,null));};exports[_0x922c('0x40')]=function(_0x15c608,_0x1af388){return respondWithRpcPromise('ChatQueues',_0x15c608[_0x922c('0x19')],routingClient)[_0x922c('0x16')](respondWithResult(_0x1af388,null))[_0x922c('0xc')](handleError(_0x1af388,null));};exports[_0x922c('0x41')]=function(_0x3521cf,_0x483aeb){return respondWithRpcPromise('ChatQueues',_0x3521cf[_0x922c('0x19')],routingClient)[_0x922c('0x16')](findById(_0x3521cf[_0x922c('0x1a')]['id']))['then'](respondWithResult(_0x483aeb,null))[_0x922c('0xc')](handleError(_0x483aeb,null));};exports[_0x922c('0x42')]=function(_0x472526,_0x316489){return respondWithRpcPromise('MailQueues',_0x472526[_0x922c('0x19')],routingClient)['then'](respondWithResult(_0x316489,null))[_0x922c('0xc')](handleError(_0x316489,null));};exports[_0x922c('0x43')]=function(_0x33a770,_0x524ed2){return respondWithRpcPromise('MailQueues',_0x33a770[_0x922c('0x19')],routingClient)[_0x922c('0x16')](findById(_0x33a770[_0x922c('0x1a')]['id']))[_0x922c('0x16')](respondWithResult(_0x524ed2,null))['catch'](handleError(_0x524ed2,null));};exports[_0x922c('0x44')]=function(_0x2d2344,_0x15fe3e){return respondWithRpcPromise(_0x922c('0x45'),_0x2d2344['query'],mailClient)[_0x922c('0x16')](respondWithResult(_0x15fe3e,null))[_0x922c('0xc')](handleError(_0x15fe3e,null));};exports[_0x922c('0x46')]=function(_0x56def5,_0x97b3ea){return respondWithRpcPromise('OpenchannelQueues',_0x56def5[_0x922c('0x19')],routingClient)[_0x922c('0x16')](respondWithResult(_0x97b3ea,null))[_0x922c('0xc')](handleError(_0x97b3ea,null));};exports['showOpenchannelQueues']=function(_0x40f98b,_0x3e94d4){return respondWithRpcPromise('OpenchannelQueues',_0x40f98b['query'],routingClient)[_0x922c('0x16')](findById(_0x40f98b[_0x922c('0x1a')]['id']))[_0x922c('0x16')](respondWithResult(_0x3e94d4,null))[_0x922c('0xc')](handleError(_0x3e94d4,null));};exports[_0x922c('0x47')]=function(_0x2c9f45,_0x3d3674){return respondWithRpcPromise('SmsQueues',_0x2c9f45[_0x922c('0x19')],routingClient)[_0x922c('0x16')](respondWithResult(_0x3d3674,null))['catch'](handleError(_0x3d3674,null));};exports[_0x922c('0x48')]=function(_0x4c1afe,_0x58bd0e){return respondWithRpcPromise(_0x922c('0x49'),_0x4c1afe[_0x922c('0x19')],routingClient)['then'](findById(_0x4c1afe[_0x922c('0x1a')]['id']))[_0x922c('0x16')](respondWithResult(_0x58bd0e,null))[_0x922c('0xc')](handleError(_0x58bd0e,null));};exports[_0x922c('0x4a')]=function(_0x4f5898,_0x34f67f){return respondWithRpcPromise(_0x922c('0x4b'),_0x4f5898[_0x922c('0x19')],routingClient)[_0x922c('0x16')](respondWithResult(_0x34f67f,null))[_0x922c('0xc')](handleError(_0x34f67f,null));};exports[_0x922c('0x4c')]=function(_0x4386d1,_0x20b906){return respondWithRpcPromise(_0x922c('0x4b'),_0x4386d1[_0x922c('0x19')],routingClient)[_0x922c('0x16')](findById(_0x4386d1[_0x922c('0x1a')]['id']))['then'](respondWithResult(_0x20b906,null))[_0x922c('0xc')](handleError(_0x20b906,null));};exports['faxAccounts']=function(_0xf0ed39,_0x263a29){return respondWithRpcPromise('FaxAccounts',_0xf0ed39[_0x922c('0x19')])[_0x922c('0x16')](respondWithResult(_0x263a29,null))['catch'](handleError(_0x263a29,null));};exports['chatQueuesWaitingInteractions']=function(_0x50e87e,_0x128414){return respondWithRpcPromise(_0x922c('0x4d'),_0x50e87e['query'],routingClient)['then'](respondWithResult(_0x128414,null))[_0x922c('0xc')](handleError(_0x128414,null));};exports[_0x922c('0x4e')]=function(_0x5294c2,_0x27c7d8){return respondWithRpcPromise(_0x922c('0x4f'),_0x5294c2[_0x922c('0x19')],routingClient)['then'](respondWithResult(_0x27c7d8,null))[_0x922c('0xc')](handleError(_0x27c7d8,null));};exports['openchannelQueuesWaitingInteractions']=function(_0x433f6d,_0x22ac00){return respondWithRpcPromise('OpenchannelQueuesWaitingInteractions',_0x433f6d[_0x922c('0x19')],routingClient)[_0x922c('0x16')](respondWithResult(_0x22ac00,null))[_0x922c('0xc')](handleError(_0x22ac00,null));};exports[_0x922c('0x50')]=function(_0x58172e,_0x42facf){return respondWithRpcPromise('SmsQueuesWaitingInteractions',_0x58172e[_0x922c('0x19')],routingClient)[_0x922c('0x16')](respondWithResult(_0x42facf,null))[_0x922c('0xc')](handleError(_0x42facf,null));};exports[_0x922c('0x51')]=function(_0x235bd8,_0x10b850){return respondWithRpcPromise(_0x922c('0x52'),_0x235bd8[_0x922c('0x19')],routingClient)[_0x922c('0x16')](respondWithResult(_0x10b850,null))[_0x922c('0xc')](handleError(_0x10b850,null));};exports[_0x922c('0x53')]=function(_0x3ea9db){return function(_0x206bb9,_0x2419e4){var _0x15b953,_0x16c218;var _0x17e947=_['capitalize'](_0x3ea9db);var _0x4982d8=_0x3ea9db===_0x922c('0x54')?_0x922c('0x55'):_0x922c('0x56');return db[_0x17e947+'Queue'][_0x922c('0x57')]({'raw':!![],'where':{'id':_0x206bb9[_0x922c('0x1a')]['id']}})[_0x922c('0x16')](function(_0x468263){if(_[_0x922c('0x12')](_0x468263)){throw new Error(_0x17e947+_0x922c('0x58'));}_0x15b953=_0x468263;return db[_0x17e947+_0x922c('0x59')][_0x922c('0x57')]({'where':{'id':_0x206bb9[_0x922c('0x2c')]['messageId']},'include':[{'model':db[_0x17e947+'Interaction'],'as':_0x922c('0x5a')},{'model':db[_0x17e947+_0x4982d8],'as':_0x922c('0x56')}]});})[_0x922c('0x16')](function(_0x24b502){if(_[_0x922c('0x12')](_0x24b502)){throw new Error(_0x17e947+'\x20Message\x20not\x20found');}_0x16c218=_0x24b502;return _0x24b502[_0x922c('0x5b')]({'read':0x0,'readAt':null,'UserId':null});})[_0x922c('0x16')](function(){var _0x284cf1={'uniqueid':_0x3ea9db+'.'+_0x16c218['id']+'.'+_0x16c218[_0x922c('0x5a')]['id'],'FromUserId':_0x206bb9[_0x922c('0x2e')]['id'],'type':_0x922c('0x5c')};_0x284cf1[_0x17e947+_0x922c('0x5d')]=_0x16c218['id'];_0x284cf1[_0x17e947+'InteractionId']=_0x16c218[_0x922c('0x5a')]['id'];_0x284cf1[_0x922c('0x5e')+_0x17e947+_0x4982d8+'Id']=_0x16c218[_0x922c('0x56')]['id'];_0x284cf1['To'+_0x17e947+_0x922c('0x5f')]=_0x15b953['id'];return db[_0x17e947+'TransferReport'][_0x922c('0x60')](_0x284cf1);})['then'](function(){return respondWithRpcPromise(_0x922c('0x61'),{'channel':_0x3ea9db,'interaction':_0x16c218[_0x922c('0x5a')],'message':_0x16c218,'account':_0x16c218[_0x922c('0x56')],'applications':[{'id':0x0,'priority':0x1,'app':_0x922c('0x5c'),'appdata':_0x15b953['name']+','+(_0x16c218[_0x922c('0x56')]['queueTransferTimeout']||0x12c),'interval':_0x922c('0x62')}]},routingClient);})[_0x922c('0x16')](respondWithResult(_0x2419e4,null))['catch'](handleError(_0x2419e4,null));};};exports[_0x922c('0x63')]=function(_0x5b5312,_0x535b87){var _0x18b8e5,_0x1c05f1;if(_[_0x922c('0x12')](_0x5b5312[_0x922c('0x2c')][_0x922c('0x64')])){throw new Error(_0x922c('0x65'));}var _0x50100f=_0x5b5312['body'][_0x922c('0x64')];var _0x1702e7=_[_0x922c('0x66')](_0x50100f);var _0x54579f=_0x50100f===_0x922c('0x54')?_0x922c('0x55'):_0x922c('0x56');return db[_0x922c('0x67')]['findOne']({'raw':!![],'where':{'id':_0x5b5312[_0x922c('0x1a')]['id'],'role':_0x922c('0x38')}})[_0x922c('0x16')](function(_0x222239){if(_[_0x922c('0x12')](_0x222239)){throw new Error(_0x922c('0x68'));}_0x18b8e5=_0x222239;return db[_0x1702e7+'Message'][_0x922c('0x57')]({'where':{'id':_0x5b5312[_0x922c('0x2c')][_0x922c('0x69')]},'include':[{'model':db[_0x1702e7+_0x922c('0x5a')],'as':_0x922c('0x5a')},{'model':db[_0x1702e7+_0x54579f],'as':'Account'}]});})[_0x922c('0x16')](function(_0x537dea){if(_[_0x922c('0x12')](_0x537dea)){throw new Error(_0x1702e7+'\x20Message\x20not\x20found');}_0x1c05f1=_0x537dea;return _0x537dea['update']({'read':0x0,'readAt':null,'UserId':null});})['then'](function(){var _0x3fc99d={'uniqueid':_0x50100f+'.'+_0x1c05f1['id']+'.'+_0x1c05f1[_0x922c('0x5a')]['id'],'FromUserId':_0x5b5312[_0x922c('0x2e')]['id'],'type':_0x922c('0x5c'),'ToUserId':_0x18b8e5['id']};_0x3fc99d[_0x1702e7+_0x922c('0x5d')]=_0x1c05f1['id'];_0x3fc99d[_0x1702e7+_0x922c('0x6a')]=_0x1c05f1['Interaction']['id'];_0x3fc99d['From'+_0x1702e7+_0x54579f+'Id']=_0x1c05f1['Account']['id'];return db[_0x1702e7+'TransferReport'][_0x922c('0x60')](_0x3fc99d);})[_0x922c('0x16')](function(){return respondWithRpcPromise(_0x922c('0x61'),{'channel':_0x50100f,'interaction':_0x1c05f1[_0x922c('0x5a')],'message':_0x1c05f1,'account':_0x1c05f1[_0x922c('0x56')],'applications':[{'id':0x0,'priority':0x1,'app':_0x922c('0x38'),'appdata':_0x18b8e5[_0x922c('0x10')]+','+(_0x1c05f1[_0x922c('0x56')][_0x922c('0x6b')]||0x12c),'interval':_0x922c('0x62')}]},routingClient);})[_0x922c('0x16')](respondWithResult(_0x535b87,null))[_0x922c('0xc')](handleError(_0x535b87,null));};