9539a361e4
* custom `IsOptional` * added link to source * formatting * Update server/src/domain/domain.util.ts Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> * nullable birth date endpoint * made `nullable` a property * formatting * removed unused dto * updated decorator arg * fixed album e2e tests * add null tests for auth e2e * add null test for person e2e * fixed tests * added null test for user e2e * removed unusued import * log key in test name * chore: add note about mobile not being able to use the endpoint --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
33 lines
726 B
TypeScript
33 lines
726 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsInt, IsPositive } from 'class-validator';
|
|
import { Optional, ValidateUUID } from '../../domain.util';
|
|
|
|
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[];
|
|
}
|