- GET /auth/reprise-dossier?token= : dossier pour préremplir (token seul) - PATCH /auth/reprise-resoumettre : token + champs modifiables → en_attente, token invalidé - POST /auth/reprise-identify : numero_dossier + email → type + token - UserService: findByTokenReprise, resoumettreReprise, findByNumeroDossierAndEmailForReprise Made-with: Cursor
24 lines
751 B
TypeScript
24 lines
751 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
||
import { IsEmail, IsString, MaxLength } from 'class-validator';
|
||
|
||
/** Body POST /auth/reprise-identify – numéro + email pour obtenir token reprise. Ticket #111 */
|
||
export class RepriseIdentifyBodyDto {
|
||
@ApiProperty({ example: '2026-000001' })
|
||
@IsString()
|
||
@MaxLength(20)
|
||
numero_dossier: string;
|
||
|
||
@ApiProperty({ example: 'parent@example.com' })
|
||
@IsEmail()
|
||
email: string;
|
||
}
|
||
|
||
/** Réponse POST /auth/reprise-identify */
|
||
export class RepriseIdentifyResponseDto {
|
||
@ApiProperty({ enum: ['parent', 'assistante_maternelle'] })
|
||
type: 'parent' | 'assistante_maternelle';
|
||
|
||
@ApiProperty({ description: 'Token à utiliser pour GET reprise-dossier et PUT reprise-resoumettre' })
|
||
token: string;
|
||
}
|