import { b as SerializedServerFnFailure } from './server-fn-error-DDh14a0V.js'; declare const DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT = 1000000; interface FarmServerActionsConfig { /** Additional trusted origins or host patterns, such as https://app.example.com. */ allowedOrigins?: readonly string[]; /** Maximum encoded request body size in bytes or as a size string such as "1mb". */ bodySizeLimit?: number | string; } interface ResolvedFarmServerActionsConfig { allowedOrigins: readonly string[]; bodySizeLimit: number; } type ServerActionRequestKind = "javascript" | "form"; interface PreparedServerActionRequest { body: string | FormData; contentType: string; } type SanitizedServerActionError = { name: "ServerActionError"; message: "Server function failed"; } | SerializedServerFnFailure; type ServerActionRequestErrorCode = "BODY_TOO_LARGE" | "INVALID_ACTION_ID" | "INVALID_BODY" | "INVALID_CONTENT_LENGTH" | "INVALID_METHOD" | "INVALID_ORIGIN" | "MISSING_ORIGIN" | "UNSUPPORTED_CONTENT_TYPE"; declare class ServerActionRequestError extends Error { readonly code: ServerActionRequestErrorCode; readonly status: number; constructor(code: ServerActionRequestErrorCode, status: number, message: string); } type ServerActionExecutionContext = { request: Request; signal: AbortSignal; invalidations: Set; cacheTasks: Set>; }; declare function resolveServerActionsConfig(config: FarmServerActionsConfig | undefined): ResolvedFarmServerActionsConfig; declare function validateServerActionRequest(request: Request, config: ResolvedFarmServerActionsConfig): void; declare function prepareServerActionRequest(request: Request, config: ResolvedFarmServerActionsConfig, kind: ServerActionRequestKind, actionId?: string | null): Promise; declare function createServerActionRequestErrorResponse(error: unknown): Response | null; declare function sanitizeServerActionError(error: unknown): SanitizedServerActionError; declare function runWithServerActionRequest(request: Request, callback: () => T | Promise): Promise; declare function getServerActionExecutionContext(): ServerActionExecutionContext | undefined; declare function getServerActionSignal(): AbortSignal; declare function getServerActionInvalidations(): readonly string[]; export { DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT, type FarmServerActionsConfig, type PreparedServerActionRequest, type ResolvedFarmServerActionsConfig, type SanitizedServerActionError, ServerActionRequestError, type ServerActionRequestKind, createServerActionRequestErrorResponse, getServerActionExecutionContext, getServerActionInvalidations, getServerActionSignal, prepareServerActionRequest, resolveServerActionsConfig, runWithServerActionRequest, sanitizeServerActionError, validateServerActionRequest };