tier-1/batch-6: refactor API versioning to use versioning-info module#3476
Open
tier-1/batch-6: refactor API versioning to use versioning-info module#3476
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors API versioning across 5 destinations (tier-1/batch-6) to centralize version strings in dedicated versioning-info.ts modules, improving maintainability and consistency with established repository conventions.
- Centralizes API version constants into
versioning-info.tsfiles for each destination - Replaces hardcoded version strings in URLs with imported constants
- Maintains exact same behavior while improving code maintainability
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/destination-actions/src/destinations/yahoo-audiences/versioning-info.ts | New file defining OAuth 1.0 version and taxonomy API v1 version constants with documentation |
| packages/destination-actions/src/destinations/yahoo-audiences/utils-tax.ts | Imports and uses version constants for OAuth signature and taxonomy API URL construction |
| packages/destination-actions/src/destinations/talon-one/versioning-info.ts | New file defining Talon.One integration API v2 version constant with documentation |
| packages/destination-actions/src/destinations/talon-one/updateCustomerSessionV2/index.ts | Imports and uses API version constant in customer session URL construction |
| packages/destination-actions/src/destinations/talon-one/updateCustomerProfileV3/index.ts | Imports and uses API version constant in customer profile URL construction |
| packages/destination-actions/src/destinations/talon-one/trackEventV2/index.ts | Imports and uses API version constant in events URL construction |
| packages/destination-actions/src/destinations/segment-profiles/versioning-info.ts | New file defining Segment Profiles API v1 version constant with documentation |
| packages/destination-actions/src/destinations/segment-profiles/properties.ts | Imports and uses API version constant in all regional endpoint URLs (NA, EU, staging) |
| packages/destination-actions/src/destinations/rokt-audiences/versioning-info.ts | New file defining Rokt audiences API v3 version constant with documentation |
| packages/destination-actions/src/destinations/rokt-audiences/constants.ts | Imports and uses API version constant in base URL construction |
| packages/destination-actions/src/destinations/first-party-dv360/versioning-info.ts | New file defining DV360 API v4 and canary v4 version constants with documentation |
| packages/destination-actions/src/destinations/first-party-dv360/functions.ts | Imports version constants and assigns them to existing exported constants |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3476 +/- ##
==========================================
+ Coverage 80.02% 80.04% +0.01%
==========================================
Files 1226 1231 +5
Lines 22769 22784 +15
Branches 4525 4525
==========================================
+ Hits 18222 18237 +15
Misses 3711 3711
Partials 836 836 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This pull request introduces a standardized approach for managing API versions across several destinations by moving version strings into dedicated
versioning-info.tsfiles and updating code to reference these constants. This improves maintainability and makes it easier to update API versions in the future. The changes span multiple destinations, including First Party DV360, Rokt Audiences, Segment Profiles, Talon.One, and Yahoo Audiences.API Version Management Standardization
versioning-info.tsfiles for each destination (First Party DV360, Rokt Audiences, Segment Profiles, Talon.One, Yahoo Audiences) that export constants for API versions, along with documentation and links to the relevant API references. [1] [2] [3] [4] [5]Refactoring to Use Version Constants
FIRST_PARTY_DV360_API_VERSIONandFIRST_PARTY_DV360_CANARY_API_VERSIONROKT_API_BASE_URLwithROKT_API_VERSIONSEGMENT_PROFILES_API_VERSION[1] [2]TALON_ONE_API_VERSION[1] [2] [3] [4] [5] [6]These changes make the codebase more robust and easier to maintain by centralizing API version management.
Testing
Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing.
Security Review
Please ensure sensitive data is properly protected in your integration.
type: 'password'