Constructor
Properties
app: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProviderDefault>
The Fastify application instance.
queryLabelsHandler: QueryHandler<ComAtprotoLabelQueryLabels.Params>
Handler for com.atproto.label.queryLabels.
subscribeLabelsHandler: SubscriptionHandler<{ cursor?: string; }>
Handler for com.atproto.label.subscribeLabels.
emitEventHandler: ProcedureHandler<ToolsOzoneModerationEmitEvent.Input>
Handler for tools.ozone.moderation.emitEvent.
healthHandler: QueryHandler
Handler for the health check endpoint.
unknownMethodHandler: QueryHandler
Catch-all handler for unknown XRPC methods.
errorHandler: (error: FastifyError request: FastifyRequest<RouteGenericInterface, RawServerDefault, IncomingMessage, FastifySchema, FastifyTypeProviderDefault, unknown, FastifyBaseLogger, ResolveFastifyRequestType<FastifyTypeProviderDefault, FastifySchema, RouteGenericInterface>> reply: FastifyReply<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, RouteGenericInterface, unknown, FastifySchema, FastifyTypeProviderDefault, unknown>) => void
Default error handler.
Methods
__type(error, request, reply)
Parameters
error: FastifyError
request: FastifyRequest<RouteGenericInterface, RawServerDefault, IncomingMessage, FastifySchema, FastifyTypeProviderDefault, unknown, FastifyBaseLogger, ResolveFastifyRequestType<FastifyTypeProviderDefault, FastifySchema, RouteGenericInterface>>
reply: FastifyReply<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, RouteGenericInterface, unknown, FastifySchema, FastifyTypeProviderDefault, unknown>
Overload 1/2
close(callback?)
Stop the server.
Parameters
callback: () => void = ...
A callback to run when the server is stopped.
stop(callback?)
Alias for LabelerServer#close.
Parameters
callback: () => void = ...
A callback to run when the server is stopped.
createLabel(label)
Create and insert a label into the database, emitting it to subscribers.
Parameters
label: CreateLabelData
The label to create.