feat(admin): init project (#7197)

This commit is contained in:
Brooooooklyn
2024-06-18 06:01:13 +00:00
parent d216606193
commit 0fe672efa5
92 changed files with 6392 additions and 175 deletions

View File

@@ -9,6 +9,7 @@
"exports": {
".": "./src/index.ts"
},
"sideEffects": "false",
"devDependencies": {
"@graphql-codegen/add": "^5.0.2",
"@graphql-codegen/cli": "5.0.2",

View File

@@ -0,0 +1,11 @@
# for the admin panel only, do not use it in the app
query getCurrentUserFeatures {
currentUser {
id
name
email
emailVerified
avatarUrl
features
}
}

View File

@@ -283,6 +283,24 @@ query getCopilotSessions($workspaceId: String!) {
}`,
};
export const getCurrentUserFeaturesQuery = {
id: 'getCurrentUserFeaturesQuery' as const,
operationName: 'getCurrentUserFeatures',
definitionName: 'currentUser',
containsFile: false,
query: `
query getCurrentUserFeatures {
currentUser {
id
name
email
emailVerified
avatarUrl
features
}
}`,
};
export const getCurrentUserQuery = {
id: 'getCurrentUserQuery' as const,
operationName: 'getCurrentUser',
@@ -597,6 +615,34 @@ mutation leaveWorkspace($workspaceId: String!, $workspaceName: String!, $sendLea
}`,
};
export const listUsersQuery = {
id: 'listUsersQuery' as const,
operationName: 'listUsers',
definitionName: 'users',
containsFile: false,
query: `
query listUsers($filter: ListUserInput!) {
users(filter: $filter) {
id
name
email
features
hasPassword
emailVerified
avatarUrl
quota {
humanReadable {
blobLimit
historyPeriod
memberLimit
name
storageQuota
}
}
}
}`,
};
export const pricesQuery = {
id: 'pricesQuery' as const,
operationName: 'prices',

View File

@@ -0,0 +1,20 @@
query listUsers($filter: ListUserInput!) {
users(filter: $filter) {
id
name
email
features
hasPassword
emailVerified
avatarUrl
quota {
humanReadable {
blobLimit
historyPeriod
memberLimit
name
storageQuota
}
}
}
}

View File

@@ -1391,6 +1391,23 @@ export type GetCopilotSessionsQuery = {
} | null;
};
export type GetCurrentUserFeaturesQueryVariables = Exact<{
[key: string]: never;
}>;
export type GetCurrentUserFeaturesQuery = {
__typename?: 'Query';
currentUser: {
__typename?: 'UserType';
id: string;
name: string;
email: string;
emailVerified: boolean;
avatarUrl: string | null;
features: Array<FeatureType>;
} | null;
};
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never }>;
export type GetCurrentUserQuery = {
@@ -1664,6 +1681,35 @@ export type LeaveWorkspaceMutation = {
leaveWorkspace: boolean;
};
export type ListUsersQueryVariables = Exact<{
filter: ListUserInput;
}>;
export type ListUsersQuery = {
__typename?: 'Query';
users: Array<{
__typename?: 'UserType';
id: string;
name: string;
email: string;
features: Array<FeatureType>;
hasPassword: boolean | null;
emailVerified: boolean;
avatarUrl: string | null;
quota: {
__typename?: 'UserQuota';
humanReadable: {
__typename?: 'UserQuotaHumanReadable';
blobLimit: string;
historyPeriod: string;
memberLimit: string;
name: string;
storageQuota: string;
};
} | null;
}>;
};
export type PricesQueryVariables = Exact<{ [key: string]: never }>;
export type PricesQuery = {
@@ -2086,6 +2132,11 @@ export type Queries =
variables: GetCopilotSessionsQueryVariables;
response: GetCopilotSessionsQuery;
}
| {
name: 'getCurrentUserFeaturesQuery';
variables: GetCurrentUserFeaturesQueryVariables;
response: GetCurrentUserFeaturesQuery;
}
| {
name: 'getCurrentUserQuery';
variables: GetCurrentUserQueryVariables;
@@ -2176,6 +2227,11 @@ export type Queries =
variables: InvoicesQueryVariables;
response: InvoicesQuery;
}
| {
name: 'listUsersQuery';
variables: ListUsersQueryVariables;
response: ListUsersQuery;
}
| {
name: 'pricesQuery';
variables: PricesQueryVariables;