Skip to content

chore(codegen): daily schema refresh (2026-06-19)#41

Open
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-06-19
Open

chore(codegen): daily schema refresh (2026-06-19)#41
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-06-19

Conversation

@timgl

@timgl timgl commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Daily OpenAPI schema refresh — 2026-06-19

Regenerated src/generated/api.d.ts from the live PostHog OpenAPI schema
(https://us.posthog.com/api/schema/?format=json, filtered by openapi-filter.yaml).
No hand-edits to the generated file — produced via pnpm codegen.

Spec diff size

  • src/generated/api.d.ts: +1830 / −138 (1 file)
  • Net-new component schemas pulled in by managed resources: AccountsQuery,
    AccountsQueryResponse, CalendarHeatmapFilter, DashboardPatchTileOpenApi,
    DashboardPatchWidgetOpenApi, DataWarehouseSyncWarning,
    ActivityEventsListWidgetConfig / ErrorTrackingListWidgetConfig /
    ExperimentsListWidgetConfig / ExperimentResultsWidgetConfig /
    SessionReplayListWidgetConfig, ExperimentExposureEstimateConfig,
    ExperimentMetricOutlierHandling, ExperimentRunningTimeCalculation,
    FeatureFlagExperimentSetMetadata, MinimalFeatureFlag,
    TeamCustomerAnalyticsConfig, TeamWorkflowsConfig, and dashboard widget
    filter helpers. New enum values include ChartDisplayType: "SlopeGraph" and
    four AvailableSetupTaskIdsEnum entries (use_posthog_ai, use_posthog_code,
    use_posthog_mcp, use_posthog_in_slack).
  • One breaking rename: the dashboard PATCH request body schema
    PatchedDashboardPatchedPatchedDashboardOpenApi. Field shape (name,
    tags, restriction_level, tiles) is unchanged.

New operationIds added to the filter

None. The drift detector reports every live-spec operationId absent from
openapi-filter.yaml — i.e. the entire unfiltered PostHog API surface (~hundreds
of ops across error-tracking, warehouse, llm-analytics, surveys, etc.). The filter
is a deliberately curated allowlist of CRUD on the managed IaC resources
(insights, dashboards, feature flags, endpoints, event definitions, schema
property groups, event schemas, experiment holdouts/saved-metrics, experiments,
environments, cohorts, actions). None of the reported ops extend a managed family
with anything the IaC client needs (the rest are auxiliary endpoints —
sharing/activity/bulk-tag/PUT-variants — or brand-new product surfaces). Adopting
a new resource family is a deliberate human decision via the add-resource skill,
not an automated daily-refresh action, so nothing was added.

Resources touched

  • src/resources/dashboard/client.ts — updated one type alias from
    components["schemas"]["PatchedDashboard"] to
    components["schemas"]["PatchedPatchedDashboardOpenApi"] to track the rename.
    Minimal, no behavior change.

Unresolved drift / removals

  • No managed operationIds disappeared from the live spec — all 71 filter
    entries are still present in the regenerated schema. Nothing to flag for human
    deletion this run.

Verification

  • pnpm typecheck
  • pnpm test ✅ (291/291; one pull/run.test.ts 500ms timeout is load-flaky and
    passes in isolation / on re-run — unrelated to the schema)

Generated by the daily schema-refresh agent · TaskRun 260bfeb3-e2be-4a6a-8e44-c5a703930237

Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema.

Changes are additive evolution of already-managed resource component schemas
(new query kinds, dashboard widget configs, experiment metadata, sync warnings)
plus one breaking rename: the dashboard PATCH request body schema
`PatchedDashboard` became `PatchedPatchedDashboardOpenApi`. Updated the
dashboard client's type reference to match; the field shape (name, tags,
restriction_level, tiles) is unchanged.

No new operationIds added to openapi-filter.yaml. No managed operationIds
disappeared from the live spec.

Generated-By: PostHog Code
Task-Id: 260bfeb3-e2be-4a6a-8e44-c5a703930237
@timgl timgl requested a review from pl June 19, 2026 08:52
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.

1 participant