mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 09:30:28 +00:00
* 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>
53 lines
976 B
TypeScript
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;
|
|
}
|