azure-devops-extension-api 4.233.0 → 4.235.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.
Files changed (50) hide show
  1. package/Alert/Alert.d.ts +141 -19
  2. package/Alert/Alert.js +51 -0
  3. package/Alert/Alert.min.js +1 -1
  4. package/Alert/AlertClient.d.ts +13 -3
  5. package/Alert/AlertClient.js +28 -3
  6. package/Alert/AlertClient.min.js +1 -1
  7. package/Build/Build.d.ts +6 -0
  8. package/Build/Build.js +6 -0
  9. package/Comments/Comments.d.ts +9 -0
  10. package/Comments/Comments.js +3 -0
  11. package/Core/Core.d.ts +18 -0
  12. package/Dashboard/Dashboard.d.ts +6 -0
  13. package/Dashboard/Dashboard.js +6 -0
  14. package/ExtensionManagement/ExtensionManagementClient.d.ts +8 -6
  15. package/ExtensionManagement/ExtensionManagementClient.js +8 -6
  16. package/FileContainer/FileContainerClient.d.ts +12 -10
  17. package/FileContainer/FileContainerClient.js +12 -10
  18. package/Gallery/Gallery.d.ts +13 -14
  19. package/Gallery/Gallery.js +0 -13
  20. package/Gallery/Gallery.min.js +1 -1
  21. package/Gallery/GalleryClient.d.ts +12 -1
  22. package/Gallery/GalleryClient.js +38 -1
  23. package/Gallery/GalleryClient.min.js +1 -1
  24. package/Git/Git.d.ts +11 -0
  25. package/Git/GitClient.d.ts +6 -3
  26. package/Git/GitClient.js +12 -4
  27. package/Git/GitClient.min.js +1 -1
  28. package/Graph/GraphClient.d.ts +5 -1
  29. package/Graph/GraphClient.js +5 -1
  30. package/Management/Management.d.ts +25 -3
  31. package/Management/ManagementClient.d.ts +6 -0
  32. package/Management/ManagementClient.js +6 -0
  33. package/Notification/Notification.d.ts +9 -0
  34. package/Notification/Notification.js +6 -0
  35. package/Release/Release.d.ts +33 -0
  36. package/Release/Release.js +3 -0
  37. package/Release/ReleaseClient.d.ts +18 -16
  38. package/Release/ReleaseClient.js +19 -17
  39. package/Release/ReleaseClient.min.js +1 -1
  40. package/Test/Test.d.ts +199 -91
  41. package/Test/Test.js +48 -34
  42. package/Test/Test.min.js +1 -1
  43. package/TestResults/TestResultsClient.d.ts +66 -29
  44. package/TestResults/TestResultsClient.js +165 -77
  45. package/TestResults/TestResultsClient.min.js +1 -1
  46. package/WorkItemTracking/WorkItemTracking.d.ts +6 -3
  47. package/WorkItemTrackingProcess/WorkItemTrackingProcess.d.ts +9 -0
  48. package/WorkItemTrackingProcess/WorkItemTrackingProcess.js +9 -0
  49. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.d.ts +3 -0
  50. package/package.json +1 -1
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
  */
@@ -65,7 +69,7 @@ export interface Alert {
65
69
  */
66
70
  truncatedSecret: string;
67
71
  /**
68
- * ValidationFingerprints for the secret liveness check. Only return on demanded
72
+ * ValidationFingerprints for the secret liveness check. Only returned on demand in Get API with Expand parameter set to be ValidationFingerprint (not returned in List API)
69
73
  */
70
74
  validationFingerprints: ValidationFingerprint[];
71
75
  }
@@ -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;
@@ -263,6 +293,9 @@ export declare enum ComponentType {
263
293
  * Indicates the component is a loose file. Not a package as understood by different package managers.
264
294
  */
265
295
  File = 9,
296
+ /**
297
+ * Indicates the component is a Go package.
298
+ */
266
299
  Go = 10,
267
300
  /**
268
301
  * Indicates the component is a Docker Image
@@ -289,6 +322,16 @@ export declare enum ComponentType {
289
322
  */
290
323
  Vcpkg = 16
291
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
+ }
292
335
  /**
293
336
  * Information about a vulnerable dependency
294
337
  */
@@ -396,6 +439,48 @@ export interface LogicalLocation {
396
439
  */
397
440
  kind: string;
398
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
+ }
399
484
  /**
400
485
  * Location in the source control system where the issue was found
401
486
  */
@@ -428,10 +513,6 @@ export interface Region {
428
513
  * The column where the code snippet starts
429
514
  */
430
515
  columnStart: number;
431
- /**
432
- * A subset of the code snippet highlighting the issue
433
- */
434
- highlightSnippet: string;
435
516
  /**
436
517
  * The line number where the code snippet ends
437
518
  */
@@ -440,10 +521,25 @@ export interface Region {
440
521
  * The line number where the code snippet starts
441
522
  */
442
523
  lineStart: number;
524
+ }
525
+ /**
526
+ * The metadata to be associated with the alert.
527
+ */
528
+ export interface RelationMetadata {
443
529
  /**
444
- * The full code snippet
530
+ * Any additional attributes of the metadata.
445
531
  */
446
- snippet: string;
532
+ attributes: {
533
+ [key: string]: any;
534
+ };
535
+ /**
536
+ * The type of the metadata.
537
+ */
538
+ rel: string;
539
+ /**
540
+ * The URL of the metadata.
541
+ */
542
+ url: string;
447
543
  }
448
544
  export interface Result {
449
545
  /**
@@ -543,11 +639,45 @@ export interface Rule {
543
639
  */
544
640
  tags: string[];
545
641
  }
642
+ export declare enum SarifJobStatus {
643
+ /**
644
+ * The job type when it is new
645
+ */
646
+ New = 0,
647
+ /**
648
+ * The job type when it is queued
649
+ */
650
+ Queued = 1,
651
+ /**
652
+ * The job type when it is completed
653
+ */
654
+ Completed = 2,
655
+ /**
656
+ * The job type when it fails
657
+ */
658
+ Failed = 3
659
+ }
660
+ export interface SarifUploadStatus {
661
+ errors: SarifValidationError[];
662
+ processingStatus: SarifJobStatus;
663
+ }
664
+ export interface SarifValidationError {
665
+ nodePointer: string;
666
+ validationError: string;
667
+ }
546
668
  export interface SearchCriteria {
669
+ /**
670
+ * If provided, only return alerts with the ids specified. \<br /\>Otherwise, return any alert.
671
+ */
672
+ alertIds: number[];
547
673
  /**
548
674
  * If provided, only return alerts of this type. Otherwise, return alerts of all types.
549
675
  */
550
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[];
551
681
  /**
552
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.
553
683
  */
@@ -658,6 +788,10 @@ export interface UxFilters {
658
788
  * Branches to display alerts for. If empty, show alerts from all branches
659
789
  */
660
790
  branches: Branch[];
791
+ /**
792
+ * Confidence levels to show, only valid when AlertType is Secret.
793
+ */
794
+ confidenceLevels: Confidence[];
661
795
  packages: Dependency[];
662
796
  /**
663
797
  * Pipelines to show alerts for. If empty, show alerts for all pipelines
@@ -720,14 +854,6 @@ export interface VersionControlSnippet {
720
854
  * line in the code file where the snippet ends
721
855
  */
722
856
  endLine: number;
723
- /**
724
- * subset of the code snippet highlighting the alert issue
725
- */
726
- highlightSnippet: string;
727
- /**
728
- * larger code snippet
729
- */
730
- snippet: string;
731
857
  /**
732
858
  * column in the code file where the snippet starts
733
859
  */
@@ -736,10 +862,6 @@ export interface VersionControlSnippet {
736
862
  * line in the code file where the snippet starts
737
863
  */
738
864
  startLine: number;
739
- /**
740
- * Version control system where the code was found
741
- */
742
- versionControl: string;
743
865
  /**
744
866
  * path of the code file in the version control system
745
867
  */
package/Alert/Alert.js CHANGED
@@ -75,6 +75,9 @@ define(["require", "exports"], function (require, exports) {
75
75
  * Indicates the component is a loose file. Not a package as understood by different package managers.
76
76
  */
77
77
  ComponentType[ComponentType["File"] = 9] = "File";
78
+ /**
79
+ * Indicates the component is a Go package.
80
+ */
78
81
  ComponentType[ComponentType["Go"] = 10] = "Go";
79
82
  /**
80
83
  * Indicates the component is a Docker Image
@@ -101,6 +104,17 @@ define(["require", "exports"], function (require, exports) {
101
104
  */
102
105
  ComponentType[ComponentType["Vcpkg"] = 16] = "Vcpkg";
103
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 = {}));
104
118
  var DismissalType;
105
119
  (function (DismissalType) {
106
120
  /**
@@ -131,6 +145,24 @@ define(["require", "exports"], function (require, exports) {
131
145
  */
132
146
  ExpandOption[ExpandOption["ValidationFingerprint"] = 1] = "ValidationFingerprint";
133
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 = {}));
134
166
  /**
135
167
  * This enum defines the different result types.
136
168
  */
@@ -149,6 +181,25 @@ define(["require", "exports"], function (require, exports) {
149
181
  */
150
182
  ResultType[ResultType["VersionControl"] = 2] = "VersionControl";
151
183
  })(ResultType = exports.ResultType || (exports.ResultType = {}));
184
+ var SarifJobStatus;
185
+ (function (SarifJobStatus) {
186
+ /**
187
+ * The job type when it is new
188
+ */
189
+ SarifJobStatus[SarifJobStatus["New"] = 0] = "New";
190
+ /**
191
+ * The job type when it is queued
192
+ */
193
+ SarifJobStatus[SarifJobStatus["Queued"] = 1] = "Queued";
194
+ /**
195
+ * The job type when it is completed
196
+ */
197
+ SarifJobStatus[SarifJobStatus["Completed"] = 2] = "Completed";
198
+ /**
199
+ * The job type when it fails
200
+ */
201
+ SarifJobStatus[SarifJobStatus["Failed"] = 3] = "Failed";
202
+ })(SarifJobStatus = exports.SarifJobStatus || (exports.SarifJobStatus = {}));
152
203
  var Severity;
153
204
  (function (Severity) {
154
205
  Severity[Severity["Low"] = 0] = "Low";
@@ -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.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={}))});
@@ -45,12 +45,22 @@ export declare class AlertRestClient extends RestClientBase {
45
45
  */
46
46
  updateAlert(stateUpdate: Alert.AlertStateUpdate, project: string, alertId: number, repository: string): Promise<Alert.Alert>;
47
47
  /**
48
+ * Get instances of an alert.
49
+ *
48
50
  * @param project - Project ID or project name
49
- * @param alertId -
50
- * @param repository -
51
+ * @param alertId - ID of alert to retrieve
52
+ * @param repository - Name or id of a repository that alert is part of
51
53
  * @param ref -
52
54
  */
53
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[]>;
54
64
  /**
55
65
  * Upload a Sarif containing security alerts
56
66
  *
@@ -70,5 +80,5 @@ export declare class AlertRestClient extends RestClientBase {
70
80
  *
71
81
  * @param sarifId - Sarif ID returned when the Sarif was uploaded
72
82
  */
73
- getSarif(sarifId: number): Promise<boolean>;
83
+ getSarif(sarifId: number): Promise<Alert.SarifUploadStatus>;
74
84
  }
@@ -187,9 +187,11 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
187
187
  });
188
188
  };
189
189
  /**
190
+ * Get instances of an alert.
191
+ *
190
192
  * @param project - Project ID or project name
191
- * @param alertId -
192
- * @param repository -
193
+ * @param alertId - ID of alert to retrieve
194
+ * @param repository - Name or id of a repository that alert is part of
193
195
  * @param ref -
194
196
  */
195
197
  AlertRestClient.prototype.getAlertInstances = function (project, alertId, repository, ref) {
@@ -212,6 +214,29 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
212
214
  });
213
215
  });
214
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
+ };
215
240
  /**
216
241
  * Upload a Sarif containing security alerts
217
242
  *
@@ -271,7 +296,7 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
271
296
  return __awaiter(this, void 0, void 0, function () {
272
297
  return __generator(this, function (_a) {
273
298
  return [2 /*return*/, this.beginRequest({
274
- apiVersion: "7.2-preview.1",
299
+ apiVersion: "7.2-preview.2",
275
300
  routeTemplate: "_apis/Alert/Sarifs/{sarifId}",
276
301
  routeValues: {
277
302
  sarifId: sarifId
@@ -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,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function s(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){e.done?n(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,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(6===r[0]&&s.label<i[1]){s.label=i[1],i=r;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(r);break}i[2]&&s.ops.pop(),s.trys.pop();continue}r=t.call(e,s)}catch(e){r=[6,e],n=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}var o,n,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getAlert=function(e,t,r,o,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(a){return i={ref:o,expand:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.getAlerts=function(e,t,r,n,i,a){return __awaiter(this,void 0,void 0,function(){var s,u=this;return __generator(this,function(p){return s={top:r,orderBy:n,criteria:i,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,n){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(a){return i={ref:o,expand:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/Alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:i})]})})},t.prototype.updateAlert=function(e,t,r,o){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/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 n;return __generator(this,function(i){return n={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:n})]})})},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(n){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.1",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})]})})},t}(r.RestClientBase);t.AlertRestClient=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/Build/Build.d.ts CHANGED
@@ -2307,7 +2307,13 @@ export interface RealtimeBuildEvent {
2307
2307
  buildId: number;
2308
2308
  }
2309
2309
  export declare enum RepositoryCleanOptions {
2310
+ /**
2311
+ * Run git clean -fdx && git reset --hard or Tf /scorch on $(build.sourcesDirectory)
2312
+ */
2310
2313
  Source = 0,
2314
+ /**
2315
+ * Run git clean -fdx && git reset --hard or Tf /scorch on $(build.sourcesDirectory), also re-create $(build.binariesDirectory)
2316
+ */
2311
2317
  SourceAndOutputDir = 1,
2312
2318
  /**
2313
2319
  * Re-create $(build.sourcesDirectory)
package/Build/Build.js CHANGED
@@ -452,7 +452,13 @@ define(["require", "exports"], function (require, exports) {
452
452
  })(QueuePriority = exports.QueuePriority || (exports.QueuePriority = {}));
453
453
  var RepositoryCleanOptions;
454
454
  (function (RepositoryCleanOptions) {
455
+ /**
456
+ * Run git clean -fdx && git reset --hard or Tf /scorch on $(build.sourcesDirectory)
457
+ */
455
458
  RepositoryCleanOptions[RepositoryCleanOptions["Source"] = 0] = "Source";
459
+ /**
460
+ * Run git clean -fdx && git reset --hard or Tf /scorch on $(build.sourcesDirectory), also re-create $(build.binariesDirectory)
461
+ */
456
462
  RepositoryCleanOptions[RepositoryCleanOptions["SourceAndOutputDir"] = 1] = "SourceAndOutputDir";
457
463
  /**
458
464
  * Re-create $(build.sourcesDirectory)
@@ -89,6 +89,9 @@ export interface CommentCreateParameters {
89
89
  * Optional CommentId of the parent in order to add a reply for an existing comment
90
90
  */
91
91
  parentId: number;
92
+ /**
93
+ * Text of the comment
94
+ */
92
95
  text: string;
93
96
  }
94
97
  /**
@@ -107,6 +110,9 @@ export declare enum CommentExpandOptions {
107
110
  * Include the rendered text (html) in addition to markdown text
108
111
  */
109
112
  RenderedText = 8,
113
+ /**
114
+ * If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes.
115
+ */
110
116
  RenderedTextOnly = 16,
111
117
  /**
112
118
  * If specified, then responses will be expanded in the results
@@ -220,6 +226,9 @@ export declare enum CommentReactionType {
220
226
  * Base class for comment resource references
221
227
  */
222
228
  export interface CommentResourceReference {
229
+ /**
230
+ * REST URL for the resource.
231
+ */
223
232
  url: string;
224
233
  }
225
234
  export declare enum CommentSortOrder {
@@ -23,6 +23,9 @@ define(["require", "exports"], function (require, exports) {
23
23
  * Include the rendered text (html) in addition to markdown text
24
24
  */
25
25
  CommentExpandOptions[CommentExpandOptions["RenderedText"] = 8] = "RenderedText";
26
+ /**
27
+ * If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes.
28
+ */
26
29
  CommentExpandOptions[CommentExpandOptions["RenderedTextOnly"] = 16] = "RenderedTextOnly";
27
30
  /**
28
31
  * If specified, then responses will be expanded in the results
package/Core/Core.d.ts CHANGED
@@ -347,16 +347,34 @@ export interface TeamProjectReference {
347
347
  * A data transfer object that stores the metadata associated with the creation of temporary data.
348
348
  */
349
349
  export interface TemporaryDataCreatedDTO extends TemporaryDataDTO {
350
+ /**
351
+ * Temporary data expiration date.
352
+ */
350
353
  expirationDate: Date;
354
+ /**
355
+ * Temporary data id.
356
+ */
351
357
  id: string;
358
+ /**
359
+ * Rest url for the temporary data.
360
+ */
352
361
  url: string;
353
362
  }
354
363
  /**
355
364
  * A data transfer object that stores the metadata associated with the temporary data.
356
365
  */
357
366
  export interface TemporaryDataDTO {
367
+ /**
368
+ * Temporary data expire in seconds
369
+ */
358
370
  expirationSeconds: number;
371
+ /**
372
+ * Temporary data origin
373
+ */
359
374
  origin: string;
375
+ /**
376
+ * Temporary data.
377
+ */
360
378
  value: any;
361
379
  }
362
380
  /**
@@ -152,6 +152,9 @@ export declare enum DashboardScope {
152
152
  */
153
153
  Project = 2
154
154
  }
155
+ /**
156
+ * None - Team member cannot edit dashboard Edit - Team member can add, configure and delete widgets Manage - Team member can add, reorder, delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations.
157
+ */
155
158
  export declare enum GroupMemberPermission {
156
159
  None = 0,
157
160
  Edit = 1,
@@ -192,6 +195,9 @@ export interface SemanticVersion {
192
195
  */
193
196
  patch: number;
194
197
  }
198
+ /**
199
+ * Read - User can see dashboards Create - User can create dashboards Edit - User can add, configure and delete widgets, and edit dashboard settings. Delete - User can delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations.
200
+ */
195
201
  export declare enum TeamDashboardPermission {
196
202
  None = 0,
197
203
  Read = 1,
@@ -24,6 +24,9 @@ define(["require", "exports"], function (require, exports) {
24
24
  */
25
25
  DashboardScope[DashboardScope["Project"] = 2] = "Project";
26
26
  })(DashboardScope = exports.DashboardScope || (exports.DashboardScope = {}));
27
+ /**
28
+ * None - Team member cannot edit dashboard Edit - Team member can add, configure and delete widgets Manage - Team member can add, reorder, delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations.
29
+ */
27
30
  var GroupMemberPermission;
28
31
  (function (GroupMemberPermission) {
29
32
  GroupMemberPermission[GroupMemberPermission["None"] = 0] = "None";
@@ -31,6 +34,9 @@ define(["require", "exports"], function (require, exports) {
31
34
  GroupMemberPermission[GroupMemberPermission["Manage"] = 2] = "Manage";
32
35
  GroupMemberPermission[GroupMemberPermission["ManagePermissions"] = 3] = "ManagePermissions";
33
36
  })(GroupMemberPermission = exports.GroupMemberPermission || (exports.GroupMemberPermission = {}));
37
+ /**
38
+ * Read - User can see dashboards Create - User can create dashboards Edit - User can add, configure and delete widgets, and edit dashboard settings. Delete - User can delete dashboards Manage Permissions - Team member can manage membership of other members to perform group operations.
39
+ */
34
40
  var TeamDashboardPermission;
35
41
  (function (TeamDashboardPermission) {
36
42
  TeamDashboardPermission[TeamDashboardPermission["None"] = 0] = "None";
@@ -6,12 +6,14 @@ export declare class ExtensionManagementRestClient extends RestClientBase {
6
6
  constructor(options: IVssRestClientOptions);
7
7
  static readonly RESOURCE_AREA_ID: string;
8
8
  /**
9
- * @param itemId -
10
- * @param testCommerce -
11
- * @param isFreeOrTrialInstall -
12
- * @param isAccountOwner -
13
- * @param isLinked -
14
- * @param isConnectedServer -
9
+ * This API is called by acquisition/install page to get possible user actions like Buy/Request
10
+ *
11
+ * @param itemId - Fully qualified name of extension (\<publisher_id\>.\<extension_id\>)
12
+ * @param testCommerce - Parameter to test paid preview extension without making azure plans public
13
+ * @param isFreeOrTrialInstall - Parameter represents install or trial workflow (required for legacy install flows)
14
+ * @param isAccountOwner - Parameter represents whether user is owner or PCA of an account
15
+ * @param isLinked - Parameter represents whether account is linked with a subscription
16
+ * @param isConnectedServer - Parameter represents whether Buy operation should be evaluated
15
17
  * @param isBuyOperationValid -
16
18
  */
17
19
  getAcquisitionOptions(itemId: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean, isAccountOwner?: boolean, isLinked?: boolean, isConnectedServer?: boolean, isBuyOperationValid?: boolean): Promise<ExtensionManagement.AcquisitionOptions>;
@@ -57,12 +57,14 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
57
57
  return _super.call(this, options) || this;
58
58
  }
59
59
  /**
60
- * @param itemId -
61
- * @param testCommerce -
62
- * @param isFreeOrTrialInstall -
63
- * @param isAccountOwner -
64
- * @param isLinked -
65
- * @param isConnectedServer -
60
+ * This API is called by acquisition/install page to get possible user actions like Buy/Request
61
+ *
62
+ * @param itemId - Fully qualified name of extension (\<publisher_id\>.\<extension_id\>)
63
+ * @param testCommerce - Parameter to test paid preview extension without making azure plans public
64
+ * @param isFreeOrTrialInstall - Parameter represents install or trial workflow (required for legacy install flows)
65
+ * @param isAccountOwner - Parameter represents whether user is owner or PCA of an account
66
+ * @param isLinked - Parameter represents whether account is linked with a subscription
67
+ * @param isConnectedServer - Parameter represents whether Buy operation should be evaluated
66
68
  * @param isBuyOperationValid -
67
69
  */
68
70
  ExtensionManagementRestClient.prototype.getAcquisitionOptions = function (itemId, testCommerce, isFreeOrTrialInstall, isAccountOwner, isLinked, isConnectedServer, isBuyOperationValid) {