Update: nueva version Horux Despachos

This commit is contained in:
consultoria-as
2026-04-27 22:09:36 -06:00
commit 6b36db1403
614 changed files with 125926 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import { apiClient } from './client';
export interface AuditLogEntry {
id: string;
userId: string | null;
tenantId: string | null;
action: string;
entityType: string | null;
entityId: string | null;
metadata: Record<string, any> | null;
createdAt: string;
user: { id: string; email: string; nombre: string } | null;
tenant: { id: string; nombre: string; rfc: string } | null;
}
export interface AuditLogFilters {
action?: string;
tenantId?: string;
userId?: string;
from?: string;
to?: string;
page?: number;
limit?: number;
}
export interface AuditLogResponse {
data: AuditLogEntry[];
page: number;
limit: number;
total: number;
totalPages: number;
}
export async function listAuditLog(filters: AuditLogFilters = {}): Promise<AuditLogResponse> {
const response = await apiClient.get<AuditLogResponse>('/audit-log', { params: filters });
return response.data;
}