@mcp-consultant-tools/azure-devops 26.0.0-beta.1 → 27.0.0-beta.10

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/build/AzureDevOpsService.d.ts +179 -514
  2. package/build/AzureDevOpsService.d.ts.map +1 -1
  3. package/build/AzureDevOpsService.js +401 -994
  4. package/build/AzureDevOpsService.js.map +1 -1
  5. package/build/index.d.ts.map +1 -1
  6. package/build/index.js +1038 -844
  7. package/build/index.js.map +1 -1
  8. package/build/sync/file-utils.d.ts +86 -0
  9. package/build/sync/file-utils.d.ts.map +1 -0
  10. package/build/sync/file-utils.js +224 -0
  11. package/build/sync/file-utils.js.map +1 -0
  12. package/build/sync/git-utils.d.ts +31 -0
  13. package/build/sync/git-utils.d.ts.map +1 -0
  14. package/build/sync/git-utils.js +116 -0
  15. package/build/sync/git-utils.js.map +1 -0
  16. package/build/sync/html-converter.d.ts +32 -0
  17. package/build/sync/html-converter.d.ts.map +1 -0
  18. package/build/sync/html-converter.js +91 -0
  19. package/build/sync/html-converter.js.map +1 -0
  20. package/build/sync/html-detection.d.ts +93 -0
  21. package/build/sync/html-detection.d.ts.map +1 -0
  22. package/build/sync/html-detection.js +169 -0
  23. package/build/sync/html-detection.js.map +1 -0
  24. package/build/sync/index.d.ts +12 -0
  25. package/build/sync/index.d.ts.map +1 -0
  26. package/build/sync/index.js +12 -0
  27. package/build/sync/index.js.map +1 -0
  28. package/build/sync/markdown-serializer.d.ts +136 -0
  29. package/build/sync/markdown-serializer.d.ts.map +1 -0
  30. package/build/sync/markdown-serializer.js +646 -0
  31. package/build/sync/markdown-serializer.js.map +1 -0
  32. package/build/sync/task-serializer.d.ts +93 -0
  33. package/build/sync/task-serializer.d.ts.map +1 -0
  34. package/build/sync/task-serializer.js +395 -0
  35. package/build/sync/task-serializer.js.map +1 -0
  36. package/build/tool-examples.d.ts +56 -0
  37. package/build/tool-examples.d.ts.map +1 -0
  38. package/build/tool-examples.js +142 -0
  39. package/build/tool-examples.js.map +1 -0
  40. package/package.json +5 -2
@@ -12,243 +12,145 @@ export interface AzureDevOpsConfig {
12
12
  * - 'html': Convert Markdown to HTML before sending (for legacy orgs without Markdown preview)
13
13
  */
14
14
  commentFormat?: 'markdown' | 'html';
15
- showDevOpsAdminReadonly?: boolean;
16
- enablePipelineUpsert?: boolean;
17
- enableServiceConnUpsert?: boolean;
18
- enableVariableGroupUpsert?: boolean;
19
- enableAgentPoolUpsert?: boolean;
20
- enableEnvironmentUpsert?: boolean;
21
- enablePipelineDelete?: boolean;
22
- enableServiceConnDelete?: boolean;
23
- enableVariableGroupDelete?: boolean;
24
- enableAgentPoolDisable?: boolean;
25
- enableEnvironmentDelete?: boolean;
15
+ enablePullRequestWrite?: boolean;
26
16
  }
27
- export interface PipelineDefinition {
28
- id: number;
17
+ export interface AdoApiCollectionResponse<T> {
18
+ value: T[];
19
+ count?: number;
20
+ [key: string]: any;
21
+ }
22
+ export interface Repository {
23
+ id: string;
29
24
  name: string;
30
- path?: string;
31
- revision?: number;
32
- queueStatus?: string;
33
- type?: string;
34
- quality?: string;
35
- authoredBy?: {
36
- displayName: string;
37
- id: string;
38
- };
39
- createdDate?: string;
40
- project?: {
41
- id: string;
42
- name: string;
43
- };
44
- repository?: {
25
+ url: string;
26
+ project: {
45
27
  id: string;
46
28
  name: string;
47
- type: string;
48
- };
49
- process?: {
50
- yamlFilename?: string;
51
- type?: number;
52
29
  };
53
- triggers?: any[];
54
- variables?: Record<string, {
55
- value: string;
56
- isSecret?: boolean;
57
- }>;
58
- _links?: Record<string, {
59
- href: string;
60
- }>;
30
+ defaultBranch?: string;
31
+ size?: number;
32
+ remoteUrl?: string;
33
+ sshUrl?: string;
34
+ webUrl?: string;
61
35
  }
62
- export interface Build {
63
- id: number;
64
- buildNumber: string;
65
- status: string;
66
- result?: string;
67
- queueTime?: string;
68
- startTime?: string;
69
- finishTime?: string;
70
- sourceBranch?: string;
71
- sourceVersion?: string;
72
- definition?: {
73
- id: number;
74
- name: string;
75
- };
76
- requestedBy?: {
36
+ export interface PullRequest {
37
+ pullRequestId: number;
38
+ title: string;
39
+ description?: string;
40
+ status: 'active' | 'completed' | 'abandoned' | 'all';
41
+ createdBy: {
77
42
  displayName: string;
43
+ id: string;
44
+ uniqueName: string;
78
45
  };
79
- requestedFor?: {
46
+ creationDate: string;
47
+ closedDate?: string;
48
+ sourceRefName: string;
49
+ targetRefName: string;
50
+ mergeStatus?: string;
51
+ isDraft?: boolean;
52
+ reviewers?: PullRequestReviewer[];
53
+ labels?: {
54
+ id: string;
55
+ name: string;
56
+ }[];
57
+ autoCompleteSetBy?: {
80
58
  displayName: string;
59
+ id: string;
81
60
  };
82
- project?: {
61
+ completionOptions?: any;
62
+ repository: {
83
63
  id: string;
84
64
  name: string;
85
65
  };
86
- priority?: string;
87
- reason?: string;
88
- parameters?: string;
66
+ supportsIterations?: boolean;
89
67
  _links?: Record<string, {
90
68
  href: string;
91
69
  }>;
92
70
  }
93
- export interface BuildTimeline {
94
- id: string;
95
- changeId: number;
96
- lastChangedBy?: string;
97
- lastChangedOn?: string;
98
- records: TimelineRecord[];
99
- }
100
- export interface TimelineRecord {
101
- id: string;
102
- parentId?: string;
103
- type: string;
104
- name: string;
105
- startTime?: string;
106
- finishTime?: string;
107
- state: string;
108
- result?: string;
109
- order?: number;
110
- log?: {
111
- id: number;
112
- type: string;
113
- url: string;
114
- };
115
- errorCount?: number;
116
- warningCount?: number;
117
- issues?: any[];
118
- }
119
- export interface ServiceConnection {
71
+ export interface PullRequestReviewer {
120
72
  id: string;
121
- name: string;
122
- type: string;
123
- url?: string;
124
- description?: string;
125
- authorization?: {
126
- scheme: string;
127
- parameters?: Record<string, string>;
128
- };
129
- isShared?: boolean;
130
- isReady?: boolean;
131
- owner?: string;
132
- createdBy?: {
133
- displayName: string;
134
- id: string;
135
- };
136
- serviceEndpointProjectReferences?: Array<{
137
- projectReference: {
138
- id: string;
139
- name: string;
140
- };
141
- name: string;
142
- }>;
143
- }
144
- export interface ServiceConnectionType {
145
- name: string;
146
73
  displayName: string;
147
- description?: string;
148
- helpMarkDown?: string;
149
- authenticationSchemes?: Array<{
150
- scheme: string;
151
- displayName: string;
152
- }>;
153
- dataSources?: any[];
154
- inputDescriptors?: any[];
74
+ uniqueName: string;
75
+ vote: number;
76
+ isRequired?: boolean;
77
+ hasDeclined?: boolean;
78
+ isFlagged?: boolean;
155
79
  }
156
- export interface AgentPool {
80
+ export interface PullRequestThread {
157
81
  id: number;
158
- name: string;
159
- size?: number;
160
- isHosted?: boolean;
161
- poolType?: string;
162
- createdBy?: {
163
- displayName: string;
164
- id: string;
165
- };
166
- createdOn?: string;
167
- autoProvision?: boolean;
168
- autoUpdate?: boolean;
169
- autoSize?: boolean;
170
- targetSize?: number;
171
- agentCloudId?: number;
172
- owner?: {
173
- displayName: string;
174
- id: string;
82
+ publishedDate: string;
83
+ lastUpdatedDate: string;
84
+ status: 'unknown' | 'active' | 'fixed' | 'wontFix' | 'closed' | 'byDesign' | 'pending';
85
+ threadContext?: {
86
+ filePath?: string;
87
+ leftFileStart?: {
88
+ line: number;
89
+ offset: number;
90
+ };
91
+ leftFileEnd?: {
92
+ line: number;
93
+ offset: number;
94
+ };
95
+ rightFileStart?: {
96
+ line: number;
97
+ offset: number;
98
+ };
99
+ rightFileEnd?: {
100
+ line: number;
101
+ offset: number;
102
+ };
175
103
  };
176
- options?: string;
104
+ comments: PullRequestComment[];
177
105
  properties?: Record<string, any>;
106
+ isDeleted?: boolean;
178
107
  }
179
- export interface Agent {
180
- id: number;
181
- name: string;
182
- version?: string;
183
- osDescription?: string;
184
- enabled?: boolean;
185
- status?: string;
186
- provisioningState?: string;
187
- accessPoint?: string;
188
- createdOn?: string;
189
- maxParallelism?: number;
190
- systemCapabilities?: Record<string, string>;
191
- userCapabilities?: Record<string, string>;
192
- assignedRequest?: any;
193
- lastCompletedRequest?: any;
194
- }
195
- export interface Environment {
108
+ export interface PullRequestComment {
196
109
  id: number;
197
- name: string;
198
- description?: string;
199
- createdBy?: {
200
- displayName: string;
201
- id: string;
202
- };
203
- createdOn?: string;
204
- lastModifiedBy?: {
110
+ parentCommentId?: number;
111
+ author: {
205
112
  displayName: string;
206
113
  id: string;
207
114
  };
208
- lastModifiedOn?: string;
209
- project?: {
210
- id: string;
211
- name: string;
212
- };
213
- resources?: any[];
115
+ content: string;
116
+ publishedDate: string;
117
+ lastUpdatedDate?: string;
118
+ lastContentUpdatedDate?: string;
119
+ commentType: 'unknown' | 'text' | 'codeChange' | 'system';
120
+ usersLiked?: any[];
214
121
  }
215
- export interface DeploymentRecord {
122
+ export interface PullRequestIteration {
216
123
  id: number;
217
- environmentId: number;
218
- definition?: {
219
- id: number;
220
- name: string;
221
- };
222
- owner?: {
124
+ description?: string;
125
+ author: {
223
126
  displayName: string;
224
127
  id: string;
225
128
  };
226
- planType?: string;
227
- startTime?: string;
228
- finishTime?: string;
229
- result?: string;
230
- queueTime?: string;
231
- requestIdentifier?: string;
232
- }
233
- export interface Check {
234
- id: number;
235
- type: {
236
- id: string;
237
- name: string;
129
+ createdDate: string;
130
+ updatedDate?: string;
131
+ sourceRefCommit: {
132
+ commitId: string;
238
133
  };
239
- settings?: any;
240
- resource?: {
241
- type: string;
242
- id: string;
243
- name?: string;
134
+ targetRefCommit: {
135
+ commitId: string;
244
136
  };
245
- timeout?: number;
246
- retryInterval?: number;
137
+ commonRefCommit?: {
138
+ commitId: string;
139
+ };
140
+ hasMoreCommits?: boolean;
141
+ reason?: string;
247
142
  }
248
- export interface AdoApiCollectionResponse<T> {
249
- value: T[];
250
- count?: number;
251
- [key: string]: any;
143
+ export interface PullRequestChange {
144
+ changeId: number;
145
+ changeType: string;
146
+ item: {
147
+ objectId: string;
148
+ originalObjectId?: string;
149
+ gitObjectType: string;
150
+ commitId?: string;
151
+ path: string;
152
+ url?: string;
153
+ };
252
154
  }
253
155
  export declare class AzureDevOpsService {
254
156
  private config;
@@ -402,6 +304,15 @@ export declare class AzureDevOpsService {
402
304
  * @returns Updated work item
403
305
  */
404
306
  updateWorkItem(project: string, workItemId: number, patchOperations: any[]): Promise<any>;
307
+ /**
308
+ * Set work item field(s) to markdown format.
309
+ * This is IRREVERSIBLE - once set to markdown, cannot revert to HTML.
310
+ *
311
+ * @param project - Project name
312
+ * @param workItemId - Work item ID
313
+ * @param fields - Array of field names to set to markdown format (e.g., ['System.Description'])
314
+ */
315
+ setFieldsToMarkdownFormat(project: string, workItemId: number, fields: string[]): Promise<void>;
405
316
  /**
406
317
  * Create a new work item
407
318
  * @param project The project name
@@ -437,369 +348,123 @@ export declare class AzureDevOpsService {
437
348
  */
438
349
  getVariableGroup(project: string, groupId: number): Promise<any>;
439
350
  /**
440
- * List all pipeline definitions in a project
441
- * @param project The project name
442
- * @returns List of pipeline definitions
443
- */
444
- listPipelineDefinitions(project: string): Promise<any>;
445
- /**
446
- * Get a specific pipeline definition with full details
447
- * @param project The project name
448
- * @param definitionId The pipeline definition ID
449
- * @returns Full pipeline definition
450
- */
451
- getPipelineDefinition(project: string, definitionId: number): Promise<any>;
452
- /**
453
- * Get the YAML content for a pipeline definition
454
- * @param project The project name
455
- * @param definitionId The pipeline definition ID
456
- * @returns YAML content or location info for external repos
457
- */
458
- getPipelineYaml(project: string, definitionId: number): Promise<any>;
459
- /**
460
- * List recent pipeline runs for a definition
461
- * @param project The project name
462
- * @param definitionId The pipeline definition ID
463
- * @param top Maximum number of results (default: 10)
464
- * @returns List of builds/runs
465
- */
466
- listPipelineRuns(project: string, definitionId: number, top?: number): Promise<any>;
467
- /**
468
- * Get build status and details
351
+ * Get build status with optional timeline and logs
469
352
  * @param project The project name
470
353
  * @param buildId The build ID
471
- * @param detail Level of detail: "summary" | "timeline" | "full"
472
- * @param timelineScope Timeline scope: 'stages' | 'jobs' | 'all' | 'problems' (default: 'problems')
473
- * @param maxIssues Maximum issues per timeline record (default: 5)
474
- * @returns Build details
354
+ * @param detail Level of detail: 'summary', 'timeline', or 'full'
355
+ * @param timelineScope Scope for timeline: 'stages', 'jobs', 'all', 'problems'
356
+ * @param maxIssues Maximum issues per record
475
357
  */
476
358
  getBuildStatus(project: string, buildId: number, detail?: string, timelineScope?: 'stages' | 'jobs' | 'all' | 'problems', maxIssues?: number): Promise<any>;
477
359
  /**
478
- * Get build timeline (step-by-step breakdown)
360
+ * Get build timeline with step-by-step breakdown
479
361
  * @param project The project name
480
362
  * @param buildId The build ID
481
- * @param scope Filter scope: 'stages' | 'jobs' | 'all' | 'problems' (default: 'problems')
482
- * @param maxIssues Maximum issues per record (default: 5, prioritizes errors over warnings)
483
- * @returns Build timeline with records and summary stats
363
+ * @param scope Filter scope: 'stages', 'jobs', 'all', 'problems'
364
+ * @param maxIssues Maximum issues per record
484
365
  */
485
366
  getBuildTimeline(project: string, buildId: number, scope?: 'stages' | 'jobs' | 'all' | 'problems', maxIssues?: number): Promise<any>;
486
367
  /**
487
- * Get build logs
368
+ * Get build logs (list or specific log content)
488
369
  * @param project The project name
489
370
  * @param buildId The build ID
490
- * @param logId Optional specific log ID
491
- * @returns Build logs
371
+ * @param logId Optional specific log ID to retrieve content
492
372
  */
493
373
  getBuildLogs(project: string, buildId: number, logId?: number): Promise<any>;
494
374
  /**
495
- * Create a new pipeline definition
496
- * @param project The project name
497
- * @param name Pipeline name
498
- * @param repositoryId Repository ID
499
- * @param yamlPath Path to YAML file in repository
500
- * @param folder Optional folder path
501
- * @returns Created pipeline definition
502
- */
503
- createPipelineDefinition(project: string, name: string, repositoryId: string, yamlPath: string, folder?: string): Promise<any>;
504
- /**
505
- * Update a pipeline definition
506
- * @param project The project name
507
- * @param definitionId The pipeline definition ID
508
- * @param updates Object with updated properties
509
- * @returns Updated pipeline definition
510
- */
511
- updatePipelineDefinition(project: string, definitionId: number, updates: {
512
- name?: string;
513
- path?: string;
514
- queueStatus?: string;
515
- triggers?: any[];
516
- variables?: Record<string, {
517
- value: string;
518
- isSecret?: boolean;
519
- allowOverride?: boolean;
520
- }>;
521
- }): Promise<any>;
522
- /**
523
- * Rename a pipeline definition
524
- * @param project The project name
525
- * @param definitionId The pipeline definition ID
526
- * @param newName The new name
527
- * @returns Updated pipeline definition
528
- */
529
- renamePipelineDefinition(project: string, definitionId: number, newName: string): Promise<any>;
530
- /**
531
- * Queue a new build
532
- * @param project The project name
533
- * @param definitionId The pipeline definition ID
534
- * @param branch Optional source branch
535
- * @param variables Optional variables to pass
536
- * @param parameters Optional pipeline parameters
537
- * @returns Queued build
538
- */
539
- queueBuild(project: string, definitionId: number, branch?: string, variables?: Record<string, string>, parameters?: Record<string, any>): Promise<any>;
540
- /**
541
- * Cancel a running build
542
- * @param project The project name
543
- * @param buildId The build ID
544
- * @returns Cancelled build
545
- */
546
- cancelBuild(project: string, buildId: number): Promise<any>;
547
- /**
548
- * Retry a failed build
549
- * @param project The project name
550
- * @param buildId The build ID to retry
551
- * @returns New build
552
- */
553
- retryBuild(project: string, buildId: number): Promise<any>;
554
- /**
555
- * Delete a pipeline definition
556
- * @param project The project name
557
- * @param definitionId The pipeline definition ID
558
- * @returns Deletion confirmation
559
- */
560
- deletePipelineDefinition(project: string, definitionId: number): Promise<any>;
561
- /**
562
- * List all service connections in a project
563
- * @param project The project name
564
- * @returns List of service connections
565
- */
566
- listServiceConnections(project: string): Promise<any>;
567
- /**
568
- * Get a specific service connection
569
- * @param project The project name
570
- * @param connectionId The service connection ID
571
- * @returns Service connection details
572
- */
573
- getServiceConnection(project: string, connectionId: string): Promise<any>;
574
- /**
575
- * Get available service connection types
576
- * @returns List of service connection types
577
- */
578
- getServiceConnectionTypes(): Promise<any>;
579
- /**
580
- * Create a new service connection
581
- * @param project The project name
582
- * @param name Connection name
583
- * @param type Connection type
584
- * @param configuration Type-specific configuration
585
- * @returns Created service connection
586
- */
587
- createServiceConnection(project: string, name: string, type: string, configuration: {
588
- url?: string;
589
- description?: string;
590
- authorization?: {
591
- scheme: string;
592
- parameters?: Record<string, string>;
593
- };
594
- data?: Record<string, string>;
595
- }): Promise<any>;
596
- /**
597
- * Update a service connection
375
+ * List all Git repositories in a project
598
376
  * @param project The project name
599
- * @param connectionId The service connection ID
600
- * @param updates Updated properties (not credentials)
601
- * @returns Updated service connection
377
+ * @returns List of repositories with their IDs
602
378
  */
603
- updateServiceConnection(project: string, connectionId: string, updates: {
604
- name?: string;
605
- description?: string;
606
- url?: string;
607
- data?: Record<string, string>;
608
- }): Promise<any>;
379
+ listRepositories(project: string): Promise<any>;
609
380
  /**
610
- * Share a service connection across projects
611
- * @param connectionId The service connection ID
612
- * @param projectIds Array of project IDs to share with
613
- * @returns Updated service connection
614
- */
615
- shareServiceConnection(connectionId: string, projectIds: string[]): Promise<any>;
616
- /**
617
- * Delete a service connection
381
+ * List pull requests in a repository
618
382
  * @param project The project name
619
- * @param connectionId The service connection ID
620
- * @returns Deletion confirmation
383
+ * @param repositoryId Repository ID (GUID) or name
384
+ * @param status Filter by status: active, completed, abandoned, all (default: active)
385
+ * @param top Maximum results (default: 25)
386
+ * @param creatorId Filter by creator ID
387
+ * @param reviewerId Filter by reviewer ID
388
+ * @returns List of pull requests
621
389
  */
622
- deleteServiceConnection(project: string, connectionId: string): Promise<any>;
390
+ listPullRequests(project: string, repositoryId: string, status?: 'active' | 'completed' | 'abandoned' | 'all', top?: number, creatorId?: string, reviewerId?: string): Promise<any>;
623
391
  /**
624
- * Create a new variable group
392
+ * Get details of a specific pull request
625
393
  * @param project The project name
626
- * @param name Variable group name
627
- * @param description Optional description
628
- * @param variables Initial variables
629
- * @returns Created variable group
630
- */
631
- createVariableGroup(project: string, name: string, description?: string, variables?: Record<string, {
632
- value: string;
633
- isSecret?: boolean;
634
- }>): Promise<any>;
635
- /**
636
- * Update a variable group's metadata
637
- * @param project The project name
638
- * @param groupId The variable group ID
639
- * @param updates Updated properties
640
- * @returns Updated variable group
394
+ * @param repositoryId Repository ID (GUID) or name
395
+ * @param pullRequestId The PR ID
396
+ * @returns Pull request details with reviewers
641
397
  */
642
- updateVariableGroupMetadata(project: string, groupId: number, updates: {
643
- name?: string;
644
- description?: string;
645
- }): Promise<any>;
398
+ getPullRequest(project: string, repositoryId: string, pullRequestId: number): Promise<any>;
646
399
  /**
647
- * Set or update a variable in a variable group
648
- * @param project The project name
649
- * @param groupId The variable group ID
650
- * @param variableName Variable name
651
- * @param value Variable value
652
- * @param isSecret Whether the variable is secret
653
- * @returns Updated variable group
400
+ * Convert numeric vote to label
654
401
  */
655
- setVariable(project: string, groupId: number, variableName: string, value: string, isSecret?: boolean): Promise<any>;
402
+ private getVoteLabel;
656
403
  /**
657
- * Remove a variable from a variable group
404
+ * Get commits in a pull request
658
405
  * @param project The project name
659
- * @param groupId The variable group ID
660
- * @param variableName Variable name to remove
661
- * @returns Updated variable group
406
+ * @param repositoryId Repository ID (GUID) or name
407
+ * @param pullRequestId The PR ID
408
+ * @returns List of commits
662
409
  */
663
- removeVariable(project: string, groupId: number, variableName: string): Promise<any>;
410
+ getPullRequestCommits(project: string, repositoryId: string, pullRequestId: number): Promise<any>;
664
411
  /**
665
- * Delete a variable group
412
+ * Get threads/comments on a pull request
666
413
  * @param project The project name
667
- * @param groupId The variable group ID
668
- * @returns Deletion confirmation
669
- */
670
- deleteVariableGroup(project: string, groupId: number): Promise<any>;
671
- /**
672
- * List all agent pools
673
- * @param poolType Optional filter: "automation" or "deployment"
674
- * @returns List of agent pools
675
- */
676
- listAgentPools(poolType?: string): Promise<any>;
677
- /**
678
- * Get a specific agent pool
679
- * @param poolId The pool ID
680
- * @returns Agent pool details
414
+ * @param repositoryId Repository ID (GUID) or name
415
+ * @param pullRequestId The PR ID
416
+ * @returns List of discussion threads
681
417
  */
682
- getAgentPool(poolId: number): Promise<any>;
418
+ getPullRequestThreads(project: string, repositoryId: string, pullRequestId: number): Promise<any>;
683
419
  /**
684
- * List agents in a pool
685
- * @param poolId The pool ID
686
- * @param includeCapabilities Include agent capabilities
687
- * @returns List of agents
688
- */
689
- listAgents(poolId: number, includeCapabilities?: boolean): Promise<any>;
690
- /**
691
- * Get a specific agent
692
- * @param poolId The pool ID
693
- * @param agentId The agent ID
694
- * @returns Agent details
695
- */
696
- getAgent(poolId: number, agentId: number): Promise<any>;
697
- /**
698
- * Update an agent pool
699
- * @param poolId The pool ID
700
- * @param updates Updated settings
701
- * @returns Updated agent pool
702
- */
703
- updateAgentPool(poolId: number, updates: {
704
- autoProvision?: boolean;
705
- autoUpdate?: boolean;
706
- autoSize?: boolean;
707
- targetSize?: number;
708
- }): Promise<any>;
709
- /**
710
- * Enable a disabled agent
711
- * @param poolId The pool ID
712
- * @param agentId The agent ID
713
- * @returns Updated agent
714
- */
715
- enableAgent(poolId: number, agentId: number): Promise<any>;
716
- /**
717
- * Disable an agent
718
- * @param poolId The pool ID
719
- * @param agentId The agent ID
720
- * @returns Updated agent
721
- */
722
- disableAgent(poolId: number, agentId: number): Promise<any>;
723
- /**
724
- * List all environments in a project
420
+ * Get file changes in a pull request
725
421
  * @param project The project name
726
- * @returns List of environments
422
+ * @param repositoryId Repository ID (GUID) or name
423
+ * @param pullRequestId The PR ID
424
+ * @param iterationId Iteration ID (default: latest)
425
+ * @returns List of changed files
727
426
  */
728
- listEnvironments(project: string): Promise<any>;
427
+ getPullRequestChanges(project: string, repositoryId: string, pullRequestId: number, iterationId?: number): Promise<any>;
729
428
  /**
730
- * Get a specific environment
429
+ * Add a comment thread to a pull request
731
430
  * @param project The project name
732
- * @param environmentId The environment ID
733
- * @returns Environment details
431
+ * @param repositoryId Repository ID (GUID) or name
432
+ * @param pullRequestId The PR ID
433
+ * @param content Comment content (markdown supported)
434
+ * @param filePath Optional file path for inline comment
435
+ * @param lineNumber Optional line number (right side) for inline comment
436
+ * @param status Thread status: active, fixed, wontFix, closed, byDesign, pending (default: active)
437
+ * @returns Created thread
734
438
  */
735
- getEnvironment(project: string, environmentId: number): Promise<any>;
439
+ addPullRequestThread(project: string, repositoryId: string, pullRequestId: number, content: string, filePath?: string, lineNumber?: number, status?: 'active' | 'fixed' | 'wontFix' | 'closed' | 'byDesign' | 'pending'): Promise<any>;
736
440
  /**
737
- * Get deployment history for an environment
738
- * @param project The project name
739
- * @param environmentId The environment ID
740
- * @param top Maximum number of results
741
- * @returns Deployment records
441
+ * Create a new pull request
742
442
  */
743
- getEnvironmentDeployments(project: string, environmentId: number, top?: number): Promise<any>;
443
+ createPullRequest(project: string, repositoryId: string, sourceRefName: string, targetRefName: string, title: string, description?: string, reviewerIds?: string[], isDraft?: boolean): Promise<any>;
744
444
  /**
745
- * Create a new environment
746
- * @param project The project name
747
- * @param name Environment name
748
- * @param description Optional description
749
- * @returns Created environment
445
+ * Update an existing pull request (title, description, status, draft)
750
446
  */
751
- createEnvironment(project: string, name: string, description?: string): Promise<any>;
752
- /**
753
- * Update an environment
754
- * @param project The project name
755
- * @param environmentId The environment ID
756
- * @param updates Updated properties
757
- * @returns Updated environment
758
- */
759
- updateEnvironment(project: string, environmentId: number, updates: {
760
- name?: string;
447
+ updatePullRequest(project: string, repositoryId: string, pullRequestId: number, updates: {
448
+ title?: string;
761
449
  description?: string;
450
+ status?: 'abandoned' | 'active';
451
+ isDraft?: boolean;
762
452
  }): Promise<any>;
763
453
  /**
764
- * Delete an environment
765
- * @param project The project name
766
- * @param environmentId The environment ID
767
- * @returns Deletion confirmation
454
+ * Complete (merge) a pull request
768
455
  */
769
- deleteEnvironment(project: string, environmentId: number): Promise<any>;
456
+ completePullRequest(project: string, repositoryId: string, pullRequestId: number, mergeStrategy?: 'squash' | 'noFastForward' | 'rebase' | 'rebaseMerge', deleteSourceBranch?: boolean, transitionWorkItems?: boolean, mergeCommitMessage?: string): Promise<any>;
770
457
  /**
771
- * Get all checks configured for an environment
772
- * @param project The project name
773
- * @param environmentId The environment ID
774
- * @returns List of check configurations
458
+ * Add or remove a reviewer from a pull request
775
459
  */
776
- getEnvironmentChecks(project: string, environmentId: number): Promise<any>;
460
+ addOrRemovePrReviewer(project: string, repositoryId: string, pullRequestId: number, reviewerId: string, isRequired?: boolean, remove?: boolean): Promise<any>;
777
461
  /**
778
- * Add a check to an environment
779
- * @param project The project name
780
- * @param environmentId The environment ID
781
- * @param checkType The type of check (e.g., "Approval", "ExclusiveLock")
782
- * @param configuration Check configuration
783
- * @returns Created check
462
+ * Submit a vote on a pull request
784
463
  */
785
- addEnvironmentCheck(project: string, environmentId: number, checkType: string, configuration: any): Promise<any>;
464
+ votePullRequest(project: string, repositoryId: string, pullRequestId: number, vote: 'approve' | 'approveWithSuggestions' | 'noResponse' | 'waitForAuthor' | 'reject', reviewerId?: string): Promise<any>;
786
465
  /**
787
- * Update an existing environment check
788
- * @param project The project name
789
- * @param checkId The check configuration ID
790
- * @param updates Updated settings and/or timeout
791
- * @returns Updated check
792
- */
793
- updateEnvironmentCheck(project: string, checkId: number, updates: {
794
- settings?: any;
795
- timeout?: number;
796
- }): Promise<any>;
797
- /**
798
- * Remove a check from an environment
799
- * @param project The project name
800
- * @param checkId The check configuration ID
801
- * @returns Deletion confirmation
466
+ * Reply to a PR thread and optionally update thread status
802
467
  */
803
- removeEnvironmentCheck(project: string, checkId: number): Promise<any>;
468
+ replyToPrThread(project: string, repositoryId: string, pullRequestId: number, threadId: number, content?: string, status?: 'active' | 'fixed' | 'wontFix' | 'closed' | 'byDesign' | 'pending'): Promise<any>;
804
469
  }
805
470
  //# sourceMappingURL=AzureDevOpsService.d.ts.map