-
Notifications
You must be signed in to change notification settings - Fork 297
tier-1/batch-3: refactor API versioning to use versioning-info module #3472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 five destinations (Salesforce, LinkedIn Audiences, HubSpot, FullStory, and Customer.io) to use a centralized versioning-info module pattern. This is part of a broader tier-1/batch-3 refactoring effort to standardize how API versions are managed across the action-destinations codebase.
Key Changes:
- Creates new
versioning-info.tsfiles at the root of each destination with well-documented API version constants - Updates all references from inline version strings or local constants to use the centralized versioning-info exports
- Maintains backward compatibility by keeping version values unchanged (no breaking changes)
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
packages/destination-actions/src/destinations/salesforce/versioning-info.ts |
Introduces SALESFORCE_API_VERSION constant ('v53.0') with documentation |
packages/destination-actions/src/destinations/salesforce/sf-operations.ts |
Removes local API_VERSION constant and imports from versioning-info |
packages/destination-actions/src/destinations/salesforce/__tests__/*.test.ts |
Updates all test files to import SALESFORCE_API_VERSION from versioning-info |
packages/destination-actions/src/destinations/linkedin-audiences/versioning-info.ts |
Introduces LINKEDIN_AUDIENCES_API_VERSION constant ('202505') for API header |
packages/destination-actions/src/destinations/linkedin-audiences/constants.ts |
Re-exports version from versioning-info module |
packages/destination-actions/src/destinations/linkedin-audiences/api.ts |
Adds Linkedin-Version header using centralized constant |
packages/destination-actions/src/destinations/hubspot/versioning-info.ts |
Introduces three version constants for different HubSpot API endpoints (CRM v3, Associations v4, OAuth v1) |
packages/destination-actions/src/destinations/hubspot/**/*.ts |
Updates all HubSpot files to use centralized version constants in URL construction |
packages/destination-actions/src/destinations/fullstory/versioning-info.ts |
Introduces FULLSTORY_API_VERSION constant ('v1') |
packages/destination-actions/src/destinations/fullstory/request-params.ts |
Updates URL construction to use centralized version constant |
packages/destination-actions/src/destinations/customerio/versioning-info.ts |
Introduces two version constants for track API (v2) and customers API (v1) |
packages/destination-actions/src/destinations/customerio/utils.ts |
Updates batch and single request methods to use centralized version constants |
packages/destination-actions/src/destinations/customerio/index.ts |
Updates onDelete method to use centralized version constant |
packages/destination-actions/src/destinations/linkedin-audiences/versioning-info.ts
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3472 +/- ##
==========================================
+ Coverage 80.02% 80.04% +0.01%
==========================================
Files 1226 1231 +5
Lines 22769 22792 +23
Branches 4525 4525
==========================================
+ Hits 18222 18244 +22
- Misses 3711 3712 +1
Partials 836 836 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request introduces versioning constants for API endpoints in the Customer.io, FullStory, and HubSpot destination actions, and refactors all relevant code to use these constants instead of hardcoded API versions. This change improves maintainability and makes future API upgrades easier. The update touches endpoint construction throughout the codebase, ensuring consistency and centralizing API version management.
Key changes by theme:
API Versioning Constants
versioning-info.tsfiles for each integration (customerio,fullstory,hubspot) to define version constants such asCUSTOMERIO_TRACK_API_VERSION,CUSTOMERIO_CUSTOMERS_API_VERSION,FULLSTORY_API_VERSION,HUBSPOT_CRM_API_VERSION,HUBSPOT_CRM_ASSOCIATIONS_API_VERSION, andHUBSPOT_OAUTH_API_VERSION. [1] [2]Customer.io Integration
customerioto use the new version constants, replacing hardcoded/v1/and/v2/paths in batch, entity, and customer deletion endpoints. [1] [2] [3]CUSTOMERIO_CUSTOMERS_API_VERSIONandCUSTOMERIO_TRACK_API_VERSIONwhere needed. [1] [2]FullStory Integration
FULLSTORY_API_VERSIONin endpoint paths instead of hardcoded values. [1] [2]FULLSTORY_API_VERSION. [1] [2]HubSpot Integration
/v3/,/v4/, and/v1/with the appropriate constant. [1] [2] [3] [4] [5] [6] F2373949L44R45, F2373949L90R91, F2373949L143R147, [7] [8] [9]These changes standardize API version management and make it significantly easier to update API versions in the future.
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'