1
0
forked from baron/baron-sso

RP 정책 설정 UI 수정

This commit is contained in:
2026-04-24 16:32:34 +09:00
parent 5acf248285
commit f97b244a59
5 changed files with 408 additions and 17 deletions

View File

@@ -23,6 +23,28 @@ export type ClientListResponse = {
offset: number;
};
export type TenantSummary = {
id: string;
type: string;
parentId?: string | null;
name: string;
slug: string;
description: string;
status: string;
domains?: string[];
config?: Record<string, unknown>;
memberCount: number;
createdAt: string;
updatedAt: string;
};
export type TenantListResponse = {
items: TenantSummary[];
limit: number;
offset: number;
total: number;
};
export type DevStats = {
total_clients: number;
active_sessions: number;
@@ -188,6 +210,17 @@ export async function fetchDevStats() {
return data;
}
export async function fetchTenants(
limit = 1000,
offset = 0,
parentId?: string,
) {
const { data } = await apiClient.get<TenantListResponse>("/tenants", {
params: { limit, offset, parentId },
});
return data;
}
export async function fetchClient(clientId: string) {
const { data } = await apiClient.get<ClientDetailResponse>(
`/dev/clients/${clientId}`,
@@ -376,14 +409,14 @@ export async function fetchDevAuditLogs(
return data;
}
export type TenantSummary = {
export type MyTenantSummary = {
id: string;
name: string;
slug: string;
};
export async function fetchMyTenants() {
const { data } = await apiClient.get<TenantSummary[]>("/dev/my-tenants");
const { data } = await apiClient.get<MyTenantSummary[]>("/dev/my-tenants");
return data;
}