azure-devops-node-api
Version:
Node client for Azure DevOps and TFS REST APIs
565 lines • 114 kB
TypeScript
/// <reference types="node" />
import basem = require('./ClientApiBases');
import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
import GitInterfaces = require("./interfaces/GitInterfaces");
import TfsCoreInterfaces = require("./interfaces/CoreInterfaces");
import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
export interface IGitApi extends basem.ClientApiBase {
deleteEnablementStatus(allProjects: boolean, includeBillableCommitters?: boolean, projectIds?: string[]): Promise<void>;
getEnablementStatus(projectIds?: string[], billingDate?: Date, skip?: number, take?: number): Promise<GitInterfaces.AdvSecEnablementStatus[]>;
getEnableOnCreateHost(enableOnCreateHost: boolean): Promise<boolean>;
getEnableOnCreateProject(enableOnCreateProjectId: string): Promise<boolean>;
setEnableOnCreateHost(enableOnCreateHost: boolean): Promise<void>;
setEnableOnCreateProject(enableOnCreateProjectId: string, enableOnStatus: boolean): Promise<void>;
updateEnablementStatus(enablementUpdates: GitInterfaces.AdvSecEnablementUpdate[]): Promise<void>;
getEstimatedBillablePushersOrg(): Promise<GitInterfaces.BillablePusher[]>;
getEstimatedBillablePushersProject(project: string): Promise<GitInterfaces.BillablePusher[]>;
getEstimatedBillableCommittersRepo(project: string, repositoryId: string): Promise<GitInterfaces.BillableCommitter[]>;
getPermission(projectName?: string, repositoryId?: string, permission?: string): Promise<boolean>;
createAnnotatedTag(tagObject: GitInterfaces.GitAnnotatedTag, project: string, repositoryId: string): Promise<GitInterfaces.GitAnnotatedTag>;
getAnnotatedTag(project: string, repositoryId: string, objectId: string): Promise<GitInterfaces.GitAnnotatedTag>;
getBillableCommitters(project: string, billingDate?: Date, skip?: number, take?: number): Promise<GitInterfaces.BillableCommitter[]>;
getBillableCommittersDetail(project: string, includeDetails: string, billingDate?: Date): Promise<GitInterfaces.BillableCommitterDetail[]>;
getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<GitInterfaces.GitBlobRef>;
getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<NodeJS.ReadableStream>;
getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise<NodeJS.ReadableStream>;
getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<NodeJS.ReadableStream>;
getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise<GitInterfaces.GitBranchStats>;
getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise<GitInterfaces.GitBranchStats[]>;
getBranchStatsBatch(searchCriteria: GitInterfaces.GitQueryBranchStatsCriteria, repositoryId: string, project?: string): Promise<GitInterfaces.GitBranchStats[]>;
getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise<GitInterfaces.GitCommitChanges>;
getCherryPickConflict(repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
getCherryPickConflicts(repositoryId: string, cherryPickId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise<VSSInterfaces.PagedList<GitInterfaces.GitConflict>>;
updateCherryPickConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
updateCherryPickConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, cherryPickId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
getCherryPickRelationships(repositoryNameOrId: string, commitId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
createCherryPick(cherryPickToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise<GitInterfaces.GitCherryPick>;
getCherryPick(project: string, cherryPickId: number, repositoryId: string): Promise<GitInterfaces.GitCherryPick>;
getCherryPickForRefName(project: string, repositoryId: string, refName: string): Promise<GitInterfaces.GitCherryPick>;
getCommitDiffs(repositoryId: string, project?: string, diffCommonCommit?: boolean, top?: number, skip?: number, baseVersionDescriptor?: GitInterfaces.GitBaseVersionDescriptor, targetVersionDescriptor?: GitInterfaces.GitTargetVersionDescriptor): Promise<GitInterfaces.GitCommitDiffs>;
getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise<GitInterfaces.GitCommit>;
getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise<GitInterfaces.GitCommitRef[]>;
getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number, includeStatuses?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
getDeletedRepositories(project: string): Promise<GitInterfaces.GitDeletedRepository[]>;
getFileDiffs(fileDiffsCriteria: GitInterfaces.FileDiffsCriteria, project: string, repositoryId: string): Promise<GitInterfaces.FileDiff[]>;
getForks(repositoryNameOrId: string, collectionId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitRepositoryRef[]>;
createForkSyncRequest(syncParams: GitInterfaces.GitForkSyncRequestParameters, repositoryNameOrId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest>;
getForkSyncRequest(repositoryNameOrId: string, forkSyncOperationId: number, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest>;
getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest[]>;
createImportRequest(importRequest: GitInterfaces.GitImportRequest, project: string, repositoryId: string): Promise<GitInterfaces.GitImportRequest>;
getImportRequest(project: string, repositoryId: string, importRequestId: number): Promise<GitInterfaces.GitImportRequest>;
queryImportRequests(project: string, repositoryId: string, includeAbandoned?: boolean): Promise<GitInterfaces.GitImportRequest[]>;
updateImportRequest(importRequestToUpdate: GitInterfaces.GitImportRequest, project: string, repositoryId: string, importRequestId: number): Promise<GitInterfaces.GitImportRequest>;
getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise<GitInterfaces.GitItem>;
getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise<NodeJS.ReadableStream>;
getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, zipForUnix?: boolean): Promise<GitInterfaces.GitItem[]>;
getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise<NodeJS.ReadableStream>;
getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise<NodeJS.ReadableStream>;
getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise<GitInterfaces.GitItem[][]>;
getMergeBases(repositoryNameOrId: string, commitId: string, otherCommitId: string, project?: string, otherCollectionId?: string, otherRepositoryId?: string): Promise<GitInterfaces.GitCommitRef[]>;
createMergeRequest(mergeParameters: GitInterfaces.GitMergeParameters, project: string, repositoryNameOrId: string, includeLinks?: boolean): Promise<GitInterfaces.GitMerge>;
getMergeRequest(project: string, repositoryNameOrId: string, mergeOperationId: number, includeLinks?: boolean): Promise<GitInterfaces.GitMerge>;
createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.Attachment>;
deleteAttachment(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
getAttachmentContent(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<NodeJS.ReadableStream>;
getAttachments(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.Attachment[]>;
getAttachmentZip(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<NodeJS.ReadableStream>;
createLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
deleteLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
getLikes(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<VSSInterfaces.IdentityRef[]>;
getPullRequestIterationCommits(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number): Promise<GitInterfaces.GitCommitRef[]>;
getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise<VSSInterfaces.PagedList<GitInterfaces.GitCommitRef>>;
getPullRequestConflict(repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
getPullRequestConflicts(repositoryId: string, pullRequestId: number, project?: string, skip?: number, top?: number, includeObsolete?: boolean, excludeResolved?: boolean, onlyResolved?: boolean): Promise<GitInterfaces.GitConflict[]>;
updatePullRequestConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
updatePullRequestConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
getPullRequestIterationChanges(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number, compareTo?: number): Promise<GitInterfaces.GitPullRequestIterationChanges>;
getPullRequestIteration(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestIteration>;
getPullRequestIterations(repositoryId: string, pullRequestId: number, project?: string, includeCommits?: boolean): Promise<GitInterfaces.GitPullRequestIteration[]>;
createPullRequestIterationStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
deletePullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise<void>;
getPullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
getPullRequestIterationStatuses(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus[]>;
updatePullRequestIterationStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<void>;
createPullRequestLabel(label: TfsCoreInterfaces.WebApiCreateTagRequestData, repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition>;
deletePullRequestLabels(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise<void>;
getPullRequestLabel(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition>;
getPullRequestLabels(repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition[]>;
getPullRequestProperties(repositoryId: string, pullRequestId: number, project?: string): Promise<any>;
updatePullRequestProperties(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise<any>;
getPullRequestQuery(queries: GitInterfaces.GitPullRequestQuery, repositoryId: string, project?: string): Promise<GitInterfaces.GitPullRequestQuery>;
createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote[]>;
createUnmaterializedPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<void>;
getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote[]>;
updatePullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
updatePullRequestReviewers(patchVotes: GitInterfaces.IdentityRefWithVote[], repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
getPullRequestById(pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequest>;
getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise<GitInterfaces.GitPullRequest[]>;
createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string, supportsIterations?: boolean): Promise<GitInterfaces.GitPullRequest>;
getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean, includeWorkItemRefs?: boolean): Promise<GitInterfaces.GitPullRequest>;
getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise<GitInterfaces.GitPullRequest[]>;
updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequest>;
sharePullRequest(userMessage: GitInterfaces.ShareNotificationContext, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
createPullRequestStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
deletePullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise<void>;
getPullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
getPullRequestStatuses(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus[]>;
updatePullRequestStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
createComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.Comment>;
deleteComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
getComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<GitInterfaces.Comment>;
getComments(repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.Comment[]>;
updateComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<GitInterfaces.Comment>;
createThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestCommentThread>;
getPullRequestThread(repositoryId: string, pullRequestId: number, threadId: number, project?: string, iteration?: number, baseIteration?: number): Promise<GitInterfaces.GitPullRequestCommentThread>;
getThreads(repositoryId: string, pullRequestId: number, project?: string, iteration?: number, baseIteration?: number): Promise<GitInterfaces.GitPullRequestCommentThread[]>;
updateThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.GitPullRequestCommentThread>;
getPullRequestWorkItemRefs(repositoryId: string, pullRequestId: number, project?: string): Promise<VSSInterfaces.ResourceRef[]>;
createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise<GitInterfaces.GitPush>;
getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise<GitInterfaces.GitPush>;
getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise<GitInterfaces.GitPush[]>;
deleteRepositoryFromRecycleBin(project: string, repositoryId: string): Promise<void>;
getRecycleBinRepositories(project: string): Promise<GitInterfaces.GitDeletedRepository[]>;
restoreRepositoryFromRecycleBin(repositoryDetails: GitInterfaces.GitRecycleBinRepositoryDetails, project: string, repositoryId: string): Promise<GitInterfaces.GitRepository>;
getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean, includeStatuses?: boolean, includeMyBranches?: boolean, latestStatusesOnly?: boolean, peelTags?: boolean, filterContains?: string): Promise<VSSInterfaces.PagedList<GitInterfaces.GitRef>>;
updateRef(newRefInfo: GitInterfaces.GitRefUpdate, repositoryId: string, filter: string, project?: string, projectId?: string): Promise<GitInterfaces.GitRef>;
updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise<GitInterfaces.GitRefUpdateResult[]>;
createFavorite(favorite: GitInterfaces.GitRefFavorite, project: string): Promise<GitInterfaces.GitRefFavorite>;
deleteRefFavorite(project: string, favoriteId: number): Promise<void>;
getRefFavorite(project: string, favoriteId: number): Promise<GitInterfaces.GitRefFavorite>;
getRefFavorites(project: string, repositoryId?: string, identityId?: string): Promise<GitInterfaces.GitRefFavorite[]>;
getRefFavoritesForProject(project: string, identityId?: string): Promise<GitInterfaces.GitRefFavorite[]>;
createRepository(gitRepositoryToCreate: GitInterfaces.GitRepositoryCreateOptions, project?: string, sourceRef?: string): Promise<GitInterfaces.GitRepository>;
deleteRepository(repositoryId: string, project?: string): Promise<void>;
getRepositories(project?: string, includeLinks?: boolean, includeAllUrls?: boolean, includeHidden?: boolean): Promise<GitInterfaces.GitRepository[]>;
getRepository(repositoryId: string, project?: string): Promise<GitInterfaces.GitRepository>;
getRepositoryWithParent(repositoryId: string, includeParent: boolean, project?: string): Promise<GitInterfaces.GitRepository>;
updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise<GitInterfaces.GitRepository>;
getRevertConflict(repositoryId: string, revertId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
getRevertConflicts(repositoryId: string, revertId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise<VSSInterfaces.PagedList<GitInterfaces.GitConflict>>;
updateRevertConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, revertId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
updateRevertConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, revertId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
createRevert(revertToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise<GitInterfaces.GitRevert>;
getRevert(project: string, revertId: number, repositoryId: string): Promise<GitInterfaces.GitRevert>;
getRevertForRefName(project: string, repositoryId: string, refName: string): Promise<GitInterfaces.GitRevert>;
createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise<GitInterfaces.GitStatus>;
getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number, latestOnly?: boolean): Promise<GitInterfaces.GitStatus[]>;
getSuggestions(repositoryId: string, project?: string, preferCompareBranch?: boolean): Promise<GitInterfaces.GitSuggestion[]>;
getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise<GitInterfaces.GitTreeRef>;
getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise<NodeJS.ReadableStream>;
}
export declare class GitApi extends basem.ClientApiBase implements IGitApi {
constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
static readonly RESOURCE_AREA_ID = "4e080c62-fa21-4fbc-8fef-2a10a2b38049";
/**
* DELETE Deletes Enablement status and BillableCommitters data from DB. Deleting the enablement data will effectively disable it for the repositories affected.
*
* @param {boolean} allProjects
* @param {boolean} includeBillableCommitters
* @param {string[]} projectIds
*/
deleteEnablementStatus(allProjects: boolean, includeBillableCommitters?: boolean, projectIds?: string[]): Promise<void>;
/**
* GET Enablement status for project's repositories.
*
* @param {string[]} projectIds - Null defaults to all projects in the host, list of project's repos status to return
* @param {Date} billingDate - UTC expected, Null defaults to UtcNow(), can be provided for a point in time status
* @param {number} skip - Skip X rows of resultset to simulate paging.
* @param {number} take - Return Y rows of resultset to simulate paging.
*/
getEnablementStatus(projectIds?: string[], billingDate?: Date, skip?: number, take?: number): Promise<GitInterfaces.AdvSecEnablementStatus[]>;
/**
* @param {boolean} enableOnCreateHost
*/
getEnableOnCreateHost(enableOnCreateHost: boolean): Promise<boolean>;
/**
* @param {string} enableOnCreateProjectId
*/
getEnableOnCreateProject(enableOnCreateProjectId: string): Promise<boolean>;
/**
* @param {boolean} enableOnCreateHost
*/
setEnableOnCreateHost(enableOnCreateHost: boolean): Promise<void>;
/**
* @param {string} enableOnCreateProjectId
* @param {boolean} enableOnStatus
*/
setEnableOnCreateProject(enableOnCreateProjectId: string, enableOnStatus: boolean): Promise<void>;
/**
* POST Enablement status for repositories.
*
* @param {GitInterfaces.AdvSecEnablementUpdate[]} enablementUpdates
*/
updateEnablementStatus(enablementUpdates: GitInterfaces.AdvSecEnablementUpdate[]): Promise<void>;
/**
* Get estimated billable pushers for an Organization for last 90 days.
*
*/
getEstimatedBillablePushersOrg(): Promise<GitInterfaces.BillablePusher[]>;
/**
* Get estimated billable pushers for a project for last 90 days.
*
* @param {string} project - Project ID or project name
*/
getEstimatedBillablePushersProject(project: string): Promise<GitInterfaces.BillablePusher[]>;
/**
* Get estimated billable committers for a repository for the last 90 days.
*
* @param {string} project - Project ID or project name
* @param {string} repositoryId
*/
getEstimatedBillableCommittersRepo(project: string, repositoryId: string): Promise<GitInterfaces.BillableCommitter[]>;
/**
* GET Advanced Security Permission status.
*
* @param {string} projectName
* @param {string} repositoryId - Repository user is trying to access
* @param {string} permission - Permission being requestd, must be "viewAlert" "dismissAlert" "manage" "viewEnablement" or "repoRead"
*/
getPermission(projectName?: string, repositoryId?: string, permission?: string): Promise<boolean>;
/**
* Create an annotated tag.
*
* @param {GitInterfaces.GitAnnotatedTag} tagObject - Object containing details of tag to be created.
* @param {string} project - Project ID or project name
* @param {string} repositoryId - ID or name of the repository.
*/
createAnnotatedTag(tagObject: GitInterfaces.GitAnnotatedTag, project: string, repositoryId: string): Promise<GitInterfaces.GitAnnotatedTag>;
/**
* Get an annotated tag.
*
* @param {string} project - Project ID or project name
* @param {string} repositoryId - ID or name of the repository.
* @param {string} objectId - ObjectId (Sha1Id) of tag to get.
*/
getAnnotatedTag(project: string, repositoryId: string, objectId: string): Promise<GitInterfaces.GitAnnotatedTag>;
/**
* Retrieve actual billable committers for Advanced Security service for a given date.
*
* @param {string} project - Project ID or project name
* @param {Date} billingDate - UTC expected. If not specified defaults to the previous billing day.
* @param {number} skip - Skip X rows of resultset to simulate paging.
* @param {number} take - Return Y rows of resultset to simulate paging.
*/
getBillableCommitters(project: string, billingDate?: Date, skip?: number, take?: number): Promise<GitInterfaces.BillableCommitter[]>;
/**
* Retrieve detailed actual billable committers for Advanced Security service for a given date. Detailed results intentionally does not filter out soft deleted projects and repositories to help diagnose billing issues.
*
* @param {string} project - Project ID or project name
* @param {string} includeDetails - Return all the details on the billable committers.
* @param {Date} billingDate - UTC expected. If not specified defaults to the previous billing day.
*/
getBillableCommittersDetail(project: string, includeDetails: string, billingDate?: Date): Promise<GitInterfaces.BillableCommitterDetail[]>;
/**
* Get a single blob.
*
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
* @param {string} project - Project ID or project name
* @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip
* @param {string} fileName - Provide a fileName to use for a download.
* @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types
*/
getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<GitInterfaces.GitBlobRef>;
/**
* Get a single blob.
*
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
* @param {string} project - Project ID or project name
* @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip
* @param {string} fileName - Provide a fileName to use for a download.
* @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types
*/
getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<NodeJS.ReadableStream>;
/**
* Gets one or more blobs in a zip file download.
*
* @param {string[]} blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file.
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} project - Project ID or project name
* @param {string} filename
*/
getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise<NodeJS.ReadableStream>;
/**
* Get a single blob.
*
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
* @param {string} project - Project ID or project name
* @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip
* @param {string} fileName - Provide a fileName to use for a download.
* @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types
*/
getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<NodeJS.ReadableStream>;
/**
* Retrieve statistics about a single branch.
*
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} name - Name of the branch.
* @param {string} project - Project ID or project name
* @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base.
*/
getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise<GitInterfaces.GitBranchStats>;
/**
* Retrieve statistics about all branches within a repository.
*
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} project - Project ID or project name
* @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base.
*/
getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise<GitInterfaces.GitBranchStats[]>;
/**
* Retrieve statistics for multiple commits
*
* @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria - Base Commit and List of Target Commits to compare.
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} project - Project ID or project name
*/
getBranchStatsBatch(searchCriteria: GitInterfaces.GitQueryBranchStatsCriteria, repositoryId: string, project?: string): Promise<GitInterfaces.GitBranchStats[]>;
/**
* Retrieve changes for a particular commit.
*
* @param {string} commitId - The id of the commit.
* @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
* @param {string} project - Project ID or project name
* @param {number} top - The maximum number of changes to return.
* @param {number} skip - The number of changes to skip.
*/
getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise<GitInterfaces.GitCommitChanges>;
/**
* Retrieve one conflict for a cherry pick by ID
*
* @param {string} repositoryId
* @param {number} cherryPickId
* @param {number} conflictId
* @param {string} project - Project ID or project name
*/
getCherryPickConflict(repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
/**
* Retrieve all conflicts for a cherry pick
*
* @param {string} repositoryId
* @param {number} cherryPickId
* @param {string} project - Project ID or project name
* @param {string} continuationToken
* @param {number} top
* @param {boolean} excludeResolved
* @param {boolean} onlyResolved
* @param {boolean} includeObsolete
*/
getCherryPickConflicts(repositoryId: string, cherryPickId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise<VSSInterfaces.PagedList<GitInterfaces.GitConflict>>;
/**
* Update merge conflict resolution
*
* @param {GitInterfaces.GitConflict} conflict
* @param {string} repositoryId
* @param {number} cherryPickId
* @param {number} conflictId
* @param {string} project - Project ID or project name
*/
updateCherryPickConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
/**
* Update multiple merge conflict resolutions
*
* @param {GitInterfaces.GitConflict[]} conflictUpdates
* @param {string} repositoryId
* @param {number} cherryPickId
* @param {string} project - Project ID or project name
*/
updateCherryPickConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, cherryPickId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
/**
* Given a commitId, returns a list of commits that are in the same cherry-pick family.
*
* @param {string} repositoryNameOrId
* @param {string} commitId
* @param {string} project - Project ID or project name
* @param {boolean} includeLinks
*/
getCherryPickRelationships(repositoryNameOrId: string, commitId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
/**
* Cherry pick a specific commit or commits that are associated to a pull request into a new branch.
*
* @param {GitInterfaces.GitAsyncRefOperationParameters} cherryPickToCreate
* @param {string} project - Project ID or project name
* @param {string} repositoryId - ID of the repository.
*/
createCherryPick(cherryPickToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise<GitInterfaces.GitCherryPick>;
/**
* Retrieve information about a cherry pick operation by cherry pick Id.
*
* @param {string} project - Project ID or project name
* @param {number} cherryPickId - ID of the cherry pick.
* @param {string} repositoryId - ID of the repository.
*/
getCherryPick(project: string, cherryPickId: number, repositoryId: string): Promise<GitInterfaces.GitCherryPick>;
/**
* Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations.
*
* @param {string} project - Project ID or project name
* @param {string} repositoryId - ID of the repository.
* @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation.
*/
getCherryPickForRefName(project: string, repositoryId: string, refName: string): Promise<GitInterfaces.GitCherryPick>;
/**
* Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits.
*
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} project - Project ID or project name
* @param {boolean} diffCommonCommit - If true, diff between common and target commits. If false, diff between base and target commits.
* @param {number} top - Maximum number of changes to return. Defaults to 100.
* @param {number} skip - Number of changes to skip
* @param {GitInterfaces.GitBaseVersionDescriptor} baseVersionDescriptor - Descriptor for base commit.
* @param {GitInterfaces.GitTargetVersionDescriptor} targetVersionDescriptor - Descriptor for target commit.
*/
getCommitDiffs(repositoryId: string, project?: string, diffCommonCommit?: boolean, top?: number, skip?: number, baseVersionDescriptor?: GitInterfaces.GitBaseVersionDescriptor, targetVersionDescriptor?: GitInterfaces.GitTargetVersionDescriptor): Promise<GitInterfaces.GitCommitDiffs>;
/**
* Retrieve a particular commit.
*
* @param {string} commitId - The id of the commit.
* @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
* @param {string} project - Project ID or project name
* @param {number} changeCount - The number of changes to include in the result.
*/
getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise<GitInterfaces.GitCommit>;
/**
* Retrieve git commits for a project
*
* @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
* @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria
* @param {string} project - Project ID or project name
* @param {number} skip
* @param {number} top
*/
getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise<GitInterfaces.GitCommitRef[]>;
/**
* Retrieve a list of commits associated with a particular push.
*
* @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
* @param {number} pushId - The id of the push.
* @param {string} project - Project ID or project name
* @param {number} top - The maximum number of commits to return ("get the top x commits").
* @param {number} skip - The number of commits to skip.
* @param {boolean} includeLinks - Set to false to avoid including REST Url links for resources. Defaults to true.
*/
getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
/**
* Retrieve git commits for a project matching the search criteria
*
* @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} project - Project ID or project name
* @param {number} skip - Number of commits to skip. The value cannot exceed 3,000,000.
* @param {number} top - Maximum number of commits to return. The value cannot exceed 50,000.
* @param {boolean} includeStatuses - True to include additional commit status information.
*/
getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number, includeStatuses?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
/**
* Retrieve deleted git repositories.
*
* @param {string} project - Project ID or project name
*/
getDeletedRepositories(project: string): Promise<GitInterfaces.GitDeletedRepository[]>;
/**
* Get the file diffs for each of the specified files
*
* @param {GitInterfaces.FileDiffsCriteria} fileDiffsCriteria - List of file parameters objects
* @param {string} project - Project ID or project name
* @param {string} repositoryId - The name or ID of the repository
*/
getFileDiffs(fileDiffsCriteria: GitInterfaces.FileDiffsCriteria, project: string, repositoryId: string): Promise<GitInterfaces.FileDiff[]>;
/**
* Retrieve all forks of a repository in the collection.
*
* @param {string} repositoryNameOrId - The name or ID of the repository.
* @param {string} collectionId - Team project collection ID.
* @param {string} project - Project ID or project name
* @param {boolean} includeLinks - True to include links.
*/
getForks(repositoryNameOrId: string, collectionId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitRepositoryRef[]>;
/**
* Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the <a href="https://docs.microsoft.com/en-us/rest/api/vsts/git/repositories/create?view=azure-devops-rest-5.1"> repositories endpoint</a>
*
* @param {GitInterfaces.GitForkSyncRequestParameters} syncParams - Source repository and ref mapping.
* @param {string} repositoryNameOrId - The name or ID of the repository.
* @param {string} project - Project ID or project name
* @param {boolean} includeLinks - True to include links
*/
createForkSyncRequest(syncParams: GitInterfaces.GitForkSyncRequestParameters, repositoryNameOrId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest>;
/**
* Get a specific fork sync operation's details.
*
* @param {string} repositoryNameOrId - The name or ID of the repository.
* @param {number} forkSyncOperationId - OperationId of the sync request.
* @param {string} project - Project ID or project name
* @param {boolean} includeLinks - True to include links.
*/
getForkSyncRequest(repositoryNameOrId: string, forkSyncOperationId: number, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest>;
/**
* Retrieve all requested fork sync operations on this repository.
*
* @param {string} repositoryNameOrId - The name or ID of the repository.
* @param {string} project - Project ID or project name
* @param {boolean} includeAbandoned - True to include abandoned requests.
* @param {boolean} includeLinks - True to include links.
*/
getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest[]>;
/**
* Create an import request.
*
* @param {GitInterfaces.GitImportRequest} importRequest - The import request to create.
* @param {string} project - Project ID or project name
* @param {string} repositoryId - The name or ID of the repository.
*/
createImportRequest(importRequest: GitInterfaces.GitImportRequest, project: string, repositoryId: string): Promise<GitInterfaces.GitImportRequest>;
/**
* Retrieve a particular import request.
*
* @param {string} project - Project ID or project name
* @param {string} repositoryId - The name or ID of the repository.
* @param {number} importRequestId - The unique identifier for the import request.
*/
getImportRequest(project: string, repositoryId: string, importRequestId: number): Promise<GitInterfaces.GitImportRequest>;
/**
* Retrieve import requests for a repository.
*
* @param {string} project - Project ID or project name
* @param {string} repositoryId - The name or ID of the repository.
* @param {boolean} includeAbandoned - True to include abandoned import requests in the results.
*/
queryImportRequests(project: string, repositoryId: string, includeAbandoned?: boolean): Promise<GitInterfaces.GitImportRequest[]>;
/**
* Retry or abandon a failed import request.
*
* @param {GitInterfaces.GitImportRequest} importRequestToUpdate - The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned.
* @param {string} project - Project ID or project name
* @param {string} repositoryId - The name or ID of the repository.
* @param {number} importRequestId - The unique identifier for the import request to update.
*/
updateImportRequest(importRequestToUpdate: GitInterfaces.GitImportRequest, project: string, repositoryId: string, importRequestId: number): Promise<GitInterfaces.GitImportRequest>;
/**
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.
*
* @param {string} repositoryId - The name or ID of the repository.
* @param {string} path - The item path.
* @param {string} project - Project ID or project name
* @param {string} scopePath - The path scope. The default is null.
* @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion.
* @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false.
* @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false.
* @param {boolean} download - Set to true to download the response as a file. Default is false.
* @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository.
* @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
* @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
* @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
*/
getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise<GitInterfaces.GitItem>;
/**
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.
*
* @param {string} repositoryId - The name or ID of the repository.
* @param {string