Add ServiceEndpointApi integration to WebApi#671
Open
ivanduplenskikh wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
/azp run |
1 similar comment
Contributor
Author
|
/azp run |
manolerazvan
approved these changes
Jun 2, 2026
manolerazvan
reviewed
Jun 2, 2026
manolerazvan
reviewed
Jun 2, 2026
manolerazvan
reviewed
Jun 2, 2026
manolerazvan
approved these changes
Jun 2, 2026
ccf74a4 to
7f786f8
Compare
- Imported ServiceEndpointApi module. - Updated _resourceAreas type to allow undefined. - Implemented getServiceEndpointApi method to retrieve ServiceEndpointApi instance. - Cleaned up whitespace in the encryption key handling section.
7f786f8 to
486dad8
Compare
Contributor
Author
|
/azp run |
Contributor
|
COpilot review comment. Please check if we can add l0 test cases |
Contributor
Author
|
/azp run |
There was a problem hiding this comment.
Pull request overview
This pull request restores Service Endpoint REST capabilities in azure-devops-node-api by introducing a generated ServiceEndpointApiBase, a thin ServiceEndpointApi wrapper, and wiring a new getServiceEndpointApi() factory into WebApi (including unit coverage for resource-area URL resolution).
Changes:
- Added
ServiceEndpointApiBase(generated) andServiceEndpointApiwrapper to expose Service Endpoint operations (e.g.,getServiceEndpoints, CRUD). - Extended
WebApiwithgetServiceEndpointApi()that resolves theserviceendpointresource area (1814ab31-2f4f-4a9f-8761-f4d77dc5a5d7). - Added unit tests validating resource-area resolution, handler override behavior, and on-prem fallback behavior.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| api/WebApi.ts | Adds getServiceEndpointApi() factory and imports the new API module. |
| api/ServiceEndpointApi.ts | Introduces the public wrapper class/interface for consumers. |
| api/ServiceEndpointApiBase.ts | Adds the generated base implementation with Service Endpoint methods. |
| test/units/tests.ts | Adds unit tests for getServiceEndpointApi() URL/handler behavior. |
| package.json | Bumps package version to 16.0.0. |
| package-lock.json | Aligns lockfile version metadata with 16.0.0. |
| test/package-lock.json | Aligns test lockfile metadata with 16.0.0. |
Files not reviewed (1)
- test/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the missing
ServiceEndpointApiclient toWebApi, restoring access to Service Endpoint operations (getServiceEndpoints,createServiceEndpoint, etc.) that have been unavailable since the v8.x client generation.Fixes #317, Fixes #310
Background
In January 2018, the Azure DevOps server moved Service Endpoint APIs from the
distributedtaskarea to a dedicatedserviceendpointarea. Because the node-api client is auto-generated from controller metadata, the obsolete methods were excluded fromTaskAgentApiBasein subsequent regenerations — effectively removinggetServiceEndpointsand related methods from the npm package.Changes
api/ServiceEndpointApi.tsServiceEndpointApiBase(follows the same pattern asTaskAgentApi)api/ServiceEndpointApiBase.tsapi/WebApi.tsgetServiceEndpointApi()factory method (resource area1814ab31-2f4f-4a9f-8761-f4d77dc5a5d7)Usage
Testing
CIXApi.tsissues are unrelated)