mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(admin): add import and export users to admin panel (#10810)
This commit is contained in:
14
packages/frontend/graphql/src/graphql/import-users.gql
Normal file
14
packages/frontend/graphql/src/graphql/import-users.gql
Normal file
@@ -0,0 +1,14 @@
|
||||
mutation ImportUsers($input: ImportUsersInput!) {
|
||||
importUsers(input: $input) {
|
||||
__typename
|
||||
... on UserType {
|
||||
id
|
||||
name
|
||||
email
|
||||
}
|
||||
... on UserImportFailedType {
|
||||
email
|
||||
error
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -915,6 +915,25 @@ export const listHistoryQuery = {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const importUsersMutation = {
|
||||
id: 'importUsersMutation' as const,
|
||||
op: 'ImportUsers',
|
||||
query: `mutation ImportUsers($input: ImportUsersInput!) {
|
||||
importUsers(input: $input) {
|
||||
__typename
|
||||
... on UserType {
|
||||
id
|
||||
name
|
||||
email
|
||||
}
|
||||
... on UserImportFailedType {
|
||||
email
|
||||
error
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getInvoicesCountQuery = {
|
||||
id: 'getInvoicesCountQuery' as const,
|
||||
op: 'getInvoicesCount',
|
||||
|
||||
@@ -3125,6 +3125,18 @@ 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 = {
|
||||
@@ -4191,6 +4203,11 @@ export type Mutations =
|
||||
variables: GrantDocUserRolesMutationVariables;
|
||||
response: GrantDocUserRolesMutation;
|
||||
}
|
||||
| {
|
||||
name: 'importUsersMutation';
|
||||
variables: ImportUsersMutationVariables;
|
||||
response: ImportUsersMutation;
|
||||
}
|
||||
| {
|
||||
name: 'leaveWorkspaceMutation';
|
||||
variables: LeaveWorkspaceMutationVariables;
|
||||
|
||||
Reference in New Issue
Block a user