Adiciona o frontend Next.js em frontend/ (setup, design system, autenticação/tema, layout/navegação, área master, área tenant completa: clientes, produtos, vendas, recebimentos, whatsapp, e-mail, alertas, equipe e perfil). Estende o backend de forma aditiva e autorizada: cookie httpOnly para refresh token (Etapa 13) e CRUD de equipe + edição de perfil do tenant (Etapa 18, módulo src/modules/equipe/ novo e PUT /tenant/perfil). Detalhes completos em Etapas/V2/*. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
22 lines
848 B
TypeScript
22 lines
848 B
TypeScript
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<PaginatedResult<AlertLog>>(`/tenant/alertas/logs${buildQuery(params)}`);
|
|
}
|