mirror of
https://github.com/Art051/immich.git
synced 2025-08-11 19:29:00 +00:00
27 lines
445 B
TypeScript
27 lines
445 B
TypeScript
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
|
|
|
export class APIKeyCreateDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@IsOptional()
|
|
name?: string;
|
|
}
|
|
|
|
export class APIKeyUpdateDto {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
name!: string;
|
|
}
|
|
|
|
export class APIKeyCreateResponseDto {
|
|
secret!: string;
|
|
apiKey!: APIKeyResponseDto;
|
|
}
|
|
|
|
export class APIKeyResponseDto {
|
|
id!: string;
|
|
name!: string;
|
|
createdAt!: Date;
|
|
updatedAt!: Date;
|
|
}
|