azure-devops-extension-api 4.252.0 → 4.253.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/AdvancedSecurity.Reporting/Reporting.d.ts +65 -0
- package/AdvancedSecurity.Reporting/Reporting.js +20 -0
- package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
- package/AdvancedSecurity.Reporting/ReportingClient.d.ts +2 -1
- package/AdvancedSecurity.Reporting/ReportingClient.js +8 -2
- package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
- package/Alert/Alert.d.ts +22 -2
- package/Alert/Alert.js +20 -0
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +8 -0
- package/Alert/AlertClient.js +22 -0
- package/Alert/AlertClient.min.js +1 -1
- package/Build/Build.d.ts +1 -1
- package/Management/Management.d.ts +200 -0
- package/Management/ManagementClient.d.ts +99 -0
- package/Management/ManagementClient.js +326 -0
- package/Management/ManagementClient.min.js +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,27 @@ export interface AlertSummaryBySeverity {
|
|
|
18
18
|
* Total Medium severity alerts.
|
|
19
19
|
*/
|
|
20
20
|
medium: number;
|
|
21
|
+
/**
|
|
22
|
+
* Total Note severity alerts.
|
|
23
|
+
*/
|
|
24
|
+
note: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Alert Summary by state.
|
|
28
|
+
*/
|
|
29
|
+
export interface AlertSummaryByState {
|
|
30
|
+
/**
|
|
31
|
+
* Total Dismissed state alerts.
|
|
32
|
+
*/
|
|
33
|
+
dismissed: number;
|
|
34
|
+
/**
|
|
35
|
+
* Total Fixed state alerts.
|
|
36
|
+
*/
|
|
37
|
+
fixed: number;
|
|
38
|
+
/**
|
|
39
|
+
* Total New state alerts.
|
|
40
|
+
*/
|
|
41
|
+
new: number;
|
|
21
42
|
}
|
|
22
43
|
export declare enum AlertType {
|
|
23
44
|
/**
|
|
@@ -41,6 +62,24 @@ export declare enum AlertType {
|
|
|
41
62
|
*/
|
|
42
63
|
License = 4
|
|
43
64
|
}
|
|
65
|
+
export interface FilterCriteria {
|
|
66
|
+
/**
|
|
67
|
+
* If provided, only return alerts of this type. Otherwise, return alerts of all types.
|
|
68
|
+
*/
|
|
69
|
+
alertTypes: AlertType[];
|
|
70
|
+
/**
|
|
71
|
+
* If provided, only return repos whose titles match this pattern.
|
|
72
|
+
*/
|
|
73
|
+
keywords: string;
|
|
74
|
+
/**
|
|
75
|
+
* If provided, only return alerts from this time period. Otherwise, return all alerts.
|
|
76
|
+
*/
|
|
77
|
+
period: TimePeriod;
|
|
78
|
+
/**
|
|
79
|
+
* If provided, only return alerts at these severities. \<br /\>Otherwise, return alerts at any severity.
|
|
80
|
+
*/
|
|
81
|
+
severities: Severity[];
|
|
82
|
+
}
|
|
44
83
|
/**
|
|
45
84
|
* Org Alert Summary.
|
|
46
85
|
*/
|
|
@@ -109,6 +148,14 @@ export interface RepoAlertSummary {
|
|
|
109
148
|
* Total alerts by severity.
|
|
110
149
|
*/
|
|
111
150
|
alertsBySeverity: AlertSummaryBySeverity;
|
|
151
|
+
/**
|
|
152
|
+
* Total alerts by state.
|
|
153
|
+
*/
|
|
154
|
+
alertsByState: AlertSummaryByState;
|
|
155
|
+
/**
|
|
156
|
+
* Total active alerts in the repo.
|
|
157
|
+
*/
|
|
158
|
+
openAlerts: number;
|
|
112
159
|
/**
|
|
113
160
|
* RepoId.
|
|
114
161
|
*/
|
|
@@ -165,3 +212,21 @@ export interface ScanTypeSummaryPropertiesData {
|
|
|
165
212
|
*/
|
|
166
213
|
enabled: boolean;
|
|
167
214
|
}
|
|
215
|
+
export declare enum Severity {
|
|
216
|
+
Low = 0,
|
|
217
|
+
Medium = 1,
|
|
218
|
+
High = 2,
|
|
219
|
+
Critical = 3,
|
|
220
|
+
Note = 4,
|
|
221
|
+
Warning = 5,
|
|
222
|
+
Error = 6,
|
|
223
|
+
Undefined = 7
|
|
224
|
+
}
|
|
225
|
+
export declare enum TimePeriod {
|
|
226
|
+
Undefined = 0,
|
|
227
|
+
Last24Hours = 5,
|
|
228
|
+
Last7Days = 6,
|
|
229
|
+
Last14Days = 7,
|
|
230
|
+
Last30Days = 8,
|
|
231
|
+
Last90Days = 9
|
|
232
|
+
}
|
|
@@ -29,4 +29,24 @@ define(["require", "exports"], function (require, exports) {
|
|
|
29
29
|
*/
|
|
30
30
|
AlertType[AlertType["License"] = 4] = "License";
|
|
31
31
|
})(AlertType = exports.AlertType || (exports.AlertType = {}));
|
|
32
|
+
var Severity;
|
|
33
|
+
(function (Severity) {
|
|
34
|
+
Severity[Severity["Low"] = 0] = "Low";
|
|
35
|
+
Severity[Severity["Medium"] = 1] = "Medium";
|
|
36
|
+
Severity[Severity["High"] = 2] = "High";
|
|
37
|
+
Severity[Severity["Critical"] = 3] = "Critical";
|
|
38
|
+
Severity[Severity["Note"] = 4] = "Note";
|
|
39
|
+
Severity[Severity["Warning"] = 5] = "Warning";
|
|
40
|
+
Severity[Severity["Error"] = 6] = "Error";
|
|
41
|
+
Severity[Severity["Undefined"] = 7] = "Undefined";
|
|
42
|
+
})(Severity = exports.Severity || (exports.Severity = {}));
|
|
43
|
+
var TimePeriod;
|
|
44
|
+
(function (TimePeriod) {
|
|
45
|
+
TimePeriod[TimePeriod["Undefined"] = 0] = "Undefined";
|
|
46
|
+
TimePeriod[TimePeriod["Last24Hours"] = 5] = "Last24Hours";
|
|
47
|
+
TimePeriod[TimePeriod["Last7Days"] = 6] = "Last7Days";
|
|
48
|
+
TimePeriod[TimePeriod["Last14Days"] = 7] = "Last14Days";
|
|
49
|
+
TimePeriod[TimePeriod["Last30Days"] = 8] = "Last30Days";
|
|
50
|
+
TimePeriod[TimePeriod["Last90Days"] = 9] = "Last90Days";
|
|
51
|
+
})(TimePeriod = exports.TimePeriod || (exports.TimePeriod = {}));
|
|
32
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!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={}))});
|
|
1
|
+
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!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.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.Undefined=0]="Undefined",e[e.Last24Hours=5]="Last24Hours",e[e.Last7Days=6]="Last7Days",e[e.Last14Days=7]="Last14Days",e[e.Last30Days=8]="Last30Days",e[e.Last90Days=9]="Last90Days"}(n.TimePeriod||(n.TimePeriod={}))});
|
|
@@ -6,8 +6,9 @@ export declare class ReportingRestClient extends RestClientBase {
|
|
|
6
6
|
/**
|
|
7
7
|
* Get Alert summary by severity for the org
|
|
8
8
|
*
|
|
9
|
+
* @param criteria -
|
|
9
10
|
*/
|
|
10
|
-
getAlertSummaryForOrg(): Promise<Reporting.OrgAlertSummary>;
|
|
11
|
+
getAlertSummaryForOrg(criteria?: Reporting.FilterCriteria): Promise<Reporting.OrgAlertSummary>;
|
|
11
12
|
/**
|
|
12
13
|
*/
|
|
13
14
|
getEnablementSummaryForOrg(): Promise<Reporting.OrgEnablementSummary>;
|
|
@@ -59,16 +59,22 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
59
59
|
/**
|
|
60
60
|
* Get Alert summary by severity for the org
|
|
61
61
|
*
|
|
62
|
+
* @param criteria -
|
|
62
63
|
*/
|
|
63
|
-
ReportingRestClient.prototype.getAlertSummaryForOrg = function () {
|
|
64
|
+
ReportingRestClient.prototype.getAlertSummaryForOrg = function (criteria) {
|
|
64
65
|
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
+
var queryValues;
|
|
65
67
|
return __generator(this, function (_a) {
|
|
68
|
+
queryValues = {
|
|
69
|
+
criteria: criteria
|
|
70
|
+
};
|
|
66
71
|
return [2 /*return*/, this.beginRequest({
|
|
67
72
|
apiVersion: "7.2-preview.1",
|
|
68
73
|
routeTemplate: "_apis/Reporting/summary/{action}",
|
|
69
74
|
routeValues: {
|
|
70
75
|
action: "Alerts"
|
|
71
|
-
}
|
|
76
|
+
},
|
|
77
|
+
queryParams: queryValues
|
|
72
78
|
})];
|
|
73
79
|
});
|
|
74
80
|
});
|
|
@@ -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(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(
|
|
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});
|
package/Alert/Alert.d.ts
CHANGED
|
@@ -493,7 +493,11 @@ export declare enum DismissalType {
|
|
|
493
493
|
/**
|
|
494
494
|
* Dismissal indicating user is agreeing to follow license guidance.
|
|
495
495
|
*/
|
|
496
|
-
AgreedToGuidance = 4
|
|
496
|
+
AgreedToGuidance = 4,
|
|
497
|
+
/**
|
|
498
|
+
* Dismissal indicating backend detection tool was upgraded and the alert is not detected by the new version of tool.
|
|
499
|
+
*/
|
|
500
|
+
ToolUpgrade = 5
|
|
497
501
|
}
|
|
498
502
|
export declare enum ExpandOption {
|
|
499
503
|
/**
|
|
@@ -1001,10 +1005,26 @@ export interface ValidationFingerprint {
|
|
|
1001
1005
|
validityResult: string;
|
|
1002
1006
|
}
|
|
1003
1007
|
export declare enum ValidationStatus {
|
|
1008
|
+
/**
|
|
1009
|
+
* Default value, no information about the status of validation can be inferred for the secret.
|
|
1010
|
+
*/
|
|
1004
1011
|
None = 0,
|
|
1012
|
+
/**
|
|
1013
|
+
* The secret validation job(s) for the alert have been manually queued and is in progress.
|
|
1014
|
+
*/
|
|
1005
1015
|
InProgress = 1,
|
|
1016
|
+
/**
|
|
1017
|
+
* The secret validation job(s) for the alert have completed.
|
|
1018
|
+
*/
|
|
1006
1019
|
Completed = 2,
|
|
1007
|
-
|
|
1020
|
+
/**
|
|
1021
|
+
* The secret validation job(s) for the alert have failed.
|
|
1022
|
+
*/
|
|
1023
|
+
Failed = 3,
|
|
1024
|
+
/**
|
|
1025
|
+
* The secret validations job(s) for the alert have been automatically initiated upon sarif submission.
|
|
1026
|
+
*/
|
|
1027
|
+
Initiated = 4
|
|
1008
1028
|
}
|
|
1009
1029
|
/**
|
|
1010
1030
|
* Information for locating files in a source control system
|
package/Alert/Alert.js
CHANGED
|
@@ -174,6 +174,10 @@ define(["require", "exports"], function (require, exports) {
|
|
|
174
174
|
* Dismissal indicating user is agreeing to follow license guidance.
|
|
175
175
|
*/
|
|
176
176
|
DismissalType[DismissalType["AgreedToGuidance"] = 4] = "AgreedToGuidance";
|
|
177
|
+
/**
|
|
178
|
+
* Dismissal indicating backend detection tool was upgraded and the alert is not detected by the new version of tool.
|
|
179
|
+
*/
|
|
180
|
+
DismissalType[DismissalType["ToolUpgrade"] = 5] = "ToolUpgrade";
|
|
177
181
|
})(DismissalType = exports.DismissalType || (exports.DismissalType = {}));
|
|
178
182
|
var ExpandOption;
|
|
179
183
|
(function (ExpandOption) {
|
|
@@ -306,9 +310,25 @@ define(["require", "exports"], function (require, exports) {
|
|
|
306
310
|
})(State = exports.State || (exports.State = {}));
|
|
307
311
|
var ValidationStatus;
|
|
308
312
|
(function (ValidationStatus) {
|
|
313
|
+
/**
|
|
314
|
+
* Default value, no information about the status of validation can be inferred for the secret.
|
|
315
|
+
*/
|
|
309
316
|
ValidationStatus[ValidationStatus["None"] = 0] = "None";
|
|
317
|
+
/**
|
|
318
|
+
* The secret validation job(s) for the alert have been manually queued and is in progress.
|
|
319
|
+
*/
|
|
310
320
|
ValidationStatus[ValidationStatus["InProgress"] = 1] = "InProgress";
|
|
321
|
+
/**
|
|
322
|
+
* The secret validation job(s) for the alert have completed.
|
|
323
|
+
*/
|
|
311
324
|
ValidationStatus[ValidationStatus["Completed"] = 2] = "Completed";
|
|
325
|
+
/**
|
|
326
|
+
* The secret validation job(s) for the alert have failed.
|
|
327
|
+
*/
|
|
312
328
|
ValidationStatus[ValidationStatus["Failed"] = 3] = "Failed";
|
|
329
|
+
/**
|
|
330
|
+
* The secret validations job(s) for the alert have been automatically initiated upon sarif submission.
|
|
331
|
+
*/
|
|
332
|
+
ValidationStatus[ValidationStatus["Initiated"] = 4] = "Initiated";
|
|
313
333
|
})(ValidationStatus = exports.ValidationStatus || (exports.ValidationStatus = {}));
|
|
314
334
|
});
|
package/Alert/Alert.min.js
CHANGED
|
@@ -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"}(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"}(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.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={}))});
|
package/Alert/AlertClient.d.ts
CHANGED
|
@@ -104,6 +104,14 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
104
104
|
* @param sarifId - Sarif ID returned when the Sarif was uploaded
|
|
105
105
|
*/
|
|
106
106
|
getSarif(sarifId: number): Promise<Alert.SarifUploadStatus>;
|
|
107
|
+
/**
|
|
108
|
+
* Get the validity details for an alert.
|
|
109
|
+
*
|
|
110
|
+
* @param project - Project ID or project name
|
|
111
|
+
* @param repository - The name or ID of a repository
|
|
112
|
+
* @param alertId - The ID of the alert
|
|
113
|
+
*/
|
|
114
|
+
getValidityData(project: string, repository: string, alertId: number): Promise<Alert.AlertValidityInfo>;
|
|
107
115
|
/**
|
|
108
116
|
* Initiate the validation process for a given alert
|
|
109
117
|
*
|
package/Alert/AlertClient.js
CHANGED
|
@@ -374,6 +374,28 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
374
374
|
});
|
|
375
375
|
});
|
|
376
376
|
};
|
|
377
|
+
/**
|
|
378
|
+
* Get the validity details for an alert.
|
|
379
|
+
*
|
|
380
|
+
* @param project - Project ID or project name
|
|
381
|
+
* @param repository - The name or ID of a repository
|
|
382
|
+
* @param alertId - The ID of the alert
|
|
383
|
+
*/
|
|
384
|
+
AlertRestClient.prototype.getValidityData = function (project, repository, alertId) {
|
|
385
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
386
|
+
return __generator(this, function (_a) {
|
|
387
|
+
return [2 /*return*/, this.beginRequest({
|
|
388
|
+
apiVersion: "7.2-preview.1",
|
|
389
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",
|
|
390
|
+
routeValues: {
|
|
391
|
+
project: project,
|
|
392
|
+
repository: repository,
|
|
393
|
+
alertId: alertId
|
|
394
|
+
}
|
|
395
|
+
})];
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
};
|
|
377
399
|
/**
|
|
378
400
|
* Initiate the validation process for a given alert
|
|
379
401
|
*
|
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,s){return __awaiter(this,void 0,void 0,function(){var u,p=this;return __generator(this,function(c){return u={top:r,orderBy:i,criteria:n,expand:a,continuationToken:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(p,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(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.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.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.createLegalReview=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={alertId:r,ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:e,repository:t},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.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.prototype.initiateValidation=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:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})]})})},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,s){return __awaiter(this,void 0,void 0,function(){var u,p=this;return __generator(this,function(c){return u={top:r,orderBy:i,criteria:n,expand:a,continuationToken:s},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:u,returnRawResponse:!0}).then(function(e){return __awaiter(p,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(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.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.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.createLegalReview=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={alertId:r,ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:e,repository:t},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.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.prototype.getValidityData=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",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})]})})},t.prototype.initiateValidation=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:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})]})})},t}(r.RestClientBase);t.AlertRestClient=i});
|
package/Build/Build.d.ts
CHANGED
|
@@ -290,7 +290,7 @@ export interface Build {
|
|
|
290
290
|
[key: string]: string;
|
|
291
291
|
};
|
|
292
292
|
/**
|
|
293
|
-
* The build that triggered this build via a Build completion trigger.
|
|
293
|
+
* The build that triggered this build via a Build completion trigger. Do not set it when queuing a new pipeline run.
|
|
294
294
|
*/
|
|
295
295
|
triggeredByBuild: Build;
|
|
296
296
|
/**
|
|
@@ -130,6 +130,46 @@ export interface BilledCommitter {
|
|
|
130
130
|
*/
|
|
131
131
|
userIdentity: WebApi.IdentityRef;
|
|
132
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* A list of billed committers
|
|
135
|
+
*/
|
|
136
|
+
export interface BilledCommittersList {
|
|
137
|
+
/**
|
|
138
|
+
* A list of BilledCommitter objects that contain the identityRef of committers.
|
|
139
|
+
*/
|
|
140
|
+
billedUsers: BilledCommitter[];
|
|
141
|
+
/**
|
|
142
|
+
* Count of billed committers in BilledUsers
|
|
143
|
+
*/
|
|
144
|
+
uniqueCommitterCount: number;
|
|
145
|
+
}
|
|
146
|
+
export interface CodeScanningFeatures {
|
|
147
|
+
/**
|
|
148
|
+
* CodeQL enablement status set to False when disabled and True when enabled; Null is never explicitly set.
|
|
149
|
+
*/
|
|
150
|
+
codeQLEnabled: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Dependabot enablement status set to False when disabled and True when enabled; Null is never explicitly set. \<br /\>When true, Dependabot will open PRs to support security updates for outdated dependencies. \<br /\>Setting Dependabot enablement state is only supported for repo enablement and not org or project enablement at this time.
|
|
153
|
+
*/
|
|
154
|
+
dependabotEnabled: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Dependency Scanning Injection enablement status set to False when disabled and True when enabled; Null is never explicitly set. \<br /\> If Advanced Security is NOT already enabled, behavior will depend on if Advanced Security is to be enabled/disabled. DependencyScanningInjectionEnabled will not affect anything in this scenario. \<br /\> If Advanced Security is to be disabled, the value of DependencyScanningInjectionEnabled will have no effect. \<br /\> Setting Dependency Scanning enablement state is only supported for repo enablement and not org or project enablement at this time.
|
|
157
|
+
*/
|
|
158
|
+
dependencyScanningInjectionEnabled: boolean;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Information related to Code Scanning meter usage
|
|
162
|
+
*/
|
|
163
|
+
export interface CodeScanningMeterUsage {
|
|
164
|
+
/**
|
|
165
|
+
* The identityRef of committers that contributed to repositories with Code Scanning enabled
|
|
166
|
+
*/
|
|
167
|
+
codeScanningBilledUsers: BilledCommittersList;
|
|
168
|
+
/**
|
|
169
|
+
* True when Code Scanning plan is enabled in this organization
|
|
170
|
+
*/
|
|
171
|
+
isCodeScanningEnabled: boolean;
|
|
172
|
+
}
|
|
133
173
|
/**
|
|
134
174
|
* Information related to billing for Advanced Security services
|
|
135
175
|
*/
|
|
@@ -168,3 +208,163 @@ export interface MeterUsage {
|
|
|
168
208
|
*/
|
|
169
209
|
uniqueCommitterCount: number;
|
|
170
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Information related to meter usage estimate for Code Scanning and Secret Scanning
|
|
213
|
+
*/
|
|
214
|
+
export interface MeterUsageEstimate {
|
|
215
|
+
/**
|
|
216
|
+
* Meter usage estimate when enabling Code Scanning
|
|
217
|
+
*/
|
|
218
|
+
codeScanningMeterUsageEstimate: BilledCommittersList;
|
|
219
|
+
/**
|
|
220
|
+
* Meter usage estimate when enabling Secret Scanning
|
|
221
|
+
*/
|
|
222
|
+
secretScanningMeterUsageEstimate: BilledCommittersList;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Information related to billing for Advanced Security services
|
|
226
|
+
*/
|
|
227
|
+
export interface MeterUsageSummary {
|
|
228
|
+
/**
|
|
229
|
+
* The Azure DevOps account
|
|
230
|
+
*/
|
|
231
|
+
accountId: string;
|
|
232
|
+
azureSubscriptionId: string;
|
|
233
|
+
/**
|
|
234
|
+
* The date this billing information pertains to
|
|
235
|
+
*/
|
|
236
|
+
billingDate: Date;
|
|
237
|
+
/**
|
|
238
|
+
* Billing Information of repositories where Code Scanning is enabled
|
|
239
|
+
*/
|
|
240
|
+
codeScanningMeterUsage: CodeScanningMeterUsage;
|
|
241
|
+
/**
|
|
242
|
+
* Billing Information of repositories where Secret Scanning is enabled
|
|
243
|
+
*/
|
|
244
|
+
secretScanningMeterUsage: SecretScanningMeterUsage;
|
|
245
|
+
/**
|
|
246
|
+
* The Azure subscription
|
|
247
|
+
*/
|
|
248
|
+
tenantId: string;
|
|
249
|
+
}
|
|
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;
|
|
279
|
+
}
|
|
280
|
+
export interface ProjectEnablementSettings {
|
|
281
|
+
/**
|
|
282
|
+
* Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
|
|
283
|
+
*/
|
|
284
|
+
codeScanningEnabled: boolean;
|
|
285
|
+
/**
|
|
286
|
+
* Includes code scanning features that can be enabled.
|
|
287
|
+
*/
|
|
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;
|
|
309
|
+
}
|
|
310
|
+
export interface RepoEnablementSettings {
|
|
311
|
+
/**
|
|
312
|
+
* Code Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
|
|
313
|
+
*/
|
|
314
|
+
codeScanningEnabled: boolean;
|
|
315
|
+
/**
|
|
316
|
+
* The last time the status of Code Scanning for this repository was updated
|
|
317
|
+
*/
|
|
318
|
+
codeScanningEnablementLastChangedDate: Date;
|
|
319
|
+
/**
|
|
320
|
+
* Includes code scanning features that can be enabled.
|
|
321
|
+
*/
|
|
322
|
+
codeScanningFeatures: CodeScanningFeatures;
|
|
323
|
+
/**
|
|
324
|
+
* Indicates whether the repository is part of the bundled SKU (old billing plan) or unbundled SKUs (new billing plan).
|
|
325
|
+
*/
|
|
326
|
+
isBundledSKU: boolean;
|
|
327
|
+
/**
|
|
328
|
+
* The project Id
|
|
329
|
+
*/
|
|
330
|
+
projectId: string;
|
|
331
|
+
/**
|
|
332
|
+
* The repository Id
|
|
333
|
+
*/
|
|
334
|
+
repositoryId: string;
|
|
335
|
+
/**
|
|
336
|
+
* Secret Scan enablement status set to False when disabled and True when enabled; Null is never explicitly set.
|
|
337
|
+
*/
|
|
338
|
+
secretScanningEnabled: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* The last time the status of Secret Scanning for this repository was updated
|
|
341
|
+
*/
|
|
342
|
+
secretScanningEnablementLastChangedDate: Date;
|
|
343
|
+
/**
|
|
344
|
+
* Includes secret scanning features that can be enabled.
|
|
345
|
+
*/
|
|
346
|
+
secretScanningFeatures: SecretScanningFeatures;
|
|
347
|
+
}
|
|
348
|
+
export interface SecretScanningFeatures {
|
|
349
|
+
/**
|
|
350
|
+
* When true, pushes containing secrets will be blocked. \<br /\>When false, pushes are scanned for secrets and are not blocked. \<br /\>If includeAllProperties in the request is false, this value will be null.
|
|
351
|
+
*/
|
|
352
|
+
blockPushes: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* ForceRepoSecretScanning will be set to true when Enabled, false when Disabled, and null when not set. \<br /\> If GHAzDO is NOT already enabled, behavior will depend on if GHAzDO is to be enabled/disabled. ForceRepoSecretScanning will not affect anything in this scenario. \<br /\> If GHAzDO is to be disabled, the value of ForceRepoSecretScan will have no effect. \<br /\> If GHAzDO is to be enabled for the first time on a repo, then ForceRepoSecretScanning will have no effect. \<br /\> If GHAzDO is to be enabled and the repo is already enabled, then ForceRepoSecretScanning will force the secret scanning job to be run if it is set to true. \<br /\> In all cases where ForceRepoSecretScanning is not expected to affect behavior, it will be set to false before being sent to Tfs.
|
|
355
|
+
*/
|
|
356
|
+
forceRepoSecretScanning: boolean;
|
|
357
|
+
}
|
|
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
|
+
}
|
|
@@ -3,6 +3,22 @@ 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
|
+
* Determine if Advanced Security is enabled for a repository
|
|
8
|
+
*
|
|
9
|
+
* @param project - Project ID or project name
|
|
10
|
+
* @param repository - The name or ID of the repository
|
|
11
|
+
* @param includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected
|
|
12
|
+
*/
|
|
13
|
+
getRepoEnablementStatus2(project: string, repository: string, includeAllProperties?: boolean): Promise<Management.RepoEnablementSettings>;
|
|
14
|
+
/**
|
|
15
|
+
* Update the enablement of Advanced Security for a repository
|
|
16
|
+
*
|
|
17
|
+
* @param savedAdvSecEnablementStatus - new status
|
|
18
|
+
* @param project - Project ID or project name
|
|
19
|
+
* @param repository - Name or ID of the repository
|
|
20
|
+
*/
|
|
21
|
+
updateRepoAdvSecEnablementStatus2(savedAdvSecEnablementStatus: Management.RepoEnablementSettings, project: string, repository: string): Promise<void>;
|
|
6
22
|
/**
|
|
7
23
|
* 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.
|
|
8
24
|
*
|
|
@@ -24,6 +40,27 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
24
40
|
* @param billingDate - The date to query, or if not provided, today
|
|
25
41
|
*/
|
|
26
42
|
getMeterUsage(billingDate?: Date): Promise<Management.MeterUsage>;
|
|
43
|
+
/**
|
|
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
|
+
*
|
|
46
|
+
* @param meterUsage -
|
|
47
|
+
*/
|
|
48
|
+
createBillingSnapshot2(meterUsage: Management.MeterUsageSummary): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Get all billable committers details, including those not matched with a VSID.
|
|
51
|
+
*
|
|
52
|
+
* @param billingDate - The date to query, or if not provided, today
|
|
53
|
+
*/
|
|
54
|
+
getBillableCommitterDetails2(billingDate?: Date): Promise<Management.BillableCommitterDetails[]>;
|
|
55
|
+
/**
|
|
56
|
+
*/
|
|
57
|
+
getLastMeterUsage2(): Promise<Management.MeterUsageSummary>;
|
|
58
|
+
/**
|
|
59
|
+
* Get commiters used when calculating billing information.
|
|
60
|
+
*
|
|
61
|
+
* @param billingDate - The date to query, or if not provided, today
|
|
62
|
+
*/
|
|
63
|
+
getMeterUsage2(billingDate?: Date): Promise<Management.MeterUsageSummary>;
|
|
27
64
|
/**
|
|
28
65
|
* Get the current status of Advanced Security for the organization
|
|
29
66
|
*
|
|
@@ -36,6 +73,18 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
36
73
|
* @param savedAdvSecEnablementStatus - The new status
|
|
37
74
|
*/
|
|
38
75
|
updateOrgEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Get the current status of Advanced Security for the organization
|
|
78
|
+
*
|
|
79
|
+
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
80
|
+
*/
|
|
81
|
+
getOrgEnablementStatus2(includeAllProperties?: boolean): Promise<Management.OrgEnablementSettings>;
|
|
82
|
+
/**
|
|
83
|
+
* Update the status of Advanced Security for the organization
|
|
84
|
+
*
|
|
85
|
+
* @param savedAdvSecEnablementStatus - The new status
|
|
86
|
+
*/
|
|
87
|
+
updateOrgEnablementStatus2(savedAdvSecEnablementStatus: Management.OrgEnablementSettings): Promise<void>;
|
|
39
88
|
/**
|
|
40
89
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
|
|
41
90
|
*
|
|
@@ -46,6 +95,16 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
46
95
|
*
|
|
47
96
|
*/
|
|
48
97
|
getEstimatedOrgBillablePushers(): Promise<string[]>;
|
|
98
|
+
/**
|
|
99
|
+
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
|
|
100
|
+
*
|
|
101
|
+
*/
|
|
102
|
+
getEstimatedBillablePushersDetailsForOrg2(): Promise<Management.MeterUsageEstimate>;
|
|
103
|
+
/**
|
|
104
|
+
* Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
getEstimatedOrgBillablePushers2(): Promise<string[]>;
|
|
49
108
|
/**
|
|
50
109
|
* Get the current status of Advanced Security for a project
|
|
51
110
|
*
|
|
@@ -60,6 +119,20 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
60
119
|
* @param project - Project ID or project name
|
|
61
120
|
*/
|
|
62
121
|
updateProjectEnablementStatus(savedAdvSecEnablementStatus: Management.AdvSecEnablementSettingsUpdate, project: string): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Get the current status of Advanced Security for a project
|
|
124
|
+
*
|
|
125
|
+
* @param project - Project ID or project name
|
|
126
|
+
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
127
|
+
*/
|
|
128
|
+
getProjectEnablementStatus2(project: string, includeAllProperties?: boolean): Promise<Management.ProjectEnablementSettings>;
|
|
129
|
+
/**
|
|
130
|
+
* Update the status of Advanced Security for the project
|
|
131
|
+
*
|
|
132
|
+
* @param savedAdvSecEnablementStatus - The new status
|
|
133
|
+
* @param project - Project ID or project name
|
|
134
|
+
*/
|
|
135
|
+
updateProjectEnablementStatus2(savedAdvSecEnablementStatus: Management.ProjectEnablementSettings, project: string): Promise<void>;
|
|
63
136
|
/**
|
|
64
137
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
|
|
65
138
|
*
|
|
@@ -72,6 +145,18 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
72
145
|
* @param project - Project ID or project name
|
|
73
146
|
*/
|
|
74
147
|
getEstimatedProjectBillablePushers(project: string): Promise<string[]>;
|
|
148
|
+
/**
|
|
149
|
+
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
|
|
150
|
+
*
|
|
151
|
+
* @param project - Project ID or project name
|
|
152
|
+
*/
|
|
153
|
+
getEstimatedBillablePushersDetailsForProject2(project: string): Promise<Management.MeterUsageEstimate>;
|
|
154
|
+
/**
|
|
155
|
+
* Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.
|
|
156
|
+
*
|
|
157
|
+
* @param project - Project ID or project name
|
|
158
|
+
*/
|
|
159
|
+
getEstimatedProjectBillablePushers2(project: string): Promise<string[]>;
|
|
75
160
|
/**
|
|
76
161
|
* Determine if Advanced Security is enabled for a repository
|
|
77
162
|
*
|
|
@@ -102,4 +187,18 @@ export declare class ManagementRestClient extends RestClientBase {
|
|
|
102
187
|
* @param repository -
|
|
103
188
|
*/
|
|
104
189
|
getEstimatedRepoBillablePushersDetails(project: string, repository: string): Promise<Management.BilledCommitter[]>;
|
|
190
|
+
/**
|
|
191
|
+
* Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
|
|
192
|
+
*
|
|
193
|
+
* @param project - Project ID or project name
|
|
194
|
+
* @param repository - The name or ID of the repository
|
|
195
|
+
*/
|
|
196
|
+
getEstimatedRepoBillableCommitters2(project: string, repository: string): Promise<string[]>;
|
|
197
|
+
/**
|
|
198
|
+
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
|
|
199
|
+
*
|
|
200
|
+
* @param project - Project ID or project name
|
|
201
|
+
* @param repository -
|
|
202
|
+
*/
|
|
203
|
+
getEstimatedRepoBillableCommittersDetails2(project: string, repository: string): Promise<Management.MeterUsageEstimate>;
|
|
105
204
|
}
|
|
@@ -56,6 +56,55 @@ 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
|
+
* Determine if Advanced Security is enabled for a repository
|
|
61
|
+
*
|
|
62
|
+
* @param project - Project ID or project name
|
|
63
|
+
* @param repository - The name or ID of the repository
|
|
64
|
+
* @param includeAllProperties - When true, will also determine if pushes are blocked when secrets are detected
|
|
65
|
+
*/
|
|
66
|
+
ManagementRestClient.prototype.getRepoEnablementStatus2 = function (project, repository, includeAllProperties) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
var queryValues;
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
queryValues = {
|
|
71
|
+
includeAllProperties: includeAllProperties
|
|
72
|
+
};
|
|
73
|
+
return [2 /*return*/, this.beginRequest({
|
|
74
|
+
apiVersion: "7.2-preview.1",
|
|
75
|
+
routeTemplate: "{project}/_apis/Management/repositories/{repository}/enablement2",
|
|
76
|
+
routeValues: {
|
|
77
|
+
project: project,
|
|
78
|
+
repository: repository
|
|
79
|
+
},
|
|
80
|
+
queryParams: queryValues
|
|
81
|
+
})];
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Update the enablement of Advanced Security for a repository
|
|
87
|
+
*
|
|
88
|
+
* @param savedAdvSecEnablementStatus - new status
|
|
89
|
+
* @param project - Project ID or project name
|
|
90
|
+
* @param repository - Name or ID of the repository
|
|
91
|
+
*/
|
|
92
|
+
ManagementRestClient.prototype.updateRepoAdvSecEnablementStatus2 = function (savedAdvSecEnablementStatus, project, repository) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
94
|
+
return __generator(this, function (_a) {
|
|
95
|
+
return [2 /*return*/, this.beginRequest({
|
|
96
|
+
apiVersion: "7.2-preview.1",
|
|
97
|
+
method: "PATCH",
|
|
98
|
+
routeTemplate: "{project}/_apis/Management/repositories/{repository}/enablement2",
|
|
99
|
+
routeValues: {
|
|
100
|
+
project: project,
|
|
101
|
+
repository: repository
|
|
102
|
+
},
|
|
103
|
+
body: savedAdvSecEnablementStatus
|
|
104
|
+
})];
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
};
|
|
59
108
|
/**
|
|
60
109
|
* 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.
|
|
61
110
|
*
|
|
@@ -137,6 +186,87 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
137
186
|
});
|
|
138
187
|
});
|
|
139
188
|
};
|
|
189
|
+
/**
|
|
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
|
+
*
|
|
192
|
+
* @param meterUsage -
|
|
193
|
+
*/
|
|
194
|
+
ManagementRestClient.prototype.createBillingSnapshot2 = function (meterUsage) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
196
|
+
return __generator(this, function (_a) {
|
|
197
|
+
return [2 /*return*/, this.beginRequest({
|
|
198
|
+
apiVersion: "7.2-preview.1",
|
|
199
|
+
method: "POST",
|
|
200
|
+
routeTemplate: "_apis/Management/MeterUsage2/{action}",
|
|
201
|
+
routeValues: {
|
|
202
|
+
action: "Default"
|
|
203
|
+
},
|
|
204
|
+
body: meterUsage
|
|
205
|
+
})];
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Get all billable committers details, including those not matched with a VSID.
|
|
211
|
+
*
|
|
212
|
+
* @param billingDate - The date to query, or if not provided, today
|
|
213
|
+
*/
|
|
214
|
+
ManagementRestClient.prototype.getBillableCommitterDetails2 = function (billingDate) {
|
|
215
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
216
|
+
var queryValues;
|
|
217
|
+
return __generator(this, function (_a) {
|
|
218
|
+
queryValues = {
|
|
219
|
+
billingDate: billingDate
|
|
220
|
+
};
|
|
221
|
+
return [2 /*return*/, this.beginRequest({
|
|
222
|
+
apiVersion: "7.2-preview.1",
|
|
223
|
+
routeTemplate: "_apis/Management/MeterUsage2/{action}",
|
|
224
|
+
routeValues: {
|
|
225
|
+
action: "Details"
|
|
226
|
+
},
|
|
227
|
+
queryParams: queryValues
|
|
228
|
+
})];
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
*/
|
|
234
|
+
ManagementRestClient.prototype.getLastMeterUsage2 = function () {
|
|
235
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
236
|
+
return __generator(this, function (_a) {
|
|
237
|
+
return [2 /*return*/, this.beginRequest({
|
|
238
|
+
apiVersion: "7.2-preview.1",
|
|
239
|
+
routeTemplate: "_apis/Management/MeterUsage2/{action}",
|
|
240
|
+
routeValues: {
|
|
241
|
+
action: "Last"
|
|
242
|
+
}
|
|
243
|
+
})];
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Get commiters used when calculating billing information.
|
|
249
|
+
*
|
|
250
|
+
* @param billingDate - The date to query, or if not provided, today
|
|
251
|
+
*/
|
|
252
|
+
ManagementRestClient.prototype.getMeterUsage2 = function (billingDate) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
254
|
+
var queryValues;
|
|
255
|
+
return __generator(this, function (_a) {
|
|
256
|
+
queryValues = {
|
|
257
|
+
billingDate: billingDate
|
|
258
|
+
};
|
|
259
|
+
return [2 /*return*/, this.beginRequest({
|
|
260
|
+
apiVersion: "7.2-preview.1",
|
|
261
|
+
routeTemplate: "_apis/Management/MeterUsage2/{action}",
|
|
262
|
+
routeValues: {
|
|
263
|
+
action: "Default"
|
|
264
|
+
},
|
|
265
|
+
queryParams: queryValues
|
|
266
|
+
})];
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
};
|
|
140
270
|
/**
|
|
141
271
|
* Get the current status of Advanced Security for the organization
|
|
142
272
|
*
|
|
@@ -174,6 +304,43 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
174
304
|
});
|
|
175
305
|
});
|
|
176
306
|
};
|
|
307
|
+
/**
|
|
308
|
+
* Get the current status of Advanced Security for the organization
|
|
309
|
+
*
|
|
310
|
+
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
311
|
+
*/
|
|
312
|
+
ManagementRestClient.prototype.getOrgEnablementStatus2 = function (includeAllProperties) {
|
|
313
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
314
|
+
var queryValues;
|
|
315
|
+
return __generator(this, function (_a) {
|
|
316
|
+
queryValues = {
|
|
317
|
+
includeAllProperties: includeAllProperties
|
|
318
|
+
};
|
|
319
|
+
return [2 /*return*/, this.beginRequest({
|
|
320
|
+
apiVersion: "7.2-preview.1",
|
|
321
|
+
routeTemplate: "_apis/Management/enablement2",
|
|
322
|
+
queryParams: queryValues
|
|
323
|
+
})];
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* Update the status of Advanced Security for the organization
|
|
329
|
+
*
|
|
330
|
+
* @param savedAdvSecEnablementStatus - The new status
|
|
331
|
+
*/
|
|
332
|
+
ManagementRestClient.prototype.updateOrgEnablementStatus2 = function (savedAdvSecEnablementStatus) {
|
|
333
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
334
|
+
return __generator(this, function (_a) {
|
|
335
|
+
return [2 /*return*/, this.beginRequest({
|
|
336
|
+
apiVersion: "7.2-preview.1",
|
|
337
|
+
method: "PATCH",
|
|
338
|
+
routeTemplate: "_apis/Management/enablement2",
|
|
339
|
+
body: savedAdvSecEnablementStatus
|
|
340
|
+
})];
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
};
|
|
177
344
|
/**
|
|
178
345
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
|
|
179
346
|
*
|
|
@@ -208,6 +375,40 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
208
375
|
});
|
|
209
376
|
});
|
|
210
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this organization.
|
|
380
|
+
*
|
|
381
|
+
*/
|
|
382
|
+
ManagementRestClient.prototype.getEstimatedBillablePushersDetailsForOrg2 = function () {
|
|
383
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
384
|
+
return __generator(this, function (_a) {
|
|
385
|
+
return [2 /*return*/, this.beginRequest({
|
|
386
|
+
apiVersion: "7.2-preview.1",
|
|
387
|
+
routeTemplate: "_apis/Management/meterUsageEstimate2/{action}",
|
|
388
|
+
routeValues: {
|
|
389
|
+
action: "Details"
|
|
390
|
+
}
|
|
391
|
+
})];
|
|
392
|
+
});
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this organization.
|
|
397
|
+
*
|
|
398
|
+
*/
|
|
399
|
+
ManagementRestClient.prototype.getEstimatedOrgBillablePushers2 = function () {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
401
|
+
return __generator(this, function (_a) {
|
|
402
|
+
return [2 /*return*/, this.beginRequest({
|
|
403
|
+
apiVersion: "7.2-preview.1",
|
|
404
|
+
routeTemplate: "_apis/Management/meterUsageEstimate2/{action}",
|
|
405
|
+
routeValues: {
|
|
406
|
+
action: "Default"
|
|
407
|
+
}
|
|
408
|
+
})];
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
};
|
|
211
412
|
/**
|
|
212
413
|
* Get the current status of Advanced Security for a project
|
|
213
414
|
*
|
|
@@ -253,6 +454,51 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
253
454
|
});
|
|
254
455
|
});
|
|
255
456
|
};
|
|
457
|
+
/**
|
|
458
|
+
* Get the current status of Advanced Security for a project
|
|
459
|
+
*
|
|
460
|
+
* @param project - Project ID or project name
|
|
461
|
+
* @param includeAllProperties - When true, also determine if pushes are blocked if they contain secrets
|
|
462
|
+
*/
|
|
463
|
+
ManagementRestClient.prototype.getProjectEnablementStatus2 = function (project, includeAllProperties) {
|
|
464
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
465
|
+
var queryValues;
|
|
466
|
+
return __generator(this, function (_a) {
|
|
467
|
+
queryValues = {
|
|
468
|
+
includeAllProperties: includeAllProperties
|
|
469
|
+
};
|
|
470
|
+
return [2 /*return*/, this.beginRequest({
|
|
471
|
+
apiVersion: "7.2-preview.1",
|
|
472
|
+
routeTemplate: "{project}/_apis/Management/enablement2",
|
|
473
|
+
routeValues: {
|
|
474
|
+
project: project
|
|
475
|
+
},
|
|
476
|
+
queryParams: queryValues
|
|
477
|
+
})];
|
|
478
|
+
});
|
|
479
|
+
});
|
|
480
|
+
};
|
|
481
|
+
/**
|
|
482
|
+
* Update the status of Advanced Security for the project
|
|
483
|
+
*
|
|
484
|
+
* @param savedAdvSecEnablementStatus - The new status
|
|
485
|
+
* @param project - Project ID or project name
|
|
486
|
+
*/
|
|
487
|
+
ManagementRestClient.prototype.updateProjectEnablementStatus2 = function (savedAdvSecEnablementStatus, project) {
|
|
488
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
489
|
+
return __generator(this, function (_a) {
|
|
490
|
+
return [2 /*return*/, this.beginRequest({
|
|
491
|
+
apiVersion: "7.2-preview.1",
|
|
492
|
+
method: "PATCH",
|
|
493
|
+
routeTemplate: "{project}/_apis/Management/enablement2",
|
|
494
|
+
routeValues: {
|
|
495
|
+
project: project
|
|
496
|
+
},
|
|
497
|
+
body: savedAdvSecEnablementStatus
|
|
498
|
+
})];
|
|
499
|
+
});
|
|
500
|
+
});
|
|
501
|
+
};
|
|
256
502
|
/**
|
|
257
503
|
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
|
|
258
504
|
*
|
|
@@ -291,6 +537,44 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
291
537
|
});
|
|
292
538
|
});
|
|
293
539
|
};
|
|
540
|
+
/**
|
|
541
|
+
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this project.
|
|
542
|
+
*
|
|
543
|
+
* @param project - Project ID or project name
|
|
544
|
+
*/
|
|
545
|
+
ManagementRestClient.prototype.getEstimatedBillablePushersDetailsForProject2 = function (project) {
|
|
546
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
547
|
+
return __generator(this, function (_a) {
|
|
548
|
+
return [2 /*return*/, this.beginRequest({
|
|
549
|
+
apiVersion: "7.2-preview.1",
|
|
550
|
+
routeTemplate: "{project}/_apis/Management/meterUsageEstimate2/{action}",
|
|
551
|
+
routeValues: {
|
|
552
|
+
project: project,
|
|
553
|
+
action: "Details"
|
|
554
|
+
}
|
|
555
|
+
})];
|
|
556
|
+
});
|
|
557
|
+
});
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Estimate the number of committers that would be added to the customer's usage if Advanced Security was enabled for this project.
|
|
561
|
+
*
|
|
562
|
+
* @param project - Project ID or project name
|
|
563
|
+
*/
|
|
564
|
+
ManagementRestClient.prototype.getEstimatedProjectBillablePushers2 = function (project) {
|
|
565
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
566
|
+
return __generator(this, function (_a) {
|
|
567
|
+
return [2 /*return*/, this.beginRequest({
|
|
568
|
+
apiVersion: "7.2-preview.1",
|
|
569
|
+
routeTemplate: "{project}/_apis/Management/meterUsageEstimate2/{action}",
|
|
570
|
+
routeValues: {
|
|
571
|
+
project: project,
|
|
572
|
+
action: "Default"
|
|
573
|
+
}
|
|
574
|
+
})];
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
};
|
|
294
578
|
/**
|
|
295
579
|
* Determine if Advanced Security is enabled for a repository
|
|
296
580
|
*
|
|
@@ -382,6 +666,48 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
382
666
|
});
|
|
383
667
|
});
|
|
384
668
|
};
|
|
669
|
+
/**
|
|
670
|
+
* Estimate the committers that would be added to the customer's usage if Advanced Security was enabled for this repository.
|
|
671
|
+
*
|
|
672
|
+
* @param project - Project ID or project name
|
|
673
|
+
* @param repository - The name or ID of the repository
|
|
674
|
+
*/
|
|
675
|
+
ManagementRestClient.prototype.getEstimatedRepoBillableCommitters2 = function (project, repository) {
|
|
676
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
677
|
+
return __generator(this, function (_a) {
|
|
678
|
+
return [2 /*return*/, this.beginRequest({
|
|
679
|
+
apiVersion: "7.2-preview.1",
|
|
680
|
+
routeTemplate: "{project}/_apis/Management/repositories/{repository}/meterUsageEstimate2/{action}",
|
|
681
|
+
routeValues: {
|
|
682
|
+
project: project,
|
|
683
|
+
repository: repository,
|
|
684
|
+
action: "Default"
|
|
685
|
+
}
|
|
686
|
+
})];
|
|
687
|
+
});
|
|
688
|
+
});
|
|
689
|
+
};
|
|
690
|
+
/**
|
|
691
|
+
* Estimate the pushers that would be added to the customer's usage if Advanced Security was enabled for this repository.
|
|
692
|
+
*
|
|
693
|
+
* @param project - Project ID or project name
|
|
694
|
+
* @param repository -
|
|
695
|
+
*/
|
|
696
|
+
ManagementRestClient.prototype.getEstimatedRepoBillableCommittersDetails2 = function (project, repository) {
|
|
697
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
698
|
+
return __generator(this, function (_a) {
|
|
699
|
+
return [2 /*return*/, this.beginRequest({
|
|
700
|
+
apiVersion: "7.2-preview.1",
|
|
701
|
+
routeTemplate: "{project}/_apis/Management/repositories/{repository}/meterUsageEstimate2/{action}",
|
|
702
|
+
routeValues: {
|
|
703
|
+
project: project,
|
|
704
|
+
repository: repository,
|
|
705
|
+
action: "Details"
|
|
706
|
+
}
|
|
707
|
+
})];
|
|
708
|
+
});
|
|
709
|
+
});
|
|
710
|
+
};
|
|
385
711
|
return ManagementRestClient;
|
|
386
712
|
}(RestClientBase_1.RestClientBase));
|
|
387
713
|
exports.ManagementRestClient = ManagementRestClient;
|
|
@@ -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 n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{s(n.next(e))}catch(e){o(e)}}function u(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,u)}s((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(o=u.trys,!(o=o.length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){u.label=r[1];break}if(6===r[0]&&u.label<o[1]){u.label=o[1],o=r;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(r);break}o[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,i,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createBillingSnapshot=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},body:e})]})})},t.prototype.getBillableCommitterDetails=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Details"},queryParams:t})]})})},t.prototype.getLastMeterUsage=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Last"}})]})})},t.prototype.getMeterUsage=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={billingDate:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/MeterUsage/{action}",routeValues:{action:"Default"},queryParams:t})]})})},t.prototype.getOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={includeAllProperties:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/enablement",queryParams:t})]})})},t.prototype.updateOrgEnablementStatus=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"_apis/Management/enablement",body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForOrg=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Details"}})]})})},t.prototype.getEstimatedOrgBillablePushers=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Management/meterUsageEstimate/{action}",routeValues:{action:"Default"}})]})})},t.prototype.getProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(n){return r={includeAllProperties:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:e},queryParams:r})]})})},t.prototype.updateProjectEnablementStatus=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/enablement",routeValues:{project:t},body:e})]})})},t.prototype.getEstimatedBillablePushersDetailsForProject=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Details"}})]})})},t.prototype.getEstimatedProjectBillablePushers=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/meterUsageEstimate/{action}",routeValues:{project:e,action:"Default"}})]})})},t.prototype.getRepoEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(i){return n={includeAllProperties:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:e,repository:t},queryParams:n})]})})},t.prototype.updateRepoAdvSecEnablementStatus=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Management/repositories/{repository}/enablement",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getEstimatedRepoBillableCommitters=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Default"}})]})})},t.prototype.getEstimatedRepoBillablePushersDetails=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Management/repositories/{repository}/meterUsageEstimate/{action}",routeValues:{project:e,repository:t,action:"Details"}})]})})},t}(r.RestClientBase);t.ManagementRestClient=n});
|
|
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});
|