Update Serving API - from backend PR #5230 - #312
Conversation
There was a problem hiding this comment.
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
UploadedFileDatato represent file objects, including their storage key, original name, and URL. - Field Added: I've added an optional
idempotency_keyfield to theExperienceChangeBasetype, which is noted as being supported only for update requests. - Field Removed: I've removed the
environmentsfield from theConfigProjecttype. - Documentation Update: I've updated the documentation comment for the
global_javascriptfield inConfigProjectto 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
-
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. ↩
There was a problem hiding this comment.
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.
| /** | ||
| * File Object | ||
| */ |
There was a problem hiding this comment.
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.
*/| * 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. |
There was a problem hiding this comment.
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.
*/55fba3d to
de0d471
Compare
de0d471 to
f8f60b5
Compare
f8f60b5 to
3fab506
Compare
|



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