azure-devops-extension-api 4.252.0 → 4.254.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdvancedSecurity.Reporting/Reporting.d.ts +79 -0
- package/AdvancedSecurity.Reporting/Reporting.js +20 -0
- package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
- package/AdvancedSecurity.Reporting/ReportingClient.d.ts +5 -1
- package/AdvancedSecurity.Reporting/ReportingClient.js +23 -2
- package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
- package/Alert/Alert.d.ts +68 -11
- package/Alert/Alert.js +62 -10
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +9 -1
- 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 +164 -0
- package/Management/Management.js +11 -0
- package/Management/Management.min.js +1 -1
- package/Management/ManagementClient.d.ts +103 -0
- package/Management/ManagementClient.js +342 -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,28 @@ export declare enum AlertType {
|
|
|
41
62
|
*/
|
|
42
63
|
License = 4
|
|
43
64
|
}
|
|
65
|
+
export interface FilterCriteria {
|
|
66
|
+
/**
|
|
67
|
+
* If provided, only return summary data for alerts of this type. Otherwise, return summary data for 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, summary data will be scoped to this time period.
|
|
76
|
+
*/
|
|
77
|
+
period: TimePeriod;
|
|
78
|
+
/**
|
|
79
|
+
* If provided, only return summary data for these projects Otherwise, return summary data for all projects.
|
|
80
|
+
*/
|
|
81
|
+
projects: string[];
|
|
82
|
+
/**
|
|
83
|
+
* If provided, only return summary data for alerts at these severities. \<br /\>Otherwise, return summary data for alerts at any severity.
|
|
84
|
+
*/
|
|
85
|
+
severities: Severity[];
|
|
86
|
+
}
|
|
44
87
|
/**
|
|
45
88
|
* Org Alert Summary.
|
|
46
89
|
*/
|
|
@@ -67,6 +110,10 @@ export interface OrgEnablementSummary {
|
|
|
67
110
|
*/
|
|
68
111
|
projects: ProjectEnablementSummary[];
|
|
69
112
|
}
|
|
113
|
+
export interface Project {
|
|
114
|
+
id: string;
|
|
115
|
+
name: string;
|
|
116
|
+
}
|
|
70
117
|
/**
|
|
71
118
|
* Project Alert Summary.
|
|
72
119
|
*/
|
|
@@ -109,6 +156,14 @@ export interface RepoAlertSummary {
|
|
|
109
156
|
* Total alerts by severity.
|
|
110
157
|
*/
|
|
111
158
|
alertsBySeverity: AlertSummaryBySeverity;
|
|
159
|
+
/**
|
|
160
|
+
* Total alerts by state.
|
|
161
|
+
*/
|
|
162
|
+
alertsByState: AlertSummaryByState;
|
|
163
|
+
/**
|
|
164
|
+
* Total active alerts in the repo.
|
|
165
|
+
*/
|
|
166
|
+
openAlerts: number;
|
|
112
167
|
/**
|
|
113
168
|
* RepoId.
|
|
114
169
|
*/
|
|
@@ -145,6 +200,12 @@ export interface RepoEnablementSummary {
|
|
|
145
200
|
[key: number]: ScanTypeSummaryProperties;
|
|
146
201
|
};
|
|
147
202
|
}
|
|
203
|
+
export interface RiskUXComputedFilters {
|
|
204
|
+
/**
|
|
205
|
+
* Display alerts for specified projects. Show alerts for all projects if none are specified.
|
|
206
|
+
*/
|
|
207
|
+
projects: Project[];
|
|
208
|
+
}
|
|
148
209
|
export interface ScanTypeSummaryProperties {
|
|
149
210
|
/**
|
|
150
211
|
* True if alerts are enabled for the associated alert type/repo combination, false if disabled.
|
|
@@ -165,3 +226,21 @@ export interface ScanTypeSummaryPropertiesData {
|
|
|
165
226
|
*/
|
|
166
227
|
enabled: boolean;
|
|
167
228
|
}
|
|
229
|
+
export declare enum Severity {
|
|
230
|
+
Low = 0,
|
|
231
|
+
Medium = 1,
|
|
232
|
+
High = 2,
|
|
233
|
+
Critical = 3,
|
|
234
|
+
Note = 4,
|
|
235
|
+
Warning = 5,
|
|
236
|
+
Error = 6,
|
|
237
|
+
Undefined = 7
|
|
238
|
+
}
|
|
239
|
+
export declare enum TimePeriod {
|
|
240
|
+
Undefined = 0,
|
|
241
|
+
Last24Hours = 5,
|
|
242
|
+
Last7Days = 6,
|
|
243
|
+
Last14Days = 7,
|
|
244
|
+
Last30Days = 8,
|
|
245
|
+
Last90Days = 9
|
|
246
|
+
}
|
|
@@ -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={}))});
|
|
@@ -3,11 +3,15 @@ import { RestClientBase } from "../Common/RestClientBase";
|
|
|
3
3
|
import * as Reporting from "../AdvancedSecurity.Reporting/Reporting";
|
|
4
4
|
export declare class ReportingRestClient extends RestClientBase {
|
|
5
5
|
constructor(options: IVssRestClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
*/
|
|
8
|
+
getRiskUXComputedFilters(): Promise<Reporting.RiskUXComputedFilters>;
|
|
6
9
|
/**
|
|
7
10
|
* Get Alert summary by severity for the org
|
|
8
11
|
*
|
|
12
|
+
* @param criteria -
|
|
9
13
|
*/
|
|
10
|
-
getAlertSummaryForOrg(): Promise<Reporting.OrgAlertSummary>;
|
|
14
|
+
getAlertSummaryForOrg(criteria?: Reporting.FilterCriteria): Promise<Reporting.OrgAlertSummary>;
|
|
11
15
|
/**
|
|
12
16
|
*/
|
|
13
17
|
getEnablementSummaryForOrg(): Promise<Reporting.OrgEnablementSummary>;
|
|
@@ -56,19 +56,40 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
56
56
|
function ReportingRestClient(options) {
|
|
57
57
|
return _super.call(this, options) || this;
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
*/
|
|
61
|
+
ReportingRestClient.prototype.getRiskUXComputedFilters = function () {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
return [2 /*return*/, this.beginRequest({
|
|
65
|
+
apiVersion: "7.2-preview.1",
|
|
66
|
+
routeTemplate: "_apis/Reporting/filters/{action}",
|
|
67
|
+
routeValues: {
|
|
68
|
+
action: "Alerts"
|
|
69
|
+
}
|
|
70
|
+
})];
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
};
|
|
59
74
|
/**
|
|
60
75
|
* Get Alert summary by severity for the org
|
|
61
76
|
*
|
|
77
|
+
* @param criteria -
|
|
62
78
|
*/
|
|
63
|
-
ReportingRestClient.prototype.getAlertSummaryForOrg = function () {
|
|
79
|
+
ReportingRestClient.prototype.getAlertSummaryForOrg = function (criteria) {
|
|
64
80
|
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
+
var queryValues;
|
|
65
82
|
return __generator(this, function (_a) {
|
|
83
|
+
queryValues = {
|
|
84
|
+
criteria: criteria
|
|
85
|
+
};
|
|
66
86
|
return [2 /*return*/, this.beginRequest({
|
|
67
87
|
apiVersion: "7.2-preview.1",
|
|
68
88
|
routeTemplate: "_apis/Reporting/summary/{action}",
|
|
69
89
|
routeValues: {
|
|
70
90
|
action: "Alerts"
|
|
71
|
-
}
|
|
91
|
+
},
|
|
92
|
+
queryParams: queryValues
|
|
72
93
|
})];
|
|
73
94
|
});
|
|
74
95
|
});
|
|
@@ -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
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(a,u)}s((n=n.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){function r(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){u.label=r[1];break}if(6===r[0]&&u.label<i[1]){u.label=i[1],i=r;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(r);break}i[2]&&u.ops.pop(),u.trys.pop();continue}r=e.call(t,u)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var n,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getRiskUXComputedFilters=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/filters/{action}",routeValues:{action:"Alerts"}})]})})},e.prototype.getAlertSummaryForOrg=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(r){return e={criteria:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Alerts"},queryParams:e})]})})},e.prototype.getEnablementSummaryForOrg=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Enablement"}})]})})},e}(r.RestClientBase);e.ReportingRestClient=n});
|
package/Alert/Alert.d.ts
CHANGED
|
@@ -179,6 +179,28 @@ export declare enum AlertType {
|
|
|
179
179
|
*/
|
|
180
180
|
License = 4
|
|
181
181
|
}
|
|
182
|
+
export declare enum AlertValidationRequestStatus {
|
|
183
|
+
/**
|
|
184
|
+
* Default, when the request status is not set/applicable.
|
|
185
|
+
*/
|
|
186
|
+
None = 0,
|
|
187
|
+
/**
|
|
188
|
+
* First validation request for the alert's validation fingerprints, created when the sarif is submitted for processing.
|
|
189
|
+
*/
|
|
190
|
+
Created = 1,
|
|
191
|
+
/**
|
|
192
|
+
* The secret validation jobs for the alert's validation fingerprints have been manually queued and at least one is still in progress.
|
|
193
|
+
*/
|
|
194
|
+
InProgress = 2,
|
|
195
|
+
/**
|
|
196
|
+
* All the secret validation jobs for the alert's validation fingerprints have returned Completed or Failed.
|
|
197
|
+
*/
|
|
198
|
+
Completed = 3,
|
|
199
|
+
/**
|
|
200
|
+
* This status is set only when there is an exception in the ValidationService.
|
|
201
|
+
*/
|
|
202
|
+
Failed = 4
|
|
203
|
+
}
|
|
182
204
|
/**
|
|
183
205
|
* Validity data for an alert that will be part of Alerts APIs and UI.
|
|
184
206
|
*/
|
|
@@ -187,9 +209,22 @@ export interface AlertValidityInfo {
|
|
|
187
209
|
validityStatus: AlertValidityStatus;
|
|
188
210
|
}
|
|
189
211
|
export declare enum AlertValidityStatus {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
212
|
+
/**
|
|
213
|
+
* When there are no validation fingerprints attached to the alert.
|
|
214
|
+
*/
|
|
215
|
+
None = 0,
|
|
216
|
+
/**
|
|
217
|
+
* When the validations for validation fingerprints associated to the alert have not been conclusive.
|
|
218
|
+
*/
|
|
219
|
+
Unknown = 1,
|
|
220
|
+
/**
|
|
221
|
+
* When atleast one validation fingerprint associated to the alert is exploitable.
|
|
222
|
+
*/
|
|
223
|
+
Active = 2,
|
|
224
|
+
/**
|
|
225
|
+
* When all validation fingerprints associated to the alert are not exploitable.
|
|
226
|
+
*/
|
|
227
|
+
Inactive = 3
|
|
193
228
|
}
|
|
194
229
|
/**
|
|
195
230
|
* AnalysisConfiguration class models a build definition.
|
|
@@ -493,7 +528,11 @@ export declare enum DismissalType {
|
|
|
493
528
|
/**
|
|
494
529
|
* Dismissal indicating user is agreeing to follow license guidance.
|
|
495
530
|
*/
|
|
496
|
-
AgreedToGuidance = 4
|
|
531
|
+
AgreedToGuidance = 4,
|
|
532
|
+
/**
|
|
533
|
+
* Dismissal indicating backend detection tool was upgraded and the alert is not detected by the new version of tool.
|
|
534
|
+
*/
|
|
535
|
+
ToolUpgrade = 5
|
|
497
536
|
}
|
|
498
537
|
export declare enum ExpandOption {
|
|
499
538
|
/**
|
|
@@ -886,9 +925,9 @@ export interface SearchCriteria {
|
|
|
886
925
|
*/
|
|
887
926
|
toolName: string;
|
|
888
927
|
/**
|
|
889
|
-
* If provided, only return alerts with the validity specified here. If the validity status is Unknown, fetch alerts of all validity results. \<br /\>Only applicable for secret alerts.
|
|
928
|
+
* If provided, only return alerts with the validity specified here. If the validity status is Unknown, fetch alerts of all validity results. \<br /\>Only applicable for secret alerts. \<br /\>Filtering by validity status may cause less alerts to be returned than requested with TOP parameter. \<br /\>Due to this behavior, the ContinuationToken(\<![CDATA[\<header name\>]]\>) in the response header should be relied on to decide if another batch needs to be fetched.
|
|
890
929
|
*/
|
|
891
|
-
validity: AlertValidityStatus;
|
|
930
|
+
validity: AlertValidityStatus[];
|
|
892
931
|
}
|
|
893
932
|
export declare enum Severity {
|
|
894
933
|
Low = 0,
|
|
@@ -998,13 +1037,31 @@ export interface ValidationFingerprint {
|
|
|
998
1037
|
/**
|
|
999
1038
|
* The result of the validation.
|
|
1000
1039
|
*/
|
|
1001
|
-
validityResult:
|
|
1040
|
+
validityResult: ValidationResult;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Data associated to a validation request for an alert. Along with the request status, this includes the validity data that is part of Get Alert(s) response.
|
|
1044
|
+
*/
|
|
1045
|
+
export interface ValidationRequestInfo extends AlertValidityInfo {
|
|
1046
|
+
alertValidationRequestStatus: AlertValidationRequestStatus;
|
|
1002
1047
|
}
|
|
1003
|
-
export declare enum
|
|
1048
|
+
export declare enum ValidationResult {
|
|
1049
|
+
/**
|
|
1050
|
+
* Default value, no information about the secret can be inferred from this.
|
|
1051
|
+
*/
|
|
1004
1052
|
None = 0,
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1053
|
+
/**
|
|
1054
|
+
* Represents a secret that can be used to connect to a resource.
|
|
1055
|
+
*/
|
|
1056
|
+
Exploitable = 1,
|
|
1057
|
+
/**
|
|
1058
|
+
* Represents a secret that can't be used to connect to a resource.
|
|
1059
|
+
*/
|
|
1060
|
+
NotExploitable = 2,
|
|
1061
|
+
/**
|
|
1062
|
+
* Represents a secret where no determination can be made about its exploitability.
|
|
1063
|
+
*/
|
|
1064
|
+
Inconclusive = 3
|
|
1008
1065
|
}
|
|
1009
1066
|
/**
|
|
1010
1067
|
* Information for locating files in a source control system
|
package/Alert/Alert.js
CHANGED
|
@@ -40,11 +40,47 @@ define(["require", "exports"], function (require, exports) {
|
|
|
40
40
|
*/
|
|
41
41
|
AlertType[AlertType["License"] = 4] = "License";
|
|
42
42
|
})(AlertType = exports.AlertType || (exports.AlertType = {}));
|
|
43
|
+
var AlertValidationRequestStatus;
|
|
44
|
+
(function (AlertValidationRequestStatus) {
|
|
45
|
+
/**
|
|
46
|
+
* Default, when the request status is not set/applicable.
|
|
47
|
+
*/
|
|
48
|
+
AlertValidationRequestStatus[AlertValidationRequestStatus["None"] = 0] = "None";
|
|
49
|
+
/**
|
|
50
|
+
* First validation request for the alert's validation fingerprints, created when the sarif is submitted for processing.
|
|
51
|
+
*/
|
|
52
|
+
AlertValidationRequestStatus[AlertValidationRequestStatus["Created"] = 1] = "Created";
|
|
53
|
+
/**
|
|
54
|
+
* The secret validation jobs for the alert's validation fingerprints have been manually queued and at least one is still in progress.
|
|
55
|
+
*/
|
|
56
|
+
AlertValidationRequestStatus[AlertValidationRequestStatus["InProgress"] = 2] = "InProgress";
|
|
57
|
+
/**
|
|
58
|
+
* All the secret validation jobs for the alert's validation fingerprints have returned Completed or Failed.
|
|
59
|
+
*/
|
|
60
|
+
AlertValidationRequestStatus[AlertValidationRequestStatus["Completed"] = 3] = "Completed";
|
|
61
|
+
/**
|
|
62
|
+
* This status is set only when there is an exception in the ValidationService.
|
|
63
|
+
*/
|
|
64
|
+
AlertValidationRequestStatus[AlertValidationRequestStatus["Failed"] = 4] = "Failed";
|
|
65
|
+
})(AlertValidationRequestStatus = exports.AlertValidationRequestStatus || (exports.AlertValidationRequestStatus = {}));
|
|
43
66
|
var AlertValidityStatus;
|
|
44
67
|
(function (AlertValidityStatus) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
68
|
+
/**
|
|
69
|
+
* When there are no validation fingerprints attached to the alert.
|
|
70
|
+
*/
|
|
71
|
+
AlertValidityStatus[AlertValidityStatus["None"] = 0] = "None";
|
|
72
|
+
/**
|
|
73
|
+
* When the validations for validation fingerprints associated to the alert have not been conclusive.
|
|
74
|
+
*/
|
|
75
|
+
AlertValidityStatus[AlertValidityStatus["Unknown"] = 1] = "Unknown";
|
|
76
|
+
/**
|
|
77
|
+
* When atleast one validation fingerprint associated to the alert is exploitable.
|
|
78
|
+
*/
|
|
79
|
+
AlertValidityStatus[AlertValidityStatus["Active"] = 2] = "Active";
|
|
80
|
+
/**
|
|
81
|
+
* When all validation fingerprints associated to the alert are not exploitable.
|
|
82
|
+
*/
|
|
83
|
+
AlertValidityStatus[AlertValidityStatus["Inactive"] = 3] = "Inactive";
|
|
48
84
|
})(AlertValidityStatus = exports.AlertValidityStatus || (exports.AlertValidityStatus = {}));
|
|
49
85
|
var AnalysisConfigurationType;
|
|
50
86
|
(function (AnalysisConfigurationType) {
|
|
@@ -174,6 +210,10 @@ define(["require", "exports"], function (require, exports) {
|
|
|
174
210
|
* Dismissal indicating user is agreeing to follow license guidance.
|
|
175
211
|
*/
|
|
176
212
|
DismissalType[DismissalType["AgreedToGuidance"] = 4] = "AgreedToGuidance";
|
|
213
|
+
/**
|
|
214
|
+
* Dismissal indicating backend detection tool was upgraded and the alert is not detected by the new version of tool.
|
|
215
|
+
*/
|
|
216
|
+
DismissalType[DismissalType["ToolUpgrade"] = 5] = "ToolUpgrade";
|
|
177
217
|
})(DismissalType = exports.DismissalType || (exports.DismissalType = {}));
|
|
178
218
|
var ExpandOption;
|
|
179
219
|
(function (ExpandOption) {
|
|
@@ -304,11 +344,23 @@ define(["require", "exports"], function (require, exports) {
|
|
|
304
344
|
*/
|
|
305
345
|
State[State["AutoDismissed"] = 8] = "AutoDismissed";
|
|
306
346
|
})(State = exports.State || (exports.State = {}));
|
|
307
|
-
var
|
|
308
|
-
(function (
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
347
|
+
var ValidationResult;
|
|
348
|
+
(function (ValidationResult) {
|
|
349
|
+
/**
|
|
350
|
+
* Default value, no information about the secret can be inferred from this.
|
|
351
|
+
*/
|
|
352
|
+
ValidationResult[ValidationResult["None"] = 0] = "None";
|
|
353
|
+
/**
|
|
354
|
+
* Represents a secret that can be used to connect to a resource.
|
|
355
|
+
*/
|
|
356
|
+
ValidationResult[ValidationResult["Exploitable"] = 1] = "Exploitable";
|
|
357
|
+
/**
|
|
358
|
+
* Represents a secret that can't be used to connect to a resource.
|
|
359
|
+
*/
|
|
360
|
+
ValidationResult[ValidationResult["NotExploitable"] = 2] = "NotExploitable";
|
|
361
|
+
/**
|
|
362
|
+
* Represents a secret where no determination can be made about its exploitability.
|
|
363
|
+
*/
|
|
364
|
+
ValidationResult[ValidationResult["Inconclusive"] = 3] = "Inconclusive";
|
|
365
|
+
})(ValidationResult = exports.ValidationResult || (exports.ValidationResult = {}));
|
|
314
366
|
});
|
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.
|
|
1
|
+
define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal"}(n.AlertListExpandOption||(n.AlertListExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License"}(n.AlertType||(n.AlertType={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(n.AlertValidationRequestStatus||(n.AlertValidationRequestStatus={}));!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(n.AlertValidityStatus||(n.AlertValidityStatus={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(n.Confidence||(n.Confidence={}));!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(n.DependencyKind||(n.DependencyKind={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(n.LicenseState||(n.LicenseState={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(n.MetadataChangeType||(n.MetadataChangeType={}));!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(n.MetadataOperation||(n.MetadataOperation={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed",e[e.Requeued=4]="Requeued"}(n.SarifJobStatus||(n.SarifJobStatus={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}));!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive"}(n.ValidationResult||(n.ValidationResult={}))});
|
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.ValidationRequestInfo>;
|
|
107
115
|
/**
|
|
108
116
|
* Initiate the validation process for a given alert
|
|
109
117
|
*
|
|
@@ -111,5 +119,5 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
111
119
|
* @param repository - The name or ID of a repository
|
|
112
120
|
* @param alertId - The ID of the alert
|
|
113
121
|
*/
|
|
114
|
-
initiateValidation(project: string, repository: string, alertId: number): Promise<Alert.
|
|
122
|
+
initiateValidation(project: string, repository: string, alertId: number): Promise<Alert.AlertValidationRequestStatus>;
|
|
115
123
|
}
|
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
|
/**
|