mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: deprecate /server-info and replace with /server-info/storage (#9645)
This commit is contained in:
parent
a341ab0050
commit
a3e7e8cc31
19 changed files with 265 additions and 99 deletions
|
|
@ -4337,6 +4337,8 @@
|
|||
},
|
||||
"/server-info": {
|
||||
"get": {
|
||||
"deprecated": true,
|
||||
"description": "This property was deprecated in v1.106.0",
|
||||
"operationId": "getServerInfo",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
|
|
@ -4344,7 +4346,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ServerInfoResponseDto"
|
||||
"$ref": "#/components/schemas/ServerStorageResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -4363,8 +4365,12 @@
|
|||
}
|
||||
],
|
||||
"tags": [
|
||||
"Server Info"
|
||||
]
|
||||
"Server Info",
|
||||
"Deprecated"
|
||||
],
|
||||
"x-immich-lifecycle": {
|
||||
"deprecatedAt": "v1.106.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/server-info/config": {
|
||||
|
|
@ -4483,6 +4489,38 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/server-info/storage": {
|
||||
"get": {
|
||||
"operationId": "getStorage",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ServerStorageResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Server Info"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/server-info/theme": {
|
||||
"get": {
|
||||
"operationId": "getTheme",
|
||||
|
|
@ -9487,45 +9525,6 @@
|
|||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ServerInfoResponseDto": {
|
||||
"properties": {
|
||||
"diskAvailable": {
|
||||
"type": "string"
|
||||
},
|
||||
"diskAvailableRaw": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"diskSize": {
|
||||
"type": "string"
|
||||
},
|
||||
"diskSizeRaw": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"diskUsagePercentage": {
|
||||
"format": "float",
|
||||
"type": "number"
|
||||
},
|
||||
"diskUse": {
|
||||
"type": "string"
|
||||
},
|
||||
"diskUseRaw": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"diskAvailable",
|
||||
"diskAvailableRaw",
|
||||
"diskSize",
|
||||
"diskSizeRaw",
|
||||
"diskUsagePercentage",
|
||||
"diskUse",
|
||||
"diskUseRaw"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ServerMediaTypesResponseDto": {
|
||||
"properties": {
|
||||
"image": {
|
||||
|
|
@ -9606,6 +9605,45 @@
|
|||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ServerStorageResponseDto": {
|
||||
"properties": {
|
||||
"diskAvailable": {
|
||||
"type": "string"
|
||||
},
|
||||
"diskAvailableRaw": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"diskSize": {
|
||||
"type": "string"
|
||||
},
|
||||
"diskSizeRaw": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"diskUsagePercentage": {
|
||||
"format": "float",
|
||||
"type": "number"
|
||||
},
|
||||
"diskUse": {
|
||||
"type": "string"
|
||||
},
|
||||
"diskUseRaw": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"diskAvailable",
|
||||
"diskAvailableRaw",
|
||||
"diskSize",
|
||||
"diskSizeRaw",
|
||||
"diskUsagePercentage",
|
||||
"diskUse",
|
||||
"diskUseRaw"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ServerThemeDto": {
|
||||
"properties": {
|
||||
"customCss": {
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ export type SmartSearchDto = {
|
|||
withDeleted?: boolean;
|
||||
withExif?: boolean;
|
||||
};
|
||||
export type ServerInfoResponseDto = {
|
||||
export type ServerStorageResponseDto = {
|
||||
diskAvailable: string;
|
||||
diskAvailableRaw: number;
|
||||
diskSize: string;
|
||||
|
|
@ -2245,10 +2245,13 @@ export function getSearchSuggestions({ country, make, model, state, $type }: {
|
|||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* This property was deprecated in v1.106.0
|
||||
*/
|
||||
export function getServerInfo(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: ServerInfoResponseDto;
|
||||
data: ServerStorageResponseDto;
|
||||
}>("/server-info", {
|
||||
...opts
|
||||
}));
|
||||
|
|
@ -2293,6 +2296,14 @@ export function getServerStatistics(opts?: Oazapfts.RequestOpts) {
|
|||
...opts
|
||||
}));
|
||||
}
|
||||
export function getStorage(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: ServerStorageResponseDto;
|
||||
}>("/server-info/storage", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function getTheme(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue