Skip to content

Update Serving API - from backend PR #6390 - #370

Merged
JosephSamirL merged 2 commits into
main-convertfrom
api-serving-update-6390
Apr 6, 2026
Merged

Update Serving API - from backend PR #6390#370
JosephSamirL merged 2 commits into
main-convertfrom
api-serving-update-6390

Conversation

@clllaur

@clllaur clllaur commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Updating TS Serving API after the latest changes from backend repo,
PR #6390

@clllaur
clllaur requested a review from a team April 2, 2026 15:32

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the configuration types by adding PlanStatus, Products, and sampling_rate definitions. It also introduces support for Microsoft Clarity as an integration provider, adds a version field to project domain configurations, and includes ai_tool as a new traffic source. The review feedback suggests improving code maintainability by utilizing the newly defined types for sampling_rate and source instead of inlining union types, and recommends maintaining alphabetical order for the new integration provider entries and type definitions.

* Higher values collect data from a larger share of traffic and consume allocation faster.
*
*/
sampling_rate?: 5 | 10 | 20 | 30 | 40 | 50;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Instead of inlining the union type, use the sampling_rate type defined below to reduce redundancy and improve maintainability.

Suggested change
sampling_rate?: 5 | 10 | 20 | 30 | 40 | 50;
sampling_rate?: sampling_rate;

Comment thread packages/types/src/config/types.gen.ts Outdated
*
*/
export type IntegrationProvider = 'baidu' | 'clicktale' | 'clicky' | 'cnzz' | 'crazyegg' | 'econda' | 'eulerian' | 'google_analytics' | 'gosquared' | 'heapanalytics' | 'hotjar' | 'mixpanel' | 'mouseflow' | 'piwik' | 'segmentio' | 'sitecatalyst' | 'woopra' | 'ysance';
export type IntegrationProvider = 'baidu' | 'clicktale' | 'clicky' | 'cnzz' | 'crazyegg' | 'econda' | 'eulerian' | 'google_analytics' | 'gosquared' | 'heapanalytics' | 'hotjar' | 'mixpanel' | 'microsoft_clarity' | 'mouseflow' | 'piwik' | 'segmentio' | 'sitecatalyst' | 'woopra' | 'ysance';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The IntegrationProvider union type should maintain alphabetical order. microsoft_clarity should be placed before mixpanel to stay consistent with the existing sorting pattern.

Suggested change
export type IntegrationProvider = 'baidu' | 'clicktale' | 'clicky' | 'cnzz' | 'crazyegg' | 'econda' | 'eulerian' | 'google_analytics' | 'gosquared' | 'heapanalytics' | 'hotjar' | 'mixpanel' | 'microsoft_clarity' | 'mouseflow' | 'piwik' | 'segmentio' | 'sitecatalyst' | 'woopra' | 'ysance';
export type IntegrationProvider = 'baidu' | 'clicktale' | 'clicky' | 'cnzz' | 'crazyegg' | 'econda' | 'eulerian' | 'google_analytics' | 'gosquared' | 'heapanalytics' | 'hotjar' | 'microsoft_clarity' | 'mixpanel' | 'mouseflow' | 'piwik' | 'segmentio' | 'sitecatalyst' | 'woopra' | 'ysance';

Comment thread packages/types/src/config/types.gen.ts Outdated
Comment on lines +1685 to +1686
MIXPANEL: 'mixpanel',
MICROSOFT_CLARITY: 'microsoft_clarity',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The IntegrationProvider constant should maintain alphabetical order. MICROSOFT_CLARITY should be placed before MIXPANEL.

Suggested change
MIXPANEL: 'mixpanel',
MICROSOFT_CLARITY: 'microsoft_clarity',
MICROSOFT_CLARITY: 'microsoft_clarity',
MIXPANEL: 'mixpanel',

Comment thread packages/types/src/config/types.gen.ts Outdated
Comment on lines +1761 to +1768
export type ExperienceIntegrationMixpanel = ExperienceIntegrationBase;

/**
* Configuration for Microsoft Clarity. When enabled, experiment context can be sent for segmentation in Clarity recordings and heatmaps.
* No provider-specific settings beyond `enabled` are required; the Clarity project ID is configured in your site’s global JavaScript.
*
*/
export type ExperienceIntegrationMicrosoftClarity = ExperienceIntegrationBase;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To maintain consistency and readability, ExperienceIntegrationMicrosoftClarity should be defined before ExperienceIntegrationMixpanel to follow alphabetical order.

Suggested change
export type ExperienceIntegrationMixpanel = ExperienceIntegrationBase;
/**
* Configuration for Microsoft Clarity. When enabled, experiment context can be sent for segmentation in Clarity recordings and heatmaps.
* No provider-specific settings beyond `enabled` are required; the Clarity project ID is configured in your site’s global JavaScript.
*
*/
export type ExperienceIntegrationMicrosoftClarity = ExperienceIntegrationBase;
/**
* Configuration for Microsoft Clarity. When enabled, experiment context can be sent for segmentation in Clarity recordings and heatmaps.
* No provider-specific settings beyond `enabled` are required; the Clarity project ID is configured in your site’s global JavaScript.
*
*/
export type ExperienceIntegrationMicrosoftClarity = ExperienceIntegrationBase;
export type ExperienceIntegrationMixpanel = ExperienceIntegrationBase;

* Traffic source
*/
source?: 'campaign' | 'search' | 'referral' | 'direct';
source?: 'campaign' | 'search' | 'referral' | 'direct' | 'ai_tool';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Instead of inlining the union type, use the source type defined below to reduce redundancy and improve maintainability.

Suggested change
source?: 'campaign' | 'search' | 'referral' | 'direct' | 'ai_tool';
source?: source;

@clllaur
clllaur force-pushed the api-serving-update-6390 branch from e16b159 to 892ff4c Compare April 3, 2026 16:10
@sonarqubecloud

sonarqubecloud Bot commented Apr 6, 2026

Copy link
Copy Markdown

@JosephSamirL
JosephSamirL merged commit 420a408 into main-convert Apr 6, 2026
5 checks passed
@JosephSamirL
JosephSamirL deleted the api-serving-update-6390 branch April 6, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants