mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 22:35:03 -08:00
feat: version check endpoint (#18572)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user