milestone 32: task-shaped configuration, file mode as a rendering, config status api
This commit is contained in:
@@ -2,10 +2,12 @@ import type {
|
||||
Blocklist,
|
||||
BlocklistEcho,
|
||||
BlocklistInput,
|
||||
CertsReload,
|
||||
Client,
|
||||
ClientEdit,
|
||||
ClientPrefix,
|
||||
ClientPrefixInput,
|
||||
ConfigStatus,
|
||||
DiagnosticEvent,
|
||||
DiagnosticsFilter,
|
||||
DiagnosticsPage,
|
||||
@@ -249,3 +251,15 @@ export const postPause = (body: PausePost): Promise<PauseState> => request("/api
|
||||
export const getSettings = (): Promise<SettingsEnvelope> => request("/api/settings");
|
||||
export const putSettings = (patch: SettingsPatch): Promise<SettingsEnvelope> =>
|
||||
request("/api/settings", { method: "PUT", body: patch });
|
||||
|
||||
// Configuration authority and restart state
|
||||
|
||||
/**
|
||||
* The one route that answers which source governs the running configuration
|
||||
* and whether a restart is owed. Both are per-process facts: no other endpoint
|
||||
* carries them, and neither survives a restart.
|
||||
*/
|
||||
export const getConfigStatus = (): Promise<ConfigStatus> => request("/api/config/status");
|
||||
|
||||
/** Reloads the DoH/DoT certificates from disk. A runtime action: served in both authority modes. */
|
||||
export const reloadCerts = (): Promise<CertsReload> => request("/api/certs/reload", { method: "POST" });
|
||||
|
||||
Reference in New Issue
Block a user