Skip to content

Update Serving API - from backend PR #6358#368

Open
clllaur wants to merge 1 commit intomain-convertfrom
api-serving-update-6358
Open

Update Serving API - from backend PR #6358#368
clllaur wants to merge 1 commit intomain-convertfrom
api-serving-update-6358

Conversation

@clllaur
Copy link
Copy Markdown
Contributor

@clllaur clllaur commented Mar 25, 2026

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

@clllaur clllaur requested a review from a team March 25, 2026 13:55
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the TypeScript Serving API definitions to reflect recent changes in the backend repository. It introduces new types and constants related to account billing status, product lines, and visitor sampling rates, while also extending existing definitions for custom domains and traffic sources.

Highlights

  • New Billing Status Definitions: Introduced PlanStatus type and constant for account billing statuses like 'paid', 'trial', and 'canceled'.
  • Product Line Enumeration: Added Products type and constant to categorize Convert product lines such as 'experiences', 'deploy', and 'addons'.
  • Visitor Sampling Rate: Incorporated sampling_rate as a new property within VisitorInsightsBase and defined its corresponding type and constant.
  • Custom Domain Versioning: Added an optional version property to the custom_domain configuration within ConfigProject.
  • Extended Traffic Source: Expanded the source type and constant to include 'ai_tool' as a new traffic source option.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

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

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 introduces several new types and constants to packages/types/src/config/types.gen.ts. Key additions include PlanStatus and Products definitions, a sampling_rate type and constant for Convert Signals, an optional version field for custom domains within ConfigProject, and an extension of the source type to include ai_tool. Review feedback indicates opportunities to improve the generated code by removing redundant JSDoc comments for PlanStatus, Products, and sampling_rate constants, and by correcting the naming convention of sampling_rate to SamplingRate for consistency. These issues are attributed to the code generator or OpenAPI specification.

Comment on lines +47 to +49
/**
* Account billing status
*/
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 JSDoc comment here is a duplicate of the one for the PlanStatus type on lines 42-44. To avoid redundancy and improve maintainability, this comment block can be removed. Since this is a generated file, this issue likely originates from the code generator or the underlying OpenAPI specification.

Comment on lines +67 to +73
/**
* The Convert product line this billing plan pertains to.
* - `experiences`: Relates to A/B testing, MVT, Split URL, and personalization features.
* - `deploy`: Relates to the "Deploy" feature for rolling out changes to specific audiences without A/B testing reports. Knowledge Base: "Deployments have the potential to contain small segments...and this could be interpreted by Privacy Authorities in Europe as identification of data subjects."
* - `addons`: Relates to add-on products that extend the core platform capabilities.
*
*/
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 JSDoc comment here is a duplicate of the one for the Products type on lines 58-64. To avoid redundancy and improve maintainability, this comment block can be removed. Since this is a generated file, this issue likely originates from the code generator or the underlying OpenAPI specification.

Comment on lines +982 to +1001
/**
* The percentage of visitors included in sampling for Convert Signals session recordings and Heatmaps for this project.
* Higher values collect data from a larger share of traffic and consume allocation faster.
*
*/
export type sampling_rate = 5 | 10 | 20 | 30 | 40 | 50;

/**
* The percentage of visitors included in sampling for Convert Signals session recordings and Heatmaps for this project.
* Higher values collect data from a larger share of traffic and consume allocation faster.
*
*/
export const sampling_rate = {
'_5': 5,
'_10': 10,
'_20': 20,
'_30': 30,
'_40': 40,
'_50': 50
} as const;
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

There are a couple of areas for improvement with the new sampling_rate type and constant:

  1. Duplicated JSDoc: The documentation comment is repeated for both the type and the constant. This is redundant.
  2. Inconsistent Naming: The name sampling_rate uses snake_case, which is inconsistent with the PascalCase convention used for other new types like PlanStatus and Products in this file.

To improve maintainability and consistency, I suggest renaming it to SamplingRate and removing the duplicated comment. Since this is a generated file, these changes should ideally be addressed in the OpenAPI specification or the generator configuration.

/**
 * The percentage of visitors included in sampling for Convert Signals session recordings and Heatmaps for this project.
 * Higher values collect data from a larger share of traffic and consume allocation faster.
 *
 */
export type SamplingRate = 5 | 10 | 20 | 30 | 40 | 50;

export const SamplingRate = {
    '_5': 5,
    '_10': 10,
    '_20': 20,
    '_30': 30,
    '_40': 40,
    '_50': 50
} as const;

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.

2 participants