Dashboard can download grouped product variants and re-upload to update price and stock. Also expose Content-Disposition for downloads and keep related product/customer API docs in sync. Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
838 B
TypeScript
50 lines
838 B
TypeScript
import {
|
|
IsBoolean,
|
|
IsOptional,
|
|
IsString,
|
|
MaxLength,
|
|
MinLength,
|
|
ValidateIf,
|
|
} from 'class-validator';
|
|
|
|
export class UpdateCustomerDto {
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
isEnabled?: boolean;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MinLength(1)
|
|
@MaxLength(100)
|
|
firstName?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MinLength(1)
|
|
@MaxLength(100)
|
|
lastName?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@ValidateIf((_, value) => typeof value === 'string' && value.trim().length > 0)
|
|
@MinLength(2)
|
|
@MaxLength(100)
|
|
firstNameEn?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@ValidateIf((_, value) => typeof value === 'string' && value.trim().length > 0)
|
|
@MinLength(2)
|
|
@MaxLength(100)
|
|
lastNameEn?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
email?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MinLength(10)
|
|
cellNumber?: string;
|
|
}
|