Skip to content

Update Serving API - from backend PR #5782 - #338

Closed
clllaur wants to merge 1 commit into
main-convertfrom
api-serving-update-5782
Closed

Update Serving API - from backend PR #5782#338
clllaur wants to merge 1 commit into
main-convertfrom
api-serving-update-5782

Conversation

@clllaur

@clllaur clllaur commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

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

@clllaur
clllaur requested a review from a team November 7, 2025 13:03
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @clllaur, 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 synchronizes the TypeScript Serving API definitions with recent updates from the backend repository (PR #5782). The changes introduce a more robust type definition for audience rule objects and add new fields to track placeholders within both individual experiences and global JavaScript configurations. This ensures that the frontend's type definitions accurately reflect the latest backend data structures, maintaining consistency and preventing potential type-related issues.

Highlights

  • Audience Rule Structure: The RuleObjectAudience type has been significantly updated to provide a more detailed and structured definition for logical rules. This new structure supports complex nested OR and AND conditions, enabling more sophisticated audience targeting and goal triggering within the application.
  • Experience Placeholders: A new optional placeholders field, an array of strings, has been added to the ConfigExperience type. This field will now track all placeholders utilized within a specific experience, including those from changes, global JavaScript, and global CSS.
  • Global JavaScript Placeholders: The ConfigProject type now includes an optional global_javascript_placeholders field, also an array of strings. This addition allows for the explicit tracking of placeholders used specifically within a project's Global JavaScript configurations (e.g., convertPlaceholders.<key>).
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@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 TypeScript types for the Serving API, which appear to be auto-generated. The changes add new properties for placeholders in ConfigExperience and ConfigProject. However, a critical issue was introduced: the RuleObjectAudience type is defined twice. This will break the build and must be fixed. Since the file is auto-generated, the fix might be required in the source OpenAPI definition that is used to generate these types.

Comment thread packages/types/src/config/types.gen.ts Outdated
Comment on lines +792 to +811
/**
* This one describes a logical rule that is being used inside the app for triggering goals, matching audiences etc
*/
export type RuleObjectAudience = {
/**
* This describes an outer set of blocks which are evaluated using OR's between them
*/
OR?: Array<{
/**
* An array of OR_WHEN-blocks.
*/
AND?: Array<{
/**
* An array of individual rule elements that do not involve URL matching.
*/
OR_WHEN?: Array<RuleElementAudience>;
}>;
}>;
} | null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The type RuleObjectAudience is declared twice. The first declaration is on lines 775-790. This duplication will cause a TypeScript compilation error (Duplicate identifier 'RuleObjectAudience'). This entire block should be removed.

@clllaur
clllaur force-pushed the api-serving-update-5782 branch from 7cd4de8 to 1a8db30 Compare November 12, 2025 14:29
@sonarqubecloud

Copy link
Copy Markdown

@abbaseya abbaseya closed this Nov 20, 2025
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