Skip to content

Conversation

@abhandage
Copy link
Contributor

@abhandage abhandage commented Dec 15, 2025

This pull request introduces a standardized approach for managing API versions across several destinations by moving version strings into dedicated versioning-info.ts files 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

  • Added new versioning-info.ts files 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

  • Updated all relevant URL constructions and OAuth header generation in destination logic to use the new version constants instead of hardcoded strings, including:
    • First Party DV360: switched to FIRST_PARTY_DV360_API_VERSION and FIRST_PARTY_DV360_CANARY_API_VERSION
    • Rokt Audiences: replaced hardcoded version in ROKT_API_BASE_URL with ROKT_API_VERSION
    • Segment Profiles: updated all region endpoints to use SEGMENT_PROFILES_API_VERSION [1] [2]
    • Talon.One: updated all endpoint URLs in actions to use TALON_ONE_API_VERSION [1] [2] [3] [4] [5] [6]
    • Yahoo Audiences: updated OAuth version and taxonomy API version usage [1] [2] [3]

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.

  • 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'

Copy link
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

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.ts files 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
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.04%. Comparing base (b362495) to head (1f86cc1).

Files with missing lines Patch % Lines
...ions/src/destinations/yahoo-audiences/utils-tax.ts 75.00% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@abhandage abhandage marked this pull request as ready for review December 18, 2025 12:10
@abhandage abhandage requested a review from a team as a code owner December 18, 2025 12:10
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.

3 participants