azure-devops-extension-api 5.275.0 → 5.279.1

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 (76) hide show
  1. package/AdvancedSecurity.Reporting/Reporting.d.ts +81 -2
  2. package/AdvancedSecurity.Reporting/Reporting.js +4 -0
  3. package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  4. package/Alert/Alert.d.ts +244 -9
  5. package/Alert/Alert.js +124 -1
  6. package/Alert/Alert.min.js +1 -1
  7. package/Alert/AlertClient.d.ts +76 -12
  8. package/Alert/AlertClient.js +205 -23
  9. package/Alert/AlertClient.min.js +1 -1
  10. package/Build/Build.d.ts +29 -0
  11. package/Build/Build.js +19 -1
  12. package/Build/Build.min.js +1 -1
  13. package/Gallery/Gallery.d.ts +46 -0
  14. package/Gallery/Gallery.js +11 -1
  15. package/Gallery/Gallery.min.js +1 -1
  16. package/Gallery/GalleryClient.d.ts +14 -0
  17. package/Gallery/GalleryClient.js +48 -0
  18. package/Gallery/GalleryClient.min.js +1 -1
  19. package/Git/Git.d.ts +2 -22
  20. package/Git/GitClient.d.ts +10 -3
  21. package/Git/GitClient.js +23 -3
  22. package/Git/GitClient.min.js +1 -1
  23. package/Management/Management.d.ts +38 -2
  24. package/Management/Management.js +4 -0
  25. package/Management/Management.min.js +1 -1
  26. package/ServiceHooks/ServiceHooks.d.ts +1 -1
  27. package/TaskAgent/TaskAgent.d.ts +2 -0
  28. package/Test/Test.d.ts +106 -56
  29. package/TestResults/TestResultsClient.d.ts +86 -20
  30. package/TestResults/TestResultsClient.js +226 -55
  31. package/TestResults/TestResultsClient.min.js +1 -1
  32. package/Tfvc/Tfvc.d.ts +54 -0
  33. package/Tfvc/Tfvc.js +57 -1
  34. package/Tfvc/Tfvc.min.js +1 -1
  35. package/Wiki/Wiki.d.ts +17 -0
  36. package/Wiki/WikiClient.d.ts +8 -0
  37. package/Wiki/WikiClient.js +23 -0
  38. package/Wiki/WikiClient.min.js +1 -1
  39. package/WorkItemTracking/WorkItemTracking.d.ts +48 -0
  40. package/WorkItemTracking/WorkItemTracking.js +11 -1
  41. package/WorkItemTracking/WorkItemTracking.min.js +1 -1
  42. package/esm/AdvancedSecurity.Reporting/Reporting.js +4 -0
  43. package/esm/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  44. package/esm/Alert/Alert.js +123 -0
  45. package/esm/Alert/Alert.min.js +1 -1
  46. package/esm/Alert/AlertClient.js +190 -22
  47. package/esm/Alert/AlertClient.min.js +1 -1
  48. package/esm/Build/Build.js +18 -0
  49. package/esm/Build/Build.min.js +1 -1
  50. package/esm/Gallery/Gallery.js +10 -0
  51. package/esm/Gallery/Gallery.min.js +1 -1
  52. package/esm/Gallery/GalleryClient.js +42 -0
  53. package/esm/Gallery/GalleryClient.min.js +1 -1
  54. package/esm/Git/GitClient.js +21 -3
  55. package/esm/Git/GitClient.min.js +1 -1
  56. package/esm/Management/Management.js +4 -0
  57. package/esm/Management/Management.min.js +1 -1
  58. package/esm/TestResults/TestResultsClient.js +208 -49
  59. package/esm/TestResults/TestResultsClient.min.js +1 -1
  60. package/esm/Tfvc/Tfvc.js +56 -0
  61. package/esm/Tfvc/Tfvc.min.js +1 -1
  62. package/esm/Wiki/WikiClient.js +21 -0
  63. package/esm/Wiki/WikiClient.min.js +1 -1
  64. package/esm/WorkItemTracking/WorkItemTracking.js +10 -0
  65. package/esm/WorkItemTracking/WorkItemTracking.min.js +1 -1
  66. package/package.json +1 -1
  67. package/_manifest/comparison-result.json +0 -40
  68. package/_manifest/spdx_2.2/ESRPClientLogs0716164721553.json +0 -1
  69. package/_manifest/spdx_2.2/bsi.cose +0 -0
  70. package/_manifest/spdx_2.2/bsi.json +0 -1
  71. package/_manifest/spdx_2.2/manifest.cat +0 -0
  72. package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
  73. package/_manifest/spdx_2.2/manifest.spdx.json +0 -1
  74. package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +0 -1
  75. package/_manifest/spdx_3.0/manifest.spdx.json +0 -1
  76. package/_manifest/spdx_3.0/manifest.spdx.json.sha256 +0 -1
package/Test/Test.d.ts CHANGED
@@ -253,6 +253,19 @@ export interface BatchResponse {
253
253
  responses: Response[];
254
254
  status: string;
255
255
  }
256
+ /**
257
+ * A TestAttachment enriched with the dedup storage coordinates needed to download the content directly from BlobStore. Returned only by the internal BlobStore attachment-metadata query; the coordinates live on this derived type so the base TestAttachment contract is unchanged.
258
+ */
259
+ export interface BlobStoreTestAttachment extends TestAttachment {
260
+ /**
261
+ * VsoHash dedup id (BlobIdentifier.ValueString) of the stored content.
262
+ */
263
+ dedupId: string;
264
+ /**
265
+ * Dedup domain (ShardSet / ContainerSet) id the content was published to.
266
+ */
267
+ domainId: string;
268
+ }
256
269
  export interface BranchCoverageStatistics {
257
270
  /**
258
271
  * number of covered branches
@@ -1546,62 +1559,6 @@ export interface PhaseReference {
1546
1559
  */
1547
1560
  phaseName: string;
1548
1561
  }
1549
- /**
1550
- * Lightweight output for pipeline debugger AI analysis.
1551
- */
1552
- export interface PipelineDebuggerAnalysisOutput {
1553
- /**
1554
- * Failure category (e.g., "Infrastructure", "Code", "Configuration").
1555
- */
1556
- category: string;
1557
- /**
1558
- * Prevention strategies suggested by AI.
1559
- */
1560
- prevention: string;
1561
- /**
1562
- * Recommended fix provided by AI.
1563
- */
1564
- recommendedFix: string;
1565
- /**
1566
- * Root cause identified by AI.
1567
- */
1568
- rootCause: string;
1569
- }
1570
- export interface PipelineDebuggerJobState {
1571
- /**
1572
- * Error message. Populated when state is "Failed".
1573
- */
1574
- error: string;
1575
- /**
1576
- * The analysis result. Populated when state is "Completed".
1577
- */
1578
- result: PipelineDebuggerAnalysisOutput;
1579
- /**
1580
- * Job state: Queued, Completed, or Failed.
1581
- */
1582
- state: string;
1583
- }
1584
- /**
1585
- * Response DTO returned by the pipeline debugger POST endpoint.
1586
- */
1587
- export interface PipelineDebuggerResponse {
1588
- /**
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
- */
1591
- analysisResult: PipelineDebuggerAnalysisOutput;
1592
- /**
1593
- * GitHub OAuth authorization URL. Present only when NeedsAuth is true.
1594
- */
1595
- authUrl: string;
1596
- /**
1597
- * Human-readable status message (e.g. "queued successfully", "already running", or "Analysis already completed").
1598
- */
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;
1604
- }
1605
1562
  /**
1606
1563
  * Pipeline reference
1607
1564
  */
@@ -2929,6 +2886,7 @@ export interface TestAgentCallbackRequest {
2929
2886
  export interface TestAgentTriggerRequest {
2930
2887
  branchName: string;
2931
2888
  configJsonPath: string;
2889
+ pullRequestId: number;
2932
2890
  repoName: string;
2933
2891
  scriptFolderName: string;
2934
2892
  task: string;
@@ -2995,6 +2953,35 @@ export interface TestAttachment {
2995
2953
  */
2996
2954
  url: string;
2997
2955
  }
2956
+ /**
2957
+ * Request model used by the pipeline agent to register a test attachment whose content has already been uploaded by the caller. Unlike TestAttachmentRequestModel this model carries no file bytes -- only the metadata required to persist a \<c\>tbl_LogStoreAttachmentMapper\</c\> row.
2958
+ */
2959
+ export interface TestAttachmentMetadataRequestModel {
2960
+ /**
2961
+ * Attachment type. Defaults to GeneralAttachment.
2962
+ */
2963
+ attachmentType: string;
2964
+ /**
2965
+ * Comment associated with the attachment.
2966
+ */
2967
+ comment: string;
2968
+ /**
2969
+ * VsoHash BlobIdentifier value (\<c\>BlobIdentifier.ValueString\</c\>) of the content already published to BlobStore dedup storage by the agent. Required -- the server rejects the request when it is null or empty.
2970
+ */
2971
+ dedupId: string;
2972
+ /**
2973
+ * Optional id of the BlobStore dedup domain (ShardSet / ContainerSet) the content was published to. Reserved for the read path to resolve the correct dedup domain; not persisted yet, so it may be omitted.
2974
+ */
2975
+ domainId: string;
2976
+ /**
2977
+ * Attachment filename.
2978
+ */
2979
+ fileName: string;
2980
+ /**
2981
+ * Size in bytes of the stored content, as reported by the BlobStore publish result.
2982
+ */
2983
+ length: number;
2984
+ }
2998
2985
  /**
2999
2986
  * Reference to test attachment.
3000
2987
  */
@@ -3029,6 +3016,23 @@ export interface TestAttachmentRequestModel {
3029
3016
  */
3030
3017
  stream: string;
3031
3018
  }
3019
+ /**
3020
+ * Response of the pre-flight endpoint the agent calls before publishing an attachment directly to BlobStore dedup storage: it confirms the caller is authorized and returns where to publish.
3021
+ */
3022
+ export interface TestAttachmentUploadDetails {
3023
+ /**
3024
+ * Dedup domain (ShardSet) id to publish the content to. Populated only when enabled.
3025
+ */
3026
+ domainId: string;
3027
+ /**
3028
+ * Whether direct-to-BlobStore upload is enabled for this run; if false, use the classic (SAS) path.
3029
+ */
3030
+ isBlobStoreUploadEnabled: boolean;
3031
+ /**
3032
+ * The test run these details apply to.
3033
+ */
3034
+ testRunId: number;
3035
+ }
3032
3036
  export interface TestAuthoringDetails {
3033
3037
  configurationId: number;
3034
3038
  isAutomated: boolean;
@@ -3074,6 +3078,52 @@ export interface TestCaseFlakinessBranchInfo {
3074
3078
  */
3075
3079
  testCaseTitle: string;
3076
3080
  }
3081
+ /**
3082
+ * The latest execution result for a single TestCaseId, returned by the batch "latest result per test case" API (POST testresults/results/latestresults). One instance is returned per requested TestCaseId that has at least one result in a non-deleted run; test cases that were never executed are omitted from the response.
3083
+ */
3084
+ export interface TestCaseLatestResult {
3085
+ /**
3086
+ * Configuration that ran most recently for this test case.
3087
+ */
3088
+ configurationId: number;
3089
+ /**
3090
+ * When the result completed. Null for in-progress results.
3091
+ */
3092
+ dateCompleted: Date;
3093
+ /**
3094
+ * When the result started. May be null.
3095
+ */
3096
+ dateStarted: Date;
3097
+ /**
3098
+ * The factual last execution outcome (e.g. "Passed", "Failed", "NotExecuted", "Blocked"). This is the stored result outcome and is not subject to ResetToActive suppression.
3099
+ */
3100
+ outcome: string;
3101
+ /**
3102
+ * Id of the latest result within the run.
3103
+ */
3104
+ resultId: number;
3105
+ /**
3106
+ * Id of the run that contains the latest result.
3107
+ */
3108
+ runId: number;
3109
+ /**
3110
+ * The requested TestCaseId (work item id) this result belongs to.
3111
+ */
3112
+ testCaseId: number;
3113
+ /**
3114
+ * Test point via which the latest result ran.
3115
+ */
3116
+ testPointId: number;
3117
+ }
3118
+ /**
3119
+ * Request body for the batch "latest result per test case" API (POST testresults/results/latestresults). Carries the set of TestCaseIds (work item ids) for which the most recent execution outcome is required.
3120
+ */
3121
+ export interface TestCaseLatestResultsQuery {
3122
+ /**
3123
+ * The TestCaseIds (work item ids) to fetch the latest result for. Must contain at least one id and at most the server-configured batch ceiling; requests outside this range are rejected with HTTP 400.
3124
+ */
3125
+ testCaseIds: number[];
3126
+ }
3077
3127
  export interface TestCaseMetadata2 {
3078
3128
  container: string;
3079
3129
  name: string;
@@ -146,6 +146,76 @@ export declare class TestResultsRestClient extends RestClientBase {
146
146
  * @param attachmentId -
147
147
  */
148
148
  getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise<ArrayBuffer>;
149
+ /**
150
+ * Registers metadata for a result-level test attachment whose content has already been uploaded to dedup storage by the caller. The request carries only the attachment metadata (dedup id, size, file name, type etc) and no file bytes.
151
+ *
152
+ * @param attachmentMetadataRequestModel -
153
+ * @param project - Project ID or project name
154
+ * @param runId -
155
+ * @param testCaseResultId -
156
+ */
157
+ createTestResultAttachmentMetadata(attachmentMetadataRequestModel: Test.TestAttachmentMetadataRequestModel, project: string, runId: number, testCaseResultId: number): Promise<Test.TestAttachmentReference>;
158
+ /**
159
+ * Registers metadata for a sub-result-level test attachment whose content has already been uploaded to dedup storage by the caller. The request carries only the attachment metadata (dedup id, size, file name, type etc) and no file bytes.
160
+ *
161
+ * @param attachmentMetadataRequestModel -
162
+ * @param project - Project ID or project name
163
+ * @param runId -
164
+ * @param testCaseResultId -
165
+ * @param testSubResultId -
166
+ */
167
+ createTestSubResultAttachmentMetadata(attachmentMetadataRequestModel: Test.TestAttachmentMetadataRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise<Test.TestAttachmentReference>;
168
+ /**
169
+ * Returns metadata for the result-level BlobStore-backed test attachments whose file name starts with fileNamePrefix, or the single attachment identified by attachmentId when it is supplied.
170
+ *
171
+ * @param project - Project ID or project name
172
+ * @param runId -
173
+ * @param testCaseResultId -
174
+ * @param attachmentType -
175
+ * @param fileNamePrefix -
176
+ * @param attachmentId -
177
+ * @param fetchMetaData -
178
+ */
179
+ queryTestResultAttachmentsMetadata(project: string, runId: number, testCaseResultId: number, attachmentType?: string, fileNamePrefix?: string, attachmentId?: number, fetchMetaData?: boolean): Promise<Test.BlobStoreTestAttachment[]>;
180
+ /**
181
+ * Returns metadata for the sub-result-level BlobStore-backed test attachments whose file name starts with fileNamePrefix, or the single attachment identified by attachmentId when it is supplied.
182
+ *
183
+ * @param project - Project ID or project name
184
+ * @param runId -
185
+ * @param testCaseResultId -
186
+ * @param testSubResultId -
187
+ * @param attachmentType -
188
+ * @param fileNamePrefix -
189
+ * @param attachmentId -
190
+ * @param fetchMetaData -
191
+ */
192
+ queryTestSubResultAttachmentsMetadata(project: string, runId: number, testCaseResultId: number, testSubResultId: number, attachmentType?: string, fileNamePrefix?: string, attachmentId?: number, fetchMetaData?: boolean): Promise<Test.BlobStoreTestAttachment[]>;
193
+ /**
194
+ * Registers metadata for a run-level test attachment whose content has already been uploaded to dedup storage by the caller. The request carries only the attachment metadata (dedup id, size, file name, type etc) and no file bytes.
195
+ *
196
+ * @param attachmentMetadataRequestModel -
197
+ * @param project - Project ID or project name
198
+ * @param runId -
199
+ */
200
+ createTestRunAttachmentMetadata(attachmentMetadataRequestModel: Test.TestAttachmentMetadataRequestModel, project: string, runId: number): Promise<Test.TestAttachmentReference>;
201
+ /**
202
+ * Returns metadata for the run-level BlobStore-backed test attachments whose file name starts with fileNamePrefix, or the single attachment identified by attachmentId when it is supplied. The agent uses this to enumerate BlobStore (dedup) test logs, which are not present in the classic LogStore SAS container and so cannot be listed by the agent directly.
203
+ *
204
+ * @param project - Project ID or project name
205
+ * @param runId -
206
+ * @param attachmentType -
207
+ * @param fileNamePrefix -
208
+ * @param attachmentId -
209
+ * @param fetchMetaData -
210
+ */
211
+ queryTestRunAttachmentsMetadata(project: string, runId: number, attachmentType?: string, fileNamePrefix?: string, attachmentId?: number, fetchMetaData?: boolean): Promise<Test.BlobStoreTestAttachment[]>;
212
+ /**
213
+ * Pre-flight for a direct-to-BlobStore run attachment upload: enforces publish permission and returns the dedup domain to publish to. The agent calls this before uploading any bytes.
214
+ *
215
+ * @param project - Project ID or project name
216
+ * @param runId -
217
+ */
218
+ getTestRunAttachmentUploadDetails(project: string, runId: number): Promise<Test.TestAttachmentUploadDetails>;
149
219
  /**
150
220
  * @param project - Project ID or project name
151
221
  * @param runId -
@@ -257,6 +327,13 @@ export declare class TestResultsRestClient extends RestClientBase {
257
327
  * @param project - Project ID or project name
258
328
  */
259
329
  queryTestResultHistory(filter: Test.ResultsFilter, project: string): Promise<Test.TestResultHistory>;
330
+ /**
331
+ * Get the latest result for each requested TestCaseId. Test cases that were never executed (no result in a non-deleted run) are omitted from the response - the caller treats their absence as "never run".
332
+ *
333
+ * @param query - TestCaseLatestResultsQuery carrying the TestCaseIds to look up.
334
+ * @param project - Project ID or project name
335
+ */
336
+ getLatestTestResultsByTestCaseIds(query: Test.TestCaseLatestResultsQuery, project: string): Promise<Test.TestCaseLatestResult[]>;
260
337
  /**
261
338
  * Get test run message logs
262
339
  *
@@ -277,27 +354,8 @@ export declare class TestResultsRestClient extends RestClientBase {
277
354
  */
278
355
  getTestPipelineMetrics(project: string, pipelineId: number, stageName?: string, phaseName?: string, jobName?: string, metricNames?: Test.Metrics[], groupByNode?: boolean): Promise<Test.PipelineTestMetrics>;
279
356
  /**
280
- * Callback endpoint invoked by ADOTestAgent when pipeline debug analysis completes. Writes the result to blob storage and fires a SignalR notification to the UI.
357
+ * Get a summary of test results for a build. To fetch the full TestCaseResult, call Results - Get.
281
358
  *
282
- * @param request -
283
- * @param project - Project ID or project name
284
- */
285
- completeAnalysisJob(request: Test.TestAgentCallbackRequest, project: string): Promise<boolean>;
286
- /**
287
- * Retrieves the AI analysis result for a given build. Downloads the analysis JSON from the TCM Log Store (Azure Blob Storage) where it was uploaded by PipelineDebuggerJob upon completion.
288
- *
289
- * @param project - Project ID or project name
290
- * @param buildId - Build ID that was analyzed
291
- */
292
- getAnalysisResult(project: string, buildId: number): Promise<Test.PipelineDebuggerResponse>;
293
- /**
294
- * Queues a pipeline analysis job to analyze failed pipeline jobs using AI.
295
- *
296
- * @param project - Project ID or project name
297
- * @param buildId - Build ID to analyze
298
- */
299
- queueAnalysisJob(project: string, buildId: number): Promise<Test.PipelineDebuggerResponse>;
300
- /**
301
359
  * @param project - Project ID or project name
302
360
  * @param buildId -
303
361
  * @param publishContext -
@@ -645,6 +703,14 @@ export declare class TestResultsRestClient extends RestClientBase {
645
703
  * @param project - Project ID or project name
646
704
  */
647
705
  callbackTestAgent(request: Test.TestAgentCallbackRequest, project: string): Promise<boolean>;
706
+ /**
707
+ * Browser-clickable entry point for the "Enhance diff coverage" link rendered in PR coverage comments. Dispatches a coverage_test_generation task to ADOAgenticService for the given pull request and redirects the user back to the pull request page.
708
+ *
709
+ * @param project - Project ID or project name
710
+ * @param repository -
711
+ * @param pullRequestId -
712
+ */
713
+ enhanceCoverage(project: string, repository: string, pullRequestId: number): Promise<void>;
648
714
  /**
649
715
  * Returns the current user's GitHub OAuth token with permission to access Copilot APIs, gated behind a feature flag.
650
716
  *
@@ -429,6 +429,189 @@ class TestResultsRestClient extends RestClientBase_1.RestClientBase {
429
429
  });
430
430
  });
431
431
  }
432
+ /**
433
+ * Registers metadata for a result-level test attachment whose content has already been uploaded to dedup storage by the caller. The request carries only the attachment metadata (dedup id, size, file name, type etc) and no file bytes.
434
+ *
435
+ * @param attachmentMetadataRequestModel -
436
+ * @param project - Project ID or project name
437
+ * @param runId -
438
+ * @param testCaseResultId -
439
+ */
440
+ createTestResultAttachmentMetadata(attachmentMetadataRequestModel, project, runId, testCaseResultId) {
441
+ return __awaiter(this, void 0, void 0, function* () {
442
+ return this.beginRequest({
443
+ apiVersion: "7.2-preview.1",
444
+ method: "POST",
445
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachmentsmetadata",
446
+ routeValues: {
447
+ project: project,
448
+ runId: runId,
449
+ testCaseResultId: testCaseResultId
450
+ },
451
+ body: attachmentMetadataRequestModel
452
+ });
453
+ });
454
+ }
455
+ /**
456
+ * Registers metadata for a sub-result-level test attachment whose content has already been uploaded to dedup storage by the caller. The request carries only the attachment metadata (dedup id, size, file name, type etc) and no file bytes.
457
+ *
458
+ * @param attachmentMetadataRequestModel -
459
+ * @param project - Project ID or project name
460
+ * @param runId -
461
+ * @param testCaseResultId -
462
+ * @param testSubResultId -
463
+ */
464
+ createTestSubResultAttachmentMetadata(attachmentMetadataRequestModel, project, runId, testCaseResultId, testSubResultId) {
465
+ return __awaiter(this, void 0, void 0, function* () {
466
+ const queryValues = {
467
+ testSubResultId: testSubResultId
468
+ };
469
+ return this.beginRequest({
470
+ apiVersion: "7.2-preview.1",
471
+ method: "POST",
472
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachmentsmetadata",
473
+ routeValues: {
474
+ project: project,
475
+ runId: runId,
476
+ testCaseResultId: testCaseResultId
477
+ },
478
+ queryParams: queryValues,
479
+ body: attachmentMetadataRequestModel
480
+ });
481
+ });
482
+ }
483
+ /**
484
+ * Returns metadata for the result-level BlobStore-backed test attachments whose file name starts with fileNamePrefix, or the single attachment identified by attachmentId when it is supplied.
485
+ *
486
+ * @param project - Project ID or project name
487
+ * @param runId -
488
+ * @param testCaseResultId -
489
+ * @param attachmentType -
490
+ * @param fileNamePrefix -
491
+ * @param attachmentId -
492
+ * @param fetchMetaData -
493
+ */
494
+ queryTestResultAttachmentsMetadata(project, runId, testCaseResultId, attachmentType, fileNamePrefix, attachmentId, fetchMetaData) {
495
+ return __awaiter(this, void 0, void 0, function* () {
496
+ const queryValues = {
497
+ attachmentType: attachmentType,
498
+ fileNamePrefix: fileNamePrefix,
499
+ attachmentId: attachmentId,
500
+ fetchMetaData: fetchMetaData
501
+ };
502
+ return this.beginRequest({
503
+ apiVersion: "7.2-preview.1",
504
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachmentsmetadata",
505
+ routeValues: {
506
+ project: project,
507
+ runId: runId,
508
+ testCaseResultId: testCaseResultId
509
+ },
510
+ queryParams: queryValues
511
+ });
512
+ });
513
+ }
514
+ /**
515
+ * Returns metadata for the sub-result-level BlobStore-backed test attachments whose file name starts with fileNamePrefix, or the single attachment identified by attachmentId when it is supplied.
516
+ *
517
+ * @param project - Project ID or project name
518
+ * @param runId -
519
+ * @param testCaseResultId -
520
+ * @param testSubResultId -
521
+ * @param attachmentType -
522
+ * @param fileNamePrefix -
523
+ * @param attachmentId -
524
+ * @param fetchMetaData -
525
+ */
526
+ queryTestSubResultAttachmentsMetadata(project, runId, testCaseResultId, testSubResultId, attachmentType, fileNamePrefix, attachmentId, fetchMetaData) {
527
+ return __awaiter(this, void 0, void 0, function* () {
528
+ const queryValues = {
529
+ testSubResultId: testSubResultId,
530
+ attachmentType: attachmentType,
531
+ fileNamePrefix: fileNamePrefix,
532
+ attachmentId: attachmentId,
533
+ fetchMetaData: fetchMetaData
534
+ };
535
+ return this.beginRequest({
536
+ apiVersion: "7.2-preview.1",
537
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachmentsmetadata",
538
+ routeValues: {
539
+ project: project,
540
+ runId: runId,
541
+ testCaseResultId: testCaseResultId
542
+ },
543
+ queryParams: queryValues
544
+ });
545
+ });
546
+ }
547
+ /**
548
+ * Registers metadata for a run-level test attachment whose content has already been uploaded to dedup storage by the caller. The request carries only the attachment metadata (dedup id, size, file name, type etc) and no file bytes.
549
+ *
550
+ * @param attachmentMetadataRequestModel -
551
+ * @param project - Project ID or project name
552
+ * @param runId -
553
+ */
554
+ createTestRunAttachmentMetadata(attachmentMetadataRequestModel, project, runId) {
555
+ return __awaiter(this, void 0, void 0, function* () {
556
+ return this.beginRequest({
557
+ apiVersion: "7.2-preview.1",
558
+ method: "POST",
559
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/attachmentsmetadata",
560
+ routeValues: {
561
+ project: project,
562
+ runId: runId
563
+ },
564
+ body: attachmentMetadataRequestModel
565
+ });
566
+ });
567
+ }
568
+ /**
569
+ * Returns metadata for the run-level BlobStore-backed test attachments whose file name starts with fileNamePrefix, or the single attachment identified by attachmentId when it is supplied. The agent uses this to enumerate BlobStore (dedup) test logs, which are not present in the classic LogStore SAS container and so cannot be listed by the agent directly.
570
+ *
571
+ * @param project - Project ID or project name
572
+ * @param runId -
573
+ * @param attachmentType -
574
+ * @param fileNamePrefix -
575
+ * @param attachmentId -
576
+ * @param fetchMetaData -
577
+ */
578
+ queryTestRunAttachmentsMetadata(project, runId, attachmentType, fileNamePrefix, attachmentId, fetchMetaData) {
579
+ return __awaiter(this, void 0, void 0, function* () {
580
+ const queryValues = {
581
+ attachmentType: attachmentType,
582
+ fileNamePrefix: fileNamePrefix,
583
+ attachmentId: attachmentId,
584
+ fetchMetaData: fetchMetaData
585
+ };
586
+ return this.beginRequest({
587
+ apiVersion: "7.2-preview.1",
588
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/attachmentsmetadata",
589
+ routeValues: {
590
+ project: project,
591
+ runId: runId
592
+ },
593
+ queryParams: queryValues
594
+ });
595
+ });
596
+ }
597
+ /**
598
+ * Pre-flight for a direct-to-BlobStore run attachment upload: enforces publish permission and returns the dedup domain to publish to. The agent calls this before uploading any bytes.
599
+ *
600
+ * @param project - Project ID or project name
601
+ * @param runId -
602
+ */
603
+ getTestRunAttachmentUploadDetails(project, runId) {
604
+ return __awaiter(this, void 0, void 0, function* () {
605
+ return this.beginRequest({
606
+ apiVersion: "7.2-preview.1",
607
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/attachmentuploaddetails",
608
+ routeValues: {
609
+ project: project,
610
+ runId: runId
611
+ }
612
+ });
613
+ });
614
+ }
432
615
  /**
433
616
  * @param project - Project ID or project name
434
617
  * @param runId -
@@ -770,6 +953,25 @@ class TestResultsRestClient extends RestClientBase_1.RestClientBase {
770
953
  });
771
954
  });
772
955
  }
956
+ /**
957
+ * Get the latest result for each requested TestCaseId. Test cases that were never executed (no result in a non-deleted run) are omitted from the response - the caller treats their absence as "never run".
958
+ *
959
+ * @param query - TestCaseLatestResultsQuery carrying the TestCaseIds to look up.
960
+ * @param project - Project ID or project name
961
+ */
962
+ getLatestTestResultsByTestCaseIds(query, project) {
963
+ return __awaiter(this, void 0, void 0, function* () {
964
+ return this.beginRequest({
965
+ apiVersion: "7.2-preview.1",
966
+ method: "POST",
967
+ routeTemplate: "{project}/_apis/testresults/results/latestresults",
968
+ routeValues: {
969
+ project: project
970
+ },
971
+ body: query
972
+ });
973
+ });
974
+ }
773
975
  /**
774
976
  * Get test run message logs
775
977
  *
@@ -820,62 +1022,8 @@ class TestResultsRestClient extends RestClientBase_1.RestClientBase {
820
1022
  });
821
1023
  }
822
1024
  /**
823
- * Callback endpoint invoked by ADOTestAgent when pipeline debug analysis completes. Writes the result to blob storage and fires a SignalR notification to the UI.
824
- *
825
- * @param request -
826
- * @param project - Project ID or project name
827
- */
828
- completeAnalysisJob(request, project) {
829
- return __awaiter(this, void 0, void 0, function* () {
830
- return this.beginRequest({
831
- apiVersion: "7.2-preview.1",
832
- method: "POST",
833
- routeTemplate: "{project}/_apis/testresults/pipelinedebugger/completeanalysisjob",
834
- routeValues: {
835
- project: project
836
- },
837
- body: request
838
- });
839
- });
840
- }
841
- /**
842
- * Retrieves the AI analysis result for a given build. Downloads the analysis JSON from the TCM Log Store (Azure Blob Storage) where it was uploaded by PipelineDebuggerJob upon completion.
1025
+ * Get a summary of test results for a build. To fetch the full TestCaseResult, call Results - Get.
843
1026
  *
844
- * @param project - Project ID or project name
845
- * @param buildId - Build ID that was analyzed
846
- */
847
- getAnalysisResult(project, buildId) {
848
- return __awaiter(this, void 0, void 0, function* () {
849
- return this.beginRequest({
850
- apiVersion: "7.2-preview.1",
851
- routeTemplate: "{project}/_apis/testresults/pipelinedebugger/analysisresult/build/{buildId}",
852
- routeValues: {
853
- project: project,
854
- buildId: buildId
855
- }
856
- });
857
- });
858
- }
859
- /**
860
- * Queues a pipeline analysis job to analyze failed pipeline jobs using AI.
861
- *
862
- * @param project - Project ID or project name
863
- * @param buildId - Build ID to analyze
864
- */
865
- queueAnalysisJob(project, buildId) {
866
- return __awaiter(this, void 0, void 0, function* () {
867
- return this.beginRequest({
868
- apiVersion: "7.2-preview.1",
869
- method: "POST",
870
- routeTemplate: "{project}/_apis/testresults/pipelinedebugger/build/{buildId}",
871
- routeValues: {
872
- project: project,
873
- buildId: buildId
874
- }
875
- });
876
- });
877
- }
878
- /**
879
1027
  * @param project - Project ID or project name
880
1028
  * @param buildId -
881
1029
  * @param publishContext -
@@ -1918,6 +2066,29 @@ class TestResultsRestClient extends RestClientBase_1.RestClientBase {
1918
2066
  });
1919
2067
  });
1920
2068
  }
2069
+ /**
2070
+ * Browser-clickable entry point for the "Enhance diff coverage" link rendered in PR coverage comments. Dispatches a coverage_test_generation task to ADOAgenticService for the given pull request and redirects the user back to the pull request page.
2071
+ *
2072
+ * @param project - Project ID or project name
2073
+ * @param repository -
2074
+ * @param pullRequestId -
2075
+ */
2076
+ enhanceCoverage(project, repository, pullRequestId) {
2077
+ return __awaiter(this, void 0, void 0, function* () {
2078
+ const queryValues = {
2079
+ repository: repository,
2080
+ pullRequestId: pullRequestId
2081
+ };
2082
+ return this.beginRequest({
2083
+ apiVersion: "7.2-preview.1",
2084
+ routeTemplate: "{project}/_apis/testresults/testagent/enhancecoverage",
2085
+ routeValues: {
2086
+ project: project
2087
+ },
2088
+ queryParams: queryValues
2089
+ });
2090
+ });
2091
+ }
1921
2092
  /**
1922
2093
  * Returns the current user's GitHub OAuth token with permission to access Copilot APIs, gated behind a feature flag.
1923
2094
  *