Skip to main content

ReviewMerge API

Review Merge API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
addLinkedJobLinks an existing job to a review-merge request.
addPheromoneAdds a pheromone tag to a review-merge request.
addProposedJobAdds a proposed job to a review-merge request.
addReviewAdds a review or feedback to a review-merge request.
approveProposedJobApproves a proposed job on a review-merge request.
approveUnlockRequestApproves an unlock request, releasing the lock on a review-merge request.
convertProposedJobConverts an approved proposed job into an actual job.
createCreates a new review-merge request.
createUnlockRequestCreates an unlock request for a locked review-merge request.
deleteDeletes a review-merge request.
getRetrieves a specific review-merge request by its ID.
getAllRetrieves all review-merge requests, optionally filtered by query parameters.
getByAgentRetrieves all review-merge requests associated with a specific agent.
getBySwarmRetrieves all review-merge requests associated with a specific swarm.
getPendingRetrieves all pending review-merge requests.
getPheromoneTypesRetrieves the list of available pheromone types.
getReadyToMergeRetrieves all review-merge requests that are approved and ready to merge.
getStatisticsRetrieves aggregate statistics about review-merge requests.
lockLocks a review-merge request to prevent concurrent modifications.
mergeMerges an approved review-merge request.
rejectProposedJobRejects a proposed job on a review-merge request.
rejectUnlockRequestRejects an unlock request, keeping the review-merge request locked.
removeLinkedJobRemoves a linked job from a review-merge request.
removePheromoneRemoves a pheromone tag from a review-merge request.
unlockUnlocks a previously locked review-merge request.
updateUpdates an existing review-merge request.
updateStatusUpdates the status of a review-merge request.

Methods


addLinkedJob

client.reviewMerge.addLinkedJob(id: string, data: AddLinkedJobRequest): Promise<unknown>

Links an existing job to a review-merge request.

Associates a job with this review so that changes from the job are tracked as part of the review workflow.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
dataAddLinkedJobRequestYesThe linked job details including the job ID to associate

Returns: Promise<unknown> — A promise that resolves when the job has been linked

Full reference →


addPheromone

client.reviewMerge.addPheromone(id: string, data: AddPheromoneRequest): Promise<unknown>

Adds a pheromone tag to a review-merge request.

Pheromones are metadata signals used for inter-agent communication. Adding a pheromone allows agents to tag reviews with contextual information that other agents can detect.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
dataAddPheromoneRequestYesThe pheromone data to attach

Returns: Promise<unknown> — A promise that resolves when the pheromone has been added

Full reference →


addProposedJob

client.reviewMerge.addProposedJob(id: string, data: AddProposedJobRequest): Promise<unknown>

Adds a proposed job to a review-merge request.

Proposed jobs are suggested work items that arise from the review process. They must be approved before being converted into actual jobs.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
dataAddProposedJobRequestYesThe proposed job details

Returns: Promise<unknown> — A promise that resolves when the proposed job has been added

Full reference →


addReview

client.reviewMerge.addReview(id: string, data: AddReviewFeedbackRequest): Promise<unknown>

Adds a review or feedback to a review-merge request.

Submits review feedback (approval, rejection, or comments) from a reviewer. Multiple reviews can be added from different reviewers.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
dataAddReviewFeedbackRequestYesThe review feedback payload containing the reviewer's assessment

Returns: Promise<unknown> — A promise that resolves when the review has been added

Full reference →


approveProposedJob

client.reviewMerge.approveProposedJob(id: string, proposedJobId: string, data?: Record<string, unknown>): Promise<unknown>

Approves a proposed job on a review-merge request.

Marks the proposed job as approved, making it eligible for conversion into an actual job.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
proposedJobIdstringYesThe unique identifier of the proposed job to approve
dataRecord<string, unknown>NoOptional additional data for the approval

Returns: Promise<unknown> — A promise that resolves when the proposed job has been approved

Full reference →


approveUnlockRequest

client.reviewMerge.approveUnlockRequest(id: string, unlockRequestId: string, data?: Record<string, unknown>): Promise<unknown>

Approves an unlock request, releasing the lock on a review-merge request.

The lock holder calls this to grant an unlock request from another agent.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
unlockRequestIdstringYesThe unique identifier of the unlock request to approve
dataRecord<string, unknown>NoOptional additional data for the approval

Returns: Promise<unknown> — A promise that resolves when the unlock request has been approved

Full reference →


convertProposedJob

client.reviewMerge.convertProposedJob(id: string, proposedJobId: string, data?: Record<string, unknown>): Promise<unknown>

Converts an approved proposed job into an actual job.

Takes a previously approved proposed job and creates a real job from it. The proposed job must have been approved before conversion.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
proposedJobIdstringYesThe unique identifier of the approved proposed job to convert
dataRecord<string, unknown>NoOptional additional data for the conversion

Returns: Promise<unknown> — A promise that resolves when the proposed job has been converted

Full reference →


create

client.reviewMerge.create(data: CreateReviewMergeRequest): Promise<ReviewMergeRequest>

Creates a new review-merge request.

Initiates a review workflow for a set of changes. The request will enter the pending state and can be reviewed, locked, and eventually merged.

ParameterTypeRequiredDescription
dataCreateReviewMergeRequestYesThe review-merge request creation payload

Returns: Promise<ReviewMergeRequest> — A promise that resolves to the newly created ReviewMergeRequest

Full reference →


createUnlockRequest

client.reviewMerge.createUnlockRequest(id: string, data: CreateUnlockRequest): Promise<unknown>

Creates an unlock request for a locked review-merge request.

When a review is locked by another agent, this creates a formal request to unlock it. The lock holder can then approve or reject the unlock request.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the locked review-merge request
dataCreateUnlockRequestYesThe unlock request payload with reason and requester information

Returns: Promise<unknown> — A promise that resolves when the unlock request has been created

Full reference →


delete

client.reviewMerge.delete(id: string): Promise<unknown>

Deletes a review-merge request.

Permanently removes a review-merge request and all associated data. This action cannot be undone.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request to delete

Returns: Promise<unknown> — A promise that resolves when the deletion is complete

Full reference →


get

client.reviewMerge.get(id: string): Promise<ReviewMergeRequest>

Retrieves a specific review-merge request by its ID.

Fetches the full details of a single review-merge request including its current status, reviews, pheromones, and linked jobs.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request

Returns: Promise<ReviewMergeRequest> — A promise that resolves to the ReviewMergeRequest object

Full reference →


getAll

client.reviewMerge.getAll(params?: Record<string, unknown>): Promise<ReviewMergeRequest[]>

Retrieves all review-merge requests, optionally filtered by query parameters.

Returns the complete list of review-merge requests. Use the optional params to filter by status, date range, or other criteria supported by the server.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering the results

Returns: Promise<ReviewMergeRequest[]> — A promise that resolves to an array of ReviewMergeRequest objects

Full reference →


getByAgent

client.reviewMerge.getByAgent(agentId: string): Promise<ReviewMergeRequest[]>

Retrieves all review-merge requests associated with a specific agent.

Filters requests by the agent that created or is assigned to them. Useful for building agent-specific review dashboards or tracking an agent's review workload.

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent to filter by

Returns: Promise<ReviewMergeRequest[]> — A promise that resolves to an array of ReviewMergeRequest objects for the agent

Full reference →


getBySwarm

client.reviewMerge.getBySwarm(swarmId: string): Promise<ReviewMergeRequest[]>

Retrieves all review-merge requests associated with a specific swarm.

Filters requests by the swarm that generated them. Useful for monitoring review activity within a particular swarm context.

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm to filter by

Returns: Promise<ReviewMergeRequest[]> — A promise that resolves to an array of ReviewMergeRequest objects for the swarm

Full reference →


getPending

client.reviewMerge.getPending(): Promise<ReviewMergeRequest[]>

Retrieves all pending review-merge requests.

Returns requests that are awaiting review and have not yet been approved or rejected. Use this to build a review queue or dashboard showing outstanding work.

No parameters.

Returns: Promise<ReviewMergeRequest[]> — A promise that resolves to an array of pending ReviewMergeRequest objects

Full reference →


getPheromoneTypes

client.reviewMerge.getPheromoneTypes(): Promise<string[]>

Retrieves the list of available pheromone types.

Pheromones are tags or signals that can be attached to review requests to communicate metadata to other agents. This returns the set of recognized pheromone type strings.

No parameters.

Returns: Promise<string[]> — A promise that resolves to an array of pheromone type name strings

Full reference →


getReadyToMerge

client.reviewMerge.getReadyToMerge(): Promise<ReviewMergeRequest[]>

Retrieves all review-merge requests that are approved and ready to merge.

Filters for requests that have passed all review criteria and can be merged immediately. Useful for automated merge pipelines or merge-ready dashboards.

No parameters.

Returns: Promise<ReviewMergeRequest[]> — A promise that resolves to an array of merge-ready ReviewMergeRequest objects

Full reference →


getStatistics

client.reviewMerge.getStatistics(): Promise<ReviewMergeStatistics>

Retrieves aggregate statistics about review-merge requests.

Returns counts and metrics across all review states, useful for monitoring review throughput and identifying bottlenecks in the review process.

No parameters.

Returns: Promise<ReviewMergeStatistics> — A promise that resolves to a ReviewMergeStatistics object with aggregate data

Full reference →


lock

client.reviewMerge.lock(id: string, data?: LockReviewRequest): Promise<unknown>

Locks a review-merge request to prevent concurrent modifications.

Acquiring a lock ensures exclusive access while performing operations on the request. Other agents attempting to modify a locked request will be blocked.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request to lock
dataLockReviewRequestNoOptional lock configuration parameters

Returns: Promise<unknown> — A promise that resolves when the lock has been acquired

Full reference →


merge

client.reviewMerge.merge(id: string, data?: MergeReviewRequest): Promise<unknown>

Merges an approved review-merge request.

Executes the final merge operation on a review that has been approved and is ready to merge. This applies the associated changes to the target branch or codebase.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request to merge
dataMergeReviewRequestNoOptional merge configuration parameters

Returns: Promise<unknown> — A promise that resolves when the merge is complete

Full reference →


rejectProposedJob

client.reviewMerge.rejectProposedJob(id: string, proposedJobId: string, data?: Record<string, unknown>): Promise<unknown>

Rejects a proposed job on a review-merge request.

Marks the proposed job as rejected, preventing it from being converted into an actual job.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
proposedJobIdstringYesThe unique identifier of the proposed job to reject
dataRecord<string, unknown>NoOptional additional data such as rejection reason

Returns: Promise<unknown> — A promise that resolves when the proposed job has been rejected

Full reference →


rejectUnlockRequest

client.reviewMerge.rejectUnlockRequest(id: string, unlockRequestId: string, data?: Record<string, unknown>): Promise<unknown>

Rejects an unlock request, keeping the review-merge request locked.

The lock holder calls this to deny an unlock request from another agent.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
unlockRequestIdstringYesThe unique identifier of the unlock request to reject
dataRecord<string, unknown>NoOptional additional data such as rejection reason

Returns: Promise<unknown> — A promise that resolves when the unlock request has been rejected

Full reference →


removeLinkedJob

client.reviewMerge.removeLinkedJob(id: string, jobId: string): Promise<unknown>

Removes a linked job from a review-merge request.

Disassociates a previously linked job from the review request.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
jobIdstringYesThe unique identifier of the job to unlink

Returns: Promise<unknown> — A promise that resolves when the job has been unlinked

Full reference →


removePheromone

client.reviewMerge.removePheromone(id: string, type: string): Promise<unknown>

Removes a pheromone tag from a review-merge request.

Detaches a previously added pheromone by its type string from the review request.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
typestringYesThe pheromone type string to remove

Returns: Promise<unknown> — A promise that resolves when the pheromone has been removed

Full reference →


unlock

client.reviewMerge.unlock(id: string, data?: UnlockReviewRequest): Promise<unknown>

Unlocks a previously locked review-merge request.

Releases the lock on a review request, allowing other agents to modify it again.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request to unlock
dataUnlockReviewRequestNoOptional unlock parameters

Returns: Promise<unknown> — A promise that resolves when the lock has been released

Full reference →


update

client.reviewMerge.update(id: string, data: UpdateReviewMergeRequest): Promise<ReviewMergeRequest>

Updates an existing review-merge request.

Modifies the mutable fields of a review-merge request such as title, description, or other metadata. Does not change the review status.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request to update
dataUpdateReviewMergeRequestYesThe fields to update

Returns: Promise<ReviewMergeRequest> — A promise that resolves to the updated ReviewMergeRequest

Full reference →


updateStatus

client.reviewMerge.updateStatus(id: string, data: UpdateReviewStatusRequest): Promise<unknown>

Updates the status of a review-merge request.

Transitions the request to a new review status (e.g., approved, rejected, needs-changes). This is the primary mechanism for progressing a request through the review workflow.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the review-merge request
dataUpdateReviewStatusRequestYesThe status update payload containing the new status

Returns: Promise<unknown> — A promise that resolves when the status has been updated

Full reference →