feat : add Client DTO, service and Hydra utils (frontend)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 22:43:07 +01:00
parent de7c2c25cd
commit b5efb54f71
3 changed files with 59 additions and 0 deletions

8
frontend/utils/api.ts Normal file
View File

@@ -0,0 +1,8 @@
export type HydraCollection<T> = {
'hydra:member': T[]
'hydra:totalItems': number
}
export function extractHydraMembers<T>(response: HydraCollection<T>): T[] {
return response['hydra:member'] ?? []
}