import type { StoreOrVal } from '@tanstack/svelte-query'; import type { EdenTreatyQueryRootHooks } from '../implementation/treaty'; import type { LiteralUnion } from './literal-union'; /** * * An eden-treaty proxy may look like these examples: * * eden.api.products.get({ limit: 5 }) * eden.api.product({ id: 'product-id' }).details.get({ limit: 5 }) * * In the first example, the proxy is called like a function at the very end, so it is trivial * to infer that the arguments are the query parameters for fetch request. * * In the second example, there are two function calls, and we need to heuristically determine whether * it is a function call to insert a path parameter, or the actual end. * * Heuristic: A path parameter function call needs exactly one object with exactly one key passed as an argument. */ export declare function getPathParam(args: unknown[]): { param: any; key: string | undefined; } | undefined; /** * Directly mutate the arguments passed to the root hooks. * * Make sure that the interpretation of args matches up with the implementation of root hooks. */ export declare function mutateArgs(hook: keyof EdenTreatyQueryRootHooks | LiteralUnion | symbol, args: unknown[], params: StoreOrVal>[]): unknown[]; //# sourceMappingURL=path-param.d.ts.map