Skip to content

Conversation

@abhandage
Copy link
Contributor

@abhandage abhandage commented Dec 15, 2025

This pull request introduces centralized API version management for several destination integrations by extracting API version strings into dedicated versioning-info.ts files. This change improves maintainability and makes it easier to update API versions in the future. The most significant updates are grouped below by destination.

Salesforce Marketing Cloud

  • Extracted auth, data, and hub API versions into versioning-info.ts and updated all API endpoint URLs in sfmc-operations.ts, apiEvent/index.ts, and contact/index.ts to use these constants. This ensures all Salesforce Marketing Cloud endpoints consistently reference the correct version. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Google Enhanced Conversions

  • Introduced versioning-info.ts to hold the API and events API versions, and updated all relevant endpoints in functions.ts and postConversion/index.ts to use these constants. [1] [2] [3] [4]
  • Minor code cleanups in functions.ts for improved readability. [1] [2]

Facebook Conversions API

  • Moved the API version and canary version into versioning-info.ts and updated the constants file to use these values instead of hardcoded strings. [1] [2]

TikTok Conversions

  • Added a versioning-info.ts file for the API version and updated the event tracking endpoint to use the version constant. [1] [2] [3]

Amplitude

  • Centralized the API version for several Amplitude endpoints in versioning-info.ts and updated endpoint URLs in regional-endpoints.ts to use the version constant. [1] [2] [3]

These changes collectively make it easier to update API versions across these integrations and reduce the risk of inconsistencies or errors when endpoints change.

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 introduces centralized API version management across multiple destination integrations by extracting hardcoded API version strings into dedicated versioning-info.ts files. This refactoring improves maintainability by establishing a single source of truth for API versions, making future updates easier and reducing the risk of inconsistencies across endpoints.

Key Changes:

  • Created versioning-info.ts files for TikTok Conversions, Salesforce Marketing Cloud, Google Enhanced Conversions, Facebook Conversions API, and Amplitude destinations
  • Updated all endpoint URL constructions to reference version constants instead of hardcoded strings
  • Included minor code formatting improvements in Google Enhanced Conversions

Reviewed changes

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

Show a summary per file
File Description
packages/destination-actions/src/destinations/tiktok-conversions/versioning-info.ts Introduces API version constant (v1.3) with documentation
packages/destination-actions/src/destinations/tiktok-conversions/reportWebEvent/utils.ts Updates event tracking endpoint to use version constant
packages/destination-actions/src/destinations/salesforce-marketing-cloud/versioning-info.ts Defines three API version constants for auth (v2), data (v1), and hub (v1) APIs
packages/destination-actions/src/destinations/salesforce-marketing-cloud/sfmc-operations.ts Refactors all API endpoint URLs to use version constants; includes whitespace cleanup in comments
packages/destination-actions/src/destinations/salesforce-marketing-cloud/contact/index.ts Updates contact creation endpoint to use DATA_API_VERSION constant
packages/destination-actions/src/destinations/salesforce-marketing-cloud/apiEvent/index.ts Updates event endpoint to use DATA_API_VERSION constant
packages/destination-actions/src/destinations/google-enhanced-conversions/versioning-info.ts Defines API version (v19) and events API version (v1) constants
packages/destination-actions/src/destinations/google-enhanced-conversions/postConversion/index.ts Updates event API endpoint to use version constant; includes comment whitespace fix
packages/destination-actions/src/destinations/google-enhanced-conversions/functions.ts Imports and uses API version constant; includes code formatting improvements for readability
packages/destination-actions/src/destinations/facebook-conversions-api/versioning-info.ts Defines API version (21.0) and canary version (24.0) constants
packages/destination-actions/src/destinations/facebook-conversions-api/constants.ts Imports and uses version constants from versioning-info
packages/destination-actions/src/destinations/amplitude/versioning-info.ts Defines API version constant (2) for multiple endpoints
packages/destination-actions/src/destinations/amplitude/regional-endpoints.ts Updates deletions, httpapi, and usersearch endpoints to use version constant

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 91.17647% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.04%. Comparing base (b362495) to head (6184a58).

Files with missing lines Patch % Lines
...tinations/google-enhanced-conversions/functions.ts 71.42% 1 Missing and 1 partial ⚠️
...ions/salesforce-marketing-cloud/sfmc-operations.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
+ Coverage   80.02%   80.04%   +0.01%     
==========================================
  Files        1226     1231       +5     
  Lines       22769    22785      +16     
  Branches     4525     4520       -5     
==========================================
+ Hits        18222    18238      +16     
  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 13 out of 13 changed files in this pull request and generated no new comments.

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