azure-devops-extension-api 4.253.0 → 4.254.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.
@@ -64,7 +64,7 @@ export declare enum AlertType {
64
64
  }
65
65
  export interface FilterCriteria {
66
66
  /**
67
- * If provided, only return alerts of this type. Otherwise, return alerts of all types.
67
+ * If provided, only return summary data for alerts of this type. Otherwise, return summary data for alerts of all types.
68
68
  */
69
69
  alertTypes: AlertType[];
70
70
  /**
@@ -72,11 +72,15 @@ export interface FilterCriteria {
72
72
  */
73
73
  keywords: string;
74
74
  /**
75
- * If provided, only return alerts from this time period. Otherwise, return all alerts.
75
+ * If provided, summary data will be scoped to this time period.
76
76
  */
77
77
  period: TimePeriod;
78
78
  /**
79
- * If provided, only return alerts at these severities. \<br /\>Otherwise, return alerts at any severity.
79
+ * If provided, only return summary data for these projects Otherwise, return summary data for all projects.
80
+ */
81
+ projects: string[];
82
+ /**
83
+ * If provided, only return summary data for alerts at these severities. \<br /\>Otherwise, return summary data for alerts at any severity.
80
84
  */
81
85
  severities: Severity[];
82
86
  }
@@ -106,6 +110,10 @@ export interface OrgEnablementSummary {
106
110
  */
107
111
  projects: ProjectEnablementSummary[];
108
112
  }
113
+ export interface Project {
114
+ id: string;
115
+ name: string;
116
+ }
109
117
  /**
110
118
  * Project Alert Summary.
111
119
  */
@@ -192,6 +200,12 @@ export interface RepoEnablementSummary {
192
200
  [key: number]: ScanTypeSummaryProperties;
193
201
  };
194
202
  }
203
+ export interface RiskUXComputedFilters {
204
+ /**
205
+ * Display alerts for specified projects. Show alerts for all projects if none are specified.
206
+ */
207
+ projects: Project[];
208
+ }
195
209
  export interface ScanTypeSummaryProperties {
196
210
  /**
197
211
  * True if alerts are enabled for the associated alert type/repo combination, false if disabled.
@@ -3,6 +3,9 @@ import { RestClientBase } from "../Common/RestClientBase";
3
3
  import * as Reporting from "../AdvancedSecurity.Reporting/Reporting";
4
4
  export declare class ReportingRestClient extends RestClientBase {
5
5
  constructor(options: IVssRestClientOptions);
6
+ /**
7
+ */
8
+ getRiskUXComputedFilters(): Promise<Reporting.RiskUXComputedFilters>;
6
9
  /**
7
10
  * Get Alert summary by severity for the org
8
11
  *
@@ -56,6 +56,21 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
56
56
  function ReportingRestClient(options) {
57
57
  return _super.call(this, options) || this;
58
58
  }
59
+ /**
60
+ */
61
+ ReportingRestClient.prototype.getRiskUXComputedFilters = function () {
62
+ return __awaiter(this, void 0, void 0, function () {
63
+ return __generator(this, function (_a) {
64
+ return [2 /*return*/, this.beginRequest({
65
+ apiVersion: "7.2-preview.1",
66
+ routeTemplate: "_apis/Reporting/filters/{action}",
67
+ routeValues: {
68
+ action: "Alerts"
69
+ }
70
+ })];
71
+ });
72
+ });
73
+ };
59
74
  /**
60
75
  * Get Alert summary by severity for the org
61
76
  *
@@ -1 +1 @@
1
- var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,u)}s((r=r.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){u.label=n[1];break}if(6===n[0]&&u.label<i[1]){u.label=i[1],i=n;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(n);break}i[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getAlertSummaryForOrg=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(n){return e={criteria:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Alerts"},queryParams:e})]})})},e.prototype.getEnablementSummaryForOrg=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Enablement"}})]})})},e}(n.RestClientBase);e.ReportingRestClient=r});
1
+ var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,u)}s((n=n.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){u.label=r[1];break}if(6===r[0]&&u.label<i[1]){u.label=i[1],i=r;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(r);break}i[2]&&u.ops.pop(),u.trys.pop();continue}r=e.call(t,u)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getRiskUXComputedFilters=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/filters/{action}",routeValues:{action:"Alerts"}})]})})},e.prototype.getAlertSummaryForOrg=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(r){return e={criteria:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Alerts"},queryParams:e})]})})},e.prototype.getEnablementSummaryForOrg=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Enablement"}})]})})},e}(r.RestClientBase);e.ReportingRestClient=n});
package/Alert/Alert.d.ts CHANGED
@@ -179,6 +179,28 @@ export declare enum AlertType {
179
179
  */
180
180
  License = 4
181
181
  }
182
+ export declare enum AlertValidationRequestStatus {
183
+ /**
184
+ * Default, when the request status is not set/applicable.
185
+ */
186
+ None = 0,
187
+ /**
188
+ * First validation request for the alert's validation fingerprints, created when the sarif is submitted for processing.
189
+ */
190
+ Created = 1,
191
+ /**
192
+ * The secret validation jobs for the alert's validation fingerprints have been manually queued and at least one is still in progress.
193
+ */
194
+ InProgress = 2,
195
+ /**
196
+ * All the secret validation jobs for the alert's validation fingerprints have returned Completed or Failed.
197
+ */
198
+ Completed = 3,
199
+ /**
200
+ * This status is set only when there is an exception in the ValidationService.
201
+ */
202
+ Failed = 4
203
+ }
182
204
  /**
183
205
  * Validity data for an alert that will be part of Alerts APIs and UI.
184
206
  */
@@ -187,9 +209,22 @@ export interface AlertValidityInfo {
187
209
  validityStatus: AlertValidityStatus;
188
210
  }
189
211
  export declare enum AlertValidityStatus {
190
- Unknown = 0,
191
- Active = 1,
192
- Inactive = 2
212
+ /**
213
+ * When there are no validation fingerprints attached to the alert.
214
+ */
215
+ None = 0,
216
+ /**
217
+ * When the validations for validation fingerprints associated to the alert have not been conclusive.
218
+ */
219
+ Unknown = 1,
220
+ /**
221
+ * When atleast one validation fingerprint associated to the alert is exploitable.
222
+ */
223
+ Active = 2,
224
+ /**
225
+ * When all validation fingerprints associated to the alert are not exploitable.
226
+ */
227
+ Inactive = 3
193
228
  }
194
229
  /**
195
230
  * AnalysisConfiguration class models a build definition.
@@ -890,9 +925,9 @@ export interface SearchCriteria {
890
925
  */
891
926
  toolName: string;
892
927
  /**
893
- * If provided, only return alerts with the validity specified here. If the validity status is Unknown, fetch alerts of all validity results. \<br /\>Only applicable for secret alerts.
928
+ * If provided, only return alerts with the validity specified here. If the validity status is Unknown, fetch alerts of all validity results. \<br /\>Only applicable for secret alerts. \<br /\>Filtering by validity status may cause less alerts to be returned than requested with TOP parameter. \<br /\>Due to this behavior, the ContinuationToken(\<![CDATA[\<header name\>]]\>) in the response header should be relied on to decide if another batch needs to be fetched.
894
929
  */
895
- validity: AlertValidityStatus;
930
+ validity: AlertValidityStatus[];
896
931
  }
897
932
  export declare enum Severity {
898
933
  Low = 0,
@@ -1002,29 +1037,31 @@ export interface ValidationFingerprint {
1002
1037
  /**
1003
1038
  * The result of the validation.
1004
1039
  */
1005
- validityResult: string;
1040
+ validityResult: ValidationResult;
1041
+ }
1042
+ /**
1043
+ * Data associated to a validation request for an alert. Along with the request status, this includes the validity data that is part of Get Alert(s) response.
1044
+ */
1045
+ export interface ValidationRequestInfo extends AlertValidityInfo {
1046
+ alertValidationRequestStatus: AlertValidationRequestStatus;
1006
1047
  }
1007
- export declare enum ValidationStatus {
1048
+ export declare enum ValidationResult {
1008
1049
  /**
1009
- * Default value, no information about the status of validation can be inferred for the secret.
1050
+ * Default value, no information about the secret can be inferred from this.
1010
1051
  */
1011
1052
  None = 0,
1012
1053
  /**
1013
- * The secret validation job(s) for the alert have been manually queued and is in progress.
1054
+ * Represents a secret that can be used to connect to a resource.
1014
1055
  */
1015
- InProgress = 1,
1056
+ Exploitable = 1,
1016
1057
  /**
1017
- * The secret validation job(s) for the alert have completed.
1058
+ * Represents a secret that can't be used to connect to a resource.
1018
1059
  */
1019
- Completed = 2,
1020
- /**
1021
- * The secret validation job(s) for the alert have failed.
1022
- */
1023
- Failed = 3,
1060
+ NotExploitable = 2,
1024
1061
  /**
1025
- * The secret validations job(s) for the alert have been automatically initiated upon sarif submission.
1062
+ * Represents a secret where no determination can be made about its exploitability.
1026
1063
  */
1027
- Initiated = 4
1064
+ Inconclusive = 3
1028
1065
  }
1029
1066
  /**
1030
1067
  * Information for locating files in a source control system
package/Alert/Alert.js CHANGED
@@ -40,11 +40,47 @@ define(["require", "exports"], function (require, exports) {
40
40
  */
41
41
  AlertType[AlertType["License"] = 4] = "License";
42
42
  })(AlertType = exports.AlertType || (exports.AlertType = {}));
43
+ var AlertValidationRequestStatus;
44
+ (function (AlertValidationRequestStatus) {
45
+ /**
46
+ * Default, when the request status is not set/applicable.
47
+ */
48
+ AlertValidationRequestStatus[AlertValidationRequestStatus["None"] = 0] = "None";
49
+ /**
50
+ * First validation request for the alert's validation fingerprints, created when the sarif is submitted for processing.
51
+ */
52
+ AlertValidationRequestStatus[AlertValidationRequestStatus["Created"] = 1] = "Created";
53
+ /**
54
+ * The secret validation jobs for the alert's validation fingerprints have been manually queued and at least one is still in progress.
55
+ */
56
+ AlertValidationRequestStatus[AlertValidationRequestStatus["InProgress"] = 2] = "InProgress";
57
+ /**
58
+ * All the secret validation jobs for the alert's validation fingerprints have returned Completed or Failed.
59
+ */
60
+ AlertValidationRequestStatus[AlertValidationRequestStatus["Completed"] = 3] = "Completed";
61
+ /**
62
+ * This status is set only when there is an exception in the ValidationService.
63
+ */
64
+ AlertValidationRequestStatus[AlertValidationRequestStatus["Failed"] = 4] = "Failed";
65
+ })(AlertValidationRequestStatus = exports.AlertValidationRequestStatus || (exports.AlertValidationRequestStatus = {}));
43
66
  var AlertValidityStatus;
44
67
  (function (AlertValidityStatus) {
45
- AlertValidityStatus[AlertValidityStatus["Unknown"] = 0] = "Unknown";
46
- AlertValidityStatus[AlertValidityStatus["Active"] = 1] = "Active";
47
- AlertValidityStatus[AlertValidityStatus["Inactive"] = 2] = "Inactive";
68
+ /**
69
+ * When there are no validation fingerprints attached to the alert.
70
+ */
71
+ AlertValidityStatus[AlertValidityStatus["None"] = 0] = "None";
72
+ /**
73
+ * When the validations for validation fingerprints associated to the alert have not been conclusive.
74
+ */
75
+ AlertValidityStatus[AlertValidityStatus["Unknown"] = 1] = "Unknown";
76
+ /**
77
+ * When atleast one validation fingerprint associated to the alert is exploitable.
78
+ */
79
+ AlertValidityStatus[AlertValidityStatus["Active"] = 2] = "Active";
80
+ /**
81
+ * When all validation fingerprints associated to the alert are not exploitable.
82
+ */
83
+ AlertValidityStatus[AlertValidityStatus["Inactive"] = 3] = "Inactive";
48
84
  })(AlertValidityStatus = exports.AlertValidityStatus || (exports.AlertValidityStatus = {}));
49
85
  var AnalysisConfigurationType;
50
86
  (function (AnalysisConfigurationType) {
@@ -308,27 +344,23 @@ define(["require", "exports"], function (require, exports) {
308
344
  */
309
345
  State[State["AutoDismissed"] = 8] = "AutoDismissed";
310
346
  })(State = exports.State || (exports.State = {}));
311
- var ValidationStatus;
312
- (function (ValidationStatus) {
313
- /**
314
- * Default value, no information about the status of validation can be inferred for the secret.
315
- */
316
- ValidationStatus[ValidationStatus["None"] = 0] = "None";
347
+ var ValidationResult;
348
+ (function (ValidationResult) {
317
349
  /**
318
- * The secret validation job(s) for the alert have been manually queued and is in progress.
350
+ * Default value, no information about the secret can be inferred from this.
319
351
  */
320
- ValidationStatus[ValidationStatus["InProgress"] = 1] = "InProgress";
352
+ ValidationResult[ValidationResult["None"] = 0] = "None";
321
353
  /**
322
- * The secret validation job(s) for the alert have completed.
354
+ * Represents a secret that can be used to connect to a resource.
323
355
  */
324
- ValidationStatus[ValidationStatus["Completed"] = 2] = "Completed";
356
+ ValidationResult[ValidationResult["Exploitable"] = 1] = "Exploitable";
325
357
  /**
326
- * The secret validation job(s) for the alert have failed.
358
+ * Represents a secret that can't be used to connect to a resource.
327
359
  */
328
- ValidationStatus[ValidationStatus["Failed"] = 3] = "Failed";
360
+ ValidationResult[ValidationResult["NotExploitable"] = 2] = "NotExploitable";
329
361
  /**
330
- * The secret validations job(s) for the alert have been automatically initiated upon sarif submission.
362
+ * Represents a secret where no determination can be made about its exploitability.
331
363
  */
332
- ValidationStatus[ValidationStatus["Initiated"] = 4] = "Initiated";
333
- })(ValidationStatus = exports.ValidationStatus || (exports.ValidationStatus = {}));
364
+ ValidationResult[ValidationResult["Inconclusive"] = 3] = "Inconclusive";
365
+ })(ValidationResult = exports.ValidationResult || (exports.ValidationResult = {}));
334
366
  });
@@ -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.Minimal=1]="Minimal"}(n.AlertListExpandOption||(n.AlertListExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License"}(n.AlertType||(n.AlertType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Inactive=2]="Inactive"}(n.AlertValidityStatus||(n.AlertValidityStatus={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(n.Confidence||(n.Confidence={}));!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(n.DependencyKind||(n.DependencyKind={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(n.LicenseState||(n.LicenseState={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(n.MetadataChangeType||(n.MetadataChangeType={}));!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(n.MetadataOperation||(n.MetadataOperation={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued"}(n.SarifJobStatus||(n.SarifJobStatus={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}));!function(e){e[e.None=0]="None",e[e.InProgress=1]="InProgress",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Initiated=4]="Initiated"}(n.ValidationStatus||(n.ValidationStatus={}))});
1
+ define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal"}(n.AlertListExpandOption||(n.AlertListExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License"}(n.AlertType||(n.AlertType={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(n.AlertValidationRequestStatus||(n.AlertValidationRequestStatus={}));!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(n.AlertValidityStatus||(n.AlertValidityStatus={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(n.Confidence||(n.Confidence={}));!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(n.DependencyKind||(n.DependencyKind={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(n.LicenseState||(n.LicenseState={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(n.MetadataChangeType||(n.MetadataChangeType={}));!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(n.MetadataOperation||(n.MetadataOperation={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued"}(n.SarifJobStatus||(n.SarifJobStatus={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}));!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive"}(n.ValidationResult||(n.ValidationResult={}))});
@@ -111,7 +111,7 @@ export declare class AlertRestClient extends RestClientBase {
111
111
  * @param repository - The name or ID of a repository
112
112
  * @param alertId - The ID of the alert
113
113
  */
114
- getValidityData(project: string, repository: string, alertId: number): Promise<Alert.AlertValidityInfo>;
114
+ getValidityData(project: string, repository: string, alertId: number): Promise<Alert.ValidationRequestInfo>;
115
115
  /**
116
116
  * Initiate the validation process for a given alert
117
117
  *
@@ -119,5 +119,5 @@ export declare class AlertRestClient extends RestClientBase {
119
119
  * @param repository - The name or ID of a repository
120
120
  * @param alertId - The ID of the alert
121
121
  */
122
- initiateValidation(project: string, repository: string, alertId: number): Promise<Alert.ValidationStatus>;
122
+ initiateValidation(project: string, repository: string, alertId: number): Promise<Alert.AlertValidationRequestStatus>;
123
123
  }
@@ -157,18 +157,41 @@ export interface CodeScanningFeatures {
157
157
  */
158
158
  dependencyScanningInjectionEnabled: boolean;
159
159
  }
160
- /**
161
- * Information related to Code Scanning meter usage
162
- */
163
- export interface CodeScanningMeterUsage {
160
+ export interface EnablementOnCreateSettings {
161
+ /**
162
+ * Automatically enable Code Scanning on newly created repositories.
163
+ */
164
+ enableCodeScanningOnCreate: boolean;
165
+ /**
166
+ * Automatically enable Secret Scanning on newly created repositories.
167
+ */
168
+ enableSecretScanningOnCreate: boolean;
169
+ }
170
+ export interface EnablementSettings {
171
+ /**
172
+ * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
173
+ */
174
+ codeScanningEnabled: boolean;
175
+ /**
176
+ * Includes code scanning features that can be enabled.
177
+ */
178
+ codeScanningFeatures: CodeScanningFeatures;
179
+ /**
180
+ * Auto enablement setting for newly created repositories.
181
+ */
182
+ enablementOnCreateSettings: EnablementOnCreateSettings;
183
+ /**
184
+ * A list of enablement statuses for repositories within the specified organization or project.
185
+ */
186
+ reposEnablementStatus: RepoEnablementSettings[];
164
187
  /**
165
- * The identityRef of committers that contributed to repositories with Code Scanning enabled
188
+ * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
166
189
  */
167
- codeScanningBilledUsers: BilledCommittersList;
190
+ secretScanningEnabled: boolean;
168
191
  /**
169
- * True when Code Scanning plan is enabled in this organization
192
+ * Includes secret scanning features that can be enabled.
170
193
  */
171
- isCodeScanningEnabled: boolean;
194
+ secretScanningFeatures: SecretScanningFeatures;
172
195
  }
173
196
  /**
174
197
  * Information related to billing for Advanced Security services
@@ -222,90 +245,44 @@ export interface MeterUsageEstimate {
222
245
  secretScanningMeterUsageEstimate: BilledCommittersList;
223
246
  }
224
247
  /**
225
- * Information related to billing for Advanced Security services
248
+ * Information related to meter usage for a Scanning plan
226
249
  */
227
- export interface MeterUsageSummary {
250
+ export interface MeterUsageForPlan {
228
251
  /**
229
252
  * The Azure DevOps account
230
253
  */
231
254
  accountId: string;
232
255
  azureSubscriptionId: string;
233
256
  /**
234
- * The date this billing information pertains to
257
+ * The identityRef of committers that contributed to repositories with Scanning plan enabled
235
258
  */
236
- billingDate: Date;
259
+ billedUsers: BilledCommittersList;
237
260
  /**
238
- * Billing Information of repositories where Code Scanning is enabled
261
+ * The date this billing information pertains to
239
262
  */
240
- codeScanningMeterUsage: CodeScanningMeterUsage;
263
+ billingDate: Date;
241
264
  /**
242
- * Billing Information of repositories where Secret Scanning is enabled
265
+ * True when the Scanning plan is enabled in this organization
243
266
  */
244
- secretScanningMeterUsage: SecretScanningMeterUsage;
267
+ isPlanEnabled: boolean;
245
268
  /**
246
269
  * The Azure subscription
247
270
  */
248
271
  tenantId: string;
249
272
  }
250
- export interface OrgEnablementSettings {
251
- /**
252
- * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
253
- */
254
- codeScanningEnabled: boolean;
255
- /**
256
- * Includes code scanning features that can be enabled.
257
- */
258
- codeScanningFeatures: CodeScanningFeatures;
259
- /**
260
- * Automatically enable Code Scanning on newly created repositories.
261
- */
262
- enableCodeScanningOnCreate: boolean;
263
- /**
264
- * Automatically enable Secret Scanning on newly created repositories.
265
- */
266
- enableSecretScanningOnCreate: boolean;
267
- /**
268
- * A list of enablement statuses for repositories within the specified organization.
269
- */
270
- reposEnablementStatus: RepoEnablementSettings[];
271
- /**
272
- * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
273
- */
274
- secretScanningEnabled: boolean;
275
- /**
276
- * Includes secret scanning features that can be enabled.
277
- */
278
- secretScanningFeatures: SecretScanningFeatures;
273
+ export interface OrgEnablementSettings extends EnablementSettings {
279
274
  }
280
- export interface ProjectEnablementSettings {
275
+ export declare enum Plan {
281
276
  /**
282
- * Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
277
+ * The Code Security plan
283
278
  */
284
- codeScanningEnabled: boolean;
279
+ CodeSecurity = 0,
285
280
  /**
286
- * Includes code scanning features that can be enabled.
281
+ * The Secret Protection plan
287
282
  */
288
- codeScanningFeatures: CodeScanningFeatures;
289
- /**
290
- * Automatically enable Code Scanning on newly created repositories.
291
- */
292
- enableCodeScanningOnCreate: boolean;
293
- /**
294
- * Automatically enable Secret Scanning on newly created repositories.
295
- */
296
- enableSecretScanningOnCreate: boolean;
297
- /**
298
- * A list of enablement statuses for repositories within the specified project.
299
- */
300
- reposEnablementStatus: RepoEnablementSettings[];
301
- /**
302
- * Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
303
- */
304
- secretScanningEnabled: boolean;
305
- /**
306
- * Includes secret scanning features that can be enabled.
307
- */
308
- secretScanningFeatures: SecretScanningFeatures;
283
+ SecretProtection = 1
284
+ }
285
+ export interface ProjectEnablementSettings extends EnablementSettings {
309
286
  }
310
287
  export interface RepoEnablementSettings {
311
288
  /**
@@ -355,16 +332,3 @@ export interface SecretScanningFeatures {
355
332
  */
356
333
  forceRepoSecretScanning: boolean;
357
334
  }
358
- /**
359
- * Information related to Secret Scanning meter usage
360
- */
361
- export interface SecretScanningMeterUsage {
362
- /**
363
- * True when Secret Scanning plan is enabled in this organization
364
- */
365
- isSecretScanningEnabled: boolean;
366
- /**
367
- * The identityRef of committers that contributed to repositories with Secret Scanning enabled
368
- */
369
- secretScanningBilledUsers: BilledCommittersList;
370
- }
@@ -6,4 +6,15 @@
6
6
  define(["require", "exports"], function (require, exports) {
7
7
  "use strict";
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
+ var Plan;
10
+ (function (Plan) {
11
+ /**
12
+ * The Code Security plan
13
+ */
14
+ Plan[Plan["CodeSecurity"] = 0] = "CodeSecurity";
15
+ /**
16
+ * The Secret Protection plan
17
+ */
18
+ Plan[Plan["SecretProtection"] = 1] = "SecretProtection";
19
+ })(Plan = exports.Plan || (exports.Plan = {}));
9
20
  });
@@ -1 +1 @@
1
- define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})});
1
+ define(["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.CodeSecurity=0]="CodeSecurity",e[e.SecretProtection=1]="SecretProtection"}(t.Plan||(t.Plan={}))});
@@ -44,23 +44,27 @@ export declare class ManagementRestClient extends RestClientBase {
44
44
  * 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.
45
45
  *
46
46
  * @param meterUsage -
47
+ * @param plan -
47
48
  */
48
- createBillingSnapshot2(meterUsage: Management.MeterUsageSummary): Promise<void>;
49
+ createBillingSnapshot2(meterUsage: Management.MeterUsageForPlan, plan: Management.Plan): Promise<void>;
49
50
  /**
50
51
  * Get all billable committers details, including those not matched with a VSID.
51
52
  *
53
+ * @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
52
54
  * @param billingDate - The date to query, or if not provided, today
53
55
  */
54
- getBillableCommitterDetails2(billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
56
+ getBillableCommitterDetails2(plan: Management.Plan, billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
55
57
  /**
58
+ * @param plan -
56
59
  */
57
- getLastMeterUsage2(): Promise<Management.MeterUsageSummary>;
60
+ getLastMeterUsage2(plan: Management.Plan): Promise<Management.MeterUsageForPlan>;
58
61
  /**
59
62
  * Get commiters used when calculating billing information.
60
63
  *
64
+ * @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
61
65
  * @param billingDate - The date to query, or if not provided, today
62
66
  */
63
- getMeterUsage2(billingDate?: Date): Promise<Management.MeterUsageSummary>;
67
+ getMeterUsage2(plan: Management.Plan, billingDate?: Date): Promise<Management.MeterUsageForPlan>;
64
68
  /**
65
69
  * Get the current status of Advanced Security for the organization
66
70
  *
@@ -190,10 +190,15 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
190
190
  * 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.
191
191
  *
192
192
  * @param meterUsage -
193
+ * @param plan -
193
194
  */
194
- ManagementRestClient.prototype.createBillingSnapshot2 = function (meterUsage) {
195
+ ManagementRestClient.prototype.createBillingSnapshot2 = function (meterUsage, plan) {
195
196
  return __awaiter(this, void 0, void 0, function () {
197
+ var queryValues;
196
198
  return __generator(this, function (_a) {
199
+ queryValues = {
200
+ plan: plan
201
+ };
197
202
  return [2 /*return*/, this.beginRequest({
198
203
  apiVersion: "7.2-preview.1",
199
204
  method: "POST",
@@ -201,6 +206,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
201
206
  routeValues: {
202
207
  action: "Default"
203
208
  },
209
+ queryParams: queryValues,
204
210
  body: meterUsage
205
211
  })];
206
212
  });
@@ -209,13 +215,15 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
209
215
  /**
210
216
  * Get all billable committers details, including those not matched with a VSID.
211
217
  *
218
+ * @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
212
219
  * @param billingDate - The date to query, or if not provided, today
213
220
  */
214
- ManagementRestClient.prototype.getBillableCommitterDetails2 = function (billingDate) {
221
+ ManagementRestClient.prototype.getBillableCommitterDetails2 = function (plan, billingDate) {
215
222
  return __awaiter(this, void 0, void 0, function () {
216
223
  var queryValues;
217
224
  return __generator(this, function (_a) {
218
225
  queryValues = {
226
+ plan: plan,
219
227
  billingDate: billingDate
220
228
  };
221
229
  return [2 /*return*/, this.beginRequest({
@@ -230,16 +238,22 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
230
238
  });
231
239
  };
232
240
  /**
241
+ * @param plan -
233
242
  */
234
- ManagementRestClient.prototype.getLastMeterUsage2 = function () {
243
+ ManagementRestClient.prototype.getLastMeterUsage2 = function (plan) {
235
244
  return __awaiter(this, void 0, void 0, function () {
245
+ var queryValues;
236
246
  return __generator(this, function (_a) {
247
+ queryValues = {
248
+ plan: plan
249
+ };
237
250
  return [2 /*return*/, this.beginRequest({
238
251
  apiVersion: "7.2-preview.1",
239
252
  routeTemplate: "_apis/Management/MeterUsage2/{action}",
240
253
  routeValues: {
241
254
  action: "Last"
242
- }
255
+ },
256
+ queryParams: queryValues
243
257
  })];
244
258
  });
245
259
  });
@@ -247,13 +261,15 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
247
261
  /**
248
262
  * Get commiters used when calculating billing information.
249
263
  *
264
+ * @param plan - The plan to query. Plans supported: CodeSecurity and SecretProtection. This is a mandatory parameter.
250
265
  * @param billingDate - The date to query, or if not provided, today
251
266
  */
252
- ManagementRestClient.prototype.getMeterUsage2 = function (billingDate) {
267
+ ManagementRestClient.prototype.getMeterUsage2 = function (plan, billingDate) {
253
268
  return __awaiter(this, void 0, void 0, function () {
254
269
  var queryValues;
255
270
  return __generator(this, function (_a) {
256
271
  queryValues = {
272
+ plan: plan,
257
273
  billingDate: billingDate
258
274
  };
259
275
  return [2 /*return*/, this.beginRequest({
@@ -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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,u)}s((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,n=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var i,n,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getRepoEnablementStatus2=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeAllProperties:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement2",routeValues:{project:e,repository:t},queryParams:i})]})})},t.prototype.updateRepoAdvSecEnablementStatus2=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement2",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.createBillingSnapshot=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},body:e})]})})},t.prototype.getBillableCommitterDetails=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Details"},queryParams:t})]})})},t.prototype.getLastMeterUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Last"}})]})})},t.prototype.getMeterUsage=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},queryParams:t})]})})},t.prototype.createBillingSnapshot2=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/Management/MeterUsage2/{action}",routeValues:{action:"Default"},body:e})]})})},t.prototype.getBillableCommitterDetails2=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage2/{action}",routeValues:{action:"Details"},queryParams:t})]})})},t.prototype.getLastMeterUsage2=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage2/{action}",routeValues:{action:"Last"}})]})})},t.prototype.getMeterUsage2=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage2/{action}",routeValues:{action:"Default"},queryParams:t})]})})},t.prototype.getOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={includeAllProperties:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/enablement",queryParams:t})]})})},t.prototype.updateOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Management/enablement",body:e})]})})},t.prototype.getOrgEnablementStatus2=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={includeAllProperties:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/enablement2",queryParams:t})]})})},t.prototype.updateOrgEnablementStatus2=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Management/enablement2",body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForOrg=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Details"}})]})})},t.prototype.getEstimatedOrgBillablePushers=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Default"}})]})})},t.prototype.getEstimatedBillablePushersDetailsForOrg2=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate2/{action}",routeValues:{action:"Details"}})]})})},t.prototype.getEstimatedOrgBillablePushers2=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate2/{action}",routeValues:{action:"Default"}})]})})},t.prototype.getProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={includeAllProperties:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:t},body:e})]})})},t.prototype.getProjectEnablementStatus2=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={includeAllProperties:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/enablement2",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateProjectEnablementStatus2=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/enablement2",routeValues:{project:t},body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Details"}})]})})},t.prototype.getEstimatedProjectBillablePushers=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Default"}})]})})},t.prototype.getEstimatedBillablePushersDetailsForProject2=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate2/{action}",routeValues:{project:e,action:"Details"}})]})})},t.prototype.getEstimatedProjectBillablePushers2=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate2/{action}",routeValues:{project:e,action:"Default"}})]})})},t.prototype.getRepoEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeAllProperties:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:e,repository:t},queryParams:i})]})})},t.prototype.updateRepoAdvSecEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getEstimatedRepoBillableCommitters=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Default"}})]})})},t.prototype.getEstimatedRepoBillablePushersDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Details"}})]})})},t.prototype.getEstimatedRepoBillableCommitters2=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate2/{action}",routeValues:{project:e,repository:t,action:"Default"}})]})})},t.prototype.getEstimatedRepoBillableCommittersDetails2=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate2/{action}",routeValues:{project:e,repository:t,action:"Details"}})]})})},t}(r.RestClientBase);t.ManagementRestClient=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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(a,u)}s((i=i.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,n=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var i,n,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getRepoEnablementStatus2=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeAllProperties:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement2",routeValues:{project:e,repository:t},queryParams:i})]})})},t.prototype.updateRepoAdvSecEnablementStatus2=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement2",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.createBillingSnapshot=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},body:e})]})})},t.prototype.getBillableCommitterDetails=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Details"},queryParams:t})]})})},t.prototype.getLastMeterUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Last"}})]})})},t.prototype.getMeterUsage=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},queryParams:t})]})})},t.prototype.createBillingSnapshot2=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={plan:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/Management/MeterUsage2/{action}",routeValues:{action:"Default"},queryParams:r,body:e})]})})},t.prototype.getBillableCommitterDetails2=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={plan:e,billingDate:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage2/{action}",routeValues:{action:"Details"},queryParams:r})]})})},t.prototype.getLastMeterUsage2=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={plan:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage2/{action}",routeValues:{action:"Last"},queryParams:t})]})})},t.prototype.getMeterUsage2=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={plan:e,billingDate:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage2/{action}",routeValues:{action:"Default"},queryParams:r})]})})},t.prototype.getOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={includeAllProperties:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/enablement",queryParams:t})]})})},t.prototype.updateOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Management/enablement",body:e})]})})},t.prototype.getOrgEnablementStatus2=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={includeAllProperties:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/enablement2",queryParams:t})]})})},t.prototype.updateOrgEnablementStatus2=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Management/enablement2",body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForOrg=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Details"}})]})})},t.prototype.getEstimatedOrgBillablePushers=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Default"}})]})})},t.prototype.getEstimatedBillablePushersDetailsForOrg2=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate2/{action}",routeValues:{action:"Details"}})]})})},t.prototype.getEstimatedOrgBillablePushers2=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate2/{action}",routeValues:{action:"Default"}})]})})},t.prototype.getProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={includeAllProperties:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:t},body:e})]})})},t.prototype.getProjectEnablementStatus2=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={includeAllProperties:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/enablement2",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateProjectEnablementStatus2=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/enablement2",routeValues:{project:t},body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Details"}})]})})},t.prototype.getEstimatedProjectBillablePushers=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Default"}})]})})},t.prototype.getEstimatedBillablePushersDetailsForProject2=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate2/{action}",routeValues:{project:e,action:"Details"}})]})})},t.prototype.getEstimatedProjectBillablePushers2=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate2/{action}",routeValues:{project:e,action:"Default"}})]})})},t.prototype.getRepoEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={includeAllProperties:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:e,repository:t},queryParams:i})]})})},t.prototype.updateRepoAdvSecEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getEstimatedRepoBillableCommitters=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Default"}})]})})},t.prototype.getEstimatedRepoBillablePushersDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Details"}})]})})},t.prototype.getEstimatedRepoBillableCommitters2=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate2/{action}",routeValues:{project:e,repository:t,action:"Default"}})]})})},t.prototype.getEstimatedRepoBillableCommittersDetails2=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate2/{action}",routeValues:{project:e,repository:t,action:"Details"}})]})})},t}(r.RestClientBase);t.ManagementRestClient=i});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azure-devops-extension-api",
3
- "version": "4.253.0",
3
+ "version": "4.254.0",
4
4
  "description": "REST client libraries and contracts for Azure DevOps web extension developers.",
5
5
  "repository": {
6
6
  "type": "git",