Update API types to latest#639
Conversation
Summary by CodeRabbit
WalkthroughPR adds comprehensive vulnerability tracking types for CVEs, devices, and fleets via OpenAPI code generation; extends semantic versioning for software catalog items; implements event system support for vulnerability and dependency change notifications; and updates UI translations accordingly with minor type system adjustments. ChangesVulnerability types and event system
🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
9fecc5a to
d8f568a
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
libs/types/alpha/models/FleetVulnerabilitySummaryResponse.ts (1)
13-15: ⚡ Quick winUse a literal type for
kindvia the OpenAPI schema.
kindis documented as alwaysFleetVulnerabilitySummary, butstringallows invalid values and weakens type narrowing. Please set this field asconst/single-valueenumin the OpenAPI spec so generation emits a literal type (same applies to the other newkindfields in this PR).As per coding guidelines, "-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@libs/types/alpha/models/FleetVulnerabilitySummaryResponse.ts` around lines 13 - 15, The `kind` property in FleetVulnerabilitySummaryResponse is currently typed as `string`, but it should be a literal `"FleetVulnerabilitySummary"`; update the OpenAPI schema for the FleetVulnerabilitySummaryResponse model to set `kind` as a const or single-value enum (e.g. enum: ["FleetVulnerabilitySummary"] or x-const) so the generated TypeScript emits a string literal type instead of `string`; apply the same change to the other new `kind` fields introduced in this PR to ensure proper type narrowing and stronger typing across models.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@libs/types/alpha/models/FleetVulnerabilitySummaryResponse.ts`:
- Around line 13-15: The `kind` property in FleetVulnerabilitySummaryResponse is
currently typed as `string`, but it should be a literal
`"FleetVulnerabilitySummary"`; update the OpenAPI schema for the
FleetVulnerabilitySummaryResponse model to set `kind` as a const or single-value
enum (e.g. enum: ["FleetVulnerabilitySummary"] or x-const) so the generated
TypeScript emits a string literal type instead of `string`; apply the same
change to the other new `kind` fields introduced in this PR to ensure proper
type narrowing and stronger typing across models.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: b26f5b1f-21fe-4425-a646-13b37ea8bc36
📒 Files selected for processing (29)
libs/i18n/locales/en/translation.jsonlibs/types/alpha/index.tslibs/types/alpha/models/AffectedFleet.tslibs/types/alpha/models/CatalogItemVersion.tslibs/types/alpha/models/CveCountsBySeverity.tslibs/types/alpha/models/DeviceCountsBySeverity.tslibs/types/alpha/models/DeviceVulnerabilitySummaryResponse.tslibs/types/alpha/models/FleetVulnerabilitySummary.tslibs/types/alpha/models/FleetVulnerabilitySummaryResponse.tslibs/types/alpha/models/SemVer.tslibs/types/alpha/models/SemVerRange.tslibs/types/alpha/models/Vulnerability.tslibs/types/alpha/models/VulnerabilityGroup.tslibs/types/alpha/models/VulnerabilityGroupItem.tslibs/types/alpha/models/VulnerabilityGroupList.tslibs/types/alpha/models/VulnerabilityImageRef.tslibs/types/alpha/models/VulnerabilityImpact.tslibs/types/alpha/models/VulnerabilityList.tslibs/types/alpha/models/VulnerabilitySeveritySummary.tslibs/types/alpha/models/VulnerabilitySummaryResponse.tslibs/types/imagebuilder/models/ImageBuildConditionReason.tslibs/types/index.tslibs/types/models/ConditionType.tslibs/types/models/DependencyChangeDetectedDetails.tslibs/types/models/DeviceVulnerabilityCveDetails.tslibs/types/models/Event.tslibs/types/models/EventDetails.tslibs/types/models/K8sProviderSpec.tslibs/ui-components/src/components/Events/useEvents.ts
No description provided.