Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

402 B
Raw Blame
import { IsDefined, IsString, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';

export class FieldsDto {
  @IsString()
  @IsDefined()
  name: string;

  @IsString()
  @IsDefined()
  value: string;
}

export class PlugDto {
  @IsString()
  @IsDefined()
  func: string;

  @Type(() => FieldsDto)
  @ValidateNested({ each: true })
  @IsDefined()
  fields: FieldsDto[];
}