import { t as ActionContext } from "./context-Ewez0LPe.js"; import { t as OriginPolicy } from "./origin-policy-CMI9U-77.js"; //#region src/api.d.ts export declare const API_PREFIX = "/api/"; export declare const OPENAPI_MEDIA_TYPE = "application/json"; export declare function isJsonContentType(header: string | null): boolean; export declare function apiActionPath(id: string): string; export declare function isRoutableActionId(id: string): boolean; export declare function apiActionId(pathname: string): string | null; export type ApiErrorCode = "method_not_allowed" | "not_found" | "unsupported_media_type" | "invalid_json" | "invalid_input" | "unauthorized" | "forbidden" | "execution_error"; export declare function apiHandler(request: Request, id: string, ctx?: ActionContext, policy?: OriginPolicy): Promise; export declare function apiForbidden(request: Request, reason: string): Response; export declare function isApiNamespace(pathname: string): boolean; export declare function apiNamespaceResponse(request: Request, origin: string): Response; export declare function apiIndex(origin: string): { openapi: string; actions: { id: string; method: string; path: string; description: string; }[]; errors: { shape: { error: { code: string; message: string; hint: string; }; }; codes: ApiErrorCode[]; }; }; export declare function openApiDocument(origin: string, site?: { name?: string; description?: string; }): Record; //#endregion