Skip to content

Commit 7ee0221

Browse files
authored
chore: remove deprecated endpoint (immich-app#13190)
1 parent 08db817 commit 7ee0221

File tree

12 files changed

+0
-350
lines changed

12 files changed

+0
-350
lines changed

mobile/openapi/README.md

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api/deprecated_api.dart

-56
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/api/people_api.dart

-56
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

open-api/immich-openapi-specs.json

-51
Original file line numberDiff line numberDiff line change
@@ -4030,57 +4030,6 @@
40304030
]
40314031
}
40324032
},
4033-
"/people/{id}/assets": {
4034-
"get": {
4035-
"deprecated": true,
4036-
"description": "This property was deprecated in v1.113.0",
4037-
"operationId": "getPersonAssets",
4038-
"parameters": [
4039-
{
4040-
"name": "id",
4041-
"required": true,
4042-
"in": "path",
4043-
"schema": {
4044-
"format": "uuid",
4045-
"type": "string"
4046-
}
4047-
}
4048-
],
4049-
"responses": {
4050-
"200": {
4051-
"content": {
4052-
"application/json": {
4053-
"schema": {
4054-
"items": {
4055-
"$ref": "#/components/schemas/AssetResponseDto"
4056-
},
4057-
"type": "array"
4058-
}
4059-
}
4060-
},
4061-
"description": ""
4062-
}
4063-
},
4064-
"security": [
4065-
{
4066-
"bearer": []
4067-
},
4068-
{
4069-
"cookie": []
4070-
},
4071-
{
4072-
"api_key": []
4073-
}
4074-
],
4075-
"tags": [
4076-
"People",
4077-
"Deprecated"
4078-
],
4079-
"x-immich-lifecycle": {
4080-
"deprecatedAt": "v1.113.0"
4081-
}
4082-
}
4083-
},
40844033
"/people/{id}/merge": {
40854034
"post": {
40864035
"operationId": "mergePerson",

open-api/typescript-sdk/src/fetch-client.ts

-13
Original file line numberDiff line numberDiff line change
@@ -2384,19 +2384,6 @@ export function updatePerson({ id, personUpdateDto }: {
23842384
body: personUpdateDto
23852385
})));
23862386
}
2387-
/**
2388-
* This property was deprecated in v1.113.0
2389-
*/
2390-
export function getPersonAssets({ id }: {
2391-
id: string;
2392-
}, opts?: Oazapfts.RequestOpts) {
2393-
return oazapfts.ok(oazapfts.fetchJson<{
2394-
status: 200;
2395-
data: AssetResponseDto[];
2396-
}>(`/people/${encodeURIComponent(id)}/assets`, {
2397-
...opts
2398-
}));
2399-
}
24002387
export function mergePerson({ id, mergePersonDto }: {
24012388
id: string;
24022389
mergePersonDto: MergePersonDto;

server/src/controllers/person.controller.ts

-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { Body, Controller, Get, Inject, Next, Param, Post, Put, Query, Res } from '@nestjs/common';
22
import { ApiTags } from '@nestjs/swagger';
33
import { NextFunction, Response } from 'express';
4-
import { EndpointLifecycle } from 'src/decorators';
54
import { BulkIdResponseDto } from 'src/dtos/asset-ids.response.dto';
6-
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
75
import { AuthDto } from 'src/dtos/auth.dto';
86
import {
97
AssetFaceUpdateDto,
@@ -83,13 +81,6 @@ export class PersonController {
8381
await sendFile(res, next, () => this.service.getThumbnail(auth, id), this.logger);
8482
}
8583

86-
@EndpointLifecycle({ deprecatedAt: 'v1.113.0' })
87-
@Get(':id/assets')
88-
@Authenticated()
89-
getPersonAssets(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise<AssetResponseDto[]> {
90-
return this.service.getAssets(auth, id);
91-
}
92-
9384
@Put(':id/reassign')
9485
@Authenticated({ permission: Permission.PERSON_REASSIGN })
9586
reassignFaces(

server/src/interfaces/person.interface.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { AssetFaceEntity } from 'src/entities/asset-face.entity';
2-
import { AssetEntity } from 'src/entities/asset.entity';
32
import { FaceSearchEntity } from 'src/entities/face-search.entity';
43
import { PersonEntity } from 'src/entities/person.entity';
54
import { SourceType } from 'src/enum';
@@ -56,8 +55,6 @@ export interface IPersonRepository {
5655
getByName(userId: string, personName: string, options: PersonNameSearchOptions): Promise<PersonEntity[]>;
5756
getDistinctNames(userId: string, options: PersonNameSearchOptions): Promise<PersonNameResponse[]>;
5857

59-
getAssets(personId: string): Promise<AssetEntity[]>;
60-
6158
create(person: Partial<PersonEntity>): Promise<PersonEntity>;
6259
createAll(people: Partial<PersonEntity>[]): Promise<string[]>;
6360
createFaces(entities: Partial<AssetFaceEntity>[]): Promise<string[]>;

server/src/queries/person.repository.sql

-108
Original file line numberDiff line numberDiff line change
@@ -248,114 +248,6 @@ WHERE
248248
AND "asset"."deletedAt" IS NULL
249249
AND "asset"."livePhotoVideoId" IS NULL
250250

251-
-- PersonRepository.getAssets
252-
SELECT DISTINCT
253-
"distinctAlias"."AssetEntity_id" AS "ids_AssetEntity_id",
254-
"distinctAlias"."AssetEntity_fileCreatedAt"
255-
FROM
256-
(
257-
SELECT
258-
"AssetEntity"."id" AS "AssetEntity_id",
259-
"AssetEntity"."deviceAssetId" AS "AssetEntity_deviceAssetId",
260-
"AssetEntity"."ownerId" AS "AssetEntity_ownerId",
261-
"AssetEntity"."libraryId" AS "AssetEntity_libraryId",
262-
"AssetEntity"."deviceId" AS "AssetEntity_deviceId",
263-
"AssetEntity"."type" AS "AssetEntity_type",
264-
"AssetEntity"."status" AS "AssetEntity_status",
265-
"AssetEntity"."originalPath" AS "AssetEntity_originalPath",
266-
"AssetEntity"."thumbhash" AS "AssetEntity_thumbhash",
267-
"AssetEntity"."encodedVideoPath" AS "AssetEntity_encodedVideoPath",
268-
"AssetEntity"."createdAt" AS "AssetEntity_createdAt",
269-
"AssetEntity"."updatedAt" AS "AssetEntity_updatedAt",
270-
"AssetEntity"."deletedAt" AS "AssetEntity_deletedAt",
271-
"AssetEntity"."fileCreatedAt" AS "AssetEntity_fileCreatedAt",
272-
"AssetEntity"."localDateTime" AS "AssetEntity_localDateTime",
273-
"AssetEntity"."fileModifiedAt" AS "AssetEntity_fileModifiedAt",
274-
"AssetEntity"."isFavorite" AS "AssetEntity_isFavorite",
275-
"AssetEntity"."isArchived" AS "AssetEntity_isArchived",
276-
"AssetEntity"."isExternal" AS "AssetEntity_isExternal",
277-
"AssetEntity"."isOffline" AS "AssetEntity_isOffline",
278-
"AssetEntity"."checksum" AS "AssetEntity_checksum",
279-
"AssetEntity"."duration" AS "AssetEntity_duration",
280-
"AssetEntity"."isVisible" AS "AssetEntity_isVisible",
281-
"AssetEntity"."livePhotoVideoId" AS "AssetEntity_livePhotoVideoId",
282-
"AssetEntity"."originalFileName" AS "AssetEntity_originalFileName",
283-
"AssetEntity"."sidecarPath" AS "AssetEntity_sidecarPath",
284-
"AssetEntity"."stackId" AS "AssetEntity_stackId",
285-
"AssetEntity"."duplicateId" AS "AssetEntity_duplicateId",
286-
"AssetEntity__AssetEntity_faces"."id" AS "AssetEntity__AssetEntity_faces_id",
287-
"AssetEntity__AssetEntity_faces"."assetId" AS "AssetEntity__AssetEntity_faces_assetId",
288-
"AssetEntity__AssetEntity_faces"."personId" AS "AssetEntity__AssetEntity_faces_personId",
289-
"AssetEntity__AssetEntity_faces"."imageWidth" AS "AssetEntity__AssetEntity_faces_imageWidth",
290-
"AssetEntity__AssetEntity_faces"."imageHeight" AS "AssetEntity__AssetEntity_faces_imageHeight",
291-
"AssetEntity__AssetEntity_faces"."boundingBoxX1" AS "AssetEntity__AssetEntity_faces_boundingBoxX1",
292-
"AssetEntity__AssetEntity_faces"."boundingBoxY1" AS "AssetEntity__AssetEntity_faces_boundingBoxY1",
293-
"AssetEntity__AssetEntity_faces"."boundingBoxX2" AS "AssetEntity__AssetEntity_faces_boundingBoxX2",
294-
"AssetEntity__AssetEntity_faces"."boundingBoxY2" AS "AssetEntity__AssetEntity_faces_boundingBoxY2",
295-
"AssetEntity__AssetEntity_faces"."sourceType" AS "AssetEntity__AssetEntity_faces_sourceType",
296-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."id" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_id",
297-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."createdAt" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_createdAt",
298-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."updatedAt" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_updatedAt",
299-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."ownerId" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_ownerId",
300-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."name" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_name",
301-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."birthDate" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_birthDate",
302-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."thumbnailPath" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_thumbnailPath",
303-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."faceAssetId" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_faceAssetId",
304-
"8258e303a73a72cf6abb13d73fb592dde0d68280"."isHidden" AS "8258e303a73a72cf6abb13d73fb592dde0d68280_isHidden",
305-
"AssetEntity__AssetEntity_exifInfo"."assetId" AS "AssetEntity__AssetEntity_exifInfo_assetId",
306-
"AssetEntity__AssetEntity_exifInfo"."description" AS "AssetEntity__AssetEntity_exifInfo_description",
307-
"AssetEntity__AssetEntity_exifInfo"."exifImageWidth" AS "AssetEntity__AssetEntity_exifInfo_exifImageWidth",
308-
"AssetEntity__AssetEntity_exifInfo"."exifImageHeight" AS "AssetEntity__AssetEntity_exifInfo_exifImageHeight",
309-
"AssetEntity__AssetEntity_exifInfo"."fileSizeInByte" AS "AssetEntity__AssetEntity_exifInfo_fileSizeInByte",
310-
"AssetEntity__AssetEntity_exifInfo"."orientation" AS "AssetEntity__AssetEntity_exifInfo_orientation",
311-
"AssetEntity__AssetEntity_exifInfo"."dateTimeOriginal" AS "AssetEntity__AssetEntity_exifInfo_dateTimeOriginal",
312-
"AssetEntity__AssetEntity_exifInfo"."modifyDate" AS "AssetEntity__AssetEntity_exifInfo_modifyDate",
313-
"AssetEntity__AssetEntity_exifInfo"."timeZone" AS "AssetEntity__AssetEntity_exifInfo_timeZone",
314-
"AssetEntity__AssetEntity_exifInfo"."latitude" AS "AssetEntity__AssetEntity_exifInfo_latitude",
315-
"AssetEntity__AssetEntity_exifInfo"."longitude" AS "AssetEntity__AssetEntity_exifInfo_longitude",
316-
"AssetEntity__AssetEntity_exifInfo"."projectionType" AS "AssetEntity__AssetEntity_exifInfo_projectionType",
317-
"AssetEntity__AssetEntity_exifInfo"."city" AS "AssetEntity__AssetEntity_exifInfo_city",
318-
"AssetEntity__AssetEntity_exifInfo"."livePhotoCID" AS "AssetEntity__AssetEntity_exifInfo_livePhotoCID",
319-
"AssetEntity__AssetEntity_exifInfo"."autoStackId" AS "AssetEntity__AssetEntity_exifInfo_autoStackId",
320-
"AssetEntity__AssetEntity_exifInfo"."state" AS "AssetEntity__AssetEntity_exifInfo_state",
321-
"AssetEntity__AssetEntity_exifInfo"."country" AS "AssetEntity__AssetEntity_exifInfo_country",
322-
"AssetEntity__AssetEntity_exifInfo"."make" AS "AssetEntity__AssetEntity_exifInfo_make",
323-
"AssetEntity__AssetEntity_exifInfo"."model" AS "AssetEntity__AssetEntity_exifInfo_model",
324-
"AssetEntity__AssetEntity_exifInfo"."lensModel" AS "AssetEntity__AssetEntity_exifInfo_lensModel",
325-
"AssetEntity__AssetEntity_exifInfo"."fNumber" AS "AssetEntity__AssetEntity_exifInfo_fNumber",
326-
"AssetEntity__AssetEntity_exifInfo"."focalLength" AS "AssetEntity__AssetEntity_exifInfo_focalLength",
327-
"AssetEntity__AssetEntity_exifInfo"."iso" AS "AssetEntity__AssetEntity_exifInfo_iso",
328-
"AssetEntity__AssetEntity_exifInfo"."exposureTime" AS "AssetEntity__AssetEntity_exifInfo_exposureTime",
329-
"AssetEntity__AssetEntity_exifInfo"."profileDescription" AS "AssetEntity__AssetEntity_exifInfo_profileDescription",
330-
"AssetEntity__AssetEntity_exifInfo"."colorspace" AS "AssetEntity__AssetEntity_exifInfo_colorspace",
331-
"AssetEntity__AssetEntity_exifInfo"."bitsPerSample" AS "AssetEntity__AssetEntity_exifInfo_bitsPerSample",
332-
"AssetEntity__AssetEntity_exifInfo"."rating" AS "AssetEntity__AssetEntity_exifInfo_rating",
333-
"AssetEntity__AssetEntity_exifInfo"."fps" AS "AssetEntity__AssetEntity_exifInfo_fps"
334-
FROM
335-
"assets" "AssetEntity"
336-
LEFT JOIN "asset_faces" "AssetEntity__AssetEntity_faces" ON "AssetEntity__AssetEntity_faces"."assetId" = "AssetEntity"."id"
337-
LEFT JOIN "person" "8258e303a73a72cf6abb13d73fb592dde0d68280" ON "8258e303a73a72cf6abb13d73fb592dde0d68280"."id" = "AssetEntity__AssetEntity_faces"."personId"
338-
LEFT JOIN "exif" "AssetEntity__AssetEntity_exifInfo" ON "AssetEntity__AssetEntity_exifInfo"."assetId" = "AssetEntity"."id"
339-
WHERE
340-
(
341-
(
342-
(
343-
(
344-
("AssetEntity__AssetEntity_faces"."personId" = $1)
345-
)
346-
)
347-
AND ("AssetEntity"."isVisible" = $2)
348-
AND ("AssetEntity"."isArchived" = $3)
349-
)
350-
)
351-
AND ("AssetEntity"."deletedAt" IS NULL)
352-
) "distinctAlias"
353-
ORDER BY
354-
"distinctAlias"."AssetEntity_fileCreatedAt" DESC,
355-
"AssetEntity_id" ASC
356-
LIMIT
357-
1000
358-
359251
-- PersonRepository.getNumberOfPeople
360252
SELECT
361253
COUNT(DISTINCT ("person"."id")) AS "total",

0 commit comments

Comments
 (0)