basalt / http/src / RouteVisibilityCheck
Type Alias: RouteVisibilityCheck
> RouteVisibilityCheck = (input) => boolean | undefined | void | Promise<boolean | undefined | void>
Defined in: http/src/route-visibility.ts:25
Answers "could this caller possibly pass my guard on this route?" without enforcing anything. Return false to hide the route; true or undefined means "no objection" (including routes the check does not care about).
The contract is what makes it safe to run on every listing, unlike a guard: a check MUST be free of side effects — no rate-limit consumption, no audit or denial records, no hooks, no writes. Plain reads (a membership lookup) are fine. Visibility is never authorization: the route's guards still run on every actual call, so a check that says "visible" too eagerly only reveals a name, never grants access.
Parameters
input
container
context
Record<string, unknown>
The caller's request context (ctx() of the listing request): user, tenant, …
route
Returns
boolean | undefined | void | Promise<boolean | undefined | void>