# retoor from molodetz.docs_api.registry import endpoint, field GROUP = { "slug": "account", "title": "Account", "description": "Inloggen met sessies, API-sleutel, meldingen. Geen JWT, geen OAuth.", "endpoints": [ endpoint("GET", "/auth/login", "Inlogpagina", sample={"errors": [], "next": "/admin"}), endpoint( "POST", "/auth/login", "Inloggen", "Zet een httponly sessiecookie (7 dagen, 30 met onthouden).", fields=[field("username", required=True, example="{{username}}"), field("password", required=True, type="password"), field("remember", type="boolean")], sample={"ok": True, "redirect": "/admin", "data": None}, interactive=False, ), endpoint("POST", "/auth/logout", "Uitloggen", sample={"ok": True, "redirect": "/", "data": None}, interactive=False), endpoint("GET", "/profile/api-key", "API-sleutel bekijken", auth="member", sample={"api_key": "{{api_key}}"}), endpoint("POST", "/profile/api-key/regenerate", "API-sleutel vernieuwen", auth="member", destructive=True, sample={"ok": True, "redirect": "/profile/api-key", "data": {"api_key": "..."}}, interactive=False), endpoint("POST", "/profile/avatar/regenerate", "Avatar vernieuwen", auth="member", destructive=True, sample={"ok": True}, interactive=False), endpoint("GET", "/notifications", "Meldingen", auth="member", sample={"notifications": [], "unread": 0}), endpoint("POST", "/notifications/read", "Alles gelezen", auth="member", sample={"ok": True, "redirect": "/notifications"}), endpoint("GET", "/voorwaarden", "Voorwaarden", sample={"title": "Voorwaarden"}), endpoint("POST", "/voorwaarden/accept", "Voorwaarden accepteren", auth="member", sample={"ok": True, "redirect": "/"}), endpoint("GET", "/privacy", "Privacy", sample={"title": "Privacy"}), ], }