mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-19 18:45:15 +02:00
refactor(use-logs): use canonical log types from contracts/types/log.types
Removes duplicated LogLevel, LogStatus, Log, LogFilters and LogSummary definitions from surfsense_web/hooks/use-logs.ts. These shapes already live as Zod-derived types in contracts/types/log.types.ts, which is the source of truth used by logs-api.service.ts and log-mutation.atoms.ts. Adds LogLevel and LogStatus aliases for LogLevelEnum/LogStatusEnum in log.types.ts so the existing public surface from use-logs is preserved without per-hook re-exports. The hook re-exports the canonical names so callers (app/dashboard/[search_space_id]/logs/(manage)/page.tsx) do not need to change. Closes #1372
This commit is contained in:
parent
cb46da3525
commit
b92cc963ce
2 changed files with 10 additions and 46 deletions
|
|
@ -117,6 +117,8 @@ export const getLogSummaryResponse = logSummary;
|
|||
export type Log = z.infer<typeof log>;
|
||||
export type LogLevelEnum = z.infer<typeof logLevelEnum>;
|
||||
export type LogStatusEnum = z.infer<typeof logStatusEnum>;
|
||||
export type LogLevel = LogLevelEnum;
|
||||
export type LogStatus = LogStatusEnum;
|
||||
export type LogFilters = z.infer<typeof logFilters>;
|
||||
export type CreateLogRequest = z.infer<typeof createLogRequest>;
|
||||
export type CreateLogResponse = z.infer<typeof createLogResponse>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue