import { type CommandNode } from "../../toolcraft/dist/index.js"; import { type DefineClientOptions, type DefinedClient, type OpenApiClientServices } from "./define-client.js"; import { type OpenApiDocument } from "./generate.js"; import type { ToolcraftConfig } from "./config.js"; import { type OpenApiSpecCacheFileSystem, type OpenApiSpecCacheOptions, type OpenApiTimeoutContext } from "./spec-cache.js"; export type OpenApiDocumentSource = OpenApiDocument | string | URL; export interface CommandsFromSpecOptions { cwd?: string; fetch?: typeof globalThis.fetch; fs?: OpenApiSpecCacheFileSystem; cache?: false | OpenApiSpecCacheOptions; onTimeout?: (context: OpenApiTimeoutContext) => void | Promise; timeoutMs?: number; config?: ToolcraftConfig; } export type DefineClientFromSpecOptions> = Omit, "baseUrl" | "commands"> & CommandsFromSpecOptions & { baseUrl?: string; environment?: string; env?: Record; }; export interface ResolveOpenApiBaseUrlOptions { document: OpenApiDocument; environments?: Record; environment?: string; env?: Record; } export declare function commandsFromSpec(source: OpenApiDocumentSource, options?: CommandsFromSpecOptions): Promise[]>; export declare function defineClientFromSpec>(spec: OpenApiDocumentSource, options: DefineClientFromSpecOptions): Promise>; export declare function resolveOpenApiBaseUrl(options: ResolveOpenApiBaseUrlOptions): string | undefined;