azure-devops-extension-api 4.242.0 → 4.245.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Alert/Alert.d.ts +3 -2
- package/Alert/AlertClient.d.ts +12 -0
- package/Alert/AlertClient.js +38 -2
- package/Alert/AlertClient.min.js +1 -1
- package/Build/BuildClient.js +1 -1
- package/Build/BuildClient.min.js +1 -1
- package/Contributions/Contributions.d.ts +5 -1
- package/Contributions/Contributions.js +4 -0
- package/Contributions/Contributions.min.js +1 -1
- package/ExtensionManagement/ExtensionManagement.d.ts +5 -1
- package/ExtensionManagement/ExtensionManagement.js +4 -0
- package/ExtensionManagement/ExtensionManagement.min.js +1 -1
- package/Management/Management.d.ts +0 -32
- package/Management/Management.js +0 -15
- package/Management/Management.min.js +1 -1
- package/Management/ManagementClient.d.ts +0 -25
- package/Management/ManagementClient.js +0 -81
- package/Management/ManagementClient.min.js +1 -1
- package/Pipelines/Pipelines.d.ts +1 -1
- package/Release/ReleaseClient.d.ts +2 -2
- package/Release/ReleaseClient.js +17 -30
- package/Release/ReleaseClient.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpoint.d.ts +11 -0
- package/ServiceEndpoint/ServiceEndpoint.js +7 -0
- package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +5 -0
- package/Test/Test.d.ts +102 -5
- package/Test/Test.js +36 -0
- package/TestPlan/TestPlanClient.d.ts +7 -0
- package/TestPlan/TestPlanClient.js +37 -0
- package/TestPlan/TestPlanClient.min.js +1 -1
- package/TestResults/TestResultsClient.d.ts +34 -11
- package/TestResults/TestResultsClient.js +76 -25
- package/TestResults/TestResultsClient.min.js +1 -1
- package/package.json +1 -1
package/Alert/Alert.d.ts
CHANGED
|
@@ -756,6 +756,7 @@ export interface SarifUploadStatus {
|
|
|
756
756
|
}
|
|
757
757
|
export interface SarifValidationError {
|
|
758
758
|
nodePointer: string;
|
|
759
|
+
ruleId: string;
|
|
759
760
|
validationError: string;
|
|
760
761
|
}
|
|
761
762
|
export interface SearchCriteria {
|
|
@@ -792,9 +793,9 @@ export interface SearchCriteria {
|
|
|
792
793
|
*/
|
|
793
794
|
modifiedSince: Date;
|
|
794
795
|
/**
|
|
795
|
-
* 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.
|
|
796
|
+
* 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.
|
|
796
797
|
*/
|
|
797
|
-
|
|
798
|
+
onlyDefaultBranch: boolean;
|
|
798
799
|
/**
|
|
799
800
|
* If provided with pipelineName, only return alerts detected in this pipeline phase \<br /\>Otherwise, return alerts detected in all phases.
|
|
800
801
|
*/
|
package/Alert/AlertClient.d.ts
CHANGED
|
@@ -70,6 +70,18 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
70
70
|
* @param notificationFlag - Header to signal that this is a progress notification
|
|
71
71
|
*/
|
|
72
72
|
uploadSarif(content: string, project: string, repository: string, notificationFlag?: String): Promise<number>;
|
|
73
|
+
/**
|
|
74
|
+
* Returns the branches for which analysis results were submitted.
|
|
75
|
+
*
|
|
76
|
+
* @param project - Project ID or project name
|
|
77
|
+
* @param repository -
|
|
78
|
+
* @param alertType - The type of alert: Dependency Scanning (1), Secret (2), Code QL (3), etc.
|
|
79
|
+
* @param continuationToken - A string variable that represents the branch name and is used to fetch branches that follow it in alphabetical order.
|
|
80
|
+
* @param branchNameContains - A string variable used to fetch branches that contain this string anywhere in the branch name, case insensitive.
|
|
81
|
+
* @param top - An int variable used to return the top k branches that satisfy the search criteria.
|
|
82
|
+
* @param includePullRequestBranches - A bool variable indicating whether or not to include pull request branches.
|
|
83
|
+
*/
|
|
84
|
+
getBranches(project: string, repository: string, alertType: Alert.AlertType, continuationToken?: string, branchNameContains?: string, top?: number, includePullRequestBranches?: boolean): Promise<Alert.Branch[]>;
|
|
73
85
|
/**
|
|
74
86
|
* @param project - Project ID or project name
|
|
75
87
|
* @param repository -
|
package/Alert/AlertClient.js
CHANGED
|
@@ -265,6 +265,41 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
265
265
|
});
|
|
266
266
|
});
|
|
267
267
|
};
|
|
268
|
+
/**
|
|
269
|
+
* Returns the branches for which analysis results were submitted.
|
|
270
|
+
*
|
|
271
|
+
* @param project - Project ID or project name
|
|
272
|
+
* @param repository -
|
|
273
|
+
* @param alertType - The type of alert: Dependency Scanning (1), Secret (2), Code QL (3), etc.
|
|
274
|
+
* @param continuationToken - A string variable that represents the branch name and is used to fetch branches that follow it in alphabetical order.
|
|
275
|
+
* @param branchNameContains - A string variable used to fetch branches that contain this string anywhere in the branch name, case insensitive.
|
|
276
|
+
* @param top - An int variable used to return the top k branches that satisfy the search criteria.
|
|
277
|
+
* @param includePullRequestBranches - A bool variable indicating whether or not to include pull request branches.
|
|
278
|
+
*/
|
|
279
|
+
AlertRestClient.prototype.getBranches = function (project, repository, alertType, continuationToken, branchNameContains, top, includePullRequestBranches) {
|
|
280
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
281
|
+
var queryValues;
|
|
282
|
+
return __generator(this, function (_a) {
|
|
283
|
+
queryValues = {
|
|
284
|
+
alertType: alertType,
|
|
285
|
+
continuationToken: continuationToken,
|
|
286
|
+
branchNameContains: branchNameContains,
|
|
287
|
+
top: top,
|
|
288
|
+
includePullRequestBranches: includePullRequestBranches
|
|
289
|
+
};
|
|
290
|
+
return [2 /*return*/, this.beginRequest({
|
|
291
|
+
apiVersion: "7.2-preview.1",
|
|
292
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/filters/{action}",
|
|
293
|
+
routeValues: {
|
|
294
|
+
project: project,
|
|
295
|
+
repository: repository,
|
|
296
|
+
action: "Branches"
|
|
297
|
+
},
|
|
298
|
+
queryParams: queryValues
|
|
299
|
+
})];
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
};
|
|
268
303
|
/**
|
|
269
304
|
* @param project - Project ID or project name
|
|
270
305
|
* @param repository -
|
|
@@ -279,10 +314,11 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
279
314
|
};
|
|
280
315
|
return [2 /*return*/, this.beginRequest({
|
|
281
316
|
apiVersion: "7.2-preview.1",
|
|
282
|
-
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/filters",
|
|
317
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/filters/{action}",
|
|
283
318
|
routeValues: {
|
|
284
319
|
project: project,
|
|
285
|
-
repository: repository
|
|
320
|
+
repository: repository,
|
|
321
|
+
action: "Default"
|
|
286
322
|
},
|
|
287
323
|
queryParams: queryValues
|
|
288
324
|
})];
|
package/Alert/AlertClient.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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});
|
|
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.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});
|
package/Build/BuildClient.js
CHANGED
|
@@ -2375,7 +2375,7 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
2375
2375
|
planId: planId
|
|
2376
2376
|
};
|
|
2377
2377
|
return [2 /*return*/, this.beginRequest({
|
|
2378
|
-
apiVersion: "7.2-preview.
|
|
2378
|
+
apiVersion: "7.2-preview.3",
|
|
2379
2379
|
routeTemplate: "{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}",
|
|
2380
2380
|
routeValues: {
|
|
2381
2381
|
project: project,
|
package/Build/BuildClient.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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});
|
|
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.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});
|
|
@@ -566,7 +566,11 @@ export declare enum ExtensionStateFlags {
|
|
|
566
566
|
/**
|
|
567
567
|
* Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported.
|
|
568
568
|
*/
|
|
569
|
-
Warning = 512
|
|
569
|
+
Warning = 512,
|
|
570
|
+
/**
|
|
571
|
+
* Extension is currently unpublished in the marketplace. Extension usage should be reviewed and removed if it is no longer needed
|
|
572
|
+
*/
|
|
573
|
+
Unpublished = 1024
|
|
570
574
|
}
|
|
571
575
|
/**
|
|
572
576
|
* Represents a VSTS extension along with its installation state
|
|
@@ -164,6 +164,10 @@ define(["require", "exports"], function (require, exports) {
|
|
|
164
164
|
* Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported.
|
|
165
165
|
*/
|
|
166
166
|
ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning";
|
|
167
|
+
/**
|
|
168
|
+
* Extension is currently unpublished in the marketplace. Extension usage should be reviewed and removed if it is no longer needed
|
|
169
|
+
*/
|
|
170
|
+
ExtensionStateFlags[ExtensionStateFlags["Unpublished"] = 1024] = "Unpublished";
|
|
167
171
|
})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {}));
|
|
168
172
|
/**
|
|
169
173
|
* Installation issue type (Warning, Error)
|
|
@@ -1 +1 @@
|
|
|
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={}))});
|
|
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",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={}))});
|
|
@@ -965,7 +965,11 @@ export declare enum ExtensionStateFlags {
|
|
|
965
965
|
/**
|
|
966
966
|
* Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported.
|
|
967
967
|
*/
|
|
968
|
-
Warning = 512
|
|
968
|
+
Warning = 512,
|
|
969
|
+
/**
|
|
970
|
+
* Extension is currently unpublished in the marketplace. Extension usage should be reviewed and removed if it is no longer needed
|
|
971
|
+
*/
|
|
972
|
+
Unpublished = 1024
|
|
969
973
|
}
|
|
970
974
|
export declare enum ExtensionUpdateType {
|
|
971
975
|
Installed = 1,
|
|
@@ -253,6 +253,10 @@ define(["require", "exports"], function (require, exports) {
|
|
|
253
253
|
* Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported.
|
|
254
254
|
*/
|
|
255
255
|
ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning";
|
|
256
|
+
/**
|
|
257
|
+
* Extension is currently unpublished in the marketplace. Extension usage should be reviewed and removed if it is no longer needed
|
|
258
|
+
*/
|
|
259
|
+
ExtensionStateFlags[ExtensionStateFlags["Unpublished"] = 1024] = "Unpublished";
|
|
256
260
|
})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {}));
|
|
257
261
|
var ExtensionUpdateType;
|
|
258
262
|
(function (ExtensionUpdateType) {
|
|
@@ -1 +1 @@
|
|
|
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={}))});
|
|
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",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={}))});
|
|
@@ -118,38 +118,6 @@ export interface BilledCommitter {
|
|
|
118
118
|
*/
|
|
119
119
|
userIdentity: WebApi.IdentityRef;
|
|
120
120
|
}
|
|
121
|
-
/**
|
|
122
|
-
* BillingInfo contains an organization, its enablement status and the Azure Subscription for it.
|
|
123
|
-
*/
|
|
124
|
-
export interface BillingInfo {
|
|
125
|
-
advSecEnabled: boolean;
|
|
126
|
-
/**
|
|
127
|
-
* The most recent time the enablement state was modified.
|
|
128
|
-
*/
|
|
129
|
-
advSecEnabledChangedOnDate: Date;
|
|
130
|
-
/**
|
|
131
|
-
* The first time the enablement state was modified.
|
|
132
|
-
*/
|
|
133
|
-
advSecEnabledFirstChangedOnDate: Date;
|
|
134
|
-
azureSubscriptionId: string;
|
|
135
|
-
billingMode: BillingMode;
|
|
136
|
-
organizationId: string;
|
|
137
|
-
tenantId: string;
|
|
138
|
-
}
|
|
139
|
-
export declare enum BillingMode {
|
|
140
|
-
/**
|
|
141
|
-
* None implies the organization is not billable because no Azure Subscription has been set.
|
|
142
|
-
*/
|
|
143
|
-
None = 0,
|
|
144
|
-
/**
|
|
145
|
-
* When an organization is the only organization mapped to an Azure Subscription.
|
|
146
|
-
*/
|
|
147
|
-
SingleOrg = 1,
|
|
148
|
-
/**
|
|
149
|
-
* When an organization is mapped to an Azure Subscription to which at least one other org is mapped.
|
|
150
|
-
*/
|
|
151
|
-
MultiOrg = 2
|
|
152
|
-
}
|
|
153
121
|
/**
|
|
154
122
|
* Information related to billing for Advanced Security services
|
|
155
123
|
*/
|
package/Management/Management.js
CHANGED
|
@@ -6,19 +6,4 @@
|
|
|
6
6
|
define(["require", "exports"], function (require, exports) {
|
|
7
7
|
"use strict";
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
var BillingMode;
|
|
10
|
-
(function (BillingMode) {
|
|
11
|
-
/**
|
|
12
|
-
* None implies the organization is not billable because no Azure Subscription has been set.
|
|
13
|
-
*/
|
|
14
|
-
BillingMode[BillingMode["None"] = 0] = "None";
|
|
15
|
-
/**
|
|
16
|
-
* When an organization is the only organization mapped to an Azure Subscription.
|
|
17
|
-
*/
|
|
18
|
-
BillingMode[BillingMode["SingleOrg"] = 1] = "SingleOrg";
|
|
19
|
-
/**
|
|
20
|
-
* When an organization is mapped to an Azure Subscription to which at least one other org is mapped.
|
|
21
|
-
*/
|
|
22
|
-
BillingMode[BillingMode["MultiOrg"] = 2] = "MultiOrg";
|
|
23
|
-
})(BillingMode = exports.BillingMode || (exports.BillingMode = {}));
|
|
24
9
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports"],function(e,
|
|
1
|
+
define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})});
|
|
@@ -3,31 +3,6 @@ import { RestClientBase } from "../Common/RestClientBase";
|
|
|
3
3
|
import * as Management from "../Management/Management";
|
|
4
4
|
export declare class ManagementRestClient extends RestClientBase {
|
|
5
5
|
constructor(options: IVssRestClientOptions);
|
|
6
|
-
/**
|
|
7
|
-
* Delete the billing info for an organization from config DB.
|
|
8
|
-
*
|
|
9
|
-
* @param organizationId -
|
|
10
|
-
*/
|
|
11
|
-
deleteBillingInfo(organizationId: string): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Delete the meter usage history from Primary SU for an organization.
|
|
14
|
-
*
|
|
15
|
-
* @param organizationId -
|
|
16
|
-
*/
|
|
17
|
-
deleteMeterUsageHistory(organizationId: string): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Get the billing info for an organization from config DB.
|
|
20
|
-
*
|
|
21
|
-
* @param organizationId - Organization ID to get billing info for.
|
|
22
|
-
*/
|
|
23
|
-
getBillingInfo(organizationId: string): Promise<Management.BillingInfo>;
|
|
24
|
-
/**
|
|
25
|
-
* Save the billing info for an organization in config DB.
|
|
26
|
-
*
|
|
27
|
-
* @param billingInfo -
|
|
28
|
-
* @param organizationId -
|
|
29
|
-
*/
|
|
30
|
-
saveBillingInfo(billingInfo: Management.BillingInfo, organizationId: string): Promise<void>;
|
|
31
6
|
/**
|
|
32
7
|
* 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.
|
|
33
8
|
*
|
|
@@ -56,87 +56,6 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
56
56
|
function ManagementRestClient(options) {
|
|
57
57
|
return _super.call(this, options) || this;
|
|
58
58
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Delete the billing info for an organization from config DB.
|
|
61
|
-
*
|
|
62
|
-
* @param organizationId -
|
|
63
|
-
*/
|
|
64
|
-
ManagementRestClient.prototype.deleteBillingInfo = function (organizationId) {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
-
return __generator(this, function (_a) {
|
|
67
|
-
return [2 /*return*/, this.beginRequest({
|
|
68
|
-
apiVersion: "7.2-preview.1",
|
|
69
|
-
method: "DELETE",
|
|
70
|
-
routeTemplate: "{organizationId}/_apis/Management/Billing/{action}",
|
|
71
|
-
routeValues: {
|
|
72
|
-
organizationId: organizationId,
|
|
73
|
-
action: "Default"
|
|
74
|
-
}
|
|
75
|
-
})];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Delete the meter usage history from Primary SU for an organization.
|
|
81
|
-
*
|
|
82
|
-
* @param organizationId -
|
|
83
|
-
*/
|
|
84
|
-
ManagementRestClient.prototype.deleteMeterUsageHistory = function (organizationId) {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
-
return __generator(this, function (_a) {
|
|
87
|
-
return [2 /*return*/, this.beginRequest({
|
|
88
|
-
apiVersion: "7.2-preview.1",
|
|
89
|
-
method: "DELETE",
|
|
90
|
-
routeTemplate: "{organizationId}/_apis/Management/Billing/{action}",
|
|
91
|
-
routeValues: {
|
|
92
|
-
organizationId: organizationId,
|
|
93
|
-
action: "MeterUsageHistory"
|
|
94
|
-
}
|
|
95
|
-
})];
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Get the billing info for an organization from config DB.
|
|
101
|
-
*
|
|
102
|
-
* @param organizationId - Organization ID to get billing info for.
|
|
103
|
-
*/
|
|
104
|
-
ManagementRestClient.prototype.getBillingInfo = function (organizationId) {
|
|
105
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
-
return __generator(this, function (_a) {
|
|
107
|
-
return [2 /*return*/, this.beginRequest({
|
|
108
|
-
apiVersion: "7.2-preview.1",
|
|
109
|
-
routeTemplate: "{organizationId}/_apis/Management/Billing/{action}",
|
|
110
|
-
routeValues: {
|
|
111
|
-
organizationId: organizationId,
|
|
112
|
-
action: "Default"
|
|
113
|
-
}
|
|
114
|
-
})];
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Save the billing info for an organization in config DB.
|
|
120
|
-
*
|
|
121
|
-
* @param billingInfo -
|
|
122
|
-
* @param organizationId -
|
|
123
|
-
*/
|
|
124
|
-
ManagementRestClient.prototype.saveBillingInfo = function (billingInfo, organizationId) {
|
|
125
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
-
return __generator(this, function (_a) {
|
|
127
|
-
return [2 /*return*/, this.beginRequest({
|
|
128
|
-
apiVersion: "7.2-preview.1",
|
|
129
|
-
method: "POST",
|
|
130
|
-
routeTemplate: "{organizationId}/_apis/Management/Billing/{action}",
|
|
131
|
-
routeValues: {
|
|
132
|
-
organizationId: organizationId,
|
|
133
|
-
action: "Default"
|
|
134
|
-
},
|
|
135
|
-
body: billingInfo
|
|
136
|
-
})];
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
59
|
/**
|
|
141
60
|
* 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.
|
|
142
61
|
*
|