// This file is generated automatically by Next.js
// Do not edit this file manually

type AppRoutes = "/" | "/docs" | "/feedback" | "/help" | "/map" | "/plan" | "/settings"
type AppRouteHandlerRoutes = "/api/board-annotations" | "/api/board-annotations/[id]" | "/api/bug-flags" | "/api/bug-flags/[id]" | "/api/code-graph" | "/api/code-graph/position" | "/api/context" | "/api/context/feature" | "/api/context/file" | "/api/db/arrange" | "/api/db/backfill-access" | "/api/db/position" | "/api/db/reconcile-endpoints" | "/api/db/relations/[id]" | "/api/db/tables/[id]" | "/api/draft" | "/api/draft/approve" | "/api/draft/status" | "/api/edges" | "/api/edges/[id]" | "/api/endpoints/[id]" | "/api/entities" | "/api/feedback" | "/api/feedback/[id]" | "/api/feedback/[id]/vote" | "/api/ingest" | "/api/init" | "/api/map" | "/api/map/describe" | "/api/map/files" | "/api/map/finish" | "/api/map/start" | "/api/map/touch-active" | "/api/nodes" | "/api/nodes/[id]" | "/api/nodes/[id]/position" | "/api/nodes/positions" | "/api/nodes/subtasks" | "/api/notes" | "/api/notes/[id]" | "/api/open" | "/api/plan" | "/api/plan/annotations" | "/api/plan/approve" | "/api/plan/history" | "/api/plan/markdown" | "/api/plan/presence" | "/api/plan/verdict" | "/api/preferences" | "/api/reset" | "/api/stream" | "/api/version" | "/api/workspace" | "/api/workspace/activate"
type PageRoutes = never
type LayoutRoutes = "/"
type RedirectRoutes = never
type RewriteRoutes = never
type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes | AppRouteHandlerRoutes


interface ParamMap {
  "/": {}
  "/api/board-annotations": {}
  "/api/board-annotations/[id]": { "id": string; }
  "/api/bug-flags": {}
  "/api/bug-flags/[id]": { "id": string; }
  "/api/code-graph": {}
  "/api/code-graph/position": {}
  "/api/context": {}
  "/api/context/feature": {}
  "/api/context/file": {}
  "/api/db/arrange": {}
  "/api/db/backfill-access": {}
  "/api/db/position": {}
  "/api/db/reconcile-endpoints": {}
  "/api/db/relations/[id]": { "id": string; }
  "/api/db/tables/[id]": { "id": string; }
  "/api/draft": {}
  "/api/draft/approve": {}
  "/api/draft/status": {}
  "/api/edges": {}
  "/api/edges/[id]": { "id": string; }
  "/api/endpoints/[id]": { "id": string; }
  "/api/entities": {}
  "/api/feedback": {}
  "/api/feedback/[id]": { "id": string; }
  "/api/feedback/[id]/vote": { "id": string; }
  "/api/ingest": {}
  "/api/init": {}
  "/api/map": {}
  "/api/map/describe": {}
  "/api/map/files": {}
  "/api/map/finish": {}
  "/api/map/start": {}
  "/api/map/touch-active": {}
  "/api/nodes": {}
  "/api/nodes/[id]": { "id": string; }
  "/api/nodes/[id]/position": { "id": string; }
  "/api/nodes/positions": {}
  "/api/nodes/subtasks": {}
  "/api/notes": {}
  "/api/notes/[id]": { "id": string; }
  "/api/open": {}
  "/api/plan": {}
  "/api/plan/annotations": {}
  "/api/plan/approve": {}
  "/api/plan/history": {}
  "/api/plan/markdown": {}
  "/api/plan/presence": {}
  "/api/plan/verdict": {}
  "/api/preferences": {}
  "/api/reset": {}
  "/api/stream": {}
  "/api/version": {}
  "/api/workspace": {}
  "/api/workspace/activate": {}
  "/docs": {}
  "/feedback": {}
  "/help": {}
  "/map": {}
  "/plan": {}
  "/settings": {}
}


export type ParamsOf<Route extends Routes> = ParamMap[Route]

interface LayoutSlotMap {
  "/": never
}


export type { AppRoutes, PageRoutes, LayoutRoutes, RedirectRoutes, RewriteRoutes, ParamMap, AppRouteHandlerRoutes }

declare global {
  /**
   * Props for Next.js App Router page components
   * @example
   * ```tsx
   * export default function Page(props: PageProps<'/blog/[slug]'>) {
   *   const { slug } = await props.params
   *   return <div>Blog post: {slug}</div>
   * }
   * ```
   */
  interface PageProps<AppRoute extends AppRoutes> {
    params: Promise<ParamMap[AppRoute]>
    searchParams: Promise<Record<string, string | string[] | undefined>>
  }

  /**
   * Props for Next.js App Router layout components
   * @example
   * ```tsx
   * export default function Layout(props: LayoutProps<'/dashboard'>) {
   *   return <div>{props.children}</div>
   * }
   * ```
   */
  type LayoutProps<LayoutRoute extends LayoutRoutes> = {
    params: Promise<ParamMap[LayoutRoute]>
    children: React.ReactNode
  } & {
    [K in LayoutSlotMap[LayoutRoute]]: React.ReactNode
  }

  /**
   * Context for Next.js App Router route handlers
   * @example
   * ```tsx
   * export async function GET(request: NextRequest, context: RouteContext<'/api/users/[id]'>) {
   *   const { id } = await context.params
   *   return Response.json({ id })
   * }
   * ```
   */
  interface RouteContext<AppRouteHandlerRoute extends AppRouteHandlerRoutes> {
    params: Promise<ParamMap[AppRouteHandlerRoute]>
  }
}
