Update Serving API - from backend PR #5782 - #338
Conversation
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| /** | ||
| * 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; | ||
|
|
7cd4de8 to
1a8db30
Compare
|



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