Provides Zod schemas for system logs, audit trails, and build log validation. Use this to validate log entries and audit records across the application.
// Source: https://github.com/InsForge/InsForge | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from 'zod';
// Audit log schemas
export const auditLogSchema = z.object({
id: z.string(),
actor: z.string(),
action: z.string(),
module: z.string(),
details: z.record(z.unknown()).nullable(),
ipAddress: z.string().nullable(),
createdAt: z.string(),
updatedAt: z.string(),
});
export type AuditLogSchema = z.infer<typeof auditLogSchema>;
// System log schemas
export const logSourceSchema = z.object({
id: z.string(),
name: z.string(),
token: z.string(),
});
export const logSchema = z.object({
id: z.string(),
eventMessage: z.string(),
timestamp: z
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key