mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
* feat: tags * fix: folder tree icons * navigate to tag from detail panel * delete tag * Tag position and add tag button * Tag asset in detail panel * refactor form * feat: navigate to tag page from clicking on a tag * feat: delete tags from the tag page * refactor: moving tag section in detail panel and add + tag button * feat: tag asset action in detail panel * refactor add tag form * fdisable add tag button when there is no selection * feat: tag bulk endpoint * feat: tag colors * chore: clean up * chore: unit tests * feat: write tags to sidecar * Remove tag and auto focus on tag creation form opened * chore: regenerate migration * chore: linting * add color picker to tag edit form * fix: force render tags timeline on navigating back from asset viewer * feat: read tags from keywords * chore: clean up --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
|
|
import { AssetOrder } from 'src/enum';
|
|
import { TimeBucketSize } from 'src/interfaces/asset.interface';
|
|
import { Optional, ValidateBoolean, ValidateUUID } from 'src/validation';
|
|
|
|
export class TimeBucketDto {
|
|
@IsNotEmpty()
|
|
@IsEnum(TimeBucketSize)
|
|
@ApiProperty({ enum: TimeBucketSize, enumName: 'TimeBucketSize' })
|
|
size!: TimeBucketSize;
|
|
|
|
@ValidateUUID({ optional: true })
|
|
userId?: string;
|
|
|
|
@ValidateUUID({ optional: true })
|
|
albumId?: string;
|
|
|
|
@ValidateUUID({ optional: true })
|
|
personId?: string;
|
|
|
|
@ValidateUUID({ optional: true })
|
|
tagId?: string;
|
|
|
|
@ValidateBoolean({ optional: true })
|
|
isArchived?: boolean;
|
|
|
|
@ValidateBoolean({ optional: true })
|
|
isFavorite?: boolean;
|
|
|
|
@ValidateBoolean({ optional: true })
|
|
isTrashed?: boolean;
|
|
|
|
@ValidateBoolean({ optional: true })
|
|
withStacked?: boolean;
|
|
|
|
@ValidateBoolean({ optional: true })
|
|
withPartners?: boolean;
|
|
|
|
@IsEnum(AssetOrder)
|
|
@Optional()
|
|
@ApiProperty({ enum: AssetOrder, enumName: 'AssetOrder' })
|
|
order?: AssetOrder;
|
|
}
|
|
|
|
export class TimeBucketAssetDto extends TimeBucketDto {
|
|
@IsString()
|
|
timeBucket!: string;
|
|
}
|
|
|
|
export class TimeBucketResponseDto {
|
|
@ApiProperty({ type: 'string' })
|
|
timeBucket!: string;
|
|
|
|
@ApiProperty({ type: 'integer' })
|
|
count!: number;
|
|
}
|