UNPKG

deepsource-mcp-server

Version:
99 lines (98 loc) 3.79 kB
/** * @fileoverview GraphQL queries for the DeepSource API * This module provides pre-defined GraphQL queries for various API operations. */ /** * Query to fetch the list of projects for the current user * @public */ export declare const VIEWER_PROJECTS_QUERY: string; /** * Query to fetch issues from a project with pagination * @param projectKey The DeepSource project key * @param paginationVars Pagination variables for the query * @param filterVars Filter variables for the query * @returns GraphQL query for fetching issues * @public */ export declare function createIssuesQuery(projectKey: string, paginationVars: Record<string, unknown>, filterVars?: Record<string, unknown>): string; /** * Query to fetch analysis runs from a project with pagination * @param projectKey The DeepSource project key * @param paginationVars Pagination variables for the query * @param filterVars Filter variables for the query * @returns GraphQL query for fetching runs * @public */ export declare function createRunsQuery(projectKey: string, paginationVars: Record<string, unknown>, filterVars?: Record<string, unknown>): string; /** * Query to fetch a specific run by ID or commit hash * @param runIdentifier The run UID or commit hash to fetch * @returns GraphQL query for fetching a run * @public */ export declare function createRunQuery(runIdentifier: string): string; /** * Query to fetch the most recent run for a branch * @param projectKey The DeepSource project key * @param branchName The branch name to find runs for * @returns GraphQL query for fetching the most recent run * @public */ export declare function createRecentRunQuery(projectKey: string, branchName: string): string; /** * Query to fetch issues from a specific run with pagination * @param runId The run ID to fetch issues for * @param paginationVars Pagination variables for the query * @returns GraphQL query for fetching run issues * @public */ export declare function createRunIssuesQuery(runId: string, paginationVars: Record<string, unknown>): string; /** * Query to fetch dependency vulnerabilities with pagination * @param projectKey The DeepSource project key * @param paginationVars Pagination variables for the query * @returns GraphQL query for fetching vulnerabilities * @public */ export declare function createVulnerabilitiesQuery(projectKey: string, paginationVars: Record<string, unknown>): string; /** * Query to fetch quality metrics * @param projectKey The DeepSource project key * @param shortcodeFilter Optional filter for specific metric shortcodes * @returns GraphQL query for fetching quality metrics * @public */ export declare function createQualityMetricsQuery(projectKey: string, shortcodeFilter?: string[]): string; /** * Mutation to update a metric threshold * @param params Parameters for the update * @returns GraphQL mutation for updating a metric threshold * @public */ export declare function createUpdateMetricThresholdMutation(params: { repositoryId: string; metricShortcode: string; metricKey: string; thresholdValue: number | null; }): string; /** * Mutation to update metric settings * @param params Parameters for the update * @returns GraphQL mutation for updating metric settings * @public */ export declare function createUpdateMetricSettingMutation(params: { repositoryId: string; metricShortcode: string; isReported: boolean; isThresholdEnforced: boolean; }): string; /** * Query to fetch a compliance report * @param projectKey The DeepSource project key * @param reportType The type of report to fetch * @returns GraphQL query for fetching a compliance report * @public */ export declare function createComplianceReportQuery(projectKey: string, reportType: string): string;