1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-22 11:42:46 +01:00
immich/server/src/dtos/download.dto.ts
Daniel Dietzler 6d9e7694b1
chore(server): move dtos (#8131)
move dtos
2024-03-20 23:53:07 +01:00

32 lines
723 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { IsInt, IsPositive } from 'class-validator';
import { Optional, ValidateUUID } from 'src/validation';
export class DownloadInfoDto {
@ValidateUUID({ each: true, optional: true })
assetIds?: string[];
@ValidateUUID({ optional: true })
albumId?: string;
@ValidateUUID({ optional: true })
userId?: string;
@IsInt()
@IsPositive()
@Optional()
@ApiProperty({ type: 'integer' })
archiveSize?: number;
}
export class DownloadResponseDto {
@ApiProperty({ type: 'integer' })
totalSize!: number;
archives!: DownloadArchiveInfo[];
}
export class DownloadArchiveInfo {
@ApiProperty({ type: 'integer' })
size!: number;
assetIds!: string[];
}