Spaces:
Sleeping
Sleeping
Download src/modules/session/dto/create-session.dto.ts from jinksQspider/openWa: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/spaces/jinksQspider/openWa/resolve/main/src/modules/session/dto/create-session.dto.ts
- Command line
-
hf download hf://spaces/jinksQspider/openWa/src/modules/session/dto/create-session.dto.ts
-
curl -L -o create-session.dto.ts https://huggingface.co/spaces/jinksQspider/openWa/resolve/main/src/modules/session/dto/create-session.dto.ts
1.25 kB
| import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | |
| import { IsString, IsOptional, MaxLength, MinLength, Matches, IsIn } from 'class-validator'; | |
| export class CreateSessionDto { | |
| ({ | |
| description: 'Unique name for the session (alphanumeric, hyphens and underscores only)', | |
| example: 'my-bot', | |
| minLength: 3, | |
| maxLength: 50, | |
| }) | |
| () | |
| (3) | |
| (50) | |
| (/^[a-zA-Z0-9\-_]+$/, { | |
| message: 'Session name can only contain letters, numbers, hyphens and underscores', | |
| }) | |
| name: string; | |
| ({ | |
| description: 'Session configuration options', | |
| example: { autoReconnect: true }, | |
| }) | |
| () | |
| config?: Record<string, unknown>; | |
| // Phase 3: Proxy per session | |
| ({ | |
| description: 'Proxy URL for this session (e.g., http://user:pass@proxy.example.com:8080)', | |
| example: 'http://proxy.example.com:8080', | |
| }) | |
| () | |
| () | |
| (255) | |
| proxyUrl?: string; | |
| ({ | |
| description: 'Proxy type', | |
| enum: ['http', 'https', 'socks4', 'socks5'], | |
| example: 'http', | |
| }) | |
| () | |
| (['http', 'https', 'socks4', 'socks5']) | |
| proxyType?: 'http' | 'https' | 'socks4' | 'socks5'; | |
| } | |