/** * Instance legal pages (issue #82, security.md §Privacy): imprint and * privacy policy are instance settings holding Markdown, edited by Site * Admins and rendered publicly at /legal/ — a core feature for * EU-hosted instances, not an afterthought. */ export const LEGAL_KINDS = ['imprint', 'privacy'] as const; export type LegalKind = (typeof LEGAL_KINDS)[number]; export function isLegalKind(value: string): value is LegalKind { return (LEGAL_KINDS as readonly string[]).includes(value); } /** What `GET /legal/:kind/content` returns; the SPA's legal page renders it. */ export interface LegalPageView { kind: LegalKind; /** False while the Site Admin has not provided a text yet. */ configured: boolean; /** Server-rendered HTML from the stored Markdown; empty when unconfigured. */ html: string; }