UNPKG

114 kBTypeScriptView Raw
1/// <reference types="node" />
2import basem = require('./ClientApiBases');
3import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
4import GitInterfaces = require("./interfaces/GitInterfaces");
5import TfsCoreInterfaces = require("./interfaces/CoreInterfaces");
6import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
7export interface IGitApi extends basem.ClientApiBase {
8 deleteEnablementStatus(allProjects: boolean, includeBillableCommitters?: boolean, projectIds?: string[]): Promise<void>;
9 getEnablementStatus(projectIds?: string[], billingDate?: Date, skip?: number, take?: number): Promise<GitInterfaces.AdvSecEnablementStatus[]>;
10 getEnableOnCreateHost(enableOnCreateHost: boolean): Promise<boolean>;
11 getEnableOnCreateProject(enableOnCreateProjectId: string): Promise<boolean>;
12 setEnableOnCreateHost(enableOnCreateHost: boolean): Promise<void>;
13 setEnableOnCreateProject(enableOnCreateProjectId: string, enableOnStatus: boolean): Promise<void>;
14 updateEnablementStatus(enablementUpdates: GitInterfaces.AdvSecEnablementUpdate[]): Promise<void>;
15 getEstimatedBillablePushersOrg(): Promise<GitInterfaces.BillablePusher[]>;
16 getEstimatedBillablePushersProject(project: string): Promise<GitInterfaces.BillablePusher[]>;
17 getEstimatedBillableCommittersRepo(project: string, repositoryId: string): Promise<GitInterfaces.BillableCommitter[]>;
18 getPermission(projectName?: string, repositoryId?: string, permission?: string): Promise<boolean>;
19 createAnnotatedTag(tagObject: GitInterfaces.GitAnnotatedTag, project: string, repositoryId: string): Promise<GitInterfaces.GitAnnotatedTag>;
20 getAnnotatedTag(project: string, repositoryId: string, objectId: string): Promise<GitInterfaces.GitAnnotatedTag>;
21 getBillableCommitters(project: string, billingDate?: Date, skip?: number, take?: number): Promise<GitInterfaces.BillableCommitter[]>;
22 getBillableCommittersDetail(project: string, includeDetails: string, billingDate?: Date): Promise<GitInterfaces.BillableCommitterDetail[]>;
23 getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<GitInterfaces.GitBlobRef>;
24 getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<NodeJS.ReadableStream>;
25 getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise<NodeJS.ReadableStream>;
26 getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<NodeJS.ReadableStream>;
27 getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise<GitInterfaces.GitBranchStats>;
28 getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise<GitInterfaces.GitBranchStats[]>;
29 getBranchStatsBatch(searchCriteria: GitInterfaces.GitQueryBranchStatsCriteria, repositoryId: string, project?: string): Promise<GitInterfaces.GitBranchStats[]>;
30 getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise<GitInterfaces.GitCommitChanges>;
31 getCherryPickConflict(repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
32 getCherryPickConflicts(repositoryId: string, cherryPickId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise<VSSInterfaces.PagedList<GitInterfaces.GitConflict>>;
33 updateCherryPickConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
34 updateCherryPickConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, cherryPickId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
35 getCherryPickRelationships(repositoryNameOrId: string, commitId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
36 createCherryPick(cherryPickToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise<GitInterfaces.GitCherryPick>;
37 getCherryPick(project: string, cherryPickId: number, repositoryId: string): Promise<GitInterfaces.GitCherryPick>;
38 getCherryPickForRefName(project: string, repositoryId: string, refName: string): Promise<GitInterfaces.GitCherryPick>;
39 getCommitDiffs(repositoryId: string, project?: string, diffCommonCommit?: boolean, top?: number, skip?: number, baseVersionDescriptor?: GitInterfaces.GitBaseVersionDescriptor, targetVersionDescriptor?: GitInterfaces.GitTargetVersionDescriptor): Promise<GitInterfaces.GitCommitDiffs>;
40 getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise<GitInterfaces.GitCommit>;
41 getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise<GitInterfaces.GitCommitRef[]>;
42 getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
43 getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number, includeStatuses?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
44 getDeletedRepositories(project: string): Promise<GitInterfaces.GitDeletedRepository[]>;
45 getFileDiffs(fileDiffsCriteria: GitInterfaces.FileDiffsCriteria, project: string, repositoryId: string): Promise<GitInterfaces.FileDiff[]>;
46 getForks(repositoryNameOrId: string, collectionId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitRepositoryRef[]>;
47 createForkSyncRequest(syncParams: GitInterfaces.GitForkSyncRequestParameters, repositoryNameOrId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest>;
48 getForkSyncRequest(repositoryNameOrId: string, forkSyncOperationId: number, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest>;
49 getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest[]>;
50 createImportRequest(importRequest: GitInterfaces.GitImportRequest, project: string, repositoryId: string): Promise<GitInterfaces.GitImportRequest>;
51 getImportRequest(project: string, repositoryId: string, importRequestId: number): Promise<GitInterfaces.GitImportRequest>;
52 queryImportRequests(project: string, repositoryId: string, includeAbandoned?: boolean): Promise<GitInterfaces.GitImportRequest[]>;
53 updateImportRequest(importRequestToUpdate: GitInterfaces.GitImportRequest, project: string, repositoryId: string, importRequestId: number): Promise<GitInterfaces.GitImportRequest>;
54 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>;
55 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>;
56 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[]>;
57 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>;
58 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>;
59 getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise<GitInterfaces.GitItem[][]>;
60 getMergeBases(repositoryNameOrId: string, commitId: string, otherCommitId: string, project?: string, otherCollectionId?: string, otherRepositoryId?: string): Promise<GitInterfaces.GitCommitRef[]>;
61 createMergeRequest(mergeParameters: GitInterfaces.GitMergeParameters, project: string, repositoryNameOrId: string, includeLinks?: boolean): Promise<GitInterfaces.GitMerge>;
62 getMergeRequest(project: string, repositoryNameOrId: string, mergeOperationId: number, includeLinks?: boolean): Promise<GitInterfaces.GitMerge>;
63 createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.Attachment>;
64 deleteAttachment(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
65 getAttachmentContent(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<NodeJS.ReadableStream>;
66 getAttachments(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.Attachment[]>;
67 getAttachmentZip(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<NodeJS.ReadableStream>;
68 createLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
69 deleteLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
70 getLikes(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<VSSInterfaces.IdentityRef[]>;
71 getPullRequestIterationCommits(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number): Promise<GitInterfaces.GitCommitRef[]>;
72 getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise<VSSInterfaces.PagedList<GitInterfaces.GitCommitRef>>;
73 getPullRequestConflict(repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
74 getPullRequestConflicts(repositoryId: string, pullRequestId: number, project?: string, skip?: number, top?: number, includeObsolete?: boolean, excludeResolved?: boolean, onlyResolved?: boolean): Promise<GitInterfaces.GitConflict[]>;
75 updatePullRequestConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
76 updatePullRequestConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
77 getPullRequestIterationChanges(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number, compareTo?: number): Promise<GitInterfaces.GitPullRequestIterationChanges>;
78 getPullRequestIteration(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestIteration>;
79 getPullRequestIterations(repositoryId: string, pullRequestId: number, project?: string, includeCommits?: boolean): Promise<GitInterfaces.GitPullRequestIteration[]>;
80 createPullRequestIterationStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
81 deletePullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise<void>;
82 getPullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
83 getPullRequestIterationStatuses(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus[]>;
84 updatePullRequestIterationStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<void>;
85 createPullRequestLabel(label: TfsCoreInterfaces.WebApiCreateTagRequestData, repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition>;
86 deletePullRequestLabels(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise<void>;
87 getPullRequestLabel(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition>;
88 getPullRequestLabels(repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition[]>;
89 getPullRequestProperties(repositoryId: string, pullRequestId: number, project?: string): Promise<any>;
90 updatePullRequestProperties(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise<any>;
91 getPullRequestQuery(queries: GitInterfaces.GitPullRequestQuery, repositoryId: string, project?: string): Promise<GitInterfaces.GitPullRequestQuery>;
92 createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
93 createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote[]>;
94 createUnmaterializedPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
95 deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<void>;
96 getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
97 getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote[]>;
98 updatePullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
99 updatePullRequestReviewers(patchVotes: GitInterfaces.IdentityRefWithVote[], repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
100 getPullRequestById(pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequest>;
101 getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise<GitInterfaces.GitPullRequest[]>;
102 createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string, supportsIterations?: boolean): Promise<GitInterfaces.GitPullRequest>;
103 getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean, includeWorkItemRefs?: boolean): Promise<GitInterfaces.GitPullRequest>;
104 getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise<GitInterfaces.GitPullRequest[]>;
105 updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequest>;
106 sharePullRequest(userMessage: GitInterfaces.ShareNotificationContext, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
107 createPullRequestStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
108 deletePullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise<void>;
109 getPullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
110 getPullRequestStatuses(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus[]>;
111 updatePullRequestStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
112 createComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.Comment>;
113 deleteComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
114 getComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<GitInterfaces.Comment>;
115 getComments(repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.Comment[]>;
116 updateComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<GitInterfaces.Comment>;
117 createThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestCommentThread>;
118 getPullRequestThread(repositoryId: string, pullRequestId: number, threadId: number, project?: string, iteration?: number, baseIteration?: number): Promise<GitInterfaces.GitPullRequestCommentThread>;
119 getThreads(repositoryId: string, pullRequestId: number, project?: string, iteration?: number, baseIteration?: number): Promise<GitInterfaces.GitPullRequestCommentThread[]>;
120 updateThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.GitPullRequestCommentThread>;
121 getPullRequestWorkItemRefs(repositoryId: string, pullRequestId: number, project?: string): Promise<VSSInterfaces.ResourceRef[]>;
122 createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise<GitInterfaces.GitPush>;
123 getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise<GitInterfaces.GitPush>;
124 getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise<GitInterfaces.GitPush[]>;
125 deleteRepositoryFromRecycleBin(project: string, repositoryId: string): Promise<void>;
126 getRecycleBinRepositories(project: string): Promise<GitInterfaces.GitDeletedRepository[]>;
127 restoreRepositoryFromRecycleBin(repositoryDetails: GitInterfaces.GitRecycleBinRepositoryDetails, project: string, repositoryId: string): Promise<GitInterfaces.GitRepository>;
128 getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean, includeStatuses?: boolean, includeMyBranches?: boolean, latestStatusesOnly?: boolean, peelTags?: boolean, filterContains?: string): Promise<VSSInterfaces.PagedList<GitInterfaces.GitRef>>;
129 updateRef(newRefInfo: GitInterfaces.GitRefUpdate, repositoryId: string, filter: string, project?: string, projectId?: string): Promise<GitInterfaces.GitRef>;
130 updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise<GitInterfaces.GitRefUpdateResult[]>;
131 createFavorite(favorite: GitInterfaces.GitRefFavorite, project: string): Promise<GitInterfaces.GitRefFavorite>;
132 deleteRefFavorite(project: string, favoriteId: number): Promise<void>;
133 getRefFavorite(project: string, favoriteId: number): Promise<GitInterfaces.GitRefFavorite>;
134 getRefFavorites(project: string, repositoryId?: string, identityId?: string): Promise<GitInterfaces.GitRefFavorite[]>;
135 getRefFavoritesForProject(project: string, identityId?: string): Promise<GitInterfaces.GitRefFavorite[]>;
136 createRepository(gitRepositoryToCreate: GitInterfaces.GitRepositoryCreateOptions, project?: string, sourceRef?: string): Promise<GitInterfaces.GitRepository>;
137 deleteRepository(repositoryId: string, project?: string): Promise<void>;
138 getRepositories(project?: string, includeLinks?: boolean, includeAllUrls?: boolean, includeHidden?: boolean): Promise<GitInterfaces.GitRepository[]>;
139 getRepository(repositoryId: string, project?: string): Promise<GitInterfaces.GitRepository>;
140 getRepositoryWithParent(repositoryId: string, includeParent: boolean, project?: string): Promise<GitInterfaces.GitRepository>;
141 updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise<GitInterfaces.GitRepository>;
142 getRevertConflict(repositoryId: string, revertId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
143 getRevertConflicts(repositoryId: string, revertId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise<VSSInterfaces.PagedList<GitInterfaces.GitConflict>>;
144 updateRevertConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, revertId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
145 updateRevertConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, revertId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
146 createRevert(revertToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise<GitInterfaces.GitRevert>;
147 getRevert(project: string, revertId: number, repositoryId: string): Promise<GitInterfaces.GitRevert>;
148 getRevertForRefName(project: string, repositoryId: string, refName: string): Promise<GitInterfaces.GitRevert>;
149 createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise<GitInterfaces.GitStatus>;
150 getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number, latestOnly?: boolean): Promise<GitInterfaces.GitStatus[]>;
151 getSuggestions(repositoryId: string, project?: string, preferCompareBranch?: boolean): Promise<GitInterfaces.GitSuggestion[]>;
152 getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise<GitInterfaces.GitTreeRef>;
153 getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise<NodeJS.ReadableStream>;
154}
155export declare class GitApi extends basem.ClientApiBase implements IGitApi {
156 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
157 static readonly RESOURCE_AREA_ID = "4e080c62-fa21-4fbc-8fef-2a10a2b38049";
158 /**
159 * DELETE Deletes Enablement status and BillableCommitters data from DB. Deleting the enablement data will effectively disable it for the repositories affected.
160 *
161 * @param {boolean} allProjects
162 * @param {boolean} includeBillableCommitters
163 * @param {string[]} projectIds
164 */
165 deleteEnablementStatus(allProjects: boolean, includeBillableCommitters?: boolean, projectIds?: string[]): Promise<void>;
166 /**
167 * GET Enablement status for project's repositories.
168 *
169 * @param {string[]} projectIds - Null defaults to all projects in the host, list of project's repos status to return
170 * @param {Date} billingDate - UTC expected, Null defaults to UtcNow(), can be provided for a point in time status
171 * @param {number} skip - Skip X rows of resultset to simulate paging.
172 * @param {number} take - Return Y rows of resultset to simulate paging.
173 */
174 getEnablementStatus(projectIds?: string[], billingDate?: Date, skip?: number, take?: number): Promise<GitInterfaces.AdvSecEnablementStatus[]>;
175 /**
176 * @param {boolean} enableOnCreateHost
177 */
178 getEnableOnCreateHost(enableOnCreateHost: boolean): Promise<boolean>;
179 /**
180 * @param {string} enableOnCreateProjectId
181 */
182 getEnableOnCreateProject(enableOnCreateProjectId: string): Promise<boolean>;
183 /**
184 * @param {boolean} enableOnCreateHost
185 */
186 setEnableOnCreateHost(enableOnCreateHost: boolean): Promise<void>;
187 /**
188 * @param {string} enableOnCreateProjectId
189 * @param {boolean} enableOnStatus
190 */
191 setEnableOnCreateProject(enableOnCreateProjectId: string, enableOnStatus: boolean): Promise<void>;
192 /**
193 * POST Enablement status for repositories.
194 *
195 * @param {GitInterfaces.AdvSecEnablementUpdate[]} enablementUpdates
196 */
197 updateEnablementStatus(enablementUpdates: GitInterfaces.AdvSecEnablementUpdate[]): Promise<void>;
198 /**
199 * Get estimated billable pushers for an Organization for last 90 days.
200 *
201 */
202 getEstimatedBillablePushersOrg(): Promise<GitInterfaces.BillablePusher[]>;
203 /**
204 * Get estimated billable pushers for a project for last 90 days.
205 *
206 * @param {string} project - Project ID or project name
207 */
208 getEstimatedBillablePushersProject(project: string): Promise<GitInterfaces.BillablePusher[]>;
209 /**
210 * Get estimated billable committers for a repository for the last 90 days.
211 *
212 * @param {string} project - Project ID or project name
213 * @param {string} repositoryId
214 */
215 getEstimatedBillableCommittersRepo(project: string, repositoryId: string): Promise<GitInterfaces.BillableCommitter[]>;
216 /**
217 * GET Advanced Security Permission status.
218 *
219 * @param {string} projectName
220 * @param {string} repositoryId - Repository user is trying to access
221 * @param {string} permission - Permission being requestd, must be "viewAlert" "dismissAlert" "manage" "viewEnablement" or "repoRead"
222 */
223 getPermission(projectName?: string, repositoryId?: string, permission?: string): Promise<boolean>;
224 /**
225 * Create an annotated tag.
226 *
227 * @param {GitInterfaces.GitAnnotatedTag} tagObject - Object containing details of tag to be created.
228 * @param {string} project - Project ID or project name
229 * @param {string} repositoryId - ID or name of the repository.
230 */
231 createAnnotatedTag(tagObject: GitInterfaces.GitAnnotatedTag, project: string, repositoryId: string): Promise<GitInterfaces.GitAnnotatedTag>;
232 /**
233 * Get an annotated tag.
234 *
235 * @param {string} project - Project ID or project name
236 * @param {string} repositoryId - ID or name of the repository.
237 * @param {string} objectId - ObjectId (Sha1Id) of tag to get.
238 */
239 getAnnotatedTag(project: string, repositoryId: string, objectId: string): Promise<GitInterfaces.GitAnnotatedTag>;
240 /**
241 * Retrieve actual billable committers for Advanced Security service for a given date.
242 *
243 * @param {string} project - Project ID or project name
244 * @param {Date} billingDate - UTC expected. If not specified defaults to the previous billing day.
245 * @param {number} skip - Skip X rows of resultset to simulate paging.
246 * @param {number} take - Return Y rows of resultset to simulate paging.
247 */
248 getBillableCommitters(project: string, billingDate?: Date, skip?: number, take?: number): Promise<GitInterfaces.BillableCommitter[]>;
249 /**
250 * 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.
251 *
252 * @param {string} project - Project ID or project name
253 * @param {string} includeDetails - Return all the details on the billable committers.
254 * @param {Date} billingDate - UTC expected. If not specified defaults to the previous billing day.
255 */
256 getBillableCommittersDetail(project: string, includeDetails: string, billingDate?: Date): Promise<GitInterfaces.BillableCommitterDetail[]>;
257 /**
258 * Get a single blob.
259 *
260 * @param {string} repositoryId - The name or ID of the repository.
261 * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
262 * @param {string} project - Project ID or project name
263 * @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
264 * @param {string} fileName - Provide a fileName to use for a download.
265 * @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
266 */
267 getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<GitInterfaces.GitBlobRef>;
268 /**
269 * Get a single blob.
270 *
271 * @param {string} repositoryId - The name or ID of the repository.
272 * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
273 * @param {string} project - Project ID or project name
274 * @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
275 * @param {string} fileName - Provide a fileName to use for a download.
276 * @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
277 */
278 getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<NodeJS.ReadableStream>;
279 /**
280 * Gets one or more blobs in a zip file download.
281 *
282 * @param {string[]} blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file.
283 * @param {string} repositoryId - The name or ID of the repository.
284 * @param {string} project - Project ID or project name
285 * @param {string} filename
286 */
287 getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise<NodeJS.ReadableStream>;
288 /**
289 * Get a single blob.
290 *
291 * @param {string} repositoryId - The name or ID of the repository.
292 * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.
293 * @param {string} project - Project ID or project name
294 * @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
295 * @param {string} fileName - Provide a fileName to use for a download.
296 * @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
297 */
298 getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise<NodeJS.ReadableStream>;
299 /**
300 * Retrieve statistics about a single branch.
301 *
302 * @param {string} repositoryId - The name or ID of the repository.
303 * @param {string} name - Name of the branch.
304 * @param {string} project - Project ID or project name
305 * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base.
306 */
307 getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise<GitInterfaces.GitBranchStats>;
308 /**
309 * Retrieve statistics about all branches within a repository.
310 *
311 * @param {string} repositoryId - The name or ID of the repository.
312 * @param {string} project - Project ID or project name
313 * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base.
314 */
315 getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise<GitInterfaces.GitBranchStats[]>;
316 /**
317 * Retrieve statistics for multiple commits
318 *
319 * @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria - Base Commit and List of Target Commits to compare.
320 * @param {string} repositoryId - The name or ID of the repository.
321 * @param {string} project - Project ID or project name
322 */
323 getBranchStatsBatch(searchCriteria: GitInterfaces.GitQueryBranchStatsCriteria, repositoryId: string, project?: string): Promise<GitInterfaces.GitBranchStats[]>;
324 /**
325 * Retrieve changes for a particular commit.
326 *
327 * @param {string} commitId - The id of the commit.
328 * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
329 * @param {string} project - Project ID or project name
330 * @param {number} top - The maximum number of changes to return.
331 * @param {number} skip - The number of changes to skip.
332 */
333 getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise<GitInterfaces.GitCommitChanges>;
334 /**
335 * Retrieve one conflict for a cherry pick by ID
336 *
337 * @param {string} repositoryId
338 * @param {number} cherryPickId
339 * @param {number} conflictId
340 * @param {string} project - Project ID or project name
341 */
342 getCherryPickConflict(repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
343 /**
344 * Retrieve all conflicts for a cherry pick
345 *
346 * @param {string} repositoryId
347 * @param {number} cherryPickId
348 * @param {string} project - Project ID or project name
349 * @param {string} continuationToken
350 * @param {number} top
351 * @param {boolean} excludeResolved
352 * @param {boolean} onlyResolved
353 * @param {boolean} includeObsolete
354 */
355 getCherryPickConflicts(repositoryId: string, cherryPickId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise<VSSInterfaces.PagedList<GitInterfaces.GitConflict>>;
356 /**
357 * Update merge conflict resolution
358 *
359 * @param {GitInterfaces.GitConflict} conflict
360 * @param {string} repositoryId
361 * @param {number} cherryPickId
362 * @param {number} conflictId
363 * @param {string} project - Project ID or project name
364 */
365 updateCherryPickConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
366 /**
367 * Update multiple merge conflict resolutions
368 *
369 * @param {GitInterfaces.GitConflict[]} conflictUpdates
370 * @param {string} repositoryId
371 * @param {number} cherryPickId
372 * @param {string} project - Project ID or project name
373 */
374 updateCherryPickConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, cherryPickId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
375 /**
376 * Given a commitId, returns a list of commits that are in the same cherry-pick family.
377 *
378 * @param {string} repositoryNameOrId
379 * @param {string} commitId
380 * @param {string} project - Project ID or project name
381 * @param {boolean} includeLinks
382 */
383 getCherryPickRelationships(repositoryNameOrId: string, commitId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
384 /**
385 * Cherry pick a specific commit or commits that are associated to a pull request into a new branch.
386 *
387 * @param {GitInterfaces.GitAsyncRefOperationParameters} cherryPickToCreate
388 * @param {string} project - Project ID or project name
389 * @param {string} repositoryId - ID of the repository.
390 */
391 createCherryPick(cherryPickToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise<GitInterfaces.GitCherryPick>;
392 /**
393 * Retrieve information about a cherry pick operation by cherry pick Id.
394 *
395 * @param {string} project - Project ID or project name
396 * @param {number} cherryPickId - ID of the cherry pick.
397 * @param {string} repositoryId - ID of the repository.
398 */
399 getCherryPick(project: string, cherryPickId: number, repositoryId: string): Promise<GitInterfaces.GitCherryPick>;
400 /**
401 * 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.
402 *
403 * @param {string} project - Project ID or project name
404 * @param {string} repositoryId - ID of the repository.
405 * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation.
406 */
407 getCherryPickForRefName(project: string, repositoryId: string, refName: string): Promise<GitInterfaces.GitCherryPick>;
408 /**
409 * 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.
410 *
411 * @param {string} repositoryId - The name or ID of the repository.
412 * @param {string} project - Project ID or project name
413 * @param {boolean} diffCommonCommit - If true, diff between common and target commits. If false, diff between base and target commits.
414 * @param {number} top - Maximum number of changes to return. Defaults to 100.
415 * @param {number} skip - Number of changes to skip
416 * @param {GitInterfaces.GitBaseVersionDescriptor} baseVersionDescriptor - Descriptor for base commit.
417 * @param {GitInterfaces.GitTargetVersionDescriptor} targetVersionDescriptor - Descriptor for target commit.
418 */
419 getCommitDiffs(repositoryId: string, project?: string, diffCommonCommit?: boolean, top?: number, skip?: number, baseVersionDescriptor?: GitInterfaces.GitBaseVersionDescriptor, targetVersionDescriptor?: GitInterfaces.GitTargetVersionDescriptor): Promise<GitInterfaces.GitCommitDiffs>;
420 /**
421 * Retrieve a particular commit.
422 *
423 * @param {string} commitId - The id of the commit.
424 * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
425 * @param {string} project - Project ID or project name
426 * @param {number} changeCount - The number of changes to include in the result.
427 */
428 getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise<GitInterfaces.GitCommit>;
429 /**
430 * Retrieve git commits for a project
431 *
432 * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
433 * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria
434 * @param {string} project - Project ID or project name
435 * @param {number} skip
436 * @param {number} top
437 */
438 getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise<GitInterfaces.GitCommitRef[]>;
439 /**
440 * Retrieve a list of commits associated with a particular push.
441 *
442 * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
443 * @param {number} pushId - The id of the push.
444 * @param {string} project - Project ID or project name
445 * @param {number} top - The maximum number of commits to return ("get the top x commits").
446 * @param {number} skip - The number of commits to skip.
447 * @param {boolean} includeLinks - Set to false to avoid including REST Url links for resources. Defaults to true.
448 */
449 getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
450 /**
451 * Retrieve git commits for a project matching the search criteria
452 *
453 * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options
454 * @param {string} repositoryId - The name or ID of the repository.
455 * @param {string} project - Project ID or project name
456 * @param {number} skip - Number of commits to skip. The value cannot exceed 3,000,000.
457 * @param {number} top - Maximum number of commits to return. The value cannot exceed 50,000.
458 * @param {boolean} includeStatuses - True to include additional commit status information.
459 */
460 getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number, includeStatuses?: boolean): Promise<GitInterfaces.GitCommitRef[]>;
461 /**
462 * Retrieve deleted git repositories.
463 *
464 * @param {string} project - Project ID or project name
465 */
466 getDeletedRepositories(project: string): Promise<GitInterfaces.GitDeletedRepository[]>;
467 /**
468 * Get the file diffs for each of the specified files
469 *
470 * @param {GitInterfaces.FileDiffsCriteria} fileDiffsCriteria - List of file parameters objects
471 * @param {string} project - Project ID or project name
472 * @param {string} repositoryId - The name or ID of the repository
473 */
474 getFileDiffs(fileDiffsCriteria: GitInterfaces.FileDiffsCriteria, project: string, repositoryId: string): Promise<GitInterfaces.FileDiff[]>;
475 /**
476 * Retrieve all forks of a repository in the collection.
477 *
478 * @param {string} repositoryNameOrId - The name or ID of the repository.
479 * @param {string} collectionId - Team project collection ID.
480 * @param {string} project - Project ID or project name
481 * @param {boolean} includeLinks - True to include links.
482 */
483 getForks(repositoryNameOrId: string, collectionId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitRepositoryRef[]>;
484 /**
485 * 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>
486 *
487 * @param {GitInterfaces.GitForkSyncRequestParameters} syncParams - Source repository and ref mapping.
488 * @param {string} repositoryNameOrId - The name or ID of the repository.
489 * @param {string} project - Project ID or project name
490 * @param {boolean} includeLinks - True to include links
491 */
492 createForkSyncRequest(syncParams: GitInterfaces.GitForkSyncRequestParameters, repositoryNameOrId: string, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest>;
493 /**
494 * Get a specific fork sync operation's details.
495 *
496 * @param {string} repositoryNameOrId - The name or ID of the repository.
497 * @param {number} forkSyncOperationId - OperationId of the sync request.
498 * @param {string} project - Project ID or project name
499 * @param {boolean} includeLinks - True to include links.
500 */
501 getForkSyncRequest(repositoryNameOrId: string, forkSyncOperationId: number, project?: string, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest>;
502 /**
503 * Retrieve all requested fork sync operations on this repository.
504 *
505 * @param {string} repositoryNameOrId - The name or ID of the repository.
506 * @param {string} project - Project ID or project name
507 * @param {boolean} includeAbandoned - True to include abandoned requests.
508 * @param {boolean} includeLinks - True to include links.
509 */
510 getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise<GitInterfaces.GitForkSyncRequest[]>;
511 /**
512 * Create an import request.
513 *
514 * @param {GitInterfaces.GitImportRequest} importRequest - The import request to create.
515 * @param {string} project - Project ID or project name
516 * @param {string} repositoryId - The name or ID of the repository.
517 */
518 createImportRequest(importRequest: GitInterfaces.GitImportRequest, project: string, repositoryId: string): Promise<GitInterfaces.GitImportRequest>;
519 /**
520 * Retrieve a particular import request.
521 *
522 * @param {string} project - Project ID or project name
523 * @param {string} repositoryId - The name or ID of the repository.
524 * @param {number} importRequestId - The unique identifier for the import request.
525 */
526 getImportRequest(project: string, repositoryId: string, importRequestId: number): Promise<GitInterfaces.GitImportRequest>;
527 /**
528 * Retrieve import requests for a repository.
529 *
530 * @param {string} project - Project ID or project name
531 * @param {string} repositoryId - The name or ID of the repository.
532 * @param {boolean} includeAbandoned - True to include abandoned import requests in the results.
533 */
534 queryImportRequests(project: string, repositoryId: string, includeAbandoned?: boolean): Promise<GitInterfaces.GitImportRequest[]>;
535 /**
536 * Retry or abandon a failed import request.
537 *
538 * @param {GitInterfaces.GitImportRequest} importRequestToUpdate - The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned.
539 * @param {string} project - Project ID or project name
540 * @param {string} repositoryId - The name or ID of the repository.
541 * @param {number} importRequestId - The unique identifier for the import request to update.
542 */
543 updateImportRequest(importRequestToUpdate: GitInterfaces.GitImportRequest, project: string, repositoryId: string, importRequestId: number): Promise<GitInterfaces.GitImportRequest>;
544 /**
545 * 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.
546 *
547 * @param {string} repositoryId - The name or ID of the repository.
548 * @param {string} path - The item path.
549 * @param {string} project - Project ID or project name
550 * @param {string} scopePath - The path scope. The default is null.
551 * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion.
552 * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false.
553 * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false.
554 * @param {boolean} download - Set to true to download the response as a file. Default is false.
555 * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository.
556 * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
557 * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
558 * @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.
559 */
560 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>;
561 /**
562 * 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.
563 *
564 * @param {string} repositoryId - The name or ID of the repository.
565 * @param {string} path - The item path.
566 * @param {string} project - Project ID or project name
567 * @param {string} scopePath - The path scope. The default is null.
568 * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion.
569 * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false.
570 * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false.
571 * @param {boolean} download - Set to true to download the response as a file. Default is false.
572 * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository.
573 * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
574 * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
575 * @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.
576 */
577 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>;
578 /**
579 * Get Item Metadata and/or Content for a collection of items. 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.
580 *
581 * @param {string} repositoryId - The name or ID of the repository.
582 * @param {string} project - Project ID or project name
583 * @param {string} scopePath - The path scope. The default is null.
584 * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion.
585 * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false.
586 * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false.
587 * @param {boolean} download - Set to true to download the response as a file. Default is false.
588 * @param {boolean} includeLinks - Set to true to include links to items. Default is false.
589 * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository.
590 * @param {boolean} zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks
591 */
592 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[]>;
593 /**
594 * 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.
595 *
596 * @param {string} repositoryId - The name or ID of the repository.
597 * @param {string} path - The item path.
598 * @param {string} project - Project ID or project name
599 * @param {string} scopePath - The path scope. The default is null.
600 * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion.
601 * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false.
602 * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false.
603 * @param {boolean} download - Set to true to download the response as a file. Default is false.
604 * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository.
605 * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
606 * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
607 * @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.
608 */
609 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>;
610 /**
611 * 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.
612 *
613 * @param {string} repositoryId - The name or ID of the repository.
614 * @param {string} path - The item path.
615 * @param {string} project - Project ID or project name
616 * @param {string} scopePath - The path scope. The default is null.
617 * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion.
618 * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false.
619 * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false.
620 * @param {boolean} download - Set to true to download the response as a file. Default is false.
621 * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository.
622 * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false.
623 * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
624 * @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.
625 */
626 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>;
627 /**
628 * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path
629 *
630 * @param {GitInterfaces.GitItemRequestData} requestData - Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references.
631 * @param {string} repositoryId - The name or ID of the repository
632 * @param {string} project - Project ID or project name
633 */
634 getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise<GitInterfaces.GitItem[][]>;
635 /**
636 * Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId.
637 *
638 * @param {string} repositoryNameOrId - ID or name of the local repository.
639 * @param {string} commitId - First commit, usually the tip of the target branch of the potential merge.
640 * @param {string} otherCommitId - Other commit, usually the tip of the source branch of the potential merge.
641 * @param {string} project - Project ID or project name
642 * @param {string} otherCollectionId - The collection ID where otherCommitId lives.
643 * @param {string} otherRepositoryId - The repository ID where otherCommitId lives.
644 */
645 getMergeBases(repositoryNameOrId: string, commitId: string, otherCommitId: string, project?: string, otherCollectionId?: string, otherRepositoryId?: string): Promise<GitInterfaces.GitCommitRef[]>;
646 /**
647 * Request a git merge operation. Currently we support merging only 2 commits.
648 *
649 * @param {GitInterfaces.GitMergeParameters} mergeParameters - Parents commitIds and merge commit messsage.
650 * @param {string} project - Project ID or project name
651 * @param {string} repositoryNameOrId - The name or ID of the repository.
652 * @param {boolean} includeLinks - True to include links
653 */
654 createMergeRequest(mergeParameters: GitInterfaces.GitMergeParameters, project: string, repositoryNameOrId: string, includeLinks?: boolean): Promise<GitInterfaces.GitMerge>;
655 /**
656 * Get a specific merge operation's details.
657 *
658 * @param {string} project - Project ID or project name
659 * @param {string} repositoryNameOrId - The name or ID of the repository.
660 * @param {number} mergeOperationId - OperationId of the merge request.
661 * @param {boolean} includeLinks - True to include links
662 */
663 getMergeRequest(project: string, repositoryNameOrId: string, mergeOperationId: number, includeLinks?: boolean): Promise<GitInterfaces.GitMerge>;
664 /**
665 * Attach a new file to a pull request.
666 *
667 * @param {NodeJS.ReadableStream} contentStream - Content to upload
668 * @param {string} fileName - The name of the file.
669 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
670 * @param {number} pullRequestId - ID of the pull request.
671 * @param {string} project - Project ID or project name
672 */
673 createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.Attachment>;
674 /**
675 * Delete a pull request attachment.
676 *
677 * @param {string} fileName - The name of the attachment to delete.
678 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
679 * @param {number} pullRequestId - ID of the pull request.
680 * @param {string} project - Project ID or project name
681 */
682 deleteAttachment(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
683 /**
684 * Get the file content of a pull request attachment.
685 *
686 * @param {string} fileName - The name of the attachment.
687 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
688 * @param {number} pullRequestId - ID of the pull request.
689 * @param {string} project - Project ID or project name
690 */
691 getAttachmentContent(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<NodeJS.ReadableStream>;
692 /**
693 * Get a list of files attached to a given pull request.
694 *
695 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
696 * @param {number} pullRequestId - ID of the pull request.
697 * @param {string} project - Project ID or project name
698 */
699 getAttachments(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.Attachment[]>;
700 /**
701 * Get the file content of a pull request attachment.
702 *
703 * @param {string} fileName - The name of the attachment.
704 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
705 * @param {number} pullRequestId - ID of the pull request.
706 * @param {string} project - Project ID or project name
707 */
708 getAttachmentZip(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise<NodeJS.ReadableStream>;
709 /**
710 * Add a like on a comment.
711 *
712 * @param {string} repositoryId - The repository ID of the pull request's target branch.
713 * @param {number} pullRequestId - ID of the pull request.
714 * @param {number} threadId - The ID of the thread that contains the comment.
715 * @param {number} commentId - The ID of the comment.
716 * @param {string} project - Project ID or project name
717 */
718 createLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
719 /**
720 * Delete a like on a comment.
721 *
722 * @param {string} repositoryId - The repository ID of the pull request's target branch.
723 * @param {number} pullRequestId - ID of the pull request.
724 * @param {number} threadId - The ID of the thread that contains the comment.
725 * @param {number} commentId - The ID of the comment.
726 * @param {string} project - Project ID or project name
727 */
728 deleteLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
729 /**
730 * Get likes for a comment.
731 *
732 * @param {string} repositoryId - The repository ID of the pull request's target branch.
733 * @param {number} pullRequestId - ID of the pull request.
734 * @param {number} threadId - The ID of the thread that contains the comment.
735 * @param {number} commentId - The ID of the comment.
736 * @param {string} project - Project ID or project name
737 */
738 getLikes(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<VSSInterfaces.IdentityRef[]>;
739 /**
740 * Get the commits for the specified iteration of a pull request.
741 *
742 * @param {string} repositoryId - ID or name of the repository.
743 * @param {number} pullRequestId - ID of the pull request.
744 * @param {number} iterationId - ID of the iteration from which to get the commits.
745 * @param {string} project - Project ID or project name
746 * @param {number} top - Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500.
747 * @param {number} skip - Number of commits to skip.
748 */
749 getPullRequestIterationCommits(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number): Promise<GitInterfaces.GitCommitRef[]>;
750 /**
751 * Get the commits for the specified pull request.
752 *
753 * @param {string} repositoryId - ID or name of the repository.
754 * @param {number} pullRequestId - ID of the pull request.
755 * @param {string} project - Project ID or project name
756 */
757 getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise<VSSInterfaces.PagedList<GitInterfaces.GitCommitRef>>;
758 /**
759 * Retrieve one conflict for a pull request by ID
760 *
761 * @param {string} repositoryId
762 * @param {number} pullRequestId
763 * @param {number} conflictId
764 * @param {string} project - Project ID or project name
765 */
766 getPullRequestConflict(repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
767 /**
768 * Retrieve all conflicts for a pull request
769 *
770 * @param {string} repositoryId - The repository of the Pull Request.
771 * @param {number} pullRequestId - The pull request ID.
772 * @param {string} project - Project ID or project name
773 * @param {number} skip - Conflicts to skip.
774 * @param {number} top - Conflicts to return after skip.
775 * @param {boolean} includeObsolete - Includes obsolete conflicts.
776 * @param {boolean} excludeResolved - Excludes conflicts already resolved.
777 * @param {boolean} onlyResolved - Returns only the conflicts that are resolved.
778 */
779 getPullRequestConflicts(repositoryId: string, pullRequestId: number, project?: string, skip?: number, top?: number, includeObsolete?: boolean, excludeResolved?: boolean, onlyResolved?: boolean): Promise<GitInterfaces.GitConflict[]>;
780 /**
781 * Update merge conflict resolution
782 *
783 * @param {GitInterfaces.GitConflict} conflict
784 * @param {string} repositoryId
785 * @param {number} pullRequestId
786 * @param {number} conflictId
787 * @param {string} project - Project ID or project name
788 */
789 updatePullRequestConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
790 /**
791 * Update multiple merge conflict resolutions
792 *
793 * @param {GitInterfaces.GitConflict[]} conflictUpdates
794 * @param {string} repositoryId
795 * @param {number} pullRequestId
796 * @param {string} project - Project ID or project name
797 */
798 updatePullRequestConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
799 /**
800 * Retrieve the changes made in a pull request between two iterations.
801 *
802 * @param {string} repositoryId - The repository ID of the pull request's target branch.
803 * @param {number} pullRequestId - ID of the pull request.
804 * @param {number} iterationId - ID of the pull request iteration. <br /> Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request.
805 * @param {string} project - Project ID or project name
806 * @param {number} top - Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000.
807 * @param {number} skip - Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100.
808 * @param {number} compareTo - ID of the pull request iteration to compare against. The default value is zero which indicates the comparison is made against the common commit between the source and target branches
809 */
810 getPullRequestIterationChanges(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number, compareTo?: number): Promise<GitInterfaces.GitPullRequestIterationChanges>;
811 /**
812 * Get the specified iteration for a pull request.
813 *
814 * @param {string} repositoryId - ID or name of the repository.
815 * @param {number} pullRequestId - ID of the pull request.
816 * @param {number} iterationId - ID of the pull request iteration to return.
817 * @param {string} project - Project ID or project name
818 */
819 getPullRequestIteration(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestIteration>;
820 /**
821 * Get the list of iterations for the specified pull request.
822 *
823 * @param {string} repositoryId - ID or name of the repository.
824 * @param {number} pullRequestId - ID of the pull request.
825 * @param {string} project - Project ID or project name
826 * @param {boolean} includeCommits - If true, include the commits associated with each iteration in the response.
827 */
828 getPullRequestIterations(repositoryId: string, pullRequestId: number, project?: string, includeCommits?: boolean): Promise<GitInterfaces.GitPullRequestIteration[]>;
829 /**
830 * Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body.
831 *
832 * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create.
833 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
834 * @param {number} pullRequestId - ID of the pull request.
835 * @param {number} iterationId - ID of the pull request iteration.
836 * @param {string} project - Project ID or project name
837 */
838 createPullRequestIterationStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
839 /**
840 * Delete pull request iteration status.
841 *
842 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
843 * @param {number} pullRequestId - ID of the pull request.
844 * @param {number} iterationId - ID of the pull request iteration.
845 * @param {number} statusId - ID of the pull request status.
846 * @param {string} project - Project ID or project name
847 */
848 deletePullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise<void>;
849 /**
850 * Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations.
851 *
852 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
853 * @param {number} pullRequestId - ID of the pull request.
854 * @param {number} iterationId - ID of the pull request iteration.
855 * @param {number} statusId - ID of the pull request status.
856 * @param {string} project - Project ID or project name
857 */
858 getPullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
859 /**
860 * Get all the statuses associated with a pull request iteration.
861 *
862 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
863 * @param {number} pullRequestId - ID of the pull request.
864 * @param {number} iterationId - ID of the pull request iteration.
865 * @param {string} project - Project ID or project name
866 */
867 getPullRequestIterationStatuses(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus[]>;
868 /**
869 * Update pull request iteration statuses collection. The only supported operation type is `remove`.
870 *
871 * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format.
872 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
873 * @param {number} pullRequestId - ID of the pull request.
874 * @param {number} iterationId - ID of the pull request iteration.
875 * @param {string} project - Project ID or project name
876 */
877 updatePullRequestIterationStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise<void>;
878 /**
879 * Create a tag (if that does not exists yet) and add that as a label (tag) for a specified pull request. The only required field is the name of the new label (tag).
880 *
881 * @param {TfsCoreInterfaces.WebApiCreateTagRequestData} label - Label to assign to the pull request.
882 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
883 * @param {number} pullRequestId - ID of the pull request.
884 * @param {string} project - Project ID or project name
885 * @param {string} projectId - Project ID or project name.
886 */
887 createPullRequestLabel(label: TfsCoreInterfaces.WebApiCreateTagRequestData, repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition>;
888 /**
889 * Removes a label (tag) from the set of those assigned to the pull request. The tag itself will not be deleted.
890 *
891 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
892 * @param {number} pullRequestId - ID of the pull request.
893 * @param {string} labelIdOrName - The name or ID of the label requested.
894 * @param {string} project - Project ID or project name
895 * @param {string} projectId - Project ID or project name.
896 */
897 deletePullRequestLabels(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise<void>;
898 /**
899 * Retrieves a single label (tag) that has been assigned to a pull request.
900 *
901 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
902 * @param {number} pullRequestId - ID of the pull request.
903 * @param {string} labelIdOrName - The name or ID of the label requested.
904 * @param {string} project - Project ID or project name
905 * @param {string} projectId - Project ID or project name.
906 */
907 getPullRequestLabel(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition>;
908 /**
909 * Get all the labels (tags) assigned to a pull request.
910 *
911 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
912 * @param {number} pullRequestId - ID of the pull request.
913 * @param {string} project - Project ID or project name
914 * @param {string} projectId - Project ID or project name.
915 */
916 getPullRequestLabels(repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise<TfsCoreInterfaces.WebApiTagDefinition[]>;
917 /**
918 * Get external properties of the pull request.
919 *
920 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
921 * @param {number} pullRequestId - ID of the pull request.
922 * @param {string} project - Project ID or project name
923 */
924 getPullRequestProperties(repositoryId: string, pullRequestId: number, project?: string): Promise<any>;
925 /**
926 * Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed.
927 *
928 * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Properties to add, replace or remove in JSON Patch format.
929 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
930 * @param {number} pullRequestId - ID of the pull request.
931 * @param {string} project - Project ID or project name
932 */
933 updatePullRequestProperties(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise<any>;
934 /**
935 * This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests.
936 *
937 * @param {GitInterfaces.GitPullRequestQuery} queries - The list of queries to perform.
938 * @param {string} repositoryId - ID of the repository.
939 * @param {string} project - Project ID or project name
940 */
941 getPullRequestQuery(queries: GitInterfaces.GitPullRequestQuery, repositoryId: string, project?: string): Promise<GitInterfaces.GitPullRequestQuery>;
942 /**
943 * Add a reviewer to a pull request or cast a vote.
944 *
945 * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer's vote.<br />If the reviewer's ID is included here, it must match the reviewerID parameter.<br />Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero.
946 * @param {string} repositoryId - The repository ID of the pull request's target branch.
947 * @param {number} pullRequestId - ID of the pull request.
948 * @param {string} reviewerId - ID of the reviewer.
949 * @param {string} project - Project ID or project name
950 */
951 createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
952 /**
953 * Add reviewers to a pull request.
954 *
955 * @param {VSSInterfaces.IdentityRef[]} reviewers - Reviewers to add to the pull request.
956 * @param {string} repositoryId - The repository ID of the pull request's target branch.
957 * @param {number} pullRequestId - ID of the pull request.
958 * @param {string} project - Project ID or project name
959 */
960 createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote[]>;
961 /**
962 * Add an unmaterialized identity to the reviewers of a pull request.
963 *
964 * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer to add to the pull request.
965 * @param {string} repositoryId - The repository ID of the pull request's target branch.
966 * @param {number} pullRequestId - ID of the pull request.
967 * @param {string} project - Project ID or project name
968 */
969 createUnmaterializedPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
970 /**
971 * Remove a reviewer from a pull request.
972 *
973 * @param {string} repositoryId - The repository ID of the pull request's target branch.
974 * @param {number} pullRequestId - ID of the pull request.
975 * @param {string} reviewerId - ID of the reviewer to remove.
976 * @param {string} project - Project ID or project name
977 */
978 deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<void>;
979 /**
980 * Retrieve information about a particular reviewer on a pull request
981 *
982 * @param {string} repositoryId - The repository ID of the pull request's target branch.
983 * @param {number} pullRequestId - ID of the pull request.
984 * @param {string} reviewerId - ID of the reviewer.
985 * @param {string} project - Project ID or project name
986 */
987 getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
988 /**
989 * Retrieve the reviewers for a pull request
990 *
991 * @param {string} repositoryId - The repository ID of the pull request's target branch.
992 * @param {number} pullRequestId - ID of the pull request.
993 * @param {string} project - Project ID or project name
994 */
995 getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.IdentityRefWithVote[]>;
996 /**
997 * Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined
998 *
999 * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer data.<br />If the reviewer's ID is included here, it must match the reviewerID parameter.
1000 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1001 * @param {number} pullRequestId - ID of the pull request.
1002 * @param {string} reviewerId - ID of the reviewer.
1003 * @param {string} project - Project ID or project name
1004 */
1005 updatePullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise<GitInterfaces.IdentityRefWithVote>;
1006 /**
1007 * Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names.
1008 *
1009 * @param {GitInterfaces.IdentityRefWithVote[]} patchVotes - IDs of the reviewers whose votes will be reset to zero
1010 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1011 * @param {number} pullRequestId - ID of the pull request
1012 * @param {string} project - Project ID or project name
1013 */
1014 updatePullRequestReviewers(patchVotes: GitInterfaces.IdentityRefWithVote[], repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
1015 /**
1016 * Retrieve a pull request.
1017 *
1018 * @param {number} pullRequestId - The ID of the pull request to retrieve.
1019 * @param {string} project - Project ID or project name
1020 */
1021 getPullRequestById(pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequest>;
1022 /**
1023 * Retrieve all pull requests matching a specified criteria.
1024 *
1025 * @param {string} project - Project ID or project name
1026 * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria.
1027 * @param {number} maxCommentLength - Not used.
1028 * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
1029 * @param {number} top - The number of pull requests to retrieve.
1030 */
1031 getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise<GitInterfaces.GitPullRequest[]>;
1032 /**
1033 * Create a pull request.
1034 *
1035 * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - The pull request to create.
1036 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1037 * @param {string} project - Project ID or project name
1038 * @param {boolean} supportsIterations - If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed.
1039 */
1040 createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string, supportsIterations?: boolean): Promise<GitInterfaces.GitPullRequest>;
1041 /**
1042 * Retrieve a pull request.
1043 *
1044 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1045 * @param {number} pullRequestId - The ID of the pull request to retrieve.
1046 * @param {string} project - Project ID or project name
1047 * @param {number} maxCommentLength - Not used.
1048 * @param {number} skip - Not used.
1049 * @param {number} top - Not used.
1050 * @param {boolean} includeCommits - If true, the pull request will be returned with the associated commits.
1051 * @param {boolean} includeWorkItemRefs - If true, the pull request will be returned with the associated work item references.
1052 */
1053 getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean, includeWorkItemRefs?: boolean): Promise<GitInterfaces.GitPullRequest>;
1054 /**
1055 * Retrieve all pull requests matching a specified criteria.
1056 *
1057 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1058 * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria.
1059 * @param {string} project - Project ID or project name
1060 * @param {number} maxCommentLength - Not used.
1061 * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
1062 * @param {number} top - The number of pull requests to retrieve.
1063 */
1064 getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise<GitInterfaces.GitPullRequest[]>;
1065 /**
1066 * Update a pull request
1067 *
1068 * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - The pull request content that should be updated.
1069 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1070 * @param {number} pullRequestId - ID of the pull request to update.
1071 * @param {string} project - Project ID or project name
1072 */
1073 updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequest>;
1074 /**
1075 * Sends an e-mail notification about a specific pull request to a set of recipients
1076 *
1077 * @param {GitInterfaces.ShareNotificationContext} userMessage
1078 * @param {string} repositoryId - ID of the git repository.
1079 * @param {number} pullRequestId - ID of the pull request.
1080 * @param {string} project - Project ID or project name
1081 */
1082 sharePullRequest(userMessage: GitInterfaces.ShareNotificationContext, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
1083 /**
1084 * Create a pull request status.
1085 *
1086 * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create.
1087 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
1088 * @param {number} pullRequestId - ID of the pull request.
1089 * @param {string} project - Project ID or project name
1090 */
1091 createPullRequestStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
1092 /**
1093 * Delete pull request status.
1094 *
1095 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
1096 * @param {number} pullRequestId - ID of the pull request.
1097 * @param {number} statusId - ID of the pull request status.
1098 * @param {string} project - Project ID or project name
1099 */
1100 deletePullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise<void>;
1101 /**
1102 * Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations.
1103 *
1104 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
1105 * @param {number} pullRequestId - ID of the pull request.
1106 * @param {number} statusId - ID of the pull request status.
1107 * @param {string} project - Project ID or project name
1108 */
1109 getPullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus>;
1110 /**
1111 * Get all the statuses associated with a pull request.
1112 *
1113 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
1114 * @param {number} pullRequestId - ID of the pull request.
1115 * @param {string} project - Project ID or project name
1116 */
1117 getPullRequestStatuses(repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestStatus[]>;
1118 /**
1119 * Update pull request statuses collection. The only supported operation type is `remove`.
1120 *
1121 * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format.
1122 * @param {string} repositoryId - The repository ID of the pull request’s target branch.
1123 * @param {number} pullRequestId - ID of the pull request.
1124 * @param {string} project - Project ID or project name
1125 */
1126 updatePullRequestStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise<void>;
1127 /**
1128 * Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread).
1129 *
1130 * @param {GitInterfaces.Comment} comment - The comment to create. Comments can be up to 150,000 characters.
1131 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1132 * @param {number} pullRequestId - ID of the pull request.
1133 * @param {number} threadId - ID of the thread that the desired comment is in.
1134 * @param {string} project - Project ID or project name
1135 */
1136 createComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.Comment>;
1137 /**
1138 * Delete a comment associated with a specific thread in a pull request.
1139 *
1140 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1141 * @param {number} pullRequestId - ID of the pull request.
1142 * @param {number} threadId - ID of the thread that the desired comment is in.
1143 * @param {number} commentId - ID of the comment.
1144 * @param {string} project - Project ID or project name
1145 */
1146 deleteComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<void>;
1147 /**
1148 * Retrieve a comment associated with a specific thread in a pull request.
1149 *
1150 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1151 * @param {number} pullRequestId - ID of the pull request.
1152 * @param {number} threadId - ID of the thread that the desired comment is in.
1153 * @param {number} commentId - ID of the comment.
1154 * @param {string} project - Project ID or project name
1155 */
1156 getComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<GitInterfaces.Comment>;
1157 /**
1158 * Retrieve all comments associated with a specific thread in a pull request.
1159 *
1160 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1161 * @param {number} pullRequestId - ID of the pull request.
1162 * @param {number} threadId - ID of the thread.
1163 * @param {string} project - Project ID or project name
1164 */
1165 getComments(repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.Comment[]>;
1166 /**
1167 * Update a comment associated with a specific thread in a pull request.
1168 *
1169 * @param {GitInterfaces.Comment} comment - The comment content that should be updated. Comments can be up to 150,000 characters.
1170 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1171 * @param {number} pullRequestId - ID of the pull request.
1172 * @param {number} threadId - ID of the thread that the desired comment is in.
1173 * @param {number} commentId - ID of the comment to update.
1174 * @param {string} project - Project ID or project name
1175 */
1176 updateComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise<GitInterfaces.Comment>;
1177 /**
1178 * Create a thread in a pull request.
1179 *
1180 * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread to create. Thread must contain at least one comment.
1181 * @param {string} repositoryId - Repository ID of the pull request's target branch.
1182 * @param {number} pullRequestId - ID of the pull request.
1183 * @param {string} project - Project ID or project name
1184 */
1185 createThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, project?: string): Promise<GitInterfaces.GitPullRequestCommentThread>;
1186 /**
1187 * Retrieve a thread in a pull request.
1188 *
1189 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1190 * @param {number} pullRequestId - ID of the pull request.
1191 * @param {number} threadId - ID of the thread.
1192 * @param {string} project - Project ID or project name
1193 * @param {number} iteration - If specified, thread position will be tracked using this iteration as the right side of the diff.
1194 * @param {number} baseIteration - If specified, thread position will be tracked using this iteration as the left side of the diff.
1195 */
1196 getPullRequestThread(repositoryId: string, pullRequestId: number, threadId: number, project?: string, iteration?: number, baseIteration?: number): Promise<GitInterfaces.GitPullRequestCommentThread>;
1197 /**
1198 * Retrieve all threads in a pull request.
1199 *
1200 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1201 * @param {number} pullRequestId - ID of the pull request.
1202 * @param {string} project - Project ID or project name
1203 * @param {number} iteration - If specified, thread positions will be tracked using this iteration as the right side of the diff.
1204 * @param {number} baseIteration - If specified, thread positions will be tracked using this iteration as the left side of the diff.
1205 */
1206 getThreads(repositoryId: string, pullRequestId: number, project?: string, iteration?: number, baseIteration?: number): Promise<GitInterfaces.GitPullRequestCommentThread[]>;
1207 /**
1208 * Update a thread in a pull request.
1209 *
1210 * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread content that should be updated.
1211 * @param {string} repositoryId - The repository ID of the pull request's target branch.
1212 * @param {number} pullRequestId - ID of the pull request.
1213 * @param {number} threadId - ID of the thread to update.
1214 * @param {string} project - Project ID or project name
1215 */
1216 updateThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise<GitInterfaces.GitPullRequestCommentThread>;
1217 /**
1218 * Retrieve a list of work items associated with a pull request.
1219 *
1220 * @param {string} repositoryId - ID or name of the repository.
1221 * @param {number} pullRequestId - ID of the pull request.
1222 * @param {string} project - Project ID or project name
1223 */
1224 getPullRequestWorkItemRefs(repositoryId: string, pullRequestId: number, project?: string): Promise<VSSInterfaces.ResourceRef[]>;
1225 /**
1226 * Push changes to the repository.
1227 *
1228 * @param {GitInterfaces.GitPush} push
1229 * @param {string} repositoryId - The name or ID of the repository.
1230 * @param {string} project - Project ID or project name
1231 */
1232 createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise<GitInterfaces.GitPush>;
1233 /**
1234 * Retrieves a particular push.
1235 *
1236 * @param {string} repositoryId - The name or ID of the repository.
1237 * @param {number} pushId - ID of the push.
1238 * @param {string} project - Project ID or project name
1239 * @param {number} includeCommits - The number of commits to include in the result.
1240 * @param {boolean} includeRefUpdates - If true, include the list of refs that were updated by the push.
1241 */
1242 getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise<GitInterfaces.GitPush>;
1243 /**
1244 * Retrieves pushes associated with the specified repository.
1245 *
1246 * @param {string} repositoryId - The name or ID of the repository.
1247 * @param {string} project - Project ID or project name
1248 * @param {number} skip - Number of pushes to skip.
1249 * @param {number} top - Number of pushes to return.
1250 * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references.
1251 */
1252 getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise<GitInterfaces.GitPush[]>;
1253 /**
1254 * Destroy (hard delete) a soft-deleted Git repository.
1255 *
1256 * @param {string} project - Project ID or project name
1257 * @param {string} repositoryId - The ID of the repository.
1258 */
1259 deleteRepositoryFromRecycleBin(project: string, repositoryId: string): Promise<void>;
1260 /**
1261 * Retrieve soft-deleted git repositories from the recycle bin.
1262 *
1263 * @param {string} project - Project ID or project name
1264 */
1265 getRecycleBinRepositories(project: string): Promise<GitInterfaces.GitDeletedRepository[]>;
1266 /**
1267 * Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable.
1268 *
1269 * @param {GitInterfaces.GitRecycleBinRepositoryDetails} repositoryDetails
1270 * @param {string} project - Project ID or project name
1271 * @param {string} repositoryId - The ID of the repository.
1272 */
1273 restoreRepositoryFromRecycleBin(repositoryDetails: GitInterfaces.GitRecycleBinRepositoryDetails, project: string, repositoryId: string): Promise<GitInterfaces.GitRepository>;
1274 /**
1275 * Queries the provided repository for its refs and returns them.
1276 *
1277 * @param {string} repositoryId - The name or ID of the repository.
1278 * @param {string} project - Project ID or project name
1279 * @param {string} filter - [optional] A filter to apply to the refs (starts with).
1280 * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false.
1281 * @param {boolean} includeStatuses - [optional] Includes up to the first 1000 commit statuses for each ref. The default value is false.
1282 * @param {boolean} includeMyBranches - [optional] Includes only branches that the user owns, the branches the user favorites, and the default branch. The default value is false. Cannot be combined with the filter parameter.
1283 * @param {boolean} latestStatusesOnly - [optional] True to include only the tip commit status for each ref. This option requires `includeStatuses` to be true. The default value is false.
1284 * @param {boolean} peelTags - [optional] Annotated tags will populate the PeeledObjectId property. default is false.
1285 * @param {string} filterContains - [optional] A filter to apply to the refs (contains).
1286 */
1287 getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean, includeStatuses?: boolean, includeMyBranches?: boolean, latestStatusesOnly?: boolean, peelTags?: boolean, filterContains?: string): Promise<VSSInterfaces.PagedList<GitInterfaces.GitRef>>;
1288 /**
1289 * Lock or Unlock a branch.
1290 *
1291 * @param {GitInterfaces.GitRefUpdate} newRefInfo - The ref update action (lock/unlock) to perform
1292 * @param {string} repositoryId - The name or ID of the repository.
1293 * @param {string} filter - The name of the branch to lock/unlock
1294 * @param {string} project - Project ID or project name
1295 * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository.
1296 */
1297 updateRef(newRefInfo: GitInterfaces.GitRefUpdate, repositoryId: string, filter: string, project?: string, projectId?: string): Promise<GitInterfaces.GitRef>;
1298 /**
1299 * Creating, updating, or deleting refs(branches).
1300 *
1301 * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform
1302 * @param {string} repositoryId - The name or ID of the repository.
1303 * @param {string} project - Project ID or project name
1304 * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository.
1305 */
1306 updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise<GitInterfaces.GitRefUpdateResult[]>;
1307 /**
1308 * Creates a ref favorite
1309 *
1310 * @param {GitInterfaces.GitRefFavorite} favorite - The ref favorite to create.
1311 * @param {string} project - Project ID or project name
1312 */
1313 createFavorite(favorite: GitInterfaces.GitRefFavorite, project: string): Promise<GitInterfaces.GitRefFavorite>;
1314 /**
1315 * Deletes the refs favorite specified
1316 *
1317 * @param {string} project - Project ID or project name
1318 * @param {number} favoriteId - The Id of the ref favorite to delete.
1319 */
1320 deleteRefFavorite(project: string, favoriteId: number): Promise<void>;
1321 /**
1322 * Gets the refs favorite for a favorite Id.
1323 *
1324 * @param {string} project - Project ID or project name
1325 * @param {number} favoriteId - The Id of the requested ref favorite.
1326 */
1327 getRefFavorite(project: string, favoriteId: number): Promise<GitInterfaces.GitRefFavorite>;
1328 /**
1329 * Gets the refs favorites for a repo and an identity.
1330 *
1331 * @param {string} project - Project ID or project name
1332 * @param {string} repositoryId - The id of the repository.
1333 * @param {string} identityId - The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used.
1334 */
1335 getRefFavorites(project: string, repositoryId?: string, identityId?: string): Promise<GitInterfaces.GitRefFavorite[]>;
1336 /**
1337 * @param {string} project - Project ID or project name
1338 * @param {string} identityId
1339 */
1340 getRefFavoritesForProject(project: string, identityId?: string): Promise<GitInterfaces.GitRefFavorite[]>;
1341 /**
1342 * Create a git repository in a team project.
1343 *
1344 * @param {GitInterfaces.GitRepositoryCreateOptions} gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id).
1345 * @param {string} project - Project ID or project name
1346 * @param {string} sourceRef - [optional] Specify the source refs to use while creating a fork repo
1347 */
1348 createRepository(gitRepositoryToCreate: GitInterfaces.GitRepositoryCreateOptions, project?: string, sourceRef?: string): Promise<GitInterfaces.GitRepository>;
1349 /**
1350 * Delete a git repository
1351 *
1352 * @param {string} repositoryId - The ID of the repository.
1353 * @param {string} project - Project ID or project name
1354 */
1355 deleteRepository(repositoryId: string, project?: string): Promise<void>;
1356 /**
1357 * Retrieve git repositories.
1358 *
1359 * @param {string} project - Project ID or project name
1360 * @param {boolean} includeLinks - [optional] True to include reference links. The default value is false.
1361 * @param {boolean} includeAllUrls - [optional] True to include all remote URLs. The default value is false.
1362 * @param {boolean} includeHidden - [optional] True to include hidden repositories. The default value is false.
1363 */
1364 getRepositories(project?: string, includeLinks?: boolean, includeAllUrls?: boolean, includeHidden?: boolean): Promise<GitInterfaces.GitRepository[]>;
1365 /**
1366 * Retrieve a git repository.
1367 *
1368 * @param {string} repositoryId - The name or ID of the repository.
1369 * @param {string} project - Project ID or project name
1370 */
1371 getRepository(repositoryId: string, project?: string): Promise<GitInterfaces.GitRepository>;
1372 /**
1373 * Retrieve a git repository.
1374 *
1375 * @param {string} repositoryId - The name or ID of the repository.
1376 * @param {boolean} includeParent - True to include parent repository. Only available in authenticated calls.
1377 * @param {string} project - Project ID or project name
1378 */
1379 getRepositoryWithParent(repositoryId: string, includeParent: boolean, project?: string): Promise<GitInterfaces.GitRepository>;
1380 /**
1381 * Updates the Git repository with either a new repo name or a new default branch.
1382 *
1383 * @param {GitInterfaces.GitRepository} newRepositoryInfo - Specify a new repo name or a new default branch of the repository
1384 * @param {string} repositoryId - The ID of the repository.
1385 * @param {string} project - Project ID or project name
1386 */
1387 updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise<GitInterfaces.GitRepository>;
1388 /**
1389 * Retrieve one conflict for a revert by ID
1390 *
1391 * @param {string} repositoryId
1392 * @param {number} revertId
1393 * @param {number} conflictId
1394 * @param {string} project - Project ID or project name
1395 */
1396 getRevertConflict(repositoryId: string, revertId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
1397 /**
1398 * Retrieve all conflicts for a revert
1399 *
1400 * @param {string} repositoryId
1401 * @param {number} revertId
1402 * @param {string} project - Project ID or project name
1403 * @param {string} continuationToken
1404 * @param {number} top
1405 * @param {boolean} excludeResolved
1406 * @param {boolean} onlyResolved
1407 * @param {boolean} includeObsolete
1408 */
1409 getRevertConflicts(repositoryId: string, revertId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise<VSSInterfaces.PagedList<GitInterfaces.GitConflict>>;
1410 /**
1411 * Update merge conflict resolution
1412 *
1413 * @param {GitInterfaces.GitConflict} conflict
1414 * @param {string} repositoryId
1415 * @param {number} revertId
1416 * @param {number} conflictId
1417 * @param {string} project - Project ID or project name
1418 */
1419 updateRevertConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, revertId: number, conflictId: number, project?: string): Promise<GitInterfaces.GitConflict>;
1420 /**
1421 * Update multiple merge conflict resolutions
1422 *
1423 * @param {GitInterfaces.GitConflict[]} conflictUpdates
1424 * @param {string} repositoryId
1425 * @param {number} revertId
1426 * @param {string} project - Project ID or project name
1427 */
1428 updateRevertConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, revertId: number, project?: string): Promise<GitInterfaces.GitConflictUpdateResult[]>;
1429 /**
1430 * Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request.
1431 *
1432 * @param {GitInterfaces.GitAsyncRefOperationParameters} revertToCreate
1433 * @param {string} project - Project ID or project name
1434 * @param {string} repositoryId - ID of the repository.
1435 */
1436 createRevert(revertToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise<GitInterfaces.GitRevert>;
1437 /**
1438 * Retrieve information about a revert operation by revert Id.
1439 *
1440 * @param {string} project - Project ID or project name
1441 * @param {number} revertId - ID of the revert operation.
1442 * @param {string} repositoryId - ID of the repository.
1443 */
1444 getRevert(project: string, revertId: number, repositoryId: string): Promise<GitInterfaces.GitRevert>;
1445 /**
1446 * Retrieve information about a revert operation for a specific branch.
1447 *
1448 * @param {string} project - Project ID or project name
1449 * @param {string} repositoryId - ID of the repository.
1450 * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the revert operation.
1451 */
1452 getRevertForRefName(project: string, repositoryId: string, refName: string): Promise<GitInterfaces.GitRevert>;
1453 /**
1454 * Create Git commit status.
1455 *
1456 * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - Git commit status object to create.
1457 * @param {string} commitId - ID of the Git commit.
1458 * @param {string} repositoryId - ID of the repository.
1459 * @param {string} project - Project ID or project name
1460 */
1461 createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise<GitInterfaces.GitStatus>;
1462 /**
1463 * Get statuses associated with the Git commit.
1464 *
1465 * @param {string} commitId - ID of the Git commit.
1466 * @param {string} repositoryId - ID of the repository.
1467 * @param {string} project - Project ID or project name
1468 * @param {number} top - Optional. The number of statuses to retrieve. Default is 1000.
1469 * @param {number} skip - Optional. The number of statuses to ignore. Default is 0. For example, to retrieve results 101-150, set top to 50 and skip to 100.
1470 * @param {boolean} latestOnly - The flag indicates whether to get only latest statuses grouped by `Context.Name` and `Context.Genre`.
1471 */
1472 getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number, latestOnly?: boolean): Promise<GitInterfaces.GitStatus[]>;
1473 /**
1474 * Retrieve a pull request suggestion for a particular repository or team project.
1475 *
1476 * @param {string} repositoryId - ID of the git repository.
1477 * @param {string} project - Project ID or project name
1478 * @param {boolean} preferCompareBranch - If true, prefer the compare branch over the default branch as target branch for pull requests.
1479 */
1480 getSuggestions(repositoryId: string, project?: string, preferCompareBranch?: boolean): Promise<GitInterfaces.GitSuggestion[]>;
1481 /**
1482 * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository.
1483 *
1484 * @param {string} repositoryId - Repository Id.
1485 * @param {string} sha1 - SHA1 hash of the tree object.
1486 * @param {string} project - Project ID or project name
1487 * @param {string} projectId - Project Id.
1488 * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false.
1489 * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID.
1490 */
1491 getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise<GitInterfaces.GitTreeRef>;
1492 /**
1493 * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository.
1494 *
1495 * @param {string} repositoryId - Repository Id.
1496 * @param {string} sha1 - SHA1 hash of the tree object.
1497 * @param {string} project - Project ID or project name
1498 * @param {string} projectId - Project Id.
1499 * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false.
1500 * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID.
1501 */
1502 getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise<NodeJS.ReadableStream>;
1503}