/* tslint:disable */
/* eslint-disable */
/**
 * Hexiosec Transfer API
 * API description for Hexiosec Transfer  ## Testing Requests  Endpoints that require authentication will use your session cookie from the main application if an API key is not provided. This is fine for testing GET requests, however POST/DELETE requests will require a CSRF token when using a session cookie. It is not possible to provide a CSRF token from this page, and so an API key must be used.
 *
 * The version of the OpenAPI document: 0.0.1
 * Contact: support@hexiosec.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import * as runtime from '../runtime.js';
import { AdminEventsResponseFromJSON, } from '../models/index.js';
/**
 *
 */
export class AdminEventsApi extends runtime.BaseAPI {
    /**
     * Get system event stats
     */
    async getSystemEventStatsRaw(initOverrides) {
        const queryParameters = {};
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token('APIKey', []);
            if (tokenString) {
                headerParameters['Authorization'] = `Bearer ${tokenString}`;
            }
        }
        const response = await this.request({
            path: `/admin/events/stats`,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response);
    }
    /**
     * Get system event stats
     */
    async getSystemEventStats(initOverrides) {
        const response = await this.getSystemEventStatsRaw(initOverrides);
        return await response.value();
    }
    /**
     * Get system events
     */
    async getSystemEventsRaw(requestParameters, initOverrides) {
        const queryParameters = {};
        if (requestParameters['limit'] != null) {
            queryParameters['limit'] = requestParameters['limit'];
        }
        if (requestParameters['offset'] != null) {
            queryParameters['offset'] = requestParameters['offset'];
        }
        if (requestParameters['tenantId'] != null) {
            queryParameters['tenant_id'] = requestParameters['tenantId'];
        }
        if (requestParameters['deviceId'] != null) {
            queryParameters['device_id'] = requestParameters['deviceId'];
        }
        if (requestParameters['userId'] != null) {
            queryParameters['user_id'] = requestParameters['userId'];
        }
        if (requestParameters['fileId'] != null) {
            queryParameters['file_id'] = requestParameters['fileId'];
        }
        if (requestParameters['inviteId'] != null) {
            queryParameters['invite_id'] = requestParameters['inviteId'];
        }
        if (requestParameters['ip'] != null) {
            queryParameters['ip'] = requestParameters['ip'];
        }
        if (requestParameters['event'] != null) {
            queryParameters['event'] = requestParameters['event'];
        }
        if (requestParameters['exclude'] != null) {
            queryParameters['exclude'] = requestParameters['exclude'];
        }
        const headerParameters = {};
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token('APIKey', []);
            if (tokenString) {
                headerParameters['Authorization'] = `Bearer ${tokenString}`;
            }
        }
        const response = await this.request({
            path: `/admin/events`,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => AdminEventsResponseFromJSON(jsonValue));
    }
    /**
     * Get system events
     */
    async getSystemEvents(requestParameters = {}, initOverrides) {
        const response = await this.getSystemEventsRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
