import { getLoggerFor } from 'global-logger-factory'; import type { ApiServer } from '../ApiServer'; import type { PodLookupRepository } from '../../identity/drizzle/PodLookupRepository'; import type { UsageRepository } from '../../storage/quota/UsageRepository'; import type { InternalPodAccessTokenProvider } from '../ai-gateway/pod/HostedPodDataAccess'; export interface PodSettingsStatus { identity: { webId: string; podUrl?: string; }; storage: PodStorageStatus; aiConnection: PodAiConnectionsStatus; generatedAt: string; } export type PodStorageStatus = { status: 'available'; usage: { storageBytes: number; ingressBytes: number; egressBytes: number; computeSeconds: number; tokensUsed: number; }; limits: { storageLimitBytes: number | null; bandwidthLimitBps: number | null; computeLimitSeconds: number | null; tokenLimitMonthly: number | null; }; source: 'identity_usage'; } | { status: 'unsupported' | 'error'; reason: string; }; export type PodAiConnectionsStatus = { status: 'available'; containerUrl?: string; configuredProviders: number; lastSyncAt?: string; source: 'drizzle-solid'; } | { status: 'unsupported' | 'error'; reason: string; }; export interface PodAiConnectionsStatusReader { read(input: { webId: string; podUrl?: string; }): Promise; } export interface PodSettingsHandlerOptions { podLookupRepository: Pick; usageRepo: Pick; aiConnectionStatusReader?: PodAiConnectionsStatusReader; now?: () => Date; logger?: Pick, 'warn' | 'error'>; } export declare function registerPodSettingsRoutes(server: ApiServer, options: PodSettingsHandlerOptions): void; export declare class DrizzlePodAiConnectionsStatusReader implements PodAiConnectionsStatusReader { private readonly internalPodAccess?; private readonly deployment; private readonly dbFactory; constructor(internalPodAccess?: InternalPodAccessTokenProvider | undefined, deployment?: string, dbFactory?: (input: { webId: string; podUrl: string; fetch: typeof fetch; }) => Promise); read({ webId, podUrl }: { webId: string; podUrl?: string; }): Promise; } type AiConnectionsStatusDb = { init?: (...resources: unknown[]) => Promise; findById(resource: unknown, id: string): Promise; }; export {};