import type { BaseServiceConstructor } from "../services/BaseServiceConstructor.js"; import type { GravityResponse } from "./GravityResponse.js"; import type { Type } from "typezer"; import type { Authorize } from "./Authorize.js"; import type { OnRequestReceive } from "./OnRequestReceive.js"; import type { IncomingHttpHeaders } from "http"; import type { OnResponseSend } from "./OnResponseSend.js"; import type { SetContentType } from "./SetContentType.js"; export type ResolveApiRequestOptions = { request: Request; method: string | undefined; url: string; services: Record; /** * The schema used to validate the request arguments. * Set it to "schemaless" to disable the schema validation. */ schema?: Record>; headers: IncomingHttpHeaders; rawBody: Uint8Array | null | undefined; allowedOrigins: string[] | undefined; allowedHeaders: string[] | undefined; allowedMethods: string[] | undefined; exposedHeaders: string[] | undefined; maxAge: number | undefined; allowedCredentials: boolean | undefined; authorize: Authorize | undefined; onRequestReceive: OnRequestReceive | undefined; setContentType?: SetContentType | undefined; onResponseSend: OnResponseSend | undefined; createResponse: (options: GravityResponse) => Response; writeResponse?: (response: Response, body: Uint8Array | string) => void; }; export declare function resolveApiRequest(options: ResolveApiRequestOptions): Promise;