UNPKG

bitbucket-mcp

Version:

Model Context Protocol (MCP) server for Bitbucket Cloud and Server API integration

33 lines (32 loc) 1 kB
import type { AxiosInstance } from "axios"; import type winston from "winston"; export declare const BITBUCKET_DEFAULT_PAGELEN = 10; export declare const BITBUCKET_MAX_PAGELEN = 100; export declare const BITBUCKET_ALL_ITEMS_CAP = 1000; export interface PaginationRequestOptions { pagelen?: number; page?: number; all?: boolean; params?: Record<string, any>; defaultPagelen?: number; maxItems?: number; description?: string; } export interface PaginatedValuesResult<T> { values: T[]; page?: number; pagelen: number; next?: string; fetchedPages: number; totalFetched: number; previous?: string; } export declare class BitbucketPaginator { private readonly api; private readonly logger; constructor(api: AxiosInstance, logger: winston.Logger); fetchValues<T>(path: string, options?: PaginationRequestOptions): Promise<PaginatedValuesResult<T>>; private performRequest; private extractValues; private normalizePagelen; }