Checks the JSON bodies that the federation routes (routes/federation.ts,
routes/oauth.ts) receive before they read them. They check the shapes
only: whether an instance answers, or a code or an invite works, is the
services' check.
f
isFederationLoginRequest(obj: unknown): obj is FederationLoginRequest
Checks whether obj is a FederationLoginRequest.
f
isFederationSessionRequest(obj: unknown): obj is FederationSessionRequest
Checks whether obj is a FederationSessionRequest.
f
isSetPeerRequest(obj: unknown): obj is SetPeerRequest
Checks whether obj is a SetPeerRequest.
Usage
import * as mod from "api/validators/federation.ts";