-
Notifications
You must be signed in to change notification settings - Fork 294
tier-1/batch-2: refactor API versioning to use versioning-info module #3471
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 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.tsfiles 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_VERSIONfrom 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 |
packages/destination-actions/src/destinations/reddit-conversions-api/index.ts
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
…ns-api/index.ts Co-authored-by: Copilot <[email protected]>
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
Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.
This pull request standardizes API version management across several destination integrations by moving API version strings into dedicated
versioning-info.tsfiles 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
versioning-info.tsfiles 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