mirror of
https://github.com/immich-app/immich.git
synced 2025-06-06 21:38:26 +02:00
parent
eb8dfa283e
commit
3066c8198c
20 changed files with 640 additions and 160 deletions
open-api
|
@ -345,6 +345,15 @@
|
|||
"get": {
|
||||
"operationId": "searchUsersAdmin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "withDeleted",
|
||||
"required": false,
|
||||
|
@ -701,6 +710,72 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/admin/users/{id}/statistics": {
|
||||
"get": {
|
||||
"operationId": "getUserStatisticsAdmin",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "isFavorite",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "isTrashed",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "visibility",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AssetVisibility"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AssetStatsResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Users (admin)"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/albums": {
|
||||
"get": {
|
||||
"operationId": "getAllAlbums",
|
||||
|
|
|
@ -224,6 +224,11 @@ export type UserPreferencesUpdateDto = {
|
|||
sharedLinks?: SharedLinksUpdate;
|
||||
tags?: TagsUpdate;
|
||||
};
|
||||
export type AssetStatsResponseDto = {
|
||||
images: number;
|
||||
total: number;
|
||||
videos: number;
|
||||
};
|
||||
export type AlbumUserResponseDto = {
|
||||
role: AlbumUserRole;
|
||||
user: UserResponseDto;
|
||||
|
@ -462,11 +467,6 @@ export type AssetJobsDto = {
|
|||
assetIds: string[];
|
||||
name: AssetJobName;
|
||||
};
|
||||
export type AssetStatsResponseDto = {
|
||||
images: number;
|
||||
total: number;
|
||||
videos: number;
|
||||
};
|
||||
export type UpdateAssetDto = {
|
||||
dateTimeOriginal?: string;
|
||||
description?: string;
|
||||
|
@ -1502,13 +1502,15 @@ export function sendTestEmailAdmin({ systemConfigSmtpDto }: {
|
|||
body: systemConfigSmtpDto
|
||||
})));
|
||||
}
|
||||
export function searchUsersAdmin({ withDeleted }: {
|
||||
export function searchUsersAdmin({ id, withDeleted }: {
|
||||
id?: string;
|
||||
withDeleted?: boolean;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserAdminResponseDto[];
|
||||
}>(`/admin/users${QS.query(QS.explode({
|
||||
id,
|
||||
withDeleted
|
||||
}))}`, {
|
||||
...opts
|
||||
|
@ -1596,6 +1598,23 @@ export function restoreUserAdmin({ id }: {
|
|||
method: "POST"
|
||||
}));
|
||||
}
|
||||
export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility }: {
|
||||
id: string;
|
||||
isFavorite?: boolean;
|
||||
isTrashed?: boolean;
|
||||
visibility?: AssetVisibility;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: AssetStatsResponseDto;
|
||||
}>(`/admin/users/${encodeURIComponent(id)}/statistics${QS.query(QS.explode({
|
||||
isFavorite,
|
||||
isTrashed,
|
||||
visibility
|
||||
}))}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function getAllAlbums({ assetId, shared }: {
|
||||
assetId?: string;
|
||||
shared?: boolean;
|
||||
|
@ -3552,6 +3571,11 @@ export enum UserStatus {
|
|||
Removing = "removing",
|
||||
Deleted = "deleted"
|
||||
}
|
||||
export enum AssetVisibility {
|
||||
Archive = "archive",
|
||||
Timeline = "timeline",
|
||||
Hidden = "hidden"
|
||||
}
|
||||
export enum AlbumUserRole {
|
||||
Editor = "editor",
|
||||
Viewer = "viewer"
|
||||
|
@ -3661,11 +3685,6 @@ export enum Permission {
|
|||
AdminUserUpdate = "admin.user.update",
|
||||
AdminUserDelete = "admin.user.delete"
|
||||
}
|
||||
export enum AssetVisibility {
|
||||
Archive = "archive",
|
||||
Timeline = "timeline",
|
||||
Hidden = "hidden"
|
||||
}
|
||||
export enum AssetMediaStatus {
|
||||
Created = "created",
|
||||
Replaced = "replaced",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue