azure-devops-extension-api 4.266.0 → 4.269.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 (37) hide show
  1. package/AdvancedSecurity.Reporting/Reporting.d.ts +258 -0
  2. package/AdvancedSecurity.Reporting/Reporting.js +99 -0
  3. package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  4. package/AdvancedSecurity.Reporting/ReportingClient.d.ts +53 -0
  5. package/AdvancedSecurity.Reporting/ReportingClient.js +180 -0
  6. package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
  7. package/Alert/Alert.d.ts +4 -0
  8. package/Git/Git.d.ts +24 -2
  9. package/Git/GitClient.d.ts +6 -0
  10. package/Git/GitClient.js +17 -0
  11. package/Git/GitClient.min.js +1 -1
  12. package/Management/Management.d.ts +13 -0
  13. package/Management/ManagementClient.d.ts +11 -0
  14. package/Management/ManagementClient.js +33 -0
  15. package/Management/ManagementClient.min.js +1 -1
  16. package/ServiceEndpoint/ServiceEndpointClient.d.ts +6 -0
  17. package/ServiceEndpoint/ServiceEndpointClient.js +17 -0
  18. package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
  19. package/ServiceHooks/ServiceHooks.d.ts +12 -0
  20. package/ServiceHooks/ServiceHooks.js +4 -0
  21. package/ServiceHooks/ServiceHooks.min.js +1 -1
  22. package/TaskAgent/TaskAgent.d.ts +6 -1
  23. package/TaskAgent/TaskAgent.js +4 -0
  24. package/TaskAgent/TaskAgent.min.js +1 -1
  25. package/Test/Test.d.ts +25 -0
  26. package/TestPlan/TestPlan.d.ts +4 -0
  27. package/_manifest/spdx_2.2/ESRPClientLogs0305185306582.json +1 -0
  28. package/_manifest/spdx_2.2/bsi.cose +0 -0
  29. package/_manifest/spdx_2.2/bsi.json +1 -1
  30. package/_manifest/spdx_2.2/manifest.cat +0 -0
  31. package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
  32. package/_manifest/spdx_2.2/manifest.spdx.json +1 -9799
  33. package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
  34. package/_manifest/spdx_3.0/manifest.spdx.json +1 -0
  35. package/_manifest/spdx_3.0/manifest.spdx.json.sha256 +1 -0
  36. package/package.json +1 -1
  37. package/_manifest/spdx_2.2/ESRPClientLogs0126185807986.json +0 -1
@@ -1,3 +1,62 @@
1
+ /**
2
+ * Represents an advanced filter configuration for the Reporting dashboard.
3
+ */
4
+ export interface AdvancedFilter extends AdvancedFilterCreate {
5
+ /**
6
+ * Link references to related REST resources.
7
+ */
8
+ _links: any;
9
+ /**
10
+ * The identity of the user who last changed the advanced filter.
11
+ */
12
+ changedBy: string;
13
+ /**
14
+ * The date and time when the advanced filter was last changed.
15
+ */
16
+ changedDate: Date;
17
+ /**
18
+ * The identity of the user who created the advanced filter.
19
+ */
20
+ createdBy: string;
21
+ /**
22
+ * The date and time when the advanced filter was created.
23
+ */
24
+ createdDate: Date;
25
+ /**
26
+ * Unique identifier for the advanced filter.
27
+ */
28
+ id: string;
29
+ /**
30
+ * Indicates whether the advanced filter has been soft-deleted.
31
+ */
32
+ isDeleted: boolean;
33
+ /**
34
+ * The URL of the advanced filter.
35
+ */
36
+ url: string;
37
+ }
38
+ /**
39
+ * Represents the data required to create an advanced filter configuration for the Reporting dashboard. Also serves as the base class for AdvancedFilter.
40
+ */
41
+ export interface AdvancedFilterCreate {
42
+ /**
43
+ * The filter criteria to be applied when this advanced filter is selected.
44
+ */
45
+ filterCriteria: CombinedAlertFilterCriteria;
46
+ /**
47
+ * User-provided name for the advanced filter.
48
+ */
49
+ name: string;
50
+ }
51
+ /**
52
+ * Represents the data required to update an advanced filter configuration. Only the name can be updated.
53
+ */
54
+ export interface AdvancedFilterUpdate {
55
+ /**
56
+ * The new name for the advanced filter.
57
+ */
58
+ name: string;
59
+ }
1
60
  /**
2
61
  * Alert Summary by severity.
3
62
  */
@@ -80,15 +139,163 @@ export declare enum AlertValidityStatus {
80
139
  */
81
140
  Inactive = 3
82
141
  }
142
+ /**
143
+ * Represents code scanning rule information for filtering purposes.
144
+ */
145
+ export interface CodeScanningRuleInfo {
146
+ /**
147
+ * The human-readable name of the rule.
148
+ */
149
+ friendlyName: string;
150
+ /**
151
+ * The opaque identifier of the rule (e.g., SARIF rule ID).
152
+ */
153
+ opaqueId: string;
154
+ /**
155
+ * The name of the tool that defines this rule.
156
+ */
157
+ toolName: string;
158
+ }
83
159
  export interface CombinedAlertFilterCriteria {
160
+ /**
161
+ * If provided, only return alerts of the specified alert type.
162
+ */
163
+ alertType: AlertType;
164
+ /**
165
+ * If provided, only return alerts with the specified validity status.
166
+ */
167
+ alertValidityStatus: AlertValidityStatus;
168
+ /**
169
+ * If provided, only return dependency alerts for the specified package names.
170
+ */
171
+ componentNames: string[];
172
+ /**
173
+ * If provided, only return dependency alerts for the specified ecosystems (e.g., NuGet, Npm, Maven).
174
+ */
175
+ componentTypes: ComponentType[];
176
+ /**
177
+ * If provided, only return alerts with one of the specified dismissal types (closure reasons). Applicable only when filtering for closed/dismissed alerts.
178
+ */
179
+ dismissalTypes: DismissalType[];
180
+ /**
181
+ * If provided, only return alerts fixed on or before this date.
182
+ */
183
+ fixedDateEnd: Date;
184
+ /**
185
+ * If provided, only return alerts fixed on or after this date.
186
+ */
187
+ fixedDateStart: Date;
188
+ /**
189
+ * If provided, only return alerts introduced on or before this date.
190
+ */
191
+ introducedDateEnd: Date;
192
+ /**
193
+ * If provided, only return alerts introduced on or after this date.
194
+ */
195
+ introducedDateStart: Date;
84
196
  /**
85
197
  * If provided, only return alerts whose titles match this pattern.
86
198
  */
87
199
  keywords: string;
200
+ /**
201
+ * If provided, only return alerts for projects whose names are in this list.
202
+ */
203
+ projects: string[];
204
+ /**
205
+ * If provided, only return alerts for repositories whose names are in this list.
206
+ */
207
+ repositories: string[];
208
+ /**
209
+ * If provided, only return alerts for repositories whose IDs (GitRepositoryId) are in this list.
210
+ */
211
+ repositoryIds: string[];
212
+ /**
213
+ * If provided, only return code scanning alerts or secret alerts matching the specified rule names.
214
+ */
215
+ ruleNames: string[];
216
+ /**
217
+ * If provided, only return secret alerts matching the specified secret types (rule friendly name or opaque ID).
218
+ */
219
+ secretTypes: string[];
220
+ /**
221
+ * If provided, only return alerts with the specified severities. Otherwise, return alerts at any severity.
222
+ */
223
+ severities: Severity[];
88
224
  /**
89
225
  * If provided, return alerts that are active or inactive based on this value. \<br /\>Otherwise, return alerts in any state.
90
226
  */
91
227
  state: DashboardAlertState;
228
+ /**
229
+ * If provided, only return code scanning alerts detected by the specified tools.
230
+ */
231
+ toolNames: string[];
232
+ }
233
+ /**
234
+ * This enum defines the dependency components.
235
+ */
236
+ export declare enum ComponentType {
237
+ Unknown = 0,
238
+ NuGet = 1,
239
+ /**
240
+ * Indicates the component is an Npm package.
241
+ */
242
+ Npm = 2,
243
+ /**
244
+ * Indicates the component is a Maven artifact.
245
+ */
246
+ Maven = 3,
247
+ /**
248
+ * Indicates the component is a Git repository.
249
+ */
250
+ Git = 4,
251
+ /**
252
+ * Indicates the component is not any of the supported component types by Governance.
253
+ */
254
+ Other = 5,
255
+ /**
256
+ * Indicates the component is a Ruby gem.
257
+ */
258
+ RubyGems = 6,
259
+ /**
260
+ * Indicates the component is a Cargo package.
261
+ */
262
+ Cargo = 7,
263
+ /**
264
+ * Indicates the component is a Pip package.
265
+ */
266
+ Pip = 8,
267
+ /**
268
+ * Indicates the component is a loose file. Not a package as understood by different package managers.
269
+ */
270
+ File = 9,
271
+ /**
272
+ * Indicates the component is a Go package.
273
+ */
274
+ Go = 10,
275
+ /**
276
+ * Indicates the component is a Docker Image
277
+ */
278
+ DockerImage = 11,
279
+ /**
280
+ * Indicates the component is a CocoaPods pod.
281
+ */
282
+ Pod = 12,
283
+ /**
284
+ * Indicates the component is found in a linux environment. A package understood by linux based package managers like apt and rpm.
285
+ */
286
+ Linux = 13,
287
+ /**
288
+ * Indicates the component is a Conda package.
289
+ */
290
+ Conda = 14,
291
+ /**
292
+ * Indicates the component is a Docker Reference.
293
+ */
294
+ DockerReference = 15,
295
+ /**
296
+ * Indicates the component is a Vcpkg Package.
297
+ */
298
+ Vcpkg = 16
92
299
  }
93
300
  /**
94
301
  * An alert entity used in the dashboard for combined alerts.
@@ -163,6 +370,36 @@ export declare enum DashboardAlertState {
163
370
  */
164
371
  Closed = 1
165
372
  }
373
+ export declare enum DismissalType {
374
+ /**
375
+ * Dismissal type unknown
376
+ */
377
+ Unknown = 0,
378
+ /**
379
+ * Dismissal indicating alert has been fixed
380
+ */
381
+ Fixed = 1,
382
+ /**
383
+ * Dismissal indicating user is accepting a risk for the alert
384
+ */
385
+ AcceptedRisk = 2,
386
+ /**
387
+ * Dismissal indicating alert is a false positive and will likely not be fixed.
388
+ */
389
+ FalsePositive = 3,
390
+ /**
391
+ * Dismissal indicating user is agreeing to follow license guidance.
392
+ */
393
+ AgreedToGuidance = 4,
394
+ /**
395
+ * Dismissal indicating backend detection tool was upgraded and the alert is not detected by the new version of tool.
396
+ */
397
+ ToolUpgrade = 5,
398
+ /**
399
+ * Dismissal indicating the affected dependencency is not distributed to end users.
400
+ */
401
+ NotDistributed = 6
402
+ }
166
403
  export interface EnablementFilterCriteria {
167
404
  /**
168
405
  * If provided, only return repos whose titles match this pattern.
@@ -276,6 +513,27 @@ export interface ProjectAlertSummary {
276
513
  */
277
514
  repos: RepoAlertSummary[];
278
515
  }
516
+ /**
517
+ * Represents project and repository information for filtering purposes.
518
+ */
519
+ export interface ProjectAndRepoInfo {
520
+ /**
521
+ * The unique identifier of the project.
522
+ */
523
+ projectId: string;
524
+ /**
525
+ * The name of the project.
526
+ */
527
+ projectName: string;
528
+ /**
529
+ * The unique identifier of the repository.
530
+ */
531
+ repositoryId: string;
532
+ /**
533
+ * The name of the repository.
534
+ */
535
+ repositoryName: string;
536
+ }
279
537
  /**
280
538
  * Project Enablement Summary.
281
539
  */
@@ -48,6 +48,74 @@ define(["require", "exports"], function (require, exports) {
48
48
  */
49
49
  AlertValidityStatus[AlertValidityStatus["Inactive"] = 3] = "Inactive";
50
50
  })(AlertValidityStatus = exports.AlertValidityStatus || (exports.AlertValidityStatus = {}));
51
+ /**
52
+ * This enum defines the dependency components.
53
+ */
54
+ var ComponentType;
55
+ (function (ComponentType) {
56
+ ComponentType[ComponentType["Unknown"] = 0] = "Unknown";
57
+ ComponentType[ComponentType["NuGet"] = 1] = "NuGet";
58
+ /**
59
+ * Indicates the component is an Npm package.
60
+ */
61
+ ComponentType[ComponentType["Npm"] = 2] = "Npm";
62
+ /**
63
+ * Indicates the component is a Maven artifact.
64
+ */
65
+ ComponentType[ComponentType["Maven"] = 3] = "Maven";
66
+ /**
67
+ * Indicates the component is a Git repository.
68
+ */
69
+ ComponentType[ComponentType["Git"] = 4] = "Git";
70
+ /**
71
+ * Indicates the component is not any of the supported component types by Governance.
72
+ */
73
+ ComponentType[ComponentType["Other"] = 5] = "Other";
74
+ /**
75
+ * Indicates the component is a Ruby gem.
76
+ */
77
+ ComponentType[ComponentType["RubyGems"] = 6] = "RubyGems";
78
+ /**
79
+ * Indicates the component is a Cargo package.
80
+ */
81
+ ComponentType[ComponentType["Cargo"] = 7] = "Cargo";
82
+ /**
83
+ * Indicates the component is a Pip package.
84
+ */
85
+ ComponentType[ComponentType["Pip"] = 8] = "Pip";
86
+ /**
87
+ * Indicates the component is a loose file. Not a package as understood by different package managers.
88
+ */
89
+ ComponentType[ComponentType["File"] = 9] = "File";
90
+ /**
91
+ * Indicates the component is a Go package.
92
+ */
93
+ ComponentType[ComponentType["Go"] = 10] = "Go";
94
+ /**
95
+ * Indicates the component is a Docker Image
96
+ */
97
+ ComponentType[ComponentType["DockerImage"] = 11] = "DockerImage";
98
+ /**
99
+ * Indicates the component is a CocoaPods pod.
100
+ */
101
+ ComponentType[ComponentType["Pod"] = 12] = "Pod";
102
+ /**
103
+ * Indicates the component is found in a linux environment. A package understood by linux based package managers like apt and rpm.
104
+ */
105
+ ComponentType[ComponentType["Linux"] = 13] = "Linux";
106
+ /**
107
+ * Indicates the component is a Conda package.
108
+ */
109
+ ComponentType[ComponentType["Conda"] = 14] = "Conda";
110
+ /**
111
+ * Indicates the component is a Docker Reference.
112
+ */
113
+ ComponentType[ComponentType["DockerReference"] = 15] = "DockerReference";
114
+ /**
115
+ * Indicates the component is a Vcpkg Package.
116
+ */
117
+ ComponentType[ComponentType["Vcpkg"] = 16] = "Vcpkg";
118
+ })(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
51
119
  var DashboardAlertState;
52
120
  (function (DashboardAlertState) {
53
121
  /**
@@ -59,6 +127,37 @@ define(["require", "exports"], function (require, exports) {
59
127
  */
60
128
  DashboardAlertState[DashboardAlertState["Closed"] = 1] = "Closed";
61
129
  })(DashboardAlertState = exports.DashboardAlertState || (exports.DashboardAlertState = {}));
130
+ var DismissalType;
131
+ (function (DismissalType) {
132
+ /**
133
+ * Dismissal type unknown
134
+ */
135
+ DismissalType[DismissalType["Unknown"] = 0] = "Unknown";
136
+ /**
137
+ * Dismissal indicating alert has been fixed
138
+ */
139
+ DismissalType[DismissalType["Fixed"] = 1] = "Fixed";
140
+ /**
141
+ * Dismissal indicating user is accepting a risk for the alert
142
+ */
143
+ DismissalType[DismissalType["AcceptedRisk"] = 2] = "AcceptedRisk";
144
+ /**
145
+ * Dismissal indicating alert is a false positive and will likely not be fixed.
146
+ */
147
+ DismissalType[DismissalType["FalsePositive"] = 3] = "FalsePositive";
148
+ /**
149
+ * Dismissal indicating user is agreeing to follow license guidance.
150
+ */
151
+ DismissalType[DismissalType["AgreedToGuidance"] = 4] = "AgreedToGuidance";
152
+ /**
153
+ * Dismissal indicating backend detection tool was upgraded and the alert is not detected by the new version of tool.
154
+ */
155
+ DismissalType[DismissalType["ToolUpgrade"] = 5] = "ToolUpgrade";
156
+ /**
157
+ * Dismissal indicating the affected dependencency is not distributed to end users.
158
+ */
159
+ DismissalType[DismissalType["NotDistributed"] = 6] = "NotDistributed";
160
+ })(DismissalType = exports.DismissalType || (exports.DismissalType = {}));
62
161
  var Severity;
63
162
  (function (Severity) {
64
163
  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",e[e.License=4]="License"}(n.AlertType||(n.AlertType={}));!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(n.AlertValidityStatus||(n.AlertValidityStatus={}));!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(n.DashboardAlertState||(n.DashboardAlertState={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}));!function(e){e[e.Undefined=0]="Undefined",e[e.Last24Hours=5]="Last24Hours",e[e.Last7Days=6]="Last7Days",e[e.Last14Days=7]="Last14Days",e[e.Last30Days=8]="Last30Days",e[e.Last90Days=9]="Last90Days"}(n.TimePeriod||(n.TimePeriod={}))});
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.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(n.AlertValidityStatus||(n.AlertValidityStatus={}));!function(e){e[e.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.Open=0]="Open",e[e.Closed=1]="Closed"}(n.DashboardAlertState||(n.DashboardAlertState={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive",e[e.AgreedToGuidance=4]="AgreedToGuidance",e[e.ToolUpgrade=5]="ToolUpgrade",e[e.NotDistributed=6]="NotDistributed"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}));!function(e){e[e.Undefined=0]="Undefined",e[e.Last24Hours=5]="Last24Hours",e[e.Last7Days=6]="Last7Days",e[e.Last14Days=7]="Last14Days",e[e.Last30Days=8]="Last30Days",e[e.Last90Days=9]="Last90Days"}(n.TimePeriod||(n.TimePeriod={}))});
@@ -4,6 +4,59 @@ import * as Reporting from "../AdvancedSecurity.Reporting/Reporting";
4
4
  import * as WebApi from "../WebApi/WebApi";
5
5
  export declare class ReportingRestClient extends RestClientBase {
6
6
  constructor(options: IVssRestClientOptions);
7
+ /**
8
+ * Creates a new advanced filter for the organization.
9
+ *
10
+ * @param filter - The advanced filter to create.
11
+ */
12
+ createAdvancedFilter(filter: Reporting.AdvancedFilterCreate): Promise<Reporting.AdvancedFilter>;
13
+ /**
14
+ * Deletes an advanced filter.
15
+ *
16
+ * @param filterId - The ID of the advanced filter to delete.
17
+ */
18
+ deleteAdvancedFilter(filterId: string): Promise<void>;
19
+ /**
20
+ * Gets a specific advanced filter by its ID.
21
+ *
22
+ * @param filterId - The ID of the advanced filter to retrieve.
23
+ */
24
+ getAdvancedFilter(filterId: string): Promise<Reporting.AdvancedFilter>;
25
+ /**
26
+ * Gets all advanced filters for the organization.
27
+ *
28
+ * @param includeDeleted - Whether to include soft-deleted filters.
29
+ * @param keywords - Optional filter to search filters by name (case-insensitive, partial match).
30
+ */
31
+ listAdvancedFilters(includeDeleted?: boolean, keywords?: string): Promise<Reporting.AdvancedFilter[]>;
32
+ /**
33
+ * Updates an advanced filter. Only the name can be updated.
34
+ *
35
+ * @param filter - The update data containing the new name.
36
+ * @param filterId - The ID of the advanced filter to update.
37
+ */
38
+ updateAdvancedFilter(filter: Reporting.AdvancedFilterUpdate, filterId: string): Promise<void>;
39
+ /**
40
+ * Get all distinct dependency component names for the org (used for UX filtering)
41
+ *
42
+ */
43
+ getDependencyComponentNamesForOrg(): Promise<string[]>;
44
+ /**
45
+ * Get all projects and repositories for the org (used for UX filtering)
46
+ *
47
+ */
48
+ getProjectsAndReposForOrg(): Promise<Reporting.ProjectAndRepoInfo[]>;
49
+ /**
50
+ * Get all distinct code scanning rule names for the org (used for UX filtering)
51
+ *
52
+ * @param toolName - Optional tool name to filter rules by
53
+ */
54
+ getRuleNamesForOrg(toolName?: string): Promise<Reporting.CodeScanningRuleInfo[]>;
55
+ /**
56
+ * Get all distinct secret types for the org (used for UX filtering)
57
+ *
58
+ */
59
+ getSecretTypesForOrg(): Promise<string[]>;
7
60
  /**
8
61
  */
9
62
  getUXComputedFilters(): Promise<Reporting.ReportingUXComputedFilters>;
@@ -56,6 +56,186 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
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
+ * @param keywords - Optional filter to search filters by name (case-insensitive, partial match).
123
+ */
124
+ ReportingRestClient.prototype.listAdvancedFilters = function (includeDeleted, keywords) {
125
+ return __awaiter(this, void 0, void 0, function () {
126
+ var queryValues;
127
+ return __generator(this, function (_a) {
128
+ queryValues = {
129
+ includeDeleted: includeDeleted,
130
+ keywords: keywords
131
+ };
132
+ return [2 /*return*/, this.beginRequest({
133
+ apiVersion: "7.2-preview.1",
134
+ routeTemplate: "_apis/Reporting/filtersSettings/{action}/{filterId}",
135
+ routeValues: {
136
+ action: "AlertsBatch"
137
+ },
138
+ queryParams: queryValues
139
+ })];
140
+ });
141
+ });
142
+ };
143
+ /**
144
+ * Updates an advanced filter. Only the name can be updated.
145
+ *
146
+ * @param filter - The update data containing the new name.
147
+ * @param filterId - The ID of the advanced filter to update.
148
+ */
149
+ ReportingRestClient.prototype.updateAdvancedFilter = function (filter, filterId) {
150
+ return __awaiter(this, void 0, void 0, function () {
151
+ return __generator(this, function (_a) {
152
+ return [2 /*return*/, this.beginRequest({
153
+ apiVersion: "7.2-preview.1",
154
+ method: "PATCH",
155
+ routeTemplate: "_apis/Reporting/filtersSettings/{action}/{filterId}",
156
+ routeValues: {
157
+ filterId: filterId,
158
+ action: "AlertsBatch"
159
+ },
160
+ body: filter
161
+ })];
162
+ });
163
+ });
164
+ };
165
+ /**
166
+ * Get all distinct dependency component names for the org (used for UX filtering)
167
+ *
168
+ */
169
+ ReportingRestClient.prototype.getDependencyComponentNamesForOrg = function () {
170
+ return __awaiter(this, void 0, void 0, function () {
171
+ return __generator(this, function (_a) {
172
+ return [2 /*return*/, this.beginRequest({
173
+ apiVersion: "7.2-preview.1",
174
+ routeTemplate: "_apis/Reporting/filters/{action}",
175
+ routeValues: {
176
+ action: "ComponentNames"
177
+ }
178
+ })];
179
+ });
180
+ });
181
+ };
182
+ /**
183
+ * Get all projects and repositories for the org (used for UX filtering)
184
+ *
185
+ */
186
+ ReportingRestClient.prototype.getProjectsAndReposForOrg = function () {
187
+ return __awaiter(this, void 0, void 0, function () {
188
+ return __generator(this, function (_a) {
189
+ return [2 /*return*/, this.beginRequest({
190
+ apiVersion: "7.2-preview.1",
191
+ routeTemplate: "_apis/Reporting/filters/{action}",
192
+ routeValues: {
193
+ action: "ProjectsAndRepos"
194
+ }
195
+ })];
196
+ });
197
+ });
198
+ };
199
+ /**
200
+ * Get all distinct code scanning rule names for the org (used for UX filtering)
201
+ *
202
+ * @param toolName - Optional tool name to filter rules by
203
+ */
204
+ ReportingRestClient.prototype.getRuleNamesForOrg = function (toolName) {
205
+ return __awaiter(this, void 0, void 0, function () {
206
+ var queryValues;
207
+ return __generator(this, function (_a) {
208
+ queryValues = {
209
+ toolName: toolName
210
+ };
211
+ return [2 /*return*/, this.beginRequest({
212
+ apiVersion: "7.2-preview.1",
213
+ routeTemplate: "_apis/Reporting/filters/{action}",
214
+ routeValues: {
215
+ action: "RuleNames"
216
+ },
217
+ queryParams: queryValues
218
+ })];
219
+ });
220
+ });
221
+ };
222
+ /**
223
+ * Get all distinct secret types for the org (used for UX filtering)
224
+ *
225
+ */
226
+ ReportingRestClient.prototype.getSecretTypesForOrg = function () {
227
+ return __awaiter(this, void 0, void 0, function () {
228
+ return __generator(this, function (_a) {
229
+ return [2 /*return*/, this.beginRequest({
230
+ apiVersion: "7.2-preview.1",
231
+ routeTemplate: "_apis/Reporting/filters/{action}",
232
+ routeValues: {
233
+ action: "SecretTypes"
234
+ }
235
+ })];
236
+ });
237
+ });
238
+ };
59
239
  /**
60
240
  */
61
241
  ReportingRestClient.prototype.getUXComputedFilters = function () {