Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

773 B
Raw Blame
import { ApiProperty } from '@nestjs/swagger'
import { IsEmail, IsOptional, IsString } from 'class-validator'
import { TimeFormat } from '../entities/user.entity'

export class UpdateUserProfileDTO {
  @ApiProperty({ example: '[email protected]', required: true })
  @IsEmail()
  email: string

  @ApiProperty({ example: 'your_password123' })
  password: string

  @ApiProperty({ example: 'your_current_password123', required: false })
  @IsString()
  @IsOptional()
  currentPassword?: string

  @ApiProperty({ example: 'week' })
  reportFrequency: string

  @ApiProperty({ example: 'Europe/Kiev' })
  timezone: string

  @ApiProperty({ example: '1234567890' })
  telegramChatId: string | null

  @ApiProperty({ example: '24-hour', enum: TimeFormat })
  timeFormat: string
}