feat(frontend): add config types and API client for file-config endpoints

- types/config.ts: TypeScript interfaces for ActionConfig, FilterConfig,
  JailFileConfig, ConfFileContent, and related request/response shapes
- api/config.ts: typed API functions for reading and writing conf files
- api/endpoints.ts: add /config/file/* endpoint constants
This commit is contained in:
2026-03-13 13:47:45 +01:00
parent f5c3635258
commit 8bdad3529f
3 changed files with 201 additions and 0 deletions

View File

@@ -76,10 +76,16 @@ export const ENDPOINTS = {
`/config/jail-files/${encodeURIComponent(filename)}`,
configJailFileEnabled: (filename: string): string =>
`/config/jail-files/${encodeURIComponent(filename)}/enabled`,
configJailFileParsed: (filename: string): string =>
`/config/jail-files/${encodeURIComponent(filename)}/parsed`,
configFilters: "/config/filters",
configFilter: (name: string): string => `/config/filters/${encodeURIComponent(name)}`,
configFilterParsed: (name: string): string =>
`/config/filters/${encodeURIComponent(name)}/parsed`,
configActions: "/config/actions",
configAction: (name: string): string => `/config/actions/${encodeURIComponent(name)}`,
configActionParsed: (name: string): string =>
`/config/actions/${encodeURIComponent(name)}/parsed`,
// -------------------------------------------------------------------------
// Server settings