azure-devops-extension-api 4.237.0 → 4.239.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/Alert/Alert.d.ts +55 -3
- package/Alert/Alert.js +24 -0
- package/Alert/Alert.min.js +1 -1
- package/Alert/AlertClient.d.ts +2 -1
- package/Alert/AlertClient.js +3 -1
- package/Alert/AlertClient.min.js +1 -1
- package/Git/GitClient.d.ts +15 -0
- package/Git/GitClient.js +40 -0
- package/Git/GitClient.min.js +1 -1
- package/Management/Management.d.ts +2 -2
- package/Pipelines/Pipelines.d.ts +12 -0
- package/Release/Release.d.ts +10 -2
- package/ResourceUsage/ResourceUsage.d.ts +13 -0
- package/ResourceUsage/ResourceUsage.js +9 -0
- package/ResourceUsage/ResourceUsage.min.js +1 -0
- package/ResourceUsage/ResourceUsageClient.d.ts +20 -0
- package/ResourceUsage/ResourceUsageClient.js +93 -0
- package/ResourceUsage/ResourceUsageClient.min.js +1 -0
- package/ServiceEndpoint/ServiceEndpointClient.d.ts +2 -1
- package/ServiceEndpoint/ServiceEndpointClient.js +4 -2
- package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +1 -0
- package/Test/Test.d.ts +50 -22
- package/Test/Test.js +1 -19
- package/Test/Test.min.js +1 -1
- package/TestPlan/TestPlanClient.d.ts +2 -2
- package/TestPlan/TestPlanClient.js +2 -2
- package/TestResults/TestResultsClient.d.ts +18 -0
- package/TestResults/TestResultsClient.js +61 -0
- package/TestResults/TestResultsClient.min.js +1 -1
- package/package.json +1 -1
package/Alert/Alert.d.ts
CHANGED
|
@@ -153,12 +153,20 @@ export declare enum AlertType {
|
|
|
153
153
|
/**
|
|
154
154
|
* The code contains a weakness determined by static analysis.
|
|
155
155
|
*/
|
|
156
|
-
Code = 3
|
|
156
|
+
Code = 3,
|
|
157
|
+
/**
|
|
158
|
+
* The code uses a dependency with potential license incompliance.
|
|
159
|
+
*/
|
|
160
|
+
License = 4
|
|
157
161
|
}
|
|
158
162
|
/**
|
|
159
163
|
* AnalysisConfiguration class models a build definition.
|
|
160
164
|
*/
|
|
161
165
|
export interface AnalysisConfiguration {
|
|
166
|
+
/**
|
|
167
|
+
* The type of alert this configuration is setup to detect.
|
|
168
|
+
*/
|
|
169
|
+
alertType: AlertType;
|
|
162
170
|
/**
|
|
163
171
|
* Details for the configuration. Populated values depend on the type of configuration.
|
|
164
172
|
*/
|
|
@@ -362,6 +370,10 @@ export interface Dependency {
|
|
|
362
370
|
* Unique ID for the dependency
|
|
363
371
|
*/
|
|
364
372
|
dependencyId: number;
|
|
373
|
+
/**
|
|
374
|
+
* License information of the Component
|
|
375
|
+
*/
|
|
376
|
+
license: License;
|
|
365
377
|
}
|
|
366
378
|
/**
|
|
367
379
|
* An instance of a vulnerable dependency that was detected
|
|
@@ -442,6 +454,41 @@ export declare enum ExpandOption {
|
|
|
442
454
|
*/
|
|
443
455
|
ValidationFingerprint = 1
|
|
444
456
|
}
|
|
457
|
+
/**
|
|
458
|
+
* License information for dependencies
|
|
459
|
+
*/
|
|
460
|
+
export interface License {
|
|
461
|
+
/**
|
|
462
|
+
* Unique ID for the license
|
|
463
|
+
*/
|
|
464
|
+
id: number;
|
|
465
|
+
/**
|
|
466
|
+
* License name
|
|
467
|
+
*/
|
|
468
|
+
name: string;
|
|
469
|
+
/**
|
|
470
|
+
* License state
|
|
471
|
+
*/
|
|
472
|
+
state: LicenseState;
|
|
473
|
+
/**
|
|
474
|
+
* Url for license information
|
|
475
|
+
*/
|
|
476
|
+
url: string;
|
|
477
|
+
}
|
|
478
|
+
export declare enum LicenseState {
|
|
479
|
+
/**
|
|
480
|
+
* Information of the license has not been harvested by ClearlyDefined
|
|
481
|
+
*/
|
|
482
|
+
Unknown = 0,
|
|
483
|
+
/**
|
|
484
|
+
* Information of the license has not been harvested by ClearlyDefined
|
|
485
|
+
*/
|
|
486
|
+
NotHarvested = 1,
|
|
487
|
+
/**
|
|
488
|
+
* Information of the license has been harvested by ClearlyDefined
|
|
489
|
+
*/
|
|
490
|
+
Harvested = 2
|
|
491
|
+
}
|
|
445
492
|
export interface LogicalLocation {
|
|
446
493
|
fullyQualifiedName: string;
|
|
447
494
|
/**
|
|
@@ -678,7 +725,11 @@ export declare enum SarifJobStatus {
|
|
|
678
725
|
/**
|
|
679
726
|
* The job type when it fails
|
|
680
727
|
*/
|
|
681
|
-
Failed = 3
|
|
728
|
+
Failed = 3,
|
|
729
|
+
/**
|
|
730
|
+
* The job type when it is queued on exception
|
|
731
|
+
*/
|
|
732
|
+
Requeued = 4
|
|
682
733
|
}
|
|
683
734
|
export interface SarifUploadStatus {
|
|
684
735
|
errors: SarifValidationError[];
|
|
@@ -769,7 +820,8 @@ export declare enum Severity {
|
|
|
769
820
|
Critical = 3,
|
|
770
821
|
Note = 4,
|
|
771
822
|
Warning = 5,
|
|
772
|
-
Error = 6
|
|
823
|
+
Error = 6,
|
|
824
|
+
Undefined = 7
|
|
773
825
|
}
|
|
774
826
|
export declare enum State {
|
|
775
827
|
/**
|
package/Alert/Alert.js
CHANGED
|
@@ -24,6 +24,10 @@ define(["require", "exports"], function (require, exports) {
|
|
|
24
24
|
* The code contains a weakness determined by static analysis.
|
|
25
25
|
*/
|
|
26
26
|
AlertType[AlertType["Code"] = 3] = "Code";
|
|
27
|
+
/**
|
|
28
|
+
* The code uses a dependency with potential license incompliance.
|
|
29
|
+
*/
|
|
30
|
+
AlertType[AlertType["License"] = 4] = "License";
|
|
27
31
|
})(AlertType = exports.AlertType || (exports.AlertType = {}));
|
|
28
32
|
var AnalysisConfigurationType;
|
|
29
33
|
(function (AnalysisConfigurationType) {
|
|
@@ -145,6 +149,21 @@ define(["require", "exports"], function (require, exports) {
|
|
|
145
149
|
*/
|
|
146
150
|
ExpandOption[ExpandOption["ValidationFingerprint"] = 1] = "ValidationFingerprint";
|
|
147
151
|
})(ExpandOption = exports.ExpandOption || (exports.ExpandOption = {}));
|
|
152
|
+
var LicenseState;
|
|
153
|
+
(function (LicenseState) {
|
|
154
|
+
/**
|
|
155
|
+
* Information of the license has not been harvested by ClearlyDefined
|
|
156
|
+
*/
|
|
157
|
+
LicenseState[LicenseState["Unknown"] = 0] = "Unknown";
|
|
158
|
+
/**
|
|
159
|
+
* Information of the license has not been harvested by ClearlyDefined
|
|
160
|
+
*/
|
|
161
|
+
LicenseState[LicenseState["NotHarvested"] = 1] = "NotHarvested";
|
|
162
|
+
/**
|
|
163
|
+
* Information of the license has been harvested by ClearlyDefined
|
|
164
|
+
*/
|
|
165
|
+
LicenseState[LicenseState["Harvested"] = 2] = "Harvested";
|
|
166
|
+
})(LicenseState = exports.LicenseState || (exports.LicenseState = {}));
|
|
148
167
|
/**
|
|
149
168
|
* The type of change that occurred to the metadata.
|
|
150
169
|
*/
|
|
@@ -209,6 +228,10 @@ define(["require", "exports"], function (require, exports) {
|
|
|
209
228
|
* The job type when it fails
|
|
210
229
|
*/
|
|
211
230
|
SarifJobStatus[SarifJobStatus["Failed"] = 3] = "Failed";
|
|
231
|
+
/**
|
|
232
|
+
* The job type when it is queued on exception
|
|
233
|
+
*/
|
|
234
|
+
SarifJobStatus[SarifJobStatus["Requeued"] = 4] = "Requeued";
|
|
212
235
|
})(SarifJobStatus = exports.SarifJobStatus || (exports.SarifJobStatus = {}));
|
|
213
236
|
var Severity;
|
|
214
237
|
(function (Severity) {
|
|
@@ -219,6 +242,7 @@ define(["require", "exports"], function (require, exports) {
|
|
|
219
242
|
Severity[Severity["Note"] = 4] = "Note";
|
|
220
243
|
Severity[Severity["Warning"] = 5] = "Warning";
|
|
221
244
|
Severity[Severity["Error"] = 6] = "Error";
|
|
245
|
+
Severity[Severity["Undefined"] = 7] = "Undefined";
|
|
222
246
|
})(Severity = exports.Severity || (exports.Severity = {}));
|
|
223
247
|
var State;
|
|
224
248
|
(function (State) {
|
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.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.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"}(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",e[e.License=4]="License"}(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.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={}))});
|
package/Alert/AlertClient.d.ts
CHANGED
|
@@ -67,8 +67,9 @@ export declare class AlertRestClient extends RestClientBase {
|
|
|
67
67
|
* @param content - Content to upload
|
|
68
68
|
* @param project - Project ID or project name
|
|
69
69
|
* @param repository - The name or ID of a repository
|
|
70
|
+
* @param notificationFlag - Header to signal that this is a progress notification
|
|
70
71
|
*/
|
|
71
|
-
uploadSarif(content: string, project: string, repository: string): Promise<number>;
|
|
72
|
+
uploadSarif(content: string, project: string, repository: string, notificationFlag?: String): Promise<number>;
|
|
72
73
|
/**
|
|
73
74
|
* @param project - Project ID or project name
|
|
74
75
|
* @param repository -
|
package/Alert/AlertClient.js
CHANGED
|
@@ -243,8 +243,9 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
243
243
|
* @param content - Content to upload
|
|
244
244
|
* @param project - Project ID or project name
|
|
245
245
|
* @param repository - The name or ID of a repository
|
|
246
|
+
* @param notificationFlag - Header to signal that this is a progress notification
|
|
246
247
|
*/
|
|
247
|
-
AlertRestClient.prototype.uploadSarif = function (content, project, repository) {
|
|
248
|
+
AlertRestClient.prototype.uploadSarif = function (content, project, repository, notificationFlag) {
|
|
248
249
|
return __awaiter(this, void 0, void 0, function () {
|
|
249
250
|
return __generator(this, function (_a) {
|
|
250
251
|
return [2 /*return*/, this.beginRequest({
|
|
@@ -257,6 +258,7 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
257
258
|
},
|
|
258
259
|
customHeaders: {
|
|
259
260
|
"Content-Type": "application/octet-stream",
|
|
261
|
+
"X-AdvSec-NotificationSarif": notificationFlag,
|
|
260
262
|
},
|
|
261
263
|
body: content
|
|
262
264
|
})];
|
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){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(
|
|
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,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.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/Git/GitClient.d.ts
CHANGED
|
@@ -391,6 +391,21 @@ export declare class GitRestClient extends RestClientBase {
|
|
|
391
391
|
* @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
|
|
392
392
|
*/
|
|
393
393
|
getHfsItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: Git.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: Git.GitVersionDescriptor, includeContent?: boolean, resolveHfs?: boolean, sanitize?: boolean): Promise<ArrayBuffer>;
|
|
394
|
+
/**
|
|
395
|
+
* Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
|
396
|
+
*
|
|
397
|
+
* @param repositoryId - The name or ID of the repository.
|
|
398
|
+
* @param project - Project ID or project name
|
|
399
|
+
* @param scopePath - The path scope. The default is null.
|
|
400
|
+
* @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
|
|
401
|
+
* @param includeContentMetadata - Set to true to include content metadata. Default is false.
|
|
402
|
+
* @param latestProcessedChange - Set to true to include the latest changes. Default is false.
|
|
403
|
+
* @param download - Set to true to download the response as a file. Default is false.
|
|
404
|
+
* @param includeLinks - Set to true to include links to items. Default is false.
|
|
405
|
+
* @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
|
|
406
|
+
* @param zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks
|
|
407
|
+
*/
|
|
408
|
+
getHfsItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: Git.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: Git.GitVersionDescriptor, zipForUnix?: boolean): Promise<Git.GitItem[]>;
|
|
394
409
|
/**
|
|
395
410
|
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.
|
|
396
411
|
*
|
package/Git/GitClient.js
CHANGED
|
@@ -1238,6 +1238,46 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
1238
1238
|
});
|
|
1239
1239
|
});
|
|
1240
1240
|
};
|
|
1241
|
+
/**
|
|
1242
|
+
* Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
|
|
1243
|
+
*
|
|
1244
|
+
* @param repositoryId - The name or ID of the repository.
|
|
1245
|
+
* @param project - Project ID or project name
|
|
1246
|
+
* @param scopePath - The path scope. The default is null.
|
|
1247
|
+
* @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
|
|
1248
|
+
* @param includeContentMetadata - Set to true to include content metadata. Default is false.
|
|
1249
|
+
* @param latestProcessedChange - Set to true to include the latest changes. Default is false.
|
|
1250
|
+
* @param download - Set to true to download the response as a file. Default is false.
|
|
1251
|
+
* @param includeLinks - Set to true to include links to items. Default is false.
|
|
1252
|
+
* @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
|
|
1253
|
+
* @param zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks
|
|
1254
|
+
*/
|
|
1255
|
+
GitRestClient.prototype.getHfsItems = function (repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor, zipForUnix) {
|
|
1256
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1257
|
+
var queryValues;
|
|
1258
|
+
return __generator(this, function (_a) {
|
|
1259
|
+
queryValues = {
|
|
1260
|
+
scopePath: scopePath,
|
|
1261
|
+
recursionLevel: recursionLevel,
|
|
1262
|
+
includeContentMetadata: includeContentMetadata,
|
|
1263
|
+
latestProcessedChange: latestProcessedChange,
|
|
1264
|
+
download: download,
|
|
1265
|
+
includeLinks: includeLinks,
|
|
1266
|
+
versionDescriptor: versionDescriptor,
|
|
1267
|
+
zipForUnix: zipForUnix
|
|
1268
|
+
};
|
|
1269
|
+
return [2 /*return*/, this.beginRequest({
|
|
1270
|
+
apiVersion: "7.2-preview.1",
|
|
1271
|
+
routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}",
|
|
1272
|
+
routeValues: {
|
|
1273
|
+
project: project,
|
|
1274
|
+
repositoryId: repositoryId
|
|
1275
|
+
},
|
|
1276
|
+
queryParams: queryValues
|
|
1277
|
+
})];
|
|
1278
|
+
});
|
|
1279
|
+
});
|
|
1280
|
+
};
|
|
1241
1281
|
/**
|
|
1242
1282
|
* Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.
|
|
1243
1283
|
*
|