import type { ApiFunctionsUser, RbacConfig, RedirectConfig } from '@redocly/config';
import type { ProcessContentActions } from '../../types';
import type { BundledDefinition as GraphqlBundledDefinition } from '../../plugins/graphql-docs/graphql-doc-loader';
import type { ApiDescriptionInfo, GraphqlDescriptionInfo } from './types.js';
export type ApiDescriptions = Awaited<ReturnType<ProcessContentActions['loadOpenApiDefinitions']>>;
/**
 * Filters out localizations and definitions with no public paths.
 *
 * This function removes definitions that are localization files (starting with 'l10n' or 'i18n')
 * and definitions that don't have any public API paths. It also cleans up the remaining
 * definitions by removing internal parsing artifacts.
 *
 * @param apiDescriptions - Array of OpenAPI definitions to filter.
 * @returns Filtered array of definitions with only those containing public paths.
 *
 * @example
 * getCleanedUpDefinitions([
 *   { relativePath: 'l10n/en.yaml', definition: { paths: {} } },
 *   { relativePath: 'api.yaml', definition: { paths: { '/users': {} } } }
 * ]); // Returns only the api.yaml definition
 */
export declare function getCleanedUpApiDescriptions(apiDescriptions: ApiDescriptions): ApiDescriptions;
/**
 * Filters OpenAPI definitions based on user RBAC permissions.
 *
 * This function checks each definition against the user's role-based access control
 * permissions and filters out definitions the user doesn't have access to. It also
 * applies deep filtering to the definition content based on the user's permissions.
 *
 * @param apiDescriptions - Array of OpenAPI definitions to filter.
 * @param user - The user object containing role and permission information.
 * @param rbac - RBAC configuration defining access rules.
 * @param requiresLogin - Whether login is required for access.
 * @returns Array of definitions the user has access to with filtered content.
 *
 * @example
 * filterDefinitionsByRbac(definitions, user, rbac, true);
 * // Returns only definitions the user can access with filtered content
 */
export declare function filterApiDescriptionsByRbac(apiDescriptions: Record<string, ApiDescriptionInfo>, user: ApiFunctionsUser, rbac: RbacConfig, requiresLogin: boolean): Record<string, ApiDescriptionInfo>;
export declare function filterGraphqlDescriptionsByRbac(graphqlDescriptions: GraphqlDescriptionInfo[], user: ApiFunctionsUser, rbac: RbacConfig, requiresLogin: boolean): GraphqlDescriptionInfo[];
export declare function buildGraphqlDescriptions(definitions: GraphqlBundledDefinition[]): GraphqlDescriptionInfo[];
export declare function filterIgnoredApiDescriptions<T extends {
    relativePath: string;
}>(apiDescriptions: T[], ignoredPaths: string[]): T[];
/**
 * Checks if the MCP route (/mcp) appears in redirect configuration.
 *
 * This function checks if the reserved MCP route is used as either a source
 * or target in any redirect configuration. Returns true if found.
 *
 * @param config - The Redocly configuration containing redirects.
 * @returns true if /mcp is found in redirects, false otherwise.
 *
 * @example
 * isMcpInRedirects({ redirects: { '/mcp': '/docs' } }); // true
 * isMcpInRedirects({ redirects: { '/docs': '/mcp' } }); // true
 * isMcpInRedirects({ redirects: { '/docs': '/api' } }); // false
 */
export declare function isMcpInRedirects(redirects?: {
    [key: string]: RedirectConfig;
}): boolean;
//# sourceMappingURL=utils.d.ts.map