azure-devops-extension-api 4.234.0 → 4.236.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 +119 -0
- package/AdvancedSecurity.Reporting/Reporting.js +9 -0
- package/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
- package/AdvancedSecurity.Reporting/ReportingClient.d.ts +14 -0
- package/AdvancedSecurity.Reporting/ReportingClient.js +94 -0
- package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -0
- package/Alert/Alert.d.ts +111 -18
- package/Alert/Alert.js +29 -0
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +8 -0
- package/Alert/AlertClient.js +23 -0
- package/Alert/AlertClient.min.js +1 -1
- package/Dashboard/Dashboard.d.ts +4 -0
- package/Git/Git.d.ts +8 -4
- package/Git/GitClient.d.ts +2 -1
- package/Git/GitClient.js +8 -2
- package/Git/GitClient.min.js +1 -1
- package/Management/Management.d.ts +25 -3
- package/Management/ManagementClient.d.ts +6 -4
- package/Management/ManagementClient.js +20 -18
- package/Management/ManagementClient.min.js +1 -1
- package/Release/ReleaseClient.js +2 -2
- package/Release/ReleaseClient.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +7 -1
- package/TaskAgent/TaskAgent.js +2 -0
- package/TaskAgent/TaskAgent.min.js +1 -1
- package/TaskAgent/TaskAgentClient.d.ts +2 -1
- package/TaskAgent/TaskAgentClient.js +4 -2
- package/TaskAgent/TaskAgentClient.min.js +1 -1
- package/Test/Test.d.ts +104 -91
- package/Test/Test.js +0 -34
- package/Test/Test.min.js +1 -1
- package/TestResults/TestResultsClient.d.ts +69 -0
- package/TestResults/TestResultsClient.js +224 -0
- package/TestResults/TestResultsClient.min.js +1 -1
- package/WebApi/WebApi.d.ts +4 -0
- package/WebApi/WebApi.js +5 -0
- package/WebApi/WebApi.min.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert Summary by severity.
|
|
3
|
+
*/
|
|
4
|
+
export interface AlertSummaryBySeverity {
|
|
5
|
+
/**
|
|
6
|
+
* Total Critical severity alerts.
|
|
7
|
+
*/
|
|
8
|
+
critical: number;
|
|
9
|
+
/**
|
|
10
|
+
* Total High severity alerts.
|
|
11
|
+
*/
|
|
12
|
+
high: number;
|
|
13
|
+
/**
|
|
14
|
+
* Total low severity alerts.
|
|
15
|
+
*/
|
|
16
|
+
low: number;
|
|
17
|
+
/**
|
|
18
|
+
* Total Medium severity alerts.
|
|
19
|
+
*/
|
|
20
|
+
medium: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Org Alert Summary.
|
|
24
|
+
*/
|
|
25
|
+
export interface OrgAlertSummary {
|
|
26
|
+
/**
|
|
27
|
+
* Org Id.
|
|
28
|
+
*/
|
|
29
|
+
orgId: string;
|
|
30
|
+
/**
|
|
31
|
+
* A list of Project summary data.
|
|
32
|
+
*/
|
|
33
|
+
projects: ProjectAlertSummary[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Org Enablement Summary.
|
|
37
|
+
*/
|
|
38
|
+
export interface OrgEnablementSummary {
|
|
39
|
+
/**
|
|
40
|
+
* Org Id.
|
|
41
|
+
*/
|
|
42
|
+
orgId: string;
|
|
43
|
+
/**
|
|
44
|
+
* A list of Project Enablement data.
|
|
45
|
+
*/
|
|
46
|
+
projects: ProjectEnablementSummary[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Project Alert Summary.
|
|
50
|
+
*/
|
|
51
|
+
export interface ProjectAlertSummary {
|
|
52
|
+
/**
|
|
53
|
+
* Project Id.
|
|
54
|
+
*/
|
|
55
|
+
projectId: string;
|
|
56
|
+
/**
|
|
57
|
+
* Project Name.
|
|
58
|
+
*/
|
|
59
|
+
projectName: string;
|
|
60
|
+
/**
|
|
61
|
+
* A list of RepoAlertSummary data.
|
|
62
|
+
*/
|
|
63
|
+
repos: RepoAlertSummary[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Project Enablement Summary.
|
|
67
|
+
*/
|
|
68
|
+
export interface ProjectEnablementSummary {
|
|
69
|
+
/**
|
|
70
|
+
* Project Id.
|
|
71
|
+
*/
|
|
72
|
+
projectId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Project Name.
|
|
75
|
+
*/
|
|
76
|
+
projectName: string;
|
|
77
|
+
/**
|
|
78
|
+
* A list of RepoEnablementSummary data.
|
|
79
|
+
*/
|
|
80
|
+
repos: RepoEnablementSummary[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Repo Alert Summary.
|
|
84
|
+
*/
|
|
85
|
+
export interface RepoAlertSummary {
|
|
86
|
+
/**
|
|
87
|
+
* Total alerts by severity.
|
|
88
|
+
*/
|
|
89
|
+
alertsBySeverity: AlertSummaryBySeverity;
|
|
90
|
+
/**
|
|
91
|
+
* RepoId.
|
|
92
|
+
*/
|
|
93
|
+
repoId: string;
|
|
94
|
+
/**
|
|
95
|
+
* Repo Name.
|
|
96
|
+
*/
|
|
97
|
+
repoName: string;
|
|
98
|
+
/**
|
|
99
|
+
* Total active alerts in the repo.
|
|
100
|
+
*/
|
|
101
|
+
totalAlerts: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Repo Enablement Summary.
|
|
105
|
+
*/
|
|
106
|
+
export interface RepoEnablementSummary {
|
|
107
|
+
/**
|
|
108
|
+
* AdvSec is enabled for the repo.
|
|
109
|
+
*/
|
|
110
|
+
advSecIsEnabled: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* RepoId.
|
|
113
|
+
*/
|
|
114
|
+
repoId: string;
|
|
115
|
+
/**
|
|
116
|
+
* Repo Name.
|
|
117
|
+
*/
|
|
118
|
+
repoName: string;
|
|
119
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ---------------------------------------------------------
|
|
3
|
+
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* ---------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
define(["require", "exports"], function (require, exports) {
|
|
7
|
+
"use strict";
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IVssRestClientOptions } from "../Common/Context";
|
|
2
|
+
import { RestClientBase } from "../Common/RestClientBase";
|
|
3
|
+
import * as Reporting from "../AdvancedSecurity.Reporting/Reporting";
|
|
4
|
+
export declare class ReportingRestClient extends RestClientBase {
|
|
5
|
+
constructor(options: IVssRestClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* Get Alert summary by severity for the org
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
getAlertSummaryForOrg(): Promise<Reporting.OrgAlertSummary>;
|
|
11
|
+
/**
|
|
12
|
+
*/
|
|
13
|
+
getEnablementSummaryForOrg(): Promise<Reporting.OrgEnablementSummary>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ---------------------------------------------------------
|
|
3
|
+
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* ---------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
var __extends = (this && this.__extends) || (function () {
|
|
7
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
10
|
+
return function (d, b) {
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
|
+
function step(op) {
|
|
29
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
30
|
+
while (_) try {
|
|
31
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
32
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
33
|
+
switch (op[0]) {
|
|
34
|
+
case 0: case 1: t = op; break;
|
|
35
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
36
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
37
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
38
|
+
default:
|
|
39
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
40
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
41
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
42
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
43
|
+
if (t[2]) _.ops.pop();
|
|
44
|
+
_.trys.pop(); continue;
|
|
45
|
+
}
|
|
46
|
+
op = body.call(thisArg, _);
|
|
47
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
48
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
define(["require", "exports", "../Common/RestClientBase"], function (require, exports, RestClientBase_1) {
|
|
52
|
+
"use strict";
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var ReportingRestClient = /** @class */ (function (_super) {
|
|
55
|
+
__extends(ReportingRestClient, _super);
|
|
56
|
+
function ReportingRestClient(options) {
|
|
57
|
+
return _super.call(this, options) || this;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get Alert summary by severity for the org
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
ReportingRestClient.prototype.getAlertSummaryForOrg = function () {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
+
return __generator(this, function (_a) {
|
|
66
|
+
return [2 /*return*/, this.beginRequest({
|
|
67
|
+
apiVersion: "7.2-preview.1",
|
|
68
|
+
routeTemplate: "_apis/Reporting/summary/{action}",
|
|
69
|
+
routeValues: {
|
|
70
|
+
action: "Alerts"
|
|
71
|
+
}
|
|
72
|
+
})];
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
*/
|
|
78
|
+
ReportingRestClient.prototype.getEnablementSummaryForOrg = function () {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
80
|
+
return __generator(this, function (_a) {
|
|
81
|
+
return [2 /*return*/, this.beginRequest({
|
|
82
|
+
apiVersion: "7.2-preview.1",
|
|
83
|
+
routeTemplate: "_apis/Reporting/summary/{action}",
|
|
84
|
+
routeValues: {
|
|
85
|
+
action: "Enablement"
|
|
86
|
+
}
|
|
87
|
+
})];
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
return ReportingRestClient;
|
|
92
|
+
}(RestClientBase_1.RestClientBase));
|
|
93
|
+
exports.ReportingRestClient = ReportingRestClient;
|
|
94
|
+
});
|
|
@@ -0,0 +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(t){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"Alerts"}})]})})},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
|
@@ -8,6 +8,10 @@ export interface Alert {
|
|
|
8
8
|
* Type of the alert. E.g. secret, code, etc.
|
|
9
9
|
*/
|
|
10
10
|
alertType: AlertType;
|
|
11
|
+
/**
|
|
12
|
+
* Confidence level of the alert.
|
|
13
|
+
*/
|
|
14
|
+
confidence: Confidence;
|
|
11
15
|
/**
|
|
12
16
|
* Contains information for the dismissal of the alert if the alert has been dismissed.
|
|
13
17
|
*/
|
|
@@ -98,6 +102,32 @@ export interface AlertAnalysisInstance {
|
|
|
98
102
|
*/
|
|
99
103
|
state: State;
|
|
100
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Alert metadata.
|
|
107
|
+
*/
|
|
108
|
+
export interface AlertMetadata {
|
|
109
|
+
/**
|
|
110
|
+
* The ID of the alert.
|
|
111
|
+
*/
|
|
112
|
+
alertId: number;
|
|
113
|
+
/**
|
|
114
|
+
* A list of metadata to be associated with the alert.
|
|
115
|
+
*/
|
|
116
|
+
metadata: Metadata[];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Used to represent an update in a relationship between an alert and an artifact.
|
|
120
|
+
*/
|
|
121
|
+
export interface AlertMetadataChange {
|
|
122
|
+
/**
|
|
123
|
+
* The ID of the alert.
|
|
124
|
+
*/
|
|
125
|
+
alertId: number;
|
|
126
|
+
/**
|
|
127
|
+
* The change that occurred to the metadata.
|
|
128
|
+
*/
|
|
129
|
+
metadataChange: MetadataChange;
|
|
130
|
+
}
|
|
101
131
|
export interface AlertStateUpdate {
|
|
102
132
|
dismissedComment: string;
|
|
103
133
|
dismissedReason: DismissalType;
|
|
@@ -292,6 +322,16 @@ export declare enum ComponentType {
|
|
|
292
322
|
*/
|
|
293
323
|
Vcpkg = 16
|
|
294
324
|
}
|
|
325
|
+
export declare enum Confidence {
|
|
326
|
+
/**
|
|
327
|
+
* High confidence level for alert
|
|
328
|
+
*/
|
|
329
|
+
High = 0,
|
|
330
|
+
/**
|
|
331
|
+
* Other confidence level for alert
|
|
332
|
+
*/
|
|
333
|
+
Other = 1
|
|
334
|
+
}
|
|
295
335
|
/**
|
|
296
336
|
* Information about a vulnerable dependency
|
|
297
337
|
*/
|
|
@@ -399,6 +439,48 @@ export interface LogicalLocation {
|
|
|
399
439
|
*/
|
|
400
440
|
kind: string;
|
|
401
441
|
}
|
|
442
|
+
/**
|
|
443
|
+
* The metadata operation to be performed on the alert.
|
|
444
|
+
*/
|
|
445
|
+
export interface Metadata {
|
|
446
|
+
/**
|
|
447
|
+
* The type of operation to be performed.
|
|
448
|
+
*/
|
|
449
|
+
op: MetadataOperation;
|
|
450
|
+
/**
|
|
451
|
+
* The metadata value
|
|
452
|
+
*/
|
|
453
|
+
value: RelationMetadata;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* The change that has been made to the metadata.
|
|
457
|
+
*/
|
|
458
|
+
export interface MetadataChange {
|
|
459
|
+
/**
|
|
460
|
+
* The type of change on the metadata.
|
|
461
|
+
*/
|
|
462
|
+
changeType: MetadataChangeType;
|
|
463
|
+
/**
|
|
464
|
+
* Represents a metadata association to an alert.
|
|
465
|
+
*/
|
|
466
|
+
value: RelationMetadata;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* The type of change that occurred to the metadata.
|
|
470
|
+
*/
|
|
471
|
+
export declare enum MetadataChangeType {
|
|
472
|
+
None = 0,
|
|
473
|
+
Created = 1,
|
|
474
|
+
Updated = 2,
|
|
475
|
+
Deleted = 3
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* The operation to be performed on the metadata.
|
|
479
|
+
*/
|
|
480
|
+
export declare enum MetadataOperation {
|
|
481
|
+
Add = 0,
|
|
482
|
+
Remove = 1
|
|
483
|
+
}
|
|
402
484
|
/**
|
|
403
485
|
* Location in the source control system where the issue was found
|
|
404
486
|
*/
|
|
@@ -431,10 +513,6 @@ export interface Region {
|
|
|
431
513
|
* The column where the code snippet starts
|
|
432
514
|
*/
|
|
433
515
|
columnStart: number;
|
|
434
|
-
/**
|
|
435
|
-
* A subset of the code snippet highlighting the issue
|
|
436
|
-
*/
|
|
437
|
-
highlightSnippet: string;
|
|
438
516
|
/**
|
|
439
517
|
* The line number where the code snippet ends
|
|
440
518
|
*/
|
|
@@ -443,10 +521,25 @@ export interface Region {
|
|
|
443
521
|
* The line number where the code snippet starts
|
|
444
522
|
*/
|
|
445
523
|
lineStart: number;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* The metadata to be associated with the alert.
|
|
527
|
+
*/
|
|
528
|
+
export interface RelationMetadata {
|
|
529
|
+
/**
|
|
530
|
+
* Any additional attributes of the metadata.
|
|
531
|
+
*/
|
|
532
|
+
attributes: {
|
|
533
|
+
[key: string]: any;
|
|
534
|
+
};
|
|
446
535
|
/**
|
|
447
|
-
* The
|
|
536
|
+
* The type of the metadata.
|
|
448
537
|
*/
|
|
449
|
-
|
|
538
|
+
rel: string;
|
|
539
|
+
/**
|
|
540
|
+
* The URL of the metadata.
|
|
541
|
+
*/
|
|
542
|
+
url: string;
|
|
450
543
|
}
|
|
451
544
|
export interface Result {
|
|
452
545
|
/**
|
|
@@ -573,10 +666,18 @@ export interface SarifValidationError {
|
|
|
573
666
|
validationError: string;
|
|
574
667
|
}
|
|
575
668
|
export interface SearchCriteria {
|
|
669
|
+
/**
|
|
670
|
+
* If provided, only return alerts with the ids specified. \<br /\>Otherwise, return any alert.
|
|
671
|
+
*/
|
|
672
|
+
alertIds: number[];
|
|
576
673
|
/**
|
|
577
674
|
* If provided, only return alerts of this type. Otherwise, return alerts of all types.
|
|
578
675
|
*/
|
|
579
676
|
alertType: AlertType;
|
|
677
|
+
/**
|
|
678
|
+
* If provided, only return alerts at these confidence levels. \<br /\>Otherwise, return alerts at any confidence level.
|
|
679
|
+
*/
|
|
680
|
+
confidenceLevels: Confidence[];
|
|
580
681
|
/**
|
|
581
682
|
* If provided, only alerts for this dependency are returned. \<br /\>Otherwise, return alerts for all dependencies. \<br /\>In a sarif submission, a dependency (or a vulnerable component) is specified in result.RelatedLocations[].logicalLocation.
|
|
582
683
|
*/
|
|
@@ -687,6 +788,10 @@ export interface UxFilters {
|
|
|
687
788
|
* Branches to display alerts for. If empty, show alerts from all branches
|
|
688
789
|
*/
|
|
689
790
|
branches: Branch[];
|
|
791
|
+
/**
|
|
792
|
+
* Confidence levels to show, only valid when AlertType is Secret.
|
|
793
|
+
*/
|
|
794
|
+
confidenceLevels: Confidence[];
|
|
690
795
|
packages: Dependency[];
|
|
691
796
|
/**
|
|
692
797
|
* Pipelines to show alerts for. If empty, show alerts for all pipelines
|
|
@@ -749,14 +854,6 @@ export interface VersionControlSnippet {
|
|
|
749
854
|
* line in the code file where the snippet ends
|
|
750
855
|
*/
|
|
751
856
|
endLine: number;
|
|
752
|
-
/**
|
|
753
|
-
* subset of the code snippet highlighting the alert issue
|
|
754
|
-
*/
|
|
755
|
-
highlightSnippet: string;
|
|
756
|
-
/**
|
|
757
|
-
* larger code snippet
|
|
758
|
-
*/
|
|
759
|
-
snippet: string;
|
|
760
857
|
/**
|
|
761
858
|
* column in the code file where the snippet starts
|
|
762
859
|
*/
|
|
@@ -765,10 +862,6 @@ export interface VersionControlSnippet {
|
|
|
765
862
|
* line in the code file where the snippet starts
|
|
766
863
|
*/
|
|
767
864
|
startLine: number;
|
|
768
|
-
/**
|
|
769
|
-
* Version control system where the code was found
|
|
770
|
-
*/
|
|
771
|
-
versionControl: string;
|
|
772
865
|
/**
|
|
773
866
|
* path of the code file in the version control system
|
|
774
867
|
*/
|
package/Alert/Alert.js
CHANGED
|
@@ -104,6 +104,17 @@ define(["require", "exports"], function (require, exports) {
|
|
|
104
104
|
*/
|
|
105
105
|
ComponentType[ComponentType["Vcpkg"] = 16] = "Vcpkg";
|
|
106
106
|
})(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
|
|
107
|
+
var Confidence;
|
|
108
|
+
(function (Confidence) {
|
|
109
|
+
/**
|
|
110
|
+
* High confidence level for alert
|
|
111
|
+
*/
|
|
112
|
+
Confidence[Confidence["High"] = 0] = "High";
|
|
113
|
+
/**
|
|
114
|
+
* Other confidence level for alert
|
|
115
|
+
*/
|
|
116
|
+
Confidence[Confidence["Other"] = 1] = "Other";
|
|
117
|
+
})(Confidence = exports.Confidence || (exports.Confidence = {}));
|
|
107
118
|
var DismissalType;
|
|
108
119
|
(function (DismissalType) {
|
|
109
120
|
/**
|
|
@@ -134,6 +145,24 @@ define(["require", "exports"], function (require, exports) {
|
|
|
134
145
|
*/
|
|
135
146
|
ExpandOption[ExpandOption["ValidationFingerprint"] = 1] = "ValidationFingerprint";
|
|
136
147
|
})(ExpandOption = exports.ExpandOption || (exports.ExpandOption = {}));
|
|
148
|
+
/**
|
|
149
|
+
* The type of change that occurred to the metadata.
|
|
150
|
+
*/
|
|
151
|
+
var MetadataChangeType;
|
|
152
|
+
(function (MetadataChangeType) {
|
|
153
|
+
MetadataChangeType[MetadataChangeType["None"] = 0] = "None";
|
|
154
|
+
MetadataChangeType[MetadataChangeType["Created"] = 1] = "Created";
|
|
155
|
+
MetadataChangeType[MetadataChangeType["Updated"] = 2] = "Updated";
|
|
156
|
+
MetadataChangeType[MetadataChangeType["Deleted"] = 3] = "Deleted";
|
|
157
|
+
})(MetadataChangeType = exports.MetadataChangeType || (exports.MetadataChangeType = {}));
|
|
158
|
+
/**
|
|
159
|
+
* The operation to be performed on the metadata.
|
|
160
|
+
*/
|
|
161
|
+
var MetadataOperation;
|
|
162
|
+
(function (MetadataOperation) {
|
|
163
|
+
MetadataOperation[MetadataOperation["Add"] = 0] = "Add";
|
|
164
|
+
MetadataOperation[MetadataOperation["Remove"] = 1] = "Remove";
|
|
165
|
+
})(MetadataOperation = exports.MetadataOperation || (exports.MetadataOperation = {}));
|
|
137
166
|
/**
|
|
138
167
|
* This enum defines the different result types.
|
|
139
168
|
*/
|
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.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code"}(n.AlertType||(n.AlertType={}));!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.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive"}(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.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"}(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"}(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={}))});
|
|
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"}(n.AlertType||(n.AlertType={}));!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.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!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.Add=0]="Add",e[e.Remove=1]="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"}(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"}(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={}))});
|
package/Alert/AlertClient.d.ts
CHANGED
|
@@ -53,6 +53,14 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
53
53
|
* @param ref -
|
|
54
54
|
*/
|
|
55
55
|
getAlertInstances(project: string, alertId: number, repository: string, ref?: string): Promise<Alert.AlertAnalysisInstance[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Update alert metadata associations.
|
|
58
|
+
*
|
|
59
|
+
* @param alertsMetadata - A list of metadata to associate with alerts.
|
|
60
|
+
* @param project - Project ID or project name
|
|
61
|
+
* @param repository - The name or ID of the repository.
|
|
62
|
+
*/
|
|
63
|
+
updateAlertsMetadata(alertsMetadata: Alert.AlertMetadata[], project: string, repository: string): Promise<Alert.AlertMetadataChange[]>;
|
|
56
64
|
/**
|
|
57
65
|
* Upload a Sarif containing security alerts
|
|
58
66
|
*
|
package/Alert/AlertClient.js
CHANGED
|
@@ -214,6 +214,29 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
214
214
|
});
|
|
215
215
|
});
|
|
216
216
|
};
|
|
217
|
+
/**
|
|
218
|
+
* Update alert metadata associations.
|
|
219
|
+
*
|
|
220
|
+
* @param alertsMetadata - A list of metadata to associate with alerts.
|
|
221
|
+
* @param project - Project ID or project name
|
|
222
|
+
* @param repository - The name or ID of the repository.
|
|
223
|
+
*/
|
|
224
|
+
AlertRestClient.prototype.updateAlertsMetadata = function (alertsMetadata, project, repository) {
|
|
225
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
226
|
+
return __generator(this, function (_a) {
|
|
227
|
+
return [2 /*return*/, this.beginRequest({
|
|
228
|
+
apiVersion: "7.2-preview.1",
|
|
229
|
+
method: "PATCH",
|
|
230
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",
|
|
231
|
+
routeValues: {
|
|
232
|
+
project: project,
|
|
233
|
+
repository: repository
|
|
234
|
+
},
|
|
235
|
+
body: alertsMetadata
|
|
236
|
+
})];
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
};
|
|
217
240
|
/**
|
|
218
241
|
* Upload a Sarif containing security alerts
|
|
219
242
|
*
|
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(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 o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{u(o.next(e))}catch(e){n(e)}}function s(e){try{u(o.throw(e))}catch(e){n(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}u((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(n=2&r[0]?i.return:r[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,r[1])).done)return n;switch(i=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(n=s.trys,!(n=n.length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){s.label=r[1];break}if(6===r[0]&&s.label<n[1]){s.label=n[1],n=r;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(r);break}n[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],i=0}finally{o=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var o,i,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAlert=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.getAlerts=function(e,t,r,i,n,a){return __awaiter(this,void 0,void 0,function(){var s,u=this;return __generator(this,function(p){return s={top:r,orderBy:i,criteria:n,continuationToken:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(u,void 0,void 0,function(){var t;return __generator(this,function(r){switch(r.label){case 0:return[4,e.text().then(o.deserializeVssJsonObject)];case 1:return t=r.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.getAlertSarif=function(e,t,r,o,i){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(a){return n={ref:o,expand:i},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:n})]})})},t.prototype.updateAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:t,alertId:r,repository:o},body:e})]})})},t.prototype.getAlertInstances=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(n){return i={ref:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.updateAlertsMetadata=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.uploadSarif=function(e,t,r){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}/sarifs",routeValues:{project:t,repository:r},customHeaders:{"Content-Type":"application/octet-stream"},body:e})]})})},t.prototype.getUxFilters=function(e,t,r){return __awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){return o={alertType:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters",routeValues:{project:e,repository:t},queryParams:o})]})})},t.prototype.getSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})]})})},t}(r.RestClientBase);t.AlertRestClient=i});
|
package/Dashboard/Dashboard.d.ts
CHANGED
|
@@ -62,6 +62,10 @@ export interface Dashboard {
|
|
|
62
62
|
* Server defined version tracking value, used for edit collision detection.
|
|
63
63
|
*/
|
|
64
64
|
eTag: string;
|
|
65
|
+
/**
|
|
66
|
+
* Dashboard Global Parameters Config
|
|
67
|
+
*/
|
|
68
|
+
globalParametersConfig: string;
|
|
65
69
|
/**
|
|
66
70
|
* ID of the group for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards this property is empty.
|
|
67
71
|
*/
|
package/Git/Git.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ export interface AdvSecEnablementStatus {
|
|
|
11
11
|
*/
|
|
12
12
|
changedOnDate: Date;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* True if Dependabot is enabled for the repository, false if it is disabled.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
dependabotEnabled: boolean;
|
|
17
17
|
/**
|
|
18
|
-
* Enabled
|
|
18
|
+
* Enabled status 0 disabled, 1 enabled, Null never explicitly set, always whatever project is, ya this should probably be an enum somewhere
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
enabled: boolean;
|
|
21
21
|
/**
|
|
22
22
|
* ProjectId
|
|
23
23
|
*/
|
|
@@ -28,6 +28,10 @@ export interface AdvSecEnablementStatus {
|
|
|
28
28
|
repositoryId: string;
|
|
29
29
|
}
|
|
30
30
|
export interface AdvSecEnablementUpdate {
|
|
31
|
+
/**
|
|
32
|
+
* New Dependabot status.
|
|
33
|
+
*/
|
|
34
|
+
newDependabotStatus: boolean;
|
|
31
35
|
/**
|
|
32
36
|
* New status
|
|
33
37
|
*/
|
package/Git/GitClient.d.ts
CHANGED
|
@@ -1324,8 +1324,9 @@ export declare class GitRestClient extends RestClientBase {
|
|
|
1324
1324
|
*
|
|
1325
1325
|
* @param repositoryId - ID of the git repository.
|
|
1326
1326
|
* @param project - Project ID or project name
|
|
1327
|
+
* @param preferCompareBranch - If true, prefer the compare branch over the default branch as target branch for pull requests.
|
|
1327
1328
|
*/
|
|
1328
|
-
getSuggestions(repositoryId: string, project?: string): Promise<Git.GitSuggestion[]>;
|
|
1329
|
+
getSuggestions(repositoryId: string, project?: string, preferCompareBranch?: boolean): Promise<Git.GitSuggestion[]>;
|
|
1329
1330
|
/**
|
|
1330
1331
|
* The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository.
|
|
1331
1332
|
*
|
package/Git/GitClient.js
CHANGED
|
@@ -3935,17 +3935,23 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
3935
3935
|
*
|
|
3936
3936
|
* @param repositoryId - ID of the git repository.
|
|
3937
3937
|
* @param project - Project ID or project name
|
|
3938
|
+
* @param preferCompareBranch - If true, prefer the compare branch over the default branch as target branch for pull requests.
|
|
3938
3939
|
*/
|
|
3939
|
-
GitRestClient.prototype.getSuggestions = function (repositoryId, project) {
|
|
3940
|
+
GitRestClient.prototype.getSuggestions = function (repositoryId, project, preferCompareBranch) {
|
|
3940
3941
|
return __awaiter(this, void 0, void 0, function () {
|
|
3942
|
+
var queryValues;
|
|
3941
3943
|
return __generator(this, function (_a) {
|
|
3944
|
+
queryValues = {
|
|
3945
|
+
preferCompareBranch: preferCompareBranch
|
|
3946
|
+
};
|
|
3942
3947
|
return [2 /*return*/, this.beginRequest({
|
|
3943
3948
|
apiVersion: "7.2-preview.1",
|
|
3944
3949
|
routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/suggestions",
|
|
3945
3950
|
routeValues: {
|
|
3946
3951
|
project: project,
|
|
3947
3952
|
repositoryId: repositoryId
|
|
3948
|
-
}
|
|
3953
|
+
},
|
|
3954
|
+
queryParams: queryValues
|
|
3949
3955
|
})];
|
|
3950
3956
|
});
|
|
3951
3957
|
});
|