import type { APIContext, EndpointHandler, Locales, MiddlewareHandler, Params } from '../../@types/astro.js'; import { type Environment, type RenderContext } from '../render/index.js'; import type { RoutingStrategies } from '../config/schema.js'; type CreateAPIContext = { request: Request; params: Params; site?: string; props: Record; adapterName?: string; locales: Locales | undefined; routingStrategy: RoutingStrategies | undefined; defaultLocale: string | undefined; }; /** * Creates a context that holds all the information needed to handle an Astro endpoint. * * @param {CreateAPIContext} payload */ export declare function createAPIContext({ request, params, site, props, adapterName, locales, routingStrategy, defaultLocale, }: CreateAPIContext): APIContext; export declare function callEndpoint(mod: EndpointHandler, env: Environment, ctx: RenderContext, onRequest: MiddlewareHandler | undefined): Promise; export {};