chore(codegen): daily schema refresh (2026-06-18)#40
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerated src/generated/api.d.ts from the live PostHog OpenAPI spec (https://us.posthog.com/api/schema/) filtered by openapi-filter.yaml. Schema drift only — the set of tracked operations is unchanged (71 ops). PostHog evolved component schemas referenced by tracked operations (new dashboard tile/widget configs, experiment configs, feature-flag metadata, team configs). Breaking rename: the dashboard PATCH body schema was renamed upstream from PatchedDashboard to PatchedPatchedDashboardOpenApi. Updated the type reference in src/resources/dashboard/client.ts to match; the new schema carries the same restriction_level / tiles / delete_insights fields the client relies on. No openapi-filter.yaml changes: every new live operationId is either an unmanaged product surface or an auxiliary/PUT-variant endpoint the CRUD clients don't use. Generated-By: PostHog Code Task-Id: 598ed80d-2ec6-4c5f-ac98-b680dad274aa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Daily OpenAPI schema refresh — 2026-06-18
Regenerated
src/generated/api.d.tsviapnpm codegenfrom the live PostHogOpenAPI spec (
https://us.posthog.com/api/schema/?format=json), filtered byopenapi-filter.yaml. Not hand-edited.Spec diff size
src/generated/api.d.ts: +1783 / −137 linesThe drift is entirely in component schemas referenced by already-tracked
operations — PostHog evolved its dashboard tile/widget configs, experiment
configs, feature-flag metadata, and team configs. Newly pulled-in schemas
include
DashboardPatchTileOpenApi,DashboardPatchWidgetOpenApi,*WidgetConfig(Activity/ErrorTracking/SessionReplay/Experiments), severalExperiment*Configtypes,MinimalFeatureFlag, andTeam*Config.New operationIds added to the filter
None. Every live operationId missing from
openapi-filter.yamlfalls intoone of two buckets, neither of which warrants managing in the typed client:
Unmanaged product surfaces (the overwhelming majority) —
accounts_*,agent_applications_*,alerts_*,annotations_*,surveys_*,error_tracking_*,warehouse_*,logs_*,llm_analytics_*,tasks_*,etc. This IaC tool manages a deliberately curated set (insights, dashboards,
feature flags, endpoints, event definitions, property groups, experiments +
holdouts/saved-metrics, cohorts, actions, project settings). Adding a brand
new resource family is a product/design decision, not something an automated
daily refresh should do unattended.
Auxiliary / PUT-variant endpoints on already-managed families — e.g.
actions_bulk_update_tags_create,actions_references_list,cohorts_activity_retrieve,cohorts_persons_retrieve,event_definitions_metrics_retrieve,feature_flags_activity_retrieve,dashboards_collaborators_*, plus full-replace*_update(PUT) variants(
cohorts_update,event_definitions_update,experiments_update,experiment_holdouts_update,experiment_saved_metrics_update) where theresource clients intentionally use
*_partial_update(PATCH). The CRUDclients don't call any of these, so adding them would only bloat the
generated types.
No new operationId represents a core CRUD operation newly available on a
managed family, so the filter is left unchanged.
Resources touched
src/resources/dashboard/client.ts— upstream renamed the dashboard PATCHbody schema
PatchedDashboard→PatchedPatchedDashboardOpenApi. Updated theone type alias to match. The new schema carries the same
restriction_level/tiles/delete_insightsfields the client relies on,so behavior is unchanged. This was the only schema-drift breakage.
Unresolved drift
still present), so there is nothing for a human to delete.
src/client/typed-posthog.ts,src/resources/types.ts, andsrc/resources/dashboard/pipeline.acceptance.test.tsexist on
mainand are unrelated to this refresh — left untouched.Verification
pnpm typecheck✅pnpm test✅ (291 tests, 35 files)Originating TaskRun
Task-Id:
598ed80d-2ec6-4c5f-ac98-b680dad274aa🤖 Generated with Claude Code