/// import basem = require('./ClientApiBases'); import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); import GitInterfaces = require("./interfaces/GitInterfaces"); import TfsCoreInterfaces = require("./interfaces/CoreInterfaces"); import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); export interface IGitApi extends basem.ClientApiBase { createAnnotatedTag(tagObject: GitInterfaces.GitAnnotatedTag, project: string, repositoryId: string): Promise; getAnnotatedTag(project: string, repositoryId: string, objectId: string): Promise; getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; getBranchStatsBatch(searchCriteria: GitInterfaces.GitQueryBranchStatsCriteria, repositoryId: string, project?: string): Promise; getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; getCherryPickRelationships(repositoryNameOrId: string, commitId: string, project?: string, includeLinks?: boolean): Promise; createCherryPick(cherryPickToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise; getCherryPick(project: string, cherryPickId: number, repositoryId: string): Promise; getCherryPickForRefName(project: string, repositoryId: string, refName: string): Promise; getCommitDiffs(repositoryId: string, project?: string, diffCommonCommit?: boolean, top?: number, skip?: number, baseVersionDescriptor?: GitInterfaces.GitBaseVersionDescriptor, targetVersionDescriptor?: GitInterfaces.GitTargetVersionDescriptor): Promise; getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number, includeStatuses?: boolean): Promise; getDeletedRepositories(project: string): Promise; getFileDiffs(fileDiffsCriteria: GitInterfaces.FileDiffsCriteria, project: string, repositoryId: string): Promise; getForks(repositoryNameOrId: string, collectionId: string, project?: string, includeLinks?: boolean): Promise; createForkSyncRequest(syncParams: GitInterfaces.GitForkSyncRequestParameters, repositoryNameOrId: string, project?: string, includeLinks?: boolean): Promise; getForkSyncRequest(repositoryNameOrId: string, forkSyncOperationId: number, project?: string, includeLinks?: boolean): Promise; getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise; createImportRequest(importRequest: GitInterfaces.GitImportRequest, project: string, repositoryId: string): Promise; getImportRequest(project: string, repositoryId: string, importRequestId: number): Promise; queryImportRequests(project: string, repositoryId: string, includeAbandoned?: boolean): Promise; updateImportRequest(importRequestToUpdate: GitInterfaces.GitImportRequest, project: string, repositoryId: string, importRequestId: number): Promise; 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): Promise; 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): Promise; getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; 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): Promise; 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): Promise; getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; getMergeBases(repositoryNameOrId: string, commitId: string, otherCommitId: string, project?: string, otherCollectionId?: string, otherRepositoryId?: string): Promise; createMergeRequest(mergeParameters: GitInterfaces.GitMergeParameters, project: string, repositoryNameOrId: string, includeLinks?: boolean): Promise; getMergeRequest(project: string, repositoryNameOrId: string, mergeOperationId: number, includeLinks?: boolean): Promise; createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; deleteAttachment(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; getAttachmentContent(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; getAttachments(repositoryId: string, pullRequestId: number, project?: string): Promise; getAttachmentZip(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; createLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; deleteLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; getLikes(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; getPullRequestIterationCommits(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number): Promise; getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; getPullRequestConflict(repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise; getPullRequestConflicts(repositoryId: string, pullRequestId: number, project?: string, skip?: number, top?: number, includeObsolete?: boolean, excludeResolved?: boolean, onlyResolved?: boolean): Promise; updatePullRequestConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise; updatePullRequestConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, pullRequestId: number, project?: string): Promise; getPullRequestIterationChanges(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number, compareTo?: number): Promise; getPullRequestIteration(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; getPullRequestIterations(repositoryId: string, pullRequestId: number, project?: string, includeCommits?: boolean): Promise; createPullRequestIterationStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; deletePullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise; getPullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise; getPullRequestIterationStatuses(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; updatePullRequestIterationStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; createPullRequestLabel(label: TfsCoreInterfaces.WebApiCreateTagRequestData, repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise; deletePullRequestLabels(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise; getPullRequestLabel(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise; getPullRequestLabels(repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise; getPullRequestProperties(repositoryId: string, pullRequestId: number, project?: string): Promise; updatePullRequestProperties(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise; getPullRequestQuery(queries: GitInterfaces.GitPullRequestQuery, repositoryId: string, project?: string): Promise; createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; updatePullRequestReviewers(patchVotes: GitInterfaces.IdentityRefWithVote[], repositoryId: string, pullRequestId: number, project?: string): Promise; getPullRequestById(pullRequestId: number, project?: string): Promise; getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string, supportsIterations?: boolean): Promise; getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean, includeWorkItemRefs?: boolean): Promise; getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; sharePullRequest(userMessage: GitInterfaces.ShareNotificationContext, repositoryId: string, pullRequestId: number, project?: string): Promise; createPullRequestStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, project?: string): Promise; deletePullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise; getPullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise; getPullRequestStatuses(repositoryId: string, pullRequestId: number, project?: string): Promise; updatePullRequestStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise; createComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; deleteComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; getComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; getComments(repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; updateComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; createThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, project?: string): Promise; getPullRequestThread(repositoryId: string, pullRequestId: number, threadId: number, project?: string, iteration?: number, baseIteration?: number): Promise; getThreads(repositoryId: string, pullRequestId: number, project?: string, iteration?: number, baseIteration?: number): Promise; updateThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; getPullRequestWorkItemRefs(repositoryId: string, pullRequestId: number, project?: string): Promise; createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; deleteRepositoryFromRecycleBin(project: string, repositoryId: string): Promise; getRecycleBinRepositories(project: string): Promise; restoreRepositoryFromRecycleBin(repositoryDetails: GitInterfaces.GitRecycleBinRepositoryDetails, project: string, repositoryId: string): Promise; getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean, includeStatuses?: boolean, includeMyBranches?: boolean, latestStatusesOnly?: boolean, peelTags?: boolean, filterContains?: string): Promise; updateRef(newRefInfo: GitInterfaces.GitRefUpdate, repositoryId: string, filter: string, project?: string, projectId?: string): Promise; updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; createFavorite(favorite: GitInterfaces.GitRefFavorite, project: string): Promise; deleteRefFavorite(project: string, favoriteId: number): Promise; getRefFavorite(project: string, favoriteId: number): Promise; getRefFavorites(project: string, repositoryId?: string, identityId?: string): Promise; createRepository(gitRepositoryToCreate: GitInterfaces.GitRepositoryCreateOptions, project?: string, sourceRef?: string): Promise; deleteRepository(repositoryId: string, project?: string): Promise; getRepositories(project?: string, includeLinks?: boolean, includeAllUrls?: boolean, includeHidden?: boolean): Promise; getRepository(repositoryId: string, project?: string): Promise; getRepositoryWithParent(repositoryId: string, includeParent: boolean, project?: string): Promise; updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; createRevert(revertToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise; getRevert(project: string, revertId: number, repositoryId: string): Promise; getRevertForRefName(project: string, repositoryId: string, refName: string): Promise; createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number, latestOnly?: boolean): Promise; getSuggestions(repositoryId: string, project?: string): Promise; getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; } export declare class GitApi extends basem.ClientApiBase implements IGitApi { constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); static readonly RESOURCE_AREA_ID: string; /** * Create an annotated tag. * * @param {GitInterfaces.GitAnnotatedTag} tagObject - Object containing details of tag to be created. * @param {string} project - Project ID or project name * @param {string} repositoryId - ID or name of the repository. */ createAnnotatedTag(tagObject: GitInterfaces.GitAnnotatedTag, project: string, repositoryId: string): Promise; /** * Get an annotated tag. * * @param {string} project - Project ID or project name * @param {string} repositoryId - ID or name of the repository. * @param {string} objectId - ObjectId (Sha1Id) of tag to get. */ getAnnotatedTag(project: string, repositoryId: string, objectId: string): Promise; /** * Get a single blob. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. * @param {string} project - Project ID or project name * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip * @param {string} fileName - Provide a fileName to use for a download. * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types */ getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; /** * Get a single blob. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. * @param {string} project - Project ID or project name * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip * @param {string} fileName - Provide a fileName to use for a download. * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types */ getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; /** * Gets one or more blobs in a zip file download. * * @param {string[]} blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file. * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {string} filename */ getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; /** * Get a single blob. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. * @param {string} project - Project ID or project name * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip * @param {string} fileName - Provide a fileName to use for a download. * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types */ getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; /** * Retrieve statistics about a single branch. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} name - Name of the branch. * @param {string} project - Project ID or project name * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. */ getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; /** * Retrieve statistics about all branches within a repository. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. */ getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; /** * @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria * @param {string} repositoryId * @param {string} project - Project ID or project name */ getBranchStatsBatch(searchCriteria: GitInterfaces.GitQueryBranchStatsCriteria, repositoryId: string, project?: string): Promise; /** * Retrieve changes for a particular commit. * * @param {string} commitId - The id of the commit. * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. * @param {string} project - Project ID or project name * @param {number} top - The maximum number of changes to return. * @param {number} skip - The number of changes to skip. */ getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; /** * Given a commitId, returns a list of commits that are in the same cherry-pick family. * * @param {string} repositoryNameOrId * @param {string} commitId * @param {string} project - Project ID or project name * @param {boolean} includeLinks */ getCherryPickRelationships(repositoryNameOrId: string, commitId: string, project?: string, includeLinks?: boolean): Promise; /** * Cherry pick a specific commit or commits that are associated to a pull request into a new branch. * * @param {GitInterfaces.GitAsyncRefOperationParameters} cherryPickToCreate * @param {string} project - Project ID or project name * @param {string} repositoryId - ID of the repository. */ createCherryPick(cherryPickToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise; /** * Retrieve information about a cherry pick by cherry pick Id. * * @param {string} project - Project ID or project name * @param {number} cherryPickId - ID of the cherry pick. * @param {string} repositoryId - ID of the repository. */ getCherryPick(project: string, cherryPickId: number, repositoryId: string): Promise; /** * Retrieve information about a cherry pick for a specific branch. * * @param {string} project - Project ID or project name * @param {string} repositoryId - ID of the repository. * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. */ getCherryPickForRefName(project: string, repositoryId: string, refName: string): Promise; /** * Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {boolean} diffCommonCommit - If true, diff between common and target commits. If false, diff between base and target commits. * @param {number} top - Maximum number of changes to return. Defaults to 100. * @param {number} skip - Number of changes to skip * @param {GitInterfaces.GitBaseVersionDescriptor} baseVersionDescriptor - Descriptor for base commit. * @param {GitInterfaces.GitTargetVersionDescriptor} targetVersionDescriptor - Descriptor for target commit. */ getCommitDiffs(repositoryId: string, project?: string, diffCommonCommit?: boolean, top?: number, skip?: number, baseVersionDescriptor?: GitInterfaces.GitBaseVersionDescriptor, targetVersionDescriptor?: GitInterfaces.GitTargetVersionDescriptor): Promise; /** * Retrieve a particular commit. * * @param {string} commitId - The id of the commit. * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. * @param {string} project - Project ID or project name * @param {number} changeCount - The number of changes to include in the result. */ getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; /** * Retrieve git commits for a project * * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria * @param {string} project - Project ID or project name * @param {number} skip * @param {number} top */ getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; /** * Retrieve a list of commits associated with a particular push. * * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. * @param {number} pushId - The id of the push. * @param {string} project - Project ID or project name * @param {number} top - The maximum number of commits to return ("get the top x commits"). * @param {number} skip - The number of commits to skip. * @param {boolean} includeLinks - Set to false to avoid including REST Url links for resources. Defaults to true. */ getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; /** * Retrieve git commits for a project matching the search criteria * * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {number} skip - Number of commits to skip. * @param {number} top - Maximum number of commits to return. * @param {boolean} includeStatuses - True to include additional commit status information. */ getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number, includeStatuses?: boolean): Promise; /** * Retrieve deleted git repositories. * * @param {string} project - Project ID or project name */ getDeletedRepositories(project: string): Promise; /** * Get the file diffs for each of the specified files * * @param {GitInterfaces.FileDiffsCriteria} fileDiffsCriteria - List of file parameters objects * @param {string} project - Project ID or project name * @param {string} repositoryId - The name or ID of the repository */ getFileDiffs(fileDiffsCriteria: GitInterfaces.FileDiffsCriteria, project: string, repositoryId: string): Promise; /** * Retrieve all forks of a repository in the collection. * * @param {string} repositoryNameOrId - The name or ID of the repository. * @param {string} collectionId - Team project collection ID. * @param {string} project - Project ID or project name * @param {boolean} includeLinks - True to include links. */ getForks(repositoryNameOrId: string, collectionId: string, project?: string, includeLinks?: boolean): Promise; /** * Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the repositories endpoint * * @param {GitInterfaces.GitForkSyncRequestParameters} syncParams - Source repository and ref mapping. * @param {string} repositoryNameOrId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {boolean} includeLinks - True to include links */ createForkSyncRequest(syncParams: GitInterfaces.GitForkSyncRequestParameters, repositoryNameOrId: string, project?: string, includeLinks?: boolean): Promise; /** * Get a specific fork sync operation's details. * * @param {string} repositoryNameOrId - The name or ID of the repository. * @param {number} forkSyncOperationId - OperationId of the sync request. * @param {string} project - Project ID or project name * @param {boolean} includeLinks - True to include links. */ getForkSyncRequest(repositoryNameOrId: string, forkSyncOperationId: number, project?: string, includeLinks?: boolean): Promise; /** * Retrieve all requested fork sync operations on this repository. * * @param {string} repositoryNameOrId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {boolean} includeAbandoned - True to include abandoned requests. * @param {boolean} includeLinks - True to include links. */ getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise; /** * Create an import request. * * @param {GitInterfaces.GitImportRequest} importRequest - The import request to create. * @param {string} project - Project ID or project name * @param {string} repositoryId - The name or ID of the repository. */ createImportRequest(importRequest: GitInterfaces.GitImportRequest, project: string, repositoryId: string): Promise; /** * Retrieve a particular import request. * * @param {string} project - Project ID or project name * @param {string} repositoryId - The name or ID of the repository. * @param {number} importRequestId - The unique identifier for the import request. */ getImportRequest(project: string, repositoryId: string, importRequestId: number): Promise; /** * Retrieve import requests for a repository. * * @param {string} project - Project ID or project name * @param {string} repositoryId - The name or ID of the repository. * @param {boolean} includeAbandoned - True to include abandoned import requests in the results. */ queryImportRequests(project: string, repositoryId: string, includeAbandoned?: boolean): Promise; /** * Retry or abandon a failed import request. * * @param {GitInterfaces.GitImportRequest} importRequestToUpdate - The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. * @param {string} project - Project ID or project name * @param {string} repositoryId - The name or ID of the repository. * @param {number} importRequestId - The unique identifier for the import request to update. */ updateImportRequest(importRequestToUpdate: GitInterfaces.GitImportRequest, project: string, repositoryId: string, importRequestId: number): Promise; /** * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} path - The item path. * @param {string} project - Project ID or project name * @param {string} scopePath - The path scope. The default is null. * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. * @param {boolean} latestProcessedChange - Set to true to include the lastest changes. Default is false. * @param {boolean} download - Set to true to download the response as a file. Default is false. * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. */ 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): Promise; /** * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} path - The item path. * @param {string} project - Project ID or project name * @param {string} scopePath - The path scope. The default is null. * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. * @param {boolean} latestProcessedChange - Set to true to include the lastest changes. Default is false. * @param {boolean} download - Set to true to download the response as a file. Default is false. * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. */ 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): Promise; /** * 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. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {string} scopePath - The path scope. The default is null. * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. * @param {boolean} latestProcessedChange - Set to true to include the lastest changes. Default is false. * @param {boolean} download - Set to true to download the response as a file. Default is false. * @param {boolean} includeLinks - Set to true to include links to items. Default is false. * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. */ getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; /** * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} path - The item path. * @param {string} project - Project ID or project name * @param {string} scopePath - The path scope. The default is null. * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. * @param {boolean} latestProcessedChange - Set to true to include the lastest changes. Default is false. * @param {boolean} download - Set to true to download the response as a file. Default is false. * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. */ 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): Promise; /** * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} path - The item path. * @param {string} project - Project ID or project name * @param {string} scopePath - The path scope. The default is null. * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. * @param {boolean} latestProcessedChange - Set to true to include the lastest changes. Default is false. * @param {boolean} download - Set to true to download the response as a file. Default is false. * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. */ 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): Promise; /** * 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 * * @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. * @param {string} repositoryId - The name or ID of the repository * @param {string} project - Project ID or project name */ getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; /** * 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. * * @param {string} repositoryNameOrId - ID or name of the local repository. * @param {string} commitId - First commit, usually the tip of the target branch of the potential merge. * @param {string} otherCommitId - Other commit, usually the tip of the source branch of the potential merge. * @param {string} project - Project ID or project name * @param {string} otherCollectionId - The collection ID where otherCommitId lives. * @param {string} otherRepositoryId - The repository ID where otherCommitId lives. */ getMergeBases(repositoryNameOrId: string, commitId: string, otherCommitId: string, project?: string, otherCollectionId?: string, otherRepositoryId?: string): Promise; /** * Request a git merge operation. Currently we support merging only 2 commits. * * @param {GitInterfaces.GitMergeParameters} mergeParameters - Parents commitIds and merge commit messsage. * @param {string} project - Project ID or project name * @param {string} repositoryNameOrId - The name or ID of the repository. * @param {boolean} includeLinks - True to include links */ createMergeRequest(mergeParameters: GitInterfaces.GitMergeParameters, project: string, repositoryNameOrId: string, includeLinks?: boolean): Promise; /** * Get a specific merge operation's details. * * @param {string} project - Project ID or project name * @param {string} repositoryNameOrId - The name or ID of the repository. * @param {number} mergeOperationId - OperationId of the merge request. * @param {boolean} includeLinks - True to include links */ getMergeRequest(project: string, repositoryNameOrId: string, mergeOperationId: number, includeLinks?: boolean): Promise; /** * Attach a new file to a pull request. * * @param {NodeJS.ReadableStream} contentStream - Content to upload * @param {string} fileName - The name of the file. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Delete a pull request attachment. * * @param {string} fileName - The name of the attachment to delete. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ deleteAttachment(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Get the file content of a pull request attachment. * * @param {string} fileName - The name of the attachment. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ getAttachmentContent(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Get a list of files attached to a given pull request. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ getAttachments(repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Get the file content of a pull request attachment. * * @param {string} fileName - The name of the attachment. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ getAttachmentZip(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Add a like on a comment. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - The ID of the thread that contains the comment. * @param {number} commentId - The ID of the comment. * @param {string} project - Project ID or project name */ createLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; /** * Delete a like on a comment. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - The ID of the thread that contains the comment. * @param {number} commentId - The ID of the comment. * @param {string} project - Project ID or project name */ deleteLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; /** * Get likes for a comment. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - The ID of the thread that contains the comment. * @param {number} commentId - The ID of the comment. * @param {string} project - Project ID or project name */ getLikes(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; /** * Get the commits for the specified iteration of a pull request. * * @param {string} repositoryId - ID or name of the repository. * @param {number} pullRequestId - ID of the pull request. * @param {number} iterationId - ID of the iteration from which to get the commits. * @param {string} project - Project ID or project name * @param {number} top - Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500. * @param {number} skip - Number of commits to skip. */ getPullRequestIterationCommits(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number): Promise; /** * Get the commits for the specified pull request. * * @param {string} repositoryId - ID or name of the repository. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Retrieve one conflict for a pull request by ID * * @param {string} repositoryId * @param {number} pullRequestId * @param {number} conflictId * @param {string} project - Project ID or project name */ getPullRequestConflict(repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise; /** * Retrieve all conflicts for a pull request * * @param {string} repositoryId * @param {number} pullRequestId * @param {string} project - Project ID or project name * @param {number} skip * @param {number} top * @param {boolean} includeObsolete * @param {boolean} excludeResolved * @param {boolean} onlyResolved */ getPullRequestConflicts(repositoryId: string, pullRequestId: number, project?: string, skip?: number, top?: number, includeObsolete?: boolean, excludeResolved?: boolean, onlyResolved?: boolean): Promise; /** * Update merge conflict resolution * * @param {GitInterfaces.GitConflict} conflict * @param {string} repositoryId * @param {number} pullRequestId * @param {number} conflictId * @param {string} project - Project ID or project name */ updatePullRequestConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise; /** * Update multiple merge conflict resolutions * * @param {GitInterfaces.GitConflict[]} conflictUpdates * @param {string} repositoryId * @param {number} pullRequestId * @param {string} project - Project ID or project name */ updatePullRequestConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Retrieve the changes made in a pull request between two iterations. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} iterationId - ID of the pull request iteration.
Iteration IDs are zero-based with zero indicating the common commit between the source and target branches. 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. * @param {string} project - Project ID or project name * @param {number} top - Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000. * @param {number} skip - Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100. * @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 */ getPullRequestIterationChanges(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number, compareTo?: number): Promise; /** * Get the specified iteration for a pull request. * * @param {string} repositoryId - ID or name of the repository. * @param {number} pullRequestId - ID of the pull request. * @param {number} iterationId - ID of the pull request iteration to return. * @param {string} project - Project ID or project name */ getPullRequestIteration(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; /** * Get the list of iterations for the specified pull request. * * @param {string} repositoryId - ID or name of the repository. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name * @param {boolean} includeCommits - If true, include the commits associated with each iteration in the response. */ getPullRequestIterations(repositoryId: string, pullRequestId: number, project?: string, includeCommits?: boolean): Promise; /** * 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. * * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} iterationId - ID of the pull request iteration. * @param {string} project - Project ID or project name */ createPullRequestIterationStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; /** * Delete pull request iteration status. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} iterationId - ID of the pull request iteration. * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name */ deletePullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise; /** * Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} iterationId - ID of the pull request iteration. * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name */ getPullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise; /** * Get all the statuses associated with a pull request iteration. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} iterationId - ID of the pull request iteration. * @param {string} project - Project ID or project name */ getPullRequestIterationStatuses(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; /** * Update pull request iteration statuses collection. The only supported operation type is `remove`. * * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} iterationId - ID of the pull request iteration. * @param {string} project - Project ID or project name */ updatePullRequestIterationStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; /** * Create a label for a specified pull request. The only required field is the name of the new label. * * @param {TfsCoreInterfaces.WebApiCreateTagRequestData} label - Label to assign to the pull request. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name * @param {string} projectId - Project ID or project name. */ createPullRequestLabel(label: TfsCoreInterfaces.WebApiCreateTagRequestData, repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise; /** * Removes a label from the set of those assigned to the pull request. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} labelIdOrName - The name or ID of the label requested. * @param {string} project - Project ID or project name * @param {string} projectId - Project ID or project name. */ deletePullRequestLabels(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise; /** * Retrieves a single label that has been assigned to a pull request. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} labelIdOrName - The name or ID of the label requested. * @param {string} project - Project ID or project name * @param {string} projectId - Project ID or project name. */ getPullRequestLabel(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise; /** * Get all the labels assigned to a pull request. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name * @param {string} projectId - Project ID or project name. */ getPullRequestLabels(repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise; /** * Get external properties of the pull request. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ getPullRequestProperties(repositoryId: string, pullRequestId: number, project?: string): Promise; /** * 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. * * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Properties to add, replace or remove in JSON Patch format. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ updatePullRequestProperties(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * 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. * * @param {GitInterfaces.GitPullRequestQuery} queries - The list of queries to perform. * @param {string} repositoryId - ID of the repository. * @param {string} project - Project ID or project name */ getPullRequestQuery(queries: GitInterfaces.GitPullRequestQuery, repositoryId: string, project?: string): Promise; /** * Add a reviewer to a pull request or cast a vote. * * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} reviewerId - ID of the reviewer. * @param {string} project - Project ID or project name */ createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; /** * Add reviewers to a pull request. * * @param {VSSInterfaces.IdentityRef[]} reviewers - Reviewers to add to the pull request. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Remove a reviewer from a pull request. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} reviewerId - ID of the reviewer to remove. * @param {string} project - Project ID or project name */ deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; /** * Retrieve information about a particular reviewer on a pull request * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} reviewerId - ID of the reviewer. * @param {string} project - Project ID or project name */ getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; /** * Retrieve the reviewers for a pull request * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; /** * 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. * * @param {GitInterfaces.IdentityRefWithVote[]} patchVotes - IDs of the reviewers whose votes will be reset to zero * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request * @param {string} project - Project ID or project name */ updatePullRequestReviewers(patchVotes: GitInterfaces.IdentityRefWithVote[], repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Retrieve a pull request. * * @param {number} pullRequestId - The ID of the pull request to retrieve. * @param {string} project - Project ID or project name */ getPullRequestById(pullRequestId: number, project?: string): Promise; /** * Retrieve all pull requests matching a specified criteria. * * @param {string} project - Project ID or project name * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. * @param {number} maxCommentLength - Not used. * @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. * @param {number} top - The number of pull requests to retrieve. */ getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; /** * Create a pull request. * * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - The pull request to create. * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {string} project - Project ID or project name * @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. */ createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string, supportsIterations?: boolean): Promise; /** * Retrieve a pull request. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - The ID of the pull request to retrieve. * @param {string} project - Project ID or project name * @param {number} maxCommentLength - Not used. * @param {number} skip - Not used. * @param {number} top - Not used. * @param {boolean} includeCommits - If true, the pull request will be returned with the associated commits. * @param {boolean} includeWorkItemRefs - If true, the pull request will be returned with the associated work item references. */ getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean, includeWorkItemRefs?: boolean): Promise; /** * Retrieve all pull requests matching a specified criteria. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. * @param {string} project - Project ID or project name * @param {number} maxCommentLength - Not used. * @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. * @param {number} top - The number of pull requests to retrieve. */ getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; /** * Update a pull request * * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - The pull request content that should be updated. * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request to update. * @param {string} project - Project ID or project name */ updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Sends an e-mail notification about a specific pull request to a set of recipients * * @param {GitInterfaces.ShareNotificationContext} userMessage * @param {string} repositoryId - ID of the git repository. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ sharePullRequest(userMessage: GitInterfaces.ShareNotificationContext, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Create a pull request status. * * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ createPullRequestStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Delete pull request status. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name */ deletePullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise; /** * Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} statusId - ID of the pull request status. * @param {string} project - Project ID or project name */ getPullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise; /** * Get all the statuses associated with a pull request. * * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ getPullRequestStatuses(repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Update pull request statuses collection. The only supported operation type is `remove`. * * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. * @param {string} repositoryId - The repository ID of the pull request’s target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ updatePullRequestStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). * * @param {GitInterfaces.Comment} comment - The comment to create. Comments can be up to 150,000 characters. * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - ID of the thread that the desired comment is in. * @param {string} project - Project ID or project name */ createComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; /** * Delete a comment associated with a specific thread in a pull request. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - ID of the thread that the desired comment is in. * @param {number} commentId - ID of the comment. * @param {string} project - Project ID or project name */ deleteComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; /** * Retrieve a comment associated with a specific thread in a pull request. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - ID of the thread that the desired comment is in. * @param {number} commentId - ID of the comment. * @param {string} project - Project ID or project name */ getComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; /** * Retrieve all comments associated with a specific thread in a pull request. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - ID of the thread. * @param {string} project - Project ID or project name */ getComments(repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; /** * Update a comment associated with a specific thread in a pull request. * * @param {GitInterfaces.Comment} comment - The comment content that should be updated. Comments can be up to 150,000 characters. * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - ID of the thread that the desired comment is in. * @param {number} commentId - ID of the comment to update. * @param {string} project - Project ID or project name */ updateComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; /** * Create a thread in a pull request. * * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread to create. Thread must contain at least one comment. * @param {string} repositoryId - Repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ createThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Retrieve a thread in a pull request. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - ID of the thread. * @param {string} project - Project ID or project name * @param {number} iteration - If specified, thread position will be tracked using this iteration as the right side of the diff. * @param {number} baseIteration - If specified, thread position will be tracked using this iteration as the left side of the diff. */ getPullRequestThread(repositoryId: string, pullRequestId: number, threadId: number, project?: string, iteration?: number, baseIteration?: number): Promise; /** * Retrieve all threads in a pull request. * * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name * @param {number} iteration - If specified, thread positions will be tracked using this iteration as the right side of the diff. * @param {number} baseIteration - If specified, thread positions will be tracked using this iteration as the left side of the diff. */ getThreads(repositoryId: string, pullRequestId: number, project?: string, iteration?: number, baseIteration?: number): Promise; /** * Update a thread in a pull request. * * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread content that should be updated. * @param {string} repositoryId - The repository ID of the pull request's target branch. * @param {number} pullRequestId - ID of the pull request. * @param {number} threadId - ID of the thread to update. * @param {string} project - Project ID or project name */ updateThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; /** * Retrieve a list of work items associated with a pull request. * * @param {string} repositoryId - ID or name of the repository. * @param {number} pullRequestId - ID of the pull request. * @param {string} project - Project ID or project name */ getPullRequestWorkItemRefs(repositoryId: string, pullRequestId: number, project?: string): Promise; /** * Push changes to the repository. * * @param {GitInterfaces.GitPush} push * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name */ createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; /** * Retrieves a particular push. * * @param {string} repositoryId - The name or ID of the repository. * @param {number} pushId - ID of the push. * @param {string} project - Project ID or project name * @param {number} includeCommits - The number of commits to include in the result. * @param {boolean} includeRefUpdates - If true, include the list of refs that were updated by the push. */ getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; /** * Retrieves pushes associated with the specified repository. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {number} skip - Number of pushes to skip. * @param {number} top - Number of pushes to return. * @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. */ getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; /** * Destroy (hard delete) a soft-deleted Git repository. * * @param {string} project - Project ID or project name * @param {string} repositoryId - The ID of the repository. */ deleteRepositoryFromRecycleBin(project: string, repositoryId: string): Promise; /** * Retrieve soft-deleted git repositories from the recycle bin. * * @param {string} project - Project ID or project name */ getRecycleBinRepositories(project: string): Promise; /** * 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. * * @param {GitInterfaces.GitRecycleBinRepositoryDetails} repositoryDetails * @param {string} project - Project ID or project name * @param {string} repositoryId - The ID of the repository. */ restoreRepositoryFromRecycleBin(repositoryDetails: GitInterfaces.GitRecycleBinRepositoryDetails, project: string, repositoryId: string): Promise; /** * Queries the provided repository for its refs and returns them. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {string} filter - [optional] A filter to apply to the refs (starts with). * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. * @param {boolean} includeStatuses - [optional] Includes up to the first 1000 commit statuses for each ref. The default value is false. * @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. * @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. * @param {boolean} peelTags - [optional] Annotated tags will populate the PeeledObjectId property. default is false. * @param {string} filterContains - [optional] A filter to apply to the refs (contains). */ getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean, includeStatuses?: boolean, includeMyBranches?: boolean, latestStatusesOnly?: boolean, peelTags?: boolean, filterContains?: string): Promise; /** * Lock or Unlock a branch. * * @param {GitInterfaces.GitRefUpdate} newRefInfo - The ref update action (lock/unlock) to perform * @param {string} repositoryId - The name or ID of the repository. * @param {string} filter - The name of the branch to lock/unlock * @param {string} project - Project ID or project name * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. */ updateRef(newRefInfo: GitInterfaces.GitRefUpdate, repositoryId: string, filter: string, project?: string, projectId?: string): Promise; /** * Creating, updating, or deleting refs(branches). * * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. */ updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; /** * Creates a ref favorite * * @param {GitInterfaces.GitRefFavorite} favorite - The ref favorite to create. * @param {string} project - Project ID or project name */ createFavorite(favorite: GitInterfaces.GitRefFavorite, project: string): Promise; /** * Deletes the refs favorite specified * * @param {string} project - Project ID or project name * @param {number} favoriteId - The Id of the ref favorite to delete. */ deleteRefFavorite(project: string, favoriteId: number): Promise; /** * Gets the refs favorite for a favorite Id. * * @param {string} project - Project ID or project name * @param {number} favoriteId - The Id of the requested ref favorite. */ getRefFavorite(project: string, favoriteId: number): Promise; /** * Gets the refs favorites for a repo and an identity. * * @param {string} project - Project ID or project name * @param {string} repositoryId - The id of the repository. * @param {string} identityId - The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used. */ getRefFavorites(project: string, repositoryId?: string, identityId?: string): Promise; /** * Create a git repository in a team project. * * @param {GitInterfaces.GitRepositoryCreateOptions} gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be ommitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). * @param {string} project - Project ID or project name * @param {string} sourceRef - [optional] Specify the source refs to use while creating a fork repo */ createRepository(gitRepositoryToCreate: GitInterfaces.GitRepositoryCreateOptions, project?: string, sourceRef?: string): Promise; /** * Delete a git repository * * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name */ deleteRepository(repositoryId: string, project?: string): Promise; /** * Retrieve git repositories. * * @param {string} project - Project ID or project name * @param {boolean} includeLinks - [optional] True to include reference links. The default value is false. * @param {boolean} includeAllUrls - [optional] True to include all remote URLs. The default value is false. * @param {boolean} includeHidden - [optional] True to include hidden repositories. The default value is false. */ getRepositories(project?: string, includeLinks?: boolean, includeAllUrls?: boolean, includeHidden?: boolean): Promise; /** * Retrieve a git repository. * * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name */ getRepository(repositoryId: string, project?: string): Promise; /** * Retrieve a git repository. * * @param {string} repositoryId - The name or ID of the repository. * @param {boolean} includeParent - True to include parent repository. Only available in authenticated calls. * @param {string} project - Project ID or project name */ getRepositoryWithParent(repositoryId: string, includeParent: boolean, project?: string): Promise; /** * Updates the Git repository with either a new repo name or a new default branch. * * @param {GitInterfaces.GitRepository} newRepositoryInfo - Specify a new repo name or a new default branch of the repository * @param {string} repositoryId - The name or ID of the repository. * @param {string} project - Project ID or project name */ updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; /** * 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. * * @param {GitInterfaces.GitAsyncRefOperationParameters} revertToCreate * @param {string} project - Project ID or project name * @param {string} repositoryId - ID of the repository. */ createRevert(revertToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise; /** * Retrieve information about a revert operation by revert Id. * * @param {string} project - Project ID or project name * @param {number} revertId - ID of the revert operation. * @param {string} repositoryId - ID of the repository. */ getRevert(project: string, revertId: number, repositoryId: string): Promise; /** * Retrieve information about a revert operation for a specific branch. * * @param {string} project - Project ID or project name * @param {string} repositoryId - ID of the repository. * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the revert operation. */ getRevertForRefName(project: string, repositoryId: string, refName: string): Promise; /** * Create Git commit status. * * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - Git commit status object to create. * @param {string} commitId - ID of the Git commit. * @param {string} repositoryId - ID of the repository. * @param {string} project - Project ID or project name */ createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; /** * Get statuses associated with the Git commit. * * @param {string} commitId - ID of the Git commit. * @param {string} repositoryId - ID of the repository. * @param {string} project - Project ID or project name * @param {number} top - Optional. The number of statuses to retrieve. Default is 1000. * @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. * @param {boolean} latestOnly - The flag indicates whether to get only latest statuses grouped by `Context.Name` and `Context.Genre`. */ getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number, latestOnly?: boolean): Promise; /** * Retrieve a pull request suggestion for a particular repository or team project. * * @param {string} repositoryId - ID of the git repository. * @param {string} project - Project ID or project name */ getSuggestions(repositoryId: string, project?: string): Promise; /** * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. * * @param {string} repositoryId - Repository Id. * @param {string} sha1 - SHA1 hash of the tree object. * @param {string} project - Project ID or project name * @param {string} projectId - Project Id. * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. */ getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; /** * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. * * @param {string} repositoryId - Repository Id. * @param {string} sha1 - SHA1 hash of the tree object. * @param {string} project - Project ID or project name * @param {string} projectId - Project Id. * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. */ getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; }