fix(admin): show user disabled status in admin panel search results (#11146)

close AF-2365
This commit is contained in:
JimmFly
2025-03-26 10:32:09 +00:00
parent eb8fe91525
commit a89fe27e50
19 changed files with 523 additions and 551 deletions

View File

@@ -2389,6 +2389,230 @@ export type AdminServerConfigQuery = {
};
};
export type CreateChangePasswordUrlMutationVariables = Exact<{
callbackUrl: Scalars['String']['input'];
userId: Scalars['String']['input'];
}>;
export type CreateChangePasswordUrlMutation = {
__typename?: 'Mutation';
createChangePasswordUrl: string;
};
export type GetPromptsQueryVariables = Exact<{ [key: string]: never }>;
export type GetPromptsQuery = {
__typename?: 'Query';
listCopilotPrompts: Array<{
__typename?: 'CopilotPromptType';
name: string;
model: string;
action: string | null;
config: {
__typename?: 'CopilotPromptConfigType';
jsonMode: boolean | null;
frequencyPenalty: number | null;
presencePenalty: number | null;
temperature: number | null;
topP: number | null;
} | null;
messages: Array<{
__typename?: 'CopilotPromptMessageType';
role: CopilotPromptMessageRole;
content: string;
params: Record<string, string> | null;
}>;
}>;
};
export type UpdatePromptMutationVariables = Exact<{
name: Scalars['String']['input'];
messages: Array<CopilotPromptMessageInput> | CopilotPromptMessageInput;
}>;
export type UpdatePromptMutation = {
__typename?: 'Mutation';
updateCopilotPrompt: {
__typename?: 'CopilotPromptType';
name: string;
model: string;
action: string | null;
config: {
__typename?: 'CopilotPromptConfigType';
jsonMode: boolean | null;
frequencyPenalty: number | null;
presencePenalty: number | null;
temperature: number | null;
topP: number | null;
} | null;
messages: Array<{
__typename?: 'CopilotPromptMessageType';
role: CopilotPromptMessageRole;
content: string;
params: Record<string, string> | null;
}>;
};
};
export type CreateUserMutationVariables = Exact<{
input: CreateUserInput;
}>;
export type CreateUserMutation = {
__typename?: 'Mutation';
createUser: { __typename?: 'UserType'; id: string };
};
export type DeleteUserMutationVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type DeleteUserMutation = {
__typename?: 'Mutation';
deleteUser: { __typename?: 'DeleteAccount'; success: boolean };
};
export type DisableUserMutationVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type DisableUserMutation = {
__typename?: 'Mutation';
banUser: { __typename?: 'UserType'; email: string; disabled: boolean };
};
export type EnableUserMutationVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type EnableUserMutation = {
__typename?: 'Mutation';
enableUser: { __typename?: 'UserType'; email: string; disabled: boolean };
};
export type GetServerRuntimeConfigQueryVariables = Exact<{
[key: string]: never;
}>;
export type GetServerRuntimeConfigQuery = {
__typename?: 'Query';
serverRuntimeConfig: Array<{
__typename?: 'ServerRuntimeConfigType';
id: string;
module: string;
key: string;
description: string;
value: Record<string, string>;
type: RuntimeConfigType;
updatedAt: string;
}>;
};
export type GetServerServiceConfigsQueryVariables = Exact<{
[key: string]: never;
}>;
export type GetServerServiceConfigsQuery = {
__typename?: 'Query';
serverServiceConfigs: Array<{
__typename?: 'ServerServiceConfig';
name: string;
config: any;
}>;
};
export type GetUserByEmailQueryVariables = Exact<{
email: Scalars['String']['input'];
}>;
export type GetUserByEmailQuery = {
__typename?: 'Query';
userByEmail: {
__typename?: 'UserType';
id: string;
name: string;
email: string;
features: Array<FeatureType>;
hasPassword: boolean | null;
emailVerified: boolean;
avatarUrl: string | null;
disabled: boolean;
} | null;
};
export type GetUsersCountQueryVariables = Exact<{ [key: string]: never }>;
export type GetUsersCountQuery = { __typename?: 'Query'; usersCount: number };
export type ImportUsersMutationVariables = Exact<{
input: ImportUsersInput;
}>;
export type ImportUsersMutation = {
__typename?: 'Mutation';
importUsers: Array<
| { __typename: 'UserImportFailedType'; email: string; error: string }
| { __typename: 'UserType'; id: string; name: string; email: string }
>;
};
export type ListUsersQueryVariables = Exact<{
filter: ListUserInput;
}>;
export type ListUsersQuery = {
__typename?: 'Query';
users: Array<{
__typename?: 'UserType';
id: string;
name: string;
email: string;
disabled: boolean;
features: Array<FeatureType>;
hasPassword: boolean | null;
emailVerified: boolean;
avatarUrl: string | null;
}>;
};
export type UpdateAccountFeaturesMutationVariables = Exact<{
userId: Scalars['String']['input'];
features: Array<FeatureType> | FeatureType;
}>;
export type UpdateAccountFeaturesMutation = {
__typename?: 'Mutation';
updateUserFeatures: Array<FeatureType>;
};
export type UpdateAccountMutationVariables = Exact<{
id: Scalars['String']['input'];
input: ManageUserInput;
}>;
export type UpdateAccountMutation = {
__typename?: 'Mutation';
updateUser: {
__typename?: 'UserType';
id: string;
name: string;
email: string;
};
};
export type UpdateServerRuntimeConfigsMutationVariables = Exact<{
updates: Scalars['JSONObject']['input'];
}>;
export type UpdateServerRuntimeConfigsMutation = {
__typename?: 'Mutation';
updateRuntimeConfigs: Array<{
__typename?: 'ServerRuntimeConfigType';
key: string;
value: Record<string, string>;
}>;
};
export type DeleteBlobMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
key: Scalars['String']['input'];
@@ -2460,16 +2684,6 @@ export type ChangeEmailMutation = {
changeEmail: { __typename?: 'UserType'; id: string; email: string };
};
export type CreateChangePasswordUrlMutationVariables = Exact<{
callbackUrl: Scalars['String']['input'];
userId: Scalars['String']['input'];
}>;
export type CreateChangePasswordUrlMutation = {
__typename?: 'Mutation';
createChangePasswordUrl: string;
};
export type ChangePasswordMutationVariables = Exact<{
token: Scalars['String']['input'];
userId: Scalars['String']['input'];
@@ -2891,61 +3105,6 @@ export type CreateCopilotMessageMutation = {
createCopilotMessage: string;
};
export type GetPromptsQueryVariables = Exact<{ [key: string]: never }>;
export type GetPromptsQuery = {
__typename?: 'Query';
listCopilotPrompts: Array<{
__typename?: 'CopilotPromptType';
name: string;
model: string;
action: string | null;
config: {
__typename?: 'CopilotPromptConfigType';
jsonMode: boolean | null;
frequencyPenalty: number | null;
presencePenalty: number | null;
temperature: number | null;
topP: number | null;
} | null;
messages: Array<{
__typename?: 'CopilotPromptMessageType';
role: CopilotPromptMessageRole;
content: string;
params: Record<string, string> | null;
}>;
}>;
};
export type UpdatePromptMutationVariables = Exact<{
name: Scalars['String']['input'];
messages: Array<CopilotPromptMessageInput> | CopilotPromptMessageInput;
}>;
export type UpdatePromptMutation = {
__typename?: 'Mutation';
updateCopilotPrompt: {
__typename?: 'CopilotPromptType';
name: string;
model: string;
action: string | null;
config: {
__typename?: 'CopilotPromptConfigType';
jsonMode: boolean | null;
frequencyPenalty: number | null;
presencePenalty: number | null;
temperature: number | null;
topP: number | null;
} | null;
messages: Array<{
__typename?: 'CopilotPromptMessageType';
role: CopilotPromptMessageRole;
content: string;
params: Record<string, string> | null;
}>;
};
};
export type CopilotQuotaQueryVariables = Exact<{ [key: string]: never }>;
export type CopilotQuotaQuery = {
@@ -3048,15 +3207,6 @@ export type CreateSelfhostCustomerPortalMutation = {
createSelfhostWorkspaceCustomerPortal: string;
};
export type CreateUserMutationVariables = Exact<{
input: CreateUserInput;
}>;
export type CreateUserMutation = {
__typename?: 'Mutation';
createUser: { __typename?: 'UserType'; id: string };
};
export type CreateWorkspaceMutationVariables = Exact<{ [key: string]: never }>;
export type CreateWorkspaceMutation = {
@@ -3085,15 +3235,6 @@ export type DeleteAccountMutation = {
deleteAccount: { __typename?: 'DeleteAccount'; success: boolean };
};
export type DeleteUserMutationVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type DeleteUserMutation = {
__typename?: 'Mutation';
deleteUser: { __typename?: 'DeleteAccount'; success: boolean };
};
export type DeleteWorkspaceMutationVariables = Exact<{
id: Scalars['String']['input'];
}>;
@@ -3103,15 +3244,6 @@ export type DeleteWorkspaceMutation = {
deleteWorkspace: boolean;
};
export type DisableUserMutationVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type DisableUserMutation = {
__typename?: 'Mutation';
banUser: { __typename?: 'UserType'; email: string; disabled: boolean };
};
export type GetDocRolePermissionsQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
docId: Scalars['String']['input'];
@@ -3143,15 +3275,6 @@ export type GetDocRolePermissionsQuery = {
};
};
export type EnableUserMutationVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type EnableUserMutation = {
__typename?: 'Mutation';
enableUser: { __typename?: 'UserType'; email: string; disabled: boolean };
};
export type CredentialsRequirementsFragment = {
__typename?: 'CredentialsRequirementType';
password: {
@@ -3381,66 +3504,6 @@ export type GetPublicUserByIdQuery = {
} | null;
};
export type GetServerRuntimeConfigQueryVariables = Exact<{
[key: string]: never;
}>;
export type GetServerRuntimeConfigQuery = {
__typename?: 'Query';
serverRuntimeConfig: Array<{
__typename?: 'ServerRuntimeConfigType';
id: string;
module: string;
key: string;
description: string;
value: Record<string, string>;
type: RuntimeConfigType;
updatedAt: string;
}>;
};
export type GetServerServiceConfigsQueryVariables = Exact<{
[key: string]: never;
}>;
export type GetServerServiceConfigsQuery = {
__typename?: 'Query';
serverServiceConfigs: Array<{
__typename?: 'ServerServiceConfig';
name: string;
config: any;
}>;
};
export type GetUserByEmailQueryVariables = Exact<{
email: Scalars['String']['input'];
}>;
export type GetUserByEmailQuery = {
__typename?: 'Query';
userByEmail: {
__typename?: 'UserType';
id: string;
name: string;
email: string;
features: Array<FeatureType>;
hasPassword: boolean | null;
emailVerified: boolean;
avatarUrl: string | null;
quota: {
__typename?: 'UserQuotaType';
humanReadable: {
__typename?: 'UserQuotaHumanReadableType';
blobLimit: string;
historyPeriod: string;
memberLimit: string;
name: string;
storageQuota: string;
};
};
} | null;
};
export type GetUserFeaturesQueryVariables = Exact<{ [key: string]: never }>;
export type GetUserFeaturesQuery = {
@@ -3489,10 +3552,6 @@ export type GetUserQuery = {
| null;
};
export type GetUsersCountQueryVariables = Exact<{ [key: string]: never }>;
export type GetUsersCountQuery = { __typename?: 'Query'; usersCount: number };
export type GetWorkspaceInfoQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
}>;
@@ -3653,18 +3712,6 @@ export type ListHistoryQuery = {
};
};
export type ImportUsersMutationVariables = Exact<{
input: ImportUsersInput;
}>;
export type ImportUsersMutation = {
__typename?: 'Mutation';
importUsers: Array<
| { __typename: 'UserImportFailedType'; email: string; error: string }
| { __typename: 'UserType'; id: string; name: string; email: string }
>;
};
export type GetInvoicesCountQueryVariables = Exact<{ [key: string]: never }>;
export type GetInvoicesCountQuery = {
@@ -3742,25 +3789,6 @@ export type ListNotificationsQuery = {
} | null;
};
export type ListUsersQueryVariables = Exact<{
filter: ListUserInput;
}>;
export type ListUsersQuery = {
__typename?: 'Query';
users: Array<{
__typename?: 'UserType';
id: string;
name: string;
email: string;
disabled: boolean;
features: Array<FeatureType>;
hasPassword: boolean | null;
emailVerified: boolean;
avatarUrl: string | null;
}>;
};
export type MentionUserMutationVariables = Exact<{
input: MentionInput;
}>;
@@ -4010,31 +4038,6 @@ export type SubscriptionQuery = {
} | null;
};
export type UpdateAccountFeaturesMutationVariables = Exact<{
userId: Scalars['String']['input'];
features: Array<FeatureType> | FeatureType;
}>;
export type UpdateAccountFeaturesMutation = {
__typename?: 'Mutation';
updateUserFeatures: Array<FeatureType>;
};
export type UpdateAccountMutationVariables = Exact<{
id: Scalars['String']['input'];
input: ManageUserInput;
}>;
export type UpdateAccountMutation = {
__typename?: 'Mutation';
updateUser: {
__typename?: 'UserType';
id: string;
name: string;
email: string;
};
};
export type UpdateDocDefaultRoleMutationVariables = Exact<{
input: UpdateDocDefaultRoleInput;
}>;
@@ -4053,19 +4056,6 @@ export type UpdateDocUserRoleMutation = {
updateDocUserRole: boolean;
};
export type UpdateServerRuntimeConfigsMutationVariables = Exact<{
updates: Scalars['JSONObject']['input'];
}>;
export type UpdateServerRuntimeConfigsMutation = {
__typename?: 'Mutation';
updateRuntimeConfigs: Array<{
__typename?: 'ServerRuntimeConfigType';
key: string;
value: Record<string, string>;
}>;
};
export type UpdateSubscriptionMutationVariables = Exact<{
plan?: InputMaybe<SubscriptionPlan>;
recurring: SubscriptionRecurring;
@@ -4352,6 +4342,36 @@ export type Queries =
variables: AdminServerConfigQueryVariables;
response: AdminServerConfigQuery;
}
| {
name: 'getPromptsQuery';
variables: GetPromptsQueryVariables;
response: GetPromptsQuery;
}
| {
name: 'getServerRuntimeConfigQuery';
variables: GetServerRuntimeConfigQueryVariables;
response: GetServerRuntimeConfigQuery;
}
| {
name: 'getServerServiceConfigsQuery';
variables: GetServerServiceConfigsQueryVariables;
response: GetServerServiceConfigsQuery;
}
| {
name: 'getUserByEmailQuery';
variables: GetUserByEmailQueryVariables;
response: GetUserByEmailQuery;
}
| {
name: 'getUsersCountQuery';
variables: GetUsersCountQueryVariables;
response: GetUsersCountQuery;
}
| {
name: 'listUsersQuery';
variables: ListUsersQueryVariables;
response: ListUsersQuery;
}
| {
name: 'listBlobsQuery';
variables: ListBlobsQueryVariables;
@@ -4402,11 +4422,6 @@ export type Queries =
variables: GetAudioTranscriptionQueryVariables;
response: GetAudioTranscriptionQuery;
}
| {
name: 'getPromptsQuery';
variables: GetPromptsQueryVariables;
response: GetPromptsQuery;
}
| {
name: 'copilotQuotaQuery';
variables: CopilotQuotaQueryVariables;
@@ -4482,21 +4497,6 @@ export type Queries =
variables: GetPublicUserByIdQueryVariables;
response: GetPublicUserByIdQuery;
}
| {
name: 'getServerRuntimeConfigQuery';
variables: GetServerRuntimeConfigQueryVariables;
response: GetServerRuntimeConfigQuery;
}
| {
name: 'getServerServiceConfigsQuery';
variables: GetServerServiceConfigsQueryVariables;
response: GetServerServiceConfigsQuery;
}
| {
name: 'getUserByEmailQuery';
variables: GetUserByEmailQueryVariables;
response: GetUserByEmailQuery;
}
| {
name: 'getUserFeaturesQuery';
variables: GetUserFeaturesQueryVariables;
@@ -4512,11 +4512,6 @@ export type Queries =
variables: GetUserQueryVariables;
response: GetUserQuery;
}
| {
name: 'getUsersCountQuery';
variables: GetUsersCountQueryVariables;
response: GetUsersCountQuery;
}
| {
name: 'getWorkspaceInfoQuery';
variables: GetWorkspaceInfoQueryVariables;
@@ -4577,11 +4572,6 @@ export type Queries =
variables: ListNotificationsQueryVariables;
response: ListNotificationsQuery;
}
| {
name: 'listUsersQuery';
variables: ListUsersQueryVariables;
response: ListUsersQuery;
}
| {
name: 'notificationCountQuery';
variables: NotificationCountQueryVariables;
@@ -4634,6 +4624,56 @@ export type Mutations =
variables: ActivateLicenseMutationVariables;
response: ActivateLicenseMutation;
}
| {
name: 'createChangePasswordUrlMutation';
variables: CreateChangePasswordUrlMutationVariables;
response: CreateChangePasswordUrlMutation;
}
| {
name: 'updatePromptMutation';
variables: UpdatePromptMutationVariables;
response: UpdatePromptMutation;
}
| {
name: 'createUserMutation';
variables: CreateUserMutationVariables;
response: CreateUserMutation;
}
| {
name: 'deleteUserMutation';
variables: DeleteUserMutationVariables;
response: DeleteUserMutation;
}
| {
name: 'disableUserMutation';
variables: DisableUserMutationVariables;
response: DisableUserMutation;
}
| {
name: 'enableUserMutation';
variables: EnableUserMutationVariables;
response: EnableUserMutation;
}
| {
name: 'importUsersMutation';
variables: ImportUsersMutationVariables;
response: ImportUsersMutation;
}
| {
name: 'updateAccountFeaturesMutation';
variables: UpdateAccountFeaturesMutationVariables;
response: UpdateAccountFeaturesMutation;
}
| {
name: 'updateAccountMutation';
variables: UpdateAccountMutationVariables;
response: UpdateAccountMutation;
}
| {
name: 'updateServerRuntimeConfigsMutation';
variables: UpdateServerRuntimeConfigsMutationVariables;
response: UpdateServerRuntimeConfigsMutation;
}
| {
name: 'deleteBlobMutation';
variables: DeleteBlobMutationVariables;
@@ -4659,11 +4699,6 @@ export type Mutations =
variables: ChangeEmailMutationVariables;
response: ChangeEmailMutation;
}
| {
name: 'createChangePasswordUrlMutation';
variables: CreateChangePasswordUrlMutationVariables;
response: CreateChangePasswordUrlMutation;
}
| {
name: 'changePasswordMutation';
variables: ChangePasswordMutationVariables;
@@ -4724,11 +4759,6 @@ export type Mutations =
variables: CreateCopilotMessageMutationVariables;
response: CreateCopilotMessageMutation;
}
| {
name: 'updatePromptMutation';
variables: UpdatePromptMutationVariables;
response: UpdatePromptMutation;
}
| {
name: 'cleanupCopilotSessionMutation';
variables: CleanupCopilotSessionMutationVariables;
@@ -4764,11 +4794,6 @@ export type Mutations =
variables: CreateSelfhostCustomerPortalMutationVariables;
response: CreateSelfhostCustomerPortalMutation;
}
| {
name: 'createUserMutation';
variables: CreateUserMutationVariables;
response: CreateUserMutation;
}
| {
name: 'createWorkspaceMutation';
variables: CreateWorkspaceMutationVariables;
@@ -4784,26 +4809,11 @@ export type Mutations =
variables: DeleteAccountMutationVariables;
response: DeleteAccountMutation;
}
| {
name: 'deleteUserMutation';
variables: DeleteUserMutationVariables;
response: DeleteUserMutation;
}
| {
name: 'deleteWorkspaceMutation';
variables: DeleteWorkspaceMutationVariables;
response: DeleteWorkspaceMutation;
}
| {
name: 'disableUserMutation';
variables: DisableUserMutationVariables;
response: DisableUserMutation;
}
| {
name: 'enableUserMutation';
variables: EnableUserMutationVariables;
response: EnableUserMutation;
}
| {
name: 'generateLicenseKeyMutation';
variables: GenerateLicenseKeyMutationVariables;
@@ -4814,11 +4824,6 @@ export type Mutations =
variables: GrantDocUserRolesMutationVariables;
response: GrantDocUserRolesMutation;
}
| {
name: 'importUsersMutation';
variables: ImportUsersMutationVariables;
response: ImportUsersMutation;
}
| {
name: 'leaveWorkspaceMutation';
variables: LeaveWorkspaceMutationVariables;
@@ -4899,16 +4904,6 @@ export type Mutations =
variables: SetWorkspacePublicByIdMutationVariables;
response: SetWorkspacePublicByIdMutation;
}
| {
name: 'updateAccountFeaturesMutation';
variables: UpdateAccountFeaturesMutationVariables;
response: UpdateAccountFeaturesMutation;
}
| {
name: 'updateAccountMutation';
variables: UpdateAccountMutationVariables;
response: UpdateAccountMutation;
}
| {
name: 'updateDocDefaultRoleMutation';
variables: UpdateDocDefaultRoleMutationVariables;
@@ -4919,11 +4914,6 @@ export type Mutations =
variables: UpdateDocUserRoleMutationVariables;
response: UpdateDocUserRoleMutation;
}
| {
name: 'updateServerRuntimeConfigsMutation';
variables: UpdateServerRuntimeConfigsMutationVariables;
response: UpdateServerRuntimeConfigsMutation;
}
| {
name: 'updateSubscriptionMutation';
variables: UpdateSubscriptionMutationVariables;