feat(frontend): manage Cognito users and groups, and test sign-in
CI / checks (pull_request) Failing after 12m24s
CI / checks (pull_request) Failing after 12m24s
The Cognito panel gains a test sign-in that shows the decoded ID and access token claims, a groups section, and a per-user panel to enable or disable, confirm, sign out everywhere, reset or set a password and change group membership. Delete confirmations (row and bulk) now say what else goes, driven by the schema's deleteImpact, and the inspector follows list refreshes instead of the click-time snapshot.
This commit is contained in:
@@ -27,6 +27,11 @@ import type {
|
||||
DatabaseSnapshot,
|
||||
KubernetesFargateProfile,
|
||||
KubernetesNodegroup,
|
||||
CreateUserPoolGroupInput,
|
||||
UserPoolGroup,
|
||||
UserPoolSignInTestInput,
|
||||
UserPoolSignInTestResult,
|
||||
UserPoolUserAction,
|
||||
LogsInsightsQueryInput,
|
||||
LogsInsightsQueryResult,
|
||||
LogsFilterInput,
|
||||
@@ -1377,6 +1382,98 @@ export async function deleteFlatItem(
|
||||
);
|
||||
}
|
||||
|
||||
export async function getFlatItem(
|
||||
cloud: CloudProvider,
|
||||
service: CloudServiceType,
|
||||
resourceId: string,
|
||||
itemId: string,
|
||||
signal?: AbortSignal,
|
||||
): Promise<ChildItem> {
|
||||
const res = await apiClient.call<ChildItem>(
|
||||
apiEndpointKeys.clouds.flatItems.get,
|
||||
requestOptions(cloud, service, { signal }),
|
||||
{ cloud, service, id: resourceId, itemId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function updateUserPoolUser(
|
||||
cloud: CloudProvider,
|
||||
poolId: string,
|
||||
username: string,
|
||||
input: UserPoolUserAction,
|
||||
): Promise<void> {
|
||||
await apiClient.call<void, UserPoolUserAction>(
|
||||
apiEndpointKeys.clouds.userpools.userAction,
|
||||
requestOptions(cloud, "userpools", { body: input }),
|
||||
{ cloud, id: poolId, username },
|
||||
);
|
||||
}
|
||||
|
||||
export async function setUserPoolUserGroups(
|
||||
cloud: CloudProvider,
|
||||
poolId: string,
|
||||
username: string,
|
||||
groups: string[],
|
||||
): Promise<void> {
|
||||
await apiClient.call<void, { groups: string[] }>(
|
||||
apiEndpointKeys.clouds.userpools.userGroups,
|
||||
requestOptions(cloud, "userpools", { body: { groups } }),
|
||||
{ cloud, id: poolId, username },
|
||||
);
|
||||
}
|
||||
|
||||
export async function listUserPoolGroups(
|
||||
cloud: CloudProvider,
|
||||
poolId: string,
|
||||
signal?: AbortSignal,
|
||||
): Promise<UserPoolGroup[]> {
|
||||
const res = await apiClient.call<UserPoolGroup[]>(
|
||||
apiEndpointKeys.clouds.userpools.groups.list,
|
||||
requestOptions(cloud, "userpools", { signal }),
|
||||
{ cloud, id: poolId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function createUserPoolGroup(
|
||||
cloud: CloudProvider,
|
||||
poolId: string,
|
||||
input: CreateUserPoolGroupInput,
|
||||
): Promise<UserPoolGroup> {
|
||||
const res = await apiClient.call<UserPoolGroup, CreateUserPoolGroupInput>(
|
||||
apiEndpointKeys.clouds.userpools.groups.create,
|
||||
requestOptions(cloud, "userpools", { body: input }),
|
||||
{ cloud, id: poolId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function deleteUserPoolGroup(
|
||||
cloud: CloudProvider,
|
||||
poolId: string,
|
||||
groupName: string,
|
||||
): Promise<void> {
|
||||
await apiClient.call<void>(
|
||||
apiEndpointKeys.clouds.userpools.groups.delete,
|
||||
requestOptions(cloud, "userpools"),
|
||||
{ cloud, id: poolId, groupName },
|
||||
);
|
||||
}
|
||||
|
||||
export async function testUserPoolSignIn(
|
||||
cloud: CloudProvider,
|
||||
poolId: string,
|
||||
input: UserPoolSignInTestInput,
|
||||
): Promise<UserPoolSignInTestResult> {
|
||||
const res = await apiClient.call<UserPoolSignInTestResult, UserPoolSignInTestInput>(
|
||||
apiEndpointKeys.clouds.userpools.signInTest,
|
||||
requestOptions(cloud, "userpools", { body: input }),
|
||||
{ cloud, id: poolId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function putFlatItem(
|
||||
cloud: CloudProvider,
|
||||
service: CloudServiceType,
|
||||
|
||||
Reference in New Issue
Block a user