Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
1 'use strict';const a857_0x3589=['VoiceCallReport','attributes','limit','debug','options','body','include','GetVoiceCallReport','369902RibxVb','287401GpNyyk','rpc','CreateVoiceCallReport','30SNWrSU','where','then','message','findAll','@config/logger','16fSbTBp','stringify','17623brRxPT','18661DAQgkt','map','raw','1340299MNbMFr','catch','info','model','30967gJXzSk','create','1215YikXNX','error','UpdateVoiceCallReport','83bOAgfx'];const a857_0x57e2=function(_0x346f95,_0xccd7d){_0x346f95=_0x346f95-0xaf;let _0x358998=a857_0x3589[_0x346f95];return _0x358998;};const a857_0x2768ad=a857_0x57e2;(function(_0x4ce748,_0x59dc93){const _0x4a56e7=a857_0x57e2;while(!![]){try{const _0x2c2562=parseInt(_0x4a56e7(0xbd))*-parseInt(_0x4a56e7(0xc5))+-parseInt(_0x4a56e7(0xc6))+-parseInt(_0x4a56e7(0xba))+parseInt(_0x4a56e7(0xb9))+-parseInt(_0x4a56e7(0xc3))*parseInt(_0x4a56e7(0xcd))+parseInt(_0x4a56e7(0xb0))*-parseInt(_0x4a56e7(0xcf))+parseInt(_0x4a56e7(0xc9));if(_0x2c2562===_0x59dc93)break;else _0x4ce748['push'](_0x4ce748['shift']());}catch(_0x119d54){_0x4ce748['push'](_0x4ce748['shift']());}}}(a857_0x3589,0x4425c));const _=require('lodash'),db=require('@mysqldb')['db'],logger=require(a857_0x2768ad(0xc2))(a857_0x2768ad(0xbb));exports[a857_0x2768ad(0xb8)]=function(_0xb3849f){const _0x19b6b4=this;return new Promise(function(_0x452a99,_0x3742e8){const _0x572189=a857_0x57e2;return db[_0x572189(0xb1)][_0x572189(0xc1)]({'raw':_0xb3849f[_0x572189(0xb5)]?_0xb3849f[_0x572189(0xb5)][_0x572189(0xc8)]===undefined?!![]:![]:!![],'where':_0xb3849f['options']?_0xb3849f['options'][_0x572189(0xbe)]||null:null,'attributes':_0xb3849f[_0x572189(0xb5)]?_0xb3849f[_0x572189(0xb5)][_0x572189(0xb2)]||null:null,'limit':_0xb3849f[_0x572189(0xb5)]?_0xb3849f['options']['limit']||null:null,'include':_0xb3849f[_0x572189(0xb5)]?_0xb3849f[_0x572189(0xb5)][_0x572189(0xb7)]?_[_0x572189(0xc7)](_0xb3849f[_0x572189(0xb5)]['include'],function(_0x3d8bb5){const _0x58fabc=_0x572189;return{'model':db[_0x3d8bb5[_0x58fabc(0xcc)]],'as':_0x3d8bb5['as'],'attributes':_0x3d8bb5[_0x58fabc(0xb2)],'include':_0x3d8bb5[_0x58fabc(0xb7)]?_[_0x58fabc(0xc7)](_0x3d8bb5[_0x58fabc(0xb7)],function(_0x4ec438){const _0x58270d=_0x58fabc;return{'model':db[_0x4ec438[_0x58270d(0xcc)]],'as':_0x4ec438['as'],'attributes':_0x4ec438[_0x58270d(0xb2)],'include':_0x4ec438[_0x58270d(0xb7)]?_[_0x58270d(0xc7)](_0x4ec438['include'],function(_0x12c49d){const _0x49e1f9=_0x58270d;return{'model':db[_0x12c49d[_0x49e1f9(0xcc)]],'as':_0x12c49d['as'],'attributes':_0x12c49d[_0x49e1f9(0xb2)]};}):[]};}):[]};}):[]:[]})[_0x572189(0xbf)](function(_0xfd65a){const _0x4cbe50=_0x572189;logger['info'](_0x4cbe50(0xb8),_0xb3849f),logger['debug'](_0x4cbe50(0xb8),_0xb3849f,JSON[_0x4cbe50(0xc4)](_0xfd65a)),_0x452a99(_0xfd65a);})[_0x572189(0xca)](function(_0x49fca5){const _0x58772b=_0x572189;logger[_0x58772b(0xd0)]('GetVoiceCallReport',_0x49fca5[_0x58772b(0xc0)],_0xb3849f),_0x3742e8(_0x19b6b4[_0x58772b(0xd0)](0x1f4,_0x49fca5[_0x58772b(0xc0)]));});});},exports[a857_0x2768ad(0xbc)]=function(_0x2e400a){const _0x67318e=this;return new Promise(function(_0x168169,_0x4c154c){const _0x2b6bf2=a857_0x57e2;return db[_0x2b6bf2(0xb1)][_0x2b6bf2(0xce)](_0x2e400a['body'],{'raw':_0x2e400a[_0x2b6bf2(0xb5)]?_0x2e400a[_0x2b6bf2(0xb5)][_0x2b6bf2(0xc8)]===undefined?!![]:![]:!![]})[_0x2b6bf2(0xbf)](function(_0x459f7f){const _0x2a84b7=_0x2b6bf2;logger[_0x2a84b7(0xcb)](_0x2a84b7(0xbc),_0x2e400a),logger[_0x2a84b7(0xb4)](_0x2a84b7(0xbc),_0x2e400a,JSON[_0x2a84b7(0xc4)](_0x459f7f)),_0x168169(_0x459f7f);})['catch'](function(_0x3e1576){const _0xf964d2=_0x2b6bf2;logger[_0xf964d2(0xd0)](_0xf964d2(0xbc),_0x3e1576['message'],_0x2e400a),_0x4c154c(_0x67318e[_0xf964d2(0xd0)](0x1f4,_0x3e1576['message']));});});},exports['UpdateVoiceCallReport']=function(_0x331bfe){const _0x6b235=this;return new Promise(function(_0x5befd2,_0x31f489){const _0x172d64=a857_0x57e2;return db[_0x172d64(0xb1)]['update'](_0x331bfe[_0x172d64(0xb6)],{'raw':_0x331bfe[_0x172d64(0xb5)]?_0x331bfe[_0x172d64(0xb5)][_0x172d64(0xc8)]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x331bfe['options']?_0x331bfe['options'][_0x172d64(0xbe)]||null:null,'attributes':_0x331bfe[_0x172d64(0xb5)]?_0x331bfe[_0x172d64(0xb5)][_0x172d64(0xb2)]||null:null,'limit':_0x331bfe[_0x172d64(0xb5)]?_0x331bfe[_0x172d64(0xb5)][_0x172d64(0xb3)]||null:null})[_0x172d64(0xbf)](function(_0x27c335){const _0x481f2f=_0x172d64;logger[_0x481f2f(0xcb)](_0x481f2f(0xaf),_0x331bfe),logger[_0x481f2f(0xb4)](_0x481f2f(0xaf),_0x331bfe,JSON[_0x481f2f(0xc4)](_0x27c335)),_0x5befd2(_0x27c335);})[_0x172d64(0xca)](function(_0x1ceedf){const _0x3ce05a=_0x172d64;logger[_0x3ce05a(0xd0)]('UpdateVoiceCallReport',_0x1ceedf[_0x3ce05a(0xc0)],_0x331bfe),_0x31f489(_0x6b235[_0x3ce05a(0xd0)](0x1f4,_0x1ceedf[_0x3ce05a(0xc0)]));});});};