mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-01 02:17:43 +09:00 
			
		
		
		
	feat(web): manual face tagging and deletion (#16062)
This commit is contained in:
		| @@ -523,6 +523,19 @@ export type AssetFaceResponseDto = { | ||||
|     person: (PersonResponseDto) | null; | ||||
|     sourceType?: SourceType; | ||||
| }; | ||||
| export type AssetFaceCreateDto = { | ||||
|     assetId: string; | ||||
|     height: number; | ||||
|     imageHeight: number; | ||||
|     imageWidth: number; | ||||
|     personId: string; | ||||
|     width: number; | ||||
|     x: number; | ||||
|     y: number; | ||||
| }; | ||||
| export type AssetFaceDeleteDto = { | ||||
|     force: boolean; | ||||
| }; | ||||
| export type FaceDto = { | ||||
|     id: string; | ||||
| }; | ||||
| @@ -2029,6 +2042,25 @@ export function getFaces({ id }: { | ||||
|         ...opts | ||||
|     })); | ||||
| } | ||||
| export function createFace({ assetFaceCreateDto }: { | ||||
|     assetFaceCreateDto: AssetFaceCreateDto; | ||||
| }, opts?: Oazapfts.RequestOpts) { | ||||
|     return oazapfts.ok(oazapfts.fetchText("/faces", oazapfts.json({ | ||||
|         ...opts, | ||||
|         method: "POST", | ||||
|         body: assetFaceCreateDto | ||||
|     }))); | ||||
| } | ||||
| export function deleteFace({ id, assetFaceDeleteDto }: { | ||||
|     id: string; | ||||
|     assetFaceDeleteDto: AssetFaceDeleteDto; | ||||
| }, opts?: Oazapfts.RequestOpts) { | ||||
|     return oazapfts.ok(oazapfts.fetchText(`/faces/${encodeURIComponent(id)}`, oazapfts.json({ | ||||
|         ...opts, | ||||
|         method: "DELETE", | ||||
|         body: assetFaceDeleteDto | ||||
|     }))); | ||||
| } | ||||
| export function reassignFacesById({ id, faceDto }: { | ||||
|     id: string; | ||||
|     faceDto: FaceDto; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user