import type { IncomingMessage, ServerResponse } from 'node:http'; import { type Express, type RequestHandler, Router } from 'express'; import { l } from '@atproto/lex-schema'; import { type LexXrpcProcedure, type LexXrpcQuery, type LexXrpcSubscription, type LexiconDoc, Lexicons } from '@atproto/lexicon'; import { HttpRateLimiter } from './rate-limiter-http.js'; import { type RateLimiterI } from './rate-limiter.js'; import { XrpcStreamServer } from './stream/index.js'; import { type Auth, type AuthResult, type CatchallHandler, type HandlerContext, type Input, type LexMethodConfig, type LexMethodHandler, type LexSubscriptionConfig, type LexSubscriptionHandler, type MethodAuthContext, type MethodConfig, type MethodConfigOrHandler, type MethodHandler, type Options, type Output, type Params, type StreamAuthContext, type StreamConfig, type StreamConfigOrHandler, type StreamContext } from './types.js'; import { type AuthVerifierInternal, type InputVerifierInternal, type OutputVerifierInternal, type ParamsVerifierInternal } from './util.js'; export declare function createServer(lexicons?: LexiconDoc[], options?: Options): Server; export declare class Server { router: Express; routes: Router; subscriptions: Map; lex: Lexicons; options: Options; globalRateLimiter?: HttpRateLimiter; sharedRateLimiters?: Map>; constructor(lexicons?: LexiconDoc[], opts?: Options); listen(port: number, callback?: () => void): import("http").Server; add(ns: l.Main, config: M extends l.Procedure | l.Query ? LexMethodConfig & { auth: Exclude; } : M extends l.Subscription ? LexSubscriptionConfig & { auth: Exclude; } : never): void; add(ns: l.Main, config: M extends l.Procedure | l.Query ? LexMethodConfig | LexMethodHandler : M extends l.Subscription ? LexSubscriptionConfig | LexSubscriptionHandler : never): void; protected addProcedureSchema(schema: M, config: LexMethodConfig): void; protected addQuerySchema(schema: M, config: LexMethodConfig): void; protected addSubscriptionSchema(schema: M, config: LexSubscriptionConfig): void; method(nsid: string, configOrFn: MethodConfigOrHandler): void; addMethod(nsid: string, configOrFn: MethodConfigOrHandler): void; streamMethod(nsid: string, configOrFn: StreamConfigOrHandler): void; addStreamMethod(nsid: string, configOrFn: StreamConfigOrHandler): void; addLexicon(doc: LexiconDoc): void; addLexicons(docs: LexiconDoc[]): void; protected addRoute(nsid: string, def: LexXrpcQuery | LexXrpcProcedure, config: MethodConfig): Promise; catchall: CatchallHandler; createHandler(nsid: string, def: LexXrpcQuery | LexXrpcProcedure, cfg: MethodConfig): RequestHandler; protected createHandlerInternal(authVerifier: AuthVerifierInternal, A> | null, paramsVerifier: ParamsVerifierInternal

, inputVerifier: InputVerifierInternal, routeLimiter: HttpRateLimiter> | undefined, handler: MethodHandler, validateResOutput: null | OutputVerifierInternal): RequestHandler; protected addSubscription(nsid: string, def: LexXrpcSubscription, cfg: StreamConfig): Promise; protected addSubscriptionInternal(nsid: string, paramsVerifier: ParamsVerifierInternal

, authVerifier: AuthVerifierInternal, A> | null, handler: (ctx: StreamContext) => AsyncIterable): void; private createAuthVerifier; private createLexiconParamsVerifier; private createLexiconInputVerifier; private createLexiconOutputVerifier; private createSchemaParamsVerifier; private createSchemaInputVerifier; private createSchemaOutputVerifier; private enableStreamingOnListen; private createRouteRateLimiter; } //# sourceMappingURL=server.d.ts.map