- create and register named browser sessions on open/exec when missing - align scenario step DTO/entity/service by removing sessionName usage - update MCP scenario-step schemas to use optional title fields
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
import { IsBoolean, IsOptional, IsString, IsUrl } from "class-validator";
|
|
|
|
export class OpenDto {
|
|
@ApiPropertyOptional({
|
|
description:
|
|
"Optional named browser session. If it does not exist yet, it is created automatically.",
|
|
example: "test-session-1",
|
|
})
|
|
@IsOptional()
|
|
@IsString()
|
|
sessionName?: string;
|
|
|
|
@ApiProperty({
|
|
description: "URL to open with the authenticated session",
|
|
example: "https://cabinet-liquio-diia-stg.kitsoft.ua/messages",
|
|
})
|
|
@IsUrl({ require_tld: true, require_protocol: true })
|
|
url: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description:
|
|
"When true, return a plain-text reader-mode summary instead of raw HTML",
|
|
default: false,
|
|
})
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
readerMode?: boolean;
|
|
|
|
@ApiPropertyOptional({
|
|
description:
|
|
"CSS selector whose matching element content is returned. When omitted the full page HTML is used.",
|
|
example: "#main-content",
|
|
})
|
|
@IsOptional()
|
|
@IsString()
|
|
selector?: string;
|
|
}
|