import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { IsBoolean, IsOptional, IsString, IsUrl } from 'class-validator'; export class OpenDto { @ApiProperty({ description: 'Session name previously created by POST /login', example: 'test-session-1', }) @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; }