azure-devops-extension-api 4.265.0 → 4.268.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 +372 -0
- package/AdvancedSecurity.Reporting/Reporting.js +152 -0
- package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
- package/AdvancedSecurity.Reporting/ReportingClient.d.ts +44 -2
- package/AdvancedSecurity.Reporting/ReportingClient.js +149 -3
- package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
- package/Alert/Alert.d.ts +21 -0
- package/Alert/AlertClient.d.ts +8 -0
- package/Alert/AlertClient.js +23 -0
- package/Alert/AlertClient.min.js +1 -1
- package/Git/Git.d.ts +24 -2
- package/Git/GitClient.d.ts +6 -0
- package/Git/GitClient.js +17 -0
- package/Git/GitClient.min.js +1 -1
- package/Management/Management.d.ts +15 -2
- package/Management/ManagementClient.d.ts +11 -0
- package/Management/ManagementClient.js +33 -0
- package/Management/ManagementClient.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpointClient.d.ts +6 -0
- package/ServiceEndpoint/ServiceEndpointClient.js +17 -0
- package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +6 -1
- package/TaskAgent/TaskAgent.js +4 -0
- package/TaskAgent/TaskAgent.min.js +1 -1
- package/Test/Test.d.ts +131 -6
- package/Test/Test.js +56 -3
- package/Test/Test.min.js +1 -1
- package/TestPlan/TestPlan.d.ts +8 -0
- package/TestResults/TestResultsClient.d.ts +10 -0
- package/TestResults/TestResultsClient.js +38 -0
- package/TestResults/TestResultsClient.min.js +1 -1
- package/_manifest/spdx_2.2/ESRPClientLogs0219180805019.json +1 -0
- package/_manifest/spdx_2.2/bsi.cose +0 -0
- package/_manifest/spdx_2.2/bsi.json +1 -1
- package/_manifest/spdx_2.2/manifest.cat +0 -0
- package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
- package/_manifest/spdx_2.2/manifest.spdx.json +2240 -2240
- package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
- package/package.json +1 -1
- package/_manifest/spdx_2.2/ESRPClientLogs1223223059101.json +0 -1
|
@@ -48,7 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
define(["require", "exports", "../Common/RestClientBase"], function (require, exports, RestClientBase_1) {
|
|
51
|
+
define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serialization"], function (require, exports, RestClientBase_1, Serialization_1) {
|
|
52
52
|
"use strict";
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
54
|
var ReportingRestClient = /** @class */ (function (_super) {
|
|
@@ -56,6 +56,110 @@ 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
|
+
* Creates a new advanced filter for the organization.
|
|
61
|
+
*
|
|
62
|
+
* @param filter - The advanced filter to create.
|
|
63
|
+
*/
|
|
64
|
+
ReportingRestClient.prototype.createAdvancedFilter = function (filter) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
return [2 /*return*/, this.beginRequest({
|
|
68
|
+
apiVersion: "7.2-preview.1",
|
|
69
|
+
method: "POST",
|
|
70
|
+
routeTemplate: "_apis/Reporting/filtersSettings/{action}/{filterId}",
|
|
71
|
+
routeValues: {
|
|
72
|
+
action: "AlertsBatch"
|
|
73
|
+
},
|
|
74
|
+
body: filter
|
|
75
|
+
})];
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Deletes an advanced filter.
|
|
81
|
+
*
|
|
82
|
+
* @param filterId - The ID of the advanced filter to delete.
|
|
83
|
+
*/
|
|
84
|
+
ReportingRestClient.prototype.deleteAdvancedFilter = function (filterId) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
+
return __generator(this, function (_a) {
|
|
87
|
+
return [2 /*return*/, this.beginRequest({
|
|
88
|
+
apiVersion: "7.2-preview.1",
|
|
89
|
+
method: "DELETE",
|
|
90
|
+
routeTemplate: "_apis/Reporting/filtersSettings/{action}/{filterId}",
|
|
91
|
+
routeValues: {
|
|
92
|
+
filterId: filterId,
|
|
93
|
+
action: "AlertsBatch"
|
|
94
|
+
}
|
|
95
|
+
})];
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Gets a specific advanced filter by its ID.
|
|
101
|
+
*
|
|
102
|
+
* @param filterId - The ID of the advanced filter to retrieve.
|
|
103
|
+
*/
|
|
104
|
+
ReportingRestClient.prototype.getAdvancedFilter = function (filterId) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
+
return __generator(this, function (_a) {
|
|
107
|
+
return [2 /*return*/, this.beginRequest({
|
|
108
|
+
apiVersion: "7.2-preview.1",
|
|
109
|
+
routeTemplate: "_apis/Reporting/filtersSettings/{action}/{filterId}",
|
|
110
|
+
routeValues: {
|
|
111
|
+
filterId: filterId,
|
|
112
|
+
action: "AlertsBatch"
|
|
113
|
+
}
|
|
114
|
+
})];
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Gets all advanced filters for the organization.
|
|
120
|
+
*
|
|
121
|
+
* @param includeDeleted - Whether to include soft-deleted filters.
|
|
122
|
+
*/
|
|
123
|
+
ReportingRestClient.prototype.listAdvancedFilters = function (includeDeleted) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
+
var queryValues;
|
|
126
|
+
return __generator(this, function (_a) {
|
|
127
|
+
queryValues = {
|
|
128
|
+
includeDeleted: includeDeleted
|
|
129
|
+
};
|
|
130
|
+
return [2 /*return*/, this.beginRequest({
|
|
131
|
+
apiVersion: "7.2-preview.1",
|
|
132
|
+
routeTemplate: "_apis/Reporting/filtersSettings/{action}/{filterId}",
|
|
133
|
+
routeValues: {
|
|
134
|
+
action: "AlertsBatch"
|
|
135
|
+
},
|
|
136
|
+
queryParams: queryValues
|
|
137
|
+
})];
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Updates an advanced filter. Only the name can be updated.
|
|
143
|
+
*
|
|
144
|
+
* @param filter - The update data containing the new name.
|
|
145
|
+
* @param filterId - The ID of the advanced filter to update.
|
|
146
|
+
*/
|
|
147
|
+
ReportingRestClient.prototype.updateAdvancedFilter = function (filter, filterId) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
return [2 /*return*/, this.beginRequest({
|
|
151
|
+
apiVersion: "7.2-preview.1",
|
|
152
|
+
method: "PATCH",
|
|
153
|
+
routeTemplate: "_apis/Reporting/filtersSettings/{action}/{filterId}",
|
|
154
|
+
routeValues: {
|
|
155
|
+
filterId: filterId,
|
|
156
|
+
action: "AlertsBatch"
|
|
157
|
+
},
|
|
158
|
+
body: filter
|
|
159
|
+
})];
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
};
|
|
59
163
|
/**
|
|
60
164
|
*/
|
|
61
165
|
ReportingRestClient.prototype.getUXComputedFilters = function () {
|
|
@@ -74,7 +178,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
74
178
|
/**
|
|
75
179
|
* Get Alert summary by severity for the org
|
|
76
180
|
*
|
|
77
|
-
* @param criteria -
|
|
181
|
+
* @param criteria - Options to limit the summaries returned
|
|
78
182
|
*/
|
|
79
183
|
ReportingRestClient.prototype.getAlertSummaryForOrg = function (criteria) {
|
|
80
184
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -95,7 +199,49 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
|
|
|
95
199
|
});
|
|
96
200
|
};
|
|
97
201
|
/**
|
|
98
|
-
*
|
|
202
|
+
* Get Combined Alerts for the org
|
|
203
|
+
*
|
|
204
|
+
* @param criteria - Options to filter the combined alerts returned
|
|
205
|
+
* @param top - The maximum number of alerts to return
|
|
206
|
+
* @param continuationToken - If there are more alerts than can be returned, a continuation token is placed in the "x-ms-continuationtoken" header. Use that token here to get the next page of alerts
|
|
207
|
+
*/
|
|
208
|
+
ReportingRestClient.prototype.getCombinedAlertsForOrg = function (criteria, top, continuationToken) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
+
var queryValues;
|
|
211
|
+
var _this = this;
|
|
212
|
+
return __generator(this, function (_a) {
|
|
213
|
+
queryValues = {
|
|
214
|
+
criteria: criteria,
|
|
215
|
+
top: top,
|
|
216
|
+
continuationToken: continuationToken
|
|
217
|
+
};
|
|
218
|
+
return [2 /*return*/, this.beginRequest({
|
|
219
|
+
apiVersion: "7.2-preview.1",
|
|
220
|
+
routeTemplate: "_apis/Reporting/summary/{action}",
|
|
221
|
+
routeValues: {
|
|
222
|
+
action: "AlertsBatch"
|
|
223
|
+
},
|
|
224
|
+
queryParams: queryValues,
|
|
225
|
+
returnRawResponse: true
|
|
226
|
+
}).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
227
|
+
var body;
|
|
228
|
+
return __generator(this, function (_a) {
|
|
229
|
+
switch (_a.label) {
|
|
230
|
+
case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
|
|
231
|
+
case 1:
|
|
232
|
+
body = _a.sent();
|
|
233
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
234
|
+
return [2 /*return*/, body];
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
}); })];
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Get Enablement summary for the org
|
|
243
|
+
*
|
|
244
|
+
* @param criteria - Options to limit the summaries returned
|
|
99
245
|
*/
|
|
100
246
|
ReportingRestClient.prototype.getEnablementSummaryForOrg = function (criteria) {
|
|
101
247
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -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 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
|
|
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(i,o){function a(t){try{s(n.next(t))}catch(t){o(t)}}function u(t){try{s(n.throw(t))}catch(t){o(t)}}function s(t){t.done?i(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,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=e.call(t,u)}catch(t){r=[6,t],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","../Common/Util/Serialization"],function(t,e,r,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.createAdvancedFilter=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"_apis/Reporting/filtersSettings/{action}/{filterId}",routeValues:{action:"AlertsBatch"},body:t})]})})},e.prototype.deleteAdvancedFilter=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"_apis/Reporting/filtersSettings/{action}/{filterId}",routeValues:{filterId:t,action:"AlertsBatch"}})]})})},e.prototype.getAdvancedFilter=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/filtersSettings/{action}/{filterId}",routeValues:{filterId:t,action:"AlertsBatch"}})]})})},e.prototype.listAdvancedFilters=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(r){return e={includeDeleted:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/filtersSettings/{action}/{filterId}",routeValues:{action:"AlertsBatch"},queryParams:e})]})})},e.prototype.updateAdvancedFilter=function(t,e){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:"_apis/Reporting/filtersSettings/{action}/{filterId}",routeValues:{filterId:e,action:"AlertsBatch"},body:t})]})})},e.prototype.getUXComputedFilters=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:"Default"}})]})})},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.getCombinedAlertsForOrg=function(t,e,r){return __awaiter(this,void 0,void 0,function(){var i,o=this;return __generator(this,function(a){return i={criteria:t,top:e,continuationToken:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Reporting/summary/{action}",routeValues:{action:"AlertsBatch"},queryParams:i,returnRawResponse:!0}).then(function(t){return __awaiter(o,void 0,void 0,function(){var e;return __generator(this,function(r){switch(r.label){case 0:return[4,t.text().then(n.deserializeVssJsonObject)];case 1:return e=r.sent(),e.continuationToken=t.headers.get("x-ms-continuationtoken"),[2,e]}})})})]})})},e.prototype.getEnablementSummaryForOrg=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:"Enablement"},queryParams:e})]})})},e}(r.RestClientBase);e.ReportingRestClient=i});
|
package/Alert/Alert.d.ts
CHANGED
|
@@ -128,6 +128,19 @@ export interface AlertAnalysisInstance {
|
|
|
128
128
|
*/
|
|
129
129
|
state: State;
|
|
130
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Request model for getting alerts by IDs with optional alert type filter.
|
|
133
|
+
*/
|
|
134
|
+
export interface AlertBatchRequest {
|
|
135
|
+
/**
|
|
136
|
+
* List of alert IDs to retrieve.
|
|
137
|
+
*/
|
|
138
|
+
alertIds: number[];
|
|
139
|
+
/**
|
|
140
|
+
* Alert type of the alert IDs.
|
|
141
|
+
*/
|
|
142
|
+
alertType: AlertType;
|
|
143
|
+
}
|
|
131
144
|
export declare enum AlertListExpandOption {
|
|
132
145
|
/**
|
|
133
146
|
* No Expands.
|
|
@@ -743,6 +756,10 @@ export interface PhysicalLocation {
|
|
|
743
756
|
* Path of the file where the issue was found
|
|
744
757
|
*/
|
|
745
758
|
filePath: string;
|
|
759
|
+
/**
|
|
760
|
+
* Indicates whether the path is a valid Git path that exists in the git repository associated with the alert.
|
|
761
|
+
*/
|
|
762
|
+
isValidGitPath: boolean;
|
|
746
763
|
/**
|
|
747
764
|
* Details about the location where the issue was found including a snippet
|
|
748
765
|
*/
|
|
@@ -1112,6 +1129,10 @@ export interface ValidationFingerprint {
|
|
|
1112
1129
|
assetFingerprint: {
|
|
1113
1130
|
[key: string]: string;
|
|
1114
1131
|
};
|
|
1132
|
+
/**
|
|
1133
|
+
* Represents the CrossCompanyCorrelatingId for the secret in the ValidationFingerprintJson.
|
|
1134
|
+
*/
|
|
1135
|
+
c3Id: string;
|
|
1115
1136
|
/**
|
|
1116
1137
|
* The hash associated to the secret.
|
|
1117
1138
|
*/
|
package/Alert/AlertClient.d.ts
CHANGED
|
@@ -45,6 +45,14 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
45
45
|
* @param repository - The name or ID of the repository
|
|
46
46
|
*/
|
|
47
47
|
updateAlert(stateUpdate: Alert.AlertStateUpdate, project: string, alertId: number, repository: string): Promise<Alert.Alert>;
|
|
48
|
+
/**
|
|
49
|
+
* Get alerts by alert IDs Currently supports fetching secret alerts only.
|
|
50
|
+
*
|
|
51
|
+
* @param request - Request containing alert IDs and optional alert type filter
|
|
52
|
+
* @param project - Project ID or project name
|
|
53
|
+
* @param repository - The name or ID of the repository
|
|
54
|
+
*/
|
|
55
|
+
getAlertsByIds(request: Alert.AlertBatchRequest, project: string, repository: string): Promise<Alert.Alert[]>;
|
|
48
56
|
/**
|
|
49
57
|
* Returns the branches for which analysis results were submitted.
|
|
50
58
|
*
|
package/Alert/AlertClient.js
CHANGED
|
@@ -188,6 +188,29 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
188
188
|
});
|
|
189
189
|
});
|
|
190
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* Get alerts by alert IDs Currently supports fetching secret alerts only.
|
|
193
|
+
*
|
|
194
|
+
* @param request - Request containing alert IDs and optional alert type filter
|
|
195
|
+
* @param project - Project ID or project name
|
|
196
|
+
* @param repository - The name or ID of the repository
|
|
197
|
+
*/
|
|
198
|
+
AlertRestClient.prototype.getAlertsByIds = function (request, project, repository) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
200
|
+
return __generator(this, function (_a) {
|
|
201
|
+
return [2 /*return*/, this.beginRequest({
|
|
202
|
+
apiVersion: "7.2-preview.1",
|
|
203
|
+
method: "POST",
|
|
204
|
+
routeTemplate: "{project}/_apis/Alert/repositories/{repository}/AlertsBatch",
|
|
205
|
+
routeValues: {
|
|
206
|
+
project: project,
|
|
207
|
+
repository: repository
|
|
208
|
+
},
|
|
209
|
+
body: request
|
|
210
|
+
})];
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
};
|
|
191
214
|
/**
|
|
192
215
|
* Returns the branches for which analysis results were submitted.
|
|
193
216
|
*
|
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.getAlertMetadata=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}/metadata",routeValues:{project:e,alertId:t,repository:r}})]})})},t.prototype.getAlertMetadataBatch=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/MetadataBatch",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getOrgLevelAlertsByIds=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={alertIds:e&&e.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/alerts",queryParams:t})]})})},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.uploadOrgSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",customHeaders:{"Content-Type":"application/octet-stream"},body: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});
|
|
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.getAlertsByIds=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}/AlertsBatch",routeValues:{project:t,repository:r},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.getAlertMetadata=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}/metadata",routeValues:{project:e,alertId:t,repository:r}})]})})},t.prototype.getAlertMetadataBatch=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/MetadataBatch",routeValues:{project:t,repository:r},body:e})]})})},t.prototype.getOrgLevelAlertsByIds=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(r){return t={alertIds:e&&e.join(",")},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/alerts",queryParams:t})]})})},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.uploadOrgSarif=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",customHeaders:{"Content-Type":"application/octet-stream"},body: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/Git/Git.d.ts
CHANGED
|
@@ -630,6 +630,28 @@ export interface FileDiffsCriteria {
|
|
|
630
630
|
*/
|
|
631
631
|
targetVersionCommit: string;
|
|
632
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* Request to get accessible repositories based on permission.
|
|
635
|
+
*/
|
|
636
|
+
export interface GetAccessibleRepositoriesRequest {
|
|
637
|
+
/**
|
|
638
|
+
* Permission being requested, must be "viewAlert" "dismissAlert" "manage" "viewEnablement" "repoRead" or "repoContribute"
|
|
639
|
+
*/
|
|
640
|
+
permission: string;
|
|
641
|
+
/**
|
|
642
|
+
* List of repository IDs to check permissions for
|
|
643
|
+
*/
|
|
644
|
+
repositoryIds: string[];
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Response containing accessible repository IDs.
|
|
648
|
+
*/
|
|
649
|
+
export interface GetAccessibleRepositoriesResponse {
|
|
650
|
+
/**
|
|
651
|
+
* List of repository IDs where the user has the requested permission
|
|
652
|
+
*/
|
|
653
|
+
accessibleRepositoryIds: string[];
|
|
654
|
+
}
|
|
633
655
|
/**
|
|
634
656
|
* A Git annotated tag.
|
|
635
657
|
*/
|
|
@@ -1807,11 +1829,11 @@ export interface GitPullRequestCompletionOptions {
|
|
|
1807
1829
|
*/
|
|
1808
1830
|
mergeCommitMessage: string;
|
|
1809
1831
|
/**
|
|
1810
|
-
* Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value,
|
|
1832
|
+
* Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, the service selects the first merge strategy not prohibited by the target branch’s policy. If the limit merge type policy is not configured, the default is noFastForward unless the deprecated SquashMerge is true, in which case the default is squash. If an explicit value is provided for MergeStrategy, the SquashMerge property will be ignored.
|
|
1811
1833
|
*/
|
|
1812
1834
|
mergeStrategy: GitPullRequestMergeStrategy;
|
|
1813
1835
|
/**
|
|
1814
|
-
* SquashMerge is deprecated. You should explicitly set the value of MergeStrategy.
|
|
1836
|
+
* SquashMerge is deprecated. You should explicitly set the value of MergeStrategy. This flag is only used when MergeStrategy is not specified and the target branch has no merge-strategy policy configured. In all other cases it is ignored.
|
|
1815
1837
|
*/
|
|
1816
1838
|
squashMerge: boolean;
|
|
1817
1839
|
/**
|
package/Git/GitClient.d.ts
CHANGED
|
@@ -72,6 +72,12 @@ export declare class GitRestClient extends RestClientBase {
|
|
|
72
72
|
* @param permission - Permission being requestd, must be "viewAlert" "dismissAlert" "manage" "viewEnablement" or "repoRead"
|
|
73
73
|
*/
|
|
74
74
|
getPermission(projectName?: string, repositoryId?: string, permission?: string): Promise<boolean>;
|
|
75
|
+
/**
|
|
76
|
+
* POST request to get accessible repositories based on permission (batch operation).
|
|
77
|
+
*
|
|
78
|
+
* @param request - Request containing permission and repository IDs to check
|
|
79
|
+
*/
|
|
80
|
+
getAccessibleRepositories(request: Git.GetAccessibleRepositoriesRequest): Promise<Git.GetAccessibleRepositoriesResponse>;
|
|
75
81
|
/**
|
|
76
82
|
* Create an annotated tag.
|
|
77
83
|
*
|
package/Git/GitClient.js
CHANGED
|
@@ -276,6 +276,23 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
276
276
|
});
|
|
277
277
|
});
|
|
278
278
|
};
|
|
279
|
+
/**
|
|
280
|
+
* POST request to get accessible repositories based on permission (batch operation).
|
|
281
|
+
*
|
|
282
|
+
* @param request - Request containing permission and repository IDs to check
|
|
283
|
+
*/
|
|
284
|
+
GitRestClient.prototype.getAccessibleRepositories = function (request) {
|
|
285
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
286
|
+
return __generator(this, function (_a) {
|
|
287
|
+
return [2 /*return*/, this.beginRequest({
|
|
288
|
+
apiVersion: "7.2-preview.1",
|
|
289
|
+
method: "POST",
|
|
290
|
+
routeTemplate: "_apis/git/advsecPermissions/RepositoriesBatch",
|
|
291
|
+
body: request
|
|
292
|
+
})];
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
};
|
|
279
296
|
/**
|
|
280
297
|
* Create an annotated tag.
|
|
281
298
|
*
|