deepsource-mcp-server
Version:
Model Context Protocol server for DeepSource
64 lines (63 loc) • 2.34 kB
TypeScript
/**
* @fileoverview GraphQL response processors
* This module provides utilities for processing GraphQL responses.
*/
import { DeepSourceIssue } from '../../models/issues.js';
import { PageInfo } from '../pagination/types.js';
/**
* Process issues from run checks in a GraphQL response
* @param response The raw GraphQL response
* @returns Processed issues with pagination information
* @public
*/
export declare function processRunChecksResponse(response: {
data: {
data?: {
run?: {
checks?: {
edges?: Array<{
node: {
occurrences?: {
pageInfo?: {
hasNextPage: boolean;
hasPreviousPage: boolean;
startCursor: string | undefined;
endCursor: string | undefined;
};
totalCount?: number;
edges?: Array<{
node?: {
id?: string;
issue?: {
shortcode?: string;
title?: string;
category?: string;
severity?: string;
description?: string;
tags?: string[];
};
path?: string;
beginLine?: number;
};
}>;
};
};
}>;
};
};
};
};
}): {
issues: DeepSourceIssue[];
pageInfo: PageInfo;
totalCount: number;
};
/**
* Extract error messages from GraphQL error response
* @param errors Array of GraphQL error objects
* @returns Formatted error message string
* @public
*/
export declare function extractGraphQLErrorMessages(errors: Array<{
message: string;
}>): string;