{
  "classes": [
    {
      "constants": [],
      "types": [
        {
          "lua_type": "type ResponseSpec = {\n    status: number?,\n    headers: Headers?,\n    contentType: string?,\n    body: any?,\n    text: string?,\n    html: string?,\n    json: any?,\n    location: string?,\n}",
          "name": "ResponseSpec",
          "tags": [],
          "source": {
            "path": "",
            "line": 41
          },
          "fields": [
            {
              "lua_type": "status: number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "headers: Headers?",
              "name": "headers",
              "desc": ""
            },
            {
              "lua_type": "contentType: string?",
              "name": "contentType",
              "desc": ""
            },
            {
              "lua_type": "body: any?",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "text: string?",
              "name": "text",
              "desc": ""
            },
            {
              "lua_type": "html: string?",
              "name": "html",
              "desc": ""
            },
            {
              "lua_type": "json: any?",
              "name": "json",
              "desc": ""
            },
            {
              "lua_type": "location: string?",
              "name": "location",
              "desc": ""
            }
          ],
          "desc": ""
        },
        {
          "lua_type": "type RouteOptions = {\n    name: string?,\n    middleware: { Middleware }?,\n    websocket: any?,\n}",
          "name": "RouteOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 55
          },
          "fields": [
            {
              "lua_type": "name: string?",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "middleware: { Middleware }?",
              "name": "middleware",
              "desc": "Route-local middleware that runs inside app/group middleware but before the handler."
            },
            {
              "lua_type": "websocket: any?",
              "name": "websocket",
              "desc": "WebSocket upgrade options, used by [[App.websocket]]."
            }
          ],
          "desc": "Optional metadata for route registration helpers like [[App.get]].\n"
        },
        {
          "lua_type": "type StaticOptions = {\n    indexFile: string?,\n    fallthrough: boolean?,\n    headers: Headers?,\n}",
          "name": "StaticOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 66
          },
          "fields": [
            {
              "lua_type": "indexFile: string?",
              "name": "indexFile",
              "desc": ""
            },
            {
              "lua_type": "fallthrough: boolean?",
              "name": "fallthrough",
              "desc": ""
            },
            {
              "lua_type": "headers: Headers?",
              "name": "headers",
              "desc": ""
            }
          ],
          "desc": "Options for [[App.static]].\n"
        },
        {
          "lua_type": "type SendFileOptions = {\n    contentType: string?,\n    filename: string?,\n    headers: Headers?,\n    status: number?,\n}",
          "name": "SendFileOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 75
          },
          "fields": [
            {
              "lua_type": "contentType: string?",
              "name": "contentType",
              "desc": ""
            },
            {
              "lua_type": "filename: string?",
              "name": "filename",
              "desc": ""
            },
            {
              "lua_type": "headers: Headers?",
              "name": "headers",
              "desc": ""
            },
            {
              "lua_type": "status: number?",
              "name": "status",
              "desc": ""
            }
          ],
          "desc": "Options for [[AppContext.sendFile]].\n"
        },
        {
          "lua_type": "type CookieOptions = {\n    path: string?,\n    domain: string?,\n    expires: number?,\n    maxAge: number?,\n    secure: boolean?,\n    httpOnly: boolean?,\n    sameSite: \"Strict\" | \"Lax\" | \"None\"?,\n}",
          "name": "CookieOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 85
          },
          "fields": [
            {
              "lua_type": "path: string?",
              "name": "path",
              "desc": ""
            },
            {
              "lua_type": "domain: string?",
              "name": "domain",
              "desc": ""
            },
            {
              "lua_type": "expires: number?",
              "name": "expires",
              "desc": ""
            },
            {
              "lua_type": "maxAge: number?",
              "name": "maxAge",
              "desc": ""
            },
            {
              "lua_type": "secure: boolean?",
              "name": "secure",
              "desc": ""
            },
            {
              "lua_type": "httpOnly: boolean?",
              "name": "httpOnly",
              "desc": ""
            },
            {
              "lua_type": "sameSite: \"Strict\" | \"Lax\" | \"None\"?",
              "name": "sameSite",
              "desc": ""
            }
          ],
          "desc": "Options for setting response cookies from the app layer.\n"
        },
        {
          "lua_type": "type RouteHandler = ((ctx: AppContext) → any)",
          "name": "RouteHandler",
          "tags": [],
          "source": {
            "path": "",
            "line": 129
          },
          "fields": [],
          "desc": ""
        },
        {
          "lua_type": "type Middleware = ((ctx: AppContext, next: (() → any)) → any)",
          "name": "Middleware",
          "tags": [],
          "source": {
            "path": "",
            "line": 130
          },
          "fields": [],
          "desc": ""
        },
        {
          "lua_type": "type ExceptionHandler = ((ctx: AppContext, err: any) → any)",
          "name": "ExceptionHandler",
          "tags": [],
          "source": {
            "path": "",
            "line": 131
          },
          "fields": [],
          "desc": ""
        },
        {
          "lua_type": "type WebSocketHandler = ((ctx: AppContext, ws: any) → any)",
          "name": "WebSocketHandler",
          "tags": [],
          "source": {
            "path": "",
            "line": 132
          },
          "fields": [],
          "desc": ""
        }
      ],
      "name": "@eryx/http/App",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 508
          },
          "is_method": true,
          "signature": "AppContextMethods:json() → any",
          "owner": "AppContextMethods",
          "desc": "",
          "tags": [],
          "name": "json",
          "return_str": "any",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "any",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 520
          },
          "is_method": true,
          "signature": "AppContextMethods:form() → QueryTable?",
          "owner": "AppContextMethods",
          "desc": "",
          "tags": [],
          "name": "form",
          "return_str": "QueryTable?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "QueryTable?",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 524
          },
          "is_method": true,
          "signature": "AppContextMethods:multipart() → { any }?",
          "owner": "AppContextMethods",
          "desc": "",
          "tags": [],
          "name": "multipart",
          "return_str": "{ any }?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ any }?",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 531
          },
          "is_method": true,
          "signature": "AppContextMethods:cookie(\n    name: string  -- Cookie name.\n) → (\n      -- string?\n)",
          "owner": "AppContextMethods",
          "desc": "Returns the first parsed request cookie value for the given cookie name.",
          "tags": [],
          "name": "cookie",
          "return_str": "string?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string?",
              "desc": "string?"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": "Cookie name."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 539
          },
          "is_method": true,
          "signature": "AppContextMethods:send(status: number, body: string?, headers: Headers?) → ()",
          "owner": "AppContextMethods",
          "desc": "",
          "tags": [],
          "name": "send",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "number",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "string?",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 543
          },
          "is_method": true,
          "signature": "AppContextMethods:text(body: string, status: number?, headers: Headers?) → ()",
          "owner": "AppContextMethods",
          "desc": "",
          "tags": [],
          "name": "text",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 553
          },
          "is_method": true,
          "signature": "AppContextMethods:html(body: string, status: number?, headers: Headers?) → ()",
          "owner": "AppContextMethods",
          "desc": "",
          "tags": [],
          "name": "html",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 563
          },
          "is_method": true,
          "signature": "AppContextMethods:jsonResponse(data: any, status: number?, headers: Headers?) → ()",
          "owner": "AppContextMethods",
          "desc": "",
          "tags": [],
          "name": "jsonResponse",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "any",
              "name": "data",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 573
          },
          "is_method": true,
          "signature": "AppContextMethods:redirect(location: string, status: number?, headers: Headers?) → ()",
          "owner": "AppContextMethods",
          "desc": "",
          "tags": [],
          "name": "redirect",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "location",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 584
          },
          "is_method": true,
          "signature": "AppContextMethods:setCookie(\n    name: string,  -- Cookie name.\n    value: string,  -- Cookie value.\n    options: CookieOptions?  -- Cookie attributes.\n) → ()",
          "owner": "AppContextMethods",
          "desc": "Appends a `Set-Cookie` response header.",
          "tags": [],
          "name": "setCookie",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": "Cookie name."
            },
            {
              "lua_type": "string",
              "name": "value",
              "desc": "Cookie value."
            },
            {
              "lua_type": "CookieOptions?",
              "name": "options",
              "desc": "Cookie attributes."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 591
          },
          "is_method": true,
          "signature": "AppContextMethods:clearCookie(\n    name: string,  -- Cookie name.\n    options: CookieOptions?  -- Cookie attributes such as `path` or `domain` to target the existing cookie.\n) → ()",
          "owner": "AppContextMethods",
          "desc": "Clears a cookie by setting it to an empty value with an expired timestamp.",
          "tags": [],
          "name": "clearCookie",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": "Cookie name."
            },
            {
              "lua_type": "CookieOptions?",
              "name": "options",
              "desc": "Cookie attributes such as `path` or `domain` to target the existing cookie."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 604
          },
          "is_method": true,
          "signature": "AppContextMethods:sendFile(\n    path: string,  -- Filesystem path to the file.\n    options: SendFileOptions?  -- Optional response overrides.\n) → ()",
          "owner": "AppContextMethods",
          "desc": "Streams a file as the HTTP response body.",
          "tags": [],
          "name": "sendFile",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Filesystem path to the file."
            },
            {
              "lua_type": "SendFileOptions?",
              "name": "options",
              "desc": "Optional response overrides."
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": ""
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 95
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "app: App",
          "name": "app",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "request: HttpServer.ServerRequest",
          "name": "request",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "response: ServerResponse.ServerResponse",
          "name": "response",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "params: Params",
          "name": "params",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "query: QueryTable",
          "name": "query",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "cookies: { [string]: string | { string } }",
          "name": "cookies",
          "desc": "Parsed request cookies from the `Cookie` header."
        },
        {
          "tags": [],
          "lua_type": "session: any?",
          "name": "session",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "state: { [string]: any }",
          "name": "state",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "route: { method: string, path: string }?",
          "name": "route",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "mountPath: string?",
          "name": "mountPath",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "pathWithinMount: string",
          "name": "pathWithinMount",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "originalPath: string",
          "name": "originalPath",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "errorStatus: number?",
          "name": "errorStatus",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "errorData: { [string]: any }?",
          "name": "errorData",
          "desc": ""
        }
      ],
      "desc": "",
      "name": "AppContext",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 111
          },
          "is_method": true,
          "signature": "AppContext:json() → any",
          "desc": "",
          "tags": [],
          "name": "json",
          "return_str": "any",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "any",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 112
          },
          "is_method": true,
          "signature": "AppContext:form() → QueryTable?",
          "desc": "",
          "tags": [],
          "name": "form",
          "return_str": "QueryTable?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "QueryTable?",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 113
          },
          "is_method": true,
          "signature": "AppContext:multipart() → { any }?",
          "desc": "",
          "tags": [],
          "name": "multipart",
          "return_str": "{ any }?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ any }?",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 115
          },
          "is_method": true,
          "signature": "AppContext:cookie(name: string) → string?",
          "desc": "Returns the first parsed request cookie value by name.",
          "tags": [],
          "name": "cookie",
          "return_str": "string?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string?",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 116
          },
          "is_method": true,
          "signature": "AppContext:send(status: number, body: string?, headers: Headers?) → ()",
          "desc": "",
          "tags": [],
          "name": "send",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "number",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "string?",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 117
          },
          "is_method": true,
          "signature": "AppContext:text(body: string, status: number?, headers: Headers?) → ()",
          "desc": "",
          "tags": [],
          "name": "text",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 118
          },
          "is_method": true,
          "signature": "AppContext:html(body: string, status: number?, headers: Headers?) → ()",
          "desc": "",
          "tags": [],
          "name": "html",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 119
          },
          "is_method": true,
          "signature": "AppContext:jsonResponse(data: any, status: number?, headers: Headers?) → ()",
          "desc": "",
          "tags": [],
          "name": "jsonResponse",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "any",
              "name": "data",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 120
          },
          "is_method": true,
          "signature": "AppContext:redirect(location: string, status: number?, headers: Headers?) → ()",
          "desc": "",
          "tags": [],
          "name": "redirect",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "location",
              "desc": ""
            },
            {
              "lua_type": "number?",
              "name": "status",
              "desc": ""
            },
            {
              "lua_type": "Headers?",
              "name": "headers",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 122
          },
          "is_method": true,
          "signature": "AppContext:setCookie(name: string, value: string, options: CookieOptions?) → ()",
          "desc": "Appends a `Set-Cookie` response header.",
          "tags": [],
          "name": "setCookie",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "string",
              "name": "value",
              "desc": ""
            },
            {
              "lua_type": "CookieOptions?",
              "name": "options",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 124
          },
          "is_method": true,
          "signature": "AppContext:clearCookie(name: string, options: CookieOptions?) → ()",
          "desc": "Clears a cookie with an expired `Set-Cookie` response header.",
          "tags": [],
          "name": "clearCookie",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "CookieOptions?",
              "name": "options",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 126
          },
          "is_method": true,
          "signature": "AppContext:sendFile(path: string, options: SendFileOptions?) → ()",
          "desc": "Streams a file as the response body.",
          "tags": [],
          "name": "sendFile",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": ""
            },
            {
              "lua_type": "SendFileOptions?",
              "name": "options",
              "desc": ""
            }
          ]
        }
      ],
      "metamethods": [],
      "types": []
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 148
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "_routes: { Route }",
          "name": "_routes",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "_mounts: { Mount }",
          "name": "_mounts",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "_middleware: { Middleware }",
          "name": "_middleware",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "_statusHandlers: { RouteHandler }",
          "name": "_statusHandlers",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "_exceptionHandler: ExceptionHandler?",
          "name": "_exceptionHandler",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "_serverOptions: HttpServer.HttpServerOptions?",
          "name": "_serverOptions",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "_server: HttpServer.HttpServer?",
          "name": "_server",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "state: { [string]: any }",
          "name": "state",
          "desc": ""
        }
      ],
      "desc": "",
      "name": "App",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 766
          },
          "is_method": false,
          "signature": "App.new(options: HttpServer.HttpServerOptions?) → App",
          "owner": "App",
          "desc": "A higher-level HTTP app/router layer built on top of [[HttpServer]].\n\nUse [[App.get]], [[App.post]], middleware, groups, and mounts to build\nFlask/FastAPI-style request routing without dropping to the low-level\nrequest-handler callback for every endpoint.\n",
          "tags": [],
          "name": "new",
          "return_str": "App",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "App",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "HttpServer.HttpServerOptions?",
              "name": "options",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 788
          },
          "is_method": true,
          "signature": "App:route(\n    method: string,  -- HTTP method such as `\"GET\"` or `\"POST\"`.\n    path: string,  -- Route pattern beginning with `/`. Supports `:param` and trailing `*splat`.\n    handler: RouteHandler,  -- Request handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata such as a route name or route-local middleware.\n) → (\n    App  -- Self, for chaining. \n)",
          "owner": "App",
          "desc": "Registers a route handler for a method/path pair.\n",
          "tags": [],
          "name": "route",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "Self, for chaining. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "method",
              "desc": "HTTP method such as `\"GET\"` or `\"POST\"`."
            },
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`. Supports `:param` and trailing `*splat`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Request handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata such as a route name or route-local middleware."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 805
          },
          "is_method": true,
          "signature": "App:use(\n    middleware: Middleware  -- Middleware callback receiving `(ctx, next)`.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers middleware that wraps every route and mounted child app.",
          "tags": [],
          "name": "use",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "Middleware",
              "name": "middleware",
              "desc": "Middleware callback receiving `(ctx, next)`."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 813
          },
          "is_method": true,
          "signature": "App:useSessions(\n    options: any?  -- Session middleware options.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers server-side session middleware and exposes `ctx.session`.",
          "tags": [],
          "name": "useSessions",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "any?",
              "name": "options",
              "desc": "Session middleware options."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 822
          },
          "is_method": true,
          "signature": "App:error(\n    status: number,  -- HTTP status code to intercept.\n    handler: RouteHandler  -- Handler that returns the replacement response.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a handler for framework-generated status responses such as `404` or `405`.",
          "tags": [],
          "name": "error",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "number",
              "name": "status",
              "desc": "HTTP status code to intercept."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler that returns the replacement response."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 830
          },
          "is_method": true,
          "signature": "App:onError(\n    handler: ExceptionHandler  -- Recovery handler receiving `(ctx, err)`.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a catch-all exception handler for uncaught route or middleware errors.",
          "tags": [],
          "name": "onError",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "ExceptionHandler",
              "name": "handler",
              "desc": "Recovery handler receiving `(ctx, err)`."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 845
          },
          "is_method": true,
          "signature": "App:mount(\n    prefix: string,  -- URL prefix such as `\"/api\"`.\n    child: App  -- Child app/router to mount.\n) → (\n      -- App \n)",
          "owner": "App",
          "desc": "Mounts another app or router under a URL prefix.\n\nParent middleware runs before child middleware, and child routes see\n`ctx.mountPath` / `ctx.pathWithinMount`.\n",
          "tags": [],
          "name": "mount",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "prefix",
              "desc": "URL prefix such as `\"/api\"`."
            },
            {
              "lua_type": "App",
              "name": "child",
              "desc": "Child app/router to mount."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 860
          },
          "is_method": true,
          "signature": "App:group(\n    prefix: string,  -- URL prefix such as `\"/api\"`.\n    configure: (((group: App) → ()))?  -- Optional callback invoked with the new child router.\n) → (\n    App  -- The new child router. \n)",
          "owner": "App",
          "desc": "Creates and mounts a child router under a prefix, then optionally configures it.\n",
          "tags": [],
          "name": "group",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "The new child router. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "prefix",
              "desc": "URL prefix such as `\"/api\"`."
            },
            {
              "lua_type": "(((group: App) → ()))?",
              "name": "configure",
              "desc": "Optional callback invoked with the new child router."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 877
          },
          "is_method": true,
          "signature": "App:urlFor(\n    name: string,  -- Route name registered through `options.name`.\n    params: { [string]: any }?,  -- Optional path parameters to substitute into the route.\n    query: { [string]: string | number | boolean | { string | number | boolean } }?  -- Optional query-string parameters to append.\n) → (\n    string  -- The generated relative URL. \n)",
          "owner": "App",
          "desc": "Builds a URL for a named route.\n",
          "tags": [],
          "name": "urlFor",
          "return_str": "string",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string",
              "desc": "The generated relative URL. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": "Route name registered through `options.name`."
            },
            {
              "lua_type": "{ [string]: any }?",
              "name": "params",
              "desc": "Optional path parameters to substitute into the route."
            },
            {
              "lua_type": "{ [string]: string | number | boolean | { string | number | boolean } }?",
              "name": "query",
              "desc": "Optional query-string parameters to append."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 904
          },
          "is_method": true,
          "signature": "App:static(\n    prefix: string,  -- URL prefix such as `\"/assets\"`.\n    directory: string,  -- Filesystem directory to expose.\n    options: StaticOptions?  -- Static file options.\n) → (\n      -- App \n)",
          "owner": "App",
          "desc": "Mounts a static directory under a URL prefix.\n\nFiles are served for `GET`/`HEAD` requests only. Requests that attempt\npath traversal are rejected. When `fallthrough` is true, missing files\ncontinue to later routes instead of immediately returning `404`.\n",
          "tags": [],
          "name": "static",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "prefix",
              "desc": "URL prefix such as `\"/assets\"`."
            },
            {
              "lua_type": "string",
              "name": "directory",
              "desc": "Filesystem directory to expose."
            },
            {
              "lua_type": "StaticOptions?",
              "name": "options",
              "desc": "Static file options."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 976
          },
          "is_method": true,
          "signature": "App:get(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: RouteHandler,  -- Handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a `GET` route.",
          "tags": [],
          "name": "get",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 985
          },
          "is_method": true,
          "signature": "App:post(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: RouteHandler,  -- Handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a `POST` route.",
          "tags": [],
          "name": "post",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 994
          },
          "is_method": true,
          "signature": "App:put(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: RouteHandler,  -- Handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a `PUT` route.",
          "tags": [],
          "name": "put",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1003
          },
          "is_method": true,
          "signature": "App:delete(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: RouteHandler,  -- Handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a `DELETE` route.",
          "tags": [],
          "name": "delete",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1012
          },
          "is_method": true,
          "signature": "App:patch(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: RouteHandler,  -- Handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a `PATCH` route.",
          "tags": [],
          "name": "patch",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1021
          },
          "is_method": true,
          "signature": "App:head(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: RouteHandler,  -- Handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a `HEAD` route.",
          "tags": [],
          "name": "head",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1030
          },
          "is_method": true,
          "signature": "App:options(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: RouteHandler,  -- Handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers an `OPTIONS` route.",
          "tags": [],
          "name": "options",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1039
          },
          "is_method": true,
          "signature": "App:any(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: RouteHandler,  -- Handler for matching requests.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App\n)",
          "owner": "App",
          "desc": "Registers a route that matches any method.",
          "tags": [],
          "name": "any",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App"
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "RouteHandler",
              "name": "handler",
              "desc": "Handler for matching requests."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1051
          },
          "is_method": true,
          "signature": "App:websocket(\n    path: string,  -- Route pattern beginning with `/`.\n    handler: WebSocketHandler,  -- Handler receiving `(ctx, ws)` after a successful upgrade.\n    options: RouteOptions?  -- Optional route metadata.\n) → (\n      -- App \n)",
          "owner": "App",
          "desc": "Registers a WebSocket endpoint.\n",
          "tags": [],
          "name": "websocket",
          "return_str": "App",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "App",
              "desc": "App "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "path",
              "desc": "Route pattern beginning with `/`."
            },
            {
              "lua_type": "WebSocketHandler",
              "name": "handler",
              "desc": "Handler receiving `(ctx, ws)` after a successful upgrade."
            },
            {
              "lua_type": "RouteOptions?",
              "name": "options",
              "desc": "Optional route metadata."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1067
          },
          "is_method": true,
          "signature": "App:_match(requestMethod: string, pathname: string) → MatchResult",
          "owner": "App",
          "desc": "",
          "tags": [],
          "name": "_match",
          "return_str": "MatchResult",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "MatchResult",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "requestMethod",
              "desc": ""
            },
            {
              "lua_type": "string",
              "name": "pathname",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1098
          },
          "is_method": true,
          "signature": "App:_execute(request: HttpServer.ServerRequest, response: ServerResponse.ServerResponse, pathname: string, sharedState: { [string]: any }, mountPath: string?) → (AppContext, { any })",
          "owner": "App",
          "desc": "",
          "tags": [],
          "name": "_execute",
          "return_str": "(AppContext, { any })",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "AppContext",
              "desc": ""
            },
            {
              "lua_type": "{ any }",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "HttpServer.ServerRequest",
              "name": "request",
              "desc": ""
            },
            {
              "lua_type": "ServerResponse.ServerResponse",
              "name": "response",
              "desc": ""
            },
            {
              "lua_type": "string",
              "name": "pathname",
              "desc": ""
            },
            {
              "lua_type": "{ [string]: any }",
              "name": "sharedState",
              "desc": ""
            },
            {
              "lua_type": "string?",
              "name": "mountPath",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1222
          },
          "is_method": true,
          "signature": "App:_handle(request: HttpServer.ServerRequest, response: ServerResponse.ServerResponse) → ()",
          "owner": "App",
          "desc": "",
          "tags": [],
          "name": "_handle",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "HttpServer.ServerRequest",
              "name": "request",
              "desc": ""
            },
            {
              "lua_type": "ServerResponse.ServerResponse",
              "name": "response",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1229
          },
          "is_method": true,
          "signature": "App:handler() → (\n      -- (HttpServer.ServerRequest, ServerResponse.ServerResponse) -> ()\n)",
          "owner": "App",
          "desc": "Returns a low-level `HttpServer`-compatible handler for this app.",
          "tags": [],
          "name": "handler",
          "return_str": "((HttpServer.ServerRequest, ServerResponse.ServerResponse) → ())",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "((HttpServer.ServerRequest, ServerResponse.ServerResponse) → ())",
              "desc": "(HttpServer.ServerRequest, ServerResponse.ServerResponse) -> ()"
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 1255
          },
          "is_method": true,
          "signature": "App:createServer(\n    options: HttpServer.HttpServerOptions?  -- Optional server options overriding app defaults.\n) → (\n      -- HttpServer\n)",
          "owner": "App",
          "desc": "Creates a low-level [[HttpServer]] that dispatches through this app.",
          "tags": [],
          "name": "createServer",
          "return_str": "HttpServer.HttpServer",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "HttpServer.HttpServer",
              "desc": "HttpServer"
            }
          ],
          "params": [
            {
              "lua_type": "HttpServer.HttpServerOptions?",
              "name": "options",
              "desc": "Optional server options overriding app defaults."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1268
          },
          "is_method": true,
          "signature": "App:listen(\n    callback: (((host: string, port: number) → ()))?,  -- Optional listener-ready callback receiving `(host, port)`.\n    options: HttpServer.HttpServerOptions?  -- Optional server options overriding app defaults. \n) → ()",
          "owner": "App",
          "desc": "Starts listening with this app's handler.\n\nThis is a convenience wrapper around [[App.createServer]] followed by\n[[HttpServer.listen]].\n",
          "tags": [],
          "name": "listen",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "(((host: string, port: number) → ()))?",
              "name": "callback",
              "desc": "Optional listener-ready callback receiving `(host, port)`."
            },
            {
              "lua_type": "HttpServer.HttpServerOptions?",
              "name": "options",
              "desc": "Optional server options overriding app defaults. "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 1284
          },
          "is_method": true,
          "signature": "App:close() → ()",
          "owner": "App",
          "desc": "Closes the underlying server if this app is currently listening.",
          "tags": [],
          "name": "close",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}