Files
backend/src/business-admin/dto/update-domain.dto.ts
T
Alireza HassaniandCursor f42e6fe2a4 Allow add/edit domain to upsert tenant DNS on Cloudflare or Arvan.
Update DNS writes @, www, business, customer, and api records on the chosen provider instead of Arvan only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 18:46:48 +03:30

28 lines
861 B
TypeScript

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