/** * /api/settings — host-level settings UI surface. * * The persisted shape is `host.config.json` (managed by the installer). * This route is a thin passthrough plus a write-whitelist: * * - uiPort rejected (restart required; only edit at install time) * - upnpEnabled accepted → also propagated to NatService.putSettings * - updates.autoApply accepted → propagated to UpdateService.putSettings * - updates.manifestUrl accepted → propagated to UpdateService.putSettings * - claimAddresses accepted (replaced whole) → read by the next claim code * - anything else 400 invalid_setting * * GET returns the full `HostConfigFile` (the SPA wants the full shape so it * can render a read-only view of the rejected keys). */ import type { FastifyInstance } from 'fastify'; import type { NatService } from '../../nat/index.js'; import type { UpdateService } from '../../update/index.js'; import type { HostSettingsStore } from '../settings-store.js'; export interface SettingsRoutesOptions { settingsStore: HostSettingsStore; /** An `upnpEnabled` write takes effect on it at once. */ nat: NatService; update?: UpdateService; } export declare function registerSettingsRoutes(app: FastifyInstance, opts: SettingsRoutesOptions): void;