mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00: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:
parent
c3a533ab40
commit
032de9ff2f
27 changed files with 301 additions and 50 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue