Skip to content

Conversation

@abhandage
Copy link
Contributor

This pull request standardizes API version management across several destination integrations by moving API version strings into dedicated versioning-info.ts files and updating all usage to reference these constants. This improves maintainability and makes future API upgrades easier. The changes affect Adobe Target, Pinterest Conversions, Reddit Conversions API, Snapchat Conversions API, and TikTok Audiences destinations, including their test files.

API Version Management Standardization

  • Introduced new versioning-info.ts files for each destination (adobe-target, pinterest-conversions, reddit-conversions-api, snap-conversions-api, tiktok-audiences) to export API version constants, replacing hardcoded version strings throughout the codebase. [1] [2] [3] [4]

Code Updates to Use API Version Constants

Minor Cleanups

  • Minor formatting fixes, such as consistent string quoting in utility functions.

@abhandage abhandage requested a review from Copilot December 15, 2025 11:03
@abhandage abhandage changed the title Tier 1 batch 2 refactor API versioning to use versioning-info module Dec 15, 2025
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 pull request standardizes API version management across five destination integrations (Adobe Target, Pinterest Conversions, Reddit Conversions API, Snapchat Conversions API, and TikTok Audiences) by introducing dedicated versioning-info.ts files that centralize API version constants. This refactoring improves maintainability by eliminating hardcoded version strings scattered throughout the codebase and makes future API version upgrades easier to manage.

Key changes:

  • Introduced versioning-info.ts files for each destination with clearly documented API version constants
  • Updated all imports and URL constructions across source and test files to reference the new constants
  • Removed API version exports from intermediate constant files (e.g., removed TIKTOK_API_VERSION from constants.ts)

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/destination-actions/src/destinations/tiktok-audiences/versioning-info.ts Introduces TIKTOK_AUDIENCES_API_VERSION constant set to 'v1.3' with API reference documentation
packages/destination-actions/src/destinations/tiktok-audiences/constants.ts Imports and uses new version constant instead of hardcoded version; removes old TIKTOK_API_VERSION export
packages/destination-actions/src/destinations/tiktok-audiences/api/index.ts Updates all API request URLs to use TIKTOK_AUDIENCES_API_VERSION constant
packages/destination-actions/src/destinations/tiktok-audiences/removeUser/__tests__/index.test.ts Updates test mocks to import and use the new version constant
packages/destination-actions/src/destinations/tiktok-audiences/removeFromAudience/__tests__/index.test.ts Updates test mocks to import and use the new version constant
packages/destination-actions/src/destinations/tiktok-audiences/createAudience/__tests__/index.test.ts Updates test mocks to import and use the new version constant
packages/destination-actions/src/destinations/tiktok-audiences/api/api.test.ts Updates test mocks to import and use the new version constant
packages/destination-actions/src/destinations/tiktok-audiences/addUser/__tests__/index.test.ts Updates test mocks to import and use the new version constant
packages/destination-actions/src/destinations/tiktok-audiences/addToAudience/__tests__/index.test.ts Updates test mocks to import and use the new version constant
packages/destination-actions/src/destinations/tiktok-audiences/__tests__/index.test.ts Updates test mocks to import and use the new version constant
packages/destination-actions/src/destinations/snap-conversions-api/versioning-info.ts Introduces SNAP_CONVERSIONS_API_VERSION constant set to 'v3' with API reference documentation
packages/destination-actions/src/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v3.ts Imports and uses new version constant in URL construction
packages/destination-actions/src/destinations/reddit-conversions-api/versioning-info.ts Introduces REDDIT_CONVERSIONS_API_VERSION constant set to 'v2.0' with API reference documentation
packages/destination-actions/src/destinations/reddit-conversions-api/utils.ts Imports and uses new version constant in URL construction; includes minor string quote consistency fix
packages/destination-actions/src/destinations/reddit-conversions-api/index.ts Imports and attempts to use new version constant in testAuthentication (contains a bug)
packages/destination-actions/src/destinations/pinterest-conversions/versioning-info.ts Introduces PINTEREST_CONVERSIONS_API_VERSION constant set to 'v5' with API reference documentation
packages/destination-actions/src/destinations/pinterest-conversions/constants.ts Imports new version constant and assigns it to existing API_VERSION export
packages/destination-actions/src/destinations/adobe-target/versioning-info.ts Introduces ADOBE_TARGET_API_VERSION constant set to 'v1' with endpoint and API reference documentation
packages/destination-actions/src/destinations/adobe-target/adobeTarget_operations.ts Imports and uses new version constant in profile lookup URL construction

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.03%. Comparing base (b362495) to head (f75752b).

Files with missing lines Patch % Lines
...s/src/destinations/reddit-conversions-api/index.ts 50.00% 1 Missing ⚠️
...s/src/destinations/reddit-conversions-api/utils.ts 66.66% 1 Missing ⚠️
...ons/src/destinations/tiktok-audiences/api/index.ts 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3471   +/-   ##
=======================================
  Coverage   80.02%   80.03%           
=======================================
  Files        1226     1231    +5     
  Lines       22769    22780   +11     
  Branches     4525     4525           
=======================================
+ Hits        18222    18233   +11     
  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.

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

Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.

@abhandage abhandage changed the title refactor API versioning to use versioning-info module tier-1/batch-2: refactor API versioning to use versioning-info module Dec 15, 2025
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