@aashari/mcp-server-atlassian-bitbucket
Version:
Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MC
39 lines (38 loc) • 1.2 kB
TypeScript
import { ResponsePagination } from '../types/common.types.js';
/**
* Represents the possible pagination types.
*/
export declare enum PaginationType {
CURSOR = "cursor",// Confluence, Bitbucket (some endpoints)
OFFSET = "offset",// Jira
PAGE = "page"
}
/**
* Interface representing the common structure of paginated data from APIs.
* This union type covers properties used by offset, cursor, and page-based pagination.
*/
interface PaginationData {
results?: unknown[];
values?: unknown[];
count?: number;
size?: number;
hasMore?: boolean;
_links?: {
next?: string;
};
startAt?: number;
maxResults?: number;
total?: number;
nextPage?: string;
page?: number;
pagelen?: number;
next?: string;
}
/**
* Extract pagination information from API response
* @param data The API response containing pagination information
* @param paginationType The type of pagination mechanism used
* @returns Object with nextCursor, hasMore, and count properties
*/
export declare function extractPaginationInfo<T extends Partial<PaginationData>>(data: T, paginationType: PaginationType): ResponsePagination | undefined;
export {};