type SideBarConfig = {
    id: string;
    visible: boolean;
};
type ResourceDependency = {
    id: string;
    version?: string;
};
type CustomSideBarItem = {
    label: string;
    slug: string;
    items?: CustomSideBarItem[];
};
type ManualSideBarConfig = {
    label: string;
    badge?: {
        text: string;
        color: string;
    };
    collapsed?: boolean;
    items: CustomSideBarItem[];
};
type AutoGeneratedSideBarConfig = {
    label: string;
    autogenerated: {
        directory: string;
    };
    badge?: {
        text: string;
        color: string;
    };
    collapsed?: boolean;
};
type TableConfiguration = {
    columns: {
        [key: string]: {
            visible?: boolean;
            label?: string;
        };
    };
};
type PagesConfiguration = {
    type: 'item' | 'group';
    title: string;
    icon?: string;
    pages?: string[];
};
type NavigationPage = string | PagesConfiguration;
type GeneratorConfig = string | Record<string, unknown> | [string, Record<string, unknown>];
type DirectoryEntry = {
    id: string;
    markdown?: string;
    [key: string]: unknown;
};
type DirectorySource = {
    type: 'directory';
    name: string;
    loadUsers?: () => Promise<DirectoryEntry[]>;
    loadTeams?: () => Promise<DirectoryEntry[]>;
};
type DirectoryConfig = {
    /**
     * External sources that sync users and teams into EventCatalog.
     * Requires EventCatalog Scale.
     */
    sources?: DirectorySource[];
    /**
     * Controls what happens when a local Markdown user/team and an external source
     * return the same id.
     * @default 'local-wins'
     */
    conflictStrategy?: 'local-wins' | 'source-wins' | 'error';
};
type AuthConfig = {
    enabled: boolean;
};
type McpAuthConfig = {
    /**
     * Require OAuth Bearer tokens for the built-in MCP server.
     * EventCatalog acts as the MCP protected resource server; the
     * configured authorization server remains responsible for login,
     * consent, token issuance, and client registration.
     */
    enabled?: boolean;
    /**
     * Absolute URL for the MCP resource. Defaults to the request origin
     * plus `/docs/mcp`, but production deployments behind proxies should
     * set this explicitly.
     */
    resource?: string;
    /**
     * Optional absolute URL for the OAuth Protected Resource Metadata
     * document. Defaults to `/.well-known/oauth-protected-resource`.
     */
    protectedResourceMetadataUrl?: string;
    /** Authorization server issuer/base URLs advertised to MCP clients. */
    authorizationServers?: string[];
    /** Expected token issuer (`iss`). */
    issuer?: string;
    /** Expected token audience (`aud`). Defaults to `resource`. */
    audience?: string | string[];
    /** Scopes required to call the MCP server. */
    requiredScopes?: string[];
    /** JWKS endpoint used to validate asymmetric JWT access tokens. */
    jwksUri?: string;
    /** Inline public key for asymmetric JWT validation. */
    publicKey?: string;
    /** Environment variable containing the public key. */
    publicKeyEnvVar?: string;
    /** Inline shared secret for symmetric JWT validation. Prefer `sharedSecretEnvVar`. */
    sharedSecret?: string;
    /** Environment variable containing the shared secret. */
    sharedSecretEnvVar?: string;
};
type McpConfig = {
    auth?: McpAuthConfig;
};
type GA4Config = {
    measurementId: string;
};
type GTMConfig = {
    tagId: string;
};
type PostHogConfig = {
    apiKey: string;
    apiHost?: string;
};
type EventCatalogCloudAnalyticsConfig = {
    enabled: boolean;
    trackingId: string;
    writeKey?: string;
    endpoint?: string;
    debug?: boolean;
};
type EventCatalogCloudConfig = {
    analytics?: EventCatalogCloudAnalyticsConfig;
};
type IntegrationsConfig = {
    ga4?: GA4Config;
    gtm?: GTMConfig;
    posthog?: PostHogConfig;
    /** Log all analytics events to the browser console */
    debug?: boolean;
};
type CatalogTheme = 'default' | 'ocean' | 'sapphire' | 'sunset' | 'forest' | (string & {});
type ScalarConfiguration = any;
interface Config {
    cId: string;
    title: string;
    organizationName: string;
    tagline?: string | false;
    homepageLink?: string;
    editUrl?: string;
    repositoryUrl?: string;
    landingPage?: string;
    base?: string;
    port?: string | number;
    outDir?: string;
    host?: string | boolean;
    trailingSlash?: boolean;
    output?: 'server' | 'static';
    server?: {
        allowedHosts?: string[] | true;
    };
    security?: {
        checkOrigin?: boolean;
    };
    /**
     * Theme for the catalog UI.
     * - 'default': Default purple/slate theme
     * - 'ocean': Deep blue/teal ocean-inspired theme
     * - 'sapphire': Blue/violet theme
     * - 'sunset': Orange/pink sunset-inspired theme
     * - 'forest': Green forest-inspired theme
     * @default 'default'
     */
    theme?: CatalogTheme;
    auth?: AuthConfig;
    mcp?: McpConfig;
    rss?: {
        enabled?: boolean;
        limit?: number;
    };
    search?: {
        /**
         * - 'resource': Fast default search across catalog resources.
         * - 'indexed': Opt-in full-content search index generated at build time.
         * @default 'resource'
         */
        type?: 'resource' | 'indexed';
    };
    llmsTxt?: {
        enabled: boolean;
    };
    logo?: {
        alt: string;
        src: string;
        text?: string;
    };
    asyncAPI?: {
        renderParsedSchemas?: boolean;
        allowAnyEnvInSpecHeaders?: boolean;
    };
    mdxOptimize?: boolean;
    compress?: boolean;
    sidebar?: SideBarConfig[];
    navigation?: {
        pages: NavigationPage[];
    };
    docs?: {
        sidebar: {
            type?: 'TREE_VIEW' | 'LIST_VIEW';
            showOrphanedMessages?: boolean;
        };
    };
    dependencies?: {
        agents?: ResourceDependency[];
        commands?: ResourceDependency[];
        events?: ResourceDependency[];
        services?: ResourceDependency[];
        domains?: ResourceDependency[];
    };
    directory?: DirectoryConfig;
    mermaid?: {
        maxTextSize?: number;
        iconPacks?: string[];
    };
    chat?: {
        enabled?: boolean;
        provider?: 'openai' | 'anthropic' | 'google';
        model?: string;
        max_tokens?: number;
        similarityResults?: number;
        temperature?: number;
        topP?: number;
        topK?: number;
        frequencyPenalty?: number;
        presencePenalty?: number;
    };
    customDocs?: {
        sidebar?: (ManualSideBarConfig | AutoGeneratedSideBarConfig)[];
    };
    api?: {
        /**
         * Enable or disable the /api/catalog endpoint that dumps the entire catalog as JSON.
         * Disabling this can significantly reduce memory usage during builds for large catalogs (1000+ files).
         * @default true
         */
        fullCatalogAPIEnabled?: boolean;
    };
    changelog?: {
        enabled: boolean;
    };
    visualiser?: {
        enabled?: boolean;
        channels?: {
            renderMode?: 'flat' | 'single';
        };
    };
    environments?: {
        name: string;
        url: string;
        description?: string;
        shortName?: string;
    }[];
    users?: {
        tableConfiguration?: TableConfiguration;
    };
    teams?: {
        tableConfiguration?: TableConfiguration;
    };
    events?: {
        tableConfiguration?: TableConfiguration;
    };
    agents?: {
        tableConfiguration?: TableConfiguration;
    };
    services?: {
        tableConfiguration?: TableConfiguration;
    };
    domains?: {
        tableConfiguration?: TableConfiguration;
    };
    flows?: {
        tableConfiguration?: TableConfiguration;
    };
    containers?: {
        tableConfiguration?: TableConfiguration;
    };
    commands?: {
        tableConfiguration?: TableConfiguration;
    };
    queries?: {
        tableConfiguration?: TableConfiguration;
    };
    cloud?: EventCatalogCloudConfig;
    integrations?: IntegrationsConfig;
    scalarConfiguration?: ScalarConfiguration;
    generators?: GeneratorConfig[];
}

export type { Config, SideBarConfig };
