Files
immich/server/src/domain/user/dto/update-user.dto.ts
Jason Rasmussen a6eb227330 feat(web,server): user memory settings (#3628)
* feat(web,server): user preference for time-based memories

* chore: open api

* dev: mobile

* fix: update

* mobile work

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: Alex Tran <Alex.Tran@conductix.com>
2023-08-09 21:01:16 -05:00

53 lines
976 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { Transform } from 'class-transformer';
import { IsBoolean, IsEmail, IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator';
import { toEmail, toSanitized } from '../../domain.util';
export class UpdateUserDto {
@IsOptional()
@IsEmail({ require_tld: false })
@Transform(toEmail)
email?: string;
@IsOptional()
@IsNotEmpty()
@IsString()
password?: string;
@IsOptional()
@IsString()
@IsNotEmpty()
firstName?: string;
@IsOptional()
@IsString()
@IsNotEmpty()
lastName?: string;
@IsOptional()
@IsString()
@Transform(toSanitized)
storageLabel?: string;
@IsOptional()
@IsString()
externalPath?: string;
@IsNotEmpty()
@IsUUID('4')
@ApiProperty({ format: 'uuid' })
id!: string;
@IsOptional()
@IsBoolean()
isAdmin?: boolean;
@IsOptional()
@IsBoolean()
shouldChangePassword?: boolean;
@IsOptional()
@IsBoolean()
memoriesEnabled?: boolean;
}