mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-07 16:35:43 +00:00
feat: add biometric enrollment and viewing capabilities with API integration
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -83,6 +83,7 @@ export const PORTAL_PERMISSIONS = {
|
||||
APPLY_EXAM: "can:apply:exam",
|
||||
VIEW_OWN_EXAM: "can:View:own-exam",
|
||||
VIEW_OWN_CERTIFICATES: "can:View:own-certificates",
|
||||
VIEW_OWN_BIOMETRICS: "can:View:own-biometrics",
|
||||
APPLY_VESSEL_REGISTRATION: "can:apply:vessel-registration",
|
||||
VIEW_OWN_VESSELS: "can:View:own-vessels",
|
||||
REPORT_VESSEL_INCIDENT: "can:report:own-vessel-incident",
|
||||
|
||||
Reference in New Issue
Block a user