import {deleteJson, postJson, type Endpoint} from '@/shared/services/httpClient'; import type {DeviceSession} from '@/features/settings/services/mapSession'; /** Signed-in devices, and the two ways to end them. */ export const securityRepository = { sessions: (): Endpoint => ({ path: '/api/auth/sessions', params: {}, }), revoke: (id: string) => deleteJson(`/api/auth/sessions/${encodeURIComponent(id)}`), /** Keeps this browser signed in — see the route. */ revokeOthers: () => postJson('/api/auth/sessions/revoke-others', {}), };