import { PullRequestDetailed, PullRequestsResponse, ListPullRequestsParams, GetPullRequestParams, GetPullRequestCommentsParams, PullRequestCommentsResponse, PullRequestComment, CreatePullRequestCommentParams, UpdatePullRequestCommentParams, DeletePullRequestCommentParams, CreatePullRequestParams, UpdatePullRequestParams, ApprovePullRequestParams, RejectPullRequestParams, PullRequestParticipant, DiffstatResponse } from './vendor.atlassian.pullrequests.types.js'; /** * List pull requests for a repository * @param {ListPullRequestsParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {PullRequestState | PullRequestState[]} [params.state] - Filter by pull request state (default: 'OPEN') * @param {string} [params.q] - Query string to filter pull requests * @param {string} [params.sort] - Property to sort by (e.g., 'created_on', '-updated_on') * @param {number} [params.page] - Page number for pagination * @param {number} [params.pagelen] - Number of items per page * @returns {Promise} Response containing pull requests * @example * ```typescript * // List open pull requests in a repository, sorted by creation date * const response = await list({ * workspace: 'myworkspace', * repo_slug: 'myrepo', * sort: '-created_on', * pagelen: 25 * }); * ``` */ declare function list(params: ListPullRequestsParams): Promise; /** * Get detailed information about a specific Bitbucket pull request * * Retrieves comprehensive details about a single pull request. * * @async * @memberof VendorAtlassianPullRequestsService * @param {GetPullRequestParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {number} params.pull_request_id - The ID of the pull request * @returns {Promise} Promise containing the detailed pull request information * @throws {Error} If Atlassian credentials are missing or API request fails * @example * // Get pull request details * const pullRequest = await get({ * workspace: 'my-workspace', * repo_slug: 'my-repo', * pull_request_id: 123 * }); */ declare function get(params: GetPullRequestParams): Promise; /** * Get comments for a specific Bitbucket pull request * * Retrieves all comments on a specific pull request, including general comments and * inline code review comments. Supports pagination. * * @async * @memberof VendorAtlassianPullRequestsService * @param {GetPullRequestCommentsParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {number} params.pull_request_id - The ID of the pull request * @param {number} [params.page] - Page number for pagination * @param {number} [params.pagelen] - Number of items per page * @returns {Promise} Promise containing the pull request comments * @throws {Error} If Atlassian credentials are missing or API request fails * @example * // Get comments for a pull request * const comments = await getComments({ * workspace: 'my-workspace', * repo_slug: 'my-repo', * pull_request_id: 123, * pagelen: 25 * }); */ declare function getComments(params: GetPullRequestCommentsParams): Promise; /** * Add a comment to a specific Bitbucket pull request * * Creates a new comment on a pull request, either as a general comment or * as an inline code comment attached to a specific file and line. * * @async * @memberof VendorAtlassianPullRequestsService * @param {CreatePullRequestCommentParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {number} params.pull_request_id - The ID of the pull request * @param {Object} params.content - The content of the comment * @param {string} params.content.raw - The raw text of the comment * @param {Object} [params.inline] - Optional inline comment location * @param {string} params.inline.path - The file path for the inline comment * @param {number} params.inline.to - The line number in the file * @returns {Promise} Promise containing the created comment * @throws {Error} If Atlassian credentials are missing or API request fails * @example * // Add a general comment to a pull request * const comment = await addComment({ * workspace: 'my-workspace', * repo_slug: 'my-repo', * pull_request_id: 123, * content: { raw: "This looks good to me!" } * }); * * // Add an inline code comment * const comment = await addComment({ * workspace: 'my-workspace', * repo_slug: 'my-repo', * pull_request_id: 123, * content: { raw: "Consider using a constant here instead." }, * inline: { path: "src/main.js", to: 42 } * }); */ declare function createComment(params: CreatePullRequestCommentParams): Promise; /** * Update a comment on a Bitbucket pull request * @param params - Parameters including workspace, repo, PR ID, comment ID, and updated content * @returns Promise resolving to the updated comment */ declare function updateComment(params: UpdatePullRequestCommentParams): Promise; /** * Delete a comment from a Bitbucket pull request * @param params - Parameters including workspace, repo, PR ID, and comment ID * @returns Promise resolving when deletion is complete */ declare function deleteComment(params: DeletePullRequestCommentParams): Promise; /** * Create a new pull request * @param {CreatePullRequestParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {string} params.title - Title of the pull request * @param {string} params.source.branch.name - Source branch name * @param {string} params.destination.branch.name - Destination branch name (defaults to main/master) * @param {string} [params.description] - Optional description for the pull request * @param {boolean} [params.close_source_branch] - Whether to close the source branch after merge (default: false) * @returns {Promise} Detailed information about the created pull request * @example * ```typescript * // Create a new pull request * const pullRequest = await create({ * workspace: 'myworkspace', * repo_slug: 'myrepo', * title: 'Add new feature', * source: { * branch: { * name: 'feature/new-feature' * } * }, * destination: { * branch: { * name: 'main' * } * }, * description: 'This PR adds a new feature...', * close_source_branch: true * }); * ``` */ declare function create(params: CreatePullRequestParams): Promise; /** * Get raw diff content for a specific Bitbucket pull request * * Retrieves the raw diff content showing actual code changes in the pull request. * The diff is returned in a standard unified diff format. * * @async * @memberof VendorAtlassianPullRequestsService * @param {GetPullRequestParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {number} params.pull_request_id - The ID of the pull request * @returns {Promise} Promise containing the raw diff content * @throws {Error} If Atlassian credentials are missing or API request fails * @example * // Get raw diff content for a pull request * const diffContent = await getRawDiff({ * workspace: 'my-workspace', * repo_slug: 'my-repo', * pull_request_id: 123 * }); */ declare function getRawDiff(params: GetPullRequestParams): Promise; /** * Get the diffstat information for a pull request * * Returns summary statistics about the changes in a pull request, * including files changed, insertions, and deletions. * * @async * @memberof VendorAtlassianPullRequestsService * @param {GetPullRequestParams} params - Parameters for the request * @returns {Promise} Promise containing the diffstat response */ declare function getDiffstat(params: GetPullRequestParams): Promise; /** * Fetches the raw diff content from a specific Bitbucket API URL. * Used primarily for fetching file-specific diffs linked from inline comments. * * @async * @param {string} url - The exact Bitbucket API URL to fetch the diff from. * @returns {Promise} Promise containing the raw diff content as a string. * @throws {Error} If Atlassian credentials are missing or the API request fails. */ declare function getDiffForUrl(url: string): Promise; /** * Update an existing pull request * @param {UpdatePullRequestParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {number} params.pull_request_id - The ID of the pull request to update * @param {string} [params.title] - Updated title of the pull request * @param {string} [params.description] - Updated description for the pull request * @returns {Promise} Updated pull request information * @example * ```typescript * // Update a pull request's title and description * const updatedPR = await update({ * workspace: 'myworkspace', * repo_slug: 'myrepo', * pull_request_id: 123, * title: 'Updated Feature Implementation', * description: 'This PR now includes additional improvements...' * }); * ``` */ declare function update(params: UpdatePullRequestParams): Promise; /** * Approve a pull request * @param {ApprovePullRequestParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {number} params.pull_request_id - The ID of the pull request to approve * @returns {Promise} Participant information showing approval status * @example * ```typescript * // Approve a pull request * const approval = await approve({ * workspace: 'myworkspace', * repo_slug: 'myrepo', * pull_request_id: 123 * }); * ``` */ declare function approve(params: ApprovePullRequestParams): Promise; /** * Request changes on a pull request (reject) * @param {RejectPullRequestParams} params - Parameters for the request * @param {string} params.workspace - The workspace slug or UUID * @param {string} params.repo_slug - The repository slug or UUID * @param {number} params.pull_request_id - The ID of the pull request to request changes on * @returns {Promise} Participant information showing rejection status * @example * ```typescript * // Request changes on a pull request * const rejection = await reject({ * workspace: 'myworkspace', * repo_slug: 'myrepo', * pull_request_id: 123 * }); * ``` */ declare function reject(params: RejectPullRequestParams): Promise; declare const _default: { list: typeof list; get: typeof get; getComments: typeof getComments; createComment: typeof createComment; updateComment: typeof updateComment; deleteComment: typeof deleteComment; create: typeof create; update: typeof update; approve: typeof approve; reject: typeof reject; getRawDiff: typeof getRawDiff; getDiffstat: typeof getDiffstat; getDiffForUrl: typeof getDiffForUrl; }; export default _default;