ui/audit_log_state.svelte.ts view source
AuditLogFetchOptions Options for fetching audit log events.
event_type
stringaccount_id
stringlimit
numberoffset
numberReactive state for the audit log viewer.
Supports both fetch-based pagination and realtime SSE streaming.
SSE events are prepended to the list; use fetch() for initial load and filters.
2 declarations
ui/audit_log_state.svelte.ts view source
AuditLogFetchOptions Options for fetching audit log events.
event_typestringaccount_idstringlimitnumberoffsetnumberui/audit_log_state.svelte.ts view source
eventstype Array<AuditLogEventWithUsernamesJson>
permit_history_eventstype Array<PermitHistoryEventJson>
countconnectedWhether the SSE stream is currently connected.
constructortype new (stream_url?: string): AuditLogState
stream_urlstring'/api/admin/audit-log/stream'fetchtype (options?: AuditLogFetchOptions | undefined): Promise<void>
options?AuditLogFetchOptions | undefinedPromise<void>fetch_permit_historytype (limit?: number | undefined, offset?: number | undefined): Promise<void>
limit?number | undefinedoffset?number | undefinedPromise<void>subscribeConnect to the SSE stream for realtime audit events.
New events are prepended to events. EventSource auto-reconnects on
transient errors; since_seq fills gaps on reconnection.
type (): () => void
() => voidcleanup function that closes the connection
disconnectClose the SSE connection.
type (): void
void