feat: version check endpoint (#18572)

This commit is contained in:
Daniel Dietzler
2025-05-27 16:33:23 +02:00
committed by GitHub
parent ef060e97b6
commit 5268dc4ee2
13 changed files with 338 additions and 1 deletions

View File

@@ -5563,6 +5563,38 @@
]
}
},
"/server/version-check": {
"get": {
"operationId": "getVersionCheck",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VersionCheckStateResponseDto"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Server"
]
}
},
"/server/version-history": {
"get": {
"operationId": "getVersionHistory",
@@ -6846,6 +6878,38 @@
]
}
},
"/system-metadata/version-check-state": {
"get": {
"operationId": "getVersionCheckState",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VersionCheckStateResponseDto"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"System Metadata"
]
}
},
"/tags": {
"get": {
"operationId": "getAllTags",
@@ -14939,6 +15003,23 @@
},
"type": "object"
},
"VersionCheckStateResponseDto": {
"properties": {
"checkedAt": {
"nullable": true,
"type": "string"
},
"releaseVersion": {
"nullable": true,
"type": "string"
}
},
"required": [
"checkedAt",
"releaseVersion"
],
"type": "object"
},
"VideoCodec": {
"enum": [
"h264",

View File

@@ -1076,6 +1076,10 @@ export type ServerVersionResponseDto = {
minor: number;
patch: number;
};
export type VersionCheckStateResponseDto = {
checkedAt: string | null;
releaseVersion: string | null;
};
export type ServerVersionHistoryResponseDto = {
createdAt: string;
id: string;
@@ -2947,6 +2951,14 @@ export function getServerVersion(opts?: Oazapfts.RequestOpts) {
...opts
}));
}
export function getVersionCheck(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: VersionCheckStateResponseDto;
}>("/server/version-check", {
...opts
}));
}
export function getVersionHistory(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
@@ -3284,6 +3296,14 @@ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) {
...opts
}));
}
export function getVersionCheckState(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: VersionCheckStateResponseDto;
}>("/system-metadata/version-check-state", {
...opts
}));
}
export function getAllTags(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;