Skip to content

batch-6: refactor API versioning to use versioning-info module#3700

Open
abhandage wants to merge 1 commit intomainfrom
batch-6
Open

batch-6: refactor API versioning to use versioning-info module#3700
abhandage wants to merge 1 commit intomainfrom
batch-6

Conversation

@abhandage
Copy link
Copy Markdown
Contributor

@abhandage abhandage commented Mar 30, 2026

This pull request centralizes API version management for several destinations by moving API version constants into dedicated versioning-info.ts files and updating all relevant URL constructions to use these constants. This makes it easier to update API versions in the future and improves code maintainability and clarity.

Key changes by theme:

API Version Centralization

  • Introduced new versioning-info.ts files for the following destinations, each exporting a single source of truth for the API version:
    • First Party DV360 (FIRST_PARTY_DV360_API_VERSION, FIRST_PARTY_DV360_CANARY_API_VERSION)
    • Rokt Audiences (ROKT_API_VERSION)
    • Segment Profiles (SEGMENT_PROFILES_API_VERSION)
    • Talon.One (TALON_ONE_API_VERSION)
    • Yahoo Audiences (YAHOO_AUDIENCES_TAXONOMY_API_VERSION)

URL Construction Updates

  • Updated all API endpoint URLs in the respective destination files to use the new version constants instead of hardcoded version strings. This affects:
    • First Party DV360 (functions.ts)
    • Rokt Audiences (constants.ts)
    • Segment Profiles (properties.ts) [1] [2]
    • Talon.One (trackEventV2/index.ts, updateCustomerProfileV3/index.ts, updateCustomerSessionV2/index.ts) [1] [2] [3] [4] [5] [6]
    • Yahoo Audiences (utils-rt.ts, utils-tax.ts) [1] [2] [3] [4]

Maintainability Improvements

  • By consolidating API version management, future upgrades or changes to API versions require updates in only one place per destination, reducing the risk of inconsistencies and simplifying maintenance. (all references above)

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.

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
  • [Segmenters] Tested in the staging environment
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

Security Review

Please ensure sensitive data is properly protected in your integration.

  • Reviewed all field definitions for sensitive data (API keys, tokens, passwords, client secrets) and confirmed they use type: 'password'

New Destination Checklist

  • Extracted all action API versions to verioning-info.ts file. example

@abhandage abhandage requested a review from a team as a code owner March 30, 2026 07:29
@abhandage abhandage changed the title tier 1 batch 6 batch-6: refactor API versioning to use versioning-info module Mar 30, 2026
@abhandage abhandage requested a review from Copilot March 30, 2026 11:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Centralizes per-destination API version strings into versioning-info.ts modules and updates affected destinations to construct request URLs from those shared constants, reducing scattered hardcoded versions across the Action Destinations codebase.

Changes:

  • Added new versioning-info.ts files exporting destination-specific API version constants.
  • Updated multiple destinations’ URL construction to interpolate the centralized version constants.
  • Adjusted DV360 helpers to source API_VERSION/CANARY_API_VERSION from the new module.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/destination-actions/src/destinations/yahoo-audiences/versioning-info.ts Adds centralized Yahoo Audiences version constant.
packages/destination-actions/src/destinations/yahoo-audiences/utils-tax.ts Uses centralized version constant in taxonomy/auth endpoint URLs.
packages/destination-actions/src/destinations/yahoo-audiences/utils-rt.ts Uses centralized version constant in ZTS URL for JWT audience.
packages/destination-actions/src/destinations/talon-one/versioning-info.ts Adds centralized Talon.One API version constant.
packages/destination-actions/src/destinations/talon-one/updateCustomerSessionV2/index.ts Replaces hardcoded /v2 with version constant in request URL.
packages/destination-actions/src/destinations/talon-one/updateCustomerProfileV3/index.ts Replaces hardcoded /v2 with version constant in request URL.
packages/destination-actions/src/destinations/talon-one/trackEventV2/index.ts Replaces hardcoded /v2 with version constant in request URL.
packages/destination-actions/src/destinations/segment-profiles/versioning-info.ts Adds centralized Segment Profiles API version constant.
packages/destination-actions/src/destinations/segment-profiles/properties.ts Uses version constant for regional Segment endpoints (api/cdn).
packages/destination-actions/src/destinations/rokt-audiences/versioning-info.ts Adds centralized Rokt Audiences API version constant.
packages/destination-actions/src/destinations/rokt-audiences/constants.ts Uses version constant in Rokt base URL.
packages/destination-actions/src/destinations/first-party-dv360/versioning-info.ts Adds centralized DV360 API + canary version constants.
packages/destination-actions/src/destinations/first-party-dv360/functions.ts Sources exported API version values from the new versioning module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants