Files
liqa/server/src/browser/dto/open.dto.ts
T
ars9 b45f95d8cf refactor(session): auto-create named browser sessions
- 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
2026-04-10 21:06:00 +03:00

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;
}