Skip to content

Conversation

@abhandage
Copy link
Contributor

@abhandage abhandage commented Nov 19, 2025

This pull request introduces a standardized approach to API versioning across several destination integrations by extracting API version strings into dedicated constants and updating endpoint constructions to use these constants. This improves maintainability and consistency when updating or managing API versions in the future.

The most important changes are:

API Versioning Standardization

  • Introduced version constants (*_API_VERSION) in new versioning-info.ts files for each integration: Ambee, Antavo, Angler AI, AAMPE, and Aggregations.io, and updated all endpoint constructions to use these constants instead of hardcoded version strings. [1] [2] [3] [4] [5]

Endpoint Construction Refactoring

  • Refactored all affected integrations (Ambee, Antavo, Angler AI, AAMPE, Aggregations.io) to build their base URLs and endpoints using the new API version constants, ensuring that any future version changes require modification in only one place. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Minor Consistency Improvements

  • Updated string formatting in Antavo profile action property descriptions for consistency (single to double quotes).

These changes collectively make it easier to manage API versions and reduce the risk of errors when updating endpoints across multiple destinations.

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.

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
  • [Segmenters] Tested in the staging environment
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

Security Review

Please ensure sensitive data is properly protected in your integration.

  • Reviewed all field definitions for sensitive data (API keys, tokens, passwords, client secrets) and confirmed they use type: 'password'

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.97%. Comparing base (53b87bf) to head (8180640).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ation-actions/src/destinations/angler-ai/routes.ts 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3431      +/-   ##
==========================================
+ Coverage   79.95%   79.97%   +0.01%     
==========================================
  Files        1223     1228       +5     
  Lines       22691    22706      +15     
  Branches     4504     4503       -1     
==========================================
+ Hits        18143    18158      +15     
  Misses       3717     3717              
  Partials      831      831              

☔ 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

This PR introduces a centralized approach for managing API version constants across multiple destination integrations. The changes extract hardcoded API version strings into dedicated versioning-info.ts files, making version management more maintainable and consistent.

  • Introduces versioning-info.ts files for 5 destinations (aampe, aggregations-io, ambee, angler-ai, antavo)
  • Replaces hardcoded API version strings with imported constants
  • Updates quote styles from escaped single quotes to double quotes in several field descriptions

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
antavo/versioning-info.ts New file defining ANTAVO_API_VERSION constant
antavo/profile/index.ts Updates API version usage and quote style in field descriptions
antavo/event/index.ts Updates URL construction to use ANTAVO_API_VERSION constant
angler-ai/versioning-info.ts New file defining ANGLER_AI_API_VERSION constant
angler-ai/routes.ts Updates all endpoint functions to use ANGLER_AI_API_VERSION
ambee/versioning-info.ts New file defining AMBEE_API_VERSION constant
ambee/subscribeUserToCampaign/index.ts Updates to use AMBEE_API_VERSION with base URL constant
ambee/index.ts Updates authentication test endpoint to use AMBEE_API_VERSION
aggregations-io/versioning-info.ts New file defining AGGREGATIONS_IO_API_VERSION constant
aggregations-io/index.ts Updates authentication endpoint to use AGGREGATIONS_IO_API_VERSION
aampe/versioning-info.ts New file defining AAMPE_API_VERSION constant
aampe/constants.ts Updates all region URL constants to use AAMPE_API_VERSION

Comment on lines 100 to +102
}
}
},
}
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Removed trailing comma after the 'mobile_phone' property definition, which is inconsistent with JavaScript/TypeScript conventions that typically include trailing commas for better version control diffs.

Copilot uses AI. Check for mistakes.
mobile_phone: {
'@path': '$.traits.mobile_phone'
}
}
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Removed trailing comma after the data field's default object, which is inconsistent with the codebase's typical formatting that includes trailing commas.

Suggested change
}
},

Copilot uses AI. Check for mistakes.
@abhandage abhandage changed the title batch 1 destination-upgrade-analyzer: extract out API versions from code (batch 1) Nov 20, 2025
@abhandage abhandage marked this pull request as ready for review November 20, 2025 06:05
@abhandage abhandage requested a review from a team as a code owner November 20, 2025 06:05
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