import { IsBoolean, IsOptional, IsString, MaxLength, MinLength, } from 'class-validator'; export class CreateWooConnectionDto { @IsString() @MinLength(2) @MaxLength(80) label!: string; @IsString() @MinLength(8) @MaxLength(300) storeUrl!: string; @IsString() @MinLength(8) @MaxLength(200) consumerKey!: string; @IsString() @MinLength(8) @MaxLength(200) consumerSecret!: string; @IsOptional() @IsString() @MaxLength(200) webhookSecret?: string; @IsOptional() @IsBoolean() enabled?: boolean; } export class UpdateWooConnectionDto { @IsOptional() @IsString() @MinLength(2) @MaxLength(80) label?: string; @IsOptional() @IsString() @MinLength(8) @MaxLength(300) storeUrl?: string; @IsOptional() @IsString() @MinLength(8) @MaxLength(200) consumerKey?: string; @IsOptional() @IsString() @MinLength(8) @MaxLength(200) consumerSecret?: string; @IsOptional() @IsString() @MaxLength(200) webhookSecret?: string | null; @IsOptional() @IsBoolean() enabled?: boolean; }