fix(session): 🐛 fix session DTO schema validation to ensure proper type safety and request/response compatibility
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
d02aa57aa9
commit
6d41bb80f3
1 changed files with 10 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { IsOptional, IsString, MaxLength } from 'class-validator';
|
||||
import { IsNotEmpty, IsOptional, IsString, MaxLength } from 'class-validator';
|
||||
|
||||
export class CreateSessionDto {
|
||||
@IsOptional()
|
||||
|
|
@ -31,4 +31,13 @@ export class SessionListItemDto {
|
|||
last_activity_at!: string;
|
||||
message_count!: number;
|
||||
preview!: string | null;
|
||||
title!: string | null;
|
||||
title_is_manual!: boolean;
|
||||
}
|
||||
|
||||
export class UpdateSessionTitleDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(255)
|
||||
title!: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue