mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 10:00:30 +08:00
feat(m10): add audit event search and CSV export
This commit is contained in:
@@ -117,12 +117,28 @@ export function patchContractStatus(id, body) {
|
||||
|
||||
/**
|
||||
* M10-F01 审计分页:`GET /api/v1/audit-events`。
|
||||
* @param {{ entityType: string, entityId: string | number, page?: number, size?: number }} params
|
||||
* @param {{ entityType?: string, entityId?: string | number, page?: number, size?: number }} params
|
||||
*/
|
||||
export function listAuditEvents(params) {
|
||||
return axios.get("/api/v1/audit-events", { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* M10-F02 审计检索:`GET /api/v1/audit-events`(无分页)。
|
||||
* @param {{ entityType?: string, entityId?: string | number, from?: string, to?: string }} params
|
||||
*/
|
||||
export function searchAuditEvents(params) {
|
||||
return axios.get("/api/v1/audit-events", { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* M10-F03 审计导出 CSV:`GET /api/v1/audit-events/export`。
|
||||
* @param {{ entityType?: string, entityId?: string | number, from?: string, to?: string }} params
|
||||
*/
|
||||
export function exportAuditEvents(params) {
|
||||
return axios.get("/api/v1/audit-events/export", { params, responseType: 'blob' });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{ page?: number, size?: number, projectId?: string | number, keyword?: string }} params
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user