// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
    baseUrl: `${string}://${string}/mcp-catalog/api` | (string & {});
};

export type ArchestraMcpServerManifest = {
    description: string;
    long_description?: string;
    author: {
        name: string;
        email?: string;
        url?: string;
    };
    homepage?: string;
    documentation?: string;
    support?: string;
    icon?: string;
    screenshots?: Array<string>;
    tools?: Array<{
        name: string;
        description?: string;
    }>;
    tools_generated?: boolean;
    prompts?: Array<{
        name: string;
        description?: string;
        arguments?: Array<string>;
        text: string;
    }>;
    prompts_generated?: boolean;
    keywords?: Array<string>;
    license?: string;
    compatibility?: {
        claude_desktop?: string;
        platforms?: Array<'darwin' | 'win32' | 'linux'>;
        runtimes?: {
            python?: string;
            node?: string;
        };
    };
    user_config?: {
        [key: string]: {
            type: 'string' | 'number' | 'boolean' | 'directory' | 'file';
            title: string;
            description: string;
            required?: boolean;
            default?: string | number | boolean | Array<string>;
            multiple?: boolean;
            sensitive?: boolean;
            min?: number;
            max?: number;
            mounted?: boolean;
        };
    };
    name: string;
    display_name: string;
    instructions?: string;
    readme: string | null;
    category: 'Aggregators' | 'Art & Culture' | 'Healthcare' | 'Browser Automation' | 'Cloud' | 'Development' | 'CLI Tools' | 'Communication' | 'Data' | 'Logistics' | 'Data Science' | 'IoT' | 'File Management' | 'Finance' | 'Gaming' | 'Knowledge' | 'Location' | 'Marketing' | 'Monitoring' | 'Media' | 'AI Tools' | 'Search' | 'Security' | 'Social Media' | 'Sports' | 'Support' | 'Translation' | 'Audio' | 'Travel' | 'Messengers' | 'Email' | 'CRM' | 'Enterprise' | 'Job Search' | 'Local files' | 'General' | 'MCP Apps Demo' | null;
    quality_score: number | null;
    archestra_config?: {
        client_config_permutations: {
            [key: string]: {
                command: string;
                args?: Array<string>;
                env?: {
                    [key: string]: string;
                };
                docker_image?: string;
            };
        } | null;
        oauth: {
            provider: 'google' | 'slack' | 'linkedin' | null;
            required: boolean;
        };
        browser_based?: {
            required: boolean;
        };
        works_in_archestra: boolean;
    };
    github_info: {
        owner: string;
        repo: string;
        url: string;
        name: string;
        path: string | null;
        stars: number;
        contributors: number;
        issues: number;
        releases: boolean;
        ci_cd: boolean;
        latest_commit_hash: string | null;
    } | null;
    programming_language: string | null;
    framework: string | null;
    last_scraped_at: string | null;
    evaluation_model: string | null;
    protocol_features?: {
        implementing_tools: boolean;
        implementing_prompts: boolean;
        implementing_resources: boolean;
        implementing_sampling: boolean;
        implementing_roots: boolean;
        implementing_logging: boolean;
        implementing_stdio: boolean;
        implementing_streamable_http: boolean;
        implementing_oauth2: boolean;
    };
    dependencies?: Array<{
        name: string;
        importance: number;
    }>;
    raw_dependencies: string | null;
    oauth_config?: {
        name: string;
        server_url: string;
        auth_server_url?: string;
        resource_metadata_url?: string;
        client_id: string;
        client_secret?: string;
        redirect_uris: Array<string>;
        scopes: Array<string>;
        description?: string;
        well_known_url?: string;
        default_scopes: Array<string>;
        supports_resource_metadata: boolean;
        generic_oauth?: boolean;
        token_endpoint?: string;
        access_token_env_var?: string;
        requires_proxy?: boolean;
        provider_name?: string;
        browser_auth?: boolean;
        streamable_http_url?: string;
        streamable_http_port?: number;
    };
    server: {
        command: string;
        args?: Array<string>;
        env?: {
            [key: string]: string;
        };
        type: 'local';
        setup?: Array<{
            type: 'log-monitor';
            provider: 'whatsapp';
        }>;
        docker_image?: string;
        service_account?: string;
    } | {
        type: 'remote';
        url: string;
        docs_url: string | null;
    };
};

export type ArchestraMcpServerManifestWithScoreBreakdown = ArchestraMcpServerManifest & {
    score_breakdown: {
        mcp_protocol: number;
        github_metrics: number;
        deployment_maturity: number;
        documentation: number;
        dependencies: number;
        badge_usage: number;
        total: number;
    };
};

export type SearchMcpServerCatalogData = {
    body?: never;
    path?: never;
    query?: {
        /**
         * Search query to filter by name, description, or repository
         */
        q?: string;
        /**
         * Filter by category
         */
        category?: 'Aggregators' | 'Art & Culture' | 'Healthcare' | 'Browser Automation' | 'Cloud' | 'Development' | 'CLI Tools' | 'Communication' | 'Data' | 'Logistics' | 'Data Science' | 'IoT' | 'File Management' | 'Finance' | 'Gaming' | 'Knowledge' | 'Location' | 'Marketing' | 'Monitoring' | 'Media' | 'AI Tools' | 'Search' | 'Security' | 'Social Media' | 'Sports' | 'Support' | 'Translation' | 'Audio' | 'Travel' | 'Messengers' | 'Email' | 'CRM' | 'Enterprise' | 'Job Search' | 'Local files' | 'General' | 'MCP Apps Demo';
        /**
         * Filter by programming language
         */
        language?: string;
        /**
         * Filter by whether the server is confirmed to work in the Archestra Desktop app
         */
        worksInArchestra?: boolean;
        /**
         * Sort results by field
         */
        sortBy?: 'quality' | 'stars' | 'name';
        /**
         * Number of results to return
         */
        limit?: number;
        /**
         * Number of results to skip
         */
        offset?: number | null;
    };
    url: '/search';
};

export type SearchMcpServerCatalogResponses = {
    /**
     * Successful response
     */
    200: {
        servers: Array<ArchestraMcpServerManifest>;
        totalCount: number;
        limit: number;
        offset: number;
        hasMore: boolean;
    };
};

export type SearchMcpServerCatalogResponse = SearchMcpServerCatalogResponses[keyof SearchMcpServerCatalogResponses];

export type GetMcpServerData = {
    body?: never;
    path: {
        /**
         * Server name identifier (format - org__repo or org__repo__path)
         */
        name: string;
    };
    query?: never;
    url: '/server/{name}';
};

export type GetMcpServerErrors = {
    /**
     * Server not found
     */
    404: {
        error: string;
    };
};

export type GetMcpServerError = GetMcpServerErrors[keyof GetMcpServerErrors];

export type GetMcpServerResponses = {
    /**
     * Successful response
     */
    200: ArchestraMcpServerManifestWithScoreBreakdown;
};

export type GetMcpServerResponse = GetMcpServerResponses[keyof GetMcpServerResponses];

export type GetMcpServerQualityBadgeData = {
    body?: never;
    path: {
        /**
         * GitHub organization
         */
        org: string;
        /**
         * GitHub repository name
         */
        repo: string;
    };
    query?: never;
    url: '/badge/quality/{org}/{repo}';
};

export type GetMcpServerQualityBadgeErrors = {
    /**
     * Server not found
     */
    404: {
        error: string;
    };
};

export type GetMcpServerQualityBadgeError = GetMcpServerQualityBadgeErrors[keyof GetMcpServerQualityBadgeErrors];

export type GetMcpServerQualityBadgeResponses = {
    /**
     * SVG image content
     */
    200: Blob | File;
};

export type GetMcpServerQualityBadgeResponse = GetMcpServerQualityBadgeResponses[keyof GetMcpServerQualityBadgeResponses];

export type GetMcpServerCategoriesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/category';
};

export type GetMcpServerCategoriesResponses = {
    /**
     * Successful response
     */
    200: {
        categories: Array<'Aggregators' | 'Art & Culture' | 'Healthcare' | 'Browser Automation' | 'Cloud' | 'Development' | 'CLI Tools' | 'Communication' | 'Data' | 'Logistics' | 'Data Science' | 'IoT' | 'File Management' | 'Finance' | 'Gaming' | 'Knowledge' | 'Location' | 'Marketing' | 'Monitoring' | 'Media' | 'AI Tools' | 'Search' | 'Security' | 'Social Media' | 'Sports' | 'Support' | 'Translation' | 'Audio' | 'Travel' | 'Messengers' | 'Email' | 'CRM' | 'Enterprise' | 'Job Search' | 'Local files' | 'General' | 'MCP Apps Demo'>;
    };
};

export type GetMcpServerCategoriesResponse = GetMcpServerCategoriesResponses[keyof GetMcpServerCategoriesResponses];
