2025-05-16 06:23:48 +00:00
|
|
|
|
type EnvVariable {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
key: String!
|
|
|
|
|
value: String!
|
|
|
|
|
description: String
|
|
|
|
|
type: String!
|
|
|
|
|
isSecret: Boolean
|
2025-05-16 06:23:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type EnvSection {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
name: String!
|
|
|
|
|
description: String
|
|
|
|
|
variables: [EnvVariable!]!
|
2025-05-16 06:23:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input EnvVariableInput {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
key: String!
|
|
|
|
|
value: String!
|
|
|
|
|
type: String!
|
2025-05-16 06:23:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Типы для управления пользователями
|
|
|
|
|
type AdminUserInfo {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
id: Int!
|
|
|
|
|
email: String
|
|
|
|
|
name: String
|
|
|
|
|
slug: String
|
|
|
|
|
roles: [String!]
|
|
|
|
|
created_at: Int
|
|
|
|
|
last_seen: Int
|
2025-05-16 06:23:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input AdminUserUpdateInput {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
id: Int!
|
|
|
|
|
email: String
|
|
|
|
|
name: String
|
|
|
|
|
slug: String
|
|
|
|
|
roles: [String!]
|
|
|
|
|
community: Int
|
2025-05-16 06:23:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Role {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
id: String!
|
|
|
|
|
name: String!
|
|
|
|
|
description: String
|
2025-05-16 06:23:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Тип для пагинированного ответа пользователей
|
|
|
|
|
type AdminUserListResponse {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
authors: [AdminUserInfo!]!
|
|
|
|
|
total: Int!
|
|
|
|
|
page: Int!
|
|
|
|
|
perPage: Int!
|
|
|
|
|
totalPages: Int!
|
2025-05-16 06:23:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
2025-05-21 07:35:27 +00:00
|
|
|
|
# Общий ответ на операцию с данными об успехе и ошибке
|
|
|
|
|
type OperationResult {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
success: Boolean!
|
|
|
|
|
error: String
|
2025-05-21 07:35:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
2025-06-28 10:47:08 +00:00
|
|
|
|
# Типы для управления публикациями (Shout)
|
|
|
|
|
type AdminShoutInfo {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
id: Int!
|
|
|
|
|
title: String!
|
|
|
|
|
slug: String!
|
|
|
|
|
body: String!
|
|
|
|
|
lead: String
|
|
|
|
|
subtitle: String
|
|
|
|
|
layout: String!
|
|
|
|
|
lang: String!
|
|
|
|
|
cover: String
|
|
|
|
|
cover_caption: String
|
|
|
|
|
media: [MediaItem]
|
|
|
|
|
seo: String
|
|
|
|
|
created_at: Int!
|
|
|
|
|
updated_at: Int
|
|
|
|
|
published_at: Int
|
|
|
|
|
featured_at: Int
|
|
|
|
|
deleted_at: Int
|
|
|
|
|
created_by: Author!
|
|
|
|
|
updated_by: Author
|
|
|
|
|
deleted_by: Author
|
|
|
|
|
community: Community!
|
|
|
|
|
authors: [Author]
|
|
|
|
|
topics: [Topic]
|
|
|
|
|
version_of: Int
|
|
|
|
|
draft: Int
|
|
|
|
|
stat: Stat
|
2025-06-28 10:47:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Тип для пагинированного ответа публикаций
|
|
|
|
|
type AdminShoutListResponse {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
shouts: [AdminShoutInfo!]!
|
|
|
|
|
total: Int!
|
|
|
|
|
page: Int!
|
|
|
|
|
perPage: Int!
|
|
|
|
|
totalPages: Int!
|
2025-06-28 10:47:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input AdminShoutUpdateInput {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
id: Int!
|
|
|
|
|
title: String
|
|
|
|
|
body: String
|
|
|
|
|
lead: String
|
|
|
|
|
subtitle: String
|
|
|
|
|
cover: String
|
|
|
|
|
cover_caption: String
|
|
|
|
|
media: [MediaItemInput]
|
|
|
|
|
seo: String
|
|
|
|
|
published_at: Int
|
|
|
|
|
featured_at: Int
|
|
|
|
|
deleted_at: Int
|
2025-06-28 10:47:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2025-06-30 19:19:46 +00:00
|
|
|
|
# Тип для отображения приглашения в админ-панели
|
|
|
|
|
type AdminInviteInfo {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
inviter_id: Int!
|
|
|
|
|
author_id: Int!
|
|
|
|
|
shout_id: Int!
|
|
|
|
|
status: InviteStatus!
|
|
|
|
|
inviter: Author!
|
|
|
|
|
author: Author!
|
|
|
|
|
shout: AdminShoutInfo!
|
|
|
|
|
created_at: Int
|
2025-06-30 19:19:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Тип для пагинированного ответа приглашений
|
|
|
|
|
type AdminInviteListResponse {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
invites: [AdminInviteInfo!]!
|
|
|
|
|
total: Int!
|
|
|
|
|
page: Int!
|
|
|
|
|
perPage: Int!
|
|
|
|
|
totalPages: Int!
|
2025-06-30 19:19:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input AdminInviteUpdateInput {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
inviter_id: Int!
|
|
|
|
|
author_id: Int!
|
|
|
|
|
shout_id: Int!
|
|
|
|
|
status: InviteStatus!
|
2025-06-30 19:19:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
2025-06-30 20:37:21 +00:00
|
|
|
|
# Входной тип для идентификации приглашения при пакетном удалении
|
|
|
|
|
input AdminInviteIdInput {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
inviter_id: Int!
|
|
|
|
|
author_id: Int!
|
|
|
|
|
shout_id: Int!
|
2025-06-30 20:37:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
2025-07-02 19:30:21 +00:00
|
|
|
|
# Типы для управления ролями в сообществах
|
|
|
|
|
type CommunityMember {
|
|
|
|
|
id: Int!
|
|
|
|
|
name: String
|
|
|
|
|
email: String
|
|
|
|
|
slug: String
|
|
|
|
|
roles: [String!]!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CommunityMembersResponse {
|
|
|
|
|
members: [CommunityMember!]!
|
|
|
|
|
total: Int!
|
|
|
|
|
community_id: Int!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Роли пользователя в сообществе
|
|
|
|
|
type UserCommunityRoles {
|
|
|
|
|
author_id: Int!
|
|
|
|
|
community_id: Int!
|
|
|
|
|
roles: [String!]!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type RoleOperationResult {
|
|
|
|
|
success: Boolean!
|
|
|
|
|
error: String
|
|
|
|
|
author_id: Int
|
|
|
|
|
role_id: String
|
|
|
|
|
community_id: Int
|
|
|
|
|
roles: [String!]
|
|
|
|
|
removed: Boolean
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Результат обновления ролей пользователя в сообществе
|
|
|
|
|
type CommunityRoleUpdateResult {
|
|
|
|
|
success: Boolean!
|
|
|
|
|
error: String
|
|
|
|
|
author_id: Int!
|
|
|
|
|
community_id: Int!
|
|
|
|
|
roles: [String!]!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CommunityRoleSettings {
|
|
|
|
|
community_id: Int!
|
|
|
|
|
default_roles: [String!]!
|
|
|
|
|
available_roles: [String!]!
|
|
|
|
|
error: String
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CommunityRoleSettingsUpdateResult {
|
|
|
|
|
success: Boolean!
|
|
|
|
|
error: String
|
|
|
|
|
community_id: Int!
|
|
|
|
|
default_roles: [String!]
|
|
|
|
|
available_roles: [String!]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Ввод для создания произвольной роли
|
|
|
|
|
input CustomRoleInput {
|
|
|
|
|
id: String!
|
|
|
|
|
name: String!
|
|
|
|
|
description: String
|
|
|
|
|
icon: String
|
|
|
|
|
community_id: Int!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Результат создания роли
|
|
|
|
|
type CustomRoleResult {
|
|
|
|
|
success: Boolean!
|
|
|
|
|
error: String
|
|
|
|
|
role: Role
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-03 09:15:10 +00:00
|
|
|
|
# Результат операций с топиками
|
|
|
|
|
type AdminTopicResult {
|
|
|
|
|
success: Boolean!
|
|
|
|
|
error: String
|
|
|
|
|
topic: Topic
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-04 09:39:41 +00:00
|
|
|
|
# Типы для управления реакциями
|
|
|
|
|
type AdminReactionInfo {
|
|
|
|
|
id: Int!
|
|
|
|
|
shout: AdminShoutInfo!
|
|
|
|
|
created_at: Int!
|
|
|
|
|
created_by: Author!
|
|
|
|
|
updated_at: Int
|
|
|
|
|
deleted_at: Int
|
|
|
|
|
deleted_by: Author
|
|
|
|
|
kind: ReactionKind!
|
|
|
|
|
body: String
|
|
|
|
|
reply_to: Int
|
|
|
|
|
stat: Stat
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Тип для пагинированного ответа реакций
|
|
|
|
|
type AdminReactionListResponse {
|
|
|
|
|
reactions: [AdminReactionInfo!]!
|
|
|
|
|
total: Int!
|
|
|
|
|
page: Int!
|
|
|
|
|
perPage: Int!
|
|
|
|
|
totalPages: Int!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input AdminReactionUpdateInput {
|
|
|
|
|
id: Int!
|
|
|
|
|
body: String
|
|
|
|
|
deleted_at: Int
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-16 06:23:48 +00:00
|
|
|
|
extend type Query {
|
2025-07-01 09:18:24 +00:00
|
|
|
|
getEnvVariables: [EnvSection!]!
|
|
|
|
|
# Запросы для управления пользователями
|
|
|
|
|
adminGetUsers(limit: Int, offset: Int, search: String): AdminUserListResponse!
|
2025-07-02 19:30:21 +00:00
|
|
|
|
adminGetRoles(community: Int): [Role!]
|
|
|
|
|
|
|
|
|
|
# Запросы для управления ролями в сообществах
|
|
|
|
|
adminGetUserCommunityRoles(author_id: Int!, community_id: Int!): UserCommunityRoles!
|
|
|
|
|
adminGetCommunityMembers(community_id: Int!, limit: Int, offset: Int): CommunityMembersResponse!
|
|
|
|
|
adminGetCommunityRoleSettings(community_id: Int!): CommunityRoleSettings!
|
|
|
|
|
|
2025-07-01 09:18:24 +00:00
|
|
|
|
# Запросы для управления публикациями
|
|
|
|
|
adminGetShouts(
|
|
|
|
|
limit: Int
|
|
|
|
|
offset: Int
|
|
|
|
|
search: String
|
|
|
|
|
status: String
|
2025-07-02 19:30:21 +00:00
|
|
|
|
community: Int
|
2025-07-01 09:18:24 +00:00
|
|
|
|
): AdminShoutListResponse!
|
|
|
|
|
# Запросы для управления приглашениями
|
|
|
|
|
adminGetInvites(
|
|
|
|
|
limit: Int
|
|
|
|
|
offset: Int
|
|
|
|
|
search: String
|
|
|
|
|
status: String
|
|
|
|
|
): AdminInviteListResponse!
|
2025-07-02 21:20:10 +00:00
|
|
|
|
# Запросы для управления топиками
|
|
|
|
|
adminGetTopics(community_id: Int!): [Topic!]!
|
2025-07-04 09:39:41 +00:00
|
|
|
|
# Запросы для управления реакциями
|
|
|
|
|
adminGetReactions(
|
|
|
|
|
limit: Int
|
|
|
|
|
offset: Int
|
|
|
|
|
search: String
|
|
|
|
|
kind: ReactionKind
|
|
|
|
|
shout_id: Int
|
|
|
|
|
status: String
|
|
|
|
|
): AdminReactionListResponse!
|
2025-05-16 06:23:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extend type Mutation {
|
2025-07-02 19:30:21 +00:00
|
|
|
|
# Admin mutations для управления переменными окружения
|
|
|
|
|
updateEnvVariable(variable: EnvVariableInput!): OperationResult!
|
|
|
|
|
updateEnvVariables(variables: [EnvVariableInput!]!): OperationResult!
|
|
|
|
|
# Admin mutations для управления пользователями
|
2025-07-01 09:18:24 +00:00
|
|
|
|
adminUpdateUser(user: AdminUserUpdateInput!): OperationResult!
|
2025-07-02 19:30:21 +00:00
|
|
|
|
adminDeleteUser(id: Int!): OperationResult!
|
|
|
|
|
|
|
|
|
|
# Mutations для управления ролями в сообществах
|
|
|
|
|
adminUpdateUserCommunityRoles(
|
|
|
|
|
author_id: Int!,
|
|
|
|
|
community_id: Int!,
|
|
|
|
|
roles: [String!]!
|
|
|
|
|
): CommunityRoleUpdateResult!
|
|
|
|
|
|
|
|
|
|
# Admin mutations для управления публикациями
|
2025-07-01 09:18:24 +00:00
|
|
|
|
adminUpdateShout(shout: AdminShoutUpdateInput!): OperationResult!
|
|
|
|
|
adminDeleteShout(id: Int!): OperationResult!
|
|
|
|
|
adminRestoreShout(id: Int!): OperationResult!
|
2025-07-02 19:30:21 +00:00
|
|
|
|
# Admin mutations для управления приглашениями
|
2025-07-01 09:18:24 +00:00
|
|
|
|
adminUpdateInvite(invite: AdminInviteUpdateInput!): OperationResult!
|
|
|
|
|
adminDeleteInvite(
|
|
|
|
|
inviter_id: Int!
|
|
|
|
|
author_id: Int!
|
|
|
|
|
shout_id: Int!
|
|
|
|
|
): OperationResult!
|
|
|
|
|
adminDeleteInvitesBatch(invites: [AdminInviteIdInput!]!): OperationResult!
|
2025-07-02 19:30:21 +00:00
|
|
|
|
|
|
|
|
|
# Управление ролями пользователей в сообществах
|
|
|
|
|
adminSetUserCommunityRoles(author_id: Int!, community_id: Int!, roles: [String!]!): RoleOperationResult!
|
|
|
|
|
adminAddUserToRole(author_id: Int!, role_id: String!, community_id: Int!): RoleOperationResult!
|
|
|
|
|
adminRemoveUserFromRole(author_id: Int!, role_id: String!, community_id: Int!): RoleOperationResult!
|
|
|
|
|
|
|
|
|
|
# Управление настройками ролей сообщества
|
|
|
|
|
adminUpdateCommunityRoleSettings(community_id: Int!, default_roles: [String!]!, available_roles: [String!]!): CommunityRoleSettingsUpdateResult!
|
|
|
|
|
|
|
|
|
|
# Создание и удаление произвольных ролей
|
|
|
|
|
adminCreateCustomRole(role: CustomRoleInput!): CustomRoleResult!
|
|
|
|
|
adminDeleteCustomRole(role_id: String!, community_id: Int!): OperationResult!
|
2025-07-03 09:15:10 +00:00
|
|
|
|
|
|
|
|
|
# Admin mutations для управления топиками
|
|
|
|
|
adminUpdateTopic(topic: AdminTopicInput!): AdminTopicResult!
|
|
|
|
|
adminCreateTopic(topic: AdminTopicInput!): AdminTopicResult!
|
|
|
|
|
adminMergeTopics(merge_input: TopicMergeInput!): AdminTopicResult!
|
2025-07-04 09:39:41 +00:00
|
|
|
|
# Admin mutations для управления реакциями
|
|
|
|
|
adminUpdateReaction(reaction: AdminReactionUpdateInput!): OperationResult!
|
|
|
|
|
adminDeleteReaction(reaction_id: Int!): OperationResult!
|
|
|
|
|
adminRestoreReaction(reaction_id: Int!): OperationResult!
|
2025-06-01 23:56:11 +00:00
|
|
|
|
}
|