import type * as SimpleWebAuthnServer from '@simplewebauthn/server'; import type { ActivityLog } from './activity-log.js'; import type { AdminPasskeyStore } from './admin-passkey-store.js'; import type { AdminSessionManager } from './admin-session.js'; import type { AdminStore } from './admin-store.js'; import type { AuditLog } from './audit-log.js'; import type { ConnectionManager } from '../connection/connection-manager.js'; import type { Dwn } from '@enbox/dwn-sdk-js'; import type { DwnServerConfig } from '../config.js'; import type { RateLimiter } from '../rate-limiter.js'; import type { RegistrationManager } from '../registration/registration-manager.js'; import type { RegistrationStore } from '../registration/registration-store.js'; import type { WebhookManager } from './webhook-manager.js'; type WebAuthnServerModule = typeof SimpleWebAuthnServer; type WebAuthnServerLoader = () => Promise; /** * Handles all `/admin/api/*` routes. * Requires bearer token authentication on every request. */ export declare class AdminApi { #private; private constructor(); /** * Creates a new `AdminApi` instance. */ static create(options: { config: DwnServerConfig; dwn: Dwn; adminStore?: AdminStore; registrationManager?: RegistrationManager; registrationStore?: RegistrationStore; connectionManager?: ConnectionManager; activityLog?: ActivityLog; auditLog?: AuditLog; ipRateLimiter?: RateLimiter; tenantRateLimiter?: RateLimiter; webhookManager?: WebhookManager; passkeyStore?: AdminPasskeyStore; sessionManager?: AdminSessionManager; webAuthnServerLoader?: WebAuthnServerLoader; packageInfo?: { version?: string; }; }): AdminApi; /** * Sets the connection manager (wired after WsApi is created). */ setConnectionManager(connectionManager: ConnectionManager): void; /** * Routes an admin API request. Called by `HttpApi` for paths starting with `/admin/api/`. * @returns A `Response` to send to the client. */ route(req: Request, url: URL, path: string, method: string): Promise; /** * Public accessor to fire webhook events from other components. */ fireWebhook(event: string, target?: string, data?: Record): void; /** * Starts a periodic timer that updates Prometheus gauge metrics from the * admin store and connection manager. The interval is configured via * `adminMetricsUpdateIntervalSeconds` (default 30s). */ startMetricsUpdater(): void; /** * Stops the periodic metrics updater. */ stopMetricsUpdater(): void; } export {}; //# sourceMappingURL=admin-api.d.ts.map