import type { ArrayFormat, ParamsSerializer } from "./types.mjs"; /** * Resolve a request input against an optional baseURL using the WHATWG URL * parser. Never string-concats — that's the SSRF-prone path used by ofetch. * * `allowAbsoluteUrls` (default true) controls whether an absolute URL in * `input` overrides `baseURL`. Set to false when the caller must be * confined to baseURL's origin. * * `allowedProtocols` (default `['http','https']`) gates which URL schemes * are permitted. Embedded runtimes (Capacitor, Tauri) can opt in to their * custom schemes by extending the list. */ export type TrailingSlashPolicy = "preserve" | "strip" | "forbid"; export declare function resolveUrl(input: string, baseURL: string | undefined, allowAbsoluteUrls?: boolean, allowedProtocols?: readonly string[], trailingSlash?: TrailingSlashPolicy): string; /** * Append/merge a query record onto a URL string. * * - `undefined`/`null` values are skipped silently. * - Arrays are serialized per `arrayFormat`: * - `'repeat'` (default): `?a=1&a=2` * - `'brackets'`: `?a[]=1&a[]=2` * - `'comma'`: `?a=1,2` * - `'indices'`: `?a[0]=1&a[1]=2` * - `URLSearchParams` and `string` query values are merged as-is. * - Custom `paramsSerializer` overrides the entire mechanism. */ export declare function appendQuery(url: string, query: Record | URLSearchParams | string | undefined, arrayFormat?: ArrayFormat, paramsSerializer?: ParamsSerializer): string;