export type ContractType = 'CDI' | 'CDD' | 'STAGE' | 'ALTERNANCE' | 'AUTRE' /** * Project as embedded in the `me:read` serialization group (id + name). * On `/me`, `allowedProjects` is returned as embedded objects, not bare IRIs. */ export type AllowedProject = { '@id'?: string id: number name: string } export type UserData = { id: number '@id'?: string username: string firstName?: string | null lastName?: string | null roles: string[] effectivePermissions?: string[] avatarUrl?: string | null apiToken?: string | null // Client portal client?: string | null // IRI of the linked Client (null = internal user) allowedProjects?: AllowedProject[] // Projects a client user can access (embedded id + name) // HR / absence management isEmployee?: boolean hireDate?: string | null endDate?: string | null contractType?: ContractType | null workTimeRatio?: number annualLeaveDays?: number referencePeriodStart?: string initialLeaveBalance?: number } export type UserWrite = { username: string firstName?: string | null lastName?: string | null plainPassword?: string roles: string[] // Client portal client?: string | null allowedProjects?: string[] // HR / absence management isEmployee?: boolean hireDate?: string | null endDate?: string | null contractType?: ContractType | null workTimeRatio?: number annualLeaveDays?: number referencePeriodStart?: string initialLeaveBalance?: number }