2023-09-01 12:40:00 -04:00
|
|
|
import { IsNotEmpty, IsString } from 'class-validator';
|
2024-03-20 19:32:04 +01:00
|
|
|
import { Optional } from 'src/domain/domain.util';
|
2023-01-02 15:22:33 -05:00
|
|
|
export class APIKeyCreateDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@IsNotEmpty()
|
2023-09-01 12:40:00 -04:00
|
|
|
@Optional()
|
2023-01-02 15:22:33 -05:00
|
|
|
name?: string;
|
|
|
|
|
}
|
2023-05-23 16:40:04 -04:00
|
|
|
|
|
|
|
|
export class APIKeyUpdateDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
name!: string;
|
|
|
|
|
}
|
2023-06-30 21:49:30 -04:00
|
|
|
|
|
|
|
|
export class APIKeyCreateResponseDto {
|
|
|
|
|
secret!: string;
|
|
|
|
|
apiKey!: APIKeyResponseDto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class APIKeyResponseDto {
|
|
|
|
|
id!: string;
|
|
|
|
|
name!: string;
|
|
|
|
|
createdAt!: Date;
|
|
|
|
|
updatedAt!: Date;
|
|
|
|
|
}
|