From 1890af46ca15aecbec80b9ca1f097a2725a39dff Mon Sep 17 00:00:00 2001 From: serkan-inci Date: Fri, 24 Mar 2017 04:22:35 -0400 Subject: [PATCH] Updating to M114 deployment. --- lib/VSS.SDK.js | 3 + lib/VSS.SDK.min.js | 2 +- package.json | 2 +- typings/rmo.d.ts | 243 +++++---- typings/tfs.d.ts | 600 +++++++++++++++++----- typings/vss.d.ts | 1219 ++++++++++++++++++++++++++++++-------------- 6 files changed, 1481 insertions(+), 588 deletions(-) diff --git a/lib/VSS.SDK.js b/lib/VSS.SDK.js index ee9e963..122f6c6 100644 --- a/lib/VSS.SDK.js +++ b/lib/VSS.SDK.js @@ -611,6 +611,9 @@ var XDM; this._channels.push(channel); return channel; }; + XDMChannelManager.prototype.removeChannel = function (channel) { + this._channels = this._channels.filter(function (c) { return c !== channel; }); + }; XDMChannelManager.prototype._handleMessageReceived = function (event) { // get channel and dispatch to it var i, len, channel; diff --git a/lib/VSS.SDK.min.js b/lib/VSS.SDK.min.js index 6a9bdaa..b05afa0 100644 --- a/lib/VSS.SDK.min.js +++ b/lib/VSS.SDK.min.js @@ -1,3 +1,3 @@ //dependencies= // Copyright (C) Microsoft Corporation. All rights reserved. -var XDM,VSS;(function(n){function u(){return new o}function s(){return Math.floor(Math.random()*(f-i)+i).toString(36)+Math.floor(Math.random()*(f-i)+i).toString(36)}var r,t,e;n.createDeferred=u;var o=function(){function n(){var n=this;this._resolveCallbacks=[];this._rejectCallbacks=[];this._isResolved=!1;this._isRejected=!1;this.resolve=function(t){n._resolve(t)};this.reject=function(t){n._reject(t)};this.promise={};this.promise.then=function(t,i){return n._then(t,i)}}return n.prototype._then=function(t,i){var u=this,r;return!t&&!i||this._isResolved&&!t||this._isRejected&&!i?this.promise:(r=new n,this._resolveCallbacks.push(function(n){u._wrapCallback(t,n,r,!1)}),this._rejectCallbacks.push(function(n){u._wrapCallback(i,n,r,!0)}),this._isResolved?this._resolve(this._resolvedValue):this._isRejected&&this._reject(this._rejectValue),r.promise)},n.prototype._wrapCallback=function(n,t,i,r){if(!n){r?i.reject(t):i.resolve(t);return}var u;try{u=n(t)}catch(f){i.reject(f);return}u===undefined?i.resolve(t):u&&typeof u.then=="function"?u.then(function(n){i.resolve(n)},function(n){i.reject(n)}):i.resolve(u)},n.prototype._resolve=function(n){if(this._isRejected||this._isResolved||(this._isResolved=!0,this._resolvedValue=n),this._isResolved&&this._resolveCallbacks.length>0){var t=this._resolveCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;i0){var t=this._rejectCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;it.MAX_XDM_DEPTH)||this._shouldSkipSerialization(n))return null;if(a=function(t,e,o){var s,c,l,a,v;try{s=t[o]}catch(y){}(c=typeof s,c!=="undefined")&&(l=-1,c==="object"&&(l=r.originalObjects.indexOf(s)),l>=0?(a=r.newObjects[l],a.__circularReferenceId||(a.__circularReferenceId=u++),e[o]={__circularReference:a.__circularReferenceId}):c==="function"?(v=h._nextProxyFunctionId++,e[o]={__proxyFunctionId:h._registerProxyFunction(s,n),__channelId:h._channelId}):c==="object"?e[o]=s&&s instanceof Date?{__proxyDate:s.getTime()}:h._customSerializeObject(s,i,r,u,f+1):o!=="__proxyFunctionId"&&(e[o]=s))},r||(r={newObjects:[],originalObjects:[]}),r.originalObjects.push(n),n instanceof Array)for(o=[],r.newObjects.push(o),e=0,c=n.length;e0&&(f=!0);lt=!0;f&&tt()}e||a?ht():w()})},0)}function tt(){var n={localStorage:JSON.stringify(u||{})};i.invokeRemoteMethod("updateSandboxedStorage","VSS.HostControl",[n])}function pt(n,t){var i;i=typeof n=="string"?[n]:n;t||(t=function(){});l?it(i,t):(r?e||(e=!0,s&&(s=!1,ht())):nt({usePlatformScripts:!0}),rt(function(){it(i,t)}))}function it(n,i){t.diagnostics.bundlingEnabled?window.require(["VSS/Bundling"],function(t){t.requireModules(n).spread(function(){i.apply(this,arguments)})}):window.require(n,i)}function rt(n){s?window.setTimeout(n,0):(f||(f=[]),f.push(n))}function wt(){i.invokeRemoteMethod("notifyLoadSucceeded","VSS.HostControl")}function ut(n){i.invokeRemoteMethod("notifyLoadFailed","VSS.HostControl",[n])}function ft(){return b}function bt(){return k}function et(){return c}function kt(){return d}function dt(n,t){return ot(n).then(function(n){return t||(t={}),t.webContext||(t.webContext=ft()),t.extensionContext||(t.extensionContext=et()),n.getInstance(n.id,t)})}function ot(t){var r=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getServiceContribution","vss.hostManagement",[t]).then(function(n){var t=n;t.getInstance=function(t,i){return st(n,t,i)};r.resolve(t)},r.reject)}),r.promise}function gt(t){var r=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getContributionsForTarget","vss.hostManagement",[t]).then(function(n){var t=[];n.forEach(function(n){var i=n;i.getInstance=function(t,i){return st(n,t,i)};t.push(i)});r.resolve(t)},r.reject)}),r.promise}function st(t,r,u){var f=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getBackgroundContributionInstance","vss.hostManagement",[t,r,u]).then(f.resolve,f.reject)}),f.promise}function ni(n,t){i.getObjectRegistry().register(n,t)}function ti(n,t){return i.getObjectRegistry().getInstance(n,t)}function ii(){return i.invokeRemoteMethod("getAccessToken","VSS.HostControl")}function ri(){return i.invokeRemoteMethod("getAppToken","VSS.HostControl")}function ui(n,t){o||(o=document.getElementsByTagName("body").item(0));var r=typeof n=="number"?n:o.scrollWidth,u=typeof t=="number"?t:o.scrollHeight;i.invokeRemoteMethod("resize","VSS.HostControl",[r,u])}function ht(){var i=oi(t.webContext),f,g,n,s,o,b,k,nt,tt,d,u;if(window.__vssPageContext=t,window.__cultureInfo=t.microsoftAjaxConfig.cultureInfo,a!==!1&&t.coreReferences.stylesheets&&t.coreReferences.stylesheets.forEach(function(n){if(n.isCoreStylesheet){var t=document.createElement("link");t.href=h(n.url,i);t.rel="stylesheet";p(t,"head")}}),!e){l=!0;w();return}if(f=[],g=!1,t.coreReferences.scripts&&(t.coreReferences.scripts.forEach(function(n){if(n.isCoreModule){var r=!1,t=window;n.identifier==="JQuery"?r=!!t.jQuery:n.identifier==="JQueryUI"?r=!!(t.jQuery&&t.jQuery.ui&&t.jQuery.ui.version):n.identifier==="AMDLoader"&&(r=typeof t.define=="function"&&!!t.define.amd);r?g=!0:f.push({source:h(n.url,i)})}}),t.coreReferences.coreScriptsBundle&&!g&&(f=[{source:h(t.coreReferences.coreScriptsBundle.url,i)}]),t.coreReferences.extensionCoreReferences&&f.push({source:h(t.coreReferences.extensionCoreReferences.url,i)})),n={baseUrl:c.baseUri,contributionPaths:null,paths:{},shim:{}},r.moduleLoaderConfig&&(r.moduleLoaderConfig.baseUrl&&(n.baseUrl=r.moduleLoaderConfig.baseUrl),ei(r.moduleLoaderConfig,n),ct(r.moduleLoaderConfig,n)),t.moduleLoaderConfig&&(ct(t.moduleLoaderConfig,n),s=t.moduleLoaderConfig.contributionPaths,s))for(o in s)if(s.hasOwnProperty(o)&&!n.paths[o]&&(b=s[o].value,n.paths[o]=b.match("^https?://")?b:i+b,k=t.moduleLoaderConfig.paths,k)){nt=o+"/";tt=v(i,t.moduleLoaderConfig.baseUrl);for(d in k)fi(d,nt)&&(u=k[d],u.match("^https?://")||(u=u[0]==="/"?v(i,u):v(tt,u)),n.paths[d]=u)}window.__vssModuleLoaderConfig=n;f.push({content:"require.config("+JSON.stringify(n)+");"});y(f,0,function(){l=!0;w()})}function fi(n,t){return n&&n.length>=t.length?n.substr(0,t.length).localeCompare(t)===0:!1}function v(n,t){var i=n||"";return i[i.length-1]!=="/"&&(i+="/"),t&&(i+=t[0]==="/"?t.substr(1):t),i}function ei(n,t,i){var r,u;if(n.paths){t.paths||(t.paths={});for(r in n.paths)n.paths.hasOwnProperty(r)&&(u=n.paths[r],i&&(u=i(r,n.paths[r])),u&&(t.paths[r]=u))}}function ct(n,t){if(n.shim){t.shim||(t.shim={});for(var i in n.shim)n.shim.hasOwnProperty(i)&&(t.shim[i]=n.shim[i])}}function oi(n){var r=n.account||n.host,t=r.uri,i=r.relativeUri;return t&&i&&(t[t.length-1]!=="/"&&(t+="/"),i[i.length-1]!=="/"&&(i+="/"),t=t.substr(0,t.length-i.length)),t}function y(n,t,i){var f=this,r,u;if(t>=n.length){i.call(this);return}r=document.createElement("script");r.type="text/javascript";n[t].source?(u=n[t].source,r.src=u,r.addEventListener("load",function(){y.call(f,n,t+1,i)}),r.addEventListener("error",function(){ut("Failed to load script: "+u)}),p(r,"head")):n[t].content&&(r.textContent=n[t].content,p(r,"head"),y.call(this,n,t+1,i))}function p(n,t){var i=document.getElementsByTagName(t)[0];i||(i=document.createElement(t),document.appendChild(i));i.appendChild(n)}function h(n,t){var i=(n||"").toLowerCase();return i.substr(0,2)!=="//"&&i.substr(0,5)!=="http:"&&i.substr(0,6)!=="https:"&&(n=t+(i[0]==="/"?"":"/")+n),n}function w(){var t=this,n;s=!0;f&&(n=f,f=null,n.forEach(function(n){n.call(t)}))}var yt;n.VssSDKVersion=2;n.VssSDKRestVersion="3.1";var o,b,t,c,k,d,r,l=!1,e,a,s=!1,f,i=XDM.XDMChannelManager.get().addChannel(window.parent),u,lt=!1,g=function(){function n(){t&&t.call(this)}function i(){}var t;return Object.defineProperties(i.prototype,{getItem:{get:function(){return function(n){var t=this[""+n];return typeof t=="undefined"?null:t}}},setItem:{get:function(){return function(t,i){t=""+t;var u=this[t],r=""+i;u!==r&&(this[t]=r,n())}}},removeItem:{get:function(){return function(t){t=""+t;typeof this[t]!="undefined"&&(delete this[t],n())}}},clear:{get:function(){return function(){var r=Object.keys(this),t,i,u;if(r.length>0){for(t=0,i=r;t0){var t=this._resolveCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;i0){var t=this._rejectCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;it.MAX_XDM_DEPTH)||this._shouldSkipSerialization(n))return null;if(a=function(t,e,o){var s,c,l,a,v;try{s=t[o]}catch(y){}(c=typeof s,c!=="undefined")&&(l=-1,c==="object"&&(l=r.originalObjects.indexOf(s)),l>=0?(a=r.newObjects[l],a.__circularReferenceId||(a.__circularReferenceId=u++),e[o]={__circularReference:a.__circularReferenceId}):c==="function"?(v=h._nextProxyFunctionId++,e[o]={__proxyFunctionId:h._registerProxyFunction(s,n),__channelId:h._channelId}):c==="object"?e[o]=s&&s instanceof Date?{__proxyDate:s.getTime()}:h._customSerializeObject(s,i,r,u,f+1):o!=="__proxyFunctionId"&&(e[o]=s))},r||(r={newObjects:[],originalObjects:[]}),r.originalObjects.push(n),n instanceof Array)for(o=[],r.newObjects.push(o),e=0,c=n.length;e0&&(f=!0);lt=!0;f&&tt()}e||a?ht():w()})},0)}function tt(){var n={localStorage:JSON.stringify(u||{})};i.invokeRemoteMethod("updateSandboxedStorage","VSS.HostControl",[n])}function pt(n,t){var i;i=typeof n=="string"?[n]:n;t||(t=function(){});l?it(i,t):(r?e||(e=!0,s&&(s=!1,ht())):nt({usePlatformScripts:!0}),rt(function(){it(i,t)}))}function it(n,i){t.diagnostics.bundlingEnabled?window.require(["VSS/Bundling"],function(t){t.requireModules(n).spread(function(){i.apply(this,arguments)})}):window.require(n,i)}function rt(n){s?window.setTimeout(n,0):(f||(f=[]),f.push(n))}function wt(){i.invokeRemoteMethod("notifyLoadSucceeded","VSS.HostControl")}function ut(n){i.invokeRemoteMethod("notifyLoadFailed","VSS.HostControl",[n])}function ft(){return b}function bt(){return k}function et(){return c}function kt(){return d}function dt(n,t){return ot(n).then(function(n){return t||(t={}),t.webContext||(t.webContext=ft()),t.extensionContext||(t.extensionContext=et()),n.getInstance(n.id,t)})}function ot(t){var r=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getServiceContribution","vss.hostManagement",[t]).then(function(n){var t=n;t.getInstance=function(t,i){return st(n,t,i)};r.resolve(t)},r.reject)}),r.promise}function gt(t){var r=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getContributionsForTarget","vss.hostManagement",[t]).then(function(n){var t=[];n.forEach(function(n){var i=n;i.getInstance=function(t,i){return st(n,t,i)};t.push(i)});r.resolve(t)},r.reject)}),r.promise}function st(t,r,u){var f=XDM.createDeferred();return n.ready(function(){i.invokeRemoteMethod("getBackgroundContributionInstance","vss.hostManagement",[t,r,u]).then(f.resolve,f.reject)}),f.promise}function ni(n,t){i.getObjectRegistry().register(n,t)}function ti(n,t){return i.getObjectRegistry().getInstance(n,t)}function ii(){return i.invokeRemoteMethod("getAccessToken","VSS.HostControl")}function ri(){return i.invokeRemoteMethod("getAppToken","VSS.HostControl")}function ui(n,t){o||(o=document.getElementsByTagName("body").item(0));var r=typeof n=="number"?n:o.scrollWidth,u=typeof t=="number"?t:o.scrollHeight;i.invokeRemoteMethod("resize","VSS.HostControl",[r,u])}function ht(){var i=oi(t.webContext),f,g,n,s,o,b,k,nt,tt,d,u;if(window.__vssPageContext=t,window.__cultureInfo=t.microsoftAjaxConfig.cultureInfo,a!==!1&&t.coreReferences.stylesheets&&t.coreReferences.stylesheets.forEach(function(n){if(n.isCoreStylesheet){var t=document.createElement("link");t.href=h(n.url,i);t.rel="stylesheet";p(t,"head")}}),!e){l=!0;w();return}if(f=[],g=!1,t.coreReferences.scripts&&(t.coreReferences.scripts.forEach(function(n){if(n.isCoreModule){var r=!1,t=window;n.identifier==="JQuery"?r=!!t.jQuery:n.identifier==="JQueryUI"?r=!!(t.jQuery&&t.jQuery.ui&&t.jQuery.ui.version):n.identifier==="AMDLoader"&&(r=typeof t.define=="function"&&!!t.define.amd);r?g=!0:f.push({source:h(n.url,i)})}}),t.coreReferences.coreScriptsBundle&&!g&&(f=[{source:h(t.coreReferences.coreScriptsBundle.url,i)}]),t.coreReferences.extensionCoreReferences&&f.push({source:h(t.coreReferences.extensionCoreReferences.url,i)})),n={baseUrl:c.baseUri,contributionPaths:null,paths:{},shim:{}},r.moduleLoaderConfig&&(r.moduleLoaderConfig.baseUrl&&(n.baseUrl=r.moduleLoaderConfig.baseUrl),ei(r.moduleLoaderConfig,n),ct(r.moduleLoaderConfig,n)),t.moduleLoaderConfig&&(ct(t.moduleLoaderConfig,n),s=t.moduleLoaderConfig.contributionPaths,s))for(o in s)if(s.hasOwnProperty(o)&&!n.paths[o]&&(b=s[o].value,n.paths[o]=b.match("^https?://")?b:i+b,k=t.moduleLoaderConfig.paths,k)){nt=o+"/";tt=v(i,t.moduleLoaderConfig.baseUrl);for(d in k)fi(d,nt)&&(u=k[d],u.match("^https?://")||(u=u[0]==="/"?v(i,u):v(tt,u)),n.paths[d]=u)}window.__vssModuleLoaderConfig=n;f.push({content:"require.config("+JSON.stringify(n)+");"});y(f,0,function(){l=!0;w()})}function fi(n,t){return n&&n.length>=t.length?n.substr(0,t.length).localeCompare(t)===0:!1}function v(n,t){var i=n||"";return i[i.length-1]!=="/"&&(i+="/"),t&&(i+=t[0]==="/"?t.substr(1):t),i}function ei(n,t,i){var r,u;if(n.paths){t.paths||(t.paths={});for(r in n.paths)n.paths.hasOwnProperty(r)&&(u=n.paths[r],i&&(u=i(r,n.paths[r])),u&&(t.paths[r]=u))}}function ct(n,t){if(n.shim){t.shim||(t.shim={});for(var i in n.shim)n.shim.hasOwnProperty(i)&&(t.shim[i]=n.shim[i])}}function oi(n){var r=n.account||n.host,t=r.uri,i=r.relativeUri;return t&&i&&(t[t.length-1]!=="/"&&(t+="/"),i[i.length-1]!=="/"&&(i+="/"),t=t.substr(0,t.length-i.length)),t}function y(n,t,i){var f=this,r,u;if(t>=n.length){i.call(this);return}r=document.createElement("script");r.type="text/javascript";n[t].source?(u=n[t].source,r.src=u,r.addEventListener("load",function(){y.call(f,n,t+1,i)}),r.addEventListener("error",function(){ut("Failed to load script: "+u)}),p(r,"head")):n[t].content&&(r.textContent=n[t].content,p(r,"head"),y.call(this,n,t+1,i))}function p(n,t){var i=document.getElementsByTagName(t)[0];i||(i=document.createElement(t),document.appendChild(i));i.appendChild(n)}function h(n,t){var i=(n||"").toLowerCase();return i.substr(0,2)!=="//"&&i.substr(0,5)!=="http:"&&i.substr(0,6)!=="https:"&&(n=t+(i[0]==="/"?"":"/")+n),n}function w(){var t=this,n;s=!0;f&&(n=f,f=null,n.forEach(function(n){n.call(t)}))}var yt;n.VssSDKVersion=2;n.VssSDKRestVersion="3.1";var o,b,t,c,k,d,r,l=!1,e,a,s=!1,f,i=XDM.XDMChannelManager.get().addChannel(window.parent),u,lt=!1,g=function(){function n(){t&&t.call(this)}function i(){}var t;return Object.defineProperties(i.prototype,{getItem:{get:function(){return function(n){var t=this[""+n];return typeof t=="undefined"?null:t}}},setItem:{get:function(){return function(t,i){t=""+t;var u=this[t],r=""+i;u!==r&&(this[t]=r,n())}}},removeItem:{get:function(){return function(t){t=""+t;typeof this[t]!="undefined"&&(delete this[t],n())}}},clear:{get:function(){return function(){var r=Object.keys(this),t,i,u;if(r.length>0){for(t=0,i=r;t @@ -78,6 +78,7 @@ export module RunOptionsConstants { var EnvironmentOwnerEmailNotificationTypeDefaultValue: string; var ReleaseCreator: string; var EnvironmentOwner: string; + var DeploymentAuthorizationDefaultOwner: number; } export module WellKnownExtendedReleaseVariables { var ReleaseArtifacts: string; @@ -200,7 +201,8 @@ export enum AgentArtifactType { Custom = 9, Tfvc = 10, Svn = 11, - Pipeline = 12, + ExternalGit = 12, + Pipeline = 13, } export interface AgentBasedDeployPhase extends DeployPhase { deploymentInput: AgentDeploymentInput; @@ -380,6 +382,7 @@ export interface ContinuousDeploymentAppServicePlanConfiguration { } export interface ContinuousDeploymentSetupData { branch: string; + environmentName: string; projectId: string; repoId: string; resourceGroup: string; @@ -402,6 +405,7 @@ export interface ContinuousDeploymentSourceConfiguration { } export interface ContinuousDeploymentTestWebAppConfiguration { appServicePlanConfiguration: ContinuousDeploymentAppServicePlanConfiguration; + environmentName: string; testWebAppLocation: string; testWebAppName: string; } @@ -432,6 +436,7 @@ export interface DefinitionEnvironmentReference { releaseDefinitionId: number; } export interface Deployment { + _links: any; attempt: number; conditions: Condition[]; definitionEnvironmentId: number; @@ -442,6 +447,7 @@ export interface Deployment { operationStatus: DeploymentOperationStatus; postDeployApprovals: ReleaseApproval[]; preDeployApprovals: ReleaseApproval[]; + queuedOn: Date; reason: DeploymentReason; release: ReleaseReference; releaseDefinition: ShallowReference; @@ -457,6 +463,11 @@ export interface DeploymentApprovalCompletedEvent { } export interface DeploymentApprovalPendingEvent { approval: ReleaseApproval; + approvalOptions: ApprovalOptions; + completedApprovals: ReleaseApproval[]; + deployment: Deployment; + isMultipleRankApproval: boolean; + pendingApprovals: ReleaseApproval[]; project: ProjectReference; release: Release; } @@ -484,7 +495,17 @@ export interface DeploymentAttempt { status: DeploymentStatus; tasks: ReleaseTask[]; } +export interface DeploymentAuthorizationInfo { + resources: string[]; + tenantId: string; + vstsAccessTokenKey: string; +} +export enum DeploymentAuthorizationOwner { + DeploymentSubmitter = 0, + FirstPreDeploymentApprover = 1, +} export interface DeploymentCompletedEvent { + deployment: Deployment; environment: ReleaseEnvironment; project: ProjectReference; } @@ -502,6 +523,8 @@ export interface DeploymentJob { tasks: ReleaseTask[]; } export interface DeploymentManualInterventionPendingEvent { + deployment: Deployment; + emailRecipients: string[]; environmentOwner: VSS_Common_Contracts.IdentityRef; manualIntervention: ManualIntervention; project: ProjectReference; @@ -547,6 +570,7 @@ export enum DeploymentReason { export interface DeploymentStartedEvent { environment: ReleaseEnvironment; project: ProjectReference; + release: Release; } export enum DeploymentStatus { Undefined = 0, @@ -596,6 +620,7 @@ export interface EnvironmentExecutionPolicy { queueDepthCount: number; } export interface EnvironmentOptions { + deploymentAuthorizationOwner: DeploymentAuthorizationOwner; emailNotificationType: string; emailRecipients: string; enableAccessToken: boolean; @@ -783,10 +808,12 @@ export interface Release { name: string; poolName: string; projectReference: ProjectReference; + properties: any; reason: ReleaseReason; releaseDefinition: ShallowReference; releaseNameFormat: string; status: ReleaseStatus; + tags: string[]; url: string; variableGroups: VariableGroup[]; variables: { @@ -873,6 +900,7 @@ export interface ReleaseDefinition { retentionPolicy: RetentionPolicy; revision: number; source: ReleaseDefinitionSource; + tags: string[]; triggers: ReleaseTriggerBase[]; url: string; variableGroups: number[]; @@ -942,6 +970,7 @@ export enum ReleaseDefinitionExpands { Artifacts = 4, Triggers = 8, Variables = 16, + Tags = 32, } export enum ReleaseDefinitionQueryOrder { IdAscending = 0, @@ -963,6 +992,7 @@ export enum ReleaseDefinitionSource { RestApi = 1, UserInterface = 2, Ibiza = 4, + PortalExtensionApi = 8, } export interface ReleaseDefinitionSummary { environments: ReleaseDefinitionEnvironmentSummary[]; @@ -1041,6 +1071,7 @@ export enum ReleaseExpands { Approvals = 8, ManualInterventions = 16, Variables = 32, + Tags = 64, } export enum ReleaseQueryOrder { Descending = 0, @@ -1051,14 +1082,19 @@ export enum ReleaseReason { Manual = 1, ContinuousIntegration = 2, Schedule = 3, + IndividualCI = 4, + BatchedCI = 5, } export interface ReleaseReference { + _links: any; artifacts: Artifact[]; createdBy: VSS_Common_Contracts.IdentityRef; createdOn: Date; description: string; id: number; + modifiedBy: VSS_Common_Contracts.IdentityRef; name: string; + reason: ReleaseReason; releaseDefinition: ShallowReference; url: string; webAccessUri: string; @@ -1103,6 +1139,7 @@ export interface ReleaseStartMetadata { description: string; isDraft: boolean; manualEnvironments: string[]; + properties: any; reason: ReleaseReason; } export enum ReleaseStatus { @@ -1311,6 +1348,7 @@ export var TypeInfo: { "custom": number; "tfvc": number; "svn": number; + "externalGit": number; "pipeline": number; }; }; @@ -1369,6 +1407,12 @@ export var TypeInfo: { DeploymentApprovalCompletedEvent: any; DeploymentApprovalPendingEvent: any; DeploymentAttempt: any; + DeploymentAuthorizationOwner: { + enumValues: { + "deploymentSubmitter": number; + "firstPreDeploymentApprover": number; + }; + }; DeploymentCompletedEvent: any; DeploymentInput: any; DeploymentJob: any; @@ -1433,6 +1477,7 @@ export var TypeInfo: { "machineGroupBasedDeployment": number; }; }; + EnvironmentOptions: any; EnvironmentStatus: { enumValues: { "undefined": number; @@ -1512,6 +1557,7 @@ export var TypeInfo: { "artifacts": number; "triggers": number; "variables": number; + "tags": number; }; }; ReleaseDefinitionQueryOrder: { @@ -1529,6 +1575,7 @@ export var TypeInfo: { "restApi": number; "userInterface": number; "ibiza": number; + "portalExtensionApi": number; }; }; ReleaseDefinitionSummary: any; @@ -1544,6 +1591,7 @@ export var TypeInfo: { "approvals": number; "manualInterventions": number; "variables": number; + "tags": number; }; }; ReleaseQueryOrder: { @@ -1558,6 +1606,8 @@ export var TypeInfo: { "manual": number; "continuousIntegration": number; "schedule": number; + "individualCI": number; + "batchedCI": number; }; }; ReleaseReference: any; @@ -1742,7 +1792,7 @@ declare module "ReleaseManagement/Core/RestClient" { import Contracts = require("ReleaseManagement/Core/Contracts"); import VSS_FormInput_Contracts = require("VSS/Common/Contracts/FormInput"); import VSS_WebApi = require("VSS/WebApi/RestClient"); -export class CommonMethods2To3_1 extends VSS_WebApi.VssHttpClient { +export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { static serviceInstanceId: string; protected agentartifactsApiVersion: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -1755,7 +1805,7 @@ export class CommonMethods2To3_1 extends VSS_WebApi.VssHttpClient { */ getAgentArtifactDefinitions(project: string, releaseId: number): IPromise; } -export class CommonMethods2_2To3_1 extends CommonMethods2To3_1 { +export class CommonMethods2_2To3_2 extends CommonMethods2To3_2 { protected approvalsApiVersion: string; protected approvalsApiVersion_250c7158: string; protected approvalsApiVersion_9328e074: string; @@ -1766,7 +1816,7 @@ export class CommonMethods2_2To3_1 extends CommonMethods2To3_1 { protected historyApiVersion: string; protected inputvaluesqueryApiVersion: string; protected logsApiVersion: string; - protected logsApiVersion_e71ba1ed: string; + protected logsApiVersion_c37fbab5: string; protected releasesApiVersion: string; protected revisionsApiVersion: string; protected sendmailApiVersion: string; @@ -1921,20 +1971,20 @@ export class CommonMethods2_2To3_1 extends CommonMethods2To3_1 { * * @param {string} project - Project ID or project name * @param {number} releaseId - * @return IPromise + * @param {number} environmentId + * @param {number} taskId + * @param {number} attemptId + * @return IPromise */ - getLogs(project: string, releaseId: number): IPromise; + getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): IPromise; /** * [Preview API] * * @param {string} project - Project ID or project name * @param {number} releaseId - * @param {number} environmentId - * @param {number} taskId - * @param {number} attemptId - * @return IPromise + * @return IPromise */ - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): IPromise; + getLogs(project: string, releaseId: number): IPromise; /** * [Preview API] * @@ -2120,7 +2170,7 @@ export class CommonMethods2_2To3_1 extends CommonMethods2To3_1 { */ getApprovalHistory(project: string, approvalStepId: number): IPromise; } -export class CommonMethods3To3_1 extends CommonMethods2_2To3_1 { +export class CommonMethods3To3_2 extends CommonMethods2_2To3_2 { protected continuousDeploymentApiVersion: string; protected deploymentsApiVersion: string; protected logsApiVersion_17c91af7: string; @@ -2129,16 +2179,7 @@ export class CommonMethods3To3_1 extends CommonMethods2_2To3_1 { protected releasesettingsApiVersion: string; protected sourcebranchesApiVersion: string; protected tasksApiVersion_4259191d: string; - protected throttlingQueueApiVersion: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); - /** - * [Preview API] Returns throttled queue as per the task hub license of parallel releases - * - * @param {string} projectId - * @param {number} releaseId - * @return IPromise - */ - getQueuedReleases(projectId?: string, releaseId?: number): IPromise; /** * [Preview API] * @@ -2254,120 +2295,142 @@ export class CommonMethods3To3_1 extends CommonMethods2_2To3_1 { */ setupContinuousDeployment(configData: Contracts.ContinuousDeploymentSetupData, project: string): IPromise; } -/** - * @exemptedapi - */ -export class ReleaseHttpClient3_1 extends CommonMethods3To3_1 { +export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { + protected favoritesApiVersion: string; + protected foldersApiVersion: string; + protected metricsApiVersion: string; + protected projectsApiVersion: string; + protected releasesApiVersion: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); /** * [Preview API] * - * @param {Contracts.FavoriteItem[]} favoriteItems * @param {string} project - Project ID or project name - * @param {string} scope - * @param {string} identityId - * @return IPromise + * @param {number} definitionId + * @param {number} definitionEnvironmentId + * @param {string} searchText + * @param {string} createdBy + * @param {Contracts.ReleaseStatus} statusFilter + * @param {number} environmentStatusFilter + * @param {Date} minCreatedTime + * @param {Date} maxCreatedTime + * @param {Contracts.ReleaseQueryOrder} queryOrder + * @param {number} top + * @param {number} continuationToken + * @param {Contracts.ReleaseExpands} expand + * @param {string} artifactTypeId + * @param {string} sourceId + * @param {string} artifactVersionId + * @param {string} sourceBranchFilter + * @param {boolean} isDeleted + * @return IPromise */ - createFavorites(favoriteItems: Contracts.FavoriteItem[], project: string, scope: string, identityId?: string): IPromise; + getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: Contracts.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: Contracts.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: Contracts.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean): IPromise; /** * [Preview API] * - * @param {string} project - Project ID or project name - * @param {string} scope - * @param {string} identityId - * @param {string} favoriteItemIds - * @return IPromise + * @param {string} artifactType + * @param {string} artifactSourceId + * @return IPromise */ - deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): IPromise; + getReleaseProjects(artifactType: string, artifactSourceId: string): IPromise; /** * [Preview API] * * @param {string} project - Project ID or project name - * @param {string} scope - * @param {string} identityId - * @return IPromise + * @param {Date} minMetricsTime + * @return IPromise */ - getFavorites(project: string, scope: string, identityId?: string): IPromise; + getMetrics(project: string, minMetricsTime?: Date): IPromise; /** - * [Preview API] Creates a new folder + * [Preview API] Updates an existing folder at given existing path * * @param {Contracts.Folder} folder * @param {string} project - Project ID or project name * @param {string} path * @return IPromise */ - createFolder(folder: Contracts.Folder, project: string, path: string): IPromise; + updateFolder(folder: Contracts.Folder, project: string, path: string): IPromise; /** - * [Preview API] Deletes a definition folder for given folder name and path and all it's existing definitions + * [Preview API] Gets folders * * @param {string} project - Project ID or project name * @param {string} path - * @return IPromise + * @param {Contracts.FolderPathQueryOrder} queryOrder + * @return IPromise */ - deleteFolder(project: string, path: string): IPromise; + getFolders(project: string, path?: string, queryOrder?: Contracts.FolderPathQueryOrder): IPromise; /** - * [Preview API] Gets folders + * [Preview API] Deletes a definition folder for given folder name and path and all it's existing definitions * * @param {string} project - Project ID or project name * @param {string} path - * @param {Contracts.FolderPathQueryOrder} queryOrder - * @return IPromise + * @return IPromise */ - getFolders(project: string, path?: string, queryOrder?: Contracts.FolderPathQueryOrder): IPromise; + deleteFolder(project: string, path: string): IPromise; /** - * [Preview API] Updates an existing folder at given existing path + * [Preview API] Creates a new folder * * @param {Contracts.Folder} folder * @param {string} project - Project ID or project name * @param {string} path * @return IPromise */ - updateFolder(folder: Contracts.Folder, project: string, path: string): IPromise; + createFolder(folder: Contracts.Folder, project: string, path: string): IPromise; /** * [Preview API] * * @param {string} project - Project ID or project name - * @param {Date} minMetricsTime - * @return IPromise + * @param {string} scope + * @param {string} identityId + * @return IPromise */ - getMetrics(project: string, minMetricsTime?: Date): IPromise; + getFavorites(project: string, scope: string, identityId?: string): IPromise; /** * [Preview API] * - * @param {string} artifactType - * @param {string} artifactSourceId - * @return IPromise + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + * @param {string} favoriteItemIds + * @return IPromise */ - getReleaseProjects(artifactType: string, artifactSourceId: string): IPromise; + deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): IPromise; /** * [Preview API] * + * @param {Contracts.FavoriteItem[]} favoriteItems * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} definitionEnvironmentId - * @param {string} searchText - * @param {string} createdBy - * @param {Contracts.ReleaseStatus} statusFilter - * @param {number} environmentStatusFilter - * @param {Date} minCreatedTime - * @param {Date} maxCreatedTime - * @param {Contracts.ReleaseQueryOrder} queryOrder - * @param {number} top - * @param {number} continuationToken - * @param {Contracts.ReleaseExpands} expand - * @param {string} artifactTypeId - * @param {string} sourceId - * @param {string} artifactVersionId - * @param {string} sourceBranchFilter - * @param {boolean} isDeleted - * @return IPromise + * @param {string} scope + * @param {string} identityId + * @return IPromise */ - getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: Contracts.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: Contracts.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: Contracts.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean): IPromise; + createFavorites(favoriteItems: Contracts.FavoriteItem[], project: string, scope: string, identityId?: string): IPromise; +} +/** + * @exemptedapi + */ +export class ReleaseHttpClient3_2 extends CommonMethods3_1To3_2 { + constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); +} +/** + * @exemptedapi + */ +export class ReleaseHttpClient3_1 extends CommonMethods3_1To3_2 { + constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * [Preview API] Returns throttled queue as per the task hub license of parallel releases + * + * @param {string} projectId + * @param {number} releaseId + * @return IPromise + */ + getQueuedReleases(projectId?: string, releaseId?: number): IPromise; } /** * @exemptedapi */ -export class ReleaseHttpClient3 extends CommonMethods3To3_1 { +export class ReleaseHttpClient3 extends CommonMethods3To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); /** * [Preview API] @@ -2393,11 +2456,19 @@ export class ReleaseHttpClient3 extends CommonMethods3To3_1 { * @return IPromise */ getReleases(project: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: Contracts.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: Contracts.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: Contracts.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean): IPromise; + /** + * [Preview API] Returns throttled queue as per the task hub license of parallel releases + * + * @param {string} projectId + * @param {number} releaseId + * @return IPromise + */ + getQueuedReleases(projectId?: string, releaseId?: number): IPromise; } /** * @exemptedapi */ -export class ReleaseHttpClient2_3 extends CommonMethods2_2To3_1 { +export class ReleaseHttpClient2_3 extends CommonMethods2_2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); /** * [Preview API] @@ -2427,7 +2498,7 @@ export class ReleaseHttpClient2_3 extends CommonMethods2_2To3_1 { /** * @exemptedapi */ -export class ReleaseHttpClient2_2 extends CommonMethods2_2To3_1 { +export class ReleaseHttpClient2_2 extends CommonMethods2_2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); /** * [Preview API] @@ -2457,24 +2528,24 @@ export class ReleaseHttpClient2_2 extends CommonMethods2_2To3_1 { /** * @exemptedapi */ -export class ReleaseHttpClient2_1 extends CommonMethods2To3_1 { +export class ReleaseHttpClient2_1 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); } /** * @exemptedapi */ -export class ReleaseHttpClient2 extends CommonMethods2To3_1 { +export class ReleaseHttpClient2 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); } -export class ReleaseHttpClient extends ReleaseHttpClient3_1 { +export class ReleaseHttpClient extends ReleaseHttpClient3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); } /** * Gets an http client targeting the latest released version of the APIs. * - * @return ReleaseHttpClient3 + * @return ReleaseHttpClient3_1 */ -export function getClient(options?: VSS_WebApi.IVssHttpClientOptions): ReleaseHttpClient3; +export function getClient(options?: VSS_WebApi.IVssHttpClientOptions): ReleaseHttpClient3_1; } declare module "ReleaseManagement/Core/Utils" { import RMContracts = require("ReleaseManagement/Core/Contracts"); diff --git a/typings/tfs.d.ts b/typings/tfs.d.ts index 4b89a8a..b3b98b5 100644 --- a/typings/tfs.d.ts +++ b/typings/tfs.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Microsoft Visual Studio Services v113.20170227.1601 +// Type definitions for Microsoft Visual Studio Services v114.20170324.0806 // Project: https://www.visualstudio.com/integrate/extensions/overview // Definitions by: Microsoft @@ -3553,8 +3553,6 @@ export interface Room { */ name: string; } -export interface RoomCollection { -} export interface RoomData { /** * Description of the room @@ -3587,8 +3585,6 @@ export interface User { */ user: VSS_Common_Contracts.IdentityRef; } -export interface UserCollection { -} export interface UserData { userId: string; } @@ -3644,9 +3640,9 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { * Retrieve a listing of all chat users * * @param {number} roomId - Id of the room - * @return IPromise + * @return IPromise */ - getAllChatRoomUsers(roomId: number): IPromise; + getAllChatRoomUsers(roomId: number): IPromise; /** * Update information on a single chat room * @@ -3663,9 +3659,9 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { */ getChatRoomById(roomId: number): IPromise; /** - * @return IPromise + * @return IPromise */ - getAllRooms(): IPromise; + getAllRooms(): IPromise; /** * Delete a given chat room * @@ -5624,6 +5620,10 @@ export enum AadLoginPromptOption { * Force the user to select which account they are logging in with instead of automatically picking the user up from the session state. NOTE: This does not work for switching bewtween the variants of a dual-homed user. */ SelectAccount = 2, + /** + * Force the user to login again. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login. + */ + FreshLogin = 3, } export interface AadOauthTokenRequest { refresh: boolean; @@ -5665,6 +5665,7 @@ export interface AgentQueuesEvent { } export interface AgentRefreshMessage { agentId: number; + targetVersion: string; timeout: any; } export interface AgentRequestEvent { @@ -5731,6 +5732,25 @@ export interface DependsOn { input: string; map: DependencyBinding[]; } +export interface DeploymentGroup extends DeploymentGroupReference { + machineCount: number; + machines: DeploymentMachine[]; +} +export enum DeploymentGroupActionFilter { + None = 0, + Manage = 2, + Use = 16, +} +export enum DeploymentGroupExpands { + None = 0, + Machines = 2, +} +export interface DeploymentGroupReference { + id: number; + name: string; + pool: TaskAgentPoolReference; + project: ProjectReference; +} export interface DeploymentMachine { agent: TaskAgentReference; tags: string[]; @@ -5746,7 +5766,7 @@ export interface DeploymentMachineGroupReference { project: ProjectReference; } export interface DeploymentMachinesChangeEvent { - machineGroupReference: DeploymentMachineGroupReference; + machineGroupReference: DeploymentGroupReference; machines: DeploymentMachine[]; } export interface EndpointAuthorization { @@ -5801,6 +5821,7 @@ export interface JobEnvironment { options: { [key: string]: JobOption; }; + secureFiles: SecureFile[]; /** * Gets or sets the endpoint used for communicating back to the calling service. */ @@ -5929,6 +5950,7 @@ export interface SecureFile { properties: { [key: string]: string; }; + ticket: string; } export enum SecureFileActionFilter { None = 0, @@ -6049,6 +6071,10 @@ export interface TaskAgent extends TaskAgentReference { * Gets or sets the maximum job parallelism allowed on this host. */ maxParallelism: number; + /** + * Gets the pending update for this agent. + */ + pendingUpdate: TaskAgentUpdate; properties: any; /** * Gets the date on which the last connectivity status change occurred. @@ -6433,6 +6459,28 @@ export enum TaskAgentStatus { Offline = 1, Online = 2, } +export interface TaskAgentUpdate { + /** + * The current state of this agent update + */ + currentState: string; + /** + * The identity that request the agent update + */ + requestedBy: VSS_Common_Contracts.IdentityRef; + /** + * Gets the date on which this agent update was requested. + */ + requestTime: Date; + /** + * Gets or sets the source agent version of the agent update + */ + sourceVersion: PackageVersion; + /** + * Gets or sets the target agent version of the agent update + */ + targetVersion: PackageVersion; +} export interface TaskAttachment { _links: any; createdOn: Date; @@ -6578,6 +6626,8 @@ export interface TaskHubLicenseDetails { enterpriseUsersCount: number; freeLicenseCount: number; hasLicenseCountEverUpdated: boolean; + hostedAgentMinutesFreeCount: number; + hostedAgentMinutesUsedCount: number; msdnUsersCount: number; purchasedHostedLicenseCount: number; purchasedLicenseCount: number; @@ -6587,6 +6637,7 @@ export interface TaskInputDefinition extends TFS_DistributedTask_Common_Contract } export interface TaskInstance extends TaskReference { alwaysRun: boolean; + condition: string; continueOnError: boolean; displayName: string; enabled: boolean; @@ -6789,6 +6840,7 @@ export var TypeInfo: { "noOption": number; "login": number; "selectAccount": number; + "freshLogin": number; }; }; AgentChangeEvent: any; @@ -6804,6 +6856,21 @@ export var TypeInfo: { "delete": number; }; }; + DeploymentGroup: any; + DeploymentGroupActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + DeploymentGroupExpands: { + enumValues: { + "none": number; + "machines": number; + }; + }; + DeploymentGroupReference: any; DeploymentMachine: any; DeploymentMachineGroup: any; DeploymentMachineGroupReference: any; @@ -6918,6 +6985,7 @@ export var TypeInfo: { "online": number; }; }; + TaskAgentUpdate: any; TaskAttachment: any; TaskDefinitionStatus: { enumValues: { @@ -7437,9 +7505,10 @@ export class CommonMethods3To3_2 extends CommonMethods2_1To3_2 { * * @param {string} hubName * @param {boolean} includeEnterpriseUsersCount + * @param {boolean} includeHostedAgentMinutesCount * @return IPromise */ - getTaskHubLicenseDetails(hubName: string, includeEnterpriseUsersCount?: boolean): IPromise; + getTaskHubLicenseDetails(hubName: string, includeEnterpriseUsersCount?: boolean, includeHostedAgentMinutesCount?: boolean): IPromise; } export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { protected machinegroupaccesstokenApiVersion: string; @@ -7547,7 +7616,7 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { * @param {number} machineGroupId * @return IPromise */ - updateDeploymentMachines(deploymentMachines: Contracts.DeploymentMachine[], project: string, machineGroupId: number): IPromise; + updateDeploymentMachineGroupMachines(deploymentMachines: Contracts.DeploymentMachine[], project: string, machineGroupId: number): IPromise; /** * [Preview API] * @@ -7556,7 +7625,7 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { * @param {string[]} tagFilters * @return IPromise */ - getDeploymentMachines(project: string, machineGroupId: number, tagFilters?: string[]): IPromise; + getDeploymentMachineGroupMachines(project: string, machineGroupId: number, tagFilters?: string[]): IPromise; /** * [Preview API] * @@ -7614,6 +7683,77 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { */ export class TaskAgentHttpClient3_2 extends CommonMethods3_1To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @return IPromise + */ + generateDeploymentGroupAccessToken(project: string, deploymentGroupId: number): IPromise; + /** + * [Preview API] + * + * @param {Contracts.DeploymentGroup} deploymentGroup + * @param {string} project - Project ID or project name + * @return IPromise + */ + addDeploymentGroup(deploymentGroup: Contracts.DeploymentGroup, project: string): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @return IPromise + */ + deleteDeploymentGroup(project: string, deploymentGroupId: number): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {Contracts.DeploymentGroupActionFilter} actionFilter + * @param {Contracts.DeploymentGroupExpands} expand + * @return IPromise + */ + getDeploymentGroup(project: string, deploymentGroupId: number, actionFilter?: Contracts.DeploymentGroupActionFilter, expand?: Contracts.DeploymentGroupExpands): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {string} name + * @param {Contracts.DeploymentGroupActionFilter} actionFilter + * @param {Contracts.DeploymentGroupExpands} expand + * @return IPromise + */ + getDeploymentGroups(project: string, name?: string, actionFilter?: Contracts.DeploymentGroupActionFilter, expand?: Contracts.DeploymentGroupExpands): IPromise; + /** + * [Preview API] + * + * @param {Contracts.DeploymentGroup} deploymentGroup + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @return IPromise + */ + updateDeploymentGroup(deploymentGroup: Contracts.DeploymentGroup, project: string, deploymentGroupId: number): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {string[]} tags + * @return IPromise + */ + getDeploymentMachines(project: string, deploymentGroupId: number, tags?: string[]): IPromise; + /** + * [Preview API] + * + * @param {Contracts.DeploymentMachine[]} deploymentMachines + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @return IPromise + */ + updateDeploymentMachines(deploymentMachines: Contracts.DeploymentMachine[], project: string, deploymentGroupId: number): IPromise; /** * [Preview API] * @@ -7704,56 +7844,95 @@ export class TaskAgentHttpClient3_2 extends CommonMethods3_1To3_2 { */ updateAgentPoolMaintenanceJob(job: Contracts.TaskAgentPoolMaintenanceJob, poolId: number, jobId: number): IPromise; /** - * [Preview API] + * [Preview API] Delete a secure file * * @param {string} project - Project ID or project name - * @param {number} secureFileId + * @param {number} secureFileId - The unique secure file Id * @return IPromise */ deleteSecureFile(project: string, secureFileId: number): IPromise; /** - * [Preview API] + * [Preview API] Download a secure file by Id * * @param {string} project - Project ID or project name - * @param {number} secureFileId + * @param {number} secureFileId - The unique secure file Id + * @param {string} ticket - A valid download ticket + * @param {boolean} download - If download is true, the file is sent as attachement in the response body. If download is false, the response body contains the file stream. + * @return IPromise + */ + downloadSecureFile(project: string, secureFileId: number, ticket: string, download?: boolean): IPromise; + /** + * [Preview API] Get a secure file + * + * @param {string} project - Project ID or project name + * @param {number} secureFileId - The unique secure file Id + * @param {boolean} includeDownloadTicket - If includeDownloadTicket is true and the caller has permissions, a download ticket is included in the response. * @return IPromise */ - getSecureFile(project: string, secureFileId: number): IPromise; + getSecureFile(project: string, secureFileId: number, includeDownloadTicket?: boolean): IPromise; /** - * [Preview API] + * [Preview API] Get secure files * * @param {string} project - Project ID or project name - * @param {string} namePattern - * @param {Contracts.SecureFileActionFilter} actionFilter + * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {Contracts.SecureFileActionFilter} actionFilter - Filter by secure file permissions for View, Manage or Use action. Defaults to View. * @return IPromise */ - getSecureFiles(project: string, namePattern?: string, actionFilter?: Contracts.SecureFileActionFilter): IPromise; + getSecureFiles(project: string, namePattern?: string, includeDownloadTickets?: boolean, actionFilter?: Contracts.SecureFileActionFilter): IPromise; /** - * [Preview API] + * [Preview API] Get secure files * * @param {string} project - Project ID or project name - * @param {number[]} secureFileIds + * @param {number[]} secureFileIds - A list of secure file Ids + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. * @return IPromise */ - getSecureFilesByIds(project: string, secureFileIds: number[]): IPromise; + getSecureFilesByIds(project: string, secureFileIds: number[], includeDownloadTickets?: boolean): IPromise; /** - * [Preview API] + * [Preview API] Query secure files using a name pattern and a condition on file properties. + * + * @param {string} condition - The main condition syntax is described [here](https://go.microsoft.com/fwlink/?linkid=842996). Use the *property('property-name')* function to access the value of the specified property of a secure file. It returns null if the property is not set. E.g. ``` and( eq( property('devices'), '2' ), in( property('provisioning profile type'), 'ad hoc', 'development' ) ) ``` + * @param {string} project - Project ID or project name + * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. + * @return IPromise + */ + querySecureFilesByProperties(condition: string, project: string, namePattern?: string): IPromise; + /** + * [Preview API] Update the name or properties of an existing secure file * - * @param {Contracts.SecureFile} secureFile + * @param {Contracts.SecureFile} secureFile - The secure file with updated name and/or properties * @param {string} project - Project ID or project name - * @param {number} secureFileId + * @param {number} secureFileId - The unique secure file Id * @return IPromise */ updateSecureFile(secureFile: Contracts.SecureFile, project: string, secureFileId: number): IPromise; /** - * [Preview API] + * [Preview API] Update properties and/or names of a set of secure files. Files are identified by their IDs. Properties provided override the existing one entirely, i.e. do not merge. + * + * @param {Contracts.SecureFile[]} secureFiles - A list of secure file objects. Only three field must be populated Id, Name, and Properties. The rest of fields in the object are ignored. + * @param {string} project - Project ID or project name + * @return IPromise + */ + updateSecureFiles(secureFiles: Contracts.SecureFile[], project: string): IPromise; + /** + * [Preview API] Upload a secure file, include the file stream in the request body * * @param {string} content - Content to upload * @param {string} project - Project ID or project name - * @param {string} name + * @param {string} name - Name of the file to upload * @return IPromise */ uploadSecureFile(content: string, project: string, name: string): IPromise; + /** + * [Preview API] + * + * @param {number} poolId + * @param {number} agentId + * @param {string} currentState + * @return IPromise + */ + updateAgentUpdateState(poolId: number, agentId: number, currentState: string): IPromise; } /** * @exemptedapi @@ -9215,6 +9394,10 @@ export interface TestActionResultModel extends TestResultModelBase { actionPath: string; iterationId: number; sharedStepModel: SharedStepModel; + /** + * This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" + */ + stepIdentifier: string; url: string; } export interface TestAttachment { @@ -9421,6 +9604,14 @@ export interface TestMethod { container: string; name: string; } +/** + * Class representing a reference to an operation. + */ +export interface TestOperationReference { + id: string; + status: string; + url: string; +} export enum TestOutcome { /** * Only used during an update to preserve the existing value. @@ -9587,6 +9778,10 @@ export interface TestResultCreateModel { testCaseTitle: string; testPoint: ShallowReference; } +export interface TestResultDocument { + operationReference: TestOperationReference; + payload: TestResultPayload; +} export interface TestResultHistory { groupByField: string; resultsForGroup: TestResultHistoryDetailsForGroup[]; @@ -9607,9 +9802,18 @@ export interface TestResultParameterModel { actionPath: string; iterationId: number; parameterName: string; + /** + * This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" + */ + stepIdentifier: string; url: string; value: string; } +export interface TestResultPayload { + comment: string; + name: string; + stream: string; +} export interface TestResultsContext { build: BuildReference; contextType: TestResultsContextType; @@ -10984,6 +11188,7 @@ export class CommonMethods3To3_2 extends CommonMethods2To3_2 { protected historyApiVersion: string; protected resultDetailsByBuildApiVersion: string; protected resultDetailsByReleaseApiVersion: string; + protected resultDocumentApiVersion: string; protected resultsApiVersion_4637d869: string; protected resultsApiVersion_6711da49: string; protected resultSummaryByBuildApiVersion: string; @@ -11131,6 +11336,16 @@ export class CommonMethods3To3_2 extends CommonMethods2To3_2 { * @return IPromise */ addTestResultsToTestRun(results: Contracts.TestCaseResult[], project: string, runId: number): IPromise; + /** + * @exemptedapi + * [Preview API] + * + * @param {Contracts.TestResultDocument} document + * @param {string} project - Project ID or project name + * @param {number} runId + * @return IPromise + */ + publishTestResultDocument(document: Contracts.TestResultDocument, project: string, runId: number): IPromise; /** * @exemptedapi * [Preview API] @@ -11611,6 +11826,8 @@ export interface AsyncRefOperationGeneralFailureNotification extends AsyncGitOpe export interface AsyncRefOperationProgressNotification extends AsyncRefOperationCommitLevelEventNotification { progress: number; } +export interface AsyncRefOperationTimeoutNotification extends AsyncGitOperationNotification { +} /** * Meta data for a file attached to an artifact */ @@ -11903,6 +12120,27 @@ export interface FileContentMetadata { isImage: boolean; vsLink: string; } +export interface GitAnnotatedTag { + /** + * Tagging Message + */ + message: string; + name: string; + objectId: string; + /** + * User name, Email and date of tagging + */ + taggedBy: GitUserDate; + /** + * Sha1Id of target object + */ + taggedObjectId: string; + /** + * Type of object being tagged - commit, tag, blob... + */ + taggedObjectType: GitObjectType; + url: string; +} export enum GitAsyncOperationStatus { Queued = 1, InProgress = 2, @@ -11921,6 +12159,7 @@ export interface GitAsyncRefOperationDetail { conflict: boolean; currentCommitId: string; progress: number; + timedout: boolean; } export interface GitAsyncRefOperationParameters { generatedRefName: string; @@ -12232,14 +12471,6 @@ export interface GitFilePathsCollection { paths: string[]; url: string; } -export interface GitHistoryQueryResults extends HistoryQueryResults { - /** - * Seed commit used for querying history. Used for skip feature. - */ - startingCommitId: string; - unpopulatedCount: number; - unprocessedCount: number; -} export interface GitImportFailedEvent { sourceRepositoryName: string; targetRepository: GitRepository; @@ -12251,7 +12482,7 @@ export interface GitImportGitSource { /** * Tells if this is a sync request or not */ - isSyncRequest: boolean; + overwrite: boolean; /** * Url for the source repo */ @@ -12389,6 +12620,10 @@ export interface GitLastChangeItem { path: string; } export interface GitLastChangeTreeItems { + /** + * The list of commits referenced by Items, if they were requested. + */ + commits: GitCommitRef[]; /** * The last change of items. */ @@ -13142,16 +13377,6 @@ export interface HistoryEntry { */ serverItem: string; } -export interface HistoryQueryResults { - /** - * True if there are more results available to fetch (we're returning the max # of items requested) A more RESTy solution would be to include a Link header - */ - moreResultsAvailable: boolean; - /** - * The history entries (results) from this query - */ - results: HistoryEntry[]; -} export interface IdentityRefWithVote extends VSS_Common_Contracts.IdentityRef { isRequired: boolean; reviewerUrl: string; @@ -13204,6 +13429,7 @@ export enum IterationReason { ForcePush = 1, Create = 2, Rebase = 4, + Unknown = 8, } export enum PullRequestAsyncStatus { NotSet = 0, @@ -13625,6 +13851,7 @@ export var TypeInfo: { "system": number; }; }; + GitAnnotatedTag: any; GitAsyncOperationStatus: { enumValues: { "queued": number; @@ -13680,7 +13907,6 @@ export var TypeInfo: { }; }; GitDeletedRepository: any; - GitHistoryQueryResults: any; GitImportRequest: any; GitItem: any; GitItemDescriptor: any; @@ -13856,7 +14082,6 @@ export var TypeInfo: { }; }; HistoryEntry: any; - HistoryQueryResults: any; IncludedGitCommit: any; ItemContent: any; ItemContentType: { @@ -13872,6 +14097,7 @@ export var TypeInfo: { "forcePush": number; "create": number; "rebase": number; + "unknown": number; }; }; PullRequestAsyncStatus: { @@ -14294,7 +14520,7 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { */ getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): IPromise; /** - * Adds reviewers to a git pull request + * Removes a reviewer from a git pull request * * @param {string} repositoryId * @param {number} pullRequestId @@ -15056,6 +15282,7 @@ export class CommonMethods3To3_2 extends CommonMethods2_2To3_2 { createCherryPick(cherryPickToCreate: Contracts.GitAsyncRefOperationParameters, project: string, repositoryId: string): IPromise; } export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { + protected annotatedTagsApiVersion: string; protected pullRequestAttachmentsApiVersion: string; protected pullRequestShareApiVersion: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -15119,6 +15346,24 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { * @return IPromise */ createAttachment(content: any, fileName: string, repositoryId: string, pullRequestId: number, project?: string): IPromise; + /** + * [Preview API] Get an annotated tag + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId + * @param {string} objectId - Sha1 of annotated tag to be returned + * @return IPromise + */ + getAnnotatedTag(project: string, repositoryId: string, objectId: string): IPromise; + /** + * [Preview API] Create an annotated tag + * + * @param {Contracts.GitAnnotatedTag} tagObject - Object containing details of tag to be created + * @param {string} project - Project ID or project name + * @param {string} repositoryId - Friendly name or guid of repository + * @return IPromise + */ + createAnnotatedTag(tagObject: Contracts.GitAnnotatedTag, project: string, repositoryId: string): IPromise; } /** * @exemptedapi @@ -15279,7 +15524,7 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { */ getLabelItems(labelId: string, top?: number, skip?: number): IPromise; /** - * Get Item Metadata and/or Content. 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. + * 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} path * @param {string} project - Project ID or project name @@ -15292,7 +15537,7 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { */ getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TFS_VersionControl_Contracts.VersionControlRecursionType, versionDescriptor?: TFS_VersionControl_Contracts.TfvcVersionDescriptor): IPromise; /** - * Get Item Metadata and/or Content. 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. + * 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} path * @param {string} project - Project ID or project name @@ -15316,7 +15561,7 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { */ getItems(project?: string, scopePath?: string, recursionLevel?: TFS_VersionControl_Contracts.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TFS_VersionControl_Contracts.TfvcVersionDescriptor): IPromise; /** - * Get Item Metadata and/or Content. 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. + * 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} path * @param {string} project - Project ID or project name @@ -15329,7 +15574,7 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { */ getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TFS_VersionControl_Contracts.VersionControlRecursionType, versionDescriptor?: TFS_VersionControl_Contracts.TfvcVersionDescriptor): IPromise; /** - * Get Item Metadata and/or Content. 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. + * 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} path * @param {string} project - Project ID or project name @@ -15367,18 +15612,6 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { * @return IPromise */ getBatchedChangesets(changesetsRequestData: TFS_VersionControl_Contracts.TfvcChangesetsRequestData): IPromise; - /** - * Retrieve Tfvc changesets - * - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria} searchCriteria - * @return IPromise - */ - getChangesets(project?: string, maxCommentLength?: number, skip?: number, top?: number, orderby?: string, searchCriteria?: TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria): IPromise; /** * Retrieve a Tfvc Changeset * @@ -15443,35 +15676,77 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { */ getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): IPromise; } -/** - * @exemptedapi - */ -export class TfvcHttpClient3_2 extends CommonMethods2To3_2 { +export class CommonMethods3To3_2 extends CommonMethods2To3_2 { + protected changesetsApiVersion: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * Retrieve Tfvc changesets Note: This is a new version of the GetChangesets API that doesn't expose the unneeded queryParams present in the 1.0 version of the API. + * + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria} searchCriteria + * @return IPromise + */ + getChangesets(project?: string, maxCommentLength?: number, skip?: number, top?: number, orderby?: string, searchCriteria?: TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria): IPromise; } /** * @exemptedapi */ -export class TfvcHttpClient3_1 extends CommonMethods2To3_2 { +export class TfvcHttpClient3_2 extends CommonMethods3To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); } /** * @exemptedapi */ -export class TfvcHttpClient3 extends CommonMethods2To3_2 { +export class TfvcHttpClient3_1 extends CommonMethods3To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); } /** * @exemptedapi */ +export class TfvcHttpClient3 extends CommonMethods3To3_2 { + constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); +} export class TfvcHttpClient2_3 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * Retrieve Tfvc changesets + * + * @param {string} project - Project ID or project name + * @param {string} maxChangeCount + * @param {boolean} includeDetails + * @param {boolean} includeWorkItems + * @param {number} maxCommentLength + * @param {boolean} includeSourceRename + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria} searchCriteria + * @return IPromise + */ + getChangesets(project?: string, maxChangeCount?: string, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria): IPromise; } -/** - * @exemptedapi - */ export class TfvcHttpClient2_2 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * Retrieve Tfvc changesets + * + * @param {string} project - Project ID or project name + * @param {string} maxChangeCount + * @param {boolean} includeDetails + * @param {boolean} includeWorkItems + * @param {number} maxCommentLength + * @param {boolean} includeSourceRename + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria} searchCriteria + * @return IPromise + */ + getChangesets(project?: string, maxChangeCount?: string, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria): IPromise; /** * [Obsolete - Use the Projects API instead] Retrieve the version control information for a given Team Project * @@ -15488,11 +15763,24 @@ export class TfvcHttpClient2_2 extends CommonMethods2To3_2 { */ getProjectInfos(project?: string): IPromise; } -/** - * @exemptedapi - */ export class TfvcHttpClient2_1 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * Retrieve Tfvc changesets + * + * @param {string} project - Project ID or project name + * @param {string} maxChangeCount + * @param {boolean} includeDetails + * @param {boolean} includeWorkItems + * @param {number} maxCommentLength + * @param {boolean} includeSourceRename + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria} searchCriteria + * @return IPromise + */ + getChangesets(project?: string, maxChangeCount?: string, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria): IPromise; /** * [Obsolete - Use the Projects API instead] Retrieve the version control information for a given Team Project * @@ -15509,11 +15797,24 @@ export class TfvcHttpClient2_1 extends CommonMethods2To3_2 { */ getProjectInfos(project?: string): IPromise; } -/** - * @exemptedapi - */ export class TfvcHttpClient2 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * Retrieve Tfvc changesets + * + * @param {string} project - Project ID or project name + * @param {string} maxChangeCount + * @param {boolean} includeDetails + * @param {boolean} includeWorkItems + * @param {number} maxCommentLength + * @param {boolean} includeSourceRename + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria} searchCriteria + * @return IPromise + */ + getChangesets(project?: string, maxChangeCount?: string, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria): IPromise; /** * [Obsolete - Use the Projects API instead] Retrieve the version control information for a given Team Project * @@ -15784,6 +16085,10 @@ export enum FieldType { Double = 7, Guid = 8, Boolean = 9, + Identity = 10, + PicklistString = 11, + PicklistInteger = 12, + PicklistDouble = 13, } export enum GetFieldsExpand { None = 0, @@ -16012,6 +16317,7 @@ export enum WorkItemExpand { All = 4, } export interface WorkItemField extends WorkItemTrackingResource { + description: string; name: string; readOnly: boolean; referenceName: string; @@ -16208,6 +16514,10 @@ export var TypeInfo: { "double": number; "guid": number; "boolean": number; + "identity": number; + "picklistString": number; + "picklistInteger": number; + "picklistDouble": number; }; }; GetFieldsExpand: { @@ -16937,6 +17247,11 @@ export interface FieldModel { url: string; } export interface FieldRuleModel { + actions: RuleActionModel[]; + conditions: RuleConditionModel[]; + description: string; + id: string; + isDisabled: boolean; rule: string; value: string; } @@ -17094,6 +17409,15 @@ export interface PickListMetadataModel { export interface PickListModel extends PickListMetadataModel { items: PickListItemModel[]; } +export interface RuleActionModel { + action: string; + value: string; +} +export interface RuleConditionModel { + condition: string; + field: string; + value: string; +} export interface Section { groups: Group[]; /** @@ -17155,6 +17479,7 @@ export enum WorkItemTypeClass { Custom = 2, } export interface WorkItemTypeFieldModel { + allowGroups: boolean; defaultValue: string; id: string; readOnly: boolean; @@ -18346,6 +18671,12 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { * @return IPromise */ getField(fieldNameOrRefName: string, project?: string): IPromise; + /** + * @param {string} fieldNameOrRefName + * @param {string} project - Project ID or project name + * @return IPromise + */ + deleteField(fieldNameOrRefName: string, project?: string): IPromise; /** * @param {Contracts.WorkItemClassificationNode} postedNode * @param {string} project - Project ID or project name @@ -18425,11 +18756,18 @@ export class CommonMethods2_1To3_2 extends CommonMethods2To3_2 { /** * [Preview API] * - * @param {string} project - Project ID or project name * @param {number[]} ids + * @param {string} project - Project ID or project name * @return IPromise */ - getDeletedWorkItems(project?: string, ids?: number[]): IPromise; + getDeletedWorkItems(ids: number[], project?: string): IPromise; + /** + * [Preview API] + * + * @param {string} project - Project ID or project name + * @return IPromise + */ + getDeletedWorkItemReferences(project?: string): IPromise; /** * [Preview API] * @@ -18957,6 +19295,7 @@ export interface WorkItemQueryContext { declare module "TFS/Work/Contracts" { import System_Contracts = require("VSS/Common/Contracts/System"); import TFS_WorkItemTracking_Contracts = require("TFS/WorkItemTracking/Contracts"); +import VSS_Common_Contracts = require("VSS/WebApi/Contracts"); export interface Activity { capacityPerDay: number; name: string; @@ -19298,9 +19637,16 @@ export interface DeliveryViewData extends PlanViewData { */ export interface DeliveryViewPropertyCollection extends PlanPropertyCollection { /** - * Filter Criteria + * Card settings + */ + cardSettings: CardSettings; + /** + * Field criteria */ criteria: FilterClause[]; + /** + * Team backlog mappings + */ teamBacklogMappings: TeamBacklogMapping[]; } /** @@ -19396,13 +19742,9 @@ export interface ParentChildWIMap { */ export interface Plan { /** - * Card settings such as fields and rules - */ - cardSettings: CardSettings; - /** - * Identity when the plan was created. Default to Empty Guid for the existing records before upgrading to ScaledAgileViewComponent4, which means we do not know the identity that created this resource. + * Identity that created this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. */ - createdBy: string; + createdByIdentity: VSS_Common_Contracts.IdentityRef; /** * Date when the plan was created */ @@ -19416,9 +19758,9 @@ export interface Plan { */ id: string; /** - * Identity when the plan was last modified. Default to Empty Guid for the existing records before upgrading to ScaledAgileViewComponent4, which means we do not know the identity that last modified this resource. + * Identity that last modified this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. */ - modifiedBy: string; + modifiedByIdentity: VSS_Common_Contracts.IdentityRef; /** * Date when the plan was last modified. Default to CreatedDate when the plan is first created. */ @@ -19431,10 +19773,6 @@ export interface Plan { * OwnerId of the plan, typically same as the TFID of the team under which this plan has been created */ ownerId: string; - /** - * Permissions object bag with relevant plan permissions - */ - permissions: PlanPermissions; /** * The PlanPropertyCollection instance associated with the plan. These are dependent on the type of the plan. For example, DeliveryTimelineView, it would be of type DeliveryViewPropertyCollection. */ @@ -19451,15 +19789,19 @@ export interface Plan { * The resource url to locate the plan via rest api */ url: string; + /** + * Bit flag indicating set of permissions a user has to the plan. + */ + userPermissions: PlanUserPermissions; } /** * Metadata about a plan definition that is stored in favorites service */ export interface PlanMetadata { /** - * TFID of the creator of the plan + * Identity of the creator of the plan */ - createdBy: string; + createdByIdentity: VSS_Common_Contracts.IdentityRef; /** * Description of plan */ @@ -19469,22 +19811,9 @@ export interface PlanMetadata { */ modifiedDate: Date; /** - * Permissions object bag with relevant plan permissions - */ - permissions: PlanPermissions; -} -/** - * Object bag storing the set of permissions relevant to this plan - */ -export interface PlanPermissions { - /** - * Whether the user has permission to delete this plan + * Bit flag indicating set of permissions a user has to the plan. */ - delete: boolean; - /** - * Whether the user has permission to edit this plan - */ - edit: boolean; + userPermissions: PlanUserPermissions; } /** * Base class for properties of a scaled agile plan @@ -19494,6 +19823,32 @@ export interface PlanPropertyCollection { export enum PlanType { DeliveryTimelineView = 0, } +export enum PlanUserPermissions { + /** + * None + */ + None = 0, + /** + * Permission to view this plan. + */ + View = 1, + /** + * Permission to update this plan. + */ + Edit = 2, + /** + * Permission to delete this plan. + */ + Delete = 4, + /** + * Permission to manage this plan. + */ + Manage = 8, + /** + * Full control permission for this plan. + */ + AllPermissions = 15, +} /** * Base class for plan view data contracts. Anything common goes here. */ @@ -19834,10 +20189,6 @@ export enum TimelineTeamStatusCode { NoIterationsExist = 6, } export interface UpdatePlan { - /** - * Card settings such as fields and rules - */ - cardSettings: CardSettings; /** * Description of the plan */ @@ -19902,6 +20253,7 @@ export var TypeInfo: { CreatePlan: any; DateRange: any; DeliveryViewData: any; + DeliveryViewPropertyCollection: any; FieldInfo: any; FieldType: { enumValues: { @@ -19928,6 +20280,16 @@ export var TypeInfo: { "deliveryTimelineView": number; }; }; + PlanUserPermissions: { + enumValues: { + "none": number; + "view": number; + "edit": number; + "delete": number; + "manage": number; + "allPermissions": number; + }; + }; TeamIterationAttributes: any; TeamMemberCapacity: any; TeamSetting: any; diff --git a/typings/vss.d.ts b/typings/vss.d.ts index 961395a..b99abcf 100644 --- a/typings/vss.d.ts +++ b/typings/vss.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Microsoft Visual Studio Services v113.20170227.1600 +// Type definitions for Microsoft Visual Studio Services v114.20170324.0806 // Project: https://www.visualstudio.com/integrate/extensions/overview // Definitions by: Microsoft @@ -279,6 +279,13 @@ interface IXDMChannelManager { * @param targetOrigin Url of the target iframe (if known) */ addChannel(window: Window, targetOrigin?: string): IXDMChannel; + + /** + * Removes an XDM channel, allowing it to be disposed + * + * @param channel The channel to remove from the channel manager + */ + removeChannel(channel: IXDMChannel); } /** @@ -1189,6 +1196,10 @@ interface ContextIdentifier { * A feature that can be enabled or disabled */ interface ContributedFeature { + /** + * Named links describing the feature + */ + _links: any; /** * If true, the feature is enabled unless overridden at some scope */ @@ -1196,7 +1207,7 @@ interface ContributedFeature { /** * Rules for setting the default value if not specified by any setting/scope. Evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) */ - defaultValueRules: ContributedFeatureDefaultValueRule[]; + defaultValueRules: ContributedFeatureValueRule[]; /** * The description of the feature */ @@ -1210,23 +1221,13 @@ interface ContributedFeature { */ name: string; /** - * The scopes/levels at which settings can set the enabled/disabled state of this feature + * Rules for overriding a feature value. These rules are run before explicit user/host state values are checked. They are evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) */ - scopes: ContributedFeatureSettingScope[]; -} - -/** -* A rules for setting the default value of a feature if not specified by any setting/scope -*/ -interface ContributedFeatureDefaultValueRule { - /** - * Name of the IContributedFeatureValuePlugin to run - */ - name: string; + overrideRules: ContributedFeatureValueRule[]; /** - * Properties to feed to the IContributedFeatureValuePlugin + * The scopes/levels at which settings can set the enabled/disabled state of this feature */ - properties: any; + scopes: ContributedFeatureSettingScope[]; } /** @@ -1279,21 +1280,43 @@ interface ContributedFeatureState { state: ContributedFeatureEnabledValue; } -interface ContributedHub { - attributes: number; - builtIn: boolean; - disabled: boolean; - icon: string; - id: string; +/** +* A query for the effective contributed feature states for a list of feature ids +*/ +interface ContributedFeatureStateQuery { + /** + * The list of feature ids to query + */ + featureIds: string[]; + /** + * The query result containing the current feature states for each of the queried feature ids + */ + featureStates: { [key: string]: ContributedFeatureState; }; + /** + * A dictionary of scope values (project name, etc.) to use in the query (if querying across scopes) + */ + scopeValues: { [key: string]: string; }; +} + +/** +* A rule for dynamically getting the enabled/disabled state of a feature +*/ +interface ContributedFeatureValueRule { + /** + * Name of the IContributedFeatureValuePlugin to run + */ name: string; - order: any; + /** + * Properties to feed to the IContributedFeatureValuePlugin + */ + properties: any; } -interface ContributedHubGroup { - attributes: number; - builtIn: boolean; - hidden: boolean; - hubs: { [key: string]: ContributedHub; }; +interface ContributedNavElement { + children: string[]; + componentProperties: number; + componentType: string; + flags: number; icon: string; id: string; name: string; @@ -1301,23 +1324,6 @@ interface ContributedHubGroup { order: any; } -interface ContributedHubGroupCollection { - attributes: number; - hubGroups: { [key: string]: ContributedHubGroup; }; - id: string; -} - -interface ContributedNavElement { - attributes: number; - id: string; -} - -interface ContributedPage { - attributes: number; - hubGroupCollections: { [key: string]: ContributedHubGroupCollection; }; - id: string; -} - /** * Page context configuration that can be contributed by remote services (different VSTS services delivering content to the page) */ @@ -1356,6 +1362,10 @@ interface ContributedServiceContext { serviceTypeId: string; } +interface ContributedTheme { + id: string; +} + /** * An individual contribution made by an extension */ @@ -1447,6 +1457,38 @@ declare enum ContributionLicensingBehaviorType { AlwaysInclude = 2, } +/** +* A query that can be issued for contribution nodes +*/ +interface ContributionNodeQuery { + /** + * The contribution ids of the nodes to find. + */ + contributionIds: string[]; + /** + * Indicator if contribution provider details should be included in the result. + */ + includeProviderDetails: boolean; + /** + * Query options tpo be used when fetching ContributionNodes + */ + queryOptions: any; +} + +/** +* Result of a contribution node query. Wraps the resulting contribution nodes and provider details. +*/ +interface ContributionNodeQueryResult { + /** + * Map of contribution ids to corresponding node. + */ + nodes: { [key: string]: SerializedContributionNode; }; + /** + * Map of provder ids to the corresponding provider details object. + */ + providerDetails: { [key: string]: ContributionProviderDetails; }; +} + /** * Item representing a contribution path. Can be of type default, resource or bundle */ @@ -1555,6 +1597,10 @@ interface ContributionProviderDetails { * Properties associated with the provider */ properties: { [key: string]: string; }; + /** + * Version of contributions assoicated with this contribution provider. + */ + version: string; } interface ContributionsPageData { @@ -1616,6 +1662,21 @@ interface DataProviderContext { properties: { [key: string]: number; }; } +interface DataProviderExceptionDetails { + /** + * The type of the exception that was thrown. + */ + exceptionType: string; + /** + * Message that is associated with the exception. + */ + message: string; + /** + * The StackTrace from the exception turned into a string. + */ + stackTrace: string; +} + /** * A query that can be issued for data provider data */ @@ -1797,6 +1858,33 @@ interface ExtensionDataCollectionQuery { collections: ExtensionDataCollection[]; } +interface ExtensionEvent { + /** + * The extension which has been updated + */ + extension: any; + /** + * The current version of the extension that was updated + */ + extensionVersion: string; + /** + * Name of the collection for which the extension was requested + */ + host: ExtensionHost; + /** + * Gallery host url + */ + links: ExtensionEventUrls; + /** + * Represents the user who initiated the update + */ + modifiedBy: any; + /** + * The type of update that was made + */ + updateType: ExtensionUpdateType; +} + /** * Base class for an event callback for an extension */ @@ -1841,6 +1929,15 @@ interface ExtensionEventCallbackCollection { versionCheck: ExtensionEventCallback; } +interface ExtensionEventUrls { + extensionIcon: string; + extensionPage: string; + /** + * Url of the extension management page + */ + manageExtensionsPage: string; +} + /** * Set of flags applied to extensions that are relevant to contribution consumers */ @@ -1855,6 +1952,11 @@ declare enum ExtensionFlags { Trusted = 2, } +interface ExtensionHost { + id: string; + name: string; +} + /** * How an extension should handle including contributions based on licensing */ @@ -1949,31 +2051,31 @@ interface ExtensionRequest { resolvedBy: any; } -interface ExtensionRequestedEvent { +interface ExtensionRequestEvent { /** - * Name of the account for which the extension was requested + * The extension which has been requested */ - accountName: string; + extension: any; /** - * The extension request object + * Information about the host for which this extension is requested */ - extensionRequest: ExtensionRequest; + host: ExtensionHost; /** - * Gallery host url + * Name of the collection for which the extension was requested */ - galleryHostUrl: string; + hostName: string; /** - * Link to view the extension details page + * Gallery host url */ - itemUrl: string; + links: ExtensionRequestUrls; /** - * The extension which has been requested + * The extension request object */ - publishedExtension: any; + request: ExtensionRequest; /** - * Linkk to view the extension request + * The type of update that was made */ - requestUrl: string; + updateType: ExtensionRequestUpdateType; } /** @@ -1994,6 +2096,22 @@ declare enum ExtensionRequestState { Rejected = 2, } +declare enum ExtensionRequestUpdateType { + Created = 1, + Approved = 2, + Rejected = 3, + Deleted = 4, +} + +interface ExtensionRequestUrls { + extensionIcon: string; + extensionPage: string; + /** + * Link to view the extension request + */ + requestPage: string; +} + /** * The state of an extension */ @@ -2060,27 +2178,42 @@ declare enum ExtensionStateFlags { Warning = 512, } +declare enum ExtensionUpdateType { + Installed = 1, + Uninstalled = 2, + Enabled = 3, + Disabled = 4, + VersionUpdated = 5, + ActionRequired = 6, + ActionResolved = 7, +} + +interface ExtensionUrls { + /** + * Url of the extension icon + */ + extensionIcon: string; + /** + * Link to view the extension details page + */ + extensionPage: string; +} + interface FeatureAvailabilityContext { featureStates: { [key: string]: boolean; }; } interface GlobalizationContext { culture: string; + /** + * Gets the explicitly-set theme, or the empty string if a theme was not explicitly set. An explicitly-set theme is set either in the query string (?theme=[themename]) or in the user's profile. However, the default theme set in the profile is not considered to be an explicitly-set theme. + */ + explicitTheme: string; theme: string; timeZoneId: string; timezoneOffset: number; } -interface HeaderModel { - brandIcon: string; - brandName: string; - context: any; - contributionId: string; - elementContributionType: string; - supportsContribution: boolean; - userDisplayName: string; -} - interface HostContext { id: string; name: string; @@ -2493,6 +2626,10 @@ interface PinningPreferences { unpinnedHubs: { [key: string]: string[]; }; } +interface RelatableContribution { + id: string; +} + /** * A request for an extension (to be installed or have a license assigned) */ @@ -2537,6 +2674,24 @@ interface Scope { value: string; } +/** +* Representaion of a ContributionNode that can be used for serialized to clients. +*/ +interface SerializedContributionNode { + /** + * List of ids for contributions which are children to the current contribution. + */ + children: string[]; + /** + * Contribution associated with this node. + */ + contribution: Contribution; + /** + * List of ids for contributions which are parents to the current contribution. + */ + parents: string[]; +} + /** * Holds a lookup of urls for different services (at different host levels) */ @@ -2827,6 +2982,7 @@ declare module XDM { * @param targetOrigin Url of the target iframe (if known) */ addChannel(window: Window, targetOrigin?: string): IXDMChannel; + removeChannel(channel: IXDMChannel): void; private _handleMessageReceived(event); private _subscribe(windowObj); } @@ -3141,7 +3297,6 @@ import Contracts = require("VSS/Accounts/Contracts"); import VSS_WebApi = require("VSS/WebApi/RestClient"); export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { static serviceInstanceId: string; - protected accountDeletionsApiVersion: string; protected accountsApiVersion: string; protected availabilityApiVersion: string; protected regionsApiVersion: string; @@ -3171,12 +3326,6 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { * @return IPromise */ isValidAccountName(accountName: string): IPromise; - /** - * @param {Contracts.Account} account - * @param {string} accountId - * @return IPromise - */ - updateAccount(account: Contracts.Account, accountId: string): IPromise; /** * @param {string} accountId * @param {string} properties @@ -3189,17 +3338,14 @@ export class CommonMethods2To3_2 extends VSS_WebApi.VssHttpClient { * @return IPromise */ createAccount(info: Contracts.AccountCreateInfoInternal, usePrecreated?: boolean): IPromise; - /** - * @param {string} accountId - * @return IPromise - */ - deleteAccount(accountId: string): IPromise; } -export class CommonMethods3_1To3_2 extends CommonMethods2To3_2 { - protected accountsApiVersion: string; +/** + * @exemptedapi + */ +export class AccountsHttpClient3_2 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); /** - * A new version GetAccounts API. Only supports limited set of parameters, returns a list of account ref objects that only contains AccountUrl, AccountName and AccountId information, will use collection host Id as the AccountId. + * [Preview API] A new version GetAccounts API. Only supports limited set of parameters, returns a list of account ref objects that only contains AccountUrl, AccountName and AccountId information, will use collection host Id as the AccountId. * * @param {string} ownerId - Owner Id to query for * @param {string} memberId - Member Id to query for @@ -3208,17 +3354,16 @@ export class CommonMethods3_1To3_2 extends CommonMethods2To3_2 { */ getAccounts(ownerId?: string, memberId?: string, properties?: string): IPromise; } -/** - * @exemptedapi - */ -export class AccountsHttpClient3_2 extends CommonMethods3_1To3_2 { - constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); -} -/** - * @exemptedapi - */ -export class AccountsHttpClient3_1 extends CommonMethods3_1To3_2 { +export class AccountsHttpClient3_1 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * @param {string} creatorId + * @param {string} ownerId + * @param {string} memberId + * @param {string} properties + * @return IPromise + */ + getAccounts(creatorId?: string, ownerId?: string, memberId?: string, properties?: string): IPromise; } export class AccountsHttpClient3 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -3226,11 +3371,10 @@ export class AccountsHttpClient3 extends CommonMethods2To3_2 { * @param {string} creatorId * @param {string} ownerId * @param {string} memberId - * @param {boolean} includeOwner * @param {string} properties * @return IPromise */ - getAccounts(creatorId?: string, ownerId?: string, memberId?: string, includeOwner?: boolean, properties?: string): IPromise; + getAccounts(creatorId?: string, ownerId?: string, memberId?: string, properties?: string): IPromise; } export class AccountsHttpClient2_3 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -3238,11 +3382,10 @@ export class AccountsHttpClient2_3 extends CommonMethods2To3_2 { * @param {string} creatorId * @param {string} ownerId * @param {string} memberId - * @param {boolean} includeOwner * @param {string} properties * @return IPromise */ - getAccounts(creatorId?: string, ownerId?: string, memberId?: string, includeOwner?: boolean, properties?: string): IPromise; + getAccounts(creatorId?: string, ownerId?: string, memberId?: string, properties?: string): IPromise; } export class AccountsHttpClient2_2 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -3250,11 +3393,10 @@ export class AccountsHttpClient2_2 extends CommonMethods2To3_2 { * @param {string} creatorId * @param {string} ownerId * @param {string} memberId - * @param {boolean} includeOwner * @param {string} properties * @return IPromise */ - getAccounts(creatorId?: string, ownerId?: string, memberId?: string, includeOwner?: boolean, properties?: string): IPromise; + getAccounts(creatorId?: string, ownerId?: string, memberId?: string, properties?: string): IPromise; } export class AccountsHttpClient2_1 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -3262,11 +3404,10 @@ export class AccountsHttpClient2_1 extends CommonMethods2To3_2 { * @param {string} creatorId * @param {string} ownerId * @param {string} memberId - * @param {boolean} includeOwner * @param {string} properties * @return IPromise */ - getAccounts(creatorId?: string, ownerId?: string, memberId?: string, includeOwner?: boolean, properties?: string): IPromise; + getAccounts(creatorId?: string, ownerId?: string, memberId?: string, properties?: string): IPromise; } export class AccountsHttpClient2 extends CommonMethods2To3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -3274,11 +3415,10 @@ export class AccountsHttpClient2 extends CommonMethods2To3_2 { * @param {string} creatorId * @param {string} ownerId * @param {string} memberId - * @param {boolean} includeOwner * @param {string} properties * @return IPromise */ - getAccounts(creatorId?: string, ownerId?: string, memberId?: string, includeOwner?: boolean, properties?: string): IPromise; + getAccounts(creatorId?: string, ownerId?: string, memberId?: string, properties?: string): IPromise; } export class AccountsHttpClient extends AccountsHttpClient3_2 { constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); @@ -5822,6 +5962,7 @@ export interface FeatureAvailabilityContext { } export interface GlobalizationContext { culture: string; + explicitTheme: string; theme: string; timeZoneId: string; timezoneOffset: number; @@ -6629,6 +6770,10 @@ export function isExtensionFrame(): boolean; * @param module The script module to check (e.g. "VSS/Context") */ export function getScriptModuleOwner(module: string): string; +/** + * For IE and Edge we can automatically detect HC mode. + */ +export function isAutoHighContrastMode(): boolean; export function isHighContrastMode(): boolean; /** * Process the contributed configuration from a particular service @@ -7007,6 +7152,20 @@ export interface DataProviderContext { [key: string]: any; }; } +export interface DataProviderExceptionDetails { + /** + * The type of the exception that was thrown. + */ + exceptionType: string; + /** + * Message that is associated with the exception. + */ + message: string; + /** + * The StackTrace from the exception turned into a string. + */ + stackTrace: string; +} /** * A query that can be issued for data provider data */ @@ -7141,6 +7300,32 @@ export interface ExtensionDataCollectionQuery { */ collections: ExtensionDataCollection[]; } +export interface ExtensionEvent { + /** + * The extension which has been updated + */ + extension: VSS_Gallery_Contracts.PublishedExtension; + /** + * The current version of the extension that was updated + */ + extensionVersion: string; + /** + * Name of the collection for which the extension was requested + */ + host: ExtensionHost; + /** + * Gallery host url + */ + links: ExtensionEventUrls; + /** + * Represents the user who initiated the update + */ + modifiedBy: VSS_Common_Contracts.IdentityRef; + /** + * The type of update that was made + */ + updateType: ExtensionUpdateType; +} /** * Base class for an event callback for an extension */ @@ -7183,6 +7368,12 @@ export interface ExtensionEventCallbackCollection { */ versionCheck: ExtensionEventCallback; } +export interface ExtensionEventUrls extends ExtensionUrls { + /** + * Url of the extension management page + */ + manageExtensionsPage: string; +} export enum ExtensionFlags { /** * A built-in extension is installed for all VSTS accounts by default @@ -7193,6 +7384,10 @@ export enum ExtensionFlags { */ Trusted = 2, } +export interface ExtensionHost { + id: string; + name: string; +} /** * How an extension should handle including contributions based on licensing */ @@ -7284,41 +7479,41 @@ export interface ExtensionRequest { */ resolvedBy: VSS_Common_Contracts.IdentityRef; } -export interface ExtensionRequestedEvent { +export interface ExtensionRequestEvent { /** - * Name of the account for which the extension was requested + * The extension which has been requested */ - accountName: string; + extension: VSS_Gallery_Contracts.PublishedExtension; /** - * The extension request object + * Information about the host for which this extension is requested */ - extensionRequest: ExtensionRequest; + host: ExtensionHost; /** - * Gallery host url + * Name of the collection for which the extension was requested */ - galleryHostUrl: string; + hostName: string; /** - * Link to view the extension details page + * Gallery host url */ - itemUrl: string; + links: ExtensionRequestUrls; /** - * The extension which has been requested + * The extension request object */ - publishedExtension: VSS_Gallery_Contracts.PublishedExtension; + request: ExtensionRequest; /** - * Linkk to view the extension request + * The type of update that was made */ - requestUrl: string; + updateType: ExtensionRequestUpdateType; } -export interface ExtensionRequestEvent { +export interface ExtensionRequestsEvent { /** * The extension which has been requested */ extension: VSS_Gallery_Contracts.PublishedExtension; /** - * Name of the collection for which the extension was requested + * Information about the host for which this extension is requested */ - hostName: string; + host: ExtensionHost; /** * Gallery host url */ @@ -7326,7 +7521,7 @@ export interface ExtensionRequestEvent { /** * The extension request object */ - request: ExtensionRequest; + requests: ExtensionRequest[]; /** * The type of update that was made */ @@ -7352,17 +7547,9 @@ export enum ExtensionRequestUpdateType { Rejected = 3, Deleted = 4, } -export interface ExtensionRequestUrls { - /** - * Gallery host url - */ - extensionIcon: string; - /** - * Link to view the extension details page - */ - extensionPage: string; +export interface ExtensionRequestUrls extends ExtensionUrls { /** - * Linkk to view the extension request + * Link to view the extension request */ requestPage: string; } @@ -7424,6 +7611,25 @@ export enum ExtensionStateFlags { */ Warning = 512, } +export enum ExtensionUpdateType { + Installed = 1, + Uninstalled = 2, + Enabled = 3, + Disabled = 4, + VersionUpdated = 5, + ActionRequired = 6, + ActionResolved = 7, +} +export interface ExtensionUrls { + /** + * Url of the extension icon + */ + extensionIcon: string; + /** + * Link to view the extension details page + */ + extensionPage: string; +} /** * Represents a VSTS extension along with its installation state */ @@ -7670,6 +7876,7 @@ export var TypeInfo: { ExtensionAcquisitionRequest: any; ExtensionAuditLog: any; ExtensionAuditLogEntry: any; + ExtensionEvent: any; ExtensionFlags: { enumValues: { "builtIn": number; @@ -7679,8 +7886,8 @@ export var TypeInfo: { ExtensionLicensing: any; ExtensionManifest: any; ExtensionRequest: any; - ExtensionRequestedEvent: any; ExtensionRequestEvent: any; + ExtensionRequestsEvent: any; ExtensionRequestState: { enumValues: { "open": number; @@ -7712,6 +7919,17 @@ export var TypeInfo: { "warning": number; }; }; + ExtensionUpdateType: { + enumValues: { + "installed": number; + "uninstalled": number; + "enabled": number; + "disabled": number; + "versionUpdated": number; + "actionRequired": number; + "actionResolved": number; + }; + }; InstalledExtension: any; InstalledExtensionState: any; InstalledExtensionStateIssue: any; @@ -8398,6 +8616,44 @@ export class ExtensionHelper { } declare module "VSS/Controls" { export function getId(): number; +export type TrueOrFalse = "true" | "false" | boolean; +export interface AriaAttributes { + activedescendant?: string; + atomic?: TrueOrFalse; + autocomplete?: "inline" | "list" | "both" | "none"; + busy?: TrueOrFalse; + checked?: TrueOrFalse | "mixed" | "undefined"; + controls?: string; + describedby?: string; + disabled?: TrueOrFalse; + dropeffect?: "copy" | "move" | "link" | "execute" | "popup" | "none"; + expanded?: TrueOrFalse | "undefined"; + flowto?: string; + grabbed?: TrueOrFalse | "undefined"; + haspopup?: TrueOrFalse | "undefined"; + hidden?: TrueOrFalse | "undefined"; + invalid?: TrueOrFalse | "grammar" | "spelling"; + label?: string; + labelledby?: string; + level?: string | number; + live?: "off" | "polite" | "assertive"; + multiline?: TrueOrFalse; + multiselectable?: TrueOrFalse; + orientation?: "vertical" | "horizontal"; + owns?: string; + posinset?: string | number; + pressed?: TrueOrFalse | "mixed" | "undefined"; + readonly?: TrueOrFalse; + relevant?: "additions" | "removals" | "text" | "all" | "additions text"; + required?: TrueOrFalse; + selected?: TrueOrFalse | "undefined"; + setsize?: string | number; + sort?: "ascending" | "descending" | "none" | "other"; + valuemax?: string | number; + valuemin?: string | number; + valuenow?: string | number; + valuetext?: string; +} export interface EnhancementOptions { earlyInitialize?: boolean; cssClass?: string; @@ -8410,7 +8666,14 @@ export interface EnhancementOptions { id?: number | string; prepend?: boolean; change?: Function; + /** + * Legacy option. Superseded by ariaAttributes property. + */ ariaLabel?: string; + /** + * Add these aria attributes to the Enhancement. + */ + ariaAttributes?: AriaAttributes; } export class Enhancement { static ENHANCEMENTS_DATA_KEY: string; @@ -8536,6 +8799,7 @@ export class Enhancement { */ protected _setElement(element: JQuery): void; protected _setStyles(): void; + protected _setAriaAttributes(element?: JQuery): void; /** * Gets the element associated with this control. * @@ -8674,6 +8938,23 @@ export class Control extends Enhancement { */ protected _getInDomPromise(): IPromise; private _waitForElementInDom(deferred); + /** + * Sets the role for the current control using the specified role value on the specified element. + * If no element specified, default element is used. + * + * @param role Role to assign. + * @param element Element to apply the role (default is root element). + */ + protected setRole(role: string, element?: JQuery): void; + /** + * Sets the attribute for the current control using the specified attribute name, value on the specified element. + * If no element specified, default element is used. + * + * @param attribute Attribute name to set value. + * @param value Attribute value to set. + * @param element Element to apply the attribute (default is root element). + */ + protected setAttribute(attribute: string, value: string | number, element?: JQuery): void; } export class BaseControl extends Control { } @@ -9337,6 +9618,7 @@ export class ComboO extends Controls.Control any; + /** + * Delegate to be executed when the dialog is initialized completely (including sizing and positioning). + */ + initialize?: () => void; defaultButton?: string; /** * Specifies which buttons should be displayed on the dialog. This option is conveyed to underlying jQuery UI Dialog. See http://api.jqueryui.com/dialog/#option-buttons for more details. @@ -9927,6 +10217,11 @@ export class DialogO extends Panels.AjaxPanelO< * @return */ onClose(e?: JQueryEventObject): any; + /** + * Called when the initialization is completed including the sizing and positioning where all + * element in the dialog are visible. + */ + protected onInitialize(): void; /** * Closes the dialog. * @publicapi @@ -10554,6 +10849,7 @@ export class ExternalHub extends Controls.BaseControl { private _extensionHost; initialize(): void; private isXHRHubSwitchingEnabled(); + private getNavigationSettings(); /** * Navigate the page to the specified hub * @@ -10862,7 +11158,7 @@ export class FilterControlO extends Cont * @return */ private _removeClauseClick(e?, clauseInfo?); - private _updateGroupLink(); + private _updateGroupingSpan(); private _groupSelectedClauses(); /** * @param e @@ -10977,6 +11273,7 @@ export class FormInputControl extends Controls.Control private _createInputField(inputViewModel, $parent, comboControlMap); private _textInputValueChanged(combo, inputViewModel); private _radioInputValueChanged($radio, radioValue, inputViewModel); + private _setupTooltip($icon, tooltip, inputViewModel); private static _fixLinkTargets(element); static getProgressIconForInput(inputId: string): JQuery; static getValidationIconForInput(inputId: string): JQuery; @@ -11071,7 +11368,6 @@ export class InputViewModel { invalidateOnDependencyChange(): boolean; updateValues(values: FormInput_Contracts.InputValues): void; onBlur(): void; - setStateIcon(): void; suppressValidityChangeNotifications(suppress: boolean): void; addValueChangedCallback(callback: InputViewModelDelegate, addToFront?: boolean): void; removeValueChangedCallback(callback: InputViewModelDelegate): boolean; @@ -12691,6 +12987,11 @@ export interface IMenuItemSpec extends IContributedMenuItem { * @defaultvalue false */ disabled?: boolean; + /** + * If explicitly set to false, menu item will not be focusable via keyboard navigation. + * Use only for menu items that have alternative means of being focused. + */ + focusable?: boolean; /** * Children of this menu item */ @@ -13339,7 +13640,7 @@ export class Menu extends MenuBase { * @param index * @param options */ - private _getNextVisibleItem(index, options?); + private _getNextFocusableItem(index, options?); /** * Get the first item at or after the given index that is enabled. * @param index @@ -13358,7 +13659,7 @@ export class Menu extends MenuBase { * @param index * @param options */ - private _getPrevVisibleItem(index, options?); + private _getPrevFocusableItem(index, options?); /** * Get the closest item at or before the given index that is enabled. * @param index @@ -13478,6 +13779,12 @@ export class MenuOwner extends Menu private _blur(); private _onKeyDown(e?); private _onFocus(e?); + /** + * Returns true if the given element's focus is controlled by this MenuOwner. + * Returns false when the given element is inside a MenuItem marked unfocusable. + * @param element + */ + private _isOwned(element); private _onChildFocus(e?); private _onChildBlur(e?); private _startBlurTimeout(); @@ -13895,7 +14202,7 @@ export class PivotView extends Controls.Control { * @param selector * @return the array of items */ - getItems(selector?: any): any[]; + getItems(selector?: any): IPivotViewItem[]; initialize(): void; /** * Sets the DOM (jQuery) container that tab extensions will be loaded in. Should probably be a div. @@ -13910,7 +14217,10 @@ export class PivotView extends Controls.Control { * use forceRefresh for for refreshing contributions, by default this ensures we get contributions only once */ refreshContributedItems(forceRefresh?: boolean): IPromise; - updateItems(): void; + /** + * @param keepTabFocus: True to keep currently focused pivot view tab after update + */ + updateItems(keepTabFocus?: boolean): void; /** * Set a particular view's link to a new link. * @@ -13918,7 +14228,7 @@ export class PivotView extends Controls.Control { * @param link The new link for the specified view. */ setViewLink(id: string, link: string): void; - getSelectedView(): any; + getSelectedView(): IPivotViewItem; /** * Set a particular view to be enabled or disabled. * @@ -14479,7 +14789,8 @@ export interface IPopupContentControlOptions extends Controls.EnhancementOptions */ content?: string | JQuery | ((this: PopupContentControlO) => string); /** - * If true, show popup on hover. If false (default), show popup on click. + * By default popup is shown on click of its drop element. If this option is set to true, the + * popup will instead be shown on hover or focus of the drop element. */ openCloseOnHover?: boolean; /** @@ -14490,6 +14801,10 @@ export interface IPopupContentControlOptions extends Controls.EnhancementOptions * If openCloseOnHover is true, popup will be shown on focus as well as hover unlesss this is set to false. */ showOnFocus?: boolean; + /** + * If true, set the aria-describedby attribute on the parent. + */ + setAriaDescribedBy?: boolean; /** * where to align the element (horizontal-vertical) */ @@ -14510,17 +14825,35 @@ export interface IPopupContentControlOptions extends Controls.EnhancementOptions * how much extra top offset (if any) should be given to the target element versus the reference element. */ topOffsetPixels?: number; + /** + * if set, use this instead of leftOffsetPixels when shown on mouse over + */ + mouseLeftOffsetPixels?: number; + /** + * if set, use this instead of topOffsetPixels when shown on mouse over + */ + mouseTopOffsetPixels?: number; supportScroll?: boolean; - menuContainer?: any; + /** + * Put the tooltip in this container. (doesn't have to be a menu) + */ + menuContainer?: JQuery; + /** + * Whether the hover target must be _$dropElement strictly, if false then children that are inside of the _$dropElement will cause tooltipping + */ + useStrictTarget?: boolean; } export interface IPositionOptions { useMousePosition: boolean; } export class PopupContentControlO extends Controls.Control { + private static _shownPopup; private _$dropElement; private _$contentContainer; private _contentSet; private _visible; + private _hasFocus; + private _hasMouse; private _documentEventDelegate; private _onForceHideDropPopupDelegate; private _mouseMoveDelegate; @@ -14538,13 +14871,16 @@ export class PopupContentControlO toggle(): void; _enhance($dropElement: any): void; private _decorate(); + private _onFocus(e); + private _onBlur(e); private _onMouseMove(e); - private _onMouseEnter(e); + onMouseEnter(e: JQueryEventObject | MouseEvent): void; private _onMouseLeave(e); + showDelayed(): void; /** * Show the popup, after a delay if the openDelay option is set. */ - private _showDelayed(e, options?); + private _showDelayed(options?); private _handleDocumentMouseDown(e); /** * Set the position of the popup. @@ -14581,9 +14917,13 @@ export class RichContentTooltipO ex * @param options */ static addTooltip(content: string, target: HTMLElement | JQuery, options?: IRichContentTooltipOptions): RichContentTooltip; + static addTooltipIfOverflow(content: string, overflowingElement: HTMLElement | JQuery, tooltipOptions?: IRichContentTooltipOptions, options?: Utils_UI.ITooltipIfOverflowOptions): RichContentTooltip; } export class RichContentTooltip extends RichContentTooltipO { } +export class DefaultRichContentTooltip extends RichContentTooltipO { + initializeOptions(options?: IRichContentTooltipOptions): void; +} } declare module "VSS/Controls/RichEditor" { import Controls = require("VSS/Controls"); @@ -14738,7 +15078,7 @@ export class RichEditor extends Controls.Control { */ disableToolbar(): void; private _resizeImageOnLoadComplete(url, loadCompleteCallback?); - setInvalid(isInvalid: boolean): void; + setInvalid(isInvalid: boolean, styleTextArea?: boolean): void; setUploadAttachmentHandler(handler: RichEditorAttachmentHandler): void; getTextAreaId(): any; /** @@ -14785,7 +15125,7 @@ export class RichEditor extends Controls.Control { private _openImage(element); private _onDocumentReady(); private _trySettingWaterMark(val); - private _clearWaterMark(preventClearingValue?); + private _clearWaterMark(); /** * @param e * @return @@ -14890,7 +15230,7 @@ import Search = require("VSS/Search"); */ export interface ISearchBoxControlOptions { /** - * filterTitle: Optional: Tooltip for the control. + * filterTitle: Optional: Aria-label for the control input. */ filterTitle?: string; /** @@ -15108,6 +15448,18 @@ export interface ISplitterOptions { * Sets the maximum width of the splitter's fixed side. */ maxWidth?: number; + /** + * Optional: Tooltip show on the toggle button when the splitter is collapsed + */ + toggleButtonCollapsedTooltip?: string; + /** + * Optional: Tooltip show on the toggle button when the splitter is expanded + */ + toggleButtonExpandedTooltip?: string; + /** + * Optional: Toggle handler called when expand state changes + */ + onToggle?: (isExpanded: boolean) => void; } /** * @publicapi @@ -15162,6 +15514,7 @@ export class SplitterO extends Controls.Contr */ _enhance(element: JQuery): void; initialize(): void; + private _setupHandleBar(); private _setInitialSize(); /** * Sets the minimum width of the splitter's fixed side. @@ -15177,6 +15530,7 @@ export class SplitterO extends Controls.Contr * @publicapi */ setMaxWidth(maxWidth: number): void; + private _getAdjustedSize(size); /** * Resize the fixed side of the splitter to the specified size. * @@ -15259,6 +15613,12 @@ export class SplitterO extends Controls.Contr * @publicapi */ horizontal(): void; + /** + * Sets the orientation value of corresponding aria attribute. + * + * @param vertical Determines whether splitter in vertical position or not. + */ + private _setAriaOrientation(vertical); /** * Sets the label that is shown when the splitter is collapsed * @@ -15289,11 +15649,20 @@ export class SplitterO extends Controls.Contr * Sets the tooltip for the toggle button. */ private _setToggleButtonTooltip(); + /** + * set the handler on toggle - this should only be used when Splitter control was automatically enhanced, otherwise specify in options + */ + setOnToggle(handler: (isExpanded: boolean) => void): void; /** * Measures the full size of the fixed side pane. */ private _measureFixedSide(); private _handleBarMouseDown(e?); + private _handleBarKeydown(e); + /** + * Moves the separator either left or right. + */ + private _moveSeparator(direction); /** * Checks if the toggle button is enabled. */ @@ -18035,6 +18404,14 @@ export class EventHandlerList { * Get the underlying list of handlers */ getHandlers(): IFunctionPPR[]; + /** + * Invoke the subscribed event handlers + * + * @param sender The source that is triggering the event + * @param eventArgs Event-specific arguments + * @param handlerResultFilter Optional callback method to be able to break out of the handler invocation loop based on the return value of a handler. The filter should return true to break out of the loop. + */ + invokeHandlers(sender?: TSender, eventArgs?: TEventArgs, handlerResultFilter?: (result: any) => boolean): void; } /** * Command Event Arguments data structure that can be used for "command" events @@ -19938,8 +20315,10 @@ export type ModuleComponentSelector = (...modules: any[]) => React.Compo * @param moduleComponentSelector Selector function, given the imported modules to return the type/constructor method to create * the desired component. * @param componentWhileLoading Optional function to return a component to display while loading + * @param onLoadStart Optional callback function that will be called once the component async load starts + * @param onLoadEnd Optional callback function that will be called once the component async load ends */ -export function getAsyncLoadedComponent(modules: string[], moduleComponentSelector: ModuleComponentSelector, componentWhileLoading?: () => JSX.Element): (props: TProps) => JSX.Element; +export function getAsyncLoadedComponent(modules: string[], moduleComponentSelector: ModuleComponentSelector, componentWhileLoading?: () => JSX.Element, onLoadStart?: () => void, onLoadEnd?: () => void): (props: TProps) => JSX.Element; } declare module "VSS/Flux/Component" { import React = require("react"); @@ -20013,15 +20392,10 @@ export class Component extends Store { protected _value: T; - constructor(changeType: string, options?: IStoreOptions); - protected getAction(): Action_Base.Action; + constructor(); + protected getAction(): Action; protected onChange(payload: T): void; getValue(): T; } export class RemoteStore extends Store { protected _error: any; protected _loading: boolean; - constructor(changedEvent?: string, options?: IStoreOptions); + constructor(); isLoading(): boolean; hasError(): boolean; getError(): any; @@ -20230,6 +20604,10 @@ export enum ConcernCategory { Spam = 4, } export interface EventCounts { + /** + * Average rating on the day for extension + */ + averageRating: number; /** * Number of times the extension was bought in hosted scenario (applies only to VSTS extensions) */ @@ -20366,11 +20744,15 @@ export enum ExtensionDeploymentTechnology { Vsix = 3, ReferralLink = 4, } -export interface ExtensionEventBase { +/** + * Stores details of each event + */ +export interface ExtensionEvent { /** * Id which identifies each data point uniquely */ id: number; + properties: any; /** * Timestamp of when the event occured */ @@ -20381,9 +20763,15 @@ export interface ExtensionEventBase { version: string; } /** - * Container object for all extension events. Stores all install and uninstall events related to an extension. + * Container object for all extension events. Stores all install and uninstall events related to an extension. The events container is generic so can store data of any type of event. New event types can be added without altering the contract. */ export interface ExtensionEvents { + /** + * Generic container for events data. The dictionary key denotes the type of event and the list contains properties related to that event + */ + events: { + [key: string]: ExtensionEvent[]; + }; /** * Id of the extension, this will never be sent back to the client. This field will mainly be used when EMS calls into Gallery REST API to update install/uninstall events for various extensions in one go. */ @@ -20392,18 +20780,10 @@ export interface ExtensionEvents { * Name of the extension */ extensionName: string; - /** - * List of install events for this extension - */ - installEvents: InstallEvent[]; /** * Name of the publisher */ publisherName: string; - /** - * List of all uninstall events for this extension - */ - uninstallEvents: UninstallEvent[]; } export interface ExtensionFile { assetType: string; @@ -20462,6 +20842,8 @@ export interface ExtensionIdentifier { export enum ExtensionLifecycleEventType { Uninstall = 1, Install = 2, + Review = 3, + Other = 999, } /** * Package that will be used to create or update a published extension @@ -20722,32 +21104,13 @@ export interface FilterCriteria { */ value: string; } -export interface InstallationTarget { - maxInclusive: boolean; - maxVersion: string; - minInclusive: boolean; - minVersion: string; - target: string; - targetVersion: string; -} -export interface InstallEvent extends ExtensionEventBase { - /** - * Install metadata - */ - properties: InstallProperties; -} -/** - * Properties associated with install event - */ -export interface InstallProperties { - /** - * Id of account - */ - accountId: string; - /** - * Name of account - */ - accountName: string; +export interface InstallationTarget { + maxInclusive: boolean; + maxVersion: string; + minInclusive: boolean; + minVersion: string; + target: string; + targetVersion: string; } /** * MetadataItem is one value of metadata under a given category of metadata @@ -20984,6 +21347,46 @@ export interface PublisherQueryResult { */ results: PublisherFilterResult[]; } +/** + * The core structure of a QnA item + */ +export interface QnAItem { + /** + * Time when the review was first created + */ + createdDate: Date; + /** + * Unique identifier of a QnA item + */ + id: number; + /** + * Get status of item + */ + status: QnAItemStatus; + /** + * Text description of the QnA item + */ + text: string; + /** + * Time when the review was edited/updated + */ + updatedDate: Date; + /** + * User details for the item. + */ + user: UserIdentityRef; +} +export enum QnAItemStatus { + None = 0, + /** + * The UserEditable flag indicates whether the item is editable by the logged in user. + */ + UserEditable = 1, + /** + * The PublisherCreated flag indicates whether the item has been created by extension publisher. + */ + PublisherCreated = 2, +} /** * A filter used to define a set of extensions to return during a query. */ @@ -21017,6 +21420,30 @@ export interface QueryFilter { */ sortOrder: number; } +/** + * The structure of the question / thread + */ +export interface Question extends QnAItem { + /** + * List of answers in for the question / thread + */ + responses: Response[]; +} +export interface QuestionsResult { + /** + * Flag indicating if there are more QnA threads to be shown (for paging) + */ + hasMoreQuestions: boolean; + /** + * List of the QnA threads + */ + questions: Question[]; +} +/** + * The structure of a response + */ +export interface Response extends QnAItem { +} export enum RestApiResponseStatus { /** * The operation is completed. @@ -21061,6 +21488,10 @@ export interface RestApiResponseStatusModel { statusMessage: string; } export interface Review { + /** + * Admin Reply, if any, for this review + */ + adminReply: ReviewReply; /** * Unique identifier of a review item */ @@ -21069,6 +21500,7 @@ export interface Review { * Flag for soft deletion */ isDeleted: boolean; + isIgnored: boolean; /** * Version of the product for which review was submitted */ @@ -21143,6 +21575,10 @@ export enum ReviewPatchOperation { * Submit a reply for a review */ ReplyToReview = 3, + /** + * Submit an admin response + */ + AdminResponseForReview = 4, } export interface ReviewReply { /** @@ -21187,6 +21623,7 @@ export interface ReviewsResult { * List of reviews */ reviews: Review[]; + totalIgnoredReviewCount: number; /** * Count of total review items */ @@ -21260,33 +21697,6 @@ export enum SortOrderType { */ Descending = 2, } -export interface UninstallEvent extends ExtensionEventBase { - /** - * Uninstall metadata - */ - properties: UninstallProperties; -} -/** - * Properties associated with uninstall event - */ -export interface UninstallProperties { - /** - * Id of account - */ - accountId: string; - /** - * Name of account - */ - accountName: string; - /** - * Reason code of uninstall - */ - reasonCode: string; - /** - * User entered text while uninstalling an extension - */ - reasonText: string; -} /** * Represents the extension policy applied to a given user */ @@ -21304,6 +21714,19 @@ export interface UserExtensionPolicy { */ userId: string; } +/** + * Identity reference with name and guid + */ +export interface UserIdentityRef { + /** + * User display name + */ + displayName: string; + /** + * User VSID + */ + id: string; +} export interface UserReportedConcern { /** * Category of the concern @@ -21372,13 +21795,15 @@ export var TypeInfo: { "referralLink": number; }; }; - ExtensionEventBase: any; + ExtensionEvent: any; ExtensionEvents: any; ExtensionFilterResult: any; ExtensionLifecycleEventType: { enumValues: { "uninstall": number; "install": number; + "review": number; + "other": number; }; }; ExtensionPolicy: any; @@ -21450,7 +21875,6 @@ export var TypeInfo: { "validated": number; }; }; - InstallEvent: any; PagingDirection: { enumValues: { "backward": number; @@ -21511,7 +21935,18 @@ export var TypeInfo: { }; }; PublisherQueryResult: any; + QnAItem: any; + QnAItemStatus: { + enumValues: { + "none": number; + "userEditable": number; + "publisherCreated": number; + }; + }; QueryFilter: any; + Question: any; + QuestionsResult: any; + Response: any; RestApiResponseStatus: { enumValues: { "completed": number; @@ -21535,6 +21970,7 @@ export var TypeInfo: { "flagReview": number; "updateReview": number; "replyToReview": number; + "adminResponseForReview": number; }; }; ReviewReply: any; @@ -21563,7 +21999,6 @@ export var TypeInfo: { "descending": number; }; }; - UninstallEvent: any; UserExtensionPolicy: any; UserReportedConcern: any; }; @@ -21932,7 +22367,18 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { protected reportsApiVersion: string; protected settingsApiVersion: string; protected statsApiVersion: string; + protected statsApiVersion_ae06047e: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); + /** + * [Preview API] + * + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} statType + * @return IPromise + */ + incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string): IPromise; /** * [Preview API] * @@ -21985,10 +22431,10 @@ export class CommonMethods3_1To3_2 extends CommonMethods3To3_2 { * @param {string} extensionName - Name of the extension * @param {number} count - Count of events to fetch, applies to each event type. * @param {Date} afterDate - Fetch events that occured on or after this value - * @param {string} queryFlags - Filter options. Supported values: includeInstall, includeUninstall. Default is to fetch all types of events + * @param {string} include - Filter options. Supported values: includeInstall, includeUninstall. Default is to fetch all types of events * @return IPromise */ - getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, queryFlags?: string): IPromise; + getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string): IPromise; } /** * @exemptedapi @@ -22026,6 +22472,56 @@ export class GalleryHttpClient3_2 extends CommonMethods3_1To3_2 { * @return IPromise */ updateExtension(content: any, publisherName: string, extensionName: string): IPromise; + /** + * [Preview API] Returns a list of questions with their responses associated with an extension. + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} count - Number of questions to retrieve (defaults to 10). + * @param {number} page - Page number from which set of questions are to be retrieved. + * @return IPromise + */ + getQuestions(publisherName: string, extensionName: string, count?: number, page?: number): IPromise; + /** + * [Preview API] Creates a new question for an extension. + * + * @param {Contracts.Question} question - Question to be created for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @return IPromise + */ + createQuestion(question: Contracts.Question, publisherName: string, extensionName: string): IPromise; + /** + * [Preview API] Updates an existing question for an extension. + * + * @param {Contracts.Question} question - Updated question to be set for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question to be updated for the extension. + * @return IPromise + */ + updateQuestion(question: Contracts.Question, publisherName: string, extensionName: string, questionId: number): IPromise; + /** + * [Preview API] Creates a new response for a given question for an extension. + * + * @param {Contracts.Response} response - Response to be created for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question for which response is to be created for the extension. + * @return IPromise + */ + createResponse(response: Contracts.Response, publisherName: string, extensionName: string, questionId: number): IPromise; + /** + * [Preview API] Updates an existing response for a given question for an extension. + * + * @param {Contracts.Response} response - Updated response to be set for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question for which response is to be updated for the extension. + * @param {number} responseId - Identifier of the response which has to be updated. + * @return IPromise + */ + updateResponse(response: Contracts.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): IPromise; } /** * @exemptedapi @@ -22289,22 +22785,22 @@ export interface GraphGroupCreationContext { id: string; } /** - * Use this type to create a new group that is a reference to an existing group from an external AD or AAD backed provider. This is the subset of GraphGroup fields required for creation of a group for the AD and AAD use case. + * Use this type to create a new group that is a reference to an existing group from an external AD or AAD backed provider. This is the subset of GraphGroup fields required for creation of a group for the AAD and AD use case. */ -export interface GraphGroupOriginIdCreationContext extends GraphGroupCreationContext { +export interface GraphGroupMailAddressCreationContext extends GraphGroupCreationContext { /** - * This should be the object id or sid of the group from the source AD or AAD provider. Vsts will comunicate with the source provider to fill all other fields on creation. + * This should be the mail address or the group in the source AD or AAD provider. Vsts will comunicate with the source provider to fill all other fields on creation. */ - originId: string; + mailAddress: string; } /** - * Use this type to create a new group that is a reference to an existing group from an external AD or AAD backed provider. This is the subset of GraphGroup fields required for creation of a group for the AAD and AD use case. + * Use this type to create a new group that is a reference to an existing group from an external AD or AAD backed provider. This is the subset of GraphGroup fields required for creation of a group for the AD and AAD use case. */ -export interface GraphGroupPrincipalNameCreationContext extends GraphGroupCreationContext { +export interface GraphGroupOriginIdCreationContext extends GraphGroupCreationContext { /** - * This should be the principal name or upn or the group in the source AD or AAD provider. Vsts will comunicate with the source provider to fill all other fields on creation. + * This should be the object id or sid of the group from the source AD or AAD provider. Vsts will comunicate with the source provider to fill all other fields on creation. */ - principalName: string; + originId: string; } /** * Use this type to create a new Vsts group that is not backed by an external provider. @@ -22314,15 +22810,15 @@ export interface GraphGroupVstsCreationContext extends GraphGroupCreationContext * For internal use only in back compat scenarios. */ crossProject: boolean; + /** + * Used by VSTS groups; if set this will be the group description, otherwise ignored + */ + description: string; descriptor: string; /** * Used by VSTS groups; if set this will be the group DisplayName, otherwise ignored */ displayName: string; - /** - * Used by VSTS groups; if set this will be the group description, otherwise ignored - */ - groupDescription: string; /** * For internal use only in back compat scenarios. */ @@ -22337,6 +22833,10 @@ export interface GraphMember extends GraphSubject { * This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the name of the directory, for Vsts groups the ScopeId, etc) */ domain: string; + /** + * The email address of record for a given graph member. This may be different than the principal name. + */ + mailAddress: string; /** * Used only for internal back-compat scenarios. */ @@ -22451,10 +22951,6 @@ export enum GraphTraversalDirection { Up = 2, } export interface GraphUser extends GraphMember { - /** - * The email address of record for a given user. This may be different then the principla name. - */ - mailAddress: string; } /** * Do not attempt to use this type to create a new user. Use one of the subclasses instead. This type does not contain sufficient fields to create a new user. @@ -22466,13 +22962,19 @@ export interface GraphUserCreationContext { id: string; } /** - * Use this type to create a new user reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case. + * Use this type to create a new user reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its mail address in the backing provider. + */ +export interface GraphUserMailAddressCreationContext extends GraphUserCreationContext { + mailAddress: string; +} +/** + * Use this type to create a new user reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its unique ID in the backing provider. */ export interface GraphUserOriginIdCreationContext extends GraphUserCreationContext { originId: string; } /** - * Use this type to create a new user reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case. + * Use this type to create a new user reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its principal name in the backing provider. */ export interface GraphUserPrincipalNameCreationContext extends GraphUserCreationContext { principalName: string; @@ -22549,18 +23051,18 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { * [Preview API] * * @param {string} scopeDescriptor - * @param {Contracts.GraphDisabledFilter} disabled + * @param {string[]} subjectTypes * @return IPromise */ - getGroups(scopeDescriptor?: string, disabled?: Contracts.GraphDisabledFilter): IPromise; + getGroups(scopeDescriptor?: string, subjectTypes?: string[]): IPromise; /** * [Preview API] Update the fields of a VS Team Services group. Currently limited to only changing the description and account name. * * @param {string} groupDescriptor - The descriptor of the group to modify. * @param {VSS_Common_Contracts.JsonPatchDocument} patchDocument - The JSON+Patch document containing the fields to alter. - * @return IPromise + * @return IPromise */ - updateGroup(groupDescriptor: string, patchDocument: VSS_Common_Contracts.JsonPatchDocument): IPromise; + updateGroup(groupDescriptor: string, patchDocument: VSS_Common_Contracts.JsonPatchDocument): IPromise; /** * [Preview API] Create a new membership between two eligible members * @@ -22597,7 +23099,7 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { * [Preview API] Get all the memberships where this descriptor is a member in the relationship by default. To get relationships where the descriptor is a container, use the optional parameter direction with a value of down. Scopes are not supported in this method yet. * * @param {string} subjectDescriptor - Fetch all direct memberships of this descriptor. - * @param {string} direction - Defaults to down for groups and up for users. Explicitly set this to change the default behavior. + * @param {string} direction - Defaults to up. * @return IPromise */ getMemberships(subjectDescriptor: string, direction?: string): IPromise; @@ -22663,11 +23165,10 @@ export class GraphHttpClient3_2 extends CommonMethods3_1To3_2 { /** * [Preview API] Gets all users in the current scope (usually organization or account). The optional parameters are used to filter down the returned results. May truncate exceptionally large result sets. Returned results are in no guaranteed order. * - * @param {string[]} subjectType - A comma separated list of user subject subtypes to reduce the retrieved results, e.g. Microsoft.IdentityModel.Claims.ClaimsIdentity> - * @param {Contracts.GraphDisabledFilter} disabled - Selects a subset of users based on their disabled state. If false, selects enabled users only. If true, selects disabled users only. If any, selects both enabled and disabled users. + * @param {string[]} subjectTypes - A comma separated list of user subject subtypes to reduce the retrieved results, e.g. Microsoft.IdentityModel.Claims.ClaimsIdentity> * @return IPromise */ - getUsers(subjectType?: string[], disabled?: Contracts.GraphDisabledFilter): IPromise; + getUsers(subjectTypes?: string[]): IPromise; } /** * @exemptedapi @@ -23289,6 +23790,11 @@ export interface IIdentityPickerDropdownOptions extends Identities_Picker_Servic * full screen view and the behavior may change over time. **/ useRemainingSpace?: boolean; + /** + * Optimizations for small screen (mobile) which renders controls with additional icons and + * text information suitable for small screens. + */ + smallScreenRender?: boolean; } /** * @exemptedapi @@ -23330,6 +23836,7 @@ export class IdentityPickerDropdownControl extends Controls.Control */ updateCollectionProperties(collectionId: string, patchDocument: VSS_Common_Contracts.JsonPatchDocument): IPromise; - /** - * [Preview API] - * - * @param {VSS_Common_Contracts.JsonPatchDocument} patchDocument - * @param {string} accountId - * @return IPromise - */ - updateAccount(patchDocument: VSS_Common_Contracts.JsonPatchDocument, accountId: string): IPromise; - /** - * [Preview API] - * - * @param {string} accountId - * @param {string} accountName - * @return IPromise - */ - restoreAccount(accountId: string, accountName: string): IPromise; - /** - * [Preview API] - * - * @return IPromise - */ - getAccounts(): IPromise; - /** - * [Preview API] - * - * @param {string} accountId - * @param {string[]} propertyNames - * @return IPromise - */ - getAccount(accountId: string, propertyNames?: string[]): IPromise; - /** - * [Preview API] - * - * @param {string} accountId - * @return IPromise - */ - deleteAccount(accountId: string): IPromise; - /** - * [Preview API] - * - * @param {Contracts.Account} resource - * @return IPromise - */ - createAccount(resource: Contracts.Account): IPromise; - /** - * [Preview API] - * - * @param {string} accountId - * @param {VSS_Common_Contracts.JsonPatchDocument} patchDocument - * @return IPromise - */ - updateAccountProperties(accountId: string, patchDocument: VSS_Common_Contracts.JsonPatchDocument): IPromise; } /** * @exemptedapi @@ -26965,11 +27389,6 @@ export interface ProfileRegions { */ regions: ProfileRegion[]; } -export interface RemoteProfile { - avatar: number[]; - displayName: string; - emailAddress: string; -} export var TypeInfo: { AttributesContainer: any; Avatar: any; @@ -27238,13 +27657,6 @@ export class CommonMethods3To3_2 extends CommonMethods2To3_2 { * @return IPromise */ getUserDefaults(includeAvatar?: boolean): IPromise; - /** - * [Preview API] - * - * @param {boolean} includeAvatar - * @return IPromise - */ - getRemoteProfile(includeAvatar?: boolean): IPromise; /** * [Preview API] * @@ -28593,6 +29005,10 @@ export interface SecurityNamespaceDescription { * Used to send information about the structure of the security namespace over the web service. */ structureValue: number; + /** + * The bits reserved by system store + */ + systemBitMask: number; /** * If true, the security service will expect an ISecurityDataspaceTokenTranslator plugin to exist for this namespace */ @@ -29030,11 +29446,11 @@ export class CommonMethods3To3_2 extends VSS_WebApi.VssHttpClient { protected entriesApiVersion_cd006711: string; constructor(rootRequestPath: string, options?: VSS_WebApi.IVssHttpClientOptions); /** - * [Preview API] Get all setting entries for the given named scope + * [Preview API] Set the specified entries for the given named scope * - * @param {{ [key: string] : any; }} entries - * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. - * @param {string} scopeName - Scope at which to get the setting for (e.g. "project" or "team") + * @param {{ [key: string] : any; }} entries - The entries to set + * @param {string} userScope - User-Scope at which to set the values. Should be "me" for the current user or "host" for all users. + * @param {string} scopeName - Scope at which to set the settings on (e.g. "project" or "team") * @param {string} scopeValue - Value of the scope (e.g. the project or team id) * @return IPromise */ @@ -29064,10 +29480,10 @@ export class CommonMethods3To3_2 extends VSS_WebApi.VssHttpClient { [key: string]: any; }>; /** - * [Preview API] Get all setting entries for the given user/all-users scope + * [Preview API] Set the specified setting entry values for the given user/all-users scope * - * @param {{ [key: string] : any; }} entries - * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {{ [key: string] : any; }} entries - The entries to set + * @param {string} userScope - User-Scope at which to set the values. Should be "me" for the current user or "host" for all users. * @return IPromise */ setEntries(entries: { @@ -29924,6 +30340,8 @@ export function equals(first: any, second: any): boolean; * @param reachMaxAttemptCallback Callback when max attempted is reached */ export function poll(functionDelegate: (sucessCallback: IResultCallback, errorCallback?: IErrorCallback) => void, delay: number, maxAttempt: number, firstDelay?: number, shouldStopDelegate?: (result: any) => boolean, reachMaxAttemptCallback?: () => void): void; +export function setCookie(cookieName: string, cookieValue: string): void; +export function deleteCookie(cookieName: string): void; export var documentSelection: any; } declare module "VSS/Utils/Culture" { @@ -30941,6 +31359,7 @@ export interface IBrowserInformation { export module BrowserCheckUtils { function isFirefox(): boolean; function isChrome(): boolean; + function isSafari(): boolean; function isMozilla(): boolean; /** * Returns true if browser is Internet Explorer 10 or earlier. @@ -30995,15 +31414,40 @@ export function accessible(element: JQuery, handler?: Function): JQuery; */ export function buttonKeydownHandler(e: JQueryEventObject): void; /** - * Show a tooltip on hover, only if the text of the element overflows the visible area. - * @param element element with text-overflow: ellipsis set - * @param$options titleTarget element whose text will be used to populate the tooltip, only need specify if different than $element - * titleText text to set the title to, otherwise use the $titleTarget's .text() or .val() + * Returns true if the contents of the element overflow its visible bounds. + * @param element */ -export function tooltipIfOverflow(element: HTMLElement | HTMLInputElement, options?: { +export function contentsOverflow(element: HTMLElement): boolean; +export interface ITooltipIfOverflowOptions { + /** + * titleTarget element which will get the tooltip, and whose text will be used to populate the tooltip, only need specify if different than element argument passed in to tooltipIfOverflow() + */ titleTarget?: HTMLElement | HTMLInputElement; + /** + * element that generates the mouseenter, mouseleave, focus, and blur events we should listen for + */ + eventSource?: HTMLElement; + /** + * titleText text to set the title to, otherwise use the titleTarget's .text() or .val() + */ titleText?: string; -}): void; + /** + * Function that will add the tooltip on mouseenter or focus (default is to add title attribute). + * The options object passed to this function will have titleTarget and titleText set to the correct values to use. + */ + addTooltipDelegate?: (e: MouseEvent | FocusEvent, options: ITooltipIfOverflowOptions) => void; + /** + * Function that removes the tooltip on mouseleave or blur + */ + removeTooltipDelegate?: (e: MouseEvent | FocusEvent, options: ITooltipIfOverflowOptions) => void; +} +/** + * Show a tooltip on hover, only if the text of the element overflows the visible area. + * @param element element with text-overflow set + * @param options + * + */ +export function tooltipIfOverflow(element: HTMLElement | HTMLInputElement, options?: ITooltipIfOverflowOptions): void; export function Watermark(element: JQuery, ...args: any[]): JQuery; } declare module "VSS/Utils/Url" { @@ -31457,15 +31901,18 @@ export module ContributionsResourceIds { var VersionDiscoveryLocationId: string; var VDiscCompatLocationId: string; var ContributionQueryLocationId: string; + var LocalExtensionAssetsLocationId: string; var AreaId: string; var ContributionsAreaName: string; var ExtensionsAreaName: string; + var AssetsResource: string; var DataProvidersQueryLocationIdString: string; var InstalledExtensionsLocationIdString: string; var InstalledExtensionsByNameLocationIdString: string; var VersionDiscoveryLocationIdString: string; var VDiscCompatLocationIdString: string; var ContributionQueryLocationIdString: string; + var LocalExtensionAssetsLocationIdString: string; } export module CustomerIntelligenceResourceIds { var EventsLocationId: string; @@ -31493,11 +31940,18 @@ export module FeatureManagementResourceIds { var FeaturesLocationId: string; var FeatureStatesLocationId: string; var NamedScopeFeatureStatesLocationId: string; + var FeatureStatesQueryLocationId: string; + var FeatureStatesQueryForScopeLocationId: string; + var FeatureStatesQueryForDefaultScopeLocationId: string; var FeatureManagementAreaName: string; var FeaturesResource: string; var FeatureStatesResource: string; var FeatureStatesLocationIdString: string; var NamedScopeFeatureStatesLocationIdString: string; + var FeatureStatesQueryResource: string; + var FeatureStatesQueryLocationIdString: string; + var FeatureStatesQueryForScopeLocationIdString: string; + var FeatureStatesQueryForDefaultScopeLocationIdString: string; } export module IdentityMruResourceIds { var MruIdentitiesLocationId: string; @@ -31509,11 +31963,13 @@ export module LocationResourceIds { var ConnectionData: string; var ServiceDefinitions: string; var AccessMappings: string; + var ResourceAreas: string; var SpsServiceDefinition: string; var LocationServiceArea: string; var ConnectionDataResource: string; var ServiceDefinitionsResource: string; var AccessMappingsResource: string; + var ResourceAreasResource: string; var SpsServiceDefintionResource: string; } export module NameResolutionResourceIds { @@ -31667,6 +32123,7 @@ export interface IdentityRef { displayName: string; id: string; imageUrl: string; + inactive: boolean; isAadIdentity: boolean; isContainer: boolean; profileUrl: string;