- add timeoutSeconds field to scenario and step entities - add timeoutSeconds to create/update DTOs for scenario and step - enforce timeout via scheduler: abort run if step exceeds limit - expose timeoutSeconds in MCP create/update scenario and step tools - add client-side type, API, i18n, and form support for timeoutSeconds - add integration tests for timeout persistence via REST and MCP
26 lines
702 B
TypeScript
26 lines
702 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
import { IsInt, IsNotEmpty, IsOptional, IsString, IsUUID, Min } from "class-validator";
|
|
|
|
export class CreateScenarioDto {
|
|
@ApiProperty({ example: "Login and verify cabinet" })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
name: string;
|
|
|
|
@ApiPropertyOptional({ description: "Optional markdown description" })
|
|
@IsOptional()
|
|
@IsString()
|
|
description?: string;
|
|
|
|
@ApiPropertyOptional({ description: "Optional linked environment ID" })
|
|
@IsOptional()
|
|
@IsUUID()
|
|
environmentId?: string;
|
|
|
|
@ApiPropertyOptional({ description: "Scenario timeout in seconds (default: 600)" })
|
|
@IsOptional()
|
|
@IsInt()
|
|
@Min(1)
|
|
timeoutSeconds?: number;
|
|
}
|