Update Serving API - from backend PR #6390 - #370
Conversation
There was a problem hiding this comment.
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; |
| * | ||
| */ | ||
| 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'; |
There was a problem hiding this comment.
The IntegrationProvider union type should maintain alphabetical order. microsoft_clarity should be placed before mixpanel to stay consistent with the existing sorting pattern.
| 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'; |
| MIXPANEL: 'mixpanel', | ||
| MICROSOFT_CLARITY: 'microsoft_clarity', |
There was a problem hiding this comment.
| 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; |
There was a problem hiding this comment.
To maintain consistency and readability, ExperienceIntegrationMicrosoftClarity should be defined before ExperienceIntegrationMixpanel to follow alphabetical order.
| 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'; |
e16b159 to
892ff4c
Compare
|



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