"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuditController = void 0;
const common_1 = require("@nestjs/common");
const swagger_1 = require("@nestjs/swagger");
const gateway_state_service_1 = require("../../state/service/gateway-state.service");
let AuditController = class AuditController {
    state;
    constructor(state) {
        this.state = state;
    }
    events() {
        return this.state.getAudits();
    }
};
exports.AuditController = AuditController;
__decorate([
    (0, common_1.Get)('events'),
    (0, swagger_1.ApiOperation)({ summary: '获取审计事件列表', description: '返回网关内存中收集到的全部审计事件。' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: '查询成功，返回审计事件数组。' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Array)
], AuditController.prototype, "events", null);
exports.AuditController = AuditController = __decorate([
    (0, common_1.Controller)('audit'),
    (0, swagger_1.ApiTags)('网关-审计'),
    __metadata("design:paramtypes", [gateway_state_service_1.GatewayStateService])
], AuditController);
//# sourceMappingURL=audit.controller.js.map