import { apiClient } from '@/lib/api/client'; import { buildQuery, type PaginatedResult } from '@/lib/api/types'; import type { AlertLog, AlertLogStatus } from '@/lib/api/alert-logs'; import type { CanalTemplate } from '@/lib/api/alert-templates'; export { ALERT_LOG_STATUSES } from '@/lib/api/alert-logs'; export type { AlertLog, AlertLogStatus } from '@/lib/api/alert-logs'; export interface ListTenantAlertLogsParams { canal?: CanalTemplate; status?: AlertLogStatus; data_inicio?: string; data_fim?: string; page?: number; limit?: number; } /** `GET /tenant/alertas/logs` — já filtrado pelo tenant da sessão (RLS/contexto), sem parâmetro `tenant_id`. */ export function listTenantAlertLogs(params: ListTenantAlertLogsParams) { return apiClient.get>(`/tenant/alertas/logs${buildQuery(params)}`); }