import { type ClientConfig } from './config'; export type InvokeOptions = { /** Per-call timeout (ms) for the HTTP request to the dispatcher. */ timeoutMs?: number; /** Extra headers (advanced/testing). */ headers?: Record; /** * @internal Auth override. The server `WalletClient.invoke` sets this so the * call authenticates as that wallet's explicit session. App code never sets * this, and there is no process-global server signer fallback. */ _overrides?: { _getAuthHeaders?: () => Promise>; /** * @internal Fully-resolved config snapshot for a server `WalletClient`. When * present, the invoke targets THIS config's dispatcher (functionsUrl) + appId * instead of the mutable process-global `init()` config - so a later global * init() can never retarget the wallet client's function calls (CTA-05). */ _config?: ClientConfig; }; }; export declare class FunctionInvokeError extends Error { statusCode?: number | undefined; details?: any | undefined; constructor(message: string, statusCode?: number | undefined, details?: any | undefined); } /** * Invoke a deployed Bounded Function by name. Returns the function's JSON. * * const res = await bounded.functions.invoke('syncStripe', { customerId }); * * Throws FunctionInvokeError on 401 (not logged in / bad token), 403 (the * function's auth policy rule denied this caller), 404 (unknown function), * 503 (Workers for Platforms not configured), or any non-2xx / transport error. */ export declare function invoke(name: string, args?: Record, opts?: InvokeOptions): Promise; /** The `bounded.functions` namespace surface. */ export declare const functions: { invoke: typeof invoke; };