forked from baron/baron-sso
feat: 테넌트 그룹 관리 UI 및 상세 멤버십 관리 기능 구현 #239
This commit is contained in:
@@ -27,6 +27,7 @@ export type TenantSummary = {
|
||||
status: string;
|
||||
domains?: string[];
|
||||
config?: Record<string, unknown>;
|
||||
tenantGroupId?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
@@ -38,6 +39,7 @@ export type TenantCreateRequest = {
|
||||
status?: string;
|
||||
domains?: string[];
|
||||
config?: Record<string, unknown>;
|
||||
tenantGroupId?: string;
|
||||
};
|
||||
|
||||
export type TenantListResponse = {
|
||||
@@ -54,6 +56,7 @@ export type TenantUpdateRequest = {
|
||||
status?: string;
|
||||
domains?: string[];
|
||||
config?: Record<string, unknown>;
|
||||
tenantGroupId?: string;
|
||||
};
|
||||
|
||||
export type ApiKeySummary = {
|
||||
@@ -139,8 +142,7 @@ export async function approveTenant(tenantId: string) {
|
||||
return data;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Group Management
|
||||
// User Group Management (Within a Tenant)
|
||||
export type GroupMember = {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -165,8 +167,34 @@ export type GroupCreateRequest = {
|
||||
export async function fetchGroups(tenantId: string) {
|
||||
const { data } = await apiClient.get<GroupSummary[]>(
|
||||
`/v1/admin/tenants/${tenantId}/groups`,
|
||||
=======
|
||||
// Tenant Group Management
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function createGroup(
|
||||
tenantId: string,
|
||||
payload: GroupCreateRequest,
|
||||
) {
|
||||
const { data } = await apiClient.post<GroupSummary>(
|
||||
`/v1/admin/tenants/${tenantId}/groups`,
|
||||
payload,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function deleteGroup(groupId: string) {
|
||||
await apiClient.delete(`/v1/admin/groups/${groupId}`);
|
||||
}
|
||||
|
||||
export async function addGroupMember(groupId: string, userId: string) {
|
||||
await apiClient.post(`/v1/admin/groups/${groupId}/members`, { userId });
|
||||
}
|
||||
|
||||
export async function removeGroupMember(groupId: string, userId: string) {
|
||||
await apiClient.delete(`/v1/admin/groups/${groupId}/members/${userId}`);
|
||||
}
|
||||
|
||||
// Tenant Group Management (Global Grouping of Tenants)
|
||||
export type TenantGroupSummary = {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -191,19 +219,10 @@ export async function fetchTenantGroups(limit = 50, offset = 0) {
|
||||
{
|
||||
params: { limit, offset },
|
||||
},
|
||||
>>>>>>> d7d2e16 (feat: 테넌트 그룹(Tenant Group) 기능 구현 #239)
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
export async function createGroup(
|
||||
tenantId: string,
|
||||
payload: GroupCreateRequest,
|
||||
) {
|
||||
const { data } = await apiClient.post<GroupSummary>(
|
||||
`/v1/admin/tenants/${tenantId}/groups`,
|
||||
=======
|
||||
export async function fetchTenantGroup(id: string) {
|
||||
const { data } = await apiClient.get<TenantGroupSummary>(
|
||||
`/v1/admin/tenant-groups/${id}`,
|
||||
@@ -218,24 +237,11 @@ export async function createTenantGroup(payload: {
|
||||
}) {
|
||||
const { data } = await apiClient.post<TenantGroupSummary>(
|
||||
"/v1/admin/tenant-groups",
|
||||
>>>>>>> d7d2e16 (feat: 테넌트 그룹(Tenant Group) 기능 구현 #239)
|
||||
payload,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
export async function deleteGroup(groupId: string) {
|
||||
await apiClient.delete(`/v1/admin/groups/${groupId}`);
|
||||
}
|
||||
|
||||
export async function addGroupMember(groupId: string, userId: string) {
|
||||
await apiClient.post(`/v1/admin/groups/${groupId}/members`, { userId });
|
||||
}
|
||||
|
||||
export async function removeGroupMember(groupId: string, userId: string) {
|
||||
await apiClient.delete(`/v1/admin/groups/${groupId}/members/${userId}`);
|
||||
=======
|
||||
export async function updateTenantGroup(
|
||||
id: string,
|
||||
payload: { name: string; description?: string },
|
||||
@@ -259,7 +265,6 @@ export async function removeTenantFromGroup(groupId: string, tenantId: string) {
|
||||
await apiClient.delete(
|
||||
`/v1/admin/tenant-groups/${groupId}/tenants/${tenantId}`,
|
||||
);
|
||||
>>>>>>> d7d2e16 (feat: 테넌트 그룹(Tenant Group) 기능 구현 #239)
|
||||
}
|
||||
|
||||
// API Key Management (M2M)
|
||||
@@ -441,4 +446,4 @@ export async function updateRelyingParty(id: string, payload: HydraClientReq) {
|
||||
|
||||
export async function deleteRelyingParty(id: string) {
|
||||
await apiClient.delete(`/v1/admin/relying-parties/${id}`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user