chore(codegen): daily schema refresh (2026-06-02)#24
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec (https://us.posthog.com/api/schema/?format=json) filtered by openapi-filter.yaml. Drift is purely additive transitive schema changes referenced by managed resources (insight/dashboard query union, experiment metric outlier-handling fields, DataWarehouseSyncWarning) plus harmless generated type-alias renames. typecheck and the full test suite pass with no Zod/pipeline changes. No openapi-filter.yaml change: every new operationId is either an unmanaged resource family (out of scope) or a redundant PUT-twin / auxiliary action on an already-managed family. Generated-By: PostHog Code Task-Id: 152bb044-8140-419f-94af-4990d430557e
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-02
Automated regeneration of
src/generated/api.d.tsfrom the live PostHog OpenAPIspec (
https://us.posthog.com/api/schema/?format=json, filtered byopenapi-filter.yaml).Spec diff size
src/generated/api.d.ts: +990 / −24 (1 file changed; 17,571 → 18,537 lines)openapi-filter.yaml: unchangedThe drift is purely additive — transitive schemas pulled in by operations we
already manage:
AccountsQuery/AccountsQueryResponseadded to the insight/dashboardsource query union.
ExperimentMetricOutlierHandling,denominator_outlier_handling,numerator_outlier_handling,ignore_zeros,percentile bounds.
DataWarehouseSyncWarningcomponent referenced by many query responses.ParserModeenum; assorted generated type-alias renames(
AggregationPropertyType1→AggregationPropertyType,Response*unionrenumbering).
pnpm typecheckandpnpm test(291 tests) both pass with no changes toany Zod schema or
pipeline.tsprojection — no managed-resource shape broke.New operationIds added to the filter
None. 1,940 operationIds exist in the live spec but not in the filter — this
is essentially the entire unmanaged API surface, not a day-over-day delta. Triaged
against the managed families:
partial_update) —not needed:
endpoints_update,event_definitions_update,schema_property_groups_update,event_schemas_update,experiment_holdouts_update,experiment_saved_metrics_update,experiments_update,cohorts_update.create/read/update/delete lifecycle, so deliberately excluded: sharing/passwords,
activity logs,
bulk_update_tags, collaborators, tile/widget ops,run/versions/materialization,stats/timeseries,duplicate,copy_to_project, etc.event_schemas_partial_update/event_schemas_update— event schemas aremanaged as immutable today (filter exposes only list/create/destroy); adding
update is a client+pipeline change, not a filter refresh, so out of scope here.
Brand-new resource families (not added)
The remaining new operationIds belong to families not managed by
posthog-definitions (accounts, alerts, annotations, surveys, comments, roles,
persons, batch-exports, error-tracking, llm-analytics, warehouse, …). Onboarding
a family is an explicit, dev-project-verified, multi-file process (the
add-resourceskill) and is not appropriate to fan out unattended in a dailyrefresh. Left out; flagged here for human prioritization if any are wanted.
Resources touched
src/generated/api.d.ts). Nosrc/resources/**changes.Unresolved drift
present — nothing to flag for human deletion). No failing typecheck/test.
src/client/typed-posthog.ts,src/resources/types.ts, anddashboard/pipeline.acceptance.test.tsareunrelated to this refresh and left untouched.
TaskRun
Generated by PostHog Code — Task
152bb044-8140-419f-94af-4990d430557ehttps://us.posthog.com/project/423401/tasks/152bb044-8140-419f-94af-4990d430557e