/** * 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 app: AppNS xyz: XyzNS com: ComNS constructor(options?: XrpcOptions) { this.xrpc = createXrpcServer(schemas, options) this.app = new AppNS(this) this.xyz = new XyzNS(this) this.com = new ComNS(this) } } export class AppNS { _server: Server bsky: AppBskyNS constructor(server: Server) { this._server = server this.bsky = new AppBskyNS(server) } } export class AppBskyNS { _server: Server actor: AppBskyActorNS constructor(server: Server) { this._server = server this.actor = new AppBskyActorNS(server) } } export class AppBskyActorNS { _server: Server constructor(server: Server) { this._server = server } } export class XyzNS { _server: Server statusphere: XyzStatusphereNS constructor(server: Server) { this._server = server this.statusphere = new XyzStatusphereNS(server) } } export class XyzStatusphereNS { _server: Server constructor(server: Server) { this._server = server } } export class ComNS { _server: Server atproto: ComAtprotoNS constructor(server: Server) { this._server = server this.atproto = new ComAtprotoNS(server) } } export class ComAtprotoNS { _server: Server repo: ComAtprotoRepoNS constructor(server: Server) { this._server = server this.repo = new ComAtprotoRepoNS(server) } } export class ComAtprotoRepoNS { _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 } >