Skip to content

Update Serving API - from backend PR #5532 - #336

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

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

Conversation

@clllaur

@clllaur clllaur commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

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

@clllaur
clllaur requested a review from a team September 24, 2025 09:29
@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 focuses on synchronizing the TypeScript Serving API with the latest backend modifications. It primarily involves updating and clarifying existing type definitions and their JSDoc comments to improve developer understanding and API usability. Key additions include new rule types for audience segmentation, dedicated API endpoints for fetching visitor data, and the introduction of concurrency control mechanisms for managing experience changes. These updates ensure the frontend API accurately reflects the backend's capabilities and provides robust, well-documented interfaces.

Highlights

  • API Type Updates: The TypeScript Serving API definitions have been updated to reflect recent backend changes, ensuring consistency and accuracy across the platform.
  • Enhanced Documentation: Numerous JSDoc comments have been significantly expanded and clarified across various types, providing more detailed explanations for fields like pagination, sorting, rule definitions, and integration settings.
  • New Rule Types and Matchers: Introduced RuleObjectAudience for audience-specific rules, added visitor_id to TextMatchRulesTypes, and implemented new VisitorDataExistsMatchRulesTypes and VisitorDataExistsMatchRule for more granular targeting capabilities.
  • Visitor Data Endpoints: New API endpoints (/visitor-data/{account_id}/{project_id}/{visitor_id} and /visitor-data/{sdk_key}/{visitor_id}) have been added to retrieve visitor-specific data, along with corresponding response types.
  • Concurrency Control for Experience Changes: A concurrency_key has been added to various ExperienceChange types, enabling optimistic concurrency control to prevent data conflicts during updates.
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.

@sonarqubecloud

Copy link
Copy Markdown

@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 Serving API types to align with recent backend changes. The modifications are extensive, introducing new types and API endpoints, and significantly improving the JSDoc comments for better clarity. My review focuses on ensuring the documentation is consistent and descriptive throughout the generated file. I've identified several areas where comments could be more precise and have provided suggestions for improvement. Additionally, I've noted a minor formatting issue regarding a missing newline at the end of the file. Overall, these changes are a valuable enhancement to the type definitions.

Comment on lines 1183 to 1185
/**
* Object that represents one change done inside an experience
*/

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 comment for ExperienceChangeServing is vague. To improve clarity, please provide a more descriptive comment explaining its purpose, similar to the other ExperienceChange... types.

Suggested change
/**
* Object that represents one change done inside an experience
*/
/**
* Represents a single, specific modification for serving, which is a lightweight version of an experience change.
*/

Comment thread packages/types/src/config/types.gen.ts
Comment thread packages/types/src/config/types.gen.ts
Comment thread packages/types/src/config/types.gen.ts
Comment thread packages/types/src/config/types.gen.ts
Comment thread packages/types/src/config/types.gen.ts
Comment thread packages/types/src/config/types.gen.ts
Comment thread packages/types/src/config/types.gen.ts
Comment thread packages/types/src/config/types.gen.ts
@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