@fedify/fedify
Version:
An ActivityPub server framework
32 lines • 1.38 kB
TypeScript
import type { NodeInfoDispatcher } from "../federation/callback.js";
import type { RequestContext } from "../federation/context.js";
/**
* Parameters for {@link handleNodeInfo}.
*/
export interface NodeInfoHandlerParameters<TContextData> {
/**
* The request context.
*/
context: RequestContext<TContextData>;
/**
* The callback for dispatching the NodeInfo.
*/
nodeInfoDispatcher: NodeInfoDispatcher<TContextData>;
}
/**
* Handles a NodeInfo request. You would not typically call this function
* directly, but instead use {@link Federation.handle} method.
* @param request The NodeInfo request to handle.
* @param parameters The parameters for handling the request.
* @returns The response to the request.
*/
export declare function handleNodeInfo<TContextData>(_request: Request, { context, nodeInfoDispatcher }: NodeInfoHandlerParameters<TContextData>): Promise<Response>;
/**
* Handles a request to `/.well-known/nodeinfo`. You would not typically call
* this function directly, but instead use {@link Federation.handle} method.
* @param request The request to handle.
* @param context The request context.
* @returns The response to the request.
*/
export declare function handleNodeInfoJrd<TContextData>(_request: Request, context: RequestContext<TContextData>): Promise<Response>;
//# sourceMappingURL=handler.d.ts.map