-
Notifications
You must be signed in to change notification settings - Fork 294
tier-1/batch-7: refactor API versioning to use versioning-info #3477
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 version management across 7 destinations by extracting hardcoded version strings into centralized versioning-info.ts files. This improves maintainability and consistency by consolidating version declarations with API documentation references in a single location per destination.
Key Changes:
- Created dedicated
versioning-info.tsfiles for each destination containing version constants with JSDoc comments and API documentation links - Updated all hardcoded API version strings to use the centralized constants
- Cleaned up outdated JSDoc comments and minor formatting issues
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/destination-actions/src/destinations/tiktok-offline-conversions/versioning-info.ts |
New file defining TIKTOK_OFFLINE_CONVERSIONS_API_VERSION ('v1.3') with API reference |
packages/destination-actions/src/destinations/tiktok-offline-conversions/utils.ts |
Updated to use centralized version constant in API URL construction |
packages/destination-actions/src/destinations/tiktok-offline-conversions/index.ts |
Imports and re-exports version constant, uses it in testAuthentication |
packages/destination-actions/src/destinations/taboola-actions/versioning-info.ts |
New file defining TABOOLA_API_VERSION ('1.0') with API reference |
packages/destination-actions/src/destinations/taboola-actions/syncAudience/client.ts |
Updated to use centralized version constant in API URL |
packages/destination-actions/src/destinations/taboola-actions/index.ts |
Imports and uses version constant in createAudience endpoint |
packages/destination-actions/src/destinations/google-sheets/versioning-info.ts |
New file defining GOOGLE_SHEETS_API_VERSION ('v4') with API reference |
packages/destination-actions/src/destinations/google-sheets/googleapis/index.ts |
Replaced local API_VERSION constant with centralized version, updated all API URLs |
packages/destination-actions/src/destinations/facebook-custom-audiences/versioning-info.ts |
New file defining API version ('v21.0') and canary version ('v21.0') with references |
packages/destination-actions/src/destinations/facebook-custom-audiences/constants.ts |
Imports and assigns versioning constants from versioning-info.ts |
packages/destination-actions/src/destinations/engage-messaging-sendgrid/versioning-info.ts |
New file defining ENGAGE_MESSAGING_SENDGRID_API_VERSION ('v3') with API reference |
packages/destination-actions/src/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.ts |
Updated mail send endpoint to use centralized version constant |
packages/destination-actions/src/destinations/engage-messaging-sendgrid/index.ts |
Updated testAuthentication endpoint to use centralized version constant |
packages/destination-actions/src/destinations/avo/versioning-info.ts |
New file defining AVO_API_VERSION ('v1') with API reference |
packages/destination-actions/src/destinations/avo/sendSchemaToInspector/index.ts |
Updated Inspector API endpoint to use centralized version constant |
packages/destination-actions/src/destinations/amazon-conversions-api/versioning-info.ts |
New file defining separate versions for profiles ('v2') and events ('v1') endpoints |
packages/destination-actions/src/destinations/amazon-conversions-api/trackConversion/utils.ts |
Updated events endpoint to use centralized version, removed outdated JSDoc param |
packages/destination-actions/src/destinations/amazon-conversions-api/index.ts |
Updated profiles endpoint to use centralized version, removed trailing comma |
packages/destination-actions/src/destinations/facebook-custom-audiences/constants.ts
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3477 +/- ##
==========================================
+ Coverage 80.02% 80.04% +0.01%
==========================================
Files 1226 1233 +7
Lines 22769 22789 +20
Branches 4525 4524 -1
==========================================
+ Hits 18222 18242 +20
Misses 3711 3711
Partials 836 836 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request introduces a standardized approach for managing and referencing API versions across multiple destination integrations. API version strings have been extracted into dedicated
versioning-info.tsfiles for each destination, and all API requests now reference these constants. This improves maintainability and makes it easier to update API versions in the future. The changes affect Amazon Conversions API, Avo, Engage Messaging SendGrid, Facebook Custom Audiences, Google Sheets, Taboola Actions, and TikTok Offline Conversions destinations.API Version Management Standardization
versioning-info.tsfiles for each destination and updated all API requests to use these constants instead of hardcoded values. This affects:AMAZON_CONVERSIONS_API_PROFILES_VERSION,AMAZON_CONVERSIONS_API_EVENTS_VERSION) [1] [2] [3] [4] [5]AVO_API_VERSION) [1] [2]ENGAGE_MESSAGING_SENDGRID_API_VERSION) [1] [2] [3] [4] [5]FACEBOOK_CUSTOM_AUDIENCES_API_VERSION,FACEBOOK_CUSTOM_AUDIENCES_CANARY_API_VERSION) [1] [2]GOOGLE_SHEETS_API_VERSION) [1] [2] [3] [4] [5]TABOOLA_API_VERSION) [1] [2] [3] [4] [5]TIKTOK_OFFLINE_CONVERSIONS_API_VERSION) [1] [2]Code Quality and Maintainability
Minor Logic and Formatting Adjustments
These changes collectively improve code maintainability, clarity, and consistency across the codebase.
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'