forked from baron/baron-sso
adminfront 조직 통계오류 보정. Kratos Projection용 통계테이블 구조 추가
This commit is contained in:
@@ -128,6 +128,22 @@ export type AdminOverviewStats = {
|
||||
auditEvents24h: number;
|
||||
};
|
||||
|
||||
export type UserProjectionStatus = {
|
||||
name: string;
|
||||
status: "ready" | "failed" | "syncing" | string;
|
||||
ready: boolean;
|
||||
lastSyncedAt?: string;
|
||||
lastError?: string;
|
||||
updatedAt?: string;
|
||||
projectedUsers: number;
|
||||
};
|
||||
|
||||
export type UserProjectionActionResult = {
|
||||
status: string;
|
||||
syncedUsers: number;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export async function fetchAuditLogs(limit = 50, cursor?: string) {
|
||||
const { data } = await apiClient.get<AuditLogListResponse>("/v1/audit", {
|
||||
params: { limit, cursor },
|
||||
@@ -140,6 +156,27 @@ export async function fetchAdminOverviewStats() {
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function fetchUserProjectionStatus() {
|
||||
const { data } = await apiClient.get<UserProjectionStatus>(
|
||||
"/v1/admin/projections/users",
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function reconcileUserProjection() {
|
||||
const { data } = await apiClient.post<UserProjectionActionResult>(
|
||||
"/v1/admin/projections/users/reconcile",
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function resetUserProjection() {
|
||||
const { data } = await apiClient.post<UserProjectionActionResult>(
|
||||
"/v1/admin/projections/users/reset",
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function fetchAdminRPUsageDaily({
|
||||
days = 14,
|
||||
period = "day",
|
||||
|
||||
Reference in New Issue
Block a user