chore(server): move dtos (#8131)

move dtos
This commit is contained in:
Daniel Dietzler 2024-03-20 23:53:07 +01:00 committed by GitHub
parent 0c13c63bb6
commit 6d9e7694b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
145 changed files with 917 additions and 964 deletions

View file

@ -0,0 +1,26 @@
import { IsNotEmpty, IsString } from 'class-validator';
import { Optional } from 'src/validation';
export class APIKeyCreateDto {
@IsString()
@IsNotEmpty()
@Optional()
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;
}