chore(codegen): daily schema refresh (2026-05-31)#23
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) via `pnpm codegen`, filtered through openapi-filter.yaml. Field-level schema evolution only — the set of managed operationIds is unchanged. openapi-filter.yaml is untouched. Generated-By: PostHog Code Task-Id: 6e47b4a6-ca1a-4a2f-b7ad-2dd36c221ef0
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-05-31
Automated regeneration of
src/generated/api.d.tsfrom the live PostHogOpenAPI spec (
https://us.posthog.com/api/schema/?format=json), filteredthrough
openapi-filter.yamlviapnpm codegen.Spec diff size
src/generated/api.d.ts: +983 / −24 lines (17,571 → 18,530)openapi-filter.yaml: unchangedThe diff is purely field-level schema evolution on operations we already
manage — no operation was added to or removed from the generated surface.
Notable upstream additions flowing in through the shared query/response schemas
that insights & endpoints reference:
AccountsQuery,RevenueAnalyticsMRRQuery,RevenueAnalyticsOverviewItem,CalendarHeatmapFilter,ErrorTrackingIssueFilterExperimentMetricOutlierHandling,ExperimentRatioMetric, numerator/denominator outlier handling,lower/upper_bound_percentile,ignore_zerosDataWarehouseSyncWarning, expandedEndpointResponse/EndpointVersionResponse,assorted query-status
warningsfieldsNew operationIds added to the filter
None. Every new operationId in the live spec that is missing from
openapi-filter.yamlfalls into one of two buckets:Belongs to an existing managed family but not referenced by client code —
e.g. PUT
_updatevariants (cohorts_update,experiments_update,event_definitions_update,experiment_holdouts_update, …) and per-resourcesub-actions (
*_activity_retrieve,*_sharing_*,*_bulk_update_tags_create).Every resource client uses PATCH (
partial_update) for updates, never PUT,plus POST/GET/DELETE. Adding the PUT or sub-action operations would only bloat
the generated types with surface no client touches, so they are intentionally
left out (consistent with the existing filter).
Brand-new resource families, not currently managed — the spec exposes the
full PostHog API surface (annotations, alerts, surveys, batch exports, hog
functions/flows, error-tracking rules, warehouse queries, LLM analytics, etc.).
Adopting any of these is a deliberate, human-reviewed decision (it requires a
new
client.ts+pipeline.ts+ tests + registration via theadd-resourceskill), not something this unattended daily refresh should do on its own.
Per
docs/resources.md, the flagged next candidates remain annotations andalerts. Ping if you'd like one wired up.
Resources touched
None of the hand-written resource clients, pipelines, or Zod schemas required
changes —
pnpm typecheckpasses clean and the existing schemas still align withthe regenerated types.
Unresolved drift
identical to the previous generation, so nothing managed disappeared upstream.
src/pull/run.test.ts > writes files and calls tagOnServer on a non-dry runtimed out once under full-suite load (503 ms vsthe 500 ms test timeout). It passes cleanly in isolation (307 ms) and is
unrelated to schema content — a pre-existing timing sensitivity, not a
regression from this refresh.
Verification
pnpm install --frozen-lockfile✅pnpm codegen✅pnpm typecheck✅pnpm test— 290/291 pass; the one failure is the timing flake above (passes in isolation)TaskRun:
6e47b4a6-ca1a-4a2f-b7ad-2dd36c221ef0