import { ObjectEntries, ObjectSchema } from "valibot"; import { Links, RoutesConfig } from "../types"; /** * Creates a type-safe link builder object for the given routes configuration. * * @remarks * This function generates a nested object structure that mirrors the routes configuration. * Each leaf node in the structure is a function that accepts the necessary parameters * (path parameters and search parameters) and returns a fully formed URL string. * * @typeParam C - The routes configuration type. * @param config - The routes configuration object. * @param prefix - An optional path prefix to prepend to all generated links. * @returns An object containing link builder functions for each defined route. * * @example * ```ts * const links = createLinks(routesConfig); * const userUrl = links.users.detail({ params: [123] }); // "/users/123" * ``` */ export declare function createLinks(config: C, prefix?: string): Links; /** * Converts an object to URLSearchParams based on a Valibot schema. * * @remarks * This function validates the input object against the schema and then serializes * it into URLSearchParams. It handles arrays and nested objects (via JSON stringification). * * @typeParam Entries - The schema entries type. * @param searchParams - The existing URLSearchParams to append to. * @param objSchema - The Valibot object schema. * @param obj - The data object to convert. * @returns The updated URLSearchParams object. */ export declare function objectSchemaToSearchParams(searchParams: URLSearchParams, objSchema: ObjectSchema, obj: Record): URLSearchParams;