mirror of
https://github.com/immich-app/immich.git
synced 2025-12-12 15:50:43 -08:00
feat: view the user's app version on the user page (#21345)
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
@@ -773,6 +773,54 @@
|
||||
"description": "This endpoint is an admin-only route, and requires the `adminUser.delete` permission."
|
||||
}
|
||||
},
|
||||
"/admin/users/{id}/sessions": {
|
||||
"get": {
|
||||
"operationId": "getUserSessionsAdmin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/SessionResponseDto"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Users (admin)"
|
||||
],
|
||||
"x-immich-admin-only": true,
|
||||
"x-immich-permission": "adminSession.read",
|
||||
"description": "This endpoint is an admin-only route, and requires the `adminSession.read` permission."
|
||||
}
|
||||
},
|
||||
"/admin/users/{id}/statistics": {
|
||||
"get": {
|
||||
"operationId": "getUserStatisticsAdmin",
|
||||
@@ -13267,6 +13315,7 @@
|
||||
"adminUser.read",
|
||||
"adminUser.update",
|
||||
"adminUser.delete",
|
||||
"adminSession.read",
|
||||
"adminAuth.unlinkAll"
|
||||
],
|
||||
"type": "string"
|
||||
@@ -14303,6 +14352,10 @@
|
||||
},
|
||||
"SessionCreateResponseDto": {
|
||||
"properties": {
|
||||
"appVersion": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -14332,6 +14385,7 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"appVersion",
|
||||
"createdAt",
|
||||
"current",
|
||||
"deviceOS",
|
||||
@@ -14345,6 +14399,10 @@
|
||||
},
|
||||
"SessionResponseDto": {
|
||||
"properties": {
|
||||
"appVersion": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -14371,6 +14429,7 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"appVersion",
|
||||
"createdAt",
|
||||
"current",
|
||||
"deviceOS",
|
||||
|
||||
@@ -244,6 +244,17 @@ export type UserPreferencesUpdateDto = {
|
||||
sharedLinks?: SharedLinksUpdate;
|
||||
tags?: TagsUpdate;
|
||||
};
|
||||
export type SessionResponseDto = {
|
||||
appVersion: string | null;
|
||||
createdAt: string;
|
||||
current: boolean;
|
||||
deviceOS: string;
|
||||
deviceType: string;
|
||||
expiresAt?: string;
|
||||
id: string;
|
||||
isPendingSyncReset: boolean;
|
||||
updatedAt: string;
|
||||
};
|
||||
export type AssetStatsResponseDto = {
|
||||
images: number;
|
||||
total: number;
|
||||
@@ -1192,16 +1203,6 @@ export type ServerVersionHistoryResponseDto = {
|
||||
id: string;
|
||||
version: string;
|
||||
};
|
||||
export type SessionResponseDto = {
|
||||
createdAt: string;
|
||||
current: boolean;
|
||||
deviceOS: string;
|
||||
deviceType: string;
|
||||
expiresAt?: string;
|
||||
id: string;
|
||||
isPendingSyncReset: boolean;
|
||||
updatedAt: string;
|
||||
};
|
||||
export type SessionCreateDto = {
|
||||
deviceOS?: string;
|
||||
deviceType?: string;
|
||||
@@ -1209,6 +1210,7 @@ export type SessionCreateDto = {
|
||||
duration?: number;
|
||||
};
|
||||
export type SessionCreateResponseDto = {
|
||||
appVersion: string | null;
|
||||
createdAt: string;
|
||||
current: boolean;
|
||||
deviceOS: string;
|
||||
@@ -1853,6 +1855,19 @@ export function restoreUserAdmin({ id }: {
|
||||
method: "POST"
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* This endpoint is an admin-only route, and requires the `adminSession.read` permission.
|
||||
*/
|
||||
export function getUserSessionsAdmin({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: SessionResponseDto[];
|
||||
}>(`/admin/users/${encodeURIComponent(id)}/sessions`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* This endpoint is an admin-only route, and requires the `adminUser.read` permission.
|
||||
*/
|
||||
@@ -4830,6 +4845,7 @@ export enum Permission {
|
||||
AdminUserRead = "adminUser.read",
|
||||
AdminUserUpdate = "adminUser.update",
|
||||
AdminUserDelete = "adminUser.delete",
|
||||
AdminSessionRead = "adminSession.read",
|
||||
AdminAuthUnlinkAll = "adminAuth.unlinkAll"
|
||||
}
|
||||
export enum AssetMetadataKey {
|
||||
|
||||
Reference in New Issue
Block a user