feat(admin): manage server updates and local configuration
ci / api / api (push) Successful in 52s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 1m9s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m35s
release / release (версия и заметки) (push) Successful in 5s
release / android (APK в релиз) (push) Successful in 4m6s
ci / db / db (push) Successful in 1m15s
ci / docker / docker (образы собираются — их сервер собирает сам при обновлении) (push) Successful in 1m19s
ci / ts / ts (packages + web) (push) Successful in 2m34s
release / desktop (Linux и Windows в релиз) (push) Successful in 14m27s
release / prune (старые файлы и прогоны) (push) Successful in 6s
ci / api / api (push) Successful in 52s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 1m9s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m35s
release / release (версия и заметки) (push) Successful in 5s
release / android (APK в релиз) (push) Successful in 4m6s
ci / db / db (push) Successful in 1m15s
ci / docker / docker (образы собираются — их сервер собирает сам при обновлении) (push) Successful in 1m19s
ci / ts / ts (packages + web) (push) Successful in 2m34s
release / desktop (Linux и Windows в релиз) (push) Successful in 14m27s
release / prune (старые файлы и прогоны) (push) Successful in 6s
This commit is contained in:
1 parent
e33abc948c
commit
a29a8b18ad
49 files changed
+3604
-353
No files matched your search
@@ -22,6 +22,104 @@ tags:
|
||||
security:
|
||||
- bearerAuth: []
|
||||
paths:
|
||||
/api/v1/admin/server/updates:
|
||||
get:
|
||||
operationId: getServerUpdates
|
||||
tags: [admin]
|
||||
parameters:
|
||||
- in: query
|
||||
name: source_id
|
||||
schema: {type: string}
|
||||
responses:
|
||||
"200":
|
||||
description: Server management result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerUpdates"
|
||||
default:
|
||||
$ref: "#/components/responses/Problem"
|
||||
post:
|
||||
operationId: startServerUpdate
|
||||
tags: [admin]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerUpdateRequest"
|
||||
responses:
|
||||
"202":
|
||||
description: Server management result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerJob"
|
||||
default:
|
||||
$ref: "#/components/responses/Problem"
|
||||
/api/v1/admin/server/update-sources:
|
||||
put:
|
||||
operationId: saveServerUpdateSources
|
||||
tags: [admin]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerSources"
|
||||
responses:
|
||||
"200":
|
||||
description: Server management result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerSources"
|
||||
default:
|
||||
$ref: "#/components/responses/Problem"
|
||||
/api/v1/admin/server/config:
|
||||
get:
|
||||
operationId: getServerConfig
|
||||
tags: [admin]
|
||||
responses:
|
||||
"200":
|
||||
description: Server management result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerConfig"
|
||||
default:
|
||||
$ref: "#/components/responses/Problem"
|
||||
patch:
|
||||
operationId: saveServerConfig
|
||||
tags: [admin]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerConfigPatch"
|
||||
responses:
|
||||
"200":
|
||||
description: Server management result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerConfig"
|
||||
default:
|
||||
$ref: "#/components/responses/Problem"
|
||||
/api/v1/admin/server/config/apply:
|
||||
post:
|
||||
operationId: applyServerConfig
|
||||
tags: [admin]
|
||||
responses:
|
||||
"202":
|
||||
description: Server management result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ServerJob"
|
||||
default:
|
||||
$ref: "#/components/responses/Problem"
|
||||
/api/v1/admin/genius:
|
||||
get:
|
||||
operationId: getGeniusStats
|
||||
@@ -1832,6 +1930,85 @@ components:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Problem"
|
||||
schemas:
|
||||
ServerSource:
|
||||
type: object
|
||||
required: [id, name, url]
|
||||
properties:
|
||||
id: {type: string, maxLength: 64}
|
||||
name: {type: string, maxLength: 100}
|
||||
url: {type: string, maxLength: 2048}
|
||||
ServerSources:
|
||||
type: object
|
||||
required: [sources]
|
||||
properties:
|
||||
sources:
|
||||
type: array
|
||||
maxItems: 20
|
||||
items: {$ref: "#/components/schemas/ServerSource"}
|
||||
ServerJob:
|
||||
type: object
|
||||
required: [id, kind, state, started_at, finished_at, target, log]
|
||||
properties:
|
||||
id: {type: string}
|
||||
kind: {type: string, enum: [update, config]}
|
||||
state: {type: string, enum: [running, succeeded, failed]}
|
||||
started_at: {type: string}
|
||||
finished_at: {type: string}
|
||||
target: {type: string}
|
||||
log: {type: string}
|
||||
ServerUpdates:
|
||||
type: object
|
||||
required: [sources, versions, current_version, job, source_error]
|
||||
properties:
|
||||
sources:
|
||||
type: array
|
||||
items: {$ref: "#/components/schemas/ServerSource"}
|
||||
versions:
|
||||
type: array
|
||||
items: {type: string}
|
||||
current_version: {type: string}
|
||||
source_error: {type: string}
|
||||
job:
|
||||
allOf: [{$ref: "#/components/schemas/ServerJob"}]
|
||||
nullable: true
|
||||
ServerUpdateRequest:
|
||||
type: object
|
||||
required: [source_id, channel]
|
||||
properties:
|
||||
source_id: {type: string}
|
||||
channel: {type: string, enum: [latest, version, main]}
|
||||
version: {type: string}
|
||||
ServerConfigEntry:
|
||||
type: object
|
||||
required: [key, group, type, secret, readonly, effective, env, local, default_value, source]
|
||||
properties:
|
||||
key: {type: string}
|
||||
group: {type: string}
|
||||
type: {type: string}
|
||||
secret: {type: boolean}
|
||||
readonly: {type: boolean}
|
||||
effective: {type: string}
|
||||
env: {type: string, nullable: true}
|
||||
local: {type: string, nullable: true}
|
||||
default_value: {type: string}
|
||||
source: {type: string, enum: [env, local, default]}
|
||||
ServerConfig:
|
||||
type: object
|
||||
required: [entries, revision, restart_required]
|
||||
properties:
|
||||
revision: {type: string}
|
||||
restart_required: {type: boolean}
|
||||
entries:
|
||||
type: array
|
||||
items: {$ref: "#/components/schemas/ServerConfigEntry"}
|
||||
ServerConfigPatch:
|
||||
type: object
|
||||
required: [revision, values]
|
||||
properties:
|
||||
revision: {type: string}
|
||||
values:
|
||||
type: object
|
||||
additionalProperties: {type: string, nullable: true}
|
||||
PlaylistShare:
|
||||
type: object
|
||||
required: [share_id]
|
||||
@@ -2495,6 +2672,9 @@ components:
|
||||
nullable: true
|
||||
role:
|
||||
$ref: "#/components/schemas/Role"
|
||||
manages_updates:
|
||||
type: boolean
|
||||
description: Управление обновлениями сервера. У admin всегда; другим выдаёт только admin
|
||||
reviews_uploads:
|
||||
type: boolean
|
||||
description: Может рассматривать очередь на добавление. Не следует из роли и может быть у нескольких людей сразу
|
||||
@@ -2550,6 +2730,9 @@ components:
|
||||
nullable: true
|
||||
role:
|
||||
$ref: "#/components/schemas/Role"
|
||||
manages_updates:
|
||||
type: boolean
|
||||
description: Управление обновлениями сервера. У admin всегда; другим выдаёт только admin
|
||||
reviews_uploads:
|
||||
type: boolean
|
||||
description: Может рассматривать очередь на добавление. Не следует из роли и может быть у нескольких людей сразу
|
||||
@@ -2590,6 +2773,9 @@ components:
|
||||
maxLength: 64
|
||||
role:
|
||||
$ref: "#/components/schemas/Role"
|
||||
manages_updates:
|
||||
type: boolean
|
||||
description: Управление обновлениями сервера. У admin всегда; другим выдаёт только admin
|
||||
reviews_uploads:
|
||||
type: boolean
|
||||
description: Сразу выдать аудит загрузок. Может задать только админ
|
||||
@@ -2616,6 +2802,9 @@ components:
|
||||
$ref: "#/components/schemas/Role"
|
||||
is_blocked:
|
||||
type: boolean
|
||||
manages_updates:
|
||||
type: boolean
|
||||
description: Управление обновлениями сервера. У admin всегда; другим выдаёт только admin
|
||||
reviews_uploads:
|
||||
type: boolean
|
||||
description: Выдать или забрать аудит загрузок. Может менять только админ, в том числе у себя
|
||||
|
||||
Reference in new issue
Block a user