/**
 * Generic Typed Adapter Factory
 *
 * Given a ToolMethodMap type, tool name, and optional credential,
 * generates a fully typed object where each key is a method name
 * and each value is a typed function that calls platform.call().
 *
 * Eliminates: manual `as Promise<T>` casts, stringly-typed method names,
 * per-method boilerplate.
 */
/** A single method entry: what params go in, what result comes out */
interface MethodEntry {
    params: unknown;
    result: unknown;
}
/** A tool's complete method map */
type ToolMethodMap = Record<string, MethodEntry>;
/**
 * Derive the typed adapter interface from a ToolMethodMap.
 * Methods with `Record<string, never>` params become zero-arg functions.
 */
export type TypedAdapter<TMap extends ToolMethodMap> = {
    [K in keyof TMap]: TMap[K]['params'] extends Record<string, never> ? () => Promise<TMap[K]['result']> : (params: TMap[K]['params']) => Promise<TMap[K]['result']>;
};
/**
 * Create a typed adapter for a platform or integration tool.
 *
 * @param tool - Tool name (e.g., 'attio', 'storage', 'scheduler')
 * @param methods - Array of method name strings (must match TMap keys -- misspellings are compile errors)
 * @param credential - Optional credential name (required for integration tools)
 * @returns Fully typed adapter object
 *
 * @example
 * ```ts
 * const attio = createAdapter<AttioToolMap>('attio', ['createRecord', 'listRecords', ...], 'my-cred')
 * const result = await attio.createRecord({ object: 'deals', ... })
 * //    ^-- CreateRecordResult (fully typed)
 * ```
 */
export declare function createAdapter<TMap extends ToolMethodMap>(tool: string, methods: (keyof TMap & string)[], credential?: string): TypedAdapter<TMap>;
export {};
