export { configUser as config }; export { resolveClientConfig }; export { getStreamTransport }; import type { TelefuncClientExtension } from './extensions.js'; import type { ReplacerType, ReviverType, TypeContract, ClientReplacerContext, ClientReviverContext } from '../wire-protocol/types.js'; import { type ChannelTransports, type StreamTransport } from '../wire-protocol/constants.js'; type StreamConfigUser = { transport?: StreamTransport; }; type ChannelConfigUser = { transports?: ChannelTransports; }; /** Telefunc Client Configuration */ type ConfigUser = { /** * The Telefunc HTTP endpoint URL, for example `https://example.org/_telefunc`. * * @default /_telefunc * * https://telefunc.com/telefuncUrl */ telefuncUrl?: string; /** Additional headers sent along Telefunc HTTP requests */ headers?: Record; /** * @deprecated Use `headers` instead. * @see headers */ httpHeaders?: Record; /** Custom fetch implementations */ fetch?: typeof globalThis.fetch; /** Configuration for streamed telefunction results. */ stream: StreamConfigUser; /** Configuration for Telefunc channels. */ channel: ChannelConfigUser; /** Registered client extensions. Use `config.extensions.push(ext)` to add. */ extensions: TelefuncClientExtension[]; }; type ConfigResolved = { telefuncUrl: string; headers: Record | null; fetch: typeof globalThis.fetch | null; stream?: StreamConfigUser; channel: { transports: ChannelTransports; }; extensionResponseTypes: ReviverType[]; extensionRequestTypes: ReplacerType[]; }; declare const configUser: ConfigUser; declare function resolveClientConfig(): ConfigResolved; declare function getStreamTransport(config: { stream?: StreamConfigUser; }): StreamTransport; export type { ConfigUser, ConfigResolved, StreamConfigUser, ChannelConfigUser, ChannelTransports, TelefuncClientExtension, };