New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vss-web-extension-sdk

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vss-web-extension-sdk - npm Package Compare versions

Comparing version 1.102.0 to 1.104.0

15

lib/VSS.SDK.js

@@ -670,3 +670,3 @@ //dependencies=

VSS.VssSDKVersion = 2.0;
VSS.VssSDKRestVersion = "2.2";
VSS.VssSDKRestVersion = "2.3";
var bodyElement;

@@ -952,3 +952,5 @@ var webContext;

window.require(["VSS/Bundling"], function (VSS_Bundling) {
VSS_Bundling.requireModules(modules, callback);
VSS_Bundling.requireModules(modules).spread(function () {
callback.apply(this, arguments);
});
});

@@ -1131,8 +1133,13 @@ }

* Requests the parent window to resize the container for this extension based on the current extension size.
*
* @param width Optional width, defaults to scrollWidth
* @param height Optional height, defaults to scrollHeight
*/
function resize() {
function resize(width, height) {
if (!bodyElement) {
bodyElement = document.getElementsByTagName("body").item(0);
}
parentChannel.invokeRemoteMethod("resize", "VSS.HostControl", [bodyElement.scrollWidth, bodyElement.scrollHeight]);
var newWidth = typeof width === "number" ? width : bodyElement.scrollWidth;
var newHeight = typeof height === "number" ? height : bodyElement.scrollHeight;
parentChannel.invokeRemoteMethod("resize", "VSS.HostControl", [newWidth, newHeight]);
}

@@ -1139,0 +1146,0 @@ VSS.resize = resize;

//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-t)+t).toString(36)+Math.floor(Math.random()*(f-t)+t).toString(36)}var i,r,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;i<r;i++)t[i](n)})}},n.prototype._reject=function(n){if(this._isRejected||this._isResolved||(this._isRejected=!0,this._rejectValue=n,this._rejectCallbacks.length===0&&window.console&&window.console.warn&&(console.warn("Rejected XDM promise with no reject callbacks"),n&&console.warn(n))),this._isRejected&&this._rejectCallbacks.length>0){var t=this._rejectCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;i<r;i++)t[i](n)})}},n}(),t=parseInt("10000000000",36),f=Number.MAX_SAFE_INTEGER||9007199254740991;i=function(){function n(){this._registeredObjects={}}return n.prototype.register=function(n,t){this._registeredObjects[n]=t},n.prototype.getInstance=function(n,t){var i=this._registeredObjects[n];return i?typeof i=="function"?i(t):i:null},n}();n.XDMObjectRegistry=i;n.globalObjectRegistry=new i;r=function(){function t(n,r){r===void 0&&(r=null);this._nextMessageId=1;this._deferreds={};this._nextProxyFunctionId=1;this._proxyFunctions={};this._postToWindow=n;this._targetOrigin=r;this._channelObjectRegistry=new i;this._channelId=t._nextChannelId++;this._targetOrigin||(this._handshakeToken=s())}return t.prototype.getObjectRegistry=function(){return this._channelObjectRegistry},t.prototype.invokeRemoteMethod=function(n,t,i,r,f){var e={id:this._nextMessageId++,methodName:n,instanceId:t,instanceContext:r,params:this._customSerializeObject(i,f),jsonrpc:"2.0",serializationSettings:f},o;return this._targetOrigin||(e.handshakeToken=this._handshakeToken),o=u(),this._deferreds[e.id]=o,this._sendRpcMessage(e),o.promise},t.prototype.getRemoteObjectProxy=function(n,t){return this.invokeRemoteMethod(null,n,null,t)},t.prototype.invokeMethod=function(n,t){var f=this,r,u,i;if(!t.methodName){this._success(t,n,t.handshakeToken);return}if(r=n[t.methodName],typeof r!="function"){this._error(t,new Error("RPC method not found: "+t.methodName),t.handshakeToken);return}try{u=[];t.params&&(u=this._customDeserializeObject(t.params));i=r.apply(n,u);i&&i.then&&typeof i.then=="function"?i.then(function(n){f._success(t,n,t.handshakeToken)},function(n){f._error(t,n,t.handshakeToken)}):this._success(t,i,t.handshakeToken)}catch(e){this._error(t,e,t.handshakeToken)}},t.prototype.getRegisteredObject=function(t,i){if(t==="__proxyFunctions")return this._proxyFunctions;var r=this._channelObjectRegistry.getInstance(t,i);return r||(r=n.globalObjectRegistry.getInstance(t,i)),r},t.prototype.onMessage=function(n){var u=this,t=n,i,r;if(t.instanceId){if(i=this.getRegisteredObject(t.instanceId,t.instanceContext),!i)return!1;typeof i.then=="function"?i.then(function(n){u.invokeMethod(n,t)},function(n){u._error(t,n,t.handshakeToken)}):this.invokeMethod(i,t)}else{if(r=this._deferreds[t.id],!r)return!1;t.error?r.reject(this._customDeserializeObject([t.error])[0]):r.resolve(this._customDeserializeObject([t.result])[0]);delete this._deferreds[t.id]}return!0},t.prototype.owns=function(n,t,i){var r=i;if(this._postToWindow===n){if(this._targetOrigin)return t?t.toLowerCase()==="null"||this._targetOrigin.toLowerCase().indexOf(t.toLowerCase())===0:!1;if(r.handshakeToken&&r.handshakeToken===this._handshakeToken)return this._targetOrigin=t,!0}return!1},t.prototype.error=function(n,t){var i=n;this._error(i,t,i.handshakeToken)},t.prototype._error=function(n,t,i){var r={id:n.id,error:this._customSerializeObject([t],n.serializationSettings)[0],jsonrpc:"2.0",handshakeToken:i};this._sendRpcMessage(r)},t.prototype._success=function(n,t,i){var r={id:n.id,result:this._customSerializeObject([t],n.serializationSettings)[0],jsonrpc:"2.0",handshakeToken:i};this._sendRpcMessage(r)},t.prototype._sendRpcMessage=function(n){var t=JSON.stringify(n);this._postToWindow.postMessage(t,"*")},t.prototype._shouldSkipSerialization=function(n){for(var r,i=0,u=t.WINDOW_TYPES_TO_SKIP_SERIALIZATION.length;i<u;i++)if(r=t.WINDOW_TYPES_TO_SKIP_SERIALIZATION[i],window[r]&&n instanceof window[r])return!0;if(window.jQuery)for(i=0,u=t.JQUERY_TYPES_TO_SKIP_SERIALIZATION.length;i<u;i++)if(r=t.JQUERY_TYPES_TO_SKIP_SERIALIZATION[i],window.jQuery[r]&&n instanceof window.jQuery[r])return!0;return!1},t.prototype._customSerializeObject=function(n,i,r,u,f){var h=this,a,o,l,v,e,c,s;if((r===void 0&&(r=null),u===void 0&&(u=1),f===void 0&&(f=1),!n||f>t.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;e<c;e++)a(n,o,e);else{o={};r.newObjects.push(o);l={};try{for(s in n)l[s]=!0;for(v=Object.getOwnPropertyNames(n),e=0,c=v.length;e<c;e++)l[v[e]]=!0}catch(y){}for(s in l)(s&&s[0]!=="_"||i&&i.includeUnderscoreProperties)&&a(n,o,s)}return r.originalObjects.pop(),r.newObjects.pop(),o},t.prototype._registerProxyFunction=function(n,t){var i=this._nextProxyFunctionId++;return this._proxyFunctions["proxy"+i]=function(){return n.apply(t,Array.prototype.slice.call(arguments,0))},i},t.prototype._customDeserializeObject=function(n,t){var e=this,o=this,r,i,u,f;if(!n)return null;if(t||(t={}),r=function(n,i){var r=n[i],u=typeof r;i==="__circularReferenceId"&&u==="number"?(t[r]=n,delete n[i]):u==="object"&&r&&(r.__proxyFunctionId?n[i]=function(){return o.invokeRemoteMethod("proxy"+r.__proxyFunctionId,"__proxyFunctions",Array.prototype.slice.call(arguments,0),null,{includeUnderscoreProperties:!0})}:r.__proxyDate?n[i]=new Date(r.__proxyDate):r.__circularReference?n[i]=t[r.__circularReference]:e._customDeserializeObject(r,t))},n instanceof Array)for(i=0,u=n.length;i<u;i++)r(n,i);else if(typeof n=="object")for(f in n)r(n,f);return n},t._nextChannelId=1,t.MAX_XDM_DEPTH=100,t.WINDOW_TYPES_TO_SKIP_SERIALIZATION=["Node","Window","Event"],t.JQUERY_TYPES_TO_SKIP_SERIALIZATION=["jQuery"],t}();n.XDMChannel=r;e=function(){function n(){this._channels=[];this._subscribe(window)}return n.get=function(){return this._default||(this._default=new n),this._default},n.prototype.addChannel=function(n,t){var i=new r(n,t);return this._channels.push(i),i},n.prototype._handleMessageReceived=function(n){var i,e,r,t,u,f;if(typeof n.data=="string")try{t=JSON.parse(n.data)}catch(o){}if(t){for(u=!1,i=0,e=this._channels.length;i<e;i++)r=this._channels[i],r.owns(n.source,n.origin,t)&&(f=r,u=r.onMessage(t,n.origin)||u);!f||u||(window.console&&console.error("No handler found on any channel for message: "+JSON.stringify(t)),t.instanceId&&f.error(t,"The registered object "+t.instanceId+" could not be found."))}},n.prototype._subscribe=function(n){var t=this;n.addEventListener?n.addEventListener("message",function(n){t._handleMessageReceived(n)}):n.attachEvent("onmessage",function(n){t._handleMessageReceived(n)})},n}();n.XDMChannelManager=e})(XDM||(XDM={})),function(n){function at(){function r(){n||(n=setTimeout(function(){n=0;tt()},50))}var n,i=!1,t;try{i=typeof document.cookie=="string"}catch(f){}i||Object.defineProperty(Document.prototype,"cookie",{get:function(){return""},set:function(){}});t=!1;try{t=!!window.localStorage}catch(f){}t||(delete window.localStorage,u=new g(r),Object.defineProperty(window,"localStorage",{value:u}),delete window.sessionStorage,Object.defineProperty(window,"sessionStorage",{value:new g}))}function nt(f){r=f||{};e=r.usePlatformScripts;a=r.usePlatformStyles;window.setTimeout(function(){var f={notifyLoadSucceeded:!r.explicitNotifyLoaded,extensionReusedCallback:r.extensionReusedCallback,vssSDKVersion:n.VssSDKVersion};i.invokeRemoteMethod("initialHandshake","VSS.HostControl",[f]).then(function(n){var f,r,o,h,l,s,v,i;if(t=n.pageContext,b=t.webContext,k=n.initialConfig||{},d=n.contribution,c=n.extensionContext,n.sandboxedStorage){if(f=!1,u)if(n.sandboxedStorage.localStorage){for(r=n.sandboxedStorage.localStorage,o=0,h=Object.keys(u);o<h.length;o++)i=h[o],l=u.getItem(i),l!==r[i]&&(r[i]=l,f=!0);for(s=0,v=Object.keys(r);s<v.length;s++)i=v[s],u.setItem(i,r[i])}else u.length>0&&(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,i)}):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(){o||(o=document.getElementsByTagName("body").item(0));i.invokeRemoteMethod("resize","VSS.HostControl",[o.scrollWidth,o.scrollHeight])}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="2.2";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<i.length;t++)u=i[t],delete this[u];n()}}}},key:{get:function(){return function(n){return Object.keys(this)[n]}}},length:{get:function(){return Object.keys(this).length}}}),i}();if(!window.__vssNoSandboxShim)try{at()}catch(vt){window.console&&window.console.warn&&window.console.warn("Failed to shim support for sandboxed properties: "+vt.message+'. Set "window.__vssNoSandboxShim = true" in order to bypass the shim of sandboxed properties.')}(function(n){n.Dialog="ms.vss-web.dialog-service";n.Navigation="ms.vss-web.navigation-service";n.ExtensionData="ms.vss-web.data-service"})(yt=n.ServiceIds||(n.ServiceIds={}));n.init=nt;n.require=pt;n.ready=rt;n.notifyLoadSucceeded=wt;n.notifyLoadFailed=ut;n.getWebContext=ft;n.getConfiguration=bt;n.getExtensionContext=et;n.getContribution=kt;n.getService=dt;n.getServiceContribution=ot;n.getServiceContributions=gt;n.register=ni;n.getRegisteredObject=ti;n.getAccessToken=ii;n.getAppToken=ri;n.resize=ui}(VSS||(VSS={}));
var XDM,VSS;(function(n){function u(){return new o}function s(){return Math.floor(Math.random()*(f-t)+t).toString(36)+Math.floor(Math.random()*(f-t)+t).toString(36)}var i,r,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;i<r;i++)t[i](n)})}},n.prototype._reject=function(n){if(this._isRejected||this._isResolved||(this._isRejected=!0,this._rejectValue=n,this._rejectCallbacks.length===0&&window.console&&window.console.warn&&(console.warn("Rejected XDM promise with no reject callbacks"),n&&console.warn(n))),this._isRejected&&this._rejectCallbacks.length>0){var t=this._rejectCallbacks.splice(0);window.setTimeout(function(){for(var i=0,r=t.length;i<r;i++)t[i](n)})}},n}(),t=parseInt("10000000000",36),f=Number.MAX_SAFE_INTEGER||9007199254740991;i=function(){function n(){this._registeredObjects={}}return n.prototype.register=function(n,t){this._registeredObjects[n]=t},n.prototype.getInstance=function(n,t){var i=this._registeredObjects[n];return i?typeof i=="function"?i(t):i:null},n}();n.XDMObjectRegistry=i;n.globalObjectRegistry=new i;r=function(){function t(n,r){r===void 0&&(r=null);this._nextMessageId=1;this._deferreds={};this._nextProxyFunctionId=1;this._proxyFunctions={};this._postToWindow=n;this._targetOrigin=r;this._channelObjectRegistry=new i;this._channelId=t._nextChannelId++;this._targetOrigin||(this._handshakeToken=s())}return t.prototype.getObjectRegistry=function(){return this._channelObjectRegistry},t.prototype.invokeRemoteMethod=function(n,t,i,r,f){var e={id:this._nextMessageId++,methodName:n,instanceId:t,instanceContext:r,params:this._customSerializeObject(i,f),jsonrpc:"2.0",serializationSettings:f},o;return this._targetOrigin||(e.handshakeToken=this._handshakeToken),o=u(),this._deferreds[e.id]=o,this._sendRpcMessage(e),o.promise},t.prototype.getRemoteObjectProxy=function(n,t){return this.invokeRemoteMethod(null,n,null,t)},t.prototype.invokeMethod=function(n,t){var f=this,r,u,i;if(!t.methodName){this._success(t,n,t.handshakeToken);return}if(r=n[t.methodName],typeof r!="function"){this._error(t,new Error("RPC method not found: "+t.methodName),t.handshakeToken);return}try{u=[];t.params&&(u=this._customDeserializeObject(t.params));i=r.apply(n,u);i&&i.then&&typeof i.then=="function"?i.then(function(n){f._success(t,n,t.handshakeToken)},function(n){f._error(t,n,t.handshakeToken)}):this._success(t,i,t.handshakeToken)}catch(e){this._error(t,e,t.handshakeToken)}},t.prototype.getRegisteredObject=function(t,i){if(t==="__proxyFunctions")return this._proxyFunctions;var r=this._channelObjectRegistry.getInstance(t,i);return r||(r=n.globalObjectRegistry.getInstance(t,i)),r},t.prototype.onMessage=function(n){var u=this,t=n,i,r;if(t.instanceId){if(i=this.getRegisteredObject(t.instanceId,t.instanceContext),!i)return!1;typeof i.then=="function"?i.then(function(n){u.invokeMethod(n,t)},function(n){u._error(t,n,t.handshakeToken)}):this.invokeMethod(i,t)}else{if(r=this._deferreds[t.id],!r)return!1;t.error?r.reject(this._customDeserializeObject([t.error])[0]):r.resolve(this._customDeserializeObject([t.result])[0]);delete this._deferreds[t.id]}return!0},t.prototype.owns=function(n,t,i){var r=i;if(this._postToWindow===n){if(this._targetOrigin)return t?t.toLowerCase()==="null"||this._targetOrigin.toLowerCase().indexOf(t.toLowerCase())===0:!1;if(r.handshakeToken&&r.handshakeToken===this._handshakeToken)return this._targetOrigin=t,!0}return!1},t.prototype.error=function(n,t){var i=n;this._error(i,t,i.handshakeToken)},t.prototype._error=function(n,t,i){var r={id:n.id,error:this._customSerializeObject([t],n.serializationSettings)[0],jsonrpc:"2.0",handshakeToken:i};this._sendRpcMessage(r)},t.prototype._success=function(n,t,i){var r={id:n.id,result:this._customSerializeObject([t],n.serializationSettings)[0],jsonrpc:"2.0",handshakeToken:i};this._sendRpcMessage(r)},t.prototype._sendRpcMessage=function(n){var t=JSON.stringify(n);this._postToWindow.postMessage(t,"*")},t.prototype._shouldSkipSerialization=function(n){for(var r,i=0,u=t.WINDOW_TYPES_TO_SKIP_SERIALIZATION.length;i<u;i++)if(r=t.WINDOW_TYPES_TO_SKIP_SERIALIZATION[i],window[r]&&n instanceof window[r])return!0;if(window.jQuery)for(i=0,u=t.JQUERY_TYPES_TO_SKIP_SERIALIZATION.length;i<u;i++)if(r=t.JQUERY_TYPES_TO_SKIP_SERIALIZATION[i],window.jQuery[r]&&n instanceof window.jQuery[r])return!0;return!1},t.prototype._customSerializeObject=function(n,i,r,u,f){var h=this,a,o,l,v,e,c,s;if((r===void 0&&(r=null),u===void 0&&(u=1),f===void 0&&(f=1),!n||f>t.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;e<c;e++)a(n,o,e);else{o={};r.newObjects.push(o);l={};try{for(s in n)l[s]=!0;for(v=Object.getOwnPropertyNames(n),e=0,c=v.length;e<c;e++)l[v[e]]=!0}catch(y){}for(s in l)(s&&s[0]!=="_"||i&&i.includeUnderscoreProperties)&&a(n,o,s)}return r.originalObjects.pop(),r.newObjects.pop(),o},t.prototype._registerProxyFunction=function(n,t){var i=this._nextProxyFunctionId++;return this._proxyFunctions["proxy"+i]=function(){return n.apply(t,Array.prototype.slice.call(arguments,0))},i},t.prototype._customDeserializeObject=function(n,t){var e=this,o=this,r,i,u,f;if(!n)return null;if(t||(t={}),r=function(n,i){var r=n[i],u=typeof r;i==="__circularReferenceId"&&u==="number"?(t[r]=n,delete n[i]):u==="object"&&r&&(r.__proxyFunctionId?n[i]=function(){return o.invokeRemoteMethod("proxy"+r.__proxyFunctionId,"__proxyFunctions",Array.prototype.slice.call(arguments,0),null,{includeUnderscoreProperties:!0})}:r.__proxyDate?n[i]=new Date(r.__proxyDate):r.__circularReference?n[i]=t[r.__circularReference]:e._customDeserializeObject(r,t))},n instanceof Array)for(i=0,u=n.length;i<u;i++)r(n,i);else if(typeof n=="object")for(f in n)r(n,f);return n},t._nextChannelId=1,t.MAX_XDM_DEPTH=100,t.WINDOW_TYPES_TO_SKIP_SERIALIZATION=["Node","Window","Event"],t.JQUERY_TYPES_TO_SKIP_SERIALIZATION=["jQuery"],t}();n.XDMChannel=r;e=function(){function n(){this._channels=[];this._subscribe(window)}return n.get=function(){return this._default||(this._default=new n),this._default},n.prototype.addChannel=function(n,t){var i=new r(n,t);return this._channels.push(i),i},n.prototype._handleMessageReceived=function(n){var i,e,r,t,u,f;if(typeof n.data=="string")try{t=JSON.parse(n.data)}catch(o){}if(t){for(u=!1,i=0,e=this._channels.length;i<e;i++)r=this._channels[i],r.owns(n.source,n.origin,t)&&(f=r,u=r.onMessage(t,n.origin)||u);!f||u||(window.console&&console.error("No handler found on any channel for message: "+JSON.stringify(t)),t.instanceId&&f.error(t,"The registered object "+t.instanceId+" could not be found."))}},n.prototype._subscribe=function(n){var t=this;n.addEventListener?n.addEventListener("message",function(n){t._handleMessageReceived(n)}):n.attachEvent("onmessage",function(n){t._handleMessageReceived(n)})},n}();n.XDMChannelManager=e})(XDM||(XDM={})),function(n){function at(){function r(){n||(n=setTimeout(function(){n=0;tt()},50))}var n,i=!1,t;try{i=typeof document.cookie=="string"}catch(f){}i||Object.defineProperty(Document.prototype,"cookie",{get:function(){return""},set:function(){}});t=!1;try{t=!!window.localStorage}catch(f){}t||(delete window.localStorage,u=new g(r),Object.defineProperty(window,"localStorage",{value:u}),delete window.sessionStorage,Object.defineProperty(window,"sessionStorage",{value:new g}))}function nt(f){r=f||{};e=r.usePlatformScripts;a=r.usePlatformStyles;window.setTimeout(function(){var f={notifyLoadSucceeded:!r.explicitNotifyLoaded,extensionReusedCallback:r.extensionReusedCallback,vssSDKVersion:n.VssSDKVersion};i.invokeRemoteMethod("initialHandshake","VSS.HostControl",[f]).then(function(n){var f,r,o,h,l,s,v,i;if(t=n.pageContext,b=t.webContext,k=n.initialConfig||{},d=n.contribution,c=n.extensionContext,n.sandboxedStorage){if(f=!1,u)if(n.sandboxedStorage.localStorage){for(r=n.sandboxedStorage.localStorage,o=0,h=Object.keys(u);o<h.length;o++)i=h[o],l=u.getItem(i),l!==r[i]&&(r[i]=l,f=!0);for(s=0,v=Object.keys(r);s<v.length;s++)i=v[s],u.setItem(i,r[i])}else u.length>0&&(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="2.3";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<i.length;t++)u=i[t],delete this[u];n()}}}},key:{get:function(){return function(n){return Object.keys(this)[n]}}},length:{get:function(){return Object.keys(this).length}}}),i}();if(!window.__vssNoSandboxShim)try{at()}catch(vt){window.console&&window.console.warn&&window.console.warn("Failed to shim support for sandboxed properties: "+vt.message+'. Set "window.__vssNoSandboxShim = true" in order to bypass the shim of sandboxed properties.')}(function(n){n.Dialog="ms.vss-web.dialog-service";n.Navigation="ms.vss-web.navigation-service";n.ExtensionData="ms.vss-web.data-service"})(yt=n.ServiceIds||(n.ServiceIds={}));n.init=nt;n.require=pt;n.ready=rt;n.notifyLoadSucceeded=wt;n.notifyLoadFailed=ut;n.getWebContext=ft;n.getConfiguration=bt;n.getExtensionContext=et;n.getContribution=kt;n.getService=dt;n.getServiceContribution=ot;n.getServiceContributions=gt;n.register=ni;n.getRegisteredObject=ti;n.getAccessToken=ii;n.getAppToken=ri;n.resize=ui}(VSS||(VSS={}));
{
"name": "vss-web-extension-sdk",
"version": "1.102.0",
"version": "1.104.0",
"description": "Visual Studio Services Client SDK. JavaScript library for Visual Studio Online extensions.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -22,3 +22,3 @@ # Visual Studio Services Web Extension SDK

```html
<script src="bower_components/vss-sdk/lib/VSS.SDK.min.js"></script>
<script src="bower_components/vss-web-extension-sdk/lib/VSS.SDK.min.js"></script>
```

@@ -87,3 +87,3 @@

1. First, make sure that the dependencies are loaded using below command:
* `tsd install jquery knockout q --save`
* `tsd install jquery knockout q require --save`

@@ -90,0 +90,0 @@ 2. Next, run below command to get vss-web-extension-sdk types added to tsd.d.ts:

@@ -1,2 +0,2 @@

// Type definitions for Microsoft Visual Studio Services v102.20160718.1146
// Type definitions for Microsoft Visual Studio Services v104.20160831.1112
// Project: https://www.visualstudio.com/integrate/extensions/overview

@@ -18,2 +18,8 @@ // Definitions by: Microsoft <vsointegration@microsoft.com>

var LocalPathId: string;
var ArtifactId: string;
var ItemPath: string;
var Version: string;
var ArtifactSourceVersionUrl: string;
var ArtifactSourceDefinitionUrl: string;
var ArtifactItems: string;
}

@@ -39,2 +45,6 @@ export module ArtifactTypes {

}
export module WellKnownExtendedReleaseVariables {
var ReleaseArtifacts: string;
var ReleaseEnvironments: string;
}
export module WellKnownReleaseVariables {

@@ -65,2 +75,3 @@ var System: string;

var ReleaseEnvironmentName: string;
var ReleaseDeployPhaseId: string;
var RequestorId: string;

@@ -115,2 +126,12 @@ var ReleaseRequestedForId: string;

}
export interface AgentBasedDeployPhase extends DeployPhase {
deploymentInput: AgentDeploymentInput;
}
export interface AgentDeploymentInput extends BaseDeploymentInput {
demands: any[];
enableAccessToken: boolean;
queueId: number;
skipArtifactsDownload: boolean;
timeoutInMinutes: number;
}
export interface ApprovalOptions {

@@ -144,2 +165,18 @@ releaseCreatorCanBeApprover: boolean;

}
export interface ArtifactContributionDefinition {
artifactType: string;
artifactTypeStreamMapping: {
[key: string]: string;
};
browsableArtifactTypeMapping: {
[key: string]: string;
};
dataSourceBindings: DataSourceBinding[];
displayName: string;
downloadTaskId: string;
endpointTypeId: string;
inputDescriptors: VSS_FormInput_Contracts.InputDescriptor[];
name: string;
uniqueSourceIdentifier: string;
}
export interface ArtifactInstanceData {

@@ -198,2 +235,4 @@ accountName: string;

}
export interface BaseDeploymentInput {
}
export interface BuildVersion {

@@ -255,2 +294,19 @@ id: string;

}
export interface ControlOptions {
alwaysRun: boolean;
continueOnError: boolean;
enabled: boolean;
}
export interface DataSourceBinding {
dataSourceName: string;
endpointId: string;
endpointUrl: string;
parameters: {
[key: string]: string;
};
resultSelector: string;
resultTemplate: string;
target: string;
transformationTemplate: string;
}
export interface DeploymentApprovalCompletedEvent {

@@ -268,2 +324,3 @@ approval: ReleaseApproval;

attempt: number;
deploymentId: number;
/**

@@ -279,3 +336,11 @@ * Error log to show any unexpected error that occurred during executing deploy step

job: ReleaseTask;
lastModifiedBy: VSS_Common_Contracts.IdentityRef;
lastModifiedOn: Date;
operationStatus: DeploymentOperationStatus;
queuedOn: Date;
reason: DeploymentReason;
releaseDeployPhases: ReleaseDeployPhase[];
requestedBy: VSS_Common_Contracts.IdentityRef;
runPlanId: string;
status: DeploymentStatus;
tasks: ReleaseTask[];

@@ -287,2 +352,28 @@ }

}
export interface DeploymentJob {
job: ReleaseTask;
tasks: ReleaseTask[];
}
export enum DeploymentOperationStatus {
Undefined = 0,
Queued = 1,
Scheduled = 2,
Pending = 4,
Approved = 8,
Rejected = 16,
Deferred = 32,
QueuedForAgent = 64,
PhaseInProgress = 128,
PhaseSucceeded = 256,
PhasePartiallySucceeded = 512,
PhaseFailed = 1024,
Canceled = 2048,
PhaseCanceled = 4096,
}
export enum DeploymentReason {
None = 0,
Manual = 1,
Automated = 2,
Scheduled = 4,
}
export interface DeploymentStartedEvent {

@@ -292,2 +383,33 @@ environment: ReleaseEnvironment;

}
export enum DeploymentStatus {
Undefined = 0,
NotDeployed = 1,
InProgress = 2,
Succeeded = 4,
PartiallySucceeded = 8,
Failed = 16,
}
export interface DeployPhase {
controlOptions: ControlOptions;
name: string;
phaseType: DeployPhaseTypes;
rank: number;
workflowTasks: WorkflowTask[];
}
export enum DeployPhaseStatus {
Undefined = 0,
NotStarted = 1,
InProgress = 2,
PartiallySucceeded = 4,
Succeeded = 8,
Failed = 16,
Canceled = 32,
Skipped = 64,
}
export enum DeployPhaseTypes {
Undefined = 0,
AgentBasedDeployment = 1,
RunOnServer = 2,
MachineGroupBasedDeployment = 4,
}
export interface EmailRecipients {

@@ -337,2 +459,8 @@ emailAddresses: string[];

}
export interface MachineGroupBasedDeployPhase extends DeployPhase {
deploymentInput: MachineGroupDeploymentInput;
}
export interface MachineGroupDeploymentInput extends AgentDeploymentInput {
healthPercent: number;
}
export interface MailMessage {

@@ -358,2 +486,27 @@ body: string;

}
export interface ManualIntervention {
approver: VSS_Common_Contracts.IdentityRef;
comments: string;
createdOn: Date;
id: number;
instructions: string;
modifiedOn: Date;
release: ShallowReference;
releaseDefinition: ShallowReference;
releaseEnvironment: ShallowReference;
status: ManualInterventionStatus;
taskInstanceId: string;
url: string;
}
export enum ManualInterventionStatus {
Unknown = 0,
Pending = 1,
Rejected = 2,
Approved = 4,
Canceled = 8,
}
export interface ManualInterventionUpdateMetadata {
comment: string;
status: ManualInterventionStatus;
}
export interface MappingDetails {

@@ -381,2 +534,3 @@ mappings: {

export interface Release {
_links: any;
artifacts: Artifact[];

@@ -464,2 +618,3 @@ comment: string;

export interface ReleaseDefinition {
_links: any;
artifacts: Artifact[];

@@ -502,2 +657,3 @@ comment: string;

demands: any[];
deployPhases: DeployPhase[];
deployStep: ReleaseDefinitionDeployStep;

@@ -559,2 +715,12 @@ environmentOptions: EnvironmentOptions;

}
export interface ReleaseDeployPhase {
deploymentJobs: DeploymentJob[];
errorLog: string;
id: number;
manualInterventions: ManualIntervention[];
phaseType: DeployPhaseTypes;
rank: number;
runPlanId: string;
status: DeployPhaseStatus;
}
export interface ReleaseEnvironment {

@@ -565,2 +731,3 @@ conditions: Condition[];

demands: any[];
deployPhasesSnapshot: DeployPhase[];
deploySteps: DeploymentAttempt[];

@@ -598,2 +765,3 @@ environmentOptions: EnvironmentOptions;

export interface ReleaseEnvironmentCompletedEvent {
conditions: Condition[];
createdByName: string;

@@ -605,2 +773,3 @@ definitionId: number;

projectName: string;
reason: DeploymentReason;
releaseCreatedBy: VSS_Common_Contracts.IdentityRef;

@@ -623,2 +792,3 @@ releaseLogsUri: string;

Approvals = 8,
ManualInterventions = 16,
}

@@ -731,2 +901,4 @@ export enum ReleaseQueryOrder {

}
export interface RunOnServerDeployPhase extends DeployPhase {
}
export enum ScheduleDays {

@@ -818,2 +990,3 @@ None = 0,

};
AgentBasedDeployPhase: any;
ApprovalStatus: {

@@ -838,2 +1011,3 @@ enumValues: {

};
ArtifactContributionDefinition: any;
ArtifactSourceTrigger: any;

@@ -861,3 +1035,61 @@ ArtifactTypeDefinition: any;

DeploymentCompletedEvent: any;
DeploymentJob: any;
DeploymentOperationStatus: {
enumValues: {
"undefined": number;
"queued": number;
"scheduled": number;
"pending": number;
"approved": number;
"rejected": number;
"deferred": number;
"queuedForAgent": number;
"phaseInProgress": number;
"phaseSucceeded": number;
"phasePartiallySucceeded": number;
"phaseFailed": number;
"canceled": number;
"phaseCanceled": number;
};
};
DeploymentReason: {
enumValues: {
"none": number;
"manual": number;
"automated": number;
"scheduled": number;
};
};
DeploymentStartedEvent: any;
DeploymentStatus: {
enumValues: {
"undefined": number;
"notDeployed": number;
"inProgress": number;
"succeeded": number;
"partiallySucceeded": number;
"failed": number;
};
};
DeployPhase: any;
DeployPhaseStatus: {
enumValues: {
"undefined": number;
"notStarted": number;
"inProgress": number;
"partiallySucceeded": number;
"succeeded": number;
"failed": number;
"canceled": number;
"skipped": number;
};
};
DeployPhaseTypes: {
enumValues: {
"undefined": number;
"agentBasedDeployment": number;
"runOnServer": number;
"machineGroupBasedDeployment": number;
};
};
EnvironmentStatus: {

@@ -876,2 +1108,3 @@ enumValues: {

};
MachineGroupBasedDeployPhase: any;
MailMessage: any;

@@ -888,2 +1121,13 @@ MailSectionType: {

};
ManualIntervention: any;
ManualInterventionStatus: {
enumValues: {
"unknown": number;
"pending": number;
"rejected": number;
"approved": number;
"canceled": number;
};
};
ManualInterventionUpdateMetadata: any;
PropertySelector: any;

@@ -915,2 +1159,3 @@ PropertySelectorType: {

ReleaseDefinitionSummary: any;
ReleaseDeployPhase: any;
ReleaseEnvironment: any;

@@ -925,2 +1170,3 @@ ReleaseEnvironmentCompletedEvent: any;

"approvals": number;
"manualInterventions": number;
};

@@ -965,2 +1211,3 @@ };

ReleaseUpdateMetadata: any;
RunOnServerDeployPhase: any;
ScheduleDays: {

@@ -1060,3 +1307,37 @@ enumValues: {

}
export interface IDeploymentWidgetDataExtension {
/**
* Deployment widget will call this function whenever it tries to render/refresh the widget view.
* As the amount of data being fetched is too huge, we need to batch it.
* Calling triggerFetchData will only start the process of fetching required data in batches.
* The extension will be calling updateContributionData as and when it has finished fetching results for one of the batches.
*/
triggerFetchingContributionData: (releaseEnvironments: {
releaseId: number;
environmentId: number;
}[]) => void;
}
export interface IDeploymentWidgetDataExtensionConfig {
/**
* The extension will be calling this as and when it has finished fetching results for one of the batches.
*/
updateContributionData: (overlayData: IDeploymentWidgetOverlayData[]) => void;
}
/**
* releaseEnvironmentReference -> release and environment to which the test results belong to.
* data: Contains value of the overlay metric
* toolTipData: KeyValuePair -> These details will be added to the tool-tip shown on hover
* targetUrl: The url to navigate to on clicking the overlayData.
*/
export interface IDeploymentWidgetOverlayData {
releaseEnvironmentReference: IReleaseEnvironmentReference;
data: string;
targetUrl: string;
toolTipData: string[];
}
export interface IReleaseEnvironmentReference {
releaseId: number;
environmentId: number;
}
}
declare module "ReleaseManagement/Core/RestClient" {

@@ -1090,3 +1371,3 @@ import Contracts = require("ReleaseManagement/Core/Contracts");

protected logsApiVersion: string;
protected logsApiVersion_c37fbab5: string;
protected logsApiVersion_e71ba1ed: string;
protected releasesApiVersion: string;

@@ -1165,6 +1446,5 @@ protected revisionsApiVersion: string;

* @param {number} definitionId
* @param {number} revision
* @return IPromise<string>
* @return IPromise<Contracts.ReleaseDefinitionRevision[]>
*/
getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): IPromise<string>;
getReleaseDefinitionHistory(project: string, definitionId: number): IPromise<Contracts.ReleaseDefinitionRevision[]>;
/**

@@ -1175,5 +1455,6 @@ * [Preview API]

* @param {number} definitionId
* @return IPromise<Contracts.ReleaseDefinitionRevision[]>
* @param {number} revision
* @return IPromise<string>
*/
getReleaseDefinitionHistory(project: string, definitionId: number): IPromise<Contracts.ReleaseDefinitionRevision[]>;
getDefinitionRevision(project: string, definitionId: number, revision: number): IPromise<string>;
/**

@@ -1217,5 +1498,6 @@ * [Preview API]

* @param {string} sourceBranchFilter
* @param {boolean} isDeleted
* @return IPromise<Contracts.Release[]>
*/
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): IPromise<Contracts.Release[]>;
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<Contracts.Release[]>;
/**

@@ -1254,5 +1536,6 @@ * [Preview API]

* @param {number} releaseId
* @param {string} comment
* @return IPromise<void>
*/
deleteRelease(project: string, releaseId: number): IPromise<void>;
deleteRelease(project: string, releaseId: number, comment?: string): IPromise<void>;
/**

@@ -1271,8 +1554,5 @@ * [Preview API]

* @param {number} releaseId
* @param {number} environmentId
* @param {number} taskId
* @param {number} attemptId
* @return IPromise<string>
* @return IPromise<ArrayBuffer>
*/
getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): IPromise<string>;
getLogs(project: string, releaseId: number): IPromise<ArrayBuffer>;
/**

@@ -1283,5 +1563,8 @@ * [Preview API]

* @param {number} releaseId
* @return IPromise<ArrayBuffer>
* @param {number} environmentId
* @param {number} taskId
* @param {number} attemptId
* @return IPromise<string>
*/
getLogs(project: string, releaseId: number): IPromise<ArrayBuffer>;
getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): IPromise<string>;
/**

@@ -1385,2 +1668,11 @@ * [Preview API]

* @param {number} definitionId
* @param {number} revision
* @return IPromise<string>
*/
getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): IPromise<string>;
/**
* [Preview API]
*
* @param {string} project - Project ID or project name
* @param {number} definitionId
* @return IPromise<Contracts.ReleaseDefinition>

@@ -1466,2 +1758,49 @@ */

* @param {string} project - Project ID or project name
* @param {number} releaseId
* @param {number} environmentId
* @param {number} releaseDeployPhaseId
* @param {number} taskId
* @return IPromise<string>
*/
getTaskLog(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number, taskId: number): IPromise<string>;
/**
* [Preview API]
*
* @param {string} project - Project ID or project name
* @param {number} releaseId
* @param {number} manualInterventionId
* @return IPromise<Contracts.ManualIntervention>
*/
getManualIntervention(project: string, releaseId: number, manualInterventionId: number): IPromise<Contracts.ManualIntervention>;
/**
* [Preview API]
*
* @param {string} project - Project ID or project name
* @param {number} releaseId
* @return IPromise<Contracts.ManualIntervention[]>
*/
getManualInterventions(project: string, releaseId: number): IPromise<Contracts.ManualIntervention[]>;
/**
* [Preview API]
*
* @param {Contracts.ManualInterventionUpdateMetadata} manualInterventionUpdateMetadata
* @param {string} project - Project ID or project name
* @param {number} releaseId
* @param {number} manualInterventionId
* @return IPromise<Contracts.ManualIntervention>
*/
updateManualIntervention(manualInterventionUpdateMetadata: Contracts.ManualInterventionUpdateMetadata, project: string, releaseId: number, manualInterventionId: number): IPromise<Contracts.ManualIntervention>;
/**
* [Preview API]
*
* @param {string} project - Project ID or project name
* @param {number} releaseId
* @param {string} comment
* @return IPromise<void>
*/
undeleteRelease(project: string, releaseId: number, comment: string): IPromise<void>;
/**
* [Preview API]
*
* @param {string} project - Project ID or project name
* @param {number} definitionId

@@ -1471,2 +1810,12 @@ * @return IPromise<string[]>

getSourceBranches(project: string, definitionId: number): IPromise<string[]>;
/**
* [Preview API]
*
* @param {string} project - Project ID or project name
* @param {number} releaseId
* @param {number} environmentId
* @param {number} releaseDeployPhaseId
* @return IPromise<Contracts.ReleaseTask[]>
*/
getTasksForTaskGroup(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number): IPromise<Contracts.ReleaseTask[]>;
}

@@ -1473,0 +1822,0 @@ /**

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc