import { IsIn, IsObject, IsOptional, IsString } from 'class-validator';

export class SubscribeDto {
  @IsOptional() @IsIn(['webpush']) kind?: string;
  @IsString() endpoint!: string;
  @IsObject() keys!: { p256dh: string; auth: string };
  @IsOptional() @IsString() userAgent?: string;
}

export class UnsubscribeDto {
  @IsString() endpoint!: string;
}
