diff --git a/package.json b/package.json index d8efbf3..c38e9b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vss-web-extension-sdk", - "version": "1.105.0", + "version": "1.106.0", "description": "Visual Studio Services Client SDK. JavaScript library for Visual Studio Online extensions.", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/typings/rmo.d.ts b/typings/rmo.d.ts index a859c53..c6bacfa 100644 --- a/typings/rmo.d.ts +++ b/typings/rmo.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Microsoft Visual Studio Services v105.20160914.0830 +// Type definitions for Microsoft Visual Studio Services v106.20161010.0630 // Project: https://www.visualstudio.com/integrate/extensions/overview // Definitions by: Microsoft @@ -394,6 +394,8 @@ export interface DeploymentQueryParameters { isDeleted: boolean; latestDeploymentsOnly: boolean; maxDeploymentsPerEnvironment: number; + maxModifiedTime: Date; + minModifiedTime: Date; operationStatus: DeploymentOperationStatus; queryOrder: ReleaseQueryOrder; } @@ -1770,6 +1772,8 @@ export class ReleaseHttpClient3 extends CommonMethods2_2To3 { * @param {number} definitionId * @param {number} definitionEnvironmentId * @param {string} createdBy + * @param {Date} minModifiedTime + * @param {Date} maxModifiedTime * @param {Contracts.DeploymentStatus} deploymentStatus * @param {Contracts.DeploymentOperationStatus} operationStatus * @param {boolean} latestAttemptsOnly @@ -1778,7 +1782,7 @@ export class ReleaseHttpClient3 extends CommonMethods2_2To3 { * @param {number} continuationToken * @return IPromise */ - getDeployments(project: string, definitionId?: number, definitionEnvironmentId?: number, createdBy?: string, deploymentStatus?: Contracts.DeploymentStatus, operationStatus?: Contracts.DeploymentOperationStatus, latestAttemptsOnly?: boolean, queryOrder?: Contracts.ReleaseQueryOrder, top?: number, continuationToken?: number): IPromise; + getDeployments(project: string, definitionId?: number, definitionEnvironmentId?: number, createdBy?: string, minModifiedTime?: Date, maxModifiedTime?: Date, deploymentStatus?: Contracts.DeploymentStatus, operationStatus?: Contracts.DeploymentOperationStatus, latestAttemptsOnly?: boolean, queryOrder?: Contracts.ReleaseQueryOrder, top?: number, continuationToken?: number): IPromise; /** * [Preview API] * diff --git a/typings/tfs.d.ts b/typings/tfs.d.ts index 79307ef..a77fd18 100644 --- a/typings/tfs.d.ts +++ b/typings/tfs.d.ts @@ -1,9 +1,10 @@ -// Type definitions for Microsoft Visual Studio Services v105.20160914.0823 +// Type definitions for Microsoft Visual Studio Services v106.20161010.0629 // Project: https://www.visualstudio.com/integrate/extensions/overview // Definitions by: Microsoft /// declare module "TFS/Build/Contracts" { +import DistributedTask_Common = require("TFS/DistributedTaskCommon/Contracts"); import TFS_Core_Contracts = require("TFS/Core/Contracts"); import VSS_Common_Contracts = require("VSS/WebApi/Contracts"); export interface AgentPoolQueue extends ShallowReference { @@ -332,6 +333,10 @@ export interface BuildDefinition extends BuildDefinitionReference { */ jobTimeoutInMinutes: number; options: BuildOption[]; + /** + * Process Parameters + */ + processParameters: DistributedTask_Common.ProcessParameters; properties: any; /** * The repository @@ -1369,6 +1374,10 @@ export interface SvnMappingDetails { export interface SvnWorkspace { mappings: SvnMappingDetails[]; } +export interface SyncBuildCompletedEvent extends BuildUpdatedEvent { +} +export interface SyncBuildStartedEvent extends BuildUpdatedEvent { +} export interface TaskAgentPoolReference { id: number; name: string; @@ -1788,6 +1797,8 @@ export var TypeInfo: { "offline": number; }; }; + SyncBuildCompletedEvent: any; + SyncBuildStartedEvent: any; TaskResult: { enumValues: { "succeeded": number; @@ -2183,9 +2194,11 @@ export class BuildHttpClient3 extends CommonMethods2_1To3 { * @param {Contracts.BuildQueryOrder} queryOrder * @param {string} branchName * @param {number[]} buildIds + * @param {string} repositoryId + * @param {string} repositoryType * @return IPromise */ - getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minFinishTime?: Date, maxFinishTime?: Date, requestedFor?: string, reasonFilter?: Contracts.BuildReason, statusFilter?: Contracts.BuildStatus, resultFilter?: Contracts.BuildResult, tagFilters?: string[], properties?: string[], top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: Contracts.QueryDeletedOption, queryOrder?: Contracts.BuildQueryOrder, branchName?: string, buildIds?: number[]): IPromise; + getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minFinishTime?: Date, maxFinishTime?: Date, requestedFor?: string, reasonFilter?: Contracts.BuildReason, statusFilter?: Contracts.BuildStatus, resultFilter?: Contracts.BuildResult, tagFilters?: string[], properties?: string[], top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: Contracts.QueryDeletedOption, queryOrder?: Contracts.BuildQueryOrder, branchName?: string, buildIds?: number[], repositoryId?: string, repositoryType?: string): IPromise; /** * [Preview API] Queues a build * @@ -2230,10 +2243,11 @@ export class BuildHttpClient3 extends CommonMethods2_1To3 { * @param {number} definitionId * @param {string} project - Project ID or project name * @param {number} revision + * @param {Date} minMetricsTime * @param {string[]} propertyFilters * @return IPromise */ - getDefinition(definitionId: number, project?: string, revision?: number, propertyFilters?: string[]): IPromise; + getDefinition(definitionId: number, project?: string, revision?: number, minMetricsTime?: Date, propertyFilters?: string[]): IPromise; /** * [Preview API] Gets definitions, optionally filtered by name * @@ -4446,6 +4460,10 @@ export interface WidgetMetadata { * User facing name of the widget type. Each widget must use a unique value here. */ name: string; + /** + * Publisher Name of this kind of widget. + */ + publisherName: string; /** * Data contract required for the widget to function and to work in its container. */ @@ -4488,6 +4506,7 @@ export interface WidgetsVersionedList { widgets: Widget[]; } export interface WidgetTypesResponse { + _links: any; uri: string; widgetTypes: WidgetMetadata[]; } @@ -4548,11 +4567,11 @@ export class DashboardHttpClient3 extends CommonMethods2To3 { /** * [Preview API] * - * @param {Contracts.Dashboard} entry + * @param {Contracts.Dashboard} dashboard * @param {TFS_Core_Contracts.TeamContext} teamContext - The team context for the operation * @return IPromise */ - createDashboard(entry: Contracts.Dashboard, teamContext: TFS_Core_Contracts.TeamContext): IPromise; + createDashboard(dashboard: Contracts.Dashboard, teamContext: TFS_Core_Contracts.TeamContext): IPromise; /** * [Preview API] * @@ -5229,19 +5248,48 @@ declare module "TFS/Dashboards/WidgetHelpers" { import TFS_Dashboards_WidgetContracts = require("TFS/Dashboards/WidgetContracts"); /** * Loads widget styles for the author into the iframe. + * @returns a promise for when the styles are done loading into the frame. */ -export function IncludeWidgetStyles(): void; +export function IncludeWidgetStyles(): IPromise; /** * Loads widget configuration styles for the author into the iframe. + * @returns a promise for when the styles are done loading into the frame. */ -export function IncludeWidgetConfigurationStyles(): void; +export function IncludeWidgetConfigurationStyles(): IPromise; export class WidgetStatusHelper { + /** + * method to encapsulate a successful result for a widget loading operation (load, reload, openLightbox etc) + * @param state any state information to be passed to the initiator of the loading call. + * @param title title for the lightbox of a widget when available. + * @returns promise encapsulating the status of the widget loading operations. + */ static Success(state?: string, title?: string): IPromise; + /** + * method to encapsulate a failed result for a widget loading operation (load, reload, openLightbox etc) + * @param message message to display as part within the widget error experience. + * @param isUserVisible indicates whether the message should be displayed to the user or a generic error message displayed. Defaults to true. + * @param isRichtText indicates whether the message is an html that can be rendered as a rich experience. Defaults to false. Only trusted extensions are + * allowed to set this to true. For any 3rd party widgets passing this value as true, it will be ignored. + * @returns promise encapsulating the status of the widget loading operations. + */ static Failure(message: string, isUserVisible?: boolean, isRichtText?: boolean): IPromise; + /** + * method to encapsulate a result for a widget loading operation that results in the widget being in an unconfigured state. + * @returns promise encapsulating the status of the widget loading operations. + */ static Unconfigured(): IPromise; } export class WidgetConfigurationSave { + /** + * method to encapsulate a valid state that is returned by the widget configuration + * @param customSettings settings from the widget configuration to be returned as part of this state. + * @returns promise encapsulating the state being returned. + */ static Valid(customSettings: TFS_Dashboards_WidgetContracts.CustomSettings): IPromise; + /** + * method to encapsulate an invalid state that is returned by the widget configuration + * @returns promise encapsulating the state being returned. + */ static Invalid(): IPromise; } export class WidgetEvent { @@ -5259,6 +5307,104 @@ export class WidgetEvent { static GeneralSettingsChanged: string; static Args(payload: T): TFS_Dashboards_WidgetContracts.EventArgs; } +export class WidgetSizeConverter { + /** + * Cell width of the grid that is used to draw the widgets, this includes the border around the widget (i.e. this is the size of the div, border included) + */ + private static CellWidth; + /** + * Cell height of the grid that is used to draw the widgets, this includes the border around the widget (i.e. this is the size of the div, border included) + */ + private static CellHeight; + /** + * Cell gutter width between the cells that is used to draw the widget, this excludes the border around the widget (i.e. this is distance between widgets) + */ + private static CellMarginWidth; + /** + * Cell gutter height between the cells that is used to draw the widget, this excludes the border around the widget (i.e. this is distance between widgets) + */ + private static CellMarginHeight; + /** + * Calculates a dimension in pixels, given widget cell size and grid dimensions + * @returns size in pixels + */ + private static CalculatePixelSize(cellCount, gridCellSize, gridMarginSize); + /** + * @returns width in pixels for 1x1 widget + */ + static GetWidgetWidth(): number; + /** + * @returns height in pixels for 1x1 widget + */ + static GetWidgetHeight(): number; + /** + * @returns width in pixels for widget gutter + */ + static GetWidgetMarginWidth(): number; + /** + * @returns height in pixels for widget gutter + */ + static GetWidgetMarginHeight(): number; + /** + * Converts widget column span into pixels + * @returns width in pixels + */ + static ColumnsToPixelWidth(columnSpan: number): number; + /** + * Converts widget row span into pixels + * @returns height in pixels + */ + static RowsToPixelHeight(rowSpan: number): number; +} +} +declare module "TFS/DistributedTaskCommon/Contracts" { +/** + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + * + * See following wiki page for instructions on how to regenerate: + * https://vsowiki.com/index.php?title=Rest_Client_Generation + */ +export interface DataSourceBinding { + dataSourceName: string; + endpointId: string; + endpointUrl: string; + parameters: { + [key: string]: string; + }; + resultSelector: string; + resultTemplate: string; + target: string; +} +export interface ProcessParameters { + dataSourceBindings: DataSourceBinding[]; + inputs: TaskInputDefinition[]; + sourceDefinitions: TaskSourceDefinition[]; +} +export interface TaskInputDefinition { + defaultValue: string; + groupName: string; + helpMarkDown: string; + label: string; + name: string; + options: { + [key: string]: string; + }; + properties: { + [key: string]: string; + }; + required: boolean; + type: string; + visibleRule: string; +} +export interface TaskSourceDefinition { + authKey: string; + endpoint: string; + keySelector: string; + selector: string; + target: string; +} } declare module "TFS/DistributedTask/Contracts" { import VSS_Common_Contracts = require("VSS/WebApi/Contracts"); @@ -5346,6 +5492,18 @@ export interface DependsOn { input: string; map: DependencyBinding[]; } +export interface DeploymentMachine { + agent: TaskAgentReference; + tags: string[]; +} +export interface DeploymentMachineGroup { + id: number; + machines: DeploymentMachine[]; + name: string; + pool: TaskAgentPoolReference; + projectId: string; + size: number; +} export interface EndpointAuthorization { parameters: { [key: string]: string; @@ -5437,6 +5595,11 @@ export interface JobRequestMessage { } export interface JobStartedEvent extends JobEvent { } +export enum MachineGroupActionFilter { + None = 0, + Manage = 2, + Use = 16, +} export interface MaskHint { type: MaskType; value: string; @@ -5704,6 +5867,10 @@ export interface TaskAgentPool extends TaskAgentPoolReference { * Gets or sets a value indicating whether or not this pool is managed by the service. */ isHosted: boolean; + /** + * Gets or sets the type of the pool + */ + poolType: TaskAgentPoolType; properties: any; /** * Gets a value indicating whether or not roles have been provisioned for this pool. @@ -5723,6 +5890,10 @@ export interface TaskAgentPoolReference { name: string; scope: string; } +export enum TaskAgentPoolType { + Automation = 1, + Deployment = 2, +} /** * Represents the public key portion of an RSA asymmetric key. */ @@ -5857,6 +6028,7 @@ export interface TaskDefinition { sourceLocation: string; version: TaskVersion; visibility: string[]; + runsOn: string[]; } export interface TaskDefinitionEndpoint { /** @@ -5924,6 +6096,13 @@ export interface TaskGroupDefinition { name: string; tags: string[]; } +export interface TaskHubLicenseDetails { + freeLicenseCount: number; + hasLicenseCountEverUpdated: boolean; + msdnUsersCount: number; + purchasedLicenseCount: number; + totalLicenseCount: number; +} export interface TaskGroupStep { alwaysRun: boolean; continueOnError: boolean; @@ -5935,13 +6114,6 @@ export interface TaskGroupStep { task: TaskDefinitionReference; timeoutInMinutes: number; } -export interface TaskHubLicenseDetails { - freeLicenseCount: number; - hasLicenseCountEverUpdated: boolean; - msdnUsersCount: number; - purchasedLicenseCount: number; - totalLicenseCount: number; -} export interface TaskInputDefinition { defaultValue: string; groupName: string; @@ -6121,6 +6293,8 @@ export var TypeInfo: { AgentJobRequestMessage: any; AgentPoolEvent: any; AgentRequestEvent: any; + DeploymentMachine: any; + DeploymentMachineGroup: any; Issue: any; IssueType: { enumValues: { @@ -6132,6 +6306,13 @@ export var TypeInfo: { JobCompletedEvent: any; JobEnvironment: any; JobRequestMessage: any; + MachineGroupActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; MaskHint: any; MaskType: { enumValues: { @@ -6148,6 +6329,12 @@ export var TypeInfo: { TaskAgent: any; TaskAgentJobRequest: any; TaskAgentPool: any; + TaskAgentPoolType: { + enumValues: { + "automation": number; + "deployment": number; + }; + }; TaskAgentQueueActionFilter: { enumValues: { "none": number; @@ -6298,7 +6485,7 @@ export class CommonMethods2To3 extends VSS_WebApi.VssHttpClient { * @param {string} project - Project ID or project name * @return IPromise */ - createQueuesForAgentPools(project?: string): IPromise; + createTeamProject(project?: string): IPromise; /** * @exemptedapi * [Preview API] @@ -6317,9 +6504,10 @@ export class CommonMethods2To3 extends VSS_WebApi.VssHttpClient { /** * @param {string} poolName * @param {string[]} properties + * @param {Contracts.TaskAgentPoolType} poolType * @return IPromise */ - getAgentPools(poolName?: string, properties?: string[]): IPromise; + getAgentPools(poolName?: string, properties?: string[], poolType?: Contracts.TaskAgentPoolType): IPromise; /** * @param {number} poolId * @param {string[]} properties @@ -6584,6 +6772,58 @@ export class TaskAgentHttpClient3 extends CommonMethods2_1To3 { * @return IPromise */ updateTaskHubLicenseDetails(taskHubLicenseDetails: Contracts.TaskHubLicenseDetails, hubName: string): IPromise; + /** + * [Preview API] + * + * @param {Contracts.DeploymentMachineGroup} machineGroup + * @param {string} project - Project ID or project name + * @return IPromise + */ + addDeploymentMachineGroup(machineGroup: Contracts.DeploymentMachineGroup, project: string): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @return IPromise + */ + deleteDeploymentMachineGroup(project: string, machineGroupId: number): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {Contracts.MachineGroupActionFilter} actionFilter + * @return IPromise + */ + getDeploymentMachineGroup(project: string, machineGroupId: number, actionFilter?: Contracts.MachineGroupActionFilter): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {string} machineGroupName + * @param {Contracts.MachineGroupActionFilter} actionFilter + * @return IPromise + */ + getDeploymentMachineGroups(project: string, machineGroupName?: string, actionFilter?: Contracts.MachineGroupActionFilter): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {string[]} tagFilters + * @return IPromise + */ + getDeploymentMachines(project: string, machineGroupId: number, tagFilters?: string[]): IPromise; + /** + * [Preview API] + * + * @param {Contracts.DeploymentMachine[]} deploymentMachines + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @return IPromise + */ + updateDeploymentMachines(deploymentMachines: Contracts.DeploymentMachine[], project: string, machineGroupId: number): IPromise; /** * [Preview API] * @@ -10246,6 +10486,10 @@ export interface GitChange extends Change { * Id of the change within the group. For example, within the iteration */ changeId: number; + /** + * New Content template to be used + */ + newContentTemplate: GitTemplate; /** * Original path of item if different from current path */ @@ -10294,6 +10538,203 @@ export interface GitCommitToCreate { 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: VSS_Common_Contracts.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; +} +export 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 GitDeletedRepository { createdDate: Date; deletedBy: VSS_Common_Contracts.IdentityRef; @@ -10315,18 +10756,9 @@ export interface GitHistoryQueryResults extends HistoryQueryResults { unpopulatedCount: number; unprocessedCount: number; } -/** - * Basic Authentication Parameters for creating a git import request - */ -export interface GitImportBasicAuthenticationParameters { - /** - * Password for source repository (in case of private repository) - */ - password: string; - /** - * Username for source repository (in case of private repository) - */ - username: string; +export interface GitImportFailedEvent { + sourceRepositoryName: string; + targetRepository: GitRepository; } /** * Parameter for creating a git import request when source is Git version control @@ -10335,7 +10767,7 @@ export interface GitImportGitSource { /** * Url for the source repo */ - sourceUrl: string; + url: string; } export interface GitImportOperationNotification extends AsyncGitOperationNotification { statusDetail: GitImportStatusDetail; @@ -10357,17 +10789,26 @@ export interface GitImportRequest { */ export interface GitImportRequestParameters { /** - * Basic Authentication details + * Option to delete service endpoint when import is done */ - basicAuthentication: GitImportBasicAuthenticationParameters; + deleteServiceEndpointAfterImportIsDone: boolean; /** * Source for importing git repository */ gitSource: GitImportGitSource; + /** + * Service Endpoint for connection to external endpoint + */ + serviceEndpointId: string; } export interface GitImportStatusDetail { - message: string; - subStatus: string; + allSteps: string[]; + currentStep: number; + errorMessage: string; +} +export interface GitImportSucceededEvent { + sourceRepositoryName: string; + targetRepository: GitRepository; } export interface GitItem extends ItemModel { /** @@ -10451,6 +10892,8 @@ export interface GitLastChangeTreeItems { */ lastExploredTime: Date; } +export interface GitMergeOriginRef { +} export enum GitObjectType { Bad = 0, Commit = 1, @@ -10563,6 +11006,9 @@ export interface GitPullRequestIterationChanges { nextSkip: number; nextTop: number; } +export interface GitPullRequestMergeOriginRef extends GitMergeOriginRef { + pullRequestId: number; +} /** * A pull request query */ @@ -10898,6 +11344,83 @@ export interface GitRepositoryStats { commitsCount: number; repositoryId: string; } +export interface GitResolution { +} +export enum GitResolutionError { + /** + * No error + */ + None = 0, + /** + * User set a blob id for resolving a content merge, but blob was not found in repo during application + */ + MergeContentNotFound = 1, + /** + * Attempted to resolve a conflict by moving a file to another path, but path was already in use + */ + PathInUse = 2, + /** + * No error + */ + InvalidPath = 3, + /** + * GitResolutionAction was set to an unrecognized value + */ + UnknownAction = 4, + /** + * GitResolutionMergeType was set to an unrecognized value + */ + UnknownMergeType = 5, + /** + * Any error for which a more specific code doesn't apply + */ + OtherError = 255, +} +export interface GitResolutionMergeContent extends GitResolution { + mergeType: GitResolutionMergeType; + userMergedBlob: GitBlobRef; + userMergedContent: number[]; +} +export enum GitResolutionMergeType { + Undecided = 0, + TakeSourceContent = 1, + TakeTargetContent = 2, + AutoMerged = 3, + UserMerged = 4, +} +export interface GitResolutionPathConflict extends GitResolution { + action: GitResolutionPathConflictAction; + renamePath: string; +} +export enum GitResolutionPathConflictAction { + Undecided = 0, + KeepSourceRenameTarget = 1, + KeepSourceDeleteTarget = 2, + KeepTargetRenameSource = 3, + KeepTargetDeleteSource = 4, +} +export interface GitResolutionPickOneAction extends GitResolution { + action: GitResolutionWhichAction; +} +export interface GitResolutionRename1to2 extends GitResolutionMergeContent { + action: GitResolutionRename1to2Action; +} +export enum GitResolutionRename1to2Action { + Undecided = 0, + KeepSourcePath = 1, + KeepTargetPath = 2, + KeepBothFiles = 3, +} +export enum GitResolutionStatus { + Unresolved = 0, + PartiallyResolved = 1, + Resolved = 2, +} +export enum GitResolutionWhichAction { + Undecided = 0, + PickSourceAction = 1, + PickTargetAction = 2, +} export interface GitRevert extends GitAsyncRefOperation { revertId: number; } @@ -10942,6 +11465,16 @@ export interface GitTargetVersionDescriptor extends GitVersionDescriptor { */ targetVersionType: GitVersionType; } +export interface GitTemplate { + /** + * Name of the Template + */ + name: string; + /** + * Type of the Template + */ + type: string; +} export interface GitTreeEntryRef { /** * Blob or tree @@ -11118,6 +11651,13 @@ export enum PullRequestStatus { Completed = 3, All = 4, } +/** + * Initial config contract sent to extensions creating tabs on the pull request page + */ +export interface PullRequestTabExtensionConfig { + pullRequestId: number; + repositoryId: string; +} export enum RefFavoriteType { Invalid = 0, Folder = 1, @@ -11522,6 +12062,39 @@ export var TypeInfo: { GitCommitDiffs: any; GitCommitRef: any; GitCommitToCreate: any; + GitConflict: any; + GitConflictAddAdd: any; + GitConflictAddRename: any; + GitConflictDeleteEdit: any; + GitConflictDeleteRename: any; + GitConflictDirectoryFile: any; + GitConflictEditDelete: any; + GitConflictEditEdit: any; + GitConflictFileDirectory: any; + GitConflictRename1to2: any; + GitConflictRename2to1: any; + GitConflictRenameAdd: any; + GitConflictRenameDelete: any; + GitConflictRenameRename: any; + GitConflictType: { + enumValues: { + "none": number; + "addAdd": number; + "addRename": number; + "deleteEdit": number; + "deleteRename": number; + "directoryFile": number; + "directoryChild": number; + "editDelete": number; + "editEdit": number; + "fileDirectory": number; + "rename1to2": number; + "rename2to1": number; + "renameAdd": number; + "renameDelete": number; + "renameRename": number; + }; + }; GitDeletedRepository: any; GitHistoryQueryResults: any; GitImportRequest: any; @@ -11610,6 +12183,61 @@ export var TypeInfo: { "succeededCorruptRef": number; }; }; + GitResolutionError: { + enumValues: { + "none": number; + "mergeContentNotFound": number; + "pathInUse": number; + "invalidPath": number; + "unknownAction": number; + "unknownMergeType": number; + "otherError": number; + }; + }; + GitResolutionMergeContent: any; + GitResolutionMergeType: { + enumValues: { + "undecided": number; + "takeSourceContent": number; + "takeTargetContent": number; + "autoMerged": number; + "userMerged": number; + }; + }; + GitResolutionPathConflict: any; + GitResolutionPathConflictAction: { + enumValues: { + "undecided": number; + "keepSourceRenameTarget": number; + "keepSourceDeleteTarget": number; + "keepTargetRenameSource": number; + "keepTargetDeleteSource": number; + }; + }; + GitResolutionPickOneAction: any; + GitResolutionRename1to2: any; + GitResolutionRename1to2Action: { + enumValues: { + "undecided": number; + "keepSourcePath": number; + "keepTargetPath": number; + "keepBothFiles": number; + }; + }; + GitResolutionStatus: { + enumValues: { + "unresolved": number; + "partiallyResolved": number; + "resolved": number; + }; + }; + GitResolutionWhichAction: { + enumValues: { + "undecided": number; + "pickSourceAction": number; + "pickTargetAction": number; + }; + }; GitRevert: any; GitStatus: any; GitStatusState: { @@ -12362,13 +12990,13 @@ export class GitHttpClient3 extends CommonMethods2_2To3 { /** * [Preview API] Create an import request * - * @param {Contracts.GitImportRequestParameters} importRequestParameters + * @param {Contracts.GitImportRequest} importRequest * @param {string} project - Project ID or project name * @param {string} repositoryId * @param {boolean} validateParameters * @return IPromise */ - createImportRequest(importRequestParameters: Contracts.GitImportRequestParameters, project: string, repositoryId: string, validateParameters?: boolean): IPromise; + createImportRequest(importRequest: Contracts.GitImportRequest, project: string, repositoryId: string, validateParameters?: boolean): IPromise; /** * [Preview API] Retrieve a particular import request * @@ -12407,6 +13035,39 @@ export class GitHttpClient3 extends CommonMethods2_2To3 { * @return IPromise */ getPullRequestIterationCommits(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): IPromise; + /** + * [Preview API] 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 + * @return IPromise + */ + getPullRequestConflict(repositoryId: string, pullRequestId: number, conflictId: number, project?: string): IPromise; + /** + * [Preview API] 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 + * @return IPromise + */ + getPullRequestConflicts(repositoryId: string, pullRequestId: number, project?: string, skip?: number, top?: number, includeObsolete?: boolean): IPromise; + /** + * [Preview API] Update merge conflict resolution + * + * @param {Contracts.GitConflict} conflict + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {number} conflictId + * @param {string} project - Project ID or project name + * @return IPromise + */ + updatePullRequestConflict(conflict: Contracts.GitConflict, repositoryId: string, pullRequestId: number, conflictId: number, project?: string): IPromise; /** * [Preview API] * @@ -12684,6 +13345,14 @@ export class GitHttpClient3 extends CommonMethods2_2To3 { * @return IPromise */ getRevertForRefName(project: string, repositoryId: string, refName: string): IPromise; + /** + * [Preview API] Retrieve all available templates of specified 'type'. If not specified, entire list is returned + * + * @param {string} project - Project ID or project name + * @param {string} type - searches for templates with this type + * @return IPromise + */ + getTemplateList(project: string, type?: string): IPromise; } /** * @exemptedapi @@ -13858,6 +14527,7 @@ export interface WorkItemBehavior { export interface WorkItemBehaviorField { behaviorFieldId: string; id: string; + url: string; } export interface WorkItemBehaviorReference { id: string; @@ -14104,6 +14774,7 @@ export interface PickListItemModel { } export interface PickListMetadataModel { id: string; + isSuggested: boolean; name: string; type: string; url: string; @@ -14157,6 +14828,7 @@ export interface WorkItemBehavior { export interface WorkItemBehaviorField { behaviorFieldId: string; id: string; + url: string; } export interface WorkItemBehaviorReference { id: string; @@ -14417,18 +15089,18 @@ export class CommonMethods2_1To3 extends VSS_WebApi.VssHttpClient { * @param {ProcessDefinitionsContracts.Page} page * @param {string} processId * @param {string} witRefName - * @return IPromise + * @return IPromise */ - editPage(page: ProcessDefinitionsContracts.Page, processId: string, witRefName: string): IPromise; + editPage(page: ProcessDefinitionsContracts.Page, processId: string, witRefName: string): IPromise; /** * [Preview API] * * @param {ProcessDefinitionsContracts.Page} page * @param {string} processId * @param {string} witRefName - * @return IPromise + * @return IPromise */ - addPage(page: ProcessDefinitionsContracts.Page, processId: string, witRefName: string): IPromise; + addPage(page: ProcessDefinitionsContracts.Page, processId: string, witRefName: string): IPromise; /** * [Preview API] * @@ -14487,9 +15159,9 @@ export class CommonMethods2_1To3 extends VSS_WebApi.VssHttpClient { * @param {string} sectionId * @param {string} groupId * @param {string} removeFromSectionId - * @return IPromise + * @return IPromise */ - setGroupInSection(group: ProcessDefinitionsContracts.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): IPromise; + setGroupInSection(group: ProcessDefinitionsContracts.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): IPromise; /** * [Preview API] * @@ -14501,9 +15173,9 @@ export class CommonMethods2_1To3 extends VSS_WebApi.VssHttpClient { * @param {string} groupId * @param {string} removeFromPageId * @param {string} removeFromSectionId - * @return IPromise + * @return IPromise */ - setGroupInPage(group: ProcessDefinitionsContracts.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): IPromise; + setGroupInPage(group: ProcessDefinitionsContracts.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): IPromise; /** * [Preview API] * @@ -14524,9 +15196,9 @@ export class CommonMethods2_1To3 extends VSS_WebApi.VssHttpClient { * @param {string} pageId * @param {string} sectionId * @param {string} groupId - * @return IPromise + * @return IPromise */ - editGroup(group: ProcessDefinitionsContracts.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): IPromise; + editGroup(group: ProcessDefinitionsContracts.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): IPromise; /** * [Preview API] * @@ -14535,9 +15207,9 @@ export class CommonMethods2_1To3 extends VSS_WebApi.VssHttpClient { * @param {string} witRefName * @param {string} pageId * @param {string} sectionId - * @return IPromise + * @return IPromise */ - addGroup(group: ProcessDefinitionsContracts.Group, processId: string, witRefName: string, pageId: string, sectionId: string): IPromise; + addGroup(group: ProcessDefinitionsContracts.Group, processId: string, witRefName: string, pageId: string, sectionId: string): IPromise; /** * [Preview API] * @@ -14571,9 +15243,9 @@ export class CommonMethods2_1To3 extends VSS_WebApi.VssHttpClient { * @param {string} groupId * @param {string} controlId * @param {string} removeFromGroupId - * @return IPromise + * @return IPromise */ - setControlInGroup(control: ProcessDefinitionsContracts.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): IPromise; + setControlInGroup(control: ProcessDefinitionsContracts.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): IPromise; /** * [Preview API] * @@ -14592,9 +15264,9 @@ export class CommonMethods2_1To3 extends VSS_WebApi.VssHttpClient { * @param {string} witRefName * @param {string} groupId * @param {string} controlId - * @return IPromise + * @return IPromise */ - editControl(control: ProcessDefinitionsContracts.Control, processId: string, witRefName: string, groupId: string, controlId: string): IPromise; + editControl(control: ProcessDefinitionsContracts.Control, processId: string, witRefName: string, groupId: string, controlId: string): IPromise; /** * [Preview API] Creates a control, giving it an id, and adds it to the group. So far, the only controls that don't know how to generate their own ids are control extensions. * @@ -14602,9 +15274,9 @@ export class CommonMethods2_1To3 extends VSS_WebApi.VssHttpClient { * @param {string} processId * @param {string} witRefName * @param {string} groupId - * @return IPromise + * @return IPromise */ - addControlToGroup(control: ProcessDefinitionsContracts.Control, processId: string, witRefName: string, groupId: string): IPromise; + addControlToGroup(control: ProcessDefinitionsContracts.Control, processId: string, witRefName: string, groupId: string): IPromise; } /** * @exemptedapi @@ -15591,6 +16263,23 @@ export interface Activity { } export interface attribute { } +/** + * Contract representing a backlog level + */ +export interface BacklogLevel { + /** + * Reference name of the corresponding WIT category + */ + categoryReferenceName: string; + /** + * Plural name for the backlog level + */ + pluralName: string; + /** + * Collection of valid workitem type names for the given backlog level + */ + workItemTypes: string[]; +} export interface Board extends ShallowReference { _links: any; allowedMappings: { @@ -15697,6 +16386,10 @@ export interface CategoryConfiguration { * Name */ name: string; + /** + * Category Reference Name + */ + referenceName: string; /** * Work item types for the backlog category */ @@ -15748,18 +16441,12 @@ export interface DeliveryViewData extends PlanViewData { * All the team data */ teams: TimelineTeamData[]; - /** - * Work Item Types configured for the team. - */ - workItemTypes: { - [key: string]: string[]; - }; } /** * Collection of properties, specific to the DeliveryTimelineView */ export interface DeliveryViewProperyCollection extends PlanPropertyCollection { - teamWorkItemTypeMapping: TeamWorkItemTypeMapping[]; + teamBacklogMappings: TeamBacklogMapping[]; } /** * An abstracted reference to a field @@ -15905,6 +16592,13 @@ export interface ShallowReference { */ url: string; } +/** + * Mapping of teams to the corresponding work item category + */ +export interface TeamBacklogMapping { + categoryReferenceName: string; + teamId: string; +} /** * Represents a single TeamFieldValue */ @@ -16041,13 +16735,6 @@ export interface TeamSettingsPatch { defaultIterationMacro: string; workingDays: System_Contracts.DayOfWeek[]; } -/** - * Mapping of teams to the corresponding workitem types - */ -export interface TeamWorkItemTypeMapping { - teamId: string; - workItemTypeNames: string[]; -} export interface TimelineIterationStatus { message: string; type: TimelineIterationStatusCode; @@ -16063,6 +16750,10 @@ export enum TimelineIterationStatusCode { IsOverlapping = 1, } export interface TimelineTeamData { + /** + * Backlog matching the mapped backlog associated with this team. + */ + backlog: BacklogLevel; /** * The field reference names of the work item data */ @@ -16087,6 +16778,10 @@ export interface TimelineTeamData { * The order by field name of this team */ orderByField: string; + /** + * The field reference names of the partially paged work items, such as ID, WorkItemType + */ + partiallyPagedFieldReferenceNames: string[]; /** * The project id the team belongs team */ @@ -16121,6 +16816,10 @@ export interface TimelineTeamIteration { * The iteration name */ name: string; + /** + * All the partially paged workitems in this iteration. + */ + partiallyPagedWorkItems: any[][]; /** * The iteration path */ @@ -16133,10 +16832,6 @@ export interface TimelineTeamIteration { * The status of this iteration */ status: TimelineIterationStatus; - /** - * All the work item ids in this iteration, including the paged as well as unpaged ones. - */ - workItemIds: number[]; /** * The work items that have been paged in this iteration */ @@ -16524,10 +17219,9 @@ export class WorkHttpClient3 extends CommonMethods2To3 { * @param {string} id - Identifier for delivery view * @param {Date} startDate - The start date of timeline * @param {Date} endDate - The end date of timeline - * @param {string[]} teamIds - The comma-separated list of ids of teams * @return IPromise */ - getDeliveryTimelineData(teamContext: TFS_Core_Contracts.TeamContext, id: string, startDate?: Date, endDate?: Date, teamIds?: string[]): IPromise; + getDeliveryTimelineData(teamContext: TFS_Core_Contracts.TeamContext, id: string, startDate?: Date, endDate?: Date): IPromise; /** * [Preview API] Add a new plan for the team * diff --git a/typings/vss.d.ts b/typings/vss.d.ts index 20db0ef..3eea69f 100644 --- a/typings/vss.d.ts +++ b/typings/vss.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Microsoft Visual Studio Services v105.20160914.0822 +// Type definitions for Microsoft Visual Studio Services v106.20161010.0629 // Project: https://www.visualstudio.com/integrate/extensions/overview // Definitions by: Microsoft @@ -5108,7 +5108,13 @@ export interface InputDescriptor { */ name: string; /** - * Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. + * Custom properties for the input which can be used by the service provider + */ + properties: { + [key: string]: any; + }; + /** + * Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. */ type: string; /** @@ -8954,7 +8960,7 @@ export class ComboListDropPopup extends BaseComboDropPopup { } export class ComboListBehavior extends BaseComboBehavior { private _enableAutoFill; - private _maxItemLength; + protected _maxItemLength: number; constructor(combo: any, options?: any); initialize(): void; setSource(source: any): void; @@ -9346,6 +9352,7 @@ export interface IDialogOptions extends Panels.IAjaxPanelOptions { * @defaultvalue "auto" */ maxWidth?: number | string; + preventAutoResize?: boolean; } /** * @publicapi @@ -10219,6 +10226,10 @@ export interface IFilterControlOptions extends Controls.EnhancementOptions { enableGrouping?: boolean; hideLogicalOperator?: boolean; hideOperatorHeader?: boolean; + /** + * All controls will be in read only mode + */ + readOnly?: boolean; /** * Enable add or remove clause behavior */ @@ -12630,6 +12641,7 @@ export class Menu extends MenuBase { private _menuUpdateNeeded; /** True if mouse down event has been received on this menu, and mouse up event has not been received. Only tracked for Edge. */ private _mouseIsDown; + private _shouldSelectFirstItem; protected _contributedItems: IContributedMenuItem[]; protected _contributionProviderOptions: MenuContributionProviderOptions; protected _contributionPromise: IPromise; @@ -14262,6 +14274,10 @@ export interface ISearchBoxControlOptions { * Optional: Search box icon when it's active, default behaviour is icon unchanged. */ searchBoxActiveIcon?: string; + /** + * Optional: Place holder/water mark text for search box. + */ + placeholderText?: string; } /** * A input box control for search or filter. @@ -14300,6 +14316,7 @@ export class SearchBoxControl extends Controls.Control protected _displaySearchInputBox(isVisible: boolean): void; private _clearInput(); private _createSearchInput(); + private _getSearchIconClass(); private _searchIconClickHandler(e?); private _bindInputChangedEventHandler(); private _keyDown(e?); @@ -19538,6 +19555,10 @@ export enum ExtensionQueryFlags { * This flag switches the asset uri to use GetAssetByName instead of CDN When this is used, values of base asset uri and base asset uri fallback are switched When this is used, source of asset files are pointed to Gallery service always even if CDN is available */ UseFallbackAssetUri = 1024, + /** + * This flag is used to get all the metadata values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal. + */ + IncludeMetadata = 2048, /** * AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required. */ @@ -20229,6 +20250,7 @@ export var TypeInfo: { "includeStatistics": number; "includeLatestVersionOnly": number; "useFallbackAssetUri": number; + "includeMetadata": number; "allAttributes": number; }; }; @@ -24510,6 +24532,13 @@ export class ProfileHttpClient3 extends CommonMethods2To3 { * @return IPromise */ getUserDefaults(includeAvatar?: boolean): IPromise; + /** + * [Preview API] + * + * @param {string} id + * @return IPromise + */ + refreshUserDefaults(id: string): IPromise; } export class ProfileHttpClient2_3 extends CommonMethods2To3 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -25076,7 +25105,7 @@ export class SearchCore { * * @param query Query to run search on */ - beginSearch(query: string): void; + beginSearch(query: string): T[]; /** * Returns the search strategy currently being used. * @@ -28067,7 +28096,6 @@ export class Uri { */ addQueryParam(name: string, value: string, replaceExisting?: boolean): void; } -export function escapeUrlComponents(urlString: string): string; /** * Determines whether the specified URL is absolute or not. *