import { apiRequest } from '@/shared/api/httpClient';
import type { ApiListResponse } from '@/shared/types/api';

export interface PermissionRow {
  readonly id: string;
  readonly name: string | null;
}

export function listPermissions(): Promise<ApiListResponse<PermissionRow>> {
  return apiRequest<ApiListResponse<PermissionRow>>('/permissions?limit=1000');
}
