declare const FARM_DEPLOYMENT_ID_HEADER = "x-farm-deployment-id"; declare const FARM_DEPLOYMENT_MISMATCH_HEADER = "x-farm-deployment-mismatch"; declare const FARM_DEPLOYMENT_COOKIE = "__farm_deployment"; declare const FARM_DEPLOYMENT_MISMATCH_CODE = "FARM_DEPLOYMENT_MISMATCH"; declare const FARM_DEPLOYMENT_MISMATCH_STATUS = 409; type FarmPresetRuntime = "node" | "edge" | "unknown"; declare function getFarmPresetRuntime(preset: string): FarmPresetRuntime; interface FarmDeploymentMismatch { clientDeploymentId: string; serverDeploymentId: string; } interface FarmDeploymentResponseOptions { setCookie?: boolean; cookiePath?: string; secureCookie?: boolean; } declare class FarmDeploymentMismatchError extends Error { readonly clientDeploymentId: string; readonly serverDeploymentId: string; readonly name = "FarmDeploymentMismatchError"; readonly code = "FARM_DEPLOYMENT_MISMATCH"; readonly retryable = false; constructor(clientDeploymentId: string, serverDeploymentId: string); } declare function normalizeFarmDeploymentId(value: unknown): string; declare function createFarmDeploymentRequestHeaders(deploymentId: string | undefined, init?: HeadersInit): Headers; declare function getFarmRequestDeploymentId(request: Pick): string | undefined; declare function getFarmDeploymentMismatch(request: Pick, serverDeploymentId: string | undefined): FarmDeploymentMismatch | null; declare function createFarmDeploymentMismatchResponse(mismatch: FarmDeploymentMismatch): Response; declare function withFarmDeploymentResponse(response: Response, deploymentId: string | undefined, options?: FarmDeploymentResponseOptions): Response; declare function getFarmResponseDeploymentId(response: Pick): string | undefined; declare function isFarmDeploymentMismatchResponse(response: Pick, clientDeploymentId: string | undefined): boolean; declare function createFarmDeploymentMismatchError(response: Pick, clientDeploymentId: string): FarmDeploymentMismatchError; declare function createFarmDeploymentCookie(deploymentId: string, path?: string, secure?: boolean): string; export { FARM_DEPLOYMENT_COOKIE, FARM_DEPLOYMENT_ID_HEADER, FARM_DEPLOYMENT_MISMATCH_CODE, FARM_DEPLOYMENT_MISMATCH_HEADER, FARM_DEPLOYMENT_MISMATCH_STATUS, type FarmDeploymentMismatch, FarmDeploymentMismatchError, type FarmDeploymentResponseOptions, type FarmPresetRuntime, createFarmDeploymentCookie, createFarmDeploymentMismatchError, createFarmDeploymentMismatchResponse, createFarmDeploymentRequestHeaders, getFarmDeploymentMismatch, getFarmPresetRuntime, getFarmRequestDeploymentId, getFarmResponseDeploymentId, isFarmDeploymentMismatchResponse, normalizeFarmDeploymentId, withFarmDeploymentResponse };