UNPKG

@aashari/mcp-server-atlassian-confluence

Version:

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP in

87 lines (86 loc) 2.44 kB
/** * Available pagination types supported by the application */ export declare enum PaginationType { /** * Offset-based pagination (startAt, maxResults, total) * Used by Jira APIs */ OFFSET = "offset", /** * Cursor-based pagination (cursor in URL) * Used by Confluence APIs */ CURSOR = "cursor", /** * Page-based pagination (page parameter in URL) * Used by Bitbucket APIs */ PAGE = "page" } /** * Generic interface for all paginated API response data that may include * pagination information in different formats */ export interface PaginationData { _links?: { next?: string; }; } /** * Response structure for offset-based pagination (start-at, max-results) */ export interface OffsetPaginationData extends PaginationData { startAt?: number; maxResults?: number; total?: number; isLast?: boolean; } /** * Response structure for cursor-based pagination */ /** * Response structure for page-based pagination */ export interface PagePaginationData extends PaginationData { page?: number; size?: number; totalElements?: number; totalPages?: number; last?: boolean; } /** * Adapter function to convert Zod-validated API responses to pagination data * @param data Any API response with potential pagination properties * @returns A PaginationData compatible object */ export declare function adaptResponseForPagination(data: unknown): PaginationData; /** * Standardized pagination format for controller responses */ export interface ResponsePagination { /** * Number of items in the current response */ count: number; /** * Whether more items are available */ hasMore: boolean; /** * Cursor to use for the next page, if applicable */ nextCursor?: string; /** * Total number of items, if available */ total?: number; } /** * Extract pagination information from an API response and convert it to a standardized format * @param data The API response data containing pagination information * @param type The type of pagination used in the response * @param entityType Optional entity type for logging * @returns Standardized pagination object or undefined if no pagination info is available */ export declare function extractPaginationInfo(data: unknown, type: PaginationType, entityType?: string): ResponsePagination | undefined;