/** * GENERATED CODE - DO NOT MODIFY */ import { createServer as createXrpcServer, Server as XrpcServer, Options as XrpcOptions, AuthVerifier, StreamAuthVerifier, } from '@atproto/xrpc-server' import { schemas } from './lexicons' export function createServer(options?: XrpcOptions): Server { return new Server(options) } export class Server { xrpc: XrpcServer com: ComNS constructor(options?: XrpcOptions) { this.xrpc = createXrpcServer(schemas, options) this.com = new ComNS(this) } } export class ComNS { _server: Server example: ComExampleNS constructor(server: Server) { this._server = server this.example = new ComExampleNS(server) } } export class ComExampleNS { _server: Server constructor(server: Server) { this._server = server } } type SharedRateLimitOpts = { name: string calcKey?: (ctx: T) => string calcPoints?: (ctx: T) => number } type RouteRateLimitOpts = { durationMs: number points: number calcKey?: (ctx: T) => string calcPoints?: (ctx: T) => number } type HandlerOpts = { blobLimit?: number } type HandlerRateLimitOpts = SharedRateLimitOpts | RouteRateLimitOpts type ConfigOf = | Handler | { auth?: Auth opts?: HandlerOpts rateLimit?: HandlerRateLimitOpts | HandlerRateLimitOpts[] handler: Handler } type ExtractAuth = Extract< Awaited>, { credentials: unknown } >