0ffe2c64fb16b2a0817e7ff78ab12712e01924e1
[motion-next.git] / server / api / voiceQueueReport / voiceQueueReport.rpc.js
1 const a915_0x44b9=['attributes','GetVoiceQueueReport','UpdateVoiceQueueReport','../../rediscache','./voiceQueueReport.socket','info','lodash','catch','message','../../mysqldb','rpc','then','limit','where','options','stringify','map','VoiceQueueReport','error','findAll','../../config/logger','include','CreateVoiceQueueReport','raw','create','model','update','register','body','debug'];(function(_0x49b2bc,_0x1b9307){const _0x44b9db=function(_0x845fe8){while(--_0x845fe8){_0x49b2bc['push'](_0x49b2bc['shift']());}};_0x44b9db(++_0x1b9307);}(a915_0x44b9,0x173));const a915_0x845f=function(_0x49b2bc,_0x1b9307){_0x49b2bc=_0x49b2bc-0x88;let _0x44b9db=a915_0x44b9[_0x49b2bc];return _0x44b9db;};const a915_0x25ce59=a915_0x845f;'use strict';const _=require(a915_0x25ce59(0xa1)),db=require(a915_0x25ce59(0xa4))['db'],logger=require(a915_0x25ce59(0x91))(a915_0x25ce59(0xa5)),{getSocket}=require(a915_0x25ce59(0x9e)),socket=getSocket();require(a915_0x25ce59(0x9f))[a915_0x25ce59(0x98)](socket),exports[a915_0x25ce59(0x9c)]=function(_0x1101c1){const _0x5a499b=this;return new Promise(function(_0x50e553,_0x1ad8cf){const _0x5902a3=a915_0x845f;return db[_0x5902a3(0x8e)][_0x5902a3(0x90)]({'raw':_0x1101c1[_0x5902a3(0x8b)]?_0x1101c1['options'][_0x5902a3(0x94)]===undefined?!![]:![]:!![],'where':_0x1101c1[_0x5902a3(0x8b)]?_0x1101c1[_0x5902a3(0x8b)][_0x5902a3(0x8a)]||null:null,'attributes':_0x1101c1[_0x5902a3(0x8b)]?_0x1101c1[_0x5902a3(0x8b)][_0x5902a3(0x9b)]||null:null,'limit':_0x1101c1['options']?_0x1101c1[_0x5902a3(0x8b)][_0x5902a3(0x89)]||null:null,'include':_0x1101c1[_0x5902a3(0x8b)]?_0x1101c1['options'][_0x5902a3(0x92)]?_[_0x5902a3(0x8d)](_0x1101c1[_0x5902a3(0x8b)][_0x5902a3(0x92)],function(_0x3ce45d){const _0x1993f1=_0x5902a3;return{'model':db[_0x3ce45d[_0x1993f1(0x96)]],'as':_0x3ce45d['as'],'attributes':_0x3ce45d[_0x1993f1(0x9b)],'include':_0x3ce45d['include']?_[_0x1993f1(0x8d)](_0x3ce45d[_0x1993f1(0x92)],function(_0x3020cb){const _0x4ae5e0=_0x1993f1;return{'model':db[_0x3020cb[_0x4ae5e0(0x96)]],'as':_0x3020cb['as'],'attributes':_0x3020cb[_0x4ae5e0(0x9b)],'include':_0x3020cb[_0x4ae5e0(0x92)]?_['map'](_0x3020cb[_0x4ae5e0(0x92)],function(_0x209710){const _0x5d3d19=_0x4ae5e0;return{'model':db[_0x209710[_0x5d3d19(0x96)]],'as':_0x209710['as'],'attributes':_0x209710[_0x5d3d19(0x9b)]};}):[]};}):[]};}):[]:[]})[_0x5902a3(0x88)](function(_0x3c934c){const _0x3cc2a3=_0x5902a3;logger[_0x3cc2a3(0xa0)](_0x3cc2a3(0x9c),_0x1101c1),logger[_0x3cc2a3(0x9a)](_0x3cc2a3(0x9c),_0x1101c1,JSON[_0x3cc2a3(0x8c)](_0x3c934c)),_0x50e553(_0x3c934c);})[_0x5902a3(0xa2)](function(_0x15b2c4){const _0x309acf=_0x5902a3;logger[_0x309acf(0x8f)]('GetVoiceQueueReport',_0x15b2c4[_0x309acf(0xa3)],_0x1101c1),_0x1ad8cf(_0x5a499b[_0x309acf(0x8f)](0x1f4,_0x15b2c4[_0x309acf(0xa3)]));});});},exports[a915_0x25ce59(0x93)]=function(_0x45e28c){const _0x43c41d=this;return new Promise(function(_0x56cbeb,_0x5e555d){const _0x4bd62a=a915_0x845f;return db[_0x4bd62a(0x8e)][_0x4bd62a(0x95)](_0x45e28c[_0x4bd62a(0x99)],{'raw':_0x45e28c['options']?_0x45e28c[_0x4bd62a(0x8b)][_0x4bd62a(0x94)]===undefined?!![]:![]:!![]})[_0x4bd62a(0x88)](function(_0x1bc0b6){const _0x4c06a8=_0x4bd62a;logger[_0x4c06a8(0xa0)]('CreateVoiceQueueReport',_0x45e28c),logger[_0x4c06a8(0x9a)](_0x4c06a8(0x93),_0x45e28c,JSON['stringify'](_0x1bc0b6)),_0x56cbeb(_0x1bc0b6);})[_0x4bd62a(0xa2)](function(_0x43e985){const _0x4b5983=_0x4bd62a;logger['error']('CreateVoiceQueueReport',_0x43e985[_0x4b5983(0xa3)],_0x45e28c),_0x5e555d(_0x43c41d[_0x4b5983(0x8f)](0x1f4,_0x43e985[_0x4b5983(0xa3)]));});});},exports[a915_0x25ce59(0x9d)]=function(_0xf65b6b){const _0x3e6d37=this;return new Promise(function(_0x59f894,_0x29368d){const _0x5188bf=a915_0x845f;return db[_0x5188bf(0x8e)][_0x5188bf(0x97)](_0xf65b6b[_0x5188bf(0x99)],{'raw':_0xf65b6b[_0x5188bf(0x8b)]?_0xf65b6b[_0x5188bf(0x8b)][_0x5188bf(0x94)]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xf65b6b[_0x5188bf(0x8b)]?_0xf65b6b[_0x5188bf(0x8b)][_0x5188bf(0x8a)]||null:null,'attributes':_0xf65b6b[_0x5188bf(0x8b)]?_0xf65b6b[_0x5188bf(0x8b)][_0x5188bf(0x9b)]||null:null,'limit':_0xf65b6b[_0x5188bf(0x8b)]?_0xf65b6b[_0x5188bf(0x8b)][_0x5188bf(0x89)]||null:null})[_0x5188bf(0x88)](function(_0x4397ab){const _0x5ad549=_0x5188bf;logger['info']('UpdateVoiceQueueReport',_0xf65b6b),logger[_0x5ad549(0x9a)](_0x5ad549(0x9d),_0xf65b6b,JSON[_0x5ad549(0x8c)](_0x4397ab)),_0x59f894(_0x4397ab);})[_0x5188bf(0xa2)](function(_0x5c27a6){const _0x502f12=_0x5188bf;logger['error'](_0x502f12(0x9d),_0x5c27a6[_0x502f12(0xa3)],_0xf65b6b),_0x29368d(_0x3e6d37['error'](0x1f4,_0x5c27a6['message']));});});};