- fix(dto): ajouter @IsEmail() sur contactFunctionalEmail/TechnicalEmail dans UpdateApiEntryDto - fix(docs): corriger stringify des erreurs (String(error) → error.message) - refactor(mapper): extraire toApiEntryListItem() dans api-entry.mapper.ts partagé - refactor(categories): supprimer CONVENTION_LABELS et toApiEntryListItem locaux dupliqués - refactor(browse): extraire CategoryFormModalComponent et CategoryDeleteModalComponent - refactor(api-detail): convertir editPreviewTitle() en computed() Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
68 lines
1.2 KiB
TypeScript
68 lines
1.2 KiB
TypeScript
import { IsString, IsOptional, IsUUID, IsIn, IsInt, Min, IsEmail } from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
import { ApiConvention } from '@datacat/shared';
|
|
|
|
export class UpdateApiEntryDto {
|
|
@IsIn(['CONSULTER', 'ENREGISTRER', 'ETRE_NOTIFIE'])
|
|
@IsOptional()
|
|
convention?: ApiConvention;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
name?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
provider?: string;
|
|
|
|
@IsInt()
|
|
@Min(0)
|
|
@Type(() => Number)
|
|
@IsOptional()
|
|
versionMajor?: number;
|
|
|
|
@IsInt()
|
|
@Min(0)
|
|
@Type(() => Number)
|
|
@IsOptional()
|
|
versionMinor?: number;
|
|
|
|
@IsInt()
|
|
@Min(0)
|
|
@Type(() => Number)
|
|
@IsOptional()
|
|
versionPatch?: number;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
description?: string | null;
|
|
|
|
@IsUUID()
|
|
@IsOptional()
|
|
categoryId?: string | null;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
contactFunctionalName?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
contactFunctionalEntity?: string;
|
|
|
|
@IsEmail()
|
|
@IsOptional()
|
|
contactFunctionalEmail?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
contactTechnicalName?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
contactTechnicalEntity?: string;
|
|
|
|
@IsEmail()
|
|
@IsOptional()
|
|
contactTechnicalEmail?: string;
|
|
}
|