import { IsBoolean, IsIn, IsOptional, IsString, Matches, MinLength } from 'class-validator'; import { GIT_REPO_URL_RE } from '../../website-deploy/website-deploy.util'; export class UpdateDomainDto { @IsString() @MinLength(1) host!: string; /** When true, upsert Meshkee tenant records (@, www, business, customer, api). */ @IsOptional() @IsBoolean() updateDns?: boolean; /** DNS host for tenant records. Ignored unless updateDns is true. Default arvan. */ @IsOptional() @IsIn(['arvan', 'cloudflare']) dnsProvider?: 'arvan' | 'cloudflare'; /** HTTPS or SSH git URL — when set, provisions storefront deploy on the websites VM. */ @IsOptional() @IsString() @Matches(GIT_REPO_URL_RE, { message: 'gitRepoUrl must be a git URL (e.g. https://git.meshkee.com/Meshkee-Websites/oaktasty.git)', }) gitRepoUrl?: string; }