/** Source format of the API contract */
export type ApiContractSource = 'openapi' | 'swagger' | 'graphql';
/** Generation mode: how to group operations into specs */
export type ApiSpecGenerationMode = 'by-endpoint' | 'by-resource' | 'by-operation';
/** A single field/parameter extracted from an API contract */
export interface ApiContractField {
    name: string;
    type: string;
    required: boolean;
    format?: string;
    description?: string;
    enumValues?: string[];
}
/** A single response code with its description */
export interface ApiResponseInfo {
    statusCode: number;
    description: string;
}
/** A parsed operation from OpenAPI or GraphQL */
export interface ApiParsedOperation {
    /** Unique identifier for this operation (operationId or path+method) */
    externalId: string;
    /** Human-readable title */
    title: string;
    /** Longer description if available */
    description: string;
    /** HTTP method (GET, POST, etc.) — undefined for GraphQL */
    method?: string;
    /** URL path for REST endpoints — undefined for GraphQL */
    path?: string;
    /** GraphQL operation type — undefined for REST */
    operationType?: 'query' | 'mutation' | 'subscription';
    /** Tags from OpenAPI or GraphQL schema directives */
    tags: string[];
    /** Input fields (parameters + requestBody fields) */
    fields: ApiContractField[];
    /** Response codes defined for this operation */
    responses: ApiResponseInfo[];
    /** Resource group for by-resource mode (e.g., "User", "Product") */
    resourceGroup: string;
}
/** An acceptance criterion generated from an API pattern */
export interface ApiGeneratedAC {
    text: string;
    source: 'required-field' | 'email-format' | 'response-code' | 'pattern' | 'rate-limit';
}
/** Options for building ACs from API operations */
export interface BuildACsOptions {
    /** Spec target area — used to filter irrelevant criteria */
    target?: string;
    /** Spec tags — used to filter irrelevant criteria */
    tags?: string[];
}
/** Parsed API contract ready for spec generation */
export interface OpenApiContract {
    source: ApiContractSource;
    title: string;
    version: string;
    description: string;
    operations: ApiParsedOperation[];
}
/** Input for the generate_spec_from_api tool */
export interface GenerateSpecFromApiInput {
    projectPath: string;
    /** Raw JSON string of OpenAPI spec or GraphQL SDL string */
    content?: string;
    /** Absolute file path to load the contract from */
    filePath?: string;
    /** How to group operations into specs */
    mode: ApiSpecGenerationMode;
    /** Additional tags to attach to all generated specs */
    extraTags?: string[];
}
/** Result summary for the generate_spec_from_api tool */
export interface ApiSpecGenerationSummary {
    specsCreated: number;
    endpointsParsed: number;
    source: ApiContractSource;
    specIds: string[];
    message: string;
}
/** @internal Raw JSON schema node from an OpenAPI document */
export interface OpenApiRawSchema {
    type?: string;
    format?: string;
    description?: string;
    required?: string[];
    properties?: Record<string, OpenApiRawSchema>;
    enum?: string[];
    items?: OpenApiRawSchema;
    $ref?: string;
}
/** @internal Raw parameter node from an OpenAPI operation */
export interface OpenApiRawParameter {
    name?: string;
    in?: string;
    required?: boolean;
    description?: string;
    schema?: OpenApiRawSchema;
}
/** @internal Raw requestBody node from an OpenAPI operation */
export interface OpenApiRawRequestBody {
    content?: Record<string, {
        schema?: OpenApiRawSchema;
    }>;
}
/** @internal Raw response node from an OpenAPI operation */
export interface OpenApiRawResponse {
    description?: string;
}
/** @internal Raw operation node from an OpenAPI path item */
export interface OpenApiRawOperation {
    operationId?: string;
    summary?: string;
    description?: string;
    tags?: string[];
    parameters?: OpenApiRawParameter[];
    requestBody?: OpenApiRawRequestBody;
    responses?: Record<string, OpenApiRawResponse>;
}
/** @internal Raw path item from an OpenAPI document */
export interface OpenApiRawPathItem {
    get?: OpenApiRawOperation;
    post?: OpenApiRawOperation;
    put?: OpenApiRawOperation;
    patch?: OpenApiRawOperation;
    delete?: OpenApiRawOperation;
    head?: OpenApiRawOperation;
    options?: OpenApiRawOperation;
}
/** @internal Top-level OpenAPI / Swagger document shape */
export interface OpenApiDoc {
    openapi?: string;
    swagger?: string;
    info?: {
        title?: string;
        version?: string;
        description?: string;
    };
    paths?: Record<string, OpenApiRawPathItem>;
    components?: {
        schemas?: Record<string, OpenApiRawSchema>;
    };
    definitions?: Record<string, OpenApiRawSchema>;
}
/** @internal A field definition parsed from GraphQL SDL */
export interface GqlFieldDef {
    name: string;
    type: string;
    required: boolean;
    description?: string;
}
/** @internal An operation parsed from a GraphQL Query/Mutation/Subscription type */
export interface GqlParsedOperation {
    name: string;
    kind: 'query' | 'mutation' | 'subscription';
    fields: GqlFieldDef[];
    returnType: string;
    description?: string;
}
/** Severity level of a contract validation finding */
export type ApiContractFindingSeverity = 'critical' | 'warning' | 'info';
/** The format of the validated contract */
export type ApiContractFormat = 'openapi' | 'graphql';
/** A single finding from API contract validation */
export interface ApiContractFinding {
    /** API path (e.g. "/users/{id}") or GraphQL operation (e.g. "Query.getUser") */
    path: string;
    /** HTTP method or GraphQL operation kind (Query/Mutation/Subscription/resolver) */
    method: string;
    /** How severe this finding is */
    severity: ApiContractFindingSeverity;
    /** Human-readable description of the finding */
    message: string;
}
/** Full report returned by validateOpenApiContract / validateGraphQLSchema */
export interface ApiContractReport {
    contractFormat: ApiContractFormat;
    contractVersion: string;
    contractTitle: string;
    totalContractEndpoints: number;
    totalImplEndpoints: number;
    /** Endpoints documented in contract but missing from implementation */
    missingEndpoints: ApiContractFinding[];
    /** Endpoints implemented but not present in contract */
    undocumentedEndpoints: ApiContractFinding[];
    /** Schema/type mismatches between contract and implementation */
    schemaDrift: ApiContractFinding[];
    /** Changes that would break existing clients */
    breakingChanges: ApiContractFinding[];
    /** All findings combined */
    findings: ApiContractFinding[];
    /** One-sentence human-readable summary */
    summary: string;
}
/** @internal GraphQL operation extracted from SDL parsing (for validation, not generation) */
export interface GqlValidationOperation {
    name: string;
    kind: 'Query' | 'Mutation' | 'Subscription';
}
/** @internal Detected route from scanning project source files */
export interface DetectedRoute {
    method: string;
    path: string;
    framework: string;
    file: string;
}
/** @internal Detected GraphQL resolver from scanning project source files */
export interface DetectedResolver {
    name: string;
    file: string;
}
/** Input for the validate_api_contract tool */
export interface ValidateApiContractInput {
    projectPath: string;
    contractPath: string;
    contractFormat?: 'openapi' | 'graphql' | 'auto';
}
//# sourceMappingURL=api-contract.d.ts.map