import type { GetPlatformProxyOptions } from "wrangler"; import type { DOQueueHandler } from "./durable-objects/queue"; import { DOShardedTagCache } from "./durable-objects/sharded-tag-cache"; declare global { interface CloudflareEnv { ASSETS?: Fetcher; NEXTJS_ENV?: string; WORKER_SELF_REFERENCE?: Service; NEXT_INC_CACHE_KV?: KVNamespace; NEXT_INC_CACHE_R2_BUCKET?: R2Bucket; NEXT_INC_CACHE_R2_PREFIX?: string; NEXT_TAG_CACHE_D1?: D1Database; NEXT_TAG_CACHE_DO_SHARDED?: DurableObjectNamespace; NEXT_TAG_CACHE_DO_SHARDED_DLQ?: Queue; NEXT_CACHE_DO_QUEUE?: DurableObjectNamespace; NEXT_CACHE_DO_QUEUE_MAX_REVALIDATION?: string; NEXT_CACHE_DO_QUEUE_REVALIDATION_TIMEOUT_MS?: string; NEXT_CACHE_DO_QUEUE_RETRY_INTERVAL_MS?: string; NEXT_CACHE_DO_QUEUE_MAX_RETRIES?: string; NEXT_CACHE_DO_QUEUE_DISABLE_SQLITE?: string; } } export type CloudflareContext = IncomingRequestCfProperties, Context = ExecutionContext> = { /** * the worker's [bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/) */ env: CloudflareEnv; /** * the request's [cf properties](https://developers.cloudflare.com/workers/runtime-apis/request/#the-cf-property-requestinitcfproperties) */ cf: CfProperties | undefined; /** * the current [execution context](https://developers.cloudflare.com/workers/runtime-apis/context) */ ctx: Context; }; /** * Utility to get the current Cloudflare context * * @returns the cloudflare context */ export declare function getCloudflareContext = IncomingRequestCfProperties, Context = ExecutionContext>(options: { async: true; }): Promise>; export declare function getCloudflareContext = IncomingRequestCfProperties, Context = ExecutionContext>(options?: { async: false; }): CloudflareContext; /** * Performs some initial setup to integrate as best as possible the local Next.js dev server (run via `next dev`) * with the open-next Cloudflare adapter * * Note: this function should only be called inside the Next.js config file, and although async it doesn't need to be `await`ed * @param options options on how the function should operate and if/where to persist the platform data */ export declare function initOpenNextCloudflareForDev(options?: GetPlatformProxyOptions): Promise;