import { IsBoolean, IsEmail, IsEnum, IsOptional } from 'class-validator';
import { InviteChannel } from '../entities/meeting-invite.entity';

export class SendInviteDto {
  @IsEnum(InviteChannel)
  channel: InviteChannel;

  /** send to a different address than the one stored on the invite */
  @IsOptional()
  @IsEmail()
  override_email?: string;

  /**
   * The stored passcode is a one-way hash, so re-sending needs a new one.
   * Defaults to true. Set false only when re-sending inside the same window
   * and the recipient already has the original code.
   */
  @IsOptional()
  @IsBoolean()
  regenerate_otp?: boolean;
}
