import type { APIGroupConfig, AuthProvider } from '@mondaydotcomorg/atp-protocol';
interface OpenAPIOperation {
    operationId?: string;
    summary?: string;
    description?: string;
    tags?: string[];
    deprecated?: boolean;
    parameters?: Array<OpenAPIParameter>;
    requestBody?: OpenAPIRequestBody;
    responses?: Record<string, OpenAPIResponse>;
    security?: Array<Record<string, string[]>>;
    'x-destructive'?: boolean;
    'x-requires-approval'?: boolean;
    'x-risk-level'?: 'low' | 'medium' | 'high' | 'critical';
    'x-confirm-prompt'?: string;
    [key: string]: unknown;
}
interface OpenAPIParameter {
    name: string;
    in: 'query' | 'header' | 'path' | 'cookie';
    required?: boolean;
    schema?: OpenAPISchema;
    description?: string;
}
interface OpenAPIRequestBody {
    required?: boolean;
    content?: Record<string, {
        schema?: OpenAPISchema;
    }>;
}
interface OpenAPIResponse {
    description?: string;
    content?: Record<string, {
        schema?: OpenAPISchema;
    }>;
}
interface OpenAPISchema {
    type?: string;
    properties?: Record<string, OpenAPISchema>;
    items?: OpenAPISchema;
    required?: string[];
    enum?: string[];
    $ref?: string;
    description?: string;
    [key: string]: unknown;
}
/**
 * Options for loading OpenAPI spec
 */
export interface LoadOpenAPIOptions {
    /** API group name */
    name?: string;
    /** Filter operations */
    filter?: {
        /** Include only these tags */
        tags?: string[];
        /** Include only paths matching these patterns */
        paths?: string[];
        /** Exclude paths matching these patterns */
        exclude?: string[];
        /** Include only these HTTP methods */
        methods?: string[];
        /** Custom filter function */
        operation?: (op: OpenAPIOperation, path: string, method: string) => boolean;
    };
    /** Override descriptions for better LLM understanding */
    descriptions?: Record<string, string>;
    /** Annotation mapping */
    annotations?: {
        /** Map OpenAPI extensions to annotations */
        fromExtensions?: Record<string, string>;
        /** Global annotations for all operations */
        global?: Record<string, unknown>;
        /** Per-operation annotations */
        operations?: Record<string, Record<string, unknown>>;
    };
    /** Auth provider (optional, uses server's if not provided) */
    authProvider?: AuthProvider;
    /** Base URL override (if different from spec servers) */
    baseURL?: string;
    /**
     * Dynamic header provider for per-request authentication (e.g., per-user OAuth).
     * Similar to GraphQL's headerProvider. Called before each API request.
     * @param params - The request parameters
     * @param context - Optional context from contextProvider
     * @returns Headers to add to the request
     */
    headerProvider?: (params: Record<string, unknown> | undefined, context?: Record<string, unknown>) => Promise<Record<string, string>> | Record<string, string>;
    /**
     * Context provider to extract context from execution environment.
     * Similar to GraphQL's contextProvider. Called once per request.
     * @param executionContext - The execution context from ATP
     * @returns Context object passed to headerProvider
     */
    contextProvider?: (executionContext?: Record<string, unknown>) => Promise<Record<string, unknown>> | Record<string, unknown>;
    /**
     * Request transformer to modify the request before it's sent.
     * Useful for APIs that require non-JSON content types (e.g., form-urlencoded).
     * @param request - The request details (url, method, headers, body)
     * @returns Modified request details
     */
    requestTransformer?: (request: {
        url: string;
        method: string;
        headers: Record<string, string>;
        body: unknown;
    }) => Promise<{
        url?: string;
        method?: string;
        headers?: Record<string, string>;
        body?: string | undefined;
    }> | {
        url?: string;
        method?: string;
        headers?: Record<string, string>;
        body?: string | undefined;
    };
}
/**
 * Load OpenAPI specification and convert to ATP API group
 */
export declare function loadOpenAPI(source: string, options?: LoadOpenAPIOptions): Promise<APIGroupConfig>;
export {};
//# sourceMappingURL=openapi-loader.d.ts.map