mirror of
https://github.com/immich-app/immich.git
synced 2026-03-07 10:37:22 +03:00
feat: endpoint versioning (#23858)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Selectable } from 'kysely';
|
||||
import { AssetFace, AssetFile, Exif, Stack, Tag, User } from 'src/database';
|
||||
import { PropertyLifecycle } from 'src/decorators';
|
||||
import { HistoryBuilder, Property } from 'src/decorators';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { ExifResponseDto, mapExif } from 'src/dtos/exif.dto';
|
||||
import {
|
||||
@@ -48,7 +48,7 @@ export class AssetResponseDto extends SanitizedAssetResponseDto {
|
||||
deviceId!: string;
|
||||
ownerId!: string;
|
||||
owner?: UserResponseDto;
|
||||
@PropertyLifecycle({ deprecatedAt: 'v1.106.0' })
|
||||
@Property({ history: new HistoryBuilder().added('v1').deprecated('v1') })
|
||||
libraryId?: string | null;
|
||||
originalPath!: string;
|
||||
originalFileName!: string;
|
||||
@@ -91,7 +91,7 @@ export class AssetResponseDto extends SanitizedAssetResponseDto {
|
||||
stack?: AssetStackResponseDto | null;
|
||||
duplicateId?: string | null;
|
||||
|
||||
@PropertyLifecycle({ deprecatedAt: 'v1.113.0' })
|
||||
@Property({ history: new HistoryBuilder().added('v1').deprecated('v1.113.0') })
|
||||
resized?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { IsArray, IsInt, IsNotEmpty, IsNumber, IsString, Max, Min, ValidateNeste
|
||||
import { Selectable } from 'kysely';
|
||||
import { DateTime } from 'luxon';
|
||||
import { AssetFace, Person } from 'src/database';
|
||||
import { PropertyLifecycle } from 'src/decorators';
|
||||
import { HistoryBuilder, Property } from 'src/decorators';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { SourceType } from 'src/enum';
|
||||
import { AssetFaceTable } from 'src/schema/tables/asset-face.table';
|
||||
@@ -111,11 +111,11 @@ export class PersonResponseDto {
|
||||
birthDate!: string | null;
|
||||
thumbnailPath!: string;
|
||||
isHidden!: boolean;
|
||||
@PropertyLifecycle({ addedAt: 'v1.107.0' })
|
||||
@Property({ history: new HistoryBuilder().added('v1.107.0').stable('v2') })
|
||||
updatedAt?: Date;
|
||||
@PropertyLifecycle({ addedAt: 'v1.126.0' })
|
||||
@Property({ history: new HistoryBuilder().added('v1.126.0').stable('v2') })
|
||||
isFavorite?: boolean;
|
||||
@PropertyLifecycle({ addedAt: 'v1.126.0' })
|
||||
@Property({ history: new HistoryBuilder().added('v1.126.0').stable('v2') })
|
||||
color?: string;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ export class PeopleResponseDto {
|
||||
people!: PersonResponseDto[];
|
||||
|
||||
// TODO: make required after a few versions
|
||||
@PropertyLifecycle({ addedAt: 'v1.110.0' })
|
||||
@Property({ history: new HistoryBuilder().added('v1.110.0').stable('v2') })
|
||||
hasNextPage?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsInt, IsNotEmpty, IsString, Max, Min } from 'class-validator';
|
||||
import { Place } from 'src/database';
|
||||
import { PropertyLifecycle } from 'src/decorators';
|
||||
import { HistoryBuilder, Property } from 'src/decorators';
|
||||
import { AlbumResponseDto } from 'src/dtos/album.dto';
|
||||
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
||||
import { AssetOrder, AssetType, AssetVisibility } from 'src/enum';
|
||||
@@ -282,7 +282,7 @@ export class SearchSuggestionRequestDto {
|
||||
lensModel?: string;
|
||||
|
||||
@ValidateBoolean({ optional: true })
|
||||
@PropertyLifecycle({ addedAt: 'v111.0.0' })
|
||||
@Property({ history: new HistoryBuilder().added('v1.111.0').stable('v2') })
|
||||
includeNull?: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user