src/user/dtos/update-user.dto.ts
Properties |
|
| Public Optional bio |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'User Profile Bio', type: String, example: 'I make the pizza'})
|
|
Defined in src/user/dtos/update-user.dto.ts:28
|
| Public Optional company |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'User Profile Company', type: String, example: 'OpenSauced'})
|
|
Defined in src/user/dtos/update-user.dto.ts:59
|
| Readonly Optional discord_url |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'Discord URL', example: 'https://discord.gg/opensauced'})
|
|
Defined in src/user/dtos/update-user.dto.ts:110
|
| Public Optional display_local_time |
Type : boolean
|
Decorators :
@ApiPropertyOptional({description: 'Display user local time in profile', type: Boolean, example: false})
|
|
Defined in src/user/dtos/update-user.dto.ts:77
|
| Public email |
Type : string
|
Decorators :
@ApiProperty({description: 'User Profile Email', type: String, example: 'hello@opensauced.pizza'})
|
|
Defined in src/user/dtos/update-user.dto.ts:19
|
| Readonly Optional github_sponsors_url |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'GitHub Sponsors URL', example: 'https://github.com/sponsors/open-sauced'})
|
|
Defined in src/user/dtos/update-user.dto.ts:102
|
| Readonly Optional linkedin_url |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'LinkedIn URL', example: 'https://www.linkedin.com/in/brianldouglas'})
|
|
Defined in src/user/dtos/update-user.dto.ts:94
|
| Public Optional location |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'User Profile Location', type: String, example: 'OpenSauced'})
|
|
Defined in src/user/dtos/update-user.dto.ts:68
|
| Public name |
Type : string
|
Decorators :
@ApiProperty({description: 'User Profile Name', type: String, example: 'Pizza Maker'})
|
|
Defined in src/user/dtos/update-user.dto.ts:11
|
| Public Optional timezone |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'User timezone in UTC', type: String, example: 'UTC-5'})
|
|
Defined in src/user/dtos/update-user.dto.ts:86
|
| Public Optional twitter_username |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'User Profile Twitter Username', type: String, example: 'saucedopen'})
|
|
Defined in src/user/dtos/update-user.dto.ts:50
|
| Public Optional url |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'User Profile URL', type: String, example: 'https://opensauced.pizza'})
|
|
Defined in src/user/dtos/update-user.dto.ts:37
|
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsBoolean, IsEmail, IsOptional, IsString, IsUrl, Matches } from "class-validator";
export class UpdateUserDto {
@ApiProperty({
description: "User Profile Name",
type: String,
example: "Pizza Maker",
})
@IsString()
public name: string;
@ApiProperty({
description: "User Profile Email",
type: String,
example: "hello@opensauced.pizza",
})
@IsEmail()
public email: string;
@ApiPropertyOptional({
description: "User Profile Bio",
type: String,
example: "I make the pizza",
})
@IsString()
@IsOptional()
public bio?: string;
@ApiPropertyOptional({
description: "User Profile URL",
type: String,
example: "https://opensauced.pizza",
})
@IsUrl()
@IsOptional()
public url?: string;
@ApiPropertyOptional({
description: "User Profile Twitter Username",
type: String,
example: "saucedopen",
})
@IsString()
@Matches(/^(?!.*?admin)(?!.*?twitter)\w{0,15}$/i, {
message:
"Twitter username can only contain letters, numbers, and underscores. It also cannot contain reserved Twitter usernames (twitter or admin).",
})
@IsOptional()
public twitter_username?: string;
@ApiPropertyOptional({
description: "User Profile Company",
type: String,
example: "OpenSauced",
})
@IsString()
@IsOptional()
public company?: string;
@ApiPropertyOptional({
description: "User Profile Location",
type: String,
example: "OpenSauced",
})
@IsString()
@IsOptional()
public location?: string;
@ApiPropertyOptional({
description: "Display user local time in profile",
type: Boolean,
example: false,
})
@IsBoolean()
@IsOptional()
public display_local_time?: boolean;
@ApiPropertyOptional({
description: "User timezone in UTC",
type: String,
example: "UTC-5",
})
@IsString()
@IsOptional()
public timezone?: string;
@ApiPropertyOptional({
description: "LinkedIn URL",
example: "https://www.linkedin.com/in/brianldouglas",
})
@IsUrl()
@IsOptional()
readonly linkedin_url?: string;
@ApiPropertyOptional({
description: "GitHub Sponsors URL",
example: "https://github.com/sponsors/open-sauced",
})
@IsUrl()
@IsOptional()
readonly github_sponsors_url?: string;
@ApiPropertyOptional({
description: "Discord URL",
example: "https://discord.gg/opensauced",
})
@IsUrl()
@IsOptional()
readonly discord_url?: string;
}