对应 docs/operation-audit-halo-compliance.md 评审的两项不符合与第 5 节修复建议: 1. API 客户端生成(清单第 2 条):build.gradle 配置 haloPlugin.openApi 管线; 查询/导出/测试端点补 tag、参数声明与类型化 response(生成契约输入); bootstrap OpenAPI 规范 JSON(与 Springdoc 声明一一对手工对齐)驱动 devtools generateApiClient 产出 TS 客户端(ui/src/api/generated,openapi-generator 7.7.0); UI 经 ui/src/api 封装层复用宿主 axiosInstance,替换手写类型与裸 fetch; @halo-dev/api-client 由死依赖转为 axiosInstance 实际来源。 2. 出站安全与凭据(清单第 4 条):新增 OutboundUrlGuard——URI 解析 + scheme 白名单 + 禁止用户名/密码形态 + 全量 DNS 解析并拒绝环回/私网/链路本地/组播/未指定/ 云元数据(169.254.169.254、100.100.100.200、fd00:ec2::254)/CGNAT/ULA/Teredo/ 6to4/文档与保留段;PinnedAddressResolverGroup 钉定校验地址建连(DNS rebinding 防护,TLS SNI/Host 仍取原主机名);重定向显式关闭、三层超时 10 秒。 Webhook 地址凭据迁移 Halo Secret(settings.yaml 改 secret 输入存引用,服务端经 ReactiveExtensionClient 解析键 webhookUrl,fail closed);日志只记主机名, 不再记录可能内嵌 access_token 的完整地址。 测试:后端 244 用例(新增守卫地址段枚举/Secret 解析 fail closed/建连钉定证明等 25 例)+ UI vitest 54 用例 + vue-tsc + ./gradlew build 全部通过。
434 lines
21 KiB
TypeScript
434 lines
21 KiB
TypeScript
/* tslint:disable */
|
||
/* eslint-disable */
|
||
/**
|
||
* Operation Audit Extension API
|
||
* 操作审计插件自有子资源端点(query/export/test)的 OpenAPI 契约。本文件为 bootstrap 契约(与 SpringdocRouteBuilder 声明一一对应手工对齐),供 devtools generateApiClient 离线生成 TS 客户端;待有可用的 Halo 实例(Docker haloServer 或 useExistingServer)时,运行 ./gradlew generateOpenApiDocs 将以运行时 springdoc 输出覆盖本文件,再重新生成客户端即可(generateApiClient 每次先清空 outputDir)。版本号与插件版本保持同步。
|
||
*
|
||
* The version of the OpenAPI document: 0.1.0-SNAPSHOT
|
||
*
|
||
*
|
||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||
* https://openapi-generator.tech
|
||
* Do not edit the class manually.
|
||
*/
|
||
|
||
|
||
import type { Configuration } from '../configuration';
|
||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||
import globalAxios from 'axios';
|
||
// Some imports not used depending on template conditions
|
||
// @ts-ignore
|
||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
||
// @ts-ignore
|
||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||
// @ts-ignore
|
||
import type { AlertSendResult } from '../models';
|
||
// @ts-ignore
|
||
import type { AuditLogList } from '../models';
|
||
/**
|
||
* AuditV1alpha1ConsoleApi - axios parameter creator
|
||
* @export
|
||
*/
|
||
export const AuditV1alpha1ConsoleApiAxiosParamCreator = function (configuration?: Configuration) {
|
||
return {
|
||
/**
|
||
* 按筛选条件导出审计日志为 CSV 附件(UTF-8 BOM,Excel/WPS 可直接打开):筛选参数与 query 完全一致,不分页全量导出,按时间升序输出
|
||
* @param {Array<string>} [fieldSelector] 等值筛选,可重复(与 query 一致)
|
||
* @param {string} [result] 结果筛选(success/failure)
|
||
* @param {string} [keyword] 关键字(resourceName/path 模糊匹配)
|
||
* @param {string} [startTime] 开始时间(ISO-8601,含边界)
|
||
* @param {string} [endTime] 结束时间(ISO-8601,含边界)
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
exportAuditLogs: async (fieldSelector?: Array<string>, result?: string, keyword?: string, startTime?: string, endTime?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||
const localVarPath = `/apis/audit.guichumo.com/v1alpha1/auditlogs/-/export`;
|
||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||
let baseOptions;
|
||
if (configuration) {
|
||
baseOptions = configuration.baseOptions;
|
||
}
|
||
|
||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||
const localVarHeaderParameter = {} as any;
|
||
const localVarQueryParameter = {} as any;
|
||
|
||
if (fieldSelector) {
|
||
localVarQueryParameter['fieldSelector'] = fieldSelector;
|
||
}
|
||
|
||
if (result !== undefined) {
|
||
localVarQueryParameter['result'] = result;
|
||
}
|
||
|
||
if (keyword !== undefined) {
|
||
localVarQueryParameter['keyword'] = keyword;
|
||
}
|
||
|
||
if (startTime !== undefined) {
|
||
localVarQueryParameter['startTime'] = (startTime as any instanceof Date) ?
|
||
(startTime as any).toISOString() :
|
||
startTime;
|
||
}
|
||
|
||
if (endTime !== undefined) {
|
||
localVarQueryParameter['endTime'] = (endTime as any instanceof Date) ?
|
||
(endTime as any).toISOString() :
|
||
endTime;
|
||
}
|
||
|
||
|
||
|
||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||
|
||
return {
|
||
url: toPathString(localVarUrlObj),
|
||
options: localVarRequestOptions,
|
||
};
|
||
},
|
||
/**
|
||
* 分页查询审计日志:支持等值筛选(fieldSelector,含 spec.action 语义动作)、关键字(resourceName/path 模糊)、结果(success/failure)、时间区间(含边界)
|
||
* @param {number} [page] 页码(从 1 开始)
|
||
* @param {number} [size] 每页大小(1-100)
|
||
* @param {string} [sort] 排序(field,(asc|desc)),仅支持 metadata.creationTimestamp
|
||
* @param {Array<string>} [fieldSelector] 等值筛选,可重复(spec.username/spec.resourceType/spec.method/spec.action)
|
||
* @param {string} [result] 结果筛选(success/failure)
|
||
* @param {string} [keyword] 关键字(resourceName/path 模糊匹配)
|
||
* @param {string} [startTime] 开始时间(ISO-8601,含边界)
|
||
* @param {string} [endTime] 结束时间(ISO-8601,含边界)
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
listAuditLogs: async (page?: number, size?: number, sort?: string, fieldSelector?: Array<string>, result?: string, keyword?: string, startTime?: string, endTime?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||
const localVarPath = `/apis/audit.guichumo.com/v1alpha1/auditlogs/-/query`;
|
||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||
let baseOptions;
|
||
if (configuration) {
|
||
baseOptions = configuration.baseOptions;
|
||
}
|
||
|
||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||
const localVarHeaderParameter = {} as any;
|
||
const localVarQueryParameter = {} as any;
|
||
|
||
if (page !== undefined) {
|
||
localVarQueryParameter['page'] = page;
|
||
}
|
||
|
||
if (size !== undefined) {
|
||
localVarQueryParameter['size'] = size;
|
||
}
|
||
|
||
if (sort !== undefined) {
|
||
localVarQueryParameter['sort'] = sort;
|
||
}
|
||
|
||
if (fieldSelector) {
|
||
localVarQueryParameter['fieldSelector'] = fieldSelector;
|
||
}
|
||
|
||
if (result !== undefined) {
|
||
localVarQueryParameter['result'] = result;
|
||
}
|
||
|
||
if (keyword !== undefined) {
|
||
localVarQueryParameter['keyword'] = keyword;
|
||
}
|
||
|
||
if (startTime !== undefined) {
|
||
localVarQueryParameter['startTime'] = (startTime as any instanceof Date) ?
|
||
(startTime as any).toISOString() :
|
||
startTime;
|
||
}
|
||
|
||
if (endTime !== undefined) {
|
||
localVarQueryParameter['endTime'] = (endTime as any instanceof Date) ?
|
||
(endTime as any).toISOString() :
|
||
endTime;
|
||
}
|
||
|
||
|
||
|
||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||
|
||
return {
|
||
url: toPathString(localVarUrlObj),
|
||
options: localVarRequestOptions,
|
||
};
|
||
},
|
||
/**
|
||
* 向当前配置的 Webhook 地址推送一条测试告警(type=test)并返回推送结果:success 为是否送达(接收方 2xx),message 为状态/原因摘要;Webhook 未配置或非法时返回 400
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
testAlertWebhook: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||
const localVarPath = `/apis/audit.guichumo.com/v1alpha1/alerts/-/test`;
|
||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||
let baseOptions;
|
||
if (configuration) {
|
||
baseOptions = configuration.baseOptions;
|
||
}
|
||
|
||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||
const localVarHeaderParameter = {} as any;
|
||
const localVarQueryParameter = {} as any;
|
||
|
||
|
||
|
||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||
|
||
return {
|
||
url: toPathString(localVarUrlObj),
|
||
options: localVarRequestOptions,
|
||
};
|
||
},
|
||
}
|
||
};
|
||
|
||
/**
|
||
* AuditV1alpha1ConsoleApi - functional programming interface
|
||
* @export
|
||
*/
|
||
export const AuditV1alpha1ConsoleApiFp = function(configuration?: Configuration) {
|
||
const localVarAxiosParamCreator = AuditV1alpha1ConsoleApiAxiosParamCreator(configuration)
|
||
return {
|
||
/**
|
||
* 按筛选条件导出审计日志为 CSV 附件(UTF-8 BOM,Excel/WPS 可直接打开):筛选参数与 query 完全一致,不分页全量导出,按时间升序输出
|
||
* @param {Array<string>} [fieldSelector] 等值筛选,可重复(与 query 一致)
|
||
* @param {string} [result] 结果筛选(success/failure)
|
||
* @param {string} [keyword] 关键字(resourceName/path 模糊匹配)
|
||
* @param {string} [startTime] 开始时间(ISO-8601,含边界)
|
||
* @param {string} [endTime] 结束时间(ISO-8601,含边界)
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
async exportAuditLogs(fieldSelector?: Array<string>, result?: string, keyword?: string, startTime?: string, endTime?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
||
const localVarAxiosArgs = await localVarAxiosParamCreator.exportAuditLogs(fieldSelector, result, keyword, startTime, endTime, options);
|
||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||
const localVarOperationServerBasePath = operationServerMap['AuditV1alpha1ConsoleApi.exportAuditLogs']?.[localVarOperationServerIndex]?.url;
|
||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||
},
|
||
/**
|
||
* 分页查询审计日志:支持等值筛选(fieldSelector,含 spec.action 语义动作)、关键字(resourceName/path 模糊)、结果(success/failure)、时间区间(含边界)
|
||
* @param {number} [page] 页码(从 1 开始)
|
||
* @param {number} [size] 每页大小(1-100)
|
||
* @param {string} [sort] 排序(field,(asc|desc)),仅支持 metadata.creationTimestamp
|
||
* @param {Array<string>} [fieldSelector] 等值筛选,可重复(spec.username/spec.resourceType/spec.method/spec.action)
|
||
* @param {string} [result] 结果筛选(success/failure)
|
||
* @param {string} [keyword] 关键字(resourceName/path 模糊匹配)
|
||
* @param {string} [startTime] 开始时间(ISO-8601,含边界)
|
||
* @param {string} [endTime] 结束时间(ISO-8601,含边界)
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
async listAuditLogs(page?: number, size?: number, sort?: string, fieldSelector?: Array<string>, result?: string, keyword?: string, startTime?: string, endTime?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuditLogList>> {
|
||
const localVarAxiosArgs = await localVarAxiosParamCreator.listAuditLogs(page, size, sort, fieldSelector, result, keyword, startTime, endTime, options);
|
||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||
const localVarOperationServerBasePath = operationServerMap['AuditV1alpha1ConsoleApi.listAuditLogs']?.[localVarOperationServerIndex]?.url;
|
||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||
},
|
||
/**
|
||
* 向当前配置的 Webhook 地址推送一条测试告警(type=test)并返回推送结果:success 为是否送达(接收方 2xx),message 为状态/原因摘要;Webhook 未配置或非法时返回 400
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
async testAlertWebhook(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AlertSendResult>> {
|
||
const localVarAxiosArgs = await localVarAxiosParamCreator.testAlertWebhook(options);
|
||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||
const localVarOperationServerBasePath = operationServerMap['AuditV1alpha1ConsoleApi.testAlertWebhook']?.[localVarOperationServerIndex]?.url;
|
||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||
},
|
||
}
|
||
};
|
||
|
||
/**
|
||
* AuditV1alpha1ConsoleApi - factory interface
|
||
* @export
|
||
*/
|
||
export const AuditV1alpha1ConsoleApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||
const localVarFp = AuditV1alpha1ConsoleApiFp(configuration)
|
||
return {
|
||
/**
|
||
* 按筛选条件导出审计日志为 CSV 附件(UTF-8 BOM,Excel/WPS 可直接打开):筛选参数与 query 完全一致,不分页全量导出,按时间升序输出
|
||
* @param {AuditV1alpha1ConsoleApiExportAuditLogsRequest} requestParameters Request parameters.
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
exportAuditLogs(requestParameters: AuditV1alpha1ConsoleApiExportAuditLogsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<File> {
|
||
return localVarFp.exportAuditLogs(requestParameters.fieldSelector, requestParameters.result, requestParameters.keyword, requestParameters.startTime, requestParameters.endTime, options).then((request) => request(axios, basePath));
|
||
},
|
||
/**
|
||
* 分页查询审计日志:支持等值筛选(fieldSelector,含 spec.action 语义动作)、关键字(resourceName/path 模糊)、结果(success/failure)、时间区间(含边界)
|
||
* @param {AuditV1alpha1ConsoleApiListAuditLogsRequest} requestParameters Request parameters.
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
listAuditLogs(requestParameters: AuditV1alpha1ConsoleApiListAuditLogsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<AuditLogList> {
|
||
return localVarFp.listAuditLogs(requestParameters.page, requestParameters.size, requestParameters.sort, requestParameters.fieldSelector, requestParameters.result, requestParameters.keyword, requestParameters.startTime, requestParameters.endTime, options).then((request) => request(axios, basePath));
|
||
},
|
||
/**
|
||
* 向当前配置的 Webhook 地址推送一条测试告警(type=test)并返回推送结果:success 为是否送达(接收方 2xx),message 为状态/原因摘要;Webhook 未配置或非法时返回 400
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
*/
|
||
testAlertWebhook(options?: RawAxiosRequestConfig): AxiosPromise<AlertSendResult> {
|
||
return localVarFp.testAlertWebhook(options).then((request) => request(axios, basePath));
|
||
},
|
||
};
|
||
};
|
||
|
||
/**
|
||
* Request parameters for exportAuditLogs operation in AuditV1alpha1ConsoleApi.
|
||
* @export
|
||
* @interface AuditV1alpha1ConsoleApiExportAuditLogsRequest
|
||
*/
|
||
export interface AuditV1alpha1ConsoleApiExportAuditLogsRequest {
|
||
/**
|
||
* 等值筛选,可重复(与 query 一致)
|
||
* @type {Array<string>}
|
||
* @memberof AuditV1alpha1ConsoleApiExportAuditLogs
|
||
*/
|
||
readonly fieldSelector?: Array<string>
|
||
|
||
/**
|
||
* 结果筛选(success/failure)
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiExportAuditLogs
|
||
*/
|
||
readonly result?: string
|
||
|
||
/**
|
||
* 关键字(resourceName/path 模糊匹配)
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiExportAuditLogs
|
||
*/
|
||
readonly keyword?: string
|
||
|
||
/**
|
||
* 开始时间(ISO-8601,含边界)
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiExportAuditLogs
|
||
*/
|
||
readonly startTime?: string
|
||
|
||
/**
|
||
* 结束时间(ISO-8601,含边界)
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiExportAuditLogs
|
||
*/
|
||
readonly endTime?: string
|
||
}
|
||
|
||
/**
|
||
* Request parameters for listAuditLogs operation in AuditV1alpha1ConsoleApi.
|
||
* @export
|
||
* @interface AuditV1alpha1ConsoleApiListAuditLogsRequest
|
||
*/
|
||
export interface AuditV1alpha1ConsoleApiListAuditLogsRequest {
|
||
/**
|
||
* 页码(从 1 开始)
|
||
* @type {number}
|
||
* @memberof AuditV1alpha1ConsoleApiListAuditLogs
|
||
*/
|
||
readonly page?: number
|
||
|
||
/**
|
||
* 每页大小(1-100)
|
||
* @type {number}
|
||
* @memberof AuditV1alpha1ConsoleApiListAuditLogs
|
||
*/
|
||
readonly size?: number
|
||
|
||
/**
|
||
* 排序(field,(asc|desc)),仅支持 metadata.creationTimestamp
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiListAuditLogs
|
||
*/
|
||
readonly sort?: string
|
||
|
||
/**
|
||
* 等值筛选,可重复(spec.username/spec.resourceType/spec.method/spec.action)
|
||
* @type {Array<string>}
|
||
* @memberof AuditV1alpha1ConsoleApiListAuditLogs
|
||
*/
|
||
readonly fieldSelector?: Array<string>
|
||
|
||
/**
|
||
* 结果筛选(success/failure)
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiListAuditLogs
|
||
*/
|
||
readonly result?: string
|
||
|
||
/**
|
||
* 关键字(resourceName/path 模糊匹配)
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiListAuditLogs
|
||
*/
|
||
readonly keyword?: string
|
||
|
||
/**
|
||
* 开始时间(ISO-8601,含边界)
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiListAuditLogs
|
||
*/
|
||
readonly startTime?: string
|
||
|
||
/**
|
||
* 结束时间(ISO-8601,含边界)
|
||
* @type {string}
|
||
* @memberof AuditV1alpha1ConsoleApiListAuditLogs
|
||
*/
|
||
readonly endTime?: string
|
||
}
|
||
|
||
/**
|
||
* AuditV1alpha1ConsoleApi - object-oriented interface
|
||
* @export
|
||
* @class AuditV1alpha1ConsoleApi
|
||
* @extends {BaseAPI}
|
||
*/
|
||
export class AuditV1alpha1ConsoleApi extends BaseAPI {
|
||
/**
|
||
* 按筛选条件导出审计日志为 CSV 附件(UTF-8 BOM,Excel/WPS 可直接打开):筛选参数与 query 完全一致,不分页全量导出,按时间升序输出
|
||
* @param {AuditV1alpha1ConsoleApiExportAuditLogsRequest} requestParameters Request parameters.
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
* @memberof AuditV1alpha1ConsoleApi
|
||
*/
|
||
public exportAuditLogs(requestParameters: AuditV1alpha1ConsoleApiExportAuditLogsRequest = {}, options?: RawAxiosRequestConfig) {
|
||
return AuditV1alpha1ConsoleApiFp(this.configuration).exportAuditLogs(requestParameters.fieldSelector, requestParameters.result, requestParameters.keyword, requestParameters.startTime, requestParameters.endTime, options).then((request) => request(this.axios, this.basePath));
|
||
}
|
||
|
||
/**
|
||
* 分页查询审计日志:支持等值筛选(fieldSelector,含 spec.action 语义动作)、关键字(resourceName/path 模糊)、结果(success/failure)、时间区间(含边界)
|
||
* @param {AuditV1alpha1ConsoleApiListAuditLogsRequest} requestParameters Request parameters.
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
* @memberof AuditV1alpha1ConsoleApi
|
||
*/
|
||
public listAuditLogs(requestParameters: AuditV1alpha1ConsoleApiListAuditLogsRequest = {}, options?: RawAxiosRequestConfig) {
|
||
return AuditV1alpha1ConsoleApiFp(this.configuration).listAuditLogs(requestParameters.page, requestParameters.size, requestParameters.sort, requestParameters.fieldSelector, requestParameters.result, requestParameters.keyword, requestParameters.startTime, requestParameters.endTime, options).then((request) => request(this.axios, this.basePath));
|
||
}
|
||
|
||
/**
|
||
* 向当前配置的 Webhook 地址推送一条测试告警(type=test)并返回推送结果:success 为是否送达(接收方 2xx),message 为状态/原因摘要;Webhook 未配置或非法时返回 400
|
||
* @param {*} [options] Override http request option.
|
||
* @throws {RequiredError}
|
||
* @memberof AuditV1alpha1ConsoleApi
|
||
*/
|
||
public testAlertWebhook(options?: RawAxiosRequestConfig) {
|
||
return AuditV1alpha1ConsoleApiFp(this.configuration).testAlertWebhook(options).then((request) => request(this.axios, this.basePath));
|
||
}
|
||
}
|
||
|