azure-devops-extension-api 5.274.0 → 5.275.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 (40) hide show
  1. package/AdvancedSecurity.Reporting/Reporting.d.ts +10 -2
  2. package/AdvancedSecurity.Reporting/Reporting.js +8 -0
  3. package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  4. package/Alert/Alert.d.ts +57 -2
  5. package/Alert/Alert.js +8 -0
  6. package/Alert/Alert.min.js +1 -1
  7. package/Alert/AlertClient.d.ts +18 -3
  8. package/Alert/AlertClient.js +55 -5
  9. package/Alert/AlertClient.min.js +1 -1
  10. package/Build/Build.d.ts +19 -15
  11. package/Git/Git.d.ts +17 -1
  12. package/Management/Management.d.ts +5 -1
  13. package/Management/Management.js +4 -0
  14. package/Management/Management.min.js +1 -1
  15. package/TaskAgent/TaskAgent.d.ts +9 -1
  16. package/Test/Test.d.ts +14 -0
  17. package/TestResults/TestResultsClient.d.ts +7 -0
  18. package/TestResults/TestResultsClient.js +19 -0
  19. package/TestResults/TestResultsClient.min.js +1 -1
  20. package/_manifest/spdx_2.2/ESRPClientLogs0716164721553.json +1 -0
  21. package/_manifest/spdx_2.2/bsi.cose +0 -0
  22. package/_manifest/spdx_2.2/bsi.json +1 -1
  23. package/_manifest/spdx_2.2/manifest.cat +0 -0
  24. package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
  25. package/_manifest/spdx_2.2/manifest.spdx.json +1 -1
  26. package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
  27. package/_manifest/spdx_3.0/manifest.spdx.json +1 -1
  28. package/_manifest/spdx_3.0/manifest.spdx.json.sha256 +1 -1
  29. package/esm/AdvancedSecurity.Reporting/Reporting.js +8 -0
  30. package/esm/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  31. package/esm/Alert/Alert.js +8 -0
  32. package/esm/Alert/Alert.min.js +1 -1
  33. package/esm/Alert/AlertClient.js +51 -5
  34. package/esm/Alert/AlertClient.min.js +1 -1
  35. package/esm/Management/Management.js +4 -0
  36. package/esm/Management/Management.min.js +1 -1
  37. package/esm/TestResults/TestResultsClient.js +17 -0
  38. package/esm/TestResults/TestResultsClient.min.js +1 -1
  39. package/package.json +1 -1
  40. package/_manifest/spdx_2.2/ESRPClientLogs0702203431812.json +0 -1
@@ -124,7 +124,11 @@ export declare enum AlertType {
124
124
  /**
125
125
  * The code uses a dependency with potential license incompliance.
126
126
  */
127
- License = 4
127
+ License = 4,
128
+ /**
129
+ * The code contains a weakness determined by AI-powered analysis.
130
+ */
131
+ AICode = 5
128
132
  }
129
133
  export declare enum AlertValidityStatus {
130
134
  /**
@@ -705,7 +709,11 @@ export declare enum State {
705
709
  /**
706
710
  * The tool has determined that the issue is no longer a risk
707
711
  */
708
- AutoDismissed = 8
712
+ AutoDismissed = 8,
713
+ /**
714
+ * Alert is in a draft state and is only visible to identities in the Advanced Security draft-alert privileged identity list. Filtered out of all Get alert responses (results and counts) for non-privileged callers.
715
+ */
716
+ Draft = 16
709
717
  }
710
718
  export declare enum TimePeriod {
711
719
  Undefined = 0,
@@ -28,6 +28,10 @@ var AlertType;
28
28
  * The code uses a dependency with potential license incompliance.
29
29
  */
30
30
  AlertType[AlertType["License"] = 4] = "License";
31
+ /**
32
+ * The code contains a weakness determined by AI-powered analysis.
33
+ */
34
+ AlertType[AlertType["AICode"] = 5] = "AICode";
31
35
  })(AlertType || (exports.AlertType = AlertType = {}));
32
36
  var AlertValidityStatus;
33
37
  (function (AlertValidityStatus) {
@@ -191,6 +195,10 @@ var State;
191
195
  * The tool has determined that the issue is no longer a risk
192
196
  */
193
197
  State[State["AutoDismissed"] = 8] = "AutoDismissed";
198
+ /**
199
+ * Alert is in a draft state and is only visible to identities in the Advanced Security draft-alert privileged identity list. Filtered out of all Get alert responses (results and counts) for non-privileged callers.
200
+ */
201
+ State[State["Draft"] = 16] = "Draft";
194
202
  })(State || (exports.State = State = {}));
195
203
  var TimePeriod;
196
204
  (function (TimePeriod) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimePeriod=exports.State=exports.Severity=exports.DismissalType=exports.DashboardAlertState=exports.ComponentType=exports.AlertValidityStatus=exports.AlertType=void 0;var AlertType;!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"}(AlertType||(exports.AlertType=AlertType={}));var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(exports.AlertValidityStatus=AlertValidityStatus={}));var ComponentType;!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"}(ComponentType||(exports.ComponentType=ComponentType={}));var DashboardAlertState;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(DashboardAlertState||(exports.DashboardAlertState=DashboardAlertState={}));var DismissalType;!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"}(DismissalType||(exports.DismissalType=DismissalType={}));var Severity;!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"}(Severity||(exports.Severity=Severity={}));var State;!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"}(State||(exports.State=State={}));var TimePeriod;!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"}(TimePeriod||(exports.TimePeriod=TimePeriod={}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimePeriod=exports.State=exports.Severity=exports.DismissalType=exports.DashboardAlertState=exports.ComponentType=exports.AlertValidityStatus=exports.AlertType=void 0;var AlertType;!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",e[e.AICode=5]="AICode"}(AlertType||(exports.AlertType=AlertType={}));var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(exports.AlertValidityStatus=AlertValidityStatus={}));var ComponentType;!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"}(ComponentType||(exports.ComponentType=ComponentType={}));var DashboardAlertState;!function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(DashboardAlertState||(exports.DashboardAlertState=DashboardAlertState={}));var DismissalType;!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"}(DismissalType||(exports.DismissalType=DismissalType={}));var Severity;!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"}(Severity||(exports.Severity=Severity={}));var State;!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",e[e.Draft=16]="Draft"}(State||(exports.State=State={}));var TimePeriod;!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"}(TimePeriod||(exports.TimePeriod=TimePeriod={}));
package/Alert/Alert.d.ts CHANGED
@@ -145,6 +145,19 @@ export interface AlertBatchRequest {
145
145
  */
146
146
  alertType: AlertType;
147
147
  }
148
+ /**
149
+ * Request model for batch-updating alert states.
150
+ */
151
+ export interface AlertBatchStateUpdateRequest {
152
+ /**
153
+ * The list of individual alert state changes to apply. Max 100 items per request.
154
+ */
155
+ alertStateUpdateList: AlertStateUpdateForAlert[];
156
+ /**
157
+ * The alert type of the alerts being updated. Defaults to AICode if not specified.
158
+ */
159
+ alertType: AlertType;
160
+ }
148
161
  export declare enum AlertListExpandOption {
149
162
  /**
150
163
  * No Expands.
@@ -216,6 +229,27 @@ export interface AlertStateUpdate {
216
229
  dismissedReason: DismissalType;
217
230
  state: State;
218
231
  }
232
+ /**
233
+ * Represents a state update for a single alert within a batch request.
234
+ */
235
+ export interface AlertStateUpdateForAlert {
236
+ /**
237
+ * The ID of the alert to update.
238
+ */
239
+ alertId: number;
240
+ /**
241
+ * Comment for dismissal (e.g., "Dismissed by AI scan validation").
242
+ */
243
+ dismissedComment: string;
244
+ /**
245
+ * Reason for dismissal. Required when State == Dismissed.
246
+ */
247
+ dismissedReason: DismissalType;
248
+ /**
249
+ * The state to transition the alert to (Active, Dismissed, or Draft). Draft means the alert is indeterminate and should remain in its current state.
250
+ */
251
+ state: State;
252
+ }
219
253
  export declare enum AlertType {
220
254
  /**
221
255
  * The code has an unspecified vulnerability type
@@ -236,7 +270,11 @@ export declare enum AlertType {
236
270
  /**
237
271
  * The code uses a dependency with potential license incompliance.
238
272
  */
239
- License = 4
273
+ License = 4,
274
+ /**
275
+ * The code contains a weakness determined by AI-powered analysis.
276
+ */
277
+ AICode = 5
240
278
  }
241
279
  export declare enum AlertValidationRequestStatus {
242
280
  /**
@@ -399,12 +437,24 @@ export interface AnalysisResult {
399
437
  * Payload sent by the autofix pipeline to report the outcome of a run.
400
438
  */
401
439
  export interface AutofixCallbackRequest {
440
+ /**
441
+ * Optional diagnostic detail captured by the pipeline when the run fails — the tail of the pipeline run log (where the failing step's output is), bounded by the pipeline to fit the trace message size limit. Null or empty for successful runs or when no output was captured.
442
+ */
443
+ errorDetails: string;
444
+ /**
445
+ * Orchestration plan id (System.PlanId) of the pipeline run reporting this callback.
446
+ */
447
+ pipelinePlanId: string;
402
448
  pullRequestId: number;
403
449
  requestId: number;
404
450
  /**
405
451
  * Terminal status reported by the pipeline.
406
452
  */
407
453
  status: AutofixCallbackStatus;
454
+ /**
455
+ * Total nanoAIU consumed by the autofix binary.
456
+ */
457
+ tokenUsage: number;
408
458
  }
409
459
  export declare enum AutofixCallbackStatus {
410
460
  /**
@@ -421,6 +471,7 @@ export declare enum AutofixCallbackStatus {
421
471
  */
422
472
  export interface AutofixRequest {
423
473
  createdDate: Date;
474
+ pipelinePlanId: string;
424
475
  requestId: number;
425
476
  status: AutofixRequestStatus;
426
477
  }
@@ -1146,7 +1197,11 @@ export declare enum State {
1146
1197
  /**
1147
1198
  * The tool has determined that the issue is no longer a risk
1148
1199
  */
1149
- AutoDismissed = 8
1200
+ AutoDismissed = 8,
1201
+ /**
1202
+ * Alert is in a draft state and is only visible to identities in the Advanced Security draft-alert privileged identity list. Filtered out of all Get alert responses (results and counts) for non-privileged callers.
1203
+ */
1204
+ Draft = 16
1150
1205
  }
1151
1206
  /**
1152
1207
  * An Analysis tool that can generate security alerts
package/Alert/Alert.js CHANGED
@@ -57,6 +57,10 @@ var AlertType;
57
57
  * The code uses a dependency with potential license incompliance.
58
58
  */
59
59
  AlertType[AlertType["License"] = 4] = "License";
60
+ /**
61
+ * The code contains a weakness determined by AI-powered analysis.
62
+ */
63
+ AlertType[AlertType["AICode"] = 5] = "AICode";
60
64
  })(AlertType || (exports.AlertType = AlertType = {}));
61
65
  var AlertValidationRequestStatus;
62
66
  (function (AlertValidationRequestStatus) {
@@ -440,6 +444,10 @@ var State;
440
444
  * The tool has determined that the issue is no longer a risk
441
445
  */
442
446
  State[State["AutoDismissed"] = 8] = "AutoDismissed";
447
+ /**
448
+ * Alert is in a draft state and is only visible to identities in the Advanced Security draft-alert privileged identity list. Filtered out of all Get alert responses (results and counts) for non-privileged callers.
449
+ */
450
+ State[State["Draft"] = 16] = "Draft";
443
451
  })(State || (exports.State = State = {}));
444
452
  var ValidationResult;
445
453
  (function (ValidationResult) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidationResult=exports.State=exports.Severity=exports.SarifJobStatus=exports.ResultType=exports.MetadataOperation=exports.MetadataChangeType=exports.LicenseType=exports.LicenseState=exports.ExpandOption=exports.DismissalType=exports.DependencyKind=exports.Confidence=exports.ComponentType=exports.AutofixRequestStatus=exports.AutofixCallbackStatus=exports.AnalysisConfigurationType=exports.AlertValidityStatus=exports.AlertValidationRequestStatus=exports.AlertType=exports.AlertMetadataErrorPolicy=exports.AlertListExpandOption=void 0;var AlertListExpandOption;!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal",e[e.Count=2]="Count"}(AlertListExpandOption||(exports.AlertListExpandOption=AlertListExpandOption={}));var AlertMetadataErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(AlertMetadataErrorPolicy||(exports.AlertMetadataErrorPolicy=AlertMetadataErrorPolicy={}));var AlertType;!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"}(AlertType||(exports.AlertType=AlertType={}));var AlertValidationRequestStatus;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(AlertValidationRequestStatus||(exports.AlertValidationRequestStatus=AlertValidationRequestStatus={}));var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(exports.AlertValidityStatus=AlertValidityStatus={}));var AnalysisConfigurationType;!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(AnalysisConfigurationType||(exports.AnalysisConfigurationType=AnalysisConfigurationType={}));var AutofixCallbackStatus;!function(e){e[e.Done=0]="Done",e[e.Failed=1]="Failed"}(AutofixCallbackStatus||(exports.AutofixCallbackStatus=AutofixCallbackStatus={}));var AutofixRequestStatus;!function(e){e[e.None=0]="None",e[e.Pending=1]="Pending",e[e.PipelineRunning=2]="PipelineRunning",e[e.Done=3]="Done",e[e.Failed=4]="Failed"}(AutofixRequestStatus||(exports.AutofixRequestStatus=AutofixRequestStatus={}));var ComponentType;!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"}(ComponentType||(exports.ComponentType=ComponentType={}));var Confidence;!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(Confidence||(exports.Confidence=Confidence={}));var DependencyKind;!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(DependencyKind||(exports.DependencyKind=DependencyKind={}));var DismissalType;!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"}(DismissalType||(exports.DismissalType=DismissalType={}));var ExpandOption;!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(ExpandOption||(exports.ExpandOption=ExpandOption={}));var LicenseState;!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(LicenseState||(exports.LicenseState=LicenseState={}));var LicenseType;!function(e){e[e.Unknown=0]="Unknown",e[e.Permissive=1]="Permissive",e[e.WeakCopyleft=2]="WeakCopyleft",e[e.StrongCopyleft=3]="StrongCopyleft",e[e.NetworkCopyleft=4]="NetworkCopyleft",e[e.Other=5]="Other",e[e.NoAssertion=6]="NoAssertion"}(LicenseType||(exports.LicenseType=LicenseType={}));var MetadataChangeType;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(MetadataChangeType||(exports.MetadataChangeType=MetadataChangeType={}));var MetadataOperation;!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(MetadataOperation||(exports.MetadataOperation=MetadataOperation={}));var ResultType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(ResultType||(exports.ResultType=ResultType={}));var SarifJobStatus;!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",e[e.ConcurrentProcessing=5]="ConcurrentProcessing"}(SarifJobStatus||(exports.SarifJobStatus=SarifJobStatus={}));var Severity;!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"}(Severity||(exports.Severity=Severity={}));var State;!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"}(State||(exports.State=State={}));var ValidationResult;!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive",e[e.ValidationNotSupported=4]="ValidationNotSupported",e[e.TransientError=5]="TransientError"}(ValidationResult||(exports.ValidationResult=ValidationResult={}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ValidationResult=exports.State=exports.Severity=exports.SarifJobStatus=exports.ResultType=exports.MetadataOperation=exports.MetadataChangeType=exports.LicenseType=exports.LicenseState=exports.ExpandOption=exports.DismissalType=exports.DependencyKind=exports.Confidence=exports.ComponentType=exports.AutofixRequestStatus=exports.AutofixCallbackStatus=exports.AnalysisConfigurationType=exports.AlertValidityStatus=exports.AlertValidationRequestStatus=exports.AlertType=exports.AlertMetadataErrorPolicy=exports.AlertListExpandOption=void 0;var AlertListExpandOption;!function(e){e[e.None=0]="None",e[e.Minimal=1]="Minimal",e[e.Count=2]="Count"}(AlertListExpandOption||(exports.AlertListExpandOption=AlertListExpandOption={}));var AlertMetadataErrorPolicy;!function(e){e[e.Fail=1]="Fail",e[e.Omit=2]="Omit"}(AlertMetadataErrorPolicy||(exports.AlertMetadataErrorPolicy=AlertMetadataErrorPolicy={}));var AlertType;!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",e[e.AICode=5]="AICode"}(AlertType||(exports.AlertType=AlertType={}));var AlertValidationRequestStatus;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed"}(AlertValidationRequestStatus||(exports.AlertValidationRequestStatus=AlertValidationRequestStatus={}));var AlertValidityStatus;!function(e){e[e.None=0]="None",e[e.Unknown=1]="Unknown",e[e.Active=2]="Active",e[e.Inactive=3]="Inactive"}(AlertValidityStatus||(exports.AlertValidityStatus=AlertValidityStatus={}));var AnalysisConfigurationType;!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(AnalysisConfigurationType||(exports.AnalysisConfigurationType=AnalysisConfigurationType={}));var AutofixCallbackStatus;!function(e){e[e.Done=0]="Done",e[e.Failed=1]="Failed"}(AutofixCallbackStatus||(exports.AutofixCallbackStatus=AutofixCallbackStatus={}));var AutofixRequestStatus;!function(e){e[e.None=0]="None",e[e.Pending=1]="Pending",e[e.PipelineRunning=2]="PipelineRunning",e[e.Done=3]="Done",e[e.Failed=4]="Failed"}(AutofixRequestStatus||(exports.AutofixRequestStatus=AutofixRequestStatus={}));var ComponentType;!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"}(ComponentType||(exports.ComponentType=ComponentType={}));var Confidence;!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(Confidence||(exports.Confidence=Confidence={}));var DependencyKind;!function(e){e[e.Unknown=0]="Unknown",e[e.RootDependency=1]="RootDependency",e[e.Component=2]="Component",e[e.VulnerableDependency=3]="VulnerableDependency"}(DependencyKind||(exports.DependencyKind=DependencyKind={}));var DismissalType;!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"}(DismissalType||(exports.DismissalType=DismissalType={}));var ExpandOption;!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(ExpandOption||(exports.ExpandOption=ExpandOption={}));var LicenseState;!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(LicenseState||(exports.LicenseState=LicenseState={}));var LicenseType;!function(e){e[e.Unknown=0]="Unknown",e[e.Permissive=1]="Permissive",e[e.WeakCopyleft=2]="WeakCopyleft",e[e.StrongCopyleft=3]="StrongCopyleft",e[e.NetworkCopyleft=4]="NetworkCopyleft",e[e.Other=5]="Other",e[e.NoAssertion=6]="NoAssertion"}(LicenseType||(exports.LicenseType=LicenseType={}));var MetadataChangeType;!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(MetadataChangeType||(exports.MetadataChangeType=MetadataChangeType={}));var MetadataOperation;!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(MetadataOperation||(exports.MetadataOperation=MetadataOperation={}));var ResultType;!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(ResultType||(exports.ResultType=ResultType={}));var SarifJobStatus;!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",e[e.ConcurrentProcessing=5]="ConcurrentProcessing"}(SarifJobStatus||(exports.SarifJobStatus=SarifJobStatus={}));var Severity;!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"}(Severity||(exports.Severity=Severity={}));var State;!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",e[e.Draft=16]="Draft"}(State||(exports.State=State={}));var ValidationResult;!function(e){e[e.None=0]="None",e[e.Exploitable=1]="Exploitable",e[e.NotExploitable=2]="NotExploitable",e[e.Inconclusive=3]="Inconclusive",e[e.ValidationNotSupported=4]="ValidationNotSupported",e[e.TransientError=5]="TransientError"}(ValidationResult||(exports.ValidationResult=ValidationResult={}));
@@ -4,6 +4,10 @@ import * as Alert from "../Alert/Alert";
4
4
  import * as WebApi from "../WebApi/WebApi";
5
5
  export declare class AlertRestClient extends RestClientBase {
6
6
  constructor(options: IVssRestClientOptions);
7
+ /**
8
+ * @param submissionId -
9
+ */
10
+ getSarifContent(submissionId: number): Promise<any>;
7
11
  /**
8
12
  * Get an alert.
9
13
  *
@@ -51,8 +55,17 @@ export declare class AlertRestClient extends RestClientBase {
51
55
  * @param request - Request containing alert IDs and optional alert type filter
52
56
  * @param project - Project ID or project name
53
57
  * @param repository - The name or ID of the repository
58
+ * @param includeSensitiveInformation - Applies to secret alerts only. When false (the default), the 'ValidationFingerprintJson' of each secret alert's validation fingerprints is omitted from the response. Set to true to include it; be aware that the validation fingerprint JSON may contain the unencrypted secret and other sensitive data, so exercise caution when requesting it.
59
+ */
60
+ getAlertsByIds(request: Alert.AlertBatchRequest, project: string, repository: string, includeSensitiveInformation?: boolean): Promise<Alert.Alert[]>;
61
+ /**
62
+ * Batch update alert states. Internal use only — used by proof scanners to transition AI-generated draft alerts to Active or Dismissed. Alerts marked as Draft (indeterminate) are left unchanged.
63
+ *
64
+ * @param request - Request containing alert state updates
65
+ * @param project - Project ID or project name
66
+ * @param repository - The name or ID of the repository
54
67
  */
55
- getAlertsByIds(request: Alert.AlertBatchRequest, project: string, repository: string): Promise<Alert.Alert[]>;
68
+ updateAlertsBatch(request: Alert.AlertBatchStateUpdateRequest, project: string, repository: string): Promise<Alert.Alert[]>;
56
69
  /**
57
70
  * Returns the branches for which analysis results were submitted.
58
71
  *
@@ -86,16 +99,18 @@ export declare class AlertRestClient extends RestClientBase {
86
99
  * @param project - Project ID or project name
87
100
  * @param alertId - The ID of the alert to create an autofix for.
88
101
  * @param repository - The name or ID of the repository.
102
+ * @param ref - Optional Git ref (e.g. refs/heads/feature/x) the autofix should target. When omitted, the repository's default branch is used.
89
103
  */
90
- createAutofixRequest(project: string, alertId: number, repository: string): Promise<Alert.AutofixRequest>;
104
+ createAutofixRequest(project: string, alertId: number, repository: string, ref?: string): Promise<Alert.AutofixRequest>;
91
105
  /**
92
106
  * Get all autofix requests for the specified alert.
93
107
  *
94
108
  * @param project - Project ID or project name
95
109
  * @param alertId - The ID of the alert.
96
110
  * @param repository - The name or ID of the repository.
111
+ * @param ref - Optional Git ref (e.g. refs/heads/feature/x) the autofix should target. When omitted, the repository's default branch is used.
97
112
  */
98
- getAutofixRequestsByAlertId(project: string, alertId: number, repository: string): Promise<Alert.AutofixRequest[]>;
113
+ getAutofixRequestsByAlertId(project: string, alertId: number, repository: string, ref?: string): Promise<Alert.AutofixRequest[]>;
99
114
  /**
100
115
  * Upload a SARIF to GitHub Code Scanning via a GitOps app.
101
116
  *
@@ -21,6 +21,20 @@ class AlertRestClient extends RestClientBase_1.RestClientBase {
21
21
  constructor(options) {
22
22
  super(options);
23
23
  }
24
+ /**
25
+ * @param submissionId -
26
+ */
27
+ getSarifContent(submissionId) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return this.beginRequest({
30
+ apiVersion: "7.2-preview.1",
31
+ routeTemplate: "_apis/Alert/sarifs/download/{submissionId}",
32
+ routeValues: {
33
+ submissionId: submissionId
34
+ }
35
+ });
36
+ });
37
+ }
24
38
  /**
25
39
  * Get an alert.
26
40
  *
@@ -140,9 +154,13 @@ class AlertRestClient extends RestClientBase_1.RestClientBase {
140
154
  * @param request - Request containing alert IDs and optional alert type filter
141
155
  * @param project - Project ID or project name
142
156
  * @param repository - The name or ID of the repository
157
+ * @param includeSensitiveInformation - Applies to secret alerts only. When false (the default), the 'ValidationFingerprintJson' of each secret alert's validation fingerprints is omitted from the response. Set to true to include it; be aware that the validation fingerprint JSON may contain the unencrypted secret and other sensitive data, so exercise caution when requesting it.
143
158
  */
144
- getAlertsByIds(request, project, repository) {
159
+ getAlertsByIds(request, project, repository, includeSensitiveInformation) {
145
160
  return __awaiter(this, void 0, void 0, function* () {
161
+ const queryValues = {
162
+ includeSensitiveInformation: includeSensitiveInformation
163
+ };
146
164
  return this.beginRequest({
147
165
  apiVersion: "7.2-preview.1",
148
166
  method: "POST",
@@ -151,6 +169,28 @@ class AlertRestClient extends RestClientBase_1.RestClientBase {
151
169
  project: project,
152
170
  repository: repository
153
171
  },
172
+ queryParams: queryValues,
173
+ body: request
174
+ });
175
+ });
176
+ }
177
+ /**
178
+ * Batch update alert states. Internal use only — used by proof scanners to transition AI-generated draft alerts to Active or Dismissed. Alerts marked as Draft (indeterminate) are left unchanged.
179
+ *
180
+ * @param request - Request containing alert state updates
181
+ * @param project - Project ID or project name
182
+ * @param repository - The name or ID of the repository
183
+ */
184
+ updateAlertsBatch(request, project, repository) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ return this.beginRequest({
187
+ apiVersion: "7.2-preview.1",
188
+ method: "PATCH",
189
+ routeTemplate: "{project}/_apis/Alert/repositories/{repository}/AlertsBatch",
190
+ routeValues: {
191
+ project: project,
192
+ repository: repository
193
+ },
154
194
  body: request
155
195
  });
156
196
  });
@@ -239,9 +279,13 @@ class AlertRestClient extends RestClientBase_1.RestClientBase {
239
279
  * @param project - Project ID or project name
240
280
  * @param alertId - The ID of the alert to create an autofix for.
241
281
  * @param repository - The name or ID of the repository.
282
+ * @param ref - Optional Git ref (e.g. refs/heads/feature/x) the autofix should target. When omitted, the repository's default branch is used.
242
283
  */
243
- createAutofixRequest(project, alertId, repository) {
284
+ createAutofixRequest(project, alertId, repository, ref) {
244
285
  return __awaiter(this, void 0, void 0, function* () {
286
+ const queryValues = {
287
+ ref: ref
288
+ };
245
289
  return this.beginRequest({
246
290
  apiVersion: "7.2-preview.1",
247
291
  method: "POST",
@@ -251,7 +295,8 @@ class AlertRestClient extends RestClientBase_1.RestClientBase {
251
295
  alertId: alertId,
252
296
  repository: repository,
253
297
  action: "Default"
254
- }
298
+ },
299
+ queryParams: queryValues
255
300
  });
256
301
  });
257
302
  }
@@ -261,9 +306,13 @@ class AlertRestClient extends RestClientBase_1.RestClientBase {
261
306
  * @param project - Project ID or project name
262
307
  * @param alertId - The ID of the alert.
263
308
  * @param repository - The name or ID of the repository.
309
+ * @param ref - Optional Git ref (e.g. refs/heads/feature/x) the autofix should target. When omitted, the repository's default branch is used.
264
310
  */
265
- getAutofixRequestsByAlertId(project, alertId, repository) {
311
+ getAutofixRequestsByAlertId(project, alertId, repository, ref) {
266
312
  return __awaiter(this, void 0, void 0, function* () {
313
+ const queryValues = {
314
+ ref: ref
315
+ };
267
316
  return this.beginRequest({
268
317
  apiVersion: "7.2-preview.1",
269
318
  routeTemplate: "{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",
@@ -272,7 +321,8 @@ class AlertRestClient extends RestClientBase_1.RestClientBase {
272
321
  alertId: alertId,
273
322
  repository: repository,
274
323
  action: "Default"
275
- }
324
+ },
325
+ queryParams: queryValues
276
326
  });
277
327
  });
278
328
  }
@@ -1 +1 @@
1
- "use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(o,s){function a(e){try{p(i.next(e))}catch(e){s(e)}}function n(e){try{p(i.throw(e))}catch(e){s(e)}}function p(e){e.done?o(e.value):function(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(a,n)}p((i=i.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AlertRestClient=void 0;const RestClientBase_1=require("../Common/RestClientBase"),Serialization_1=require("../Common/Util/Serialization");class AlertRestClient extends RestClientBase_1.RestClientBase{constructor(e){super(e)}getAlert(e,t,r,i,o){return __awaiter(this,void 0,void 0,function*(){const s={ref:i,expand:o};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:s})})}getAlerts(e,t,r,i,o,s,a){return __awaiter(this,void 0,void 0,function*(){const n={top:r,orderBy:i,criteria:o,expand:s,continuationToken:a};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:n,returnRawResponse:!0}).then(e=>__awaiter(this,void 0,void 0,function*(){const t=yield e.text().then(Serialization_1.deserializeVssJsonObject);return t.continuationToken=e.headers.get("x-ms-continuationtoken"),t}))})}getAlertSarif(e,t,r,i,o){return __awaiter(this,void 0,void 0,function*(){const s={ref:i,expand:o};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:s})})}updateAlert(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:t,alertId:r,repository:i},body:e})})}getAlertsByIds(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/AlertsBatch",routeValues:{project:t,repository:r},body:e})})}getBranches(e,t,r,i,o,s,a){return __awaiter(this,void 0,void 0,function*(){const n={alertType:r,continuationToken:i,branchNameContains:o,top:s,includePullRequestBranches:a};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Branches"},queryParams:n})})}getUxFilters(e,t,r){return __awaiter(this,void 0,void 0,function*(){const i={alertType:r};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Default"},queryParams:i})})}autofixCallback(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",routeValues:{project:t,repository:r,alertId:i,action:"Callback"},body:e})})}createAutofixRequest(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",routeValues:{project:e,alertId:t,repository:r,action:"Default"}})})}getAutofixRequestsByAlertId(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",routeValues:{project:e,alertId:t,repository:r,action:"Default"}})})}uploadSarifToGitHub(e,t,r,i,o){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/github/{hostname}/{owner}/{repo}/sarifs",routeValues:{project:t,hostname:r,owner:i,repo:o},customHeaders:{"Content-Type":"application/octet-stream"},body:e})})}getAlertInstances(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={ref:i};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:o})})}createLegalReview(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={alertId:r,ref:i};return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:e,repository:t},queryParams:o})})}updateAlertsMetadata(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:t,repository:r},body:e})})}getAlertMetadata(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/metadata",routeValues:{project:e,alertId:t,repository:r}})})}getAlertMetadataBatch(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/MetadataBatch",routeValues:{project:t,repository:r},body:e})})}getOrgLevelAlertsByIds(e){return __awaiter(this,void 0,void 0,function*(){const t={alertIds:e&&e.join(",")};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/alerts",queryParams:t})})}deleteAllPipelineAnalyses(e,t){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/pipelineAnalyses",routeValues:{project:e,repository:t}})})}deletePipelineAnalysis(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/pipelineAnalysis/{adoPipelineId}",routeValues:{project:e,repository:t,adoPipelineId:r}})})}exportSarif(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={alertIds:r,branchName:i};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/sarifs",routeValues:{project:e,repository:t},queryParams:o})})}uploadSarif(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){return 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":i},body:e})})}getSarif(e){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})})}uploadOrgSarif(e){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",customHeaders:{"Content-Type":"application/octet-stream"},body:e})})}getValidityData(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})})}initiateValidation(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})})}}exports.AlertRestClient=AlertRestClient;
1
+ "use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(o,s){function a(e){try{p(i.next(e))}catch(e){s(e)}}function n(e){try{p(i.throw(e))}catch(e){s(e)}}function p(e){e.done?o(e.value):function(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(a,n)}p((i=i.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AlertRestClient=void 0;const RestClientBase_1=require("../Common/RestClientBase"),Serialization_1=require("../Common/Util/Serialization");class AlertRestClient extends RestClientBase_1.RestClientBase{constructor(e){super(e)}getSarifContent(e){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/sarifs/download/{submissionId}",routeValues:{submissionId:e}})})}getAlert(e,t,r,i,o){return __awaiter(this,void 0,void 0,function*(){const s={ref:i,expand:o};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:s})})}getAlerts(e,t,r,i,o,s,a){return __awaiter(this,void 0,void 0,function*(){const n={top:r,orderBy:i,criteria:o,expand:s,continuationToken:a};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,repository:t},queryParams:n,returnRawResponse:!0}).then(e=>__awaiter(this,void 0,void 0,function*(){const t=yield e.text().then(Serialization_1.deserializeVssJsonObject);return t.continuationToken=e.headers.get("x-ms-continuationtoken"),t}))})}getAlertSarif(e,t,r,i,o){return __awaiter(this,void 0,void 0,function*(){const s={ref:i,expand:o};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:e,alertId:t,repository:r},queryParams:s})})}updateAlert(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}",routeValues:{project:t,alertId:r,repository:i},body:e})})}getAlertsByIds(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={includeSensitiveInformation:i};return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/AlertsBatch",routeValues:{project:t,repository:r},queryParams:o,body:e})})}updateAlertsBatch(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/AlertsBatch",routeValues:{project:t,repository:r},body:e})})}getBranches(e,t,r,i,o,s,a){return __awaiter(this,void 0,void 0,function*(){const n={alertType:r,continuationToken:i,branchNameContains:o,top:s,includePullRequestBranches:a};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Branches"},queryParams:n})})}getUxFilters(e,t,r){return __awaiter(this,void 0,void 0,function*(){const i={alertType:r};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/filters/{action}",routeValues:{project:e,repository:t,action:"Default"},queryParams:i})})}autofixCallback(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",routeValues:{project:t,repository:r,alertId:i,action:"Callback"},body:e})})}createAutofixRequest(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={ref:i};return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",routeValues:{project:e,alertId:t,repository:r,action:"Default"},queryParams:o})})}getAutofixRequestsByAlertId(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={ref:i};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Autofix/{action}",routeValues:{project:e,alertId:t,repository:r,action:"Default"},queryParams:o})})}uploadSarifToGitHub(e,t,r,i,o){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/github/{hostname}/{owner}/{repo}/sarifs",routeValues:{project:t,hostname:r,owner:i,repo:o},customHeaders:{"Content-Type":"application/octet-stream"},body:e})})}getAlertInstances(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={ref:i};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Instances",routeValues:{project:e,alertId:t,repository:r},queryParams:o})})}createLegalReview(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={alertId:r,ref:i};return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:e,repository:t},queryParams:o})})}updateAlertsMetadata(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/Metadata",routeValues:{project:t,repository:r},body:e})})}getAlertMetadata(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/metadata",routeValues:{project:e,alertId:t,repository:r}})})}getAlertMetadataBatch(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/MetadataBatch",routeValues:{project:t,repository:r},body:e})})}getOrgLevelAlertsByIds(e){return __awaiter(this,void 0,void 0,function*(){const t={alertIds:e&&e.join(",")};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/Alert/alerts",queryParams:t})})}deleteAllPipelineAnalyses(e,t){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/pipelineAnalyses",routeValues:{project:e,repository:t}})})}deletePipelineAnalysis(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/pipelineAnalysis/{adoPipelineId}",routeValues:{project:e,repository:t,adoPipelineId:r}})})}exportSarif(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){const o={alertIds:r,branchName:i};return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/sarifs",routeValues:{project:e,repository:t},queryParams:o})})}uploadSarif(e,t,r,i){return __awaiter(this,void 0,void 0,function*(){return 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":i},body:e})})}getSarif(e){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",routeValues:{sarifId:e}})})}uploadOrgSarif(e){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"_apis/Alert/Sarifs/{sarifId}",customHeaders:{"Content-Type":"application/octet-stream"},body:e})})}getValidityData(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})})}initiateValidation(e,t,r){return __awaiter(this,void 0,void 0,function*(){return this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/Alert/repositories/{repository}/alerts/{alertId}/Validate",routeValues:{project:e,repository:t,alertId:r}})})}}exports.AlertRestClient=AlertRestClient;
package/Build/Build.d.ts CHANGED
@@ -2142,33 +2142,33 @@ export interface PipelineTriggerSettings {
2142
2142
  */
2143
2143
  buildsEnabledForForks: boolean;
2144
2144
  /**
2145
- * Enforce job auth scope for builds of forked repositories.
2145
+ * The comment trigger option for pull requests from forks.
2146
2146
  */
2147
- enforceJobAuthScopeForForks: boolean;
2147
+ commentOptionForks: CommentTriggerOption;
2148
2148
  /**
2149
- * Enforce no access to secrets for builds of forked repositories.
2149
+ * The comment trigger option for repository-internal pull requests.
2150
2150
  */
2151
- enforceNoAccessToSecretsFromForks: boolean;
2151
+ commentOptionInternalRepos: CommentTriggerOption;
2152
2152
  /**
2153
- * The comment trigger option for pull requests from forks.
2153
+ * Enforce job auth scope for builds of forked repositories.
2154
2154
  */
2155
- forkCommentOption: CommentTriggerOption;
2155
+ enforceJobAuthScopeForForks: boolean;
2156
2156
  /**
2157
- * Make comments required to have builds in pull requests from forks.
2157
+ * Enforce no access to secrets for builds of forked repositories.
2158
2158
  */
2159
- forkIsCommentRequiredForPullRequest: boolean;
2159
+ enforceNoAccessToSecretsFromForks: boolean;
2160
2160
  /**
2161
2161
  * Enable settings that enforce certain levels of protection for building pull requests from forks globally.
2162
2162
  */
2163
2163
  forkProtectionEnabled: boolean;
2164
2164
  /**
2165
- * The comment trigger option for repository-internal pull requests.
2165
+ * Make comments required to have builds in pull requests from forks.
2166
2166
  */
2167
- internalRepoCommentOption: CommentTriggerOption;
2167
+ isCommentRequiredForForkedPullRequests: boolean;
2168
2168
  /**
2169
2169
  * Make comments required to have builds in repository-internal pull requests.
2170
2170
  */
2171
- internalRepoIsCommentRequiredForPullRequest: boolean;
2171
+ isCommentRequiredForInternalRepoPRs: boolean;
2172
2172
  /**
2173
2173
  * [Deprecated] Make comments required to have builds in all pull requests.
2174
2174
  */
@@ -2279,11 +2279,11 @@ export interface PullRequestTrigger extends BuildTrigger {
2279
2279
  */
2280
2280
  autoCancel: boolean;
2281
2281
  branchFilters: string[];
2282
- forkCommentOption: CommentTriggerOption;
2283
- forkIsCommentRequiredForPullRequest: boolean;
2282
+ commentOptionForks: CommentTriggerOption;
2283
+ commentOptionInternalRepos: CommentTriggerOption;
2284
2284
  forks: Forks;
2285
- internalRepoCommentOption: CommentTriggerOption;
2286
- internalRepoIsCommentRequiredForPullRequest: boolean;
2285
+ isCommentRequiredForForkedPullRequests: boolean;
2286
+ isCommentRequiredForInternalRepoPRs: boolean;
2287
2287
  isCommentRequiredForPullRequest: boolean;
2288
2288
  pathFilters: string[];
2289
2289
  pipelineTriggerSettings: PipelineTriggerSettings;
@@ -2911,6 +2911,10 @@ export interface TimelineAttempt {
2911
2911
  * Gets or sets the record identifier located within the specified timeline.
2912
2912
  */
2913
2913
  recordId: string;
2914
+ /**
2915
+ * Gets or sets the identity that requested this attempt. For the initial attempt this is typically the build orchestration service identity; for re-run attempts this is the user that initiated the retry.
2916
+ */
2917
+ requestedBy: WebApi.IdentityRef;
2914
2918
  /**
2915
2919
  * Gets or sets the timeline identifier which owns the record representing this attempt.
2916
2920
  */
package/Git/Git.d.ts CHANGED
@@ -586,7 +586,7 @@ export interface CreateMigrationRequest {
586
586
  */
587
587
  gitHubUserToken: string;
588
588
  /**
589
- * Optional. The ID of a GitHub Enterprise service connection to use for pipeline rewiring. May be supplied at create time or attached later via PUT /pipelines. When EnableAutoDiscoverPipelines is opted in but no connection is attached, auto-discovery and clone-definition creation no-op during sync, and cutover is blocked by the cutover-readiness check until a connection is attached.
589
+ * Optional. The ID of a GitHub Enterprise service connection to use for pipeline rewiring. May be supplied at create time or attached later via PUT /pipelines. Required at create time when EnableAutoDiscoverPipelines is opted in: a create request that enables auto-discovery without a pipeline service connection is rejected with HTTP 400.
590
590
  */
591
591
  pipelineServiceConnectionId: string;
592
592
  /**
@@ -737,6 +737,22 @@ export interface FileDiff {
737
737
  * Provides properties that describe detailed file differences including line content
738
738
  */
739
739
  export interface FileDiffDetail {
740
+ /**
741
+ * The type of change (add, delete, rename, edit, etc.)
742
+ */
743
+ changeType: VersionControlChangeType;
744
+ /**
745
+ * Whether the item is a folder.
746
+ */
747
+ isFolder: boolean;
748
+ /**
749
+ * Whether the item has the Linux executable bit set.
750
+ */
751
+ isLinuxExecutable: boolean;
752
+ /**
753
+ * Whether the item is a symbolic link.
754
+ */
755
+ isSymbolicLink: boolean;
740
756
  /**
741
757
  * The collection of detailed line diff blocks
742
758
  */
@@ -121,7 +121,11 @@ export declare enum AlertType {
121
121
  /**
122
122
  * The code uses a dependency with potential license incompliance.
123
123
  */
124
- License = 4
124
+ License = 4,
125
+ /**
126
+ * The code contains a weakness determined by AI-powered analysis.
127
+ */
128
+ AICode = 5
125
129
  }
126
130
  /**
127
131
  * Billable Committers Details for Advanced Security Services
@@ -28,6 +28,10 @@ var AlertType;
28
28
  * The code uses a dependency with potential license incompliance.
29
29
  */
30
30
  AlertType[AlertType["License"] = 4] = "License";
31
+ /**
32
+ * The code contains a weakness determined by AI-powered analysis.
33
+ */
34
+ AlertType[AlertType["AICode"] = 5] = "AICode";
31
35
  })(AlertType || (exports.AlertType = AlertType = {}));
32
36
  var Plan;
33
37
  (function (Plan) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Plan=exports.AlertType=void 0;var AlertType;!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"}(AlertType||(exports.AlertType=AlertType={}));var Plan;!function(e){e[e.None=0]="None",e[e.CodeSecurity=1]="CodeSecurity",e[e.SecretProtection=2]="SecretProtection",e[e.All=3]="All"}(Plan||(exports.Plan=Plan={}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Plan=exports.AlertType=void 0;var AlertType;!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",e[e.AICode=5]="AICode"}(AlertType||(exports.AlertType=AlertType={}));var Plan;!function(e){e[e.None=0]="None",e[e.CodeSecurity=1]="CodeSecurity",e[e.SecretProtection=2]="SecretProtection",e[e.All=3]="All"}(Plan||(exports.Plan=Plan={}));
@@ -2697,7 +2697,7 @@ export interface TaskAgentSkuUsageSummaryQuery {
2697
2697
  */
2698
2698
  queueId: number;
2699
2699
  /**
2700
- * Optional: narrow results to a specific project before grouping. Typically used when drilling down from pool → project, with GroupBy set to DefinitionId to see pipelines within that project.
2700
+ * Optional: narrow results to a specific project before grouping. Typically used when drilling down from pool to project, with GroupBy set to DefinitionId to see pipelines within that project.
2701
2701
  */
2702
2702
  scopeIdentifier: string;
2703
2703
  /**
@@ -2713,6 +2713,10 @@ export interface TaskAgentSkuUsageSummaryQuery {
2713
2713
  * Result of a SKU usage query. Contains the original query and the ranked usage rows.
2714
2714
  */
2715
2715
  export interface TaskAgentSkuUsageSummaryResult {
2716
+ /**
2717
+ * Freshness marker on the result: jobs that finished after this moment are not yet reflected in Usages.
2718
+ */
2719
+ lastBilledAt: Date;
2716
2720
  /**
2717
2721
  * The query that produced this result.
2718
2722
  */
@@ -2763,6 +2767,10 @@ export interface TaskAgentSkuUsageTrendQuery {
2763
2767
  * Result of a SKU usage trend query. Contains the original query and the daily usage data points.
2764
2768
  */
2765
2769
  export interface TaskAgentSkuUsageTrendResult {
2770
+ /**
2771
+ * Freshness marker on the result: jobs that finished after this moment are not yet reflected in Points.
2772
+ */
2773
+ lastBilledAt: Date;
2766
2774
  /**
2767
2775
  * Usage data points, ordered by date ascending. Buckets with no usage are not included.
2768
2776
  */
package/Test/Test.d.ts CHANGED
@@ -1589,10 +1589,18 @@ export interface PipelineDebuggerResponse {
1589
1589
  * When the analysis has already completed for this build, contains the cached result so the caller does not need a separate GET request. Null when the job is newly queued or still in progress.
1590
1590
  */
1591
1591
  analysisResult: PipelineDebuggerAnalysisOutput;
1592
+ /**
1593
+ * GitHub OAuth authorization URL. Present only when NeedsAuth is true.
1594
+ */
1595
+ authUrl: string;
1592
1596
  /**
1593
1597
  * Human-readable status message (e.g. "queued successfully", "already running", or "Analysis already completed").
1594
1598
  */
1595
1599
  message: string;
1600
+ /**
1601
+ * True when the user needs to authorize the GitHub Copilot app before analysis can proceed. The client should open a popup to AuthUrl and retry after authorization completes.
1602
+ */
1603
+ needsAuth: boolean;
1596
1604
  }
1597
1605
  /**
1598
1606
  * Pipeline reference
@@ -2912,11 +2920,17 @@ export interface TestActionResultModel extends TestResultModelBase {
2912
2920
  url: string;
2913
2921
  }
2914
2922
  export interface TestAgentCallbackRequest {
2923
+ buildId: number;
2924
+ resultPayload: string;
2915
2925
  success: boolean;
2916
2926
  task: string;
2917
2927
  workItemId: number;
2918
2928
  }
2919
2929
  export interface TestAgentTriggerRequest {
2930
+ branchName: string;
2931
+ configJsonPath: string;
2932
+ repoName: string;
2933
+ scriptFolderName: string;
2920
2934
  task: string;
2921
2935
  workItemId: number;
2922
2936
  }