Skip to content

Update Serving API - from backend PR #5230 - #312

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

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

Conversation

@clllaur

@clllaur clllaur commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

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

@clllaur
clllaur requested a review from a team June 12, 2025 21:14

@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.

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 updates the TypeScript type definitions for the Serving API. The changes reflect recent modifications made in the backend repository's PR #5230, involving the addition and removal of specific fields and types within the configuration structures.

Highlights

  • New Type Added: I've added a new type UploadedFileData to represent file objects, including their storage key, original name, and URL.
  • Field Added: I've added an optional idempotency_key field to the ExperienceChangeBase type, which is noted as being supported only for update requests.
  • Field Removed: I've removed the environments field from the ConfigProject type.
  • Documentation Update: I've updated the documentation comment for the global_javascript field in ConfigProject to clarify how it interacts with environment-specific global JS.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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 configureGemini 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 TypeScript type definitions for the Serving API, reflecting changes from a backend PR. Key changes include the introduction of an UploadedFileData type, the addition of an idempotency_key to ExperienceChangeBase, an update to the documentation for global_javascript, and the removal of the environments map from ConfigProject. The changes are generally clear, with suggestions to improve JSDoc clarity for better maintainability.

Comment on lines +980 to +1003
/**
* File Object
*/

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 summary /** File Object */ is quite generic. Consider making it more descriptive to better convey the purpose and content of the UploadedFileData type. A more detailed summary can improve long-term maintainability and understanding for other developers.

/**
 * Represents metadata for a file that has been uploaded,
 * including its storage key, original name, and access URL.
 */

Comment on lines +2255 to +2373
* the tracking script is installed, prior to processing any of
* experiences, goals, audiences etc. When an environment is specified in the request,
* this will be combined with the environment-specific global_js (if any) by appending
* the environment's code with a newline character.

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

This JSDoc update clarifies the behavior of global_javascript when an environment is specified. Consider adding a note about potential conflicts or unexpected behavior if environment-specific and global JS code interact. This could prevent confusion and aid debugging.

/**
     * The global javascript code that will be loaded on all pages where
     * the tracking script is installed, prior to processing any of
     * experiences, goals, audiences etc. When an environment is specified in the request,
     * this will be combined with the environment-specific global_js (if any) by appending
     * the environment's code with a newline character.
     * Note: Ensure environment-specific and global JS code are compatible to avoid conflicts.
     */

@clllaur
clllaur force-pushed the api-serving-update-5230 branch 3 times, most recently from 55fba3d to de0d471 Compare July 3, 2025 15:22
@clllaur
clllaur force-pushed the api-serving-update-5230 branch from de0d471 to f8f60b5 Compare July 17, 2025 12:39
@clllaur
clllaur force-pushed the api-serving-update-5230 branch from f8f60b5 to 3fab506 Compare July 29, 2025 20:46
@sonarqubecloud

Copy link
Copy Markdown

@abbaseya abbaseya closed this Sep 26, 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