forked from baron/baron-sso
devfront 관계 탭 사용자 검색·다중선택 UX 개선
This commit is contained in:
@@ -104,6 +104,9 @@ export type ClientRelation = {
|
||||
subject: string;
|
||||
subjectType: string;
|
||||
subjectId: string;
|
||||
userName?: string;
|
||||
userEmail?: string;
|
||||
userLoginId?: string;
|
||||
};
|
||||
|
||||
export type ClientRelationListResponse = {
|
||||
@@ -116,6 +119,17 @@ export type ClientRelationUpsertRequest = {
|
||||
userId?: string;
|
||||
};
|
||||
|
||||
export type DevAssignableUser = {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
loginId?: string;
|
||||
};
|
||||
|
||||
export type DevAssignableUserListResponse = {
|
||||
items: DevAssignableUser[];
|
||||
};
|
||||
|
||||
export type ConsentSummary = {
|
||||
subject: string;
|
||||
userName?: string;
|
||||
@@ -188,6 +202,16 @@ export async function fetchClientRelations(clientId: string) {
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function fetchDevUsers(search: string, limit = 10) {
|
||||
const { data } = await apiClient.get<DevAssignableUserListResponse>(
|
||||
"/dev/users",
|
||||
{
|
||||
params: { search, limit },
|
||||
},
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function addClientRelation(
|
||||
clientId: string,
|
||||
payload: ClientRelationUpsertRequest,
|
||||
|
||||
Reference in New Issue
Block a user