import { ControllerResponse } from '../types/common.types.js'; import { ListPullRequestsToolArgsType, GetPullRequestToolArgsType, ListPullRequestCommentsToolArgsType, CreatePullRequestCommentToolArgsType, CreatePullRequestToolArgsType, UpdatePullRequestToolArgsType, ApprovePullRequestToolArgsType, RejectPullRequestToolArgsType } from '../tools/atlassian.pullrequests.types.js'; /** * Controller for managing Bitbucket pull requests. * Provides functionality for listing, retrieving, and creating pull requests and comments. * * NOTE ON MARKDOWN HANDLING: * Unlike Jira (which uses ADF) or Confluence (which uses a mix of formats), * Bitbucket Cloud API natively accepts Markdown for text content in both directions: * - When sending data TO the API (comments, PR descriptions) * - When receiving data FROM the API (PR descriptions, comments) * * The API expects content in the format: { content: { raw: "markdown-text" } } * * We use optimizeBitbucketMarkdown() to address specific rendering quirks in * Bitbucket's markdown renderer but it does NOT perform format conversion. * See formatter.util.ts for details on the specific issues it addresses. */ /** * List Bitbucket pull requests with optional filtering options * @param options - Options for listing pull requests including workspace slug and repo slug * @returns Promise with formatted pull requests list content and pagination information */ declare function list(options: ListPullRequestsToolArgsType): Promise; /** * Get detailed information about a specific Bitbucket pull request * @param options - Options including workspace slug, repo slug, and pull request ID * @returns Promise with formatted pull request details as Markdown content */ declare function get(options: GetPullRequestToolArgsType): Promise; /** * List comments on a Bitbucket pull request * @param options - Options including workspace slug, repo slug, and pull request ID * @returns Promise with formatted pull request comments as Markdown content */ declare function listComments(options: ListPullRequestCommentsToolArgsType): Promise; /** * Add a comment to a Bitbucket pull request * @param options - Options including workspace slug, repo slug, PR ID, and comment content * @returns Promise with a success message as content */ declare function addComment(options: CreatePullRequestCommentToolArgsType): Promise; /** * Create a new pull request in Bitbucket * @param options - Options including workspace slug, repo slug, source branch, target branch, title, etc. * @returns Promise with formatted pull request details as Markdown content */ declare function add(options: CreatePullRequestToolArgsType): Promise; /** * Update an existing pull request in Bitbucket * @param options - Options including workspace slug, repo slug, pull request ID, title, and description * @returns Promise with formatted updated pull request details as Markdown content */ declare function update(options: UpdatePullRequestToolArgsType): Promise; /** * Approve a pull request in Bitbucket * @param options - Options including workspace slug, repo slug, and pull request ID * @returns Promise with formatted approval confirmation as Markdown content */ declare function approve(options: ApprovePullRequestToolArgsType): Promise; /** * Request changes on a pull request in Bitbucket * @param options - Options including workspace slug, repo slug, and pull request ID * @returns Promise with formatted rejection confirmation as Markdown content */ declare function reject(options: RejectPullRequestToolArgsType): Promise; declare const _default: { list: typeof list; get: typeof get; listComments: typeof listComments; addComment: typeof addComment; updateComment: (options: import("../tools/atlassian.pullrequests.types.js").UpdatePullRequestCommentToolArgsType) => Promise; deleteComment: (options: import("../tools/atlassian.pullrequests.types.js").DeletePullRequestCommentToolArgsType) => Promise; add: typeof add; update: typeof update; approve: typeof approve; reject: typeof reject; }; export default _default;