Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

azure-devops-extension-api

Package Overview
Dependencies
Maintainers
0
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-devops-extension-api - npm Package Compare versions

Comparing version 4.242.0 to 4.243.0

5

Alert/Alert.d.ts

@@ -759,2 +759,3 @@ import * as WebApi from "../WebApi/WebApi";

nodePointer: string;
ruleId: string;
validationError: string;

@@ -796,5 +797,5 @@ }

/**
* If true, only return alerts found on the default branch of the repository. \<br /\>If there have been no runs completed on the default branch, the last run is used instead regardless of the branch used for that run. \<br /\>This option is ignored if ref is provided.
* If true or not set, only return alerts found on the default branch of the repository. \<br /\>If there have been no runs completed on the default branch, the last run is used instead regardless of the branch used for that run. If false, return alerts from all branches. \<br /\>This option is ignored if ref is provided.
*/
onlyDefaultBranchAlerts: boolean;
onlyDefaultBranch: boolean;
/**

@@ -801,0 +802,0 @@ * If provided with pipelineName, only return alerts detected in this pipeline phase \<br /\>Otherwise, return alerts detected in all phases.

@@ -74,4 +74,16 @@ import { IVssRestClientOptions } from "../Common/Context";

/**
* Returns the branches for which analysis results were submitted.
*
* @param project - Project ID or project name
* @param repository -
* @param alertType - The type of alert: Dependency Scanning (1), Secret (2), Code QL (3), etc.
* @param continuationToken - A string variable that represents the branch name and is used to fetch branches that follow it in alphabetical order.
* @param branchNameContains - A string variable used to fetch branches that contain this string anywhere in the branch name, case insensitive.
* @param top - An int variable used to return the top k branches that satisfy the search criteria.
* @param includePullRequestBranches - A bool variable indicating whether or not to include pull request branches.
*/
getBranches(project: string, repository: string, alertType: Alert.AlertType, continuationToken?: string, branchNameContains?: string, top?: number, includePullRequestBranches?: boolean): Promise<Alert.Branch[]>;
/**
* @param project - Project ID or project name
* @param repository -
* @param alertType -

@@ -78,0 +90,0 @@ */

40

Alert/AlertClient.js

@@ -269,4 +269,39 @@ /*

/**
* Returns the branches for which analysis results were submitted.
*
* @param project - Project ID or project name
* @param repository -
* @param alertType - The type of alert: Dependency Scanning (1), Secret (2), Code QL (3), etc.
* @param continuationToken - A string variable that represents the branch name and is used to fetch branches that follow it in alphabetical order.
* @param branchNameContains - A string variable used to fetch branches that contain this string anywhere in the branch name, case insensitive.
* @param top - An int variable used to return the top k branches that satisfy the search criteria.
* @param includePullRequestBranches - A bool variable indicating whether or not to include pull request branches.
*/
AlertRestClient.prototype.getBranches = function (project, repository, alertType, continuationToken, branchNameContains, top, includePullRequestBranches) {
return __awaiter(this, void 0, void 0, function () {
var queryValues;
return __generator(this, function (_a) {
queryValues = {
alertType: alertType,
continuationToken: continuationToken,
branchNameContains: branchNameContains,
top: top,
includePullRequestBranches: includePullRequestBranches
};
return [2 /*return*/, this.beginRequest({
apiVersion: "7.2-preview.1",
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/filters/{action}",
routeValues: {
project: project,
repository: repository,
action: "Branches"
},
queryParams: queryValues
})];
});
});
};
/**
* @param project - Project ID or project name
* @param repository -
* @param alertType -

@@ -283,6 +318,7 @@ */

apiVersion: "7.2-preview.1",
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/filters",
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/filters/{action}",
routeValues: {
project: project,
repository: repository
repository: repository,
action: "Default"
},

@@ -289,0 +325,0 @@ queryParams: queryValues

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

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{u(o.next(e))}catch(e){n(e)}}function s(e){try{u(o.throw(e))}catch(e){n(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(n=2&r[0]?i.return:r[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,r[1])).done)return n;switch(i=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){s.label=r[1];break}if(6===r[0]&&s.label<n[1]){s.label=n[1],n=r;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(r);break}n[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],i=0}finally{o=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var o,i,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAlert=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.getAlerts=function(e,t,r,i,n,a){return __awaiter(this,void 0,void 0,function(){var s,u=this;return __generator(this,function(p){return s={top:r,orderBy:i,criteria:n,continuationToken:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(u,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(o.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getAlertSarif=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.updateAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:t,alertId:r,repository:o},body:e})]})})},t.prototype.getAlertInstances=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.updateAlertsMetadata=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.uploadSarif=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/sarifs",routeValues:{project:t,repository:r},customHeaders:{"Content-Type":"application/octet-stream","X-AdvSec-NotificationSarif":o},body:e})]})})},t.prototype.getUxFilters=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={alertType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters",routeValues:{project:e,repository:t},queryParams:o})]})})},t.prototype.getSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})]})})},t}(r.RestClientBase);t.AlertRestClient=i});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{u(o.next(e))}catch(e){n(e)}}function s(e){try{u(o.throw(e))}catch(e){n(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(n=2&r[0]?i.return:r[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,r[1])).done)return n;switch(i=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){s.label=r[1];break}if(6===r[0]&&s.label<n[1]){s.label=n[1],n=r;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(r);break}n[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],i=0}finally{o=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var o,i,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAlert=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.getAlerts=function(e,t,r,i,n,a){return __awaiter(this,void 0,void 0,function(){var s,u=this;return __generator(this,function(p){return s={top:r,orderBy:i,criteria:n,continuationToken:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(u,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(o.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getAlertSarif=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.updateAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:t,alertId:r,repository:o},body:e})]})})},t.prototype.getAlertInstances=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.updateAlertsMetadata=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.uploadSarif=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/sarifs",routeValues:{project:t,repository:r},customHeaders:{"Content-Type":"application/octet-stream","X-AdvSec-NotificationSarif":o},body:e})]})})},t.prototype.getBranches=function(e,t,r,o,i,n,a){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={alertType:r,continuationToken:o,branchNameContains:i,top:n,includePullRequestBranches:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Branches"},queryParams:s})]})})},t.prototype.getUxFilters=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={alertType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Default"},queryParams:o})]})})},t.prototype.getSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})]})})},t}(r.RestClientBase);t.AlertRestClient=i});

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

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(o,n){function u(e){try{s(r.next(e))}catch(e){n(e)}}function a(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}var r,o,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createArtifact=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.5",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:t,buildId:i},body:e})]})})},t.prototype.getArtifact=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={artifactName:i},[2,this.beginRequest({apiVersion:"7.2-preview.5",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getArtifactContentZip=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={artifactName:i},[2,this.beginRequest({apiVersion:"7.2-preview.5",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getArtifacts=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.5",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getFile=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={artifactName:i,fileId:r,fileName:o},[2,this.beginRequest({apiVersion:"7.2-preview.5",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:e,buildId:t},queryParams:n})]})})},t.prototype.getAttachments=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/attachments/{type}",routeValues:{project:e,buildId:t,type:i}})]})})},t.prototype.getAttachment=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/build/builds/{buildId}/{timelineId}/{recordId}/attachments/{type}/{name}",routeValues:{project:e,buildId:t,timelineId:i,recordId:r,type:o,name:n}})]})})},t.prototype.authorizeProjectResources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/authorizedresources",routeValues:{project:t},body:e})]})})},t.prototype.getProjectResources=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:t,id:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/authorizedresources",routeValues:{project:e},queryParams:r})]})})},t.prototype.getBadge=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={branchName:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/public/build/definitions/{project}/{definitionId}/badge",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.listBranches=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={serviceEndpointId:i,repository:r,branchName:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/branches",routeValues:{project:e,providerName:t},queryParams:n})]})})},t.prototype.getBuildBadge=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={repoId:i,branchName:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/repos/{repoType}/badge",routeValues:{project:e,repoType:t},queryParams:o})]})})},t.prototype.getBuildBadgeData=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={repoId:i,branchName:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/repos/{repoType}/badge",routeValues:{project:e,repoType:t},queryParams:o})]})})},t.prototype.getRetentionLeasesForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/builds/{buildId}/leases",routeValues:{project:e,buildId:t}})]})})},t.prototype.deleteBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"DELETE",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuild=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={propertyFilters:i},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuilds=function(e,t,i,o,n,u,a,s,p,d,c,l,_,f,h,v,g,b,m,y,w){return __awaiter(this,void 0,void 0,function(){var j,V=this;return __generator(this,function(T){return j={definitions:t&&t.join(","),queues:i&&i.join(","),buildNumber:o,minTime:n,maxTime:u,requestedFor:a,reasonFilter:s,statusFilter:p,resultFilter:d,tagFilters:c&&c.join(","),properties:l&&l.join(","),$top:_,continuationToken:f,maxBuildsPerDefinition:h,deletedFilter:v,queryOrder:g,branchName:b,buildIds:m&&m.join(","),repositoryId:y,repositoryType:w},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:e},queryParams:j,returnRawResponse:!0}).then(function(e){return __awaiter(V,void 0,void 0,function(){var t;return __generator(this,function(i){switch(i.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=i.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.queueBuild=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={ignoreWarnings:i,checkInTicket:r,sourceBuildId:o,definitionId:n},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t},queryParams:u,body:e})]})})},t.prototype.updateBuild=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={retry:r},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t,buildId:i},queryParams:o,body:e})]})})},t.prototype.updateBuilds=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t},body:e})]})})},t.prototype.getBuildChanges=function(e,t,i,o,n){return __awaiter(this,void 0,void 0,function(){var u,a=this;return __generator(this,function(s){return u={continuationToken:i,$top:o,includeSourceChange:n},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/changes",routeValues:{project:e,buildId:t},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(i){switch(i.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=i.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getChangesBetweenBuilds=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fromBuildId:t,toBuildId:i,$top:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/changes",routeValues:{project:e},queryParams:o})]})})},t.prototype.getBuildController=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/build/Controllers/{controllerId}",routeValues:{controllerId:e}})]})})},t.prototype.getBuildControllers=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(i){return t={name:e},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/build/Controllers/{controllerId}",queryParams:t})]})})},t.prototype.createDefinition=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={definitionToCloneId:i,definitionToCloneRevision:r},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"POST",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t},queryParams:o,body:e})]})})},t.prototype.deleteDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getDefinition=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={revision:i,minMetricsTime:r,propertyFilters:o&&o.join(","),includeLatestBuilds:n},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:u})]})})},t.prototype.getDefinitions=function(e,t,i,o,n,u,a,s,p,d,c,l,_,f,h,v,g){return __awaiter(this,void 0,void 0,function(){var b,m=this;return __generator(this,function(y){return b={name:t,repositoryId:i,repositoryType:o,queryOrder:n,$top:u,continuationToken:a,minMetricsTime:s,definitionIds:p&&p.join(","),path:d,builtAfter:c,notBuiltAfter:l,includeAllProperties:_,includeLatestBuilds:f,taskIdFilter:h,processType:v,yamlFilename:g},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e},queryParams:b,returnRawResponse:!0}).then(function(e){return __awaiter(m,void 0,void 0,function(){var t;return __generator(this,function(i){switch(i.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=i.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.restoreDefinition=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={deleted:i},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.updateDefinition=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={secretsSourceDefinitionId:r,secretsSourceDefinitionRevision:o},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t,definitionId:i},queryParams:n,body:e})]})})},t.prototype.getFileContents=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={serviceEndpointId:i,repository:r,commitOrBranch:o,path:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/fileContents",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.createFolder=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={path:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PUT",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.deleteFolder=function(e,t){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={path:t},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getFolders=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={queryOrder:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:e,path:t},queryParams:r})]})})},t.prototype.updateFolder=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={path:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.getBuildGeneralSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/generalSettings",routeValues:{project:e}})]})})},t.prototype.updateBuildGeneralSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/generalSettings",routeValues:{project:t},body:e})]})})},t.prototype.getRetentionHistory=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(i){return t={daysToLookback:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/build/retention/history",queryParams:t})]})})},t.prototype.getLatestBuild=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={branchName:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/latest/{*definition}",routeValues:{project:e,definition:t},queryParams:r})]})})},t.prototype.addRetentionLeases=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteRetentionLeasesById=function(e,t){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={ids:t&&t.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getRetentionLease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e,leaseId:t}})]})})},t.prototype.getRetentionLeasesByMinimalRetentionLeases=function(e,t){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={leasesToFetch:t&&t.join("|")},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getRetentionLeasesByOwnerId=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={ownerId:t,definitionId:i,runId:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getRetentionLeasesByUserId=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={userOwnerId:t,definitionId:i,runId:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.updateRetentionLease=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:t,leaseId:i},body:e})]})})},t.prototype.getBuildLog=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getBuildLogLines=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getBuildLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuildLogsZip=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuildLogZip=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getProjectMetrics=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={minMetricsTime:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/Metrics/{metricAggregationType}",routeValues:{project:e,metricAggregationType:t},queryParams:r})]})})},t.prototype.getDefinitionMetrics=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={minMetricsTime:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/Metrics",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.getBuildOptionDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/options",routeValues:{project:e}})]})})},t.prototype.getPathContents=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={serviceEndpointId:i,repository:r,commitOrBranch:o,path:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/pathContents",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.getBuildProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={filter:i&&i.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/builds/{buildId}/properties",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.updateBuildProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}/properties",routeValues:{project:t,buildId:i},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getDefinitionProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={filter:i&&i.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/properties",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.updateDefinitionProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/properties",routeValues:{project:t,definitionId:i},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getPullRequest=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={repositoryId:r,serviceEndpointId:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/pullRequests/{pullRequestId}",routeValues:{project:e,providerName:t,pullRequestId:i},queryParams:n})]})})},t.prototype.getBuildReport=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/report",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuildReportHtmlContent=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/html",routeTemplate:"{project}/_apis/build/builds/{buildId}/report",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.listRepositories=function(e,t,i,r,o,n,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={serviceEndpointId:i,repository:r,resultSet:o,pageResults:n,continuationToken:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/repositories",routeValues:{project:e,providerName:t},queryParams:a})]})})},t.prototype.authorizeDefinitionResources=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/resources",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.getDefinitionResources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/resources",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getResourceUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/build/ResourceUsage"})]})})},t.prototype.getRetentionSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/retention",routeValues:{project:e}})]})})},t.prototype.updateRetentionSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/retention",routeValues:{project:t},body:e})]})})},t.prototype.getDefinitionRevisions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/revisions",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getBuildSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/settings",routeValues:{project:e}})]})})},t.prototype.updateBuildSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/settings",routeValues:{project:t},body:e})]})})},t.prototype.listSourceProviders=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders",routeValues:{project:e}})]})})},t.prototype.updateStage=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}/stages/{stageRefName}",routeValues:{project:r,buildId:t,stageRefName:i},body:e})]})})},t.prototype.getStatusBadge=function(e,t,i,r,o,n,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={branchName:i,stageName:r,jobName:o,configuration:n,label:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/status/{*definition}",routeValues:{project:e,definition:t},queryParams:a})]})})},t.prototype.addBuildTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PUT",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t,tag:i}})]})})},t.prototype.addBuildTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:t,buildId:i},body:e})]})})},t.prototype.deleteBuildTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t,tag:i}})]})})},t.prototype.getBuildTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t}})]})})},t.prototype.updateBuildTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:t,buildId:i},body:e})]})})},t.prototype.addDefinitionTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t,tag:i}})]})})},t.prototype.addDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"POST",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.deleteDefinitionTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t,tag:i}})]})})},t.prototype.getDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={revision:i},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.updateDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.deleteTag=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/tags/{*tag}",routeValues:{project:e,tag:t}})]})})},t.prototype.getTags=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/tags/{*tag}",routeValues:{project:e}})]})})},t.prototype.deleteTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e,templateId:t}})]})})},t.prototype.getTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e,templateId:t}})]})})},t.prototype.getTemplates=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e}})]})})},t.prototype.saveTemplate=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:t,templateId:i},body:e})]})})},t.prototype.getBuildTimeline=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={changeId:r,planId:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}",routeValues:{project:e,buildId:t,timelineId:i},queryParams:n})]})})},t.prototype.restoreWebhooks=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={serviceEndpointId:r,repository:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/webhooks",routeValues:{project:t,providerName:i},queryParams:n,body:e})]})})},t.prototype.listWebhooks=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={serviceEndpointId:i,repository:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/webhooks",routeValues:{project:e,providerName:t},queryParams:o})]})})},t.prototype.getBuildWorkItemsRefs=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$top:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/workitems",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuildWorkItemsRefsFromCommits=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$top:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/workitems",routeValues:{project:t,buildId:i},queryParams:o,body:e})]})})},t.prototype.getWorkItemsBetweenBuilds=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fromBuildId:t,toBuildId:i,$top:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/workitems",routeValues:{project:e},queryParams:o})]})})},t.prototype.getDefinitionYaml=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={revision:i,minMetricsTime:r,propertyFilters:o&&o.join(","),includeLatestBuilds:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/yaml",routeValues:{project:e,definitionId:t},queryParams:u})]})})},t.RESOURCE_AREA_ID="965220d5-5bb9-42cf-8d67-9b146df2a5a4",t}(i.RestClientBase);t.BuildRestClient=o});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(o,n){function u(e){try{s(r.next(e))}catch(e){n(e)}}function a(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function i(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!(n=n.length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}var r,o,n,u,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createArtifact=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.5",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:t,buildId:i},body:e})]})})},t.prototype.getArtifact=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={artifactName:i},[2,this.beginRequest({apiVersion:"7.2-preview.5",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getArtifactContentZip=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={artifactName:i},[2,this.beginRequest({apiVersion:"7.2-preview.5",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getArtifacts=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.5",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getFile=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={artifactName:i,fileId:r,fileName:o},[2,this.beginRequest({apiVersion:"7.2-preview.5",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",routeValues:{project:e,buildId:t},queryParams:n})]})})},t.prototype.getAttachments=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/attachments/{type}",routeValues:{project:e,buildId:t,type:i}})]})})},t.prototype.getAttachment=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/build/builds/{buildId}/{timelineId}/{recordId}/attachments/{type}/{name}",routeValues:{project:e,buildId:t,timelineId:i,recordId:r,type:o,name:n}})]})})},t.prototype.authorizeProjectResources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/authorizedresources",routeValues:{project:t},body:e})]})})},t.prototype.getProjectResources=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:t,id:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/authorizedresources",routeValues:{project:e},queryParams:r})]})})},t.prototype.getBadge=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={branchName:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/public/build/definitions/{project}/{definitionId}/badge",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.listBranches=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={serviceEndpointId:i,repository:r,branchName:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/branches",routeValues:{project:e,providerName:t},queryParams:n})]})})},t.prototype.getBuildBadge=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={repoId:i,branchName:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/repos/{repoType}/badge",routeValues:{project:e,repoType:t},queryParams:o})]})})},t.prototype.getBuildBadgeData=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={repoId:i,branchName:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/repos/{repoType}/badge",routeValues:{project:e,repoType:t},queryParams:o})]})})},t.prototype.getRetentionLeasesForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/builds/{buildId}/leases",routeValues:{project:e,buildId:t}})]})})},t.prototype.deleteBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"DELETE",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuild=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={propertyFilters:i},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuilds=function(e,t,i,o,n,u,a,s,p,d,c,l,_,f,h,v,g,b,m,y,w){return __awaiter(this,void 0,void 0,function(){var j,V=this;return __generator(this,function(T){return j={definitions:t&&t.join(","),queues:i&&i.join(","),buildNumber:o,minTime:n,maxTime:u,requestedFor:a,reasonFilter:s,statusFilter:p,resultFilter:d,tagFilters:c&&c.join(","),properties:l&&l.join(","),$top:_,continuationToken:f,maxBuildsPerDefinition:h,deletedFilter:v,queryOrder:g,branchName:b,buildIds:m&&m.join(","),repositoryId:y,repositoryType:w},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:e},queryParams:j,returnRawResponse:!0}).then(function(e){return __awaiter(V,void 0,void 0,function(){var t;return __generator(this,function(i){switch(i.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=i.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.queueBuild=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={ignoreWarnings:i,checkInTicket:r,sourceBuildId:o,definitionId:n},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t},queryParams:u,body:e})]})})},t.prototype.updateBuild=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={retry:r},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t,buildId:i},queryParams:o,body:e})]})})},t.prototype.updateBuilds=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}",routeValues:{project:t},body:e})]})})},t.prototype.getBuildChanges=function(e,t,i,o,n){return __awaiter(this,void 0,void 0,function(){var u,a=this;return __generator(this,function(s){return u={continuationToken:i,$top:o,includeSourceChange:n},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/changes",routeValues:{project:e,buildId:t},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(i){switch(i.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=i.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getChangesBetweenBuilds=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fromBuildId:t,toBuildId:i,$top:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/changes",routeValues:{project:e},queryParams:o})]})})},t.prototype.getBuildController=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/build/Controllers/{controllerId}",routeValues:{controllerId:e}})]})})},t.prototype.getBuildControllers=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(i){return t={name:e},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/build/Controllers/{controllerId}",queryParams:t})]})})},t.prototype.createDefinition=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={definitionToCloneId:i,definitionToCloneRevision:r},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"POST",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t},queryParams:o,body:e})]})})},t.prototype.deleteDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getDefinition=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={revision:i,minMetricsTime:r,propertyFilters:o&&o.join(","),includeLatestBuilds:n},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:u})]})})},t.prototype.getDefinitions=function(e,t,i,o,n,u,a,s,p,d,c,l,_,f,h,v,g){return __awaiter(this,void 0,void 0,function(){var b,m=this;return __generator(this,function(y){return b={name:t,repositoryId:i,repositoryType:o,queryOrder:n,$top:u,continuationToken:a,minMetricsTime:s,definitionIds:p&&p.join(","),path:d,builtAfter:c,notBuiltAfter:l,includeAllProperties:_,includeLatestBuilds:f,taskIdFilter:h,processType:v,yamlFilename:g},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e},queryParams:b,returnRawResponse:!0}).then(function(e){return __awaiter(m,void 0,void 0,function(){var t;return __generator(this,function(i){switch(i.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=i.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.restoreDefinition=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={deleted:i},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.updateDefinition=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={secretsSourceDefinitionId:r,secretsSourceDefinitionRevision:o},[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/{definitionId}",routeValues:{project:t,definitionId:i},queryParams:n,body:e})]})})},t.prototype.getFileContents=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={serviceEndpointId:i,repository:r,commitOrBranch:o,path:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/fileContents",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.createFolder=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={path:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PUT",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.deleteFolder=function(e,t){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={path:t},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getFolders=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={queryOrder:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:e,path:t},queryParams:r})]})})},t.prototype.updateFolder=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={path:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/folders/{*path}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.getBuildGeneralSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/generalSettings",routeValues:{project:e}})]})})},t.prototype.updateBuildGeneralSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/generalSettings",routeValues:{project:t},body:e})]})})},t.prototype.getRetentionHistory=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(i){return t={daysToLookback:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/build/retention/history",queryParams:t})]})})},t.prototype.getLatestBuild=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={branchName:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/latest/{*definition}",routeValues:{project:e,definition:t},queryParams:r})]})})},t.prototype.addRetentionLeases=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteRetentionLeasesById=function(e,t){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={ids:t&&t.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getRetentionLease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e,leaseId:t}})]})})},t.prototype.getRetentionLeasesByMinimalRetentionLeases=function(e,t){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(r){return i={leasesToFetch:t&&t.join("|")},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e},queryParams:i})]})})},t.prototype.getRetentionLeasesByOwnerId=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={ownerId:t,definitionId:i,runId:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getRetentionLeasesByUserId=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={userOwnerId:t,definitionId:i,runId:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.updateRetentionLease=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/build/retention/leases/{*leaseId}",routeValues:{project:t,leaseId:i},body:e})]})})},t.prototype.getBuildLog=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getBuildLogLines=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getBuildLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuildLogsZip=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t}})]})})},t.prototype.getBuildLogZip=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={startLine:r,endLine:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/build/builds/{buildId}/logs/{logId}",routeValues:{project:e,buildId:t,logId:i},queryParams:n})]})})},t.prototype.getProjectMetrics=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={minMetricsTime:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/Metrics/{metricAggregationType}",routeValues:{project:e,metricAggregationType:t},queryParams:r})]})})},t.prototype.getDefinitionMetrics=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={minMetricsTime:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/Metrics",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.getBuildOptionDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/options",routeValues:{project:e}})]})})},t.prototype.getPathContents=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={serviceEndpointId:i,repository:r,commitOrBranch:o,path:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/pathContents",routeValues:{project:e,providerName:t},queryParams:u})]})})},t.prototype.getBuildProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={filter:i&&i.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/builds/{buildId}/properties",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.updateBuildProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}/properties",routeValues:{project:t,buildId:i},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getDefinitionProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={filter:i&&i.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/properties",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.updateDefinitionProperties=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/properties",routeValues:{project:t,definitionId:i},customHeaders:{"Content-Type":"application/json-patch+json"},body:e})]})})},t.prototype.getPullRequest=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={repositoryId:r,serviceEndpointId:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/pullRequests/{pullRequestId}",routeValues:{project:e,providerName:t,pullRequestId:i},queryParams:n})]})})},t.prototype.getBuildReport=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/report",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuildReportHtmlContent=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={type:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/html",routeTemplate:"{project}/_apis/build/builds/{buildId}/report",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.listRepositories=function(e,t,i,r,o,n,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={serviceEndpointId:i,repository:r,resultSet:o,pageResults:n,continuationToken:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/repositories",routeValues:{project:e,providerName:t},queryParams:a})]})})},t.prototype.authorizeDefinitionResources=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/resources",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.getDefinitionResources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/resources",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getResourceUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/build/ResourceUsage"})]})})},t.prototype.getRetentionSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/retention",routeValues:{project:e}})]})})},t.prototype.updateRetentionSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/retention",routeValues:{project:t},body:e})]})})},t.prototype.getDefinitionRevisions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/revisions",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getBuildSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/settings",routeValues:{project:e}})]})})},t.prototype.updateBuildSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/settings",routeValues:{project:t},body:e})]})})},t.prototype.listSourceProviders=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders",routeValues:{project:e}})]})})},t.prototype.updateStage=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}/stages/{stageRefName}",routeValues:{project:r,buildId:t,stageRefName:i},body:e})]})})},t.prototype.getStatusBadge=function(e,t,i,r,o,n,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={branchName:i,stageName:r,jobName:o,configuration:n,label:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/status/{*definition}",routeValues:{project:e,definition:t},queryParams:a})]})})},t.prototype.addBuildTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PUT",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t,tag:i}})]})})},t.prototype.addBuildTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:t,buildId:i},body:e})]})})},t.prototype.deleteBuildTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t,tag:i}})]})})},t.prototype.getBuildTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:e,buildId:t}})]})})},t.prototype.updateBuildTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/build/builds/{buildId}/tags/{*tag}",routeValues:{project:t,buildId:i},body:e})]})})},t.prototype.addDefinitionTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t,tag:i}})]})})},t.prototype.addDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"POST",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.deleteDefinitionTag=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t,tag:i}})]})})},t.prototype.getDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={revision:i},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:e,definitionId:t},queryParams:r})]})})},t.prototype.updateDefinitionTags=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",routeValues:{project:t,definitionId:i},body:e})]})})},t.prototype.deleteTag=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/tags/{*tag}",routeValues:{project:e,tag:t}})]})})},t.prototype.getTags=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/tags/{*tag}",routeValues:{project:e}})]})})},t.prototype.deleteTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e,templateId:t}})]})})},t.prototype.getTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e,templateId:t}})]})})},t.prototype.getTemplates=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:e}})]})})},t.prototype.saveTemplate=function(e,t,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PUT",routeTemplate:"{project}/_apis/build/definitions/templates/{templateId}",routeValues:{project:t,templateId:i},body:e})]})})},t.prototype.getBuildTimeline=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={changeId:r,planId:o},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}",routeValues:{project:e,buildId:t,timelineId:i},queryParams:n})]})})},t.prototype.restoreWebhooks=function(e,t,i,r,o){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(u){return n={serviceEndpointId:r,repository:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/webhooks",routeValues:{project:t,providerName:i},queryParams:n,body:e})]})})},t.prototype.listWebhooks=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={serviceEndpointId:i,repository:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/sourceProviders/{providerName}/webhooks",routeValues:{project:e,providerName:t},queryParams:o})]})})},t.prototype.getBuildWorkItemsRefs=function(e,t,i){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(o){return r={$top:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/builds/{buildId}/workitems",routeValues:{project:e,buildId:t},queryParams:r})]})})},t.prototype.getBuildWorkItemsRefsFromCommits=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={$top:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/build/builds/{buildId}/workitems",routeValues:{project:t,buildId:i},queryParams:o,body:e})]})})},t.prototype.getWorkItemsBetweenBuilds=function(e,t,i,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(n){return o={fromBuildId:t,toBuildId:i,$top:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/build/workitems",routeValues:{project:e},queryParams:o})]})})},t.prototype.getDefinitionYaml=function(e,t,i,r,o,n){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={revision:i,minMetricsTime:r,propertyFilters:o&&o.join(","),includeLatestBuilds:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/build/definitions/{definitionId}/yaml",routeValues:{project:e,definitionId:t},queryParams:u})]})})},t.RESOURCE_AREA_ID="965220d5-5bb9-42cf-8d67-9b146df2a5a4",t}(i.RestClientBase);t.BuildRestClient=o});

@@ -569,3 +569,7 @@ import * as Gallery from "../Gallery/Gallery";

*/
Warning = 512
Warning = 512,
/**
* Extension is currently unpublished in the marketplace. Extension usage should be reviewed and removed if it is no longer needed
*/
Unpublished = 1024
}

@@ -572,0 +576,0 @@ /**

@@ -167,2 +167,6 @@ /*

ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning";
/**
* Extension is currently unpublished in the marketplace. Extension usage should be reviewed and removed if it is no longer needed
*/
ExtensionStateFlags[ExtensionStateFlags["Unpublished"] = 1024] = "Unpublished";
})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {}));

@@ -169,0 +173,0 @@ /**

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

define(["require","exports"],function(n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});!function(n){n[n.OnlyIfLicensed=0]="OnlyIfLicensed",n[n.OnlyIfUnlicensed=1]="OnlyIfUnlicensed",n[n.AlwaysInclude=2]="AlwaysInclude"}(e.ContributionLicensingBehaviorType||(e.ContributionLicensingBehaviorType={}));!function(n){n[n.Unknown=0]="Unknown",n[n.String=1]="String",n[n.Uri=2]="Uri",n[n.Guid=4]="Guid",n[n.Boolean=8]="Boolean",n[n.Integer=16]="Integer",n[n.Double=32]="Double",n[n.DateTime=64]="DateTime",n[n.Dictionary=128]="Dictionary",n[n.Array=256]="Array",n[n.Object=512]="Object"}(e.ContributionPropertyType||(e.ContributionPropertyType={}));!function(n){n[n.None=0]="None",n[n.IncludeSelf=16]="IncludeSelf",n[n.IncludeChildren=32]="IncludeChildren",n[n.IncludeSubTree=96]="IncludeSubTree",n[n.IncludeAll=112]="IncludeAll",n[n.IgnoreConstraints=256]="IgnoreConstraints"}(e.ContributionQueryOptions||(e.ContributionQueryOptions={}));!function(n){n[n.BuiltIn=1]="BuiltIn",n[n.Trusted=2]="Trusted"}(e.ExtensionFlags||(e.ExtensionFlags={}));!function(n){n[n.None=0]="None",n[n.Disabled=1]="Disabled",n[n.BuiltIn=2]="BuiltIn",n[n.MultiVersion=4]="MultiVersion",n[n.UnInstalled=8]="UnInstalled",n[n.VersionCheckError=16]="VersionCheckError",n[n.Trusted=32]="Trusted",n[n.Error=64]="Error",n[n.NeedsReauthorization=128]="NeedsReauthorization",n[n.AutoUpgradeError=256]="AutoUpgradeError",n[n.Warning=512]="Warning"}(e.ExtensionStateFlags||(e.ExtensionStateFlags={}));!function(n){n[n.Warning=0]="Warning",n[n.Error=1]="Error"}(e.InstalledExtensionStateIssueType||(e.InstalledExtensionStateIssueType={}))});
define(["require","exports"],function(n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});!function(n){n[n.OnlyIfLicensed=0]="OnlyIfLicensed",n[n.OnlyIfUnlicensed=1]="OnlyIfUnlicensed",n[n.AlwaysInclude=2]="AlwaysInclude"}(e.ContributionLicensingBehaviorType||(e.ContributionLicensingBehaviorType={}));!function(n){n[n.Unknown=0]="Unknown",n[n.String=1]="String",n[n.Uri=2]="Uri",n[n.Guid=4]="Guid",n[n.Boolean=8]="Boolean",n[n.Integer=16]="Integer",n[n.Double=32]="Double",n[n.DateTime=64]="DateTime",n[n.Dictionary=128]="Dictionary",n[n.Array=256]="Array",n[n.Object=512]="Object"}(e.ContributionPropertyType||(e.ContributionPropertyType={}));!function(n){n[n.None=0]="None",n[n.IncludeSelf=16]="IncludeSelf",n[n.IncludeChildren=32]="IncludeChildren",n[n.IncludeSubTree=96]="IncludeSubTree",n[n.IncludeAll=112]="IncludeAll",n[n.IgnoreConstraints=256]="IgnoreConstraints"}(e.ContributionQueryOptions||(e.ContributionQueryOptions={}));!function(n){n[n.BuiltIn=1]="BuiltIn",n[n.Trusted=2]="Trusted"}(e.ExtensionFlags||(e.ExtensionFlags={}));!function(n){n[n.None=0]="None",n[n.Disabled=1]="Disabled",n[n.BuiltIn=2]="BuiltIn",n[n.MultiVersion=4]="MultiVersion",n[n.UnInstalled=8]="UnInstalled",n[n.VersionCheckError=16]="VersionCheckError",n[n.Trusted=32]="Trusted",n[n.Error=64]="Error",n[n.NeedsReauthorization=128]="NeedsReauthorization",n[n.AutoUpgradeError=256]="AutoUpgradeError",n[n.Warning=512]="Warning",n[n.Unpublished=1024]="Unpublished"}(e.ExtensionStateFlags||(e.ExtensionStateFlags={}));!function(n){n[n.Warning=0]="Warning",n[n.Error=1]="Error"}(e.InstalledExtensionStateIssueType||(e.InstalledExtensionStateIssueType={}))});

@@ -968,3 +968,7 @@ import * as Gallery from "../Gallery/Gallery";

*/
Warning = 512
Warning = 512,
/**
* Extension is currently unpublished in the marketplace. Extension usage should be reviewed and removed if it is no longer needed
*/
Unpublished = 1024
}

@@ -971,0 +975,0 @@ export declare enum ExtensionUpdateType {

@@ -256,2 +256,6 @@ /*

ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning";
/**
* Extension is currently unpublished in the marketplace. Extension usage should be reviewed and removed if it is no longer needed
*/
ExtensionStateFlags[ExtensionStateFlags["Unpublished"] = 1024] = "Unpublished";
})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {}));

@@ -258,0 +262,0 @@ var ExtensionUpdateType;

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

define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Me=1]="Me",e[e.All=2]="All"}(n.AcquisitionAssignmentType||(n.AcquisitionAssignmentType={}));!function(e){e[e.Disallow=0]="Disallow",e[e.Allow=1]="Allow",e[e.Completed=3]="Completed"}(n.AcquisitionOperationState||(n.AcquisitionOperationState={}));!function(e){e[e.Get=0]="Get",e[e.Install=1]="Install",e[e.Buy=2]="Buy",e[e.Try=3]="Try",e[e.Request=4]="Request",e[e.None=5]="None",e[e.PurchaseRequest=6]="PurchaseRequest"}(n.AcquisitionOperationType||(n.AcquisitionOperationType={}));!function(e){e[e.OnlyIfLicensed=0]="OnlyIfLicensed",e[e.OnlyIfUnlicensed=1]="OnlyIfUnlicensed",e[e.AlwaysInclude=2]="AlwaysInclude"}(n.ContributionLicensingBehaviorType||(n.ContributionLicensingBehaviorType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.String=1]="String",e[e.Uri=2]="Uri",e[e.Guid=4]="Guid",e[e.Boolean=8]="Boolean",e[e.Integer=16]="Integer",e[e.Double=32]="Double",e[e.DateTime=64]="DateTime",e[e.Dictionary=128]="Dictionary",e[e.Array=256]="Array",e[e.Object=512]="Object"}(n.ContributionPropertyType||(n.ContributionPropertyType={}));!function(e){e[e.None=0]="None",e[e.IncludeSelf=16]="IncludeSelf",e[e.IncludeChildren=32]="IncludeChildren",e[e.IncludeSubTree=96]="IncludeSubTree",e[e.IncludeAll=112]="IncludeAll",e[e.IgnoreConstraints=256]="IgnoreConstraints"}(n.ContributionQueryOptions||(n.ContributionQueryOptions={}));!function(e){e[e.BuiltIn=1]="BuiltIn",e[e.Trusted=2]="Trusted"}(n.ExtensionFlags||(n.ExtensionFlags={}));!function(e){e[e.Open=0]="Open",e[e.Accepted=1]="Accepted",e[e.Rejected=2]="Rejected"}(n.ExtensionRequestState||(n.ExtensionRequestState={}));!function(e){e[e.Created=1]="Created",e[e.Approved=2]="Approved",e[e.Rejected=3]="Rejected",e[e.Deleted=4]="Deleted"}(n.ExtensionRequestUpdateType||(n.ExtensionRequestUpdateType={}));!function(e){e[e.None=0]="None",e[e.Disabled=1]="Disabled",e[e.BuiltIn=2]="BuiltIn",e[e.MultiVersion=4]="MultiVersion",e[e.UnInstalled=8]="UnInstalled",e[e.VersionCheckError=16]="VersionCheckError",e[e.Trusted=32]="Trusted",e[e.Error=64]="Error",e[e.NeedsReauthorization=128]="NeedsReauthorization",e[e.AutoUpgradeError=256]="AutoUpgradeError",e[e.Warning=512]="Warning"}(n.ExtensionStateFlags||(n.ExtensionStateFlags={}));!function(e){e[e.Installed=1]="Installed",e[e.Uninstalled=2]="Uninstalled",e[e.Enabled=3]="Enabled",e[e.Disabled=4]="Disabled",e[e.VersionUpdated=5]="VersionUpdated",e[e.ActionRequired=6]="ActionRequired",e[e.ActionResolved=7]="ActionResolved"}(n.ExtensionUpdateType||(n.ExtensionUpdateType={}));!function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error"}(n.InstalledExtensionStateIssueType||(n.InstalledExtensionStateIssueType={}))});
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Me=1]="Me",e[e.All=2]="All"}(n.AcquisitionAssignmentType||(n.AcquisitionAssignmentType={}));!function(e){e[e.Disallow=0]="Disallow",e[e.Allow=1]="Allow",e[e.Completed=3]="Completed"}(n.AcquisitionOperationState||(n.AcquisitionOperationState={}));!function(e){e[e.Get=0]="Get",e[e.Install=1]="Install",e[e.Buy=2]="Buy",e[e.Try=3]="Try",e[e.Request=4]="Request",e[e.None=5]="None",e[e.PurchaseRequest=6]="PurchaseRequest"}(n.AcquisitionOperationType||(n.AcquisitionOperationType={}));!function(e){e[e.OnlyIfLicensed=0]="OnlyIfLicensed",e[e.OnlyIfUnlicensed=1]="OnlyIfUnlicensed",e[e.AlwaysInclude=2]="AlwaysInclude"}(n.ContributionLicensingBehaviorType||(n.ContributionLicensingBehaviorType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.String=1]="String",e[e.Uri=2]="Uri",e[e.Guid=4]="Guid",e[e.Boolean=8]="Boolean",e[e.Integer=16]="Integer",e[e.Double=32]="Double",e[e.DateTime=64]="DateTime",e[e.Dictionary=128]="Dictionary",e[e.Array=256]="Array",e[e.Object=512]="Object"}(n.ContributionPropertyType||(n.ContributionPropertyType={}));!function(e){e[e.None=0]="None",e[e.IncludeSelf=16]="IncludeSelf",e[e.IncludeChildren=32]="IncludeChildren",e[e.IncludeSubTree=96]="IncludeSubTree",e[e.IncludeAll=112]="IncludeAll",e[e.IgnoreConstraints=256]="IgnoreConstraints"}(n.ContributionQueryOptions||(n.ContributionQueryOptions={}));!function(e){e[e.BuiltIn=1]="BuiltIn",e[e.Trusted=2]="Trusted"}(n.ExtensionFlags||(n.ExtensionFlags={}));!function(e){e[e.Open=0]="Open",e[e.Accepted=1]="Accepted",e[e.Rejected=2]="Rejected"}(n.ExtensionRequestState||(n.ExtensionRequestState={}));!function(e){e[e.Created=1]="Created",e[e.Approved=2]="Approved",e[e.Rejected=3]="Rejected",e[e.Deleted=4]="Deleted"}(n.ExtensionRequestUpdateType||(n.ExtensionRequestUpdateType={}));!function(e){e[e.None=0]="None",e[e.Disabled=1]="Disabled",e[e.BuiltIn=2]="BuiltIn",e[e.MultiVersion=4]="MultiVersion",e[e.UnInstalled=8]="UnInstalled",e[e.VersionCheckError=16]="VersionCheckError",e[e.Trusted=32]="Trusted",e[e.Error=64]="Error",e[e.NeedsReauthorization=128]="NeedsReauthorization",e[e.AutoUpgradeError=256]="AutoUpgradeError",e[e.Warning=512]="Warning",e[e.Unpublished=1024]="Unpublished"}(n.ExtensionStateFlags||(n.ExtensionStateFlags={}));!function(e){e[e.Installed=1]="Installed",e[e.Uninstalled=2]="Uninstalled",e[e.Enabled=3]="Enabled",e[e.Disabled=4]="Disabled",e[e.VersionUpdated=5]="VersionUpdated",e[e.ActionRequired=6]="ActionRequired",e[e.ActionResolved=7]="ActionResolved"}(n.ExtensionUpdateType||(n.ExtensionUpdateType={}));!function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error"}(n.InstalledExtensionStateIssueType||(n.InstalledExtensionStateIssueType={}))});

@@ -122,34 +122,2 @@ import * as WebApi from "../WebApi/WebApi";

/**
* BillingInfo contains an organization, its enablement status and the Azure Subscription for it.
*/
export interface BillingInfo {
advSecEnabled: boolean;
/**
* The most recent time the enablement state was modified.
*/
advSecEnabledChangedOnDate: Date;
/**
* The first time the enablement state was modified.
*/
advSecEnabledFirstChangedOnDate: Date;
azureSubscriptionId: string;
billingMode: BillingMode;
organizationId: string;
tenantId: string;
}
export declare enum BillingMode {
/**
* None implies the organization is not billable because no Azure Subscription has been set.
*/
None = 0,
/**
* When an organization is the only organization mapped to an Azure Subscription.
*/
SingleOrg = 1,
/**
* When an organization is mapped to an Azure Subscription to which at least one other org is mapped.
*/
MultiOrg = 2
}
/**
* Information related to billing for Advanced Security services

@@ -156,0 +124,0 @@ */

@@ -9,17 +9,2 @@ /*

Object.defineProperty(exports, "__esModule", { value: true });
var BillingMode;
(function (BillingMode) {
/**
* None implies the organization is not billable because no Azure Subscription has been set.
*/
BillingMode[BillingMode["None"] = 0] = "None";
/**
* When an organization is the only organization mapped to an Azure Subscription.
*/
BillingMode[BillingMode["SingleOrg"] = 1] = "SingleOrg";
/**
* When an organization is mapped to an Azure Subscription to which at least one other org is mapped.
*/
BillingMode[BillingMode["MultiOrg"] = 2] = "MultiOrg";
})(BillingMode = exports.BillingMode || (exports.BillingMode = {}));
});

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

define(["require","exports"],function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.SingleOrg=1]="SingleOrg",e[e.MultiOrg=2]="MultiOrg"}(i.BillingMode||(i.BillingMode={}))});
define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})});

@@ -7,27 +7,2 @@ import { IVssRestClientOptions } from "../Common/Context";

/**
* Delete the billing info for an organization from config DB.
*
* @param organizationId -
*/
deleteBillingInfo(organizationId: string): Promise<void>;
/**
* Delete the meter usage history from Primary SU for an organization.
*
* @param organizationId -
*/
deleteMeterUsageHistory(organizationId: string): Promise<void>;
/**
* Get the billing info for an organization from config DB.
*
* @param organizationId - Organization ID to get billing info for.
*/
getBillingInfo(organizationId: string): Promise<Management.BillingInfo>;
/**
* Save the billing info for an organization in config DB.
*
* @param billingInfo -
* @param organizationId -
*/
saveBillingInfo(billingInfo: Management.BillingInfo, organizationId: string): Promise<void>;
/**
* During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -\> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.

@@ -34,0 +9,0 @@ *

@@ -60,83 +60,2 @@ /*

/**
* Delete the billing info for an organization from config DB.
*
* @param organizationId -
*/
ManagementRestClient.prototype.deleteBillingInfo = function (organizationId) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.beginRequest({
apiVersion: "7.2-preview.1",
method: "DELETE",
routeTemplate: "{organizationId}/_apis/Management/Billing/{action}",
routeValues: {
organizationId: organizationId,
action: "Default"
}
})];
});
});
};
/**
* Delete the meter usage history from Primary SU for an organization.
*
* @param organizationId -
*/
ManagementRestClient.prototype.deleteMeterUsageHistory = function (organizationId) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.beginRequest({
apiVersion: "7.2-preview.1",
method: "DELETE",
routeTemplate: "{organizationId}/_apis/Management/Billing/{action}",
routeValues: {
organizationId: organizationId,
action: "MeterUsageHistory"
}
})];
});
});
};
/**
* Get the billing info for an organization from config DB.
*
* @param organizationId - Organization ID to get billing info for.
*/
ManagementRestClient.prototype.getBillingInfo = function (organizationId) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.beginRequest({
apiVersion: "7.2-preview.1",
routeTemplate: "{organizationId}/_apis/Management/Billing/{action}",
routeValues: {
organizationId: organizationId,
action: "Default"
}
})];
});
});
};
/**
* Save the billing info for an organization in config DB.
*
* @param billingInfo -
* @param organizationId -
*/
ManagementRestClient.prototype.saveBillingInfo = function (billingInfo, organizationId) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.beginRequest({
apiVersion: "7.2-preview.1",
method: "POST",
routeTemplate: "{organizationId}/_apis/Management/Billing/{action}",
routeValues: {
organizationId: organizationId,
action: "Default"
},
body: billingInfo
})];
});
});
};
/**
* During multi-org billing computation in primary scale unit(EUS21), this API is used to create billing snapshot for a specific org. Primary scale unit will call this API for each org in different scsle units to create billing snapshot. Data will be stored in the org specific partition DB -\> billing snapshot table. This is needed as customers will fetch billing data from their org specific partition DB.

@@ -143,0 +62,0 @@ *

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

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{s(n.next(e))}catch(e){o(e)}}function u(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,u)}s((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,i,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.deleteBillingInfo=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{organizationId}/_apis/Management/Billing/{action}",routeValues:{organizationId:e,action:"Default"}})]})})},t.prototype.deleteMeterUsageHistory=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{organizationId}/_apis/Management/Billing/{action}",routeValues:{organizationId:e,action:"MeterUsageHistory"}})]})})},t.prototype.getBillingInfo=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{organizationId}/_apis/Management/Billing/{action}",routeValues:{organizationId:e,action:"Default"}})]})})},t.prototype.saveBillingInfo=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{organizationId}/_apis/Management/Billing/{action}",routeValues:{organizationId:t,action:"Default"},body:e})]})})},t.prototype.createBillingSnapshot=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},body:e})]})})},t.prototype.getBillableCommitterDetails=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Details"},queryParams:t})]})})},t.prototype.getLastMeterUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Last"}})]})})},t.prototype.getMeterUsage=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},queryParams:t})]})})},t.prototype.getOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={includeAllProperties:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/enablement",queryParams:t})]})})},t.prototype.updateOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Management/enablement",body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForOrg=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Details"}})]})})},t.prototype.getEstimatedOrgBillablePushers=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Default"}})]})})},t.prototype.getProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={includeAllProperties:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:t},body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Details"}})]})})},t.prototype.getEstimatedProjectBillablePushers=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Default"}})]})})},t.prototype.getRepoEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={includeAllProperties:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:e,repository:t},queryParams:n})]})})},t.prototype.updateRepoAdvSecEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getEstimatedRepoBillableCommitters=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Default"}})]})})},t.prototype.getEstimatedRepoBillablePushersDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Details"}})]})})},t}(r.RestClientBase);t.ManagementRestClient=n});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{s(n.next(e))}catch(e){o(e)}}function u(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,u)}s((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,i,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createBillingSnapshot=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},body:e})]})})},t.prototype.getBillableCommitterDetails=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Details"},queryParams:t})]})})},t.prototype.getLastMeterUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Last"}})]})})},t.prototype.getMeterUsage=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},queryParams:t})]})})},t.prototype.getOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={includeAllProperties:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/enablement",queryParams:t})]})})},t.prototype.updateOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Management/enablement",body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForOrg=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Details"}})]})})},t.prototype.getEstimatedOrgBillablePushers=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Default"}})]})})},t.prototype.getProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={includeAllProperties:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:t},body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Details"}})]})})},t.prototype.getEstimatedProjectBillablePushers=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Default"}})]})})},t.prototype.getRepoEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={includeAllProperties:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:e,repository:t},queryParams:n})]})})},t.prototype.updateRepoAdvSecEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getEstimatedRepoBillableCommitters=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Default"}})]})})},t.prototype.getEstimatedRepoBillablePushersDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Details"}})]})})},t}(r.RestClientBase);t.ManagementRestClient=n});
{
"name": "azure-devops-extension-api",
"version": "4.242.0",
"version": "4.243.0",
"description": "REST client libraries and contracts for Azure DevOps web extension developers.",

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

@@ -491,3 +491,3 @@ import { IVssRestClientOptions } from "../Common/Context";

* @param artifactVersionId - Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId.
* @param sourceBranchFilter - Releases with given sourceBranchFilter will be returned.
* @param sourceBranchFilter - Releases with given sourceBranchFilter will be returned (Not to be used with environmentStatusFilter).
* @param isDeleted - Gets the soft deleted releases, if true.

@@ -499,3 +499,3 @@ * @param tagFilter - A comma-delimited list of tags. Only releases with these tags will be returned.

*/
getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: Release.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: Release.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: Release.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean, tagFilter?: string[], propertyFilters?: string[], releaseIdFilter?: number[], path?: string): Promise<WebApi.PagedList<Release.Release>>;
getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: Release.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: Release.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: Release.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean, tagFilter?: string[], propertyFilters?: string[], releaseIdFilter?: number[], path?: string): Promise<Release.Release[]>;
/**

@@ -502,0 +502,0 @@ * Create a release.

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

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,s)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var i,n,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAgentArtifactDefinitions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/agentartifacts",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getApprovals=function(e,t,r,n,o,a,s,u,p){return __awaiter(this,void 0,void 0,function(){var l,c=this;return __generator(this,function(d){return l={assignedToFilter:t,statusFilter:r,releaseIdsFilter:n&&n.join(","),typeFilter:o,top:a,continuationToken:s,queryOrder:u,includeMyGroupApprovals:p},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/Release/approvals",routeValues:{project:e},queryParams:l,returnRawResponse:!0}).then(function(e){return __awaiter(c,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(i.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getApprovalHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/Release/approvals/{approvalStepId}/history",routeValues:{project:e,approvalStepId:t}})]})})},t.prototype.getApproval=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeHistory:r},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/Release/approvals/{approvalId}",routeValues:{project:e,approvalId:t},queryParams:i})]})})},t.prototype.updateReleaseApproval=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/approvals/{approvalId}",routeValues:{project:t,approvalId:r},body:e})]})})},t.prototype.updateReleaseApprovals=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/approvals",routeValues:{project:t},body:e})]})})},t.prototype.getTaskAttachmentContent=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,recordId:o,type:a,name:s}})]})})},t.prototype.getReleaseTaskAttachmentContent=function(e,t,r,i,n,o,a,s,u){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(p){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,planId:n,timelineId:o,recordId:a,type:s,name:u}})]})})},t.prototype.getTaskAttachments=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/attachments/{type}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,type:o}})]})})},t.prototype.getReleaseTaskAttachments=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/attachments/{type}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,planId:n,type:o}})]})})},t.prototype.getAutoTriggerIssues=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={artifactType:e,sourceId:t,artifactVersionId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/autotriggerissues",routeValues:{project:i},queryParams:n})]})})},t.prototype.getDeploymentBadge=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/public/Release/badge/{projectId}/{releaseDefinitionId}/{environmentId}/{branchName}",routeValues:{projectId:e,releaseDefinitionId:t,environmentId:r,branchName:i}})]})})},t.prototype.getReleaseChanges=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={baseReleaseId:r,$top:i,artifactAlias:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/changes",routeValues:{project:e,releaseId:t},queryParams:o})]})})},t.prototype.getDefinitionEnvironments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={taskGroupId:t,propertyFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/definitionEnvironments",routeValues:{project:e},queryParams:i})]})})},t.prototype.createReleaseDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteReleaseDefinition=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={comment:r,forceDelete:i},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:n})]})})},t.prototype.getReleaseDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={propertyFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:i})]})})},t.prototype.getReleaseDefinitionRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={revision:r},[2,this.beginRequest({apiVersion:"7.2-preview.4",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:i})]})})},t.prototype.getReleaseDefinitions=function(e,t,r,n,o,a,s,u,p,l,c,d,_,v,f){return __awaiter(this,void 0,void 0,function(){var h,m=this;return __generator(this,function(g){return h={searchText:t,$expand:r,artifactType:n,artifactSourceId:o,$top:a,continuationToken:s,queryOrder:u,path:p,isExactNameMatch:l,tagFilter:c&&c.join(","),propertyFilters:d&&d.join(","),definitionIdFilter:_&&_.join(","),isDeleted:v,searchTextContainsFolderName:f},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e},queryParams:h,returnRawResponse:!0}).then(function(e){return __awaiter(m,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(i.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.undeleteReleaseDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t,definitionId:r},body:e})]})})},t.prototype.updateReleaseDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"PUT",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t},body:e})]})})},t.prototype.getDeployments=function(e,t,r,n,o,a,s,u,p,l,c,d,_,v,f,h){return __awaiter(this,void 0,void 0,function(){var m,g=this;return __generator(this,function(R){return m={definitionId:t,definitionEnvironmentId:r,createdBy:n,minModifiedTime:o,maxModifiedTime:a,deploymentStatus:s,operationStatus:u,latestAttemptsOnly:p,queryOrder:l,$top:c,continuationToken:d,createdFor:_,minStartedTime:v,maxStartedTime:f,sourceBranch:h},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/deployments",routeValues:{project:e},queryParams:m,returnRawResponse:!0}).then(function(e){return __awaiter(g,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(i.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getDeploymentsForMultipleEnvironments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/Release/deployments",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseEnvironment=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={$expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.7",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",routeValues:{project:e,releaseId:t,environmentId:r},queryParams:n})]})})},t.prototype.updateReleaseEnvironment=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.7",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",routeValues:{project:t,releaseId:r,environmentId:i},body:e})]})})},t.prototype.createDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:t},body:e})]})})},t.prototype.deleteDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.getDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.listDefinitionEnvironmentTemplates=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={isDeleted:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.undeleteReleaseDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.createFavorites=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={identityId:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:t,scope:r},queryParams:n,body:e})]})})},t.prototype.deleteFavorites=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={identityId:r,favoriteItemIds:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:e,scope:t},queryParams:n})]})})},t.prototype.getFavorites=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={identityId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:e,scope:t},queryParams:i})]})})},t.prototype.getFlightAssignments=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={flightName:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Release/flightAssignments",queryParams:t})]})})},t.prototype.createFolder=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:t,path:r},body:e})]})})},t.prototype.deleteFolder=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:e,path:t}})]})})},t.prototype.getFolders=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={queryOrder:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:e,path:t},queryParams:i})]})})},t.prototype.updateFolder=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:t,path:r},body:e})]})})},t.prototype.updateGates=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/gates/{gateStepId}",routeValues:{project:t,gateStepId:r},body:e})]})})},t.prototype.getReleaseHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/history",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getInputValues=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/artifacts/inputvaluesquery",routeValues:{project:t},body:e})]})})},t.prototype.getIssues=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={sourceId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/issues/{buildId}",routeValues:{project:e,buildId:t},queryParams:i})]})})},t.prototype.getGateLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/gates/{gateId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,gateId:i,taskId:n}})]})})},t.prototype.getLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/logs",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={attemptId:n},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,taskId:i},queryParams:o})]})})},t.prototype.getTaskLog2=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={startLine:a,endLine:s},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,taskId:o},queryParams:u})]})})},t.prototype.getTaskLog=function(e,t,r,i,n,o,a){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={startLine:o,endLine:a},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,releaseDeployPhaseId:i,taskId:n},queryParams:s})]})})},t.prototype.getManualIntervention=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:e,releaseId:t,manualInterventionId:r}})]})})},t.prototype.getManualInterventions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.updateManualIntervention=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:t,releaseId:r,manualInterventionId:i},body:e})]})})},t.prototype.getMetrics=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={minMetricsTime:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/metrics",routeValues:{project:e},queryParams:r})]})})},t.prototype.getOrgPipelineReleaseSettings=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Release/orgPipelineReleaseSettings"})]})})},t.prototype.updateOrgPipelineReleaseSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Release/orgPipelineReleaseSettings",body:e})]})})},t.prototype.getPipelineReleaseSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/pipelineReleaseSettings",routeValues:{project:e}})]})})},t.prototype.updatePipelineReleaseSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/pipelineReleaseSettings",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseProjects=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={artifactType:e,artifactSourceId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Release/projects",queryParams:r})]})})},t.prototype.getReleases=function(e,t,r,n,o,a,s,u,p,l,c,d,_,v,f,h,m,g,R,y,I,w){return __awaiter(this,void 0,void 0,function(){var j,T=this;return __generator(this,function(V){return j={definitionId:t,definitionEnvironmentId:r,searchText:n,createdBy:o,statusFilter:a,environmentStatusFilter:s,minCreatedTime:u,maxCreatedTime:p,queryOrder:l,$top:c,continuationToken:d,$expand:_,artifactTypeId:v,sourceId:f,artifactVersionId:h,sourceBranchFilter:m,isDeleted:g,tagFilter:R&&R.join(","),propertyFilters:y&&y.join(","),releaseIdFilter:I&&I.join(","),path:w},[2,this.beginRequest({apiVersion:"7.2-preview.8",routeTemplate:"{project}/_apis/Release/releases",routeValues:{project:e},queryParams:j,returnRawResponse:!0}).then(function(e){return __awaiter(T,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(i.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.createRelease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.8",method:"POST",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={comment:r},[2,this.beginRequest({apiVersion:"7.2-preview.8",method:"DELETE",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.getRelease=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={approvalFilters:r,propertyFilters:i&&i.join(","),$expand:n,$topGateRecords:o},[2,this.beginRequest({apiVersion:"7.2-preview.8",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:a})]})})},t.prototype.getReleaseDefinitionSummary=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={definitionId:t,releaseCount:r,includeArtifact:i,definitionEnvironmentIdsFilter:n&&n.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.8",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getReleaseRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={definitionSnapshotRevision:r},[2,this.beginRequest({apiVersion:"7.2-preview.8",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.undeleteRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={comment:r},[2,this.beginRequest({apiVersion:"7.2-preview.8",method:"PUT",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.updateRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.8",method:"PUT",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.updateReleaseResource=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.8",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.getReleaseSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releasesettings",routeValues:{project:e}})]})})},t.prototype.updateReleaseSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PUT",routeTemplate:"{project}/_apis/Release/releasesettings",routeValues:{project:t},body:e})]})})},t.prototype.getDefinitionRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.4",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",routeValues:{project:e,definitionId:t,revision:r}})]})})},t.prototype.getReleaseDefinitionHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getSummaryMailSections=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/sendmail/{releaseId}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.sendSummaryMail=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/sendmail/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.getSourceBranches=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/sourcebranches",routeValues:{project:e,definitionId:t}})]})})},t.prototype.addDefinitionTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t,tag:r}})]})})},t.prototype.addDefinitionTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:t,releaseDefinitionId:r},body:e})]})})},t.prototype.deleteDefinitionTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t,tag:r}})]})})},t.prototype.getDefinitionTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t}})]})})},t.prototype.addReleaseTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t,tag:r}})]})})},t.prototype.addReleaseTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.deleteReleaseTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t,tag:r}})]})})},t.prototype.getReleaseTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getTags=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/tags",routeValues:{project:e}})]})})},t.prototype.getTasksForTaskGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r,releaseDeployPhaseId:i}})]})})},t.prototype.getTasks2=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n}})]})})},t.prototype.getTasks=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={attemptId:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r},queryParams:n})]})})},t.prototype.getArtifactTypeDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/artifacts/types",routeValues:{project:e}})]})})},t.prototype.getArtifactVersions=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={releaseDefinitionId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/artifacts/versions",routeValues:{project:e},queryParams:r})]})})},t.prototype.getArtifactVersionsForSources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/artifacts/versions",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseWorkItemsRefs=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={baseReleaseId:r,$top:i,artifactAlias:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/workitems",routeValues:{project:e,releaseId:t},queryParams:o})]})})},t.RESOURCE_AREA_ID="efc2f575-36ef-48e9-b672-0c6fb4a48ac5",t}(r.RestClientBase);t.ReleaseRestClient=n});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,s)}u((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var i,n,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAgentArtifactDefinitions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/agentartifacts",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getApprovals=function(e,t,r,n,o,a,s,u,p){return __awaiter(this,void 0,void 0,function(){var l,d=this;return __generator(this,function(c){return l={assignedToFilter:t,statusFilter:r,releaseIdsFilter:n&&n.join(","),typeFilter:o,top:a,continuationToken:s,queryOrder:u,includeMyGroupApprovals:p},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/Release/approvals",routeValues:{project:e},queryParams:l,returnRawResponse:!0}).then(function(e){return __awaiter(d,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(i.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getApprovalHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/Release/approvals/{approvalStepId}/history",routeValues:{project:e,approvalStepId:t}})]})})},t.prototype.getApproval=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeHistory:r},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/Release/approvals/{approvalId}",routeValues:{project:e,approvalId:t},queryParams:i})]})})},t.prototype.updateReleaseApproval=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/approvals/{approvalId}",routeValues:{project:t,approvalId:r},body:e})]})})},t.prototype.updateReleaseApprovals=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/Release/approvals",routeValues:{project:t},body:e})]})})},t.prototype.getTaskAttachmentContent=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(u){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,recordId:o,type:a,name:s}})]})})},t.prototype.getReleaseTaskAttachmentContent=function(e,t,r,i,n,o,a,s,u){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(p){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,planId:n,timelineId:o,recordId:a,type:s,name:u}})]})})},t.prototype.getTaskAttachments=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/attachments/{type}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,type:o}})]})})},t.prototype.getReleaseTaskAttachments=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/attachments/{type}",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,planId:n,type:o}})]})})},t.prototype.getAutoTriggerIssues=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={artifactType:e,sourceId:t,artifactVersionId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/autotriggerissues",routeValues:{project:i},queryParams:n})]})})},t.prototype.getDeploymentBadge=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/public/Release/badge/{projectId}/{releaseDefinitionId}/{environmentId}/{branchName}",routeValues:{projectId:e,releaseDefinitionId:t,environmentId:r,branchName:i}})]})})},t.prototype.getReleaseChanges=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={baseReleaseId:r,$top:i,artifactAlias:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/changes",routeValues:{project:e,releaseId:t},queryParams:o})]})})},t.prototype.getDefinitionEnvironments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={taskGroupId:t,propertyFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/definitionEnvironments",routeValues:{project:e},queryParams:i})]})})},t.prototype.createReleaseDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteReleaseDefinition=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={comment:r,forceDelete:i},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:n})]})})},t.prototype.getReleaseDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={propertyFilters:r&&r.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:i})]})})},t.prototype.getReleaseDefinitionRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={revision:r},[2,this.beginRequest({apiVersion:"7.2-preview.4",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e,definitionId:t},queryParams:i})]})})},t.prototype.getReleaseDefinitions=function(e,t,r,n,o,a,s,u,p,l,d,c,_,v,f){return __awaiter(this,void 0,void 0,function(){var h,m=this;return __generator(this,function(g){return h={searchText:t,$expand:r,artifactType:n,artifactSourceId:o,$top:a,continuationToken:s,queryOrder:u,path:p,isExactNameMatch:l,tagFilter:d&&d.join(","),propertyFilters:c&&c.join(","),definitionIdFilter:_&&_.join(","),isDeleted:v,searchTextContainsFolderName:f},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:e},queryParams:h,returnRawResponse:!0}).then(function(e){return __awaiter(m,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(i.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.undeleteReleaseDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t,definitionId:r},body:e})]})})},t.prototype.updateReleaseDefinition=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"PUT",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}",routeValues:{project:t},body:e})]})})},t.prototype.getDeployments=function(e,t,r,n,o,a,s,u,p,l,d,c,_,v,f,h){return __awaiter(this,void 0,void 0,function(){var m,g=this;return __generator(this,function(R){return m={definitionId:t,definitionEnvironmentId:r,createdBy:n,minModifiedTime:o,maxModifiedTime:a,deploymentStatus:s,operationStatus:u,latestAttemptsOnly:p,queryOrder:l,$top:d,continuationToken:c,createdFor:_,minStartedTime:v,maxStartedTime:f,sourceBranch:h},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/deployments",routeValues:{project:e},queryParams:m,returnRawResponse:!0}).then(function(e){return __awaiter(g,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(i.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getDeploymentsForMultipleEnvironments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/Release/deployments",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseEnvironment=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={$expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.8",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",routeValues:{project:e,releaseId:t,environmentId:r},queryParams:n})]})})},t.prototype.updateReleaseEnvironment=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.8",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",routeValues:{project:t,releaseId:r,environmentId:i},body:e})]})})},t.prototype.createDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:t},body:e})]})})},t.prototype.deleteDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.getDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.listDefinitionEnvironmentTemplates=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={isDeleted:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.undeleteReleaseDefinitionEnvironmentTemplate=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={templateId:t},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/environmenttemplates",routeValues:{project:e},queryParams:r})]})})},t.prototype.createFavorites=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={identityId:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:t,scope:r},queryParams:n,body:e})]})})},t.prototype.deleteFavorites=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={identityId:r,favoriteItemIds:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:e,scope:t},queryParams:n})]})})},t.prototype.getFavorites=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={identityId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/favorites/{scope}",routeValues:{project:e,scope:t},queryParams:i})]})})},t.prototype.getFlightAssignments=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={flightName:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Release/flightAssignments",queryParams:t})]})})},t.prototype.createFolder=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:t,path:r},body:e})]})})},t.prototype.deleteFolder=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:e,path:t}})]})})},t.prototype.getFolders=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={queryOrder:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:e,path:t},queryParams:i})]})})},t.prototype.updateFolder=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/Release/folders/{*path}",routeValues:{project:t,path:r},body:e})]})})},t.prototype.updateGates=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/gates/{gateStepId}",routeValues:{project:t,gateStepId:r},body:e})]})})},t.prototype.getReleaseHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/history",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getInputValues=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/artifacts/inputvaluesquery",routeValues:{project:t},body:e})]})})},t.prototype.getIssues=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={sourceId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/issues/{buildId}",routeValues:{project:e,buildId:t},queryParams:i})]})})},t.prototype.getGateLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/gates/{gateId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,gateId:i,taskId:n}})]})})},t.prototype.getLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/logs",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getLog=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={attemptId:n},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,taskId:i},queryParams:o})]})})},t.prototype.getTaskLog2=function(e,t,r,i,n,o,a,s){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={startLine:a,endLine:s},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n,taskId:o},queryParams:u})]})})},t.prototype.getTaskLog=function(e,t,r,i,n,o,a){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(u){return s={startLine:o,endLine:a},[2,this.beginRequest({apiVersion:"7.2-preview.2",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs",routeValues:{project:e,releaseId:t,environmentId:r,releaseDeployPhaseId:i,taskId:n},queryParams:s})]})})},t.prototype.getManualIntervention=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:e,releaseId:t,manualInterventionId:r}})]})})},t.prototype.getManualInterventions=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.updateManualIntervention=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",routeValues:{project:t,releaseId:r,manualInterventionId:i},body:e})]})})},t.prototype.getMetrics=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={minMetricsTime:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/metrics",routeValues:{project:e},queryParams:r})]})})},t.prototype.getOrgPipelineReleaseSettings=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Release/orgPipelineReleaseSettings"})]})})},t.prototype.updateOrgPipelineReleaseSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Release/orgPipelineReleaseSettings",body:e})]})})},t.prototype.getPipelineReleaseSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/pipelineReleaseSettings",routeValues:{project:e}})]})})},t.prototype.updatePipelineReleaseSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/pipelineReleaseSettings",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseProjects=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={artifactType:e,artifactSourceId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Release/projects",queryParams:r})]})})},t.prototype.getReleases=function(e,t,r,i,n,o,a,s,u,p,l,d,c,_,v,f,h,m,g,R,y,I){return __awaiter(this,void 0,void 0,function(){var w;return __generator(this,function(j){return w={definitionId:t,definitionEnvironmentId:r,searchText:i,createdBy:n,statusFilter:o,environmentStatusFilter:a,minCreatedTime:s,maxCreatedTime:u,queryOrder:p,$top:l,continuationToken:d,$expand:c,artifactTypeId:_,sourceId:v,artifactVersionId:f,sourceBranchFilter:h,isDeleted:m,tagFilter:g&&g.join(","),propertyFilters:R&&R.join(","),releaseIdFilter:y&&y.join(","),path:I},[2,this.beginRequest({apiVersion:"7.2-preview.9",routeTemplate:"{project}/_apis/Release/releases",routeValues:{project:e},queryParams:w})]})})},t.prototype.createRelease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.9",method:"POST",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={comment:r},[2,this.beginRequest({apiVersion:"7.2-preview.9",method:"DELETE",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.getRelease=function(e,t,r,i,n,o){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(s){return a={approvalFilters:r,propertyFilters:i&&i.join(","),$expand:n,$topGateRecords:o},[2,this.beginRequest({apiVersion:"7.2-preview.9",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:a})]})})},t.prototype.getReleaseDefinitionSummary=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={definitionId:t,releaseCount:r,includeArtifact:i,definitionEnvironmentIdsFilter:n&&n.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.9",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e},queryParams:o})]})})},t.prototype.getReleaseRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={definitionSnapshotRevision:r},[2,this.beginRequest({apiVersion:"7.2-preview.9",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.undeleteRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={comment:r},[2,this.beginRequest({apiVersion:"7.2-preview.9",method:"PUT",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:e,releaseId:t},queryParams:i})]})})},t.prototype.updateRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.9",method:"PUT",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.updateReleaseResource=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.9",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.getReleaseSettings=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releasesettings",routeValues:{project:e}})]})})},t.prototype.updateReleaseSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PUT",routeTemplate:"{project}/_apis/Release/releasesettings",routeValues:{project:t},body:e})]})})},t.prototype.getDefinitionRevision=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.4",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",routeValues:{project:e,definitionId:t,revision:r}})]})})},t.prototype.getReleaseDefinitionHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.4",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",routeValues:{project:e,definitionId:t}})]})})},t.prototype.getSummaryMailSections=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/sendmail/{releaseId}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.sendSummaryMail=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/sendmail/{releaseId}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.getSourceBranches=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{definitionId}/sourcebranches",routeValues:{project:e,definitionId:t}})]})})},t.prototype.addDefinitionTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t,tag:r}})]})})},t.prototype.addDefinitionTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:t,releaseDefinitionId:r},body:e})]})})},t.prototype.deleteDefinitionTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t,tag:r}})]})})},t.prototype.getDefinitionTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",routeValues:{project:e,releaseDefinitionId:t}})]})})},t.prototype.addReleaseTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t,tag:r}})]})})},t.prototype.addReleaseTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:t,releaseId:r},body:e})]})})},t.prototype.deleteReleaseTag=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t,tag:r}})]})})},t.prototype.getReleaseTags=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",routeValues:{project:e,releaseId:t}})]})})},t.prototype.getTags=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/tags",routeValues:{project:e}})]})})},t.prototype.getTasksForTaskGroup=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r,releaseDeployPhaseId:i}})]})})},t.prototype.getTasks2=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r,attemptId:i,timelineId:n}})]})})},t.prototype.getTasks=function(e,t,r,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(o){return n={attemptId:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks",routeValues:{project:e,releaseId:t,environmentId:r},queryParams:n})]})})},t.prototype.getArtifactTypeDefinitions=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/artifacts/types",routeValues:{project:e}})]})})},t.prototype.getArtifactVersions=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={releaseDefinitionId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/artifacts/versions",routeValues:{project:e},queryParams:r})]})})},t.prototype.getArtifactVersionsForSources=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Release/artifacts/versions",routeValues:{project:t},body:e})]})})},t.prototype.getReleaseWorkItemsRefs=function(e,t,r,i,n){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(a){return o={baseReleaseId:r,$top:i,artifactAlias:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Release/releases/{releaseId}/workitems",routeValues:{project:e,releaseId:t},queryParams:o})]})})},t.RESOURCE_AREA_ID="efc2f575-36ef-48e9-b672-0c6fb4a48ac5",t}(r.RestClientBase);t.ReleaseRestClient=n});

@@ -139,2 +139,3 @@ import * as DistributedTaskCommon from "../DistributedTaskCommon/DistributedTaskCommon";

export interface AzureSpnOperationStatus {
errorCode: SpnEndpointErrorCode;
severity: string;

@@ -881,1 +882,7 @@ state: string;

}
export declare enum SpnEndpointErrorCode {
/**
* Indicates whether user does not have required permissions to register the app in Entra or WIF is disabled.
*/
AppRegistrationFailed = 1
}

@@ -78,2 +78,9 @@ /*

})(ServiceEndpointExecutionResult = exports.ServiceEndpointExecutionResult || (exports.ServiceEndpointExecutionResult = {}));
var SpnEndpointErrorCode;
(function (SpnEndpointErrorCode) {
/**
* Indicates whether user does not have required permissions to register the app in Entra or WIF is disabled.
*/
SpnEndpointErrorCode[SpnEndpointErrorCode["AppRegistrationFailed"] = 1] = "AppRegistrationFailed";
})(SpnEndpointErrorCode = exports.SpnEndpointErrorCode || (exports.SpnEndpointErrorCode = {}));
});

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

define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.NoOption=0]="NoOption",e[e.Login=1]="Login",e[e.SelectAccount=2]="SelectAccount",e[e.FreshLogin=3]="FreshLogin",e[e.FreshLoginWithMfa=4]="FreshLoginWithMfa"}(n.AadLoginPromptOption||(n.AadLoginPromptOption={}));!function(e){e[e.None=0]="None",e[e.Oauth=1]="Oauth",e[e.Direct=2]="Direct"}(n.AccessTokenRequestType||(n.AccessTokenRequestType={}));!function(e){e[e.None=0]="None",e[e.Manage=2]="Manage",e[e.Use=16]="Use"}(n.OAuthConfigurationActionFilter||(n.OAuthConfigurationActionFilter={}));!function(e){e[e.None=0]="None",e[e.Manage=2]="Manage",e[e.Use=16]="Use",e[e.View=32]="View"}(n.ServiceEndpointActionFilter||(n.ServiceEndpointActionFilter={}));!function(e){e[e.Succeeded=0]="Succeeded",e[e.SucceededWithIssues=1]="SucceededWithIssues",e[e.Failed=2]="Failed",e[e.Canceled=3]="Canceled",e[e.Skipped=4]="Skipped",e[e.Abandoned=5]="Abandoned"}(n.ServiceEndpointExecutionResult||(n.ServiceEndpointExecutionResult={}))});
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.NoOption=0]="NoOption",e[e.Login=1]="Login",e[e.SelectAccount=2]="SelectAccount",e[e.FreshLogin=3]="FreshLogin",e[e.FreshLoginWithMfa=4]="FreshLoginWithMfa"}(n.AadLoginPromptOption||(n.AadLoginPromptOption={}));!function(e){e[e.None=0]="None",e[e.Oauth=1]="Oauth",e[e.Direct=2]="Direct"}(n.AccessTokenRequestType||(n.AccessTokenRequestType={}));!function(e){e[e.None=0]="None",e[e.Manage=2]="Manage",e[e.Use=16]="Use"}(n.OAuthConfigurationActionFilter||(n.OAuthConfigurationActionFilter={}));!function(e){e[e.None=0]="None",e[e.Manage=2]="Manage",e[e.Use=16]="Use",e[e.View=32]="View"}(n.ServiceEndpointActionFilter||(n.ServiceEndpointActionFilter={}));!function(e){e[e.Succeeded=0]="Succeeded",e[e.SucceededWithIssues=1]="SucceededWithIssues",e[e.Failed=2]="Failed",e[e.Canceled=3]="Canceled",e[e.Skipped=4]="Skipped",e[e.Abandoned=5]="Abandoned"}(n.ServiceEndpointExecutionResult||(n.ServiceEndpointExecutionResult={}));!function(e){e[e.AppRegistrationFailed=1]="AppRegistrationFailed"}(n.SpnEndpointErrorCode||(n.SpnEndpointErrorCode={}))});

@@ -210,18 +210,54 @@ /*

})(CoverageSummaryStatus = exports.CoverageSummaryStatus || (exports.CoverageSummaryStatus = {}));
/**
* Type of the artifact applicable to CustomTestField.
*/
var CustomTestFieldScope;
(function (CustomTestFieldScope) {
CustomTestFieldScope[CustomTestFieldScope["None"] = 0] = "None";
/**
* Custom field can be used with TestRun artifact.
*/
CustomTestFieldScope[CustomTestFieldScope["TestRun"] = 1] = "TestRun";
/**
* Custom field can be used with TestResult artifact.
*/
CustomTestFieldScope[CustomTestFieldScope["TestResult"] = 2] = "TestResult";
/**
* Custom test field can be used with either TestRun or TestResult artifact.
*/
CustomTestFieldScope[CustomTestFieldScope["TestRunAndTestResult"] = 3] = "TestRunAndTestResult";
/**
* Reserved for internal Azure DevOps functionality. Not to be used.
*/
CustomTestFieldScope[CustomTestFieldScope["System"] = 4] = "System";
CustomTestFieldScope[CustomTestFieldScope["All"] = 7] = "All";
})(CustomTestFieldScope = exports.CustomTestFieldScope || (exports.CustomTestFieldScope = {}));
/**
* Data type of the custom test field
*/
var CustomTestFieldType;
(function (CustomTestFieldType) {
/**
* Boolean data type.
*/
CustomTestFieldType[CustomTestFieldType["Bit"] = 2] = "Bit";
/**
* Datetime data type.
*/
CustomTestFieldType[CustomTestFieldType["DateTime"] = 4] = "DateTime";
/**
* Integer data type.
*/
CustomTestFieldType[CustomTestFieldType["Int"] = 8] = "Int";
/**
* Floating integer data type.
*/
CustomTestFieldType[CustomTestFieldType["Float"] = 6] = "Float";
/**
* String data type.
*/
CustomTestFieldType[CustomTestFieldType["String"] = 12] = "String";
/**
* Unique identifier data type.
*/
CustomTestFieldType[CustomTestFieldType["Guid"] = 14] = "Guid";

@@ -228,0 +264,0 @@ })(CustomTestFieldType = exports.CustomTestFieldType || (exports.CustomTestFieldType = {}));

@@ -185,3 +185,5 @@ import { IVssRestClientOptions } from "../Common/Context";

/**
* @param newFields -
* Creates custom test fields based on the data provided.
*
* @param newFields - NewFields is an array of type CustomTestFieldDefinition.
* @param project - Project ID or project name

@@ -191,13 +193,19 @@ */

/**
* Returns List of custom test fields for the given custom test field scope.
*
* @param project - Project ID or project name
* @param scopeFilter -
* @param scopeFilter - Scope of custom test fields which are to be returned.
*/
queryCustomFields(project: string, scopeFilter: Test.CustomTestFieldScope): Promise<Test.CustomTestFieldDefinition[]>;
/**
* Returns details of the custom test field for the specified testExtensionFieldId.
*
* @param project - Project ID or project name
* @param testExtensionFieldId -
* @param testExtensionFieldId - Custom test field id which has to be deleted.
*/
deleteCustomFieldById(project: string, testExtensionFieldId: number): Promise<void>;
/**
* @param updateCustomTestField -
* Returns details of the custom test field which is updated.
*
* @param updateCustomTestField - Custom test field which has to be updated.
* @param project - Project ID or project name

@@ -787,9 +795,2 @@ */

/**
* Retrieves Test runs associated to a session
*
* @param project - Project ID or project name
* @param sessionId - Id of TestResults session to obtain Test Runs for.
*/
getTestRunsBySessionId(project: string, sessionId: number): Promise<number[]>;
/**
* Creates TestResultsSession object in TCM data store

@@ -887,2 +888,24 @@ *

/**
* Creates test result machines for the provided TestRunId
*
* @param testResultMachines - List of machines for test results in the run
* @param project - Project ID or project name
* @param runId - ID of the TestRun to add machines for
*/
createTestResultMachines(testResultMachines: Test.TestResultMachine[], project: string, runId: number): Promise<void>;
/**
* Gets test result machines for the provided TestRunId
*
* @param project - Project ID or project name
* @param runId - ID of the TestRun to add machines for
*/
getTestResultMachines(project: string, runId: number): Promise<Test.TestResultMachine[]>;
/**
* Retrieves Test runs associated to a session
*
* @param project - Project ID or project name
* @param sessionId - Id of TestResults session to obtain Test Runs for.
*/
getTestRunsBySessionId(project: string, sessionId: number): Promise<number[]>;
/**
* @param testSettings -

@@ -889,0 +912,0 @@ * @param project - Project ID or project name

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

var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function s(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{a(s.next(e))}catch(e){i(e)}}function u(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(o,u)}a((s=s.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(o){return function(r){if(s)throw new TypeError("Generator is already executing.");for(;u;)try{if(s=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,n=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){u.label=r[1];break}if(6===r[0]&&u.label<i[1]){u.label=i[1],i=r;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(r);break}i[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],n=0}finally{s=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}var s,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createTestIterationResultAttachment=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={iterationId:n,actionPath:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:s},queryParams:o,body:e})]})})},t.prototype.createTestResultAttachment=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:s},body:e})]})})},t.prototype.createTestSubResultAttachment=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testSubResultId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:s},queryParams:i,body:e})]})})},t.prototype.deleteTestResultAttachment=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s}})]})})},t.prototype.getTestIterationAttachmentContent=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={iterationId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s},queryParams:i})]})})},t.prototype.getTestIterationAttachmentZip=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={iterationId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s},queryParams:i})]})})},t.prototype.getTestResultAttachmentContent=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s}})]})})},t.prototype.getTestResultAttachments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.getTestResultAttachmentZip=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s}})]})})},t.prototype.getTestSubResultAttachmentContent=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testSubResultId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s},queryParams:i})]})})},t.prototype.getTestSubResultAttachments=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={testSubResultId:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r},queryParams:n})]})})},t.prototype.getTestSubResultAttachmentZip=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testSubResultId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s},queryParams:i})]})})},t.prototype.createTestRunAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.deleteTestRunAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getTestRunAttachmentContent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getTestRunAttachments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunAttachmentZip=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getBugsLinkedToTestResult=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/bugs",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.fetchSourceCodeCoverageReport=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/codecoverage/sourceview",routeValues:{project:e},queryParams:r})]})})},t.prototype.getBuildCodeCoverage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildId:t,flags:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/codecoverage",routeValues:{project:e},queryParams:s})]})})},t.prototype.getCodeCoverageSummary=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildId:t,deltaBuildId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/codecoverage",routeValues:{project:e},queryParams:s})]})})},t.prototype.updateCodeCoverageSummary=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/codecoverage",routeValues:{project:e},queryParams:s,body:r})]})})},t.prototype.getTestRunCodeCoverage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={flags:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/codecoverage",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.addCustomFields=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/extensionfields",routeValues:{project:t},body:e})]})})},t.prototype.queryCustomFields=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={scopeFilter:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/extensionfields",routeValues:{project:e},queryParams:r})]})})},t.prototype.deleteCustomFieldById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/extensionfields/{testExtensionFieldId}",routeValues:{project:e,testExtensionFieldId:t}})]})})},t.prototype.updateCustomField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testresults/extensionfields/{testExtensionFieldId}",routeValues:{project:t},body:e})]})})},t.prototype.getFileLevelCodeCoverage=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/testresults/codecoverage/filecoverage",routeValues:{project:t},body:e})]})})},t.prototype.getFlakyTestResultsByBuildDefinitionId=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildDefinitionId:t,minBuildCreatedDate:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/flakytestresults/builddefinition",routeValues:{project:e},queryParams:s})]})})},t.prototype.getFlakyTestResultsByTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/flakytestresults/runs/{runId}",routeValues:{project:e,runId:t}})]})})},t.prototype.queryTestResultHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/results/History",routeValues:{project:t},body:e})]})})},t.prototype.getTestRunMessageLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/MessageLogs",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestPipelineMetrics=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={pipelineId:t,stageName:r,phaseName:s,jobName:n,metricNames:i&&i.join(","),groupByNode:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/metrics",routeValues:{project:e},queryParams:u})]})})},t.prototype.getTestResultDetailsForBuild=function(e,t,r,s,n,i,o,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(p){return a={buildId:t,publishContext:r,groupBy:s,$filter:n,$orderby:i,shouldIncludeResults:o,queryRunSummaryForInProgress:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultdetailsbybuild",routeValues:{project:e},queryParams:a})]})})},t.prototype.getTestResultDetailsForRelease=function(e,t,r,s,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(c){return p={releaseId:t,releaseEnvId:r,publishContext:s,groupBy:n,$filter:i,$orderby:o,shouldIncludeResults:u,queryRunSummaryForInProgress:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultdetailsbyrelease",routeValues:{project:e},queryParams:p})]})})},t.prototype.publishTestResultDocument=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/ResultDocument",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getResultGroupsByBuild=function(e,t,r,n,i){return __awaiter(this,void 0,void 0,function(){var o,u=this;return __generator(this,function(a){return o={buildId:t,publishContext:r,fields:n&&n.join(","),continuationToken:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultgroupsbybuild",routeValues:{project:e},queryParams:o,returnRawResponse:!0}).then(function(e){return __awaiter(u,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getResultGroupsByRelease=function(e,t,r,n,i,o){return __awaiter(this,void 0,void 0,function(){var u,a=this;return __generator(this,function(p){return u={releaseId:t,publishContext:r,releaseEnvId:n,fields:i&&i.join(","),continuationToken:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultgroupsbyrelease",routeValues:{project:e},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.queryTestResultsMetaData=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={detailsToInclude:r},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"POST",routeTemplate:"{project}/_apis/testresults/results/ResultMetaData/{testCaseReferenceId}",routeValues:{project:t},queryParams:s,body:e})]})})},t.prototype.updateTestResultsMetaData=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/testresults/results/ResultMetaData/{testCaseReferenceId}",routeValues:{project:t,testCaseReferenceId:r},body:e})]})})},t.prototype.getTestResultsByQuery=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/results",routeValues:{project:t},body:e})]})})},t.prototype.getTestResultsByQueryWiql=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={includeResultDetails:r,includeIterationDetails:s,$skip:n,$top:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/results/query",routeValues:{project:t},queryParams:o,body:e})]})})},t.prototype.addTestResultsToTestRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultById=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={detailsToInclude:s},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}",routeValues:{project:e,runId:t,testResultId:r},queryParams:n})]})})},t.prototype.getTestResults=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={detailsToInclude:r,$skip:s,$top:n,outcomes:i&&i.join(","),$newTestsOnly:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}",routeValues:{project:e,runId:t},queryParams:u})]})})},t.prototype.updateTestResults=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultsByBuild=function(e,t,r,n,i,o){return __awaiter(this,void 0,void 0,function(){var u,a=this;return __generator(this,function(p){return u={buildId:t,publishContext:r,outcomes:n&&n.join(","),$top:i,continuationToken:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsbybuild",routeValues:{project:e},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestResultsByPipeline=function(e,t,r,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p,c=this;return __generator(this,function(l){return p={pipelineId:t,stageName:r,phaseName:n,jobName:i,outcomes:o&&o.join(","),$top:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsbypipeline",routeValues:{project:e},customHeaders:{"x-ms-continuationtoken":a},queryParams:p,returnRawResponse:!0}).then(function(e){return __awaiter(c,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestResultsByRelease=function(e,t,r,n,i,o,u){return __awaiter(this,void 0,void 0,function(){var a,p=this;return __generator(this,function(c){return a={releaseId:t,releaseEnvid:r,publishContext:n,outcomes:i&&i.join(","),$top:o,continuationToken:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsbyrelease",routeValues:{project:e},queryParams:a,returnRawResponse:!0}).then(function(e){return __awaiter(p,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.testResultsGroupDetails=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={pipelineId:t,stageName:r,phaseName:s,jobName:n,shouldIncludeFailedAndAbortedResults:i,queryGroupSummaryForInProgress:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsgroupDetails",routeValues:{project:e},queryParams:u})]})})},t.prototype.queryTestResultsReportForBuild=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={buildId:t,publishContext:r,includeFailureDetails:s,buildToCompare:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsummarybybuild",routeValues:{project:e},queryParams:i})]})})},t.prototype.queryTestResultsReportForPipeline=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={pipelineId:t,stageName:r,phaseName:s,jobName:n,includeFailureDetails:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsummarybypipeline",routeValues:{project:e},queryParams:o})]})})},t.prototype.queryTestResultsReportForRelease=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={releaseId:t,releaseEnvId:r,publishContext:s,includeFailureDetails:n,releaseToCompare:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsummarybyrelease",routeValues:{project:e},queryParams:o})]})})},t.prototype.queryTestResultsSummaryForReleases=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/resultsummarybyrelease",routeValues:{project:t},body:e})]})})},t.prototype.queryTestSummaryByRequirement=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={workItemIds:r&&r.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/resultsummarybyrequirement",routeValues:{project:t},queryParams:s,body:e})]})})},t.prototype.queryResultTrendForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/ResultTrendByBuild",routeValues:{project:t},body:e})]})})},t.prototype.queryResultTrendForRelease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/ResultTrendByRelease",routeValues:{project:t},body:e})]})})},t.prototype.createTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunById=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={includeDetails:r,includeTags:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:e,runId:t},queryParams:n})]})})},t.prototype.getTestRuns=function(e,t,r,s,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(c){return p={buildUri:t,owner:r,tmiRunId:s,planId:n,includeRunDetails:i,automated:o,$skip:u,$top:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:e},queryParams:p})]})})},t.prototype.queryTestRuns=function(e,t,r,n,i,o,u,a,p,c,l,d,_,h,v,f,m){return __awaiter(this,void 0,void 0,function(){var g,y=this;return __generator(this,function(T){return g={minLastUpdatedDate:t,maxLastUpdatedDate:r,state:n,planIds:i&&i.join(","),isAutomated:o,publishContext:u,buildIds:a&&a.join(","),buildDefIds:p&&p.join(","),branchName:c,releaseIds:l&&l.join(","),releaseDefIds:d&&d.join(","),releaseEnvIds:_&&_.join(","),releaseEnvDefIds:h&&h.join(","),runTitle:v,$top:f,continuationToken:m},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:e},queryParams:g,returnRawResponse:!0}).then(function(e){return __awaiter(y,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestRunSummaryByOutcome=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/runsummary",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestResultsSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={settingsType:t},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/testresults/settings",routeValues:{project:e},queryParams:r})]})})},t.prototype.updatePipelinesTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/testresults/settings",routeValues:{project:t},body:e})]})})},t.prototype.getSimilarTestResults=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={testSubResultId:s,$top:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}/SimilarTestResults",routeValues:{project:e,runId:t,testResultId:r},customHeaders:{"x-ms-continuationtoken":i},queryParams:o})]})})},t.prototype.getTestRunStatistics=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/runs/{runId}/statistics",routeValues:{project:e,runId:t}})]})})},t.prototype.getCoverageStatusBadge=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={branchName:r,label:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/codecoverage/status/{*definition}",routeValues:{project:e,definition:t},queryParams:n})]})})},t.prototype.getTestTagsForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/tags",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestTagsForRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={releaseId:t,releaseEnvId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/tags",routeValues:{project:e},queryParams:s})]})})},t.prototype.updateTestRunTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testresults/runs/{runId}/tags",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestTagSummaryForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/tagsummary",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestTagSummaryForRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={releaseId:t,releaseEnvId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/tagsummary",routeValues:{project:e},queryParams:s})]})})},t.prototype.createBuildAttachmentInLogStore=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/uploadbuildattachments/{buildId}",routeValues:{project:t,buildId:r},body:e})]})})},t.prototype.createTestRunLogStoreAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.deleteTestRunLogStoreAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={filename:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.getTestRunLogStoreAttachmentContent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={filename:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.getTestRunLogStoreAttachments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunLogStoreAttachmentZip=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={filename:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.createFailureType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/testfailuretype/{failureTypeId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteFailureType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/testfailuretype/{failureTypeId}",routeValues:{project:e,failureTypeId:t}})]})})},t.prototype.getFailureTypes=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/testfailuretype/{failureTypeId}",routeValues:{project:e}})]})})},t.prototype.queryTestHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/results/TestHistory",routeValues:{project:t},body:e})]})})},t.prototype.getTestLogsForBuild=function(e,t,r,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p,c=this;return __generator(this,function(l){return p={buildId:t,type:r,directoryPath:n,fileNamePrefix:i,fetchMetaData:o,top:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/testlog",routeValues:{project:e},customHeaders:{"x-ms-continuationtoken":a},queryParams:p,returnRawResponse:!0}).then(function(e){return __awaiter(c,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestResultLogs=function(e,t,r,n,i,o,u,a,p){return __awaiter(this,void 0,void 0,function(){var c,l=this;return __generator(this,function(d){return c={type:n,directoryPath:i,fileNamePrefix:o,fetchMetaData:u,top:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlog",routeValues:{project:e,runId:t,resultId:r},customHeaders:{"x-ms-continuationtoken":p},queryParams:c,returnRawResponse:!0}).then(function(e){return __awaiter(l,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestSubResultLogs=function(e,t,r,n,i,o,u,a,p,c){return __awaiter(this,void 0,void 0,function(){var l,d=this;return __generator(this,function(_){return l={subResultId:n,type:i,directoryPath:o,fileNamePrefix:u,fetchMetaData:a,top:p},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlog",routeValues:{project:e,runId:t,resultId:r},customHeaders:{"x-ms-continuationtoken":c},queryParams:l,returnRawResponse:!0}).then(function(e){return __awaiter(d,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestRunLogs=function(e,t,r,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p,c=this;return __generator(this,function(l){return p={type:r,directoryPath:n,fileNamePrefix:i,fetchMetaData:o,top:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testlog",routeValues:{project:e,runId:t},customHeaders:{"x-ms-continuationtoken":a},queryParams:p,returnRawResponse:!0}).then(function(e){return __awaiter(c,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestLogStoreEndpointDetailsForBuildLog=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={build:t,type:r,filePath:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/testlogstoreendpoint",routeValues:{project:e},queryParams:n})]})})},t.prototype.testLogStoreEndpointDetailsForBuild=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildId:t,testLogStoreOperationType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/testlogstoreendpoint",routeValues:{project:e},queryParams:s})]})})},t.prototype.getTestLogStoreEndpointDetailsForResultLog=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={type:s,filePath:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",routeValues:{project:e,runId:t,resultId:r},queryParams:i})]})})},t.prototype.getTestLogStoreEndpointDetailsForSubResultLog=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={subResultId:s,type:n,filePath:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",routeValues:{project:e,runId:t,resultId:r},queryParams:o})]})})},t.prototype.testLogStoreEndpointDetailsForResult=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={subResultId:s,filePath:n,type:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",routeValues:{project:e,runId:t,resultId:r},queryParams:o})]})})},t.prototype.getTestLogStoreEndpointDetailsForRunLog=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={type:r,filePath:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint",routeValues:{project:e,runId:t},queryParams:n})]})})},t.prototype.testLogStoreEndpointDetailsForRun=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testLogStoreOperationType:r,filePath:s,type:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint",routeValues:{project:e,runId:t},queryParams:i})]})})},t.prototype.getTestRunsBySessionId=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/runs",routeValues:{project:e,sessionId:t}})]})})},t.prototype.createTestSession=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/session",routeValues:{project:t},body:e})]})})},t.prototype.getTestSession=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/session",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestSessionLayout=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={sessionId:t},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/session",routeValues:{project:e},queryParams:r})]})})},t.prototype.createAnalysis=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/analysis",routeValues:{project:t,sessionId:r},body:e})]})})},t.prototype.createEnvironment=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/environment",routeValues:{project:t},body:e})]})})},t.prototype.createEnvironmentAndMachine=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/environment",routeValues:{project:t,sessionId:r},body:e})]})})},t.prototype.getTestSessionLayoutBySessionId=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/session/{sessionId}/layout",routeValues:{project:e,sessionId:t}})]})})},t.prototype.createNotification=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/notifications",routeValues:{project:t,sessionId:r},body:e})]})})},t.prototype.getSessionNotifications=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/notifications",routeValues:{project:e,sessionId:t}})]})})},t.prototype.addTestResultsToTestRunSession=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestSessionResults=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={detailsToInclude:r,$skip:s,$top:n,outcomes:i&&i.join(","),$newTestsOnly:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",routeValues:{project:e,runId:t},queryParams:u})]})})},t.prototype.updateTestResultsToTestRunSession=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.createTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/testsettings",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={testSettingsId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/testsettings",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestSettingsById=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={testSettingsId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/testsettings",routeValues:{project:e},queryParams:r})]})})},t.prototype.addWorkItemToTestLinks=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testmethods/workitems",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestMethodToWorkItemLink=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={testName:t,workItemId:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/testresults/testmethods/{testName}/workitems/{workItemId}",routeValues:{project:e},queryParams:s})]})})},t.prototype.queryTestMethodLinkedWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={testName:t},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testmethods/{testName}/workitems/{workItemId}",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestResultWorkItemsById=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/workitems",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.queryTestResultWorkItems=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={workItemCategory:t,automatedTestName:r,testCaseId:s,maxCompleteDate:n,days:i,$workItemCount:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/results/workitems",routeValues:{project:e},queryParams:u})]})})},t.RESOURCE_AREA_ID="c83eaf52-edf3-4034-ae11-17d38f25404c",t}(r.RestClientBase);t.TestResultsRestClient=n});
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function s(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{a(s.next(e))}catch(e){i(e)}}function u(e){try{a(s.throw(e))}catch(e){i(e)}}function a(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(o,u)}a((s=s.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(o){return function(r){if(s)throw new TypeError("Generator is already executing.");for(;u;)try{if(s=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,n=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){u.label=r[1];break}if(6===r[0]&&u.label<i[1]){u.label=i[1],i=r;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(r);break}i[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],n=0}finally{s=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}var s,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createTestIterationResultAttachment=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={iterationId:n,actionPath:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:s},queryParams:o,body:e})]})})},t.prototype.createTestResultAttachment=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:s},body:e})]})})},t.prototype.createTestSubResultAttachment=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testSubResultId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:t,runId:r,testCaseResultId:s},queryParams:i,body:e})]})})},t.prototype.deleteTestResultAttachment=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s}})]})})},t.prototype.getTestIterationAttachmentContent=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={iterationId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s},queryParams:i})]})})},t.prototype.getTestIterationAttachmentZip=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={iterationId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s},queryParams:i})]})})},t.prototype.getTestResultAttachmentContent=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s}})]})})},t.prototype.getTestResultAttachments=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.getTestResultAttachmentZip=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s}})]})})},t.prototype.getTestSubResultAttachmentContent=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testSubResultId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s},queryParams:i})]})})},t.prototype.getTestSubResultAttachments=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={testSubResultId:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r},queryParams:n})]})})},t.prototype.getTestSubResultAttachmentZip=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testSubResultId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,testCaseResultId:r,attachmentId:s},queryParams:i})]})})},t.prototype.createTestRunAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.deleteTestRunAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getTestRunAttachmentContent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getTestRunAttachments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunAttachmentZip=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",routeValues:{project:e,runId:t,attachmentId:r}})]})})},t.prototype.getBugsLinkedToTestResult=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/bugs",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.fetchSourceCodeCoverageReport=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/codecoverage/sourceview",routeValues:{project:e},queryParams:r})]})})},t.prototype.getBuildCodeCoverage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildId:t,flags:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/codecoverage",routeValues:{project:e},queryParams:s})]})})},t.prototype.getCodeCoverageSummary=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildId:t,deltaBuildId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/codecoverage",routeValues:{project:e},queryParams:s})]})})},t.prototype.updateCodeCoverageSummary=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/codecoverage",routeValues:{project:e},queryParams:s,body:r})]})})},t.prototype.getTestRunCodeCoverage=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={flags:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/codecoverage",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.addCustomFields=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/extensionfields",routeValues:{project:t},body:e})]})})},t.prototype.queryCustomFields=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={scopeFilter:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/extensionfields",routeValues:{project:e},queryParams:r})]})})},t.prototype.deleteCustomFieldById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/extensionfields/{testExtensionFieldId}",routeValues:{project:e,testExtensionFieldId:t}})]})})},t.prototype.updateCustomField=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testresults/extensionfields/{testExtensionFieldId}",routeValues:{project:t},body:e})]})})},t.prototype.getFileLevelCodeCoverage=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",httpResponseType:"text/plain",routeTemplate:"{project}/_apis/testresults/codecoverage/filecoverage",routeValues:{project:t},body:e})]})})},t.prototype.getFlakyTestResultsByBuildDefinitionId=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildDefinitionId:t,minBuildCreatedDate:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/flakytestresults/builddefinition",routeValues:{project:e},queryParams:s})]})})},t.prototype.getFlakyTestResultsByTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/flakytestresults/runs/{runId}",routeValues:{project:e,runId:t}})]})})},t.prototype.queryTestResultHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/results/History",routeValues:{project:t},body:e})]})})},t.prototype.getTestRunMessageLogs=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/MessageLogs",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestPipelineMetrics=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={pipelineId:t,stageName:r,phaseName:s,jobName:n,metricNames:i&&i.join(","),groupByNode:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/metrics",routeValues:{project:e},queryParams:u})]})})},t.prototype.getTestResultDetailsForBuild=function(e,t,r,s,n,i,o,u){return __awaiter(this,void 0,void 0,function(){var a;return __generator(this,function(p){return a={buildId:t,publishContext:r,groupBy:s,$filter:n,$orderby:i,shouldIncludeResults:o,queryRunSummaryForInProgress:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultdetailsbybuild",routeValues:{project:e},queryParams:a})]})})},t.prototype.getTestResultDetailsForRelease=function(e,t,r,s,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(c){return p={releaseId:t,releaseEnvId:r,publishContext:s,groupBy:n,$filter:i,$orderby:o,shouldIncludeResults:u,queryRunSummaryForInProgress:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultdetailsbyrelease",routeValues:{project:e},queryParams:p})]})})},t.prototype.publishTestResultDocument=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/ResultDocument",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getResultGroupsByBuild=function(e,t,r,n,i){return __awaiter(this,void 0,void 0,function(){var o,u=this;return __generator(this,function(a){return o={buildId:t,publishContext:r,fields:n&&n.join(","),continuationToken:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultgroupsbybuild",routeValues:{project:e},queryParams:o,returnRawResponse:!0}).then(function(e){return __awaiter(u,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getResultGroupsByRelease=function(e,t,r,n,i,o){return __awaiter(this,void 0,void 0,function(){var u,a=this;return __generator(this,function(p){return u={releaseId:t,publishContext:r,releaseEnvId:n,fields:i&&i.join(","),continuationToken:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultgroupsbyrelease",routeValues:{project:e},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.queryTestResultsMetaData=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={detailsToInclude:r},[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"POST",routeTemplate:"{project}/_apis/testresults/results/ResultMetaData/{testCaseReferenceId}",routeValues:{project:t},queryParams:s,body:e})]})})},t.prototype.updateTestResultsMetaData=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.4",method:"PATCH",routeTemplate:"{project}/_apis/testresults/results/ResultMetaData/{testCaseReferenceId}",routeValues:{project:t,testCaseReferenceId:r},body:e})]})})},t.prototype.getTestResultsByQuery=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/results",routeValues:{project:t},body:e})]})})},t.prototype.getTestResultsByQueryWiql=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={includeResultDetails:r,includeIterationDetails:s,$skip:n,$top:i},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/results/query",routeValues:{project:t},queryParams:o,body:e})]})})},t.prototype.addTestResultsToTestRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultById=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={detailsToInclude:s},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}",routeValues:{project:e,runId:t,testResultId:r},queryParams:n})]})})},t.prototype.getTestResults=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={detailsToInclude:r,$skip:s,$top:n,outcomes:i&&i.join(","),$newTestsOnly:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}",routeValues:{project:e,runId:t},queryParams:u})]})})},t.prototype.updateTestResults=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultsByBuild=function(e,t,r,n,i,o){return __awaiter(this,void 0,void 0,function(){var u,a=this;return __generator(this,function(p){return u={buildId:t,publishContext:r,outcomes:n&&n.join(","),$top:i,continuationToken:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsbybuild",routeValues:{project:e},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestResultsByPipeline=function(e,t,r,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p,c=this;return __generator(this,function(l){return p={pipelineId:t,stageName:r,phaseName:n,jobName:i,outcomes:o&&o.join(","),$top:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsbypipeline",routeValues:{project:e},customHeaders:{"x-ms-continuationtoken":a},queryParams:p,returnRawResponse:!0}).then(function(e){return __awaiter(c,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestResultsByRelease=function(e,t,r,n,i,o,u){return __awaiter(this,void 0,void 0,function(){var a,p=this;return __generator(this,function(c){return a={releaseId:t,releaseEnvid:r,publishContext:n,outcomes:i&&i.join(","),$top:o,continuationToken:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsbyrelease",routeValues:{project:e},queryParams:a,returnRawResponse:!0}).then(function(e){return __awaiter(p,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.testResultsGroupDetails=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={pipelineId:t,stageName:r,phaseName:s,jobName:n,shouldIncludeFailedAndAbortedResults:i,queryGroupSummaryForInProgress:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsgroupDetails",routeValues:{project:e},queryParams:u})]})})},t.prototype.queryTestResultsReportForBuild=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={buildId:t,publishContext:r,includeFailureDetails:s,buildToCompare:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsummarybybuild",routeValues:{project:e},queryParams:i})]})})},t.prototype.queryTestResultsReportForPipeline=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={pipelineId:t,stageName:r,phaseName:s,jobName:n,includeFailureDetails:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsummarybypipeline",routeValues:{project:e},queryParams:o})]})})},t.prototype.queryTestResultsReportForRelease=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={releaseId:t,releaseEnvId:r,publishContext:s,includeFailureDetails:n,releaseToCompare:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/resultsummarybyrelease",routeValues:{project:e},queryParams:o})]})})},t.prototype.queryTestResultsSummaryForReleases=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/resultsummarybyrelease",routeValues:{project:t},body:e})]})})},t.prototype.queryTestSummaryByRequirement=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={workItemIds:r&&r.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/resultsummarybyrequirement",routeValues:{project:t},queryParams:s,body:e})]})})},t.prototype.queryResultTrendForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/ResultTrendByBuild",routeValues:{project:t},body:e})]})})},t.prototype.queryResultTrendForRelease=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/ResultTrendByRelease",routeValues:{project:t},body:e})]})})},t.prototype.createTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestRun=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunById=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={includeDetails:r,includeTags:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:e,runId:t},queryParams:n})]})})},t.prototype.getTestRuns=function(e,t,r,s,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p;return __generator(this,function(c){return p={buildUri:t,owner:r,tmiRunId:s,planId:n,includeRunDetails:i,automated:o,$skip:u,$top:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:e},queryParams:p})]})})},t.prototype.queryTestRuns=function(e,t,r,n,i,o,u,a,p,c,l,d,_,h,v,f,m){return __awaiter(this,void 0,void 0,function(){var g,y=this;return __generator(this,function(T){return g={minLastUpdatedDate:t,maxLastUpdatedDate:r,state:n,planIds:i&&i.join(","),isAutomated:o,publishContext:u,buildIds:a&&a.join(","),buildDefIds:p&&p.join(","),branchName:c,releaseIds:l&&l.join(","),releaseDefIds:d&&d.join(","),releaseEnvIds:_&&_.join(","),releaseEnvDefIds:h&&h.join(","),runTitle:v,$top:f,continuationToken:m},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:e},queryParams:g,returnRawResponse:!0}).then(function(e){return __awaiter(y,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestRun=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testresults/runs/{runId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestRunSummaryByOutcome=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/runsummary",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestResultsSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={settingsType:t},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/testresults/settings",routeValues:{project:e},queryParams:r})]})})},t.prototype.updatePipelinesTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/testresults/settings",routeValues:{project:t},body:e})]})})},t.prototype.getSimilarTestResults=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={testSubResultId:s,$top:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testResultId}/SimilarTestResults",routeValues:{project:e,runId:t,testResultId:r},customHeaders:{"x-ms-continuationtoken":i},queryParams:o})]})})},t.prototype.getTestRunStatistics=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/runs/{runId}/statistics",routeValues:{project:e,runId:t}})]})})},t.prototype.getCoverageStatusBadge=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={branchName:r,label:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/codecoverage/status/{*definition}",routeValues:{project:e,definition:t},queryParams:n})]})})},t.prototype.getTestTagsForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/tags",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestTagsForRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={releaseId:t,releaseEnvId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/tags",routeValues:{project:e},queryParams:s})]})})},t.prototype.updateTestRunTags=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testresults/runs/{runId}/tags",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestTagSummaryForBuild=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/tagsummary",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestTagSummaryForRelease=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={releaseId:t,releaseEnvId:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/tagsummary",routeValues:{project:e},queryParams:s})]})})},t.prototype.createBuildAttachmentInLogStore=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/uploadbuildattachments/{buildId}",routeValues:{project:t,buildId:r},body:e})]})})},t.prototype.createTestRunLogStoreAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.deleteTestRunLogStoreAttachment=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={filename:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.getTestRunLogStoreAttachmentContent=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={filename:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.getTestRunLogStoreAttachments=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunLogStoreAttachmentZip=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={filename:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",httpResponseType:"application/zip",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testattachments",routeValues:{project:e,runId:t},queryParams:s})]})})},t.prototype.createFailureType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/testfailuretype/{failureTypeId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteFailureType=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/testfailuretype/{failureTypeId}",routeValues:{project:e,failureTypeId:t}})]})})},t.prototype.getFailureTypes=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/testfailuretype/{failureTypeId}",routeValues:{project:e}})]})})},t.prototype.queryTestHistory=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/results/TestHistory",routeValues:{project:t},body:e})]})})},t.prototype.getTestLogsForBuild=function(e,t,r,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p,c=this;return __generator(this,function(l){return p={buildId:t,type:r,directoryPath:n,fileNamePrefix:i,fetchMetaData:o,top:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/testlog",routeValues:{project:e},customHeaders:{"x-ms-continuationtoken":a},queryParams:p,returnRawResponse:!0}).then(function(e){return __awaiter(c,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestResultLogs=function(e,t,r,n,i,o,u,a,p){return __awaiter(this,void 0,void 0,function(){var c,l=this;return __generator(this,function(d){return c={type:n,directoryPath:i,fileNamePrefix:o,fetchMetaData:u,top:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlog",routeValues:{project:e,runId:t,resultId:r},customHeaders:{"x-ms-continuationtoken":p},queryParams:c,returnRawResponse:!0}).then(function(e){return __awaiter(l,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestSubResultLogs=function(e,t,r,n,i,o,u,a,p,c){return __awaiter(this,void 0,void 0,function(){var l,d=this;return __generator(this,function(_){return l={subResultId:n,type:i,directoryPath:o,fileNamePrefix:u,fetchMetaData:a,top:p},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlog",routeValues:{project:e,runId:t,resultId:r},customHeaders:{"x-ms-continuationtoken":c},queryParams:l,returnRawResponse:!0}).then(function(e){return __awaiter(d,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestRunLogs=function(e,t,r,n,i,o,u,a){return __awaiter(this,void 0,void 0,function(){var p,c=this;return __generator(this,function(l){return p={type:r,directoryPath:n,fileNamePrefix:i,fetchMetaData:o,top:u},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testlog",routeValues:{project:e,runId:t},customHeaders:{"x-ms-continuationtoken":a},queryParams:p,returnRawResponse:!0}).then(function(e){return __awaiter(c,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(s.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getTestLogStoreEndpointDetailsForBuildLog=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={build:t,type:r,filePath:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/testlogstoreendpoint",routeValues:{project:e},queryParams:n})]})})},t.prototype.testLogStoreEndpointDetailsForBuild=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={buildId:t,testLogStoreOperationType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/testlogstoreendpoint",routeValues:{project:e},queryParams:s})]})})},t.prototype.getTestLogStoreEndpointDetailsForResultLog=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={type:s,filePath:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",routeValues:{project:e,runId:t,resultId:r},queryParams:i})]})})},t.prototype.getTestLogStoreEndpointDetailsForSubResultLog=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={subResultId:s,type:n,filePath:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",routeValues:{project:e,runId:t,resultId:r},queryParams:o})]})})},t.prototype.testLogStoreEndpointDetailsForResult=function(e,t,r,s,n,i){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(u){return o={subResultId:s,filePath:n,type:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",routeValues:{project:e,runId:t,resultId:r},queryParams:o})]})})},t.prototype.getTestLogStoreEndpointDetailsForRunLog=function(e,t,r,s){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={type:r,filePath:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint",routeValues:{project:e,runId:t},queryParams:n})]})})},t.prototype.testLogStoreEndpointDetailsForRun=function(e,t,r,s,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testLogStoreOperationType:r,filePath:s,type:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint",routeValues:{project:e,runId:t},queryParams:i})]})})},t.prototype.createTestSession=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/session",routeValues:{project:t},body:e})]})})},t.prototype.getTestSession=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={buildId:t},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/session",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestSessionLayout=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={sessionId:t},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/session",routeValues:{project:e},queryParams:r})]})})},t.prototype.createAnalysis=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/analysis",routeValues:{project:t,sessionId:r},body:e})]})})},t.prototype.createEnvironment=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/environment",routeValues:{project:t},body:e})]})})},t.prototype.createEnvironmentAndMachine=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/machines",routeValues:{project:t,sessionId:r},body:e})]})})},t.prototype.getTestSessionLayoutBySessionId=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/session/{sessionId}/layout",routeValues:{project:e,sessionId:t}})]})})},t.prototype.createNotification=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/notifications",routeValues:{project:t,sessionId:r},body:e})]})})},t.prototype.getSessionNotifications=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/notifications",routeValues:{project:e,sessionId:t}})]})})},t.prototype.addTestResultsToTestRunSession=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestSessionResults=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={detailsToInclude:r,$skip:s,$top:n,outcomes:i&&i.join(","),$newTestsOnly:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",routeValues:{project:e,runId:t},queryParams:u})]})})},t.prototype.updateTestResultsToTestRunSession=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.createTestResultMachines=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testsession/runs/{runId}/machines",routeValues:{project:t,runId:r},body:e})]})})},t.prototype.getTestResultMachines=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/runs/{runId}/machines",routeValues:{project:e,runId:t}})]})})},t.prototype.getTestRunsBySessionId=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/testsession/{sessionId}/runs",routeValues:{project:e,sessionId:t}})]})})},t.prototype.createTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testresults/testsettings",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestSettings=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={testSettingsId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testresults/testsettings",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestSettingsById=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={testSettingsId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testresults/testsettings",routeValues:{project:e},queryParams:r})]})})},t.prototype.addWorkItemToTestLinks=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testmethods/workitems",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestMethodToWorkItemLink=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(n){return s={testName:t,workItemId:r},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"DELETE",routeTemplate:"{project}/_apis/testresults/testmethods/{testName}/workitems/{workItemId}",routeValues:{project:e},queryParams:s})]})})},t.prototype.queryTestMethodLinkedWorkItems=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(s){return r={testName:t},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testresults/testmethods/{testName}/workitems/{workItemId}",routeValues:{project:e},queryParams:r})]})})},t.prototype.getTestResultWorkItemsById=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(s){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/workitems",routeValues:{project:e,runId:t,testCaseResultId:r}})]})})},t.prototype.queryTestResultWorkItems=function(e,t,r,s,n,i,o){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(a){return u={workItemCategory:t,automatedTestName:r,testCaseId:s,maxCompleteDate:n,days:i,$workItemCount:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testresults/results/workitems",routeValues:{project:e},queryParams:u})]})})},t.RESOURCE_AREA_ID="c83eaf52-edf3-4034-ae11-17d38f25404c",t}(r.RestClientBase);t.TestResultsRestClient=n});

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

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

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

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