Skip to content

Commit 5268dc4

Browse files
feat: version check endpoint (#18572)
1 parent ef060e9 commit 5268dc4

13 files changed

+338
-1
lines changed

mobile/openapi/README.md

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api.dart

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api/server_api.dart

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api/system_metadata_api.dart

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api_client.dart

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/version_check_state_response_dto.dart

Lines changed: 115 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

open-api/immich-openapi-specs.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5563,6 +5563,38 @@
55635563
]
55645564
}
55655565
},
5566+
"/server/version-check": {
5567+
"get": {
5568+
"operationId": "getVersionCheck",
5569+
"parameters": [],
5570+
"responses": {
5571+
"200": {
5572+
"content": {
5573+
"application/json": {
5574+
"schema": {
5575+
"$ref": "#/components/schemas/VersionCheckStateResponseDto"
5576+
}
5577+
}
5578+
},
5579+
"description": ""
5580+
}
5581+
},
5582+
"security": [
5583+
{
5584+
"bearer": []
5585+
},
5586+
{
5587+
"cookie": []
5588+
},
5589+
{
5590+
"api_key": []
5591+
}
5592+
],
5593+
"tags": [
5594+
"Server"
5595+
]
5596+
}
5597+
},
55665598
"/server/version-history": {
55675599
"get": {
55685600
"operationId": "getVersionHistory",
@@ -6846,6 +6878,38 @@
68466878
]
68476879
}
68486880
},
6881+
"/system-metadata/version-check-state": {
6882+
"get": {
6883+
"operationId": "getVersionCheckState",
6884+
"parameters": [],
6885+
"responses": {
6886+
"200": {
6887+
"content": {
6888+
"application/json": {
6889+
"schema": {
6890+
"$ref": "#/components/schemas/VersionCheckStateResponseDto"
6891+
}
6892+
}
6893+
},
6894+
"description": ""
6895+
}
6896+
},
6897+
"security": [
6898+
{
6899+
"bearer": []
6900+
},
6901+
{
6902+
"cookie": []
6903+
},
6904+
{
6905+
"api_key": []
6906+
}
6907+
],
6908+
"tags": [
6909+
"System Metadata"
6910+
]
6911+
}
6912+
},
68496913
"/tags": {
68506914
"get": {
68516915
"operationId": "getAllTags",
@@ -14939,6 +15003,23 @@
1493915003
},
1494015004
"type": "object"
1494115005
},
15006+
"VersionCheckStateResponseDto": {
15007+
"properties": {
15008+
"checkedAt": {
15009+
"nullable": true,
15010+
"type": "string"
15011+
},
15012+
"releaseVersion": {
15013+
"nullable": true,
15014+
"type": "string"
15015+
}
15016+
},
15017+
"required": [
15018+
"checkedAt",
15019+
"releaseVersion"
15020+
],
15021+
"type": "object"
15022+
},
1494215023
"VideoCodec": {
1494315024
"enum": [
1494415025
"h264",

open-api/typescript-sdk/src/fetch-client.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,10 @@ export type ServerVersionResponseDto = {
10761076
minor: number;
10771077
patch: number;
10781078
};
1079+
export type VersionCheckStateResponseDto = {
1080+
checkedAt: string | null;
1081+
releaseVersion: string | null;
1082+
};
10791083
export type ServerVersionHistoryResponseDto = {
10801084
createdAt: string;
10811085
id: string;
@@ -2947,6 +2951,14 @@ export function getServerVersion(opts?: Oazapfts.RequestOpts) {
29472951
...opts
29482952
}));
29492953
}
2954+
export function getVersionCheck(opts?: Oazapfts.RequestOpts) {
2955+
return oazapfts.ok(oazapfts.fetchJson<{
2956+
status: 200;
2957+
data: VersionCheckStateResponseDto;
2958+
}>("/server/version-check", {
2959+
...opts
2960+
}));
2961+
}
29502962
export function getVersionHistory(opts?: Oazapfts.RequestOpts) {
29512963
return oazapfts.ok(oazapfts.fetchJson<{
29522964
status: 200;
@@ -3284,6 +3296,14 @@ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) {
32843296
...opts
32853297
}));
32863298
}
3299+
export function getVersionCheckState(opts?: Oazapfts.RequestOpts) {
3300+
return oazapfts.ok(oazapfts.fetchJson<{
3301+
status: 200;
3302+
data: VersionCheckStateResponseDto;
3303+
}>("/system-metadata/version-check-state", {
3304+
...opts
3305+
}));
3306+
}
32873307
export function getAllTags(opts?: Oazapfts.RequestOpts) {
32883308
return oazapfts.ok(oazapfts.fetchJson<{
32893309
status: 200;

0 commit comments

Comments
 (0)