import { type AdminAdapter, type AdminServerTarget, type AdminWorkspaceId } from './admin-adapter'; import type { DirectoryAdapter } from './directory'; import { type HostedRuntimeConfigWindow } from './runtime-config'; interface ResponseLike { ok: boolean; status: number; json(): Promise; } type FetchLike = (input: string, init?: RequestInit) => Promise; export interface ServerAdapterDeps { target: AdminServerTarget; fetch?: FetchLike; initialWorkspace?: AdminWorkspaceId; } export interface ServerRuntimeAdapter extends AdminAdapter { directory: DirectoryAdapter; } export interface UiRuntimeAdapterDeps { config?: HostedRuntimeConfigWindow | null; fetch?: FetchLike; initialWorkspace?: AdminWorkspaceId; listDirectoryRecords?: () => Promise>>; } export interface UiRuntimeAdapter extends AdminAdapter { directory: DirectoryAdapter; } export interface HostedDirectoryWindow { __SDN_DIRECTORY__?: { records?: Array>; listDirectoryRecords?: () => Array> | Promise>>; }; } export interface SharedUiRuntimeAdapterDeps { source?: (HostedRuntimeConfigWindow & HostedDirectoryWindow) | null; fetch?: FetchLike; initialWorkspace?: AdminWorkspaceId; } export declare function createServerAdapter(deps: ServerAdapterDeps): ServerRuntimeAdapter; export declare const createServerAdminAdapter: typeof createServerAdapter; export declare function createUiRuntimeAdapter(deps?: UiRuntimeAdapterDeps): UiRuntimeAdapter; export declare function getSharedUiRuntimeAdapter(deps?: SharedUiRuntimeAdapterDeps): UiRuntimeAdapter; export declare function resetSharedUiRuntimeAdapterForTests(): void; export {}; //# sourceMappingURL=server-adapter.d.ts.map