UNPKG

azure-devops-node-api

Version:
1,842 lines (1,841 loc) 112 kB
import PolicyInterfaces = require("../interfaces/PolicyInterfaces"); import TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); export interface AdvSecEnablementStatus { /** * Enabled by VSID */ changedById?: string; /** * Enabled changed on datetime */ changedOnDate?: Date; /** * True if Dependabot is enabled for the repository, false if it is disabled. */ dependabotEnabled?: boolean; /** * Enabled status 0 disabled, 1 enabled, Null never explicitly set, always whatever project is, ya this should probably be an enum somewhere */ enabled?: boolean; /** * ProjectId */ projectId?: string; /** * RepositoryId */ repositoryId?: string; } export interface AdvSecEnablementUpdate { /** * New Dependabot status. */ newDependabotStatus?: boolean; /** * New status */ newStatus?: boolean; /** * ProjectId */ projectId?: string; /** * RepositoryId Actual RepositoryId to Modify or Magic Repository Id "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" for ALL Repositories for that project */ repositoryId?: string; } export interface AssociatedWorkItem { assignedTo?: string; /** * Id of associated the work item. */ id?: number; state?: string; title?: string; /** * REST Url of the work item. */ url?: string; webUrl?: string; workItemType?: string; } export interface AsyncGitOperationNotification { operationId?: number; } export interface AsyncRefOperationCommitLevelEventNotification extends AsyncGitOperationNotification { commitId?: string; } export interface AsyncRefOperationCompletedNotification extends AsyncGitOperationNotification { newRefName?: string; } export interface AsyncRefOperationConflictNotification extends AsyncRefOperationCommitLevelEventNotification { } export interface AsyncRefOperationGeneralFailureNotification extends AsyncGitOperationNotification { } export interface AsyncRefOperationProgressNotification extends AsyncRefOperationCommitLevelEventNotification { progress?: number; } export interface AsyncRefOperationTimeoutNotification extends AsyncGitOperationNotification { } /** * Meta data for a file attached to an artifact. */ export interface Attachment { /** * Links to other related objects. */ _links?: any; /** * The person that uploaded this attachment. */ author?: VSSInterfaces.IdentityRef; /** * Content hash of on-disk representation of file content. Its calculated by the server by using SHA1 hash function. */ contentHash?: string; /** * The time the attachment was uploaded. */ createdDate?: Date; /** * The description of the attachment. */ description?: string; /** * The display name of the attachment. Can't be null or empty. */ displayName?: string; /** * Id of the attachment. */ id?: number; /** * Extended properties. */ properties?: any; /** * The url to download the content of the attachment. */ url?: string; } /** * Real time event (SignalR) for an auto-complete update on a pull request */ export interface AutoCompleteUpdatedEvent extends RealTimePullRequestEvent { } /** * Used by AdvSec to return billable committers. */ export interface BillableCommitter { /** * RepositoryId commit was pushed to. */ repoId?: string; /** * Visual Studio ID /Team Foundation ID */ vSID?: string; } export interface BillableCommitterDetail extends BillableCommitter { /** * ID (SHA-1) of the commit. */ commitId?: string; /** * Committer email address after parsing. */ committerEmail?: string; /** * Time reported by the commit. */ commitTime?: Date; /** * DisplayName of the Pusher. */ displayName?: string; /** * MailNickName of the Pusher. */ mailNickName?: string; /** * Project Id commit was pushed to. */ projectId?: string; /** * Project name commit was pushed to. */ projectName?: string; /** * Time of the push that contained the commit. */ pushedTime?: Date; /** * Pusher Id for the push. */ pusherId?: string; /** * Push Id that contained the commit. */ pushId?: number; /** * Repository name commit was pushed to. */ repoName?: string; /** * SamAccountName of the Pusher. */ samAccountName?: string; } /** * Used by AdvSec to estimate billable pushers for a Host or Project. */ export interface BillablePusher { /** * ProjectId that was pushed to. */ projectId?: string; /** * RepositoryId that was pushed to. */ repoId?: string; /** * Visual Studio ID /Team Foundation ID */ vSID?: string; } /** * Real time event (SignalR) for a source/target branch update on a pull request */ export interface BranchUpdatedEvent extends RealTimePullRequestEvent { /** * If true, the source branch of the pull request was updated */ isSourceUpdate?: boolean; } export interface Change<T> { /** * The type of change that was made to the item. */ changeType?: VersionControlChangeType; /** * Current version. */ item?: T; /** * Content of the item after the change. */ newContent?: ItemContent; /** * Path of the item on the server. */ sourceServerItem?: string; /** * URL to retrieve the item. */ url?: string; } export interface ChangeCountDictionary { } export interface ChangeList<T> { allChangesIncluded?: boolean; changeCounts?: { [key: number]: number; }; changes?: Change<T>[]; comment?: string; commentTruncated?: boolean; creationDate?: Date; notes?: CheckinNote[]; owner?: string; ownerDisplayName?: string; ownerId?: string; sortDate?: Date; version?: string; } /** * Criteria used in a search for change lists */ export interface ChangeListSearchCriteria { /** * If provided, a version descriptor to compare against base */ compareVersion?: string; /** * If true, don't include delete history entries */ excludeDeletes?: boolean; /** * Whether or not to follow renames for the given item being queried */ followRenames?: boolean; /** * If provided, only include history entries created after this date (string) */ fromDate?: string; /** * If provided, a version descriptor for the earliest change list to include */ fromVersion?: string; /** * Path of item to search under. If the itemPaths memebr is used then it will take precedence over this. */ itemPath?: string; /** * List of item paths to search under. If this member is used then itemPath will be ignored. */ itemPaths?: string[]; /** * Version of the items to search */ itemVersion?: string; /** * Number of results to skip (used when clicking more...) */ skip?: number; /** * If provided, only include history entries created before this date (string) */ toDate?: string; /** * If provided, the maximum number of history entries to return */ top?: number; /** * If provided, a version descriptor for the latest change list to include */ toVersion?: string; /** * Alias or display name of user who made the changes */ user?: string; } export interface CheckinNote { name?: string; value?: string; } /** * Represents a comment which is one of potentially many in a comment thread. */ export interface Comment { /** * Links to other related objects. */ _links?: any; /** * The author of the comment. */ author?: VSSInterfaces.IdentityRef; /** * The comment type at the time of creation. */ commentType?: CommentType; /** * The comment content. */ content?: string; /** * The comment ID. IDs start at 1 and are unique to a pull request. */ id?: number; /** * Whether or not this comment was soft-deleted. */ isDeleted?: boolean; /** * The date the comment's content was last updated. */ lastContentUpdatedDate?: Date; /** * The date the comment was last updated. */ lastUpdatedDate?: Date; /** * The ID of the parent comment. This is used for replies. */ parentCommentId?: number; /** * The date the comment was first published. */ publishedDate?: Date; /** * A list of the users who have liked this comment. */ usersLiked?: VSSInterfaces.IdentityRef[]; } /** * Comment iteration context is used to identify which diff was being viewed when the thread was created. */ export interface CommentIterationContext { /** * The iteration of the file on the left side of the diff when the thread was created. If this value is equal to SecondComparingIteration, then this version is the common commit between the source and target branches of the pull request. */ firstComparingIteration?: number; /** * The iteration of the file on the right side of the diff when the thread was created. */ secondComparingIteration?: number; } export interface CommentPosition { /** * The line number of a thread's position. Starts at 1. */ line?: number; /** * The character offset of a thread's position inside of a line. Starts at 1. */ offset?: number; } /** * Represents a comment thread of a pull request. A thread contains meta data about the file it was left on along with one or more comments (an initial comment and the subsequent replies). */ export interface CommentThread { /** * Links to other related objects. */ _links?: any; /** * A list of the comments. */ comments?: Comment[]; /** * The comment thread id. */ id?: number; /** * Set of identities related to this thread */ identities?: { [key: string]: VSSInterfaces.IdentityRef; }; /** * Specify if the thread is deleted which happens when all comments are deleted. */ isDeleted?: boolean; /** * The time this thread was last updated. */ lastUpdatedDate?: Date; /** * Optional properties associated with the thread as a collection of key-value pairs. */ properties?: any; /** * The time this thread was published. */ publishedDate?: Date; /** * The status of the comment thread. */ status?: CommentThreadStatus; /** * Specify thread context such as position in left/right file. */ threadContext?: CommentThreadContext; } export interface CommentThreadContext { /** * File path relative to the root of the repository. It's up to the client to use any path format. */ filePath?: string; /** * Position of last character of the thread's span in left file. */ leftFileEnd?: CommentPosition; /** * Position of first character of the thread's span in left file. */ leftFileStart?: CommentPosition; /** * Position of last character of the thread's span in right file. */ rightFileEnd?: CommentPosition; /** * Position of first character of the thread's span in right file. */ rightFileStart?: CommentPosition; } /** * The status of a comment thread. */ export declare enum CommentThreadStatus { /** * The thread status is unknown. */ Unknown = 0, /** * The thread status is active. */ Active = 1, /** * The thread status is resolved as fixed. */ Fixed = 2, /** * The thread status is resolved as won't fix. */ WontFix = 3, /** * The thread status is closed. */ Closed = 4, /** * The thread status is resolved as by design. */ ByDesign = 5, /** * The thread status is pending. */ Pending = 6 } /** * Comment tracking criteria is used to identify which iteration context the thread has been tracked to (if any) along with some detail about the original position and filename. */ export interface CommentTrackingCriteria { /** * The iteration of the file on the left side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0. */ firstComparingIteration?: number; /** * Original filepath the thread was created on before tracking. This will be different than the current thread filepath if the file in question was renamed in a later iteration. */ origFilePath?: string; /** * Original position of last character of the thread's span in left file. */ origLeftFileEnd?: CommentPosition; /** * Original position of first character of the thread's span in left file. */ origLeftFileStart?: CommentPosition; /** * Original position of last character of the thread's span in right file. */ origRightFileEnd?: CommentPosition; /** * Original position of first character of the thread's span in right file. */ origRightFileStart?: CommentPosition; /** * The iteration of the file on the right side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0. */ secondComparingIteration?: number; } /** * The type of a comment. */ export declare enum CommentType { /** * The comment type is not known. */ Unknown = 0, /** * This is a regular user comment. */ Text = 1, /** * The comment comes as a result of a code change. */ CodeChange = 2, /** * The comment represents a system message. */ System = 3 } /** * Real time event (SignalR) for a completion errors on a pull request */ export interface CompletionErrorsEvent extends RealTimePullRequestEvent { /** * The error message associated with the completion error */ errorMessage?: string; } /** * Real time event (SignalR) for a discussions update on a pull request */ export interface DiscussionsUpdatedEvent extends RealTimePullRequestEvent { } export interface FileContentMetadata { contentType?: string; encoding?: number; extension?: string; fileName?: string; isBinary?: boolean; isImage?: boolean; vsLink?: string; } /** * Provides properties that describe file differences */ export interface FileDiff { /** * The collection of line diff blocks */ lineDiffBlocks?: LineDiffBlock[]; /** * Original path of item if different from current path. */ originalPath?: string; /** * Current path of item */ path?: string; } /** * Provides parameters that describe inputs for the file diff */ export interface FileDiffParams { /** * Original path of the file */ originalPath?: string; /** * Current path of the file */ path?: string; } /** * Provides properties that describe inputs for the file diffs */ export interface FileDiffsCriteria { /** * Commit ID of the base version */ baseVersionCommit?: string; /** * List of parameters for each of the files for which we need to get the file diff */ fileDiffParams?: FileDiffParams[]; /** * Commit ID of the target version */ targetVersionCommit?: string; } /** * A Git annotated tag. */ export interface GitAnnotatedTag { /** * The tagging Message */ message?: string; /** * The name of the annotated tag. */ name?: string; /** * The objectId (Sha1Id) of the tag. */ objectId?: string; /** * User info and date of tagging. */ taggedBy?: GitUserDate; /** * Tagged git object. */ taggedObject?: GitObject; url?: string; } /** * Current status of the asynchronous operation. */ export declare enum GitAsyncOperationStatus { /** * The operation is waiting in a queue and has not yet started. */ Queued = 1, /** * The operation is currently in progress. */ InProgress = 2, /** * The operation has completed. */ Completed = 3, /** * The operation has failed. Check for an error message. */ Failed = 4, /** * The operation has been abandoned. */ Abandoned = 5 } export interface GitAsyncRefOperation { _links?: any; detailedStatus?: GitAsyncRefOperationDetail; parameters?: GitAsyncRefOperationParameters; status?: GitAsyncOperationStatus; /** * A URL that can be used to make further requests for status about the operation */ url?: string; } /** * Information about the progress of a cherry pick or revert operation. */ export interface GitAsyncRefOperationDetail { /** * Indicates if there was a conflict generated when trying to cherry pick or revert the changes. */ conflict?: boolean; /** * The current commit from the list of commits that are being cherry picked or reverted. */ currentCommitId?: string; /** * Detailed information about why the cherry pick or revert failed to complete. */ failureMessage?: string; /** * A number between 0 and 1 indicating the percent complete of the operation. */ progress?: number; /** * Provides a status code that indicates the reason the cherry pick or revert failed. */ status?: GitAsyncRefOperationFailureStatus; /** * Indicates if the operation went beyond the maximum time allowed for a cherry pick or revert operation. */ timedout?: boolean; } export declare enum GitAsyncRefOperationFailureStatus { /** * No status */ None = 0, /** * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. */ InvalidRefName = 1, /** * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. */ RefNameConflict = 2, /** * The ref update request could not be completed because the user lacks the permission to create a branch */ CreateBranchPermissionRequired = 3, /** * The ref update request could not be completed because the user lacks write permissions required to write this ref */ WritePermissionRequired = 4, /** * Target branch was deleted after Git async operation started */ TargetBranchDeleted = 5, /** * Git object is too large to materialize into memory */ GitObjectTooLarge = 6, /** * Identity who authorized the operation was not found */ OperationIndentityNotFound = 7, /** * Async operation was not found */ AsyncOperationNotFound = 8, /** * Unexpected failure */ Other = 9, /** * Initiator of async operation has signature with empty name or email */ EmptyCommitterSignature = 10 } /** * Parameters that are provided in the request body when requesting to cherry pick or revert. */ export interface GitAsyncRefOperationParameters { /** * Proposed target branch name for the cherry pick or revert operation. */ generatedRefName?: string; /** * The target branch for the cherry pick or revert operation. */ ontoRefName?: string; /** * The git repository for the cherry pick or revert operation. */ repository?: GitRepository; /** * Details about the source of the cherry pick or revert operation (e.g. A pull request or a specific commit). */ source?: GitAsyncRefOperationSource; } /** * GitAsyncRefOperationSource specifies the pull request or list of commits to use when making a cherry pick and revert operation request. Only one should be provided. */ export interface GitAsyncRefOperationSource { /** * A list of commits to cherry pick or revert */ commitList?: GitCommitRef[]; /** * Id of the pull request to cherry pick or revert */ pullRequestId?: number; } export interface GitBaseVersionDescriptor extends GitVersionDescriptor { /** * Version string identifier (name of tag/branch, SHA1 of commit) */ baseVersion?: string; /** * Version options - Specify additional modifiers to version (e.g Previous) */ baseVersionOptions?: GitVersionOptions; /** * Version type (branch, tag, or commit). Determines how Id is interpreted */ baseVersionType?: GitVersionType; } export interface GitBlobRef { _links?: any; /** * SHA1 hash of git object */ objectId?: string; /** * Size of blob content (in bytes) */ size?: number; url?: string; } /** * Ahead and behind counts for a particular ref. */ export interface GitBranchStats { /** * Number of commits ahead. */ aheadCount?: number; /** * Number of commits behind. */ behindCount?: number; /** * Current commit. */ commit?: GitCommitRef; /** * True if this is the result for the base version. */ isBaseVersion?: boolean; /** * Name of the ref. */ name?: string; } export interface GitChange extends Change<GitItem> { /** * ID of the change within the group of changes. */ changeId?: number; /** * New Content template to be used when pushing new changes. */ newContentTemplate?: GitTemplate; /** * Original path of item if different from current path. */ originalPath?: string; } /** * This object is returned from Cherry Pick operations and provides the id and status of the operation */ export interface GitCherryPick extends GitAsyncRefOperation { cherryPickId?: number; } export interface GitCommit extends GitCommitRef { treeId?: string; } export interface GitCommitChanges { changeCounts?: ChangeCountDictionary; changes?: GitChange[]; } export interface GitCommitDiffs { aheadCount?: number; allChangesIncluded?: boolean; baseCommit?: string; behindCount?: number; changeCounts?: { [key: number]: number; }; changes?: GitChange[]; commonCommit?: string; targetCommit?: string; } /** * Provides properties that describe a Git commit and associated metadata. */ export interface GitCommitRef { /** * A collection of related REST reference links. */ _links?: any; /** * Author of the commit. */ author?: GitUserDate; /** * Counts of the types of changes (edits, deletes, etc.) included with the commit. */ changeCounts?: ChangeCountDictionary; /** * An enumeration of the changes included with the commit. */ changes?: GitChange[]; /** * Comment or message of the commit. */ comment?: string; /** * Indicates if the comment is truncated from the full Git commit comment message. */ commentTruncated?: boolean; /** * ID (SHA-1) of the commit. */ commitId?: string; /** * Committer of the commit. */ committer?: GitUserDate; /** * Indicates that commit contains too many changes to be displayed */ commitTooManyChanges?: boolean; /** * An enumeration of the parent commit IDs for this commit. */ parents?: string[]; /** * The push associated with this commit. */ push?: GitPushRef; /** * Remote URL path to the commit. */ remoteUrl?: string; /** * A list of status metadata from services and extensions that may associate additional information to the commit. */ statuses?: GitStatus[]; /** * REST URL for this resource. */ url?: string; /** * A list of workitems associated with this commit. */ workItems?: VSSInterfaces.ResourceRef[]; } export interface GitCommitToCreate { baseRef?: GitRef; comment?: string; pathActions?: GitPathAction[]; } export interface GitConflict { _links?: any; conflictId?: number; conflictPath?: string; conflictType?: GitConflictType; mergeBaseCommit?: GitCommitRef; mergeOrigin?: GitMergeOriginRef; mergeSourceCommit?: GitCommitRef; mergeTargetCommit?: GitCommitRef; resolutionError?: GitResolutionError; resolutionStatus?: GitResolutionStatus; resolvedBy?: VSSInterfaces.IdentityRef; resolvedDate?: Date; url?: string; } /** * Data object for AddAdd conflict */ export interface GitConflictAddAdd extends GitConflict { resolution?: GitResolutionMergeContent; sourceBlob?: GitBlobRef; targetBlob?: GitBlobRef; } /** * Data object for RenameAdd conflict */ export interface GitConflictAddRename extends GitConflict { baseBlob?: GitBlobRef; resolution?: GitResolutionPathConflict; sourceBlob?: GitBlobRef; targetBlob?: GitBlobRef; targetOriginalPath?: string; } /** * Data object for EditDelete conflict */ export interface GitConflictDeleteEdit extends GitConflict { baseBlob?: GitBlobRef; resolution?: GitResolutionPickOneAction; targetBlob?: GitBlobRef; } /** * Data object for RenameDelete conflict */ export interface GitConflictDeleteRename extends GitConflict { baseBlob?: GitBlobRef; resolution?: GitResolutionPickOneAction; targetBlob?: GitBlobRef; targetNewPath?: string; } /** * Data object for FileDirectory conflict */ export interface GitConflictDirectoryFile extends GitConflict { resolution?: GitResolutionPathConflict; sourceTree?: GitTreeRef; targetBlob?: GitBlobRef; } /** * Data object for DeleteEdit conflict */ export interface GitConflictEditDelete extends GitConflict { baseBlob?: GitBlobRef; resolution?: GitResolutionPickOneAction; sourceBlob?: GitBlobRef; } /** * Data object for EditEdit conflict */ export interface GitConflictEditEdit extends GitConflict { baseBlob?: GitBlobRef; resolution?: GitResolutionMergeContent; sourceBlob?: GitBlobRef; targetBlob?: GitBlobRef; } /** * Data object for DirectoryFile conflict */ export interface GitConflictFileDirectory extends GitConflict { resolution?: GitResolutionPathConflict; sourceBlob?: GitBlobRef; targetTree?: GitTreeRef; } /** * Data object for Rename1to2 conflict */ export interface GitConflictRename1to2 extends GitConflict { baseBlob?: GitBlobRef; resolution?: GitResolutionRename1to2; sourceBlob?: GitBlobRef; sourceNewPath?: string; targetBlob?: GitBlobRef; targetNewPath?: string; } /** * Data object for Rename2to1 conflict */ export interface GitConflictRename2to1 extends GitConflict { resolution?: GitResolutionPathConflict; sourceNewBlob?: GitBlobRef; sourceOriginalBlob?: GitBlobRef; sourceOriginalPath?: string; targetNewBlob?: GitBlobRef; targetOriginalBlob?: GitBlobRef; targetOriginalPath?: string; } /** * Data object for AddRename conflict */ export interface GitConflictRenameAdd extends GitConflict { baseBlob?: GitBlobRef; resolution?: GitResolutionPathConflict; sourceBlob?: GitBlobRef; sourceOriginalPath?: string; targetBlob?: GitBlobRef; } /** * Data object for DeleteRename conflict */ export interface GitConflictRenameDelete extends GitConflict { baseBlob?: GitBlobRef; resolution?: GitResolutionPickOneAction; sourceBlob?: GitBlobRef; sourceNewPath?: string; } /** * Data object for RenameRename conflict */ export interface GitConflictRenameRename extends GitConflict { baseBlob?: GitBlobRef; originalPath?: string; resolution?: GitResolutionMergeContent; sourceBlob?: GitBlobRef; targetBlob?: GitBlobRef; } /** * The type of a merge conflict. */ export declare enum GitConflictType { /** * No conflict */ None = 0, /** * Added on source and target; content differs */ AddAdd = 1, /** * Added on source and rename destination on target */ AddRename = 2, /** * Deleted on source and edited on target */ DeleteEdit = 3, /** * Deleted on source and renamed on target */ DeleteRename = 4, /** * Path is a directory on source and a file on target */ DirectoryFile = 5, /** * Children of directory which has DirectoryFile or FileDirectory conflict */ DirectoryChild = 6, /** * Edited on source and deleted on target */ EditDelete = 7, /** * Edited on source and target; content differs */ EditEdit = 8, /** * Path is a file on source and a directory on target */ FileDirectory = 9, /** * Same file renamed on both source and target; destination paths differ */ Rename1to2 = 10, /** * Different files renamed to same destination path on both source and target */ Rename2to1 = 11, /** * Rename destination on source and new file on target */ RenameAdd = 12, /** * Renamed on source and deleted on target */ RenameDelete = 13, /** * Rename destination on both source and target; content differs */ RenameRename = 14 } export interface GitConflictUpdateResult { /** * Conflict ID that was provided by input */ conflictId?: number; /** * Reason for failing */ customMessage?: string; /** * New state of the conflict after updating */ updatedConflict?: GitConflict; /** * Status of the update on the server */ updateStatus?: GitConflictUpdateStatus; } /** * Represents the possible outcomes from a request to update a pull request conflict */ export declare enum GitConflictUpdateStatus { /** * Indicates that pull request conflict update request was completed successfully */ Succeeded = 0, /** * Indicates that the update request did not fit the expected data contract */ BadRequest = 1, /** * Indicates that the requested resolution was not valid */ InvalidResolution = 2, /** * Indicates that the conflict in the update request was not a supported conflict type */ UnsupportedConflictType = 3, /** * Indicates that the conflict could not be found */ NotFound = 4 } export interface GitDeletedRepository { createdDate?: Date; deletedBy?: VSSInterfaces.IdentityRef; deletedDate?: Date; id?: string; name?: string; project?: TfsCoreInterfaces.TeamProjectReference; } export interface GitFilePathsCollection { commitId?: string; paths?: string[]; url?: string; } /** * Status information about a requested fork operation. */ export interface GitForkOperationStatusDetail { /** * All valid steps for the forking process */ allSteps?: string[]; /** * Index into AllSteps for the current step */ currentStep?: number; /** * Error message if the operation failed. */ errorMessage?: string; } /** * Information about a fork ref. */ export interface GitForkRef extends GitRef { /** * The repository ID of the fork. */ repository?: GitRepository; } /** * Request to sync data between two forks. */ export interface GitForkSyncRequest { /** * Collection of related links */ _links?: any; detailedStatus?: GitForkOperationStatusDetail; /** * Unique identifier for the operation. */ operationId?: number; /** * Fully-qualified identifier for the source repository. */ source: GlobalGitRepositoryKey; /** * If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. */ sourceToTargetRefs?: SourceToTargetRef[]; status?: GitAsyncOperationStatus; } /** * Parameters for creating a fork request */ export interface GitForkSyncRequestParameters { /** * Fully-qualified identifier for the source repository. */ source: GlobalGitRepositoryKey; /** * If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. */ sourceToTargetRefs?: SourceToTargetRef[]; } export interface GitForkTeamProjectReference extends TfsCoreInterfaces.TeamProjectReference { } /** * Accepted types of version */ export declare enum GitHistoryMode { /** * The history mode used by `git log`. This is the default. */ SimplifiedHistory = 0, /** * The history mode used by `git log --first-parent` */ FirstParent = 1, /** * The history mode used by `git log --full-history` */ FullHistory = 2, /** * The history mode used by `git log --full-history --simplify-merges` */ FullHistorySimplifyMerges = 3 } export interface GitImportFailedEvent { sourceRepositoryName?: string; targetRepository?: GitRepository; } /** * Parameter for creating a git import request when source is Git version control */ export interface GitImportGitSource { /** * Tells if this is a sync request or not */ overwrite?: boolean; /** * Url for the source repo */ url?: string; } /** * A request to import data from a remote source control system. */ export interface GitImportRequest { /** * Links to related resources. */ _links?: any; /** * Detailed status of the import, including the current step and an error message, if applicable. */ detailedStatus?: GitImportStatusDetail; /** * The unique identifier for this import request. */ importRequestId?: number; /** * Parameters for creating the import request. */ parameters?: GitImportRequestParameters; /** * The target repository for this import. */ repository?: GitRepository; /** * Current status of the import. */ status?: GitAsyncOperationStatus; /** * A link back to this import request resource. */ url?: string; } /** * Parameters for creating an import request */ export interface GitImportRequestParameters { /** * Option to delete service endpoint when import is done */ deleteServiceEndpointAfterImportIsDone?: boolean; /** * Source for importing git repository */ gitSource?: GitImportGitSource; /** * Service Endpoint for connection to external endpoint */ serviceEndpointId?: string; /** * Source for importing tfvc repository */ tfvcSource?: GitImportTfvcSource; } /** * Additional status information about an import request. */ export interface GitImportStatusDetail { /** * All valid steps for the import process */ allSteps?: string[]; /** * Index into AllSteps for the current step */ currentStep?: number; /** * Error message if the operation failed. */ errorMessage?: string; } export interface GitImportSucceededEvent { sourceRepositoryName?: string; targetRepository?: GitRepository; } /** * Parameter for creating a git import request when source is tfvc version control */ export interface GitImportTfvcSource { /** * Set true to import History, false otherwise */ importHistory?: boolean; /** * Get history for last n days (max allowed value is 180 days) */ importHistoryDurationInDays?: number; /** * Path which we want to import (this can be copied from Path Control in Explorer) */ path?: string; } export interface GitItem extends ItemModel { /** * SHA1 of commit item was fetched at */ commitId?: string; /** * Type of object (Commit, Tree, Blob, Tag, ...) */ gitObjectType?: GitObjectType; /** * Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached */ latestProcessedChange?: GitCommitRef; /** * Git object id */ objectId?: string; /** * Git object id */ originalObjectId?: string; } export interface GitItemDescriptor { /** * Path to item */ path?: string; /** * Specifies whether to include children (OneLevel), all descendants (Full), or None */ recursionLevel?: VersionControlRecursionType; /** * Version string (interpretation based on VersionType defined in subclass */ version?: string; /** * Version modifiers (e.g. previous) */ versionOptions?: GitVersionOptions; /** * How to interpret version (branch,tag,commit) */ versionType?: GitVersionType; } export interface GitItemRequestData { /** * Whether to include metadata for all items */ includeContentMetadata?: boolean; /** * Whether to include the _links field on the shallow references */ includeLinks?: boolean; /** * Collection of items to fetch, including path, version, and recursion level */ itemDescriptors?: GitItemDescriptor[]; /** * Whether to include shallow ref to commit that last changed each item */ latestProcessedChange?: boolean; } export interface GitLastChangeItem { /** * Gets or sets the commit Id this item was modified most recently for the provided version. */ commitId?: string; /** * Gets or sets the path of the item. */ path?: string; } export interface GitLastChangeTreeItems { /** * The list of commits referenced by Items, if they were requested. */ commits?: GitCommitRef[]; /** * The last change of items. */ items?: GitLastChangeItem[]; /** * The last explored time, in case the result is not comprehensive. Null otherwise. */ lastExploredTime?: Date; } export interface GitMerge extends GitMergeParameters { /** * Reference links. */ _links?: any; /** * Detailed status of the merge operation. */ detailedStatus?: GitMergeOperationStatusDetail; /** * Unique identifier for the merge operation. */ mergeOperationId?: number; /** * Status of the merge operation. */ status?: GitAsyncOperationStatus; } /** * Status information about a requested merge operation. */ export interface GitMergeOperationStatusDetail { /** * Error message if the operation failed. */ failureMessage?: string; /** * The commitId of the resultant merge commit. */ mergeCommitId?: string; } export interface GitMergeOriginRef { cherryPickId?: number; pullRequestId?: number; revertId?: number; } /** * Parameters required for performing git merge. */ export interface GitMergeParameters { /** * Comment or message of the commit. */ comment?: string; /** * An enumeration of the parent commit IDs for the merge commit. */ parents?: string[]; } /** * Git object identifier and type information. */ export interface GitObject { /** * Object Id (Sha1Id). */ objectId?: string; /** * Type of object (Commit, Tree, Blob, Tag) */ objectType?: GitObjectType; } export declare enum GitObjectType { Bad = 0, Commit = 1, Tree = 2, Blob = 3, Tag = 4, Ext2 = 5, OfsDelta = 6, RefDelta = 7 } export interface GitPathAction { action?: GitPathActions; base64Content?: string; path?: string; rawTextContent?: string; targetPath?: string; } export declare enum GitPathActions { None = 0, Edit = 1, Delete = 2, Add = 3, Rename = 4 } export interface GitPathToItemsCollection { items?: { [key: string]: GitItem[]; }; } export interface GitPolicyConfigurationResponse { /** * The HTTP client methods find the continuation token header in the response and populate this field. */ continuationToken?: string; policyConfigurations?: PolicyInterfaces.PolicyConfiguration[]; } /** * Represents all the data associated with a pull request. */ export interface GitPullRequest { /** * Links to other related objects. */ _links?: any; /** * A string which uniquely identifies this pull request. To generate an artifact ID for a pull request, use this template: ```vstfs:///Git/PullRequestId/{projectId}/{repositoryId}/{pullRequestId}``` */ artifactId?: string; /** * If set, auto-complete is enabled for this pull request and this is the identity that enabled it. */ autoCompleteSetBy?: VSSInterfaces.IdentityRef; /** * The user who closed the pull request. */ closedBy?: VSSInterfaces.IdentityRef; /** * The date when the pull request was closed (completed, abandoned, or merged externally). */ closedDate?: Date; /** * The code review ID of the pull request. Used internally. */ codeReviewId?: number; /** * The commits contained in the pull request. */ commits?: GitCommitRef[]; /** * Options which affect how the pull request will be merged when it is completed. */ completionOptions?: GitPullRequestCompletionOptions; /** * The most recent date at which the pull request entered the queue to be completed. Used internally. */ completionQueueTime?: Date; /** * The identity of the user who created the pull request. */ createdBy?: VSSInterfaces.IdentityRef; /** * The date when the pull request was created. */ creationDate?: Date; /** * The description of the pull request. */ description?: string; /** * If this is a PR from a fork this will contain information about its source. */ forkSource?: GitForkRef; /** * Multiple mergebases warning */ hasMultipleMergeBases?: boolean; /** * Draft / WIP pull request. */ isDraft?: boolean; /** * The labels associated with the pull request. */ labels?: TfsCoreInterfaces.WebApiTagDefinition[]; /** * The commit of the most recent pull request merge. If empty, the most recent merge is in progress or was unsuccessful. */ lastMergeCommit?: GitCommitRef; /** * The commit at the head of the source branch at the time of the last pull request merge. */ lastMergeSourceCommit?: GitCommitRef; /** * The commit at the head of the target branch at the time of the last pull request merge. */ lastMergeTargetCommit?: GitCommitRef; /** * If set, pull request merge failed for this reason. */ mergeFailureMessage?: string; /** * The type of failure (if any) of the pull request merge. */ mergeFailureType?: PullRequestMergeFailureType; /** * The ID of the job used to run the pull request merge. Used internally. */ mergeId?: string; /** * Options used when the pull request merge runs. These are separate from completion options since completion happens only once and a new merge will run every time the source branch of the pull request changes. */ mergeOptions?: GitPullRequestMergeOptions; /** * The current status of the pull request merge. */ mergeStatus?: PullRequestAsyncStatus; /** * The ID of the pull request. */ pullRequestId?: number; /** * Used internally. */ remoteUrl?: string; /** * The repository containing the target branch of the pull request. */ repository?: GitRepository; /** * A list of reviewers on the pull request along with the state of their votes. */ reviewers?: IdentityRefWithVote[]; /** * The name of the source branch of the pull request. */ sourceRefName?: string; /** * The status of the pull request. */ status?: PullRequestStatus; /** * If true, this pull request supports multiple iterations. Iteration support means individual pushes to the source branch of the pull request can be reviewed and comments left in one iteration will be tracked across future iterations. */ supportsIterations?: boolean; /** * The name of the target branch of the pull request. */ targetRefName?: string; /** * The title of the pull request. */ title?: string; /** * Used internally. */ url?: string; /** * Any work item references associated with this pull request. */ workItemRefs?: VSSInterfaces.ResourceRef[]; } /** * Change made in a pull request. */ export interface GitPullRequestChange extends GitChange { /** * ID used to track files through multiple changes. */ changeTrackingId?: number; } /** * Represents a comment thread of a pull request. A thread contains meta data about the file it was left on (if any) along with one or more comments (an initial comment and the subsequent replies). */ export interface GitPullRequestCommentThread extends CommentThread { /** * Extended context information unique to pull requests */ pullRequestThreadContext?: GitPullRequestCommentThreadContext; } /** * Comment thread context contains details about what diffs were being viewed at the time of thread creation and whether or not the thread has been tracked from that original diff. */ export interface GitPullRequestCommentThreadContext { /** * Used to track a comment across iterations. This value can be found by looking at the iteration's changes list. Must be set for pull requests with iteration support. Otherwise, it's not required for 'legacy' pull requests. */ changeTrackingId?: number; /** * The iteration context being viewed when the thread was created. */ iterationContext?: CommentIterationContext; /** * The criteria used to track this thread. If this property is filled out when the thread is returned, then the thread has been tracked from its original location using the given criteria. */ trackingCriteria?: CommentTrackingCriteria; } /** * Preferences about how the pull request should be completed. */ export interface GitPullRequestCompletionOptions { /** * List of any policy configuration Id's which auto-complete should not wait for. Only applies to optional policies (isBlocking == false). Auto-complete always waits for required policies (isBlocking == true). */ autoCompleteIgnoreConfigIds?: number[]; /** * If true, policies will be explicitly bypassed while the pull request is completed. */ bypassPolicy?: boolean; /** * If policies are bypassed, this reason is stored as to why bypass was used. */ bypassReason?: string; /** * If true, the source branch of the pull request will be deleted after completion. */ deleteSourceBranch?: boolean; /** * If set, this will be used as the commit message of the merge commit. */ mergeCommitMessage?: string; /** * Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squashed if SquashMerge == true. The SquashMerge property is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge property will be ignored. */ mergeStrategy?: GitPullRequestMergeStrategy; /** * SquashMerge is deprecated. You should explicitly set the value of MergeStrategy. If MergeStrategy is set to any value, the SquashMerge value will be ignored. If MergeStrategy is not set, the merge strategy will be no-fast-forward if this flag is false, or squash if true. */ squashMerge?: boolean; /** * If true, we will attempt to transition any work items linked to the pull request into the next logical state (i.e. Active -> Resolved) */ transitionWorkItems?: boolean; /** * If true, the current completion attempt was triggered via auto-complete. Used internally. */ triggeredByAutoComplete?: boolean; } /** * Provides properties that describe a Git pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. */ export interface GitPullRequestIteration { /** * A collection of related REST reference links. */ _links?: any; /** * Author of the pull request iteration. */ author?: VSSInterfaces.IdentityRef; /** * Changes included with the pull request iteration. */ changeList?: GitPullRequestChange[]; /** * The commits included with the pull request iteration. */ commits?: GitCommitRef[]; /** * The first common Git commit of the source and target refs. */ commonRefCommit?: GitCommitRef; /** * The creation date of the pull request iteration. */ createdDate?: Date; /** * Description of the pull request iteration. */ description?: string; /** * Indicates if the Commits property contains a truncated list of commits in this pull request iteration. */ hasMoreCommits?: boolean; /** * ID of the pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. */ id?: number; /** * If the iteration reason is Retarget, this is the refName of the new target