vlt / affordances
  • Quickstart
  • Concepts
  • Guides
  • Reference
  • Overview
    • Overview
    • @affordances/next
    • @affordances/next/codegen
    • @affordances/next/config
    • @affordances/next/manifest
    • @affordances/next/route
    • Reference
  • Type Aliases
  • RouteHandlerOptions
  • Variables
  • GET
  • POST
  • Functions
  • createRouteHandler()
  1. Reference
  2. /
  3. API reference
  4. /
  5. @affordances/next
  6. /
  7. @affordances/next/route

@affordances/next/route

Type Aliases

RouteHandlerOptions

TypeScript
type RouteHandlerOptions = Omit<HandlerOptions, "manifest" | "basePath"> & object;

Type Declaration

NameType
manifest?Manifest

Variables

GET

TypeScript
const GET: (request) => Promise<Response>;

Parameters

ParameterType
requestRequest

Returns

Promise<Response>


POST

TypeScript
const POST: (request) => Promise<Response> = GET;

Parameters

ParameterType
requestRequest

Returns

Promise<Response>

Functions

createRouteHandler()

TypeScript
function createRouteHandler(options?): (request) => Promise<Response>;

Parameters

ParameterType
options?RouteHandlerOptions

Returns

(request) => Promise<Response>


Previous@affordances/next/manifestNextReference

On this page

  • Type Aliases
  • RouteHandlerOptions
  • Variables
  • GET
  • POST
  • Functions
  • createRouteHandler()

Make your app agent-operable

Give every page a graph and every server action an agent path: HTTP, WebMCP, and MCP, with the same session and the same checks. One command sets it up.

Read the quickstart