feat: add biometric enrollment and viewing capabilities with API integration

This commit is contained in:
Nati
2026-08-28 08:15:39 +00:00
parent ea0a458ed0
commit 5006e4685b
6 changed files with 236 additions and 10 deletions

View File

@@ -22,6 +22,17 @@ export const biometricEnrollmentApi = baseApi
providesTags: (_r, _e, profileId) => [forProfile(profileId)],
}),
/** Self-service, view-only: the caller's own live enrollments. */
getMyBiometricEnrollments: builder.query<BiometricEnrollment[], void>({
query: () => ({ url: '/biometric-enrollments/mine' }),
providesTags: [{ type: TAG, id: 'MINE' }],
}),
/** Dev/test only — the API reports false in production. */
getBiometricSimulateCapabilities: builder.query<{ simulateEnabled: boolean }, void>({
query: () => ({ url: '/biometric-enrollments/simulate/capabilities' }),
}),
revokeBiometricEnrollment: builder.mutation<
BiometricEnrollment,
{ id: string; profileId: string; reason: string }
@@ -40,5 +51,7 @@ export const biometricEnrollmentApi = baseApi
export const {
useEnrollBiometricMutation,
useGetBiometricEnrollmentsQuery,
useGetMyBiometricEnrollmentsQuery,
useGetBiometricSimulateCapabilitiesQuery,
useRevokeBiometricEnrollmentMutation,
} = biometricEnrollmentApi;