import api from './client'; export interface ApiKey { id: string; name: string; keyPrefix: string; createdAt: string; lastUsedAt: string | null; expiresAt: string | null; } export interface CreatedApiKey { plainKey: string; entity: ApiKey; } export const apiKeysApi = { getApiKeys: () => api.get('/api/api-keys').then(r => r.data), createApiKey: (name: string, expiresDays?: number) => api.post('/api/api-keys', { name, expiresDays }).then(r => r.data), deleteApiKey: (id: string) => api.delete(`/api/api-keys/${id}`).then(r => r.data), };