import type { APIGroupConfig } from '@mondaydotcomorg/atp-protocol';
interface OpenAPISpec {
    openapi: string;
    info: {
        title: string;
        version: string;
        description?: string;
    };
    paths: Record<string, Record<string, OpenAPIOperation>>;
    servers?: Array<{
        url: string;
        description?: string;
    }>;
    components?: {
        schemas?: Record<string, unknown>;
        securitySchemes?: Record<string, OpenAPISecurityScheme>;
    };
    security?: Array<Record<string, string[]>>;
}
interface OpenAPISecurityScheme {
    type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
    description?: string;
    name?: string;
    in?: 'query' | 'header' | 'cookie';
    scheme?: string;
    bearerFormat?: string;
    flows?: {
        clientCredentials?: {
            tokenUrl: string;
            refreshUrl?: string;
            scopes?: Record<string, string>;
        };
        authorizationCode?: {
            authorizationUrl: string;
            tokenUrl: string;
            refreshUrl?: string;
            scopes?: Record<string, string>;
        };
        implicit?: {
            authorizationUrl: string;
            scopes?: Record<string, string>;
        };
        password?: {
            tokenUrl: string;
            refreshUrl?: string;
            scopes?: Record<string, string>;
        };
    };
}
interface OpenAPIOperation {
    summary?: string;
    description?: string;
    operationId?: string;
    parameters?: Array<{
        name: string;
        in: string;
        required?: boolean;
        schema?: {
            type?: string;
            description?: string;
        };
        description?: string;
    }>;
    requestBody?: {
        content?: {
            'application/json'?: {
                schema?: unknown;
            };
        };
    };
    responses?: Record<string, unknown>;
    /** Per-operation security requirements */
    security?: Array<Record<string, string[]>>;
}
/**
 * OpenAPIConverter converts OpenAPI specifications to Agent Tool Protocol API groups.
 */
export declare class OpenAPIConverter {
    /**
     * Converts an OpenAPI specification to an API group configuration.
     * @param spec - OpenAPI specification object
     * @param httpClient - Function to execute HTTP requests (optional)
     * @param authEnvVarPrefix - Prefix for environment variables (e.g., 'GITHUB' -> 'GITHUB_API_KEY')
     * @returns APIGroupConfig object
     */
    static fromSpec(spec: OpenAPISpec, httpClient?: (method: string, path: string, params?: unknown) => Promise<unknown>, authEnvVarPrefix?: string): APIGroupConfig;
    /**
     * Converts an OpenAPI operation to a function definition.
     */
    private static convertOperation;
    /**
     * Builds JSON schema from OpenAPI operation parameters and request body.
     */
    private static buildInputSchema;
    /**
     * Generates a function name from HTTP method and path.
     */
    private static generateFunctionName;
    /**
     * Sanitizes a name for use as an API group name.
     */
    private static sanitizeName;
    /**
     * Extracts required OAuth scopes from security requirements
     */
    private static extractRequiredScopes;
    /**
     * Infers operation type from HTTP method
     */
    private static inferOperationType;
    /**
     * Parses authentication from OpenAPI security schemes
     */
    private static parseAuthentication;
    /**
     * Loads OpenAPI spec from a URL.
     * @param url - URL to fetch OpenAPI spec from
     * @param httpClient - Optional HTTP client function
     * @param authEnvVarPrefix - Prefix for environment variables
     * @returns APIGroupConfig object
     */
    static fromURL(url: string, httpClient?: (method: string, path: string, params?: unknown) => Promise<unknown>, authEnvVarPrefix?: string): Promise<APIGroupConfig>;
    /**
     * Loads OpenAPI spec from a file path.
     * @param filePath - Path to OpenAPI spec file
     * @param httpClient - Optional HTTP client function
     * @param authEnvVarPrefix - Prefix for environment variables
     * @returns APIGroupConfig object
     */
    static fromFile(filePath: string, httpClient?: (method: string, path: string, params?: unknown) => Promise<unknown>, authEnvVarPrefix?: string): Promise<APIGroupConfig>;
}
export {};
//# sourceMappingURL=index.d.ts.map