core/schema/admin.graphql

72 lines
1.5 KiB
GraphQL
Raw Normal View History

2025-05-16 06:23:48 +00:00
type EnvVariable {
key: String!
value: String!
description: String
type: String!
isSecret: Boolean
}
type EnvSection {
name: String!
description: String
variables: [EnvVariable!]!
}
input EnvVariableInput {
key: String!
value: String!
type: String!
}
# Типы для управления пользователями
type AdminUserInfo {
id: Int!
email: String
name: String
slug: String
roles: [String!]
created_at: Int
last_seen: Int
}
input AdminUserUpdateInput {
id: Int!
roles: [String!]
2025-05-21 07:35:27 +00:00
community: Int
2025-05-16 06:23:48 +00:00
}
type Role {
id: String!
name: String!
description: String
}
# Тип для пагинированного ответа пользователей
type AdminUserListResponse {
users: [AdminUserInfo!]!
total: Int!
page: Int!
perPage: Int!
totalPages: Int!
}
2025-05-21 07:35:27 +00:00
# Общий ответ на операцию с данными об успехе и ошибке
type OperationResult {
success: Boolean!
error: String
}
2025-05-16 06:23:48 +00:00
extend type Query {
getEnvVariables: [EnvSection!]!
# Запросы для управления пользователями
adminGetUsers(limit: Int, offset: Int, search: String): AdminUserListResponse!
adminGetRoles: [Role!]!
}
extend type Mutation {
updateEnvVariable(key: String!, value: String!): Boolean!
updateEnvVariables(variables: [EnvVariableInput!]!): Boolean!
# Мутации для управления пользователями
2025-05-21 07:35:27 +00:00
adminUpdateUser(user: AdminUserUpdateInput!): OperationResult!
2025-05-16 06:23:48 +00:00
}