chore(codegen): daily schema refresh (2026-05-24)#16
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerated `src/generated/api.d.ts` from the live PostHog OpenAPI spec via `pnpm codegen`. Pure schema enrichment — no path additions/removals and no `openapi-filter.yaml` changes. Notable schema additions: - `TeamCustomerAnalyticsConfig` filled in (previously `Record<string, never>`) - New top-level `ParserMode` enum referenced from HogQL query settings - New optional fields on existing query types: `resultCustomizations`, `cohortLabelStartIndex`, `useWebAnalyticsPrecompute`, `usedLazyPrecompute` - `ExperimentSavedMetric` / `PatchedExperimentSavedMetric` gained a typed `query` property and descriptions - `PatchedTeam` / `TeamSerializerSkinny` gained `test_account_filters` - New optional `prompt_name` query param on experiments_list No resource modules touched — existing Zod schemas already use `.loose()` or `z.unknown()` for the affected fields, so the new properties are already accepted. Generated-By: PostHog Code Task-Id: 61496ec2-ab3b-4580-a649-1e3dfba8b127
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.
Summary
Daily refresh of
src/generated/api.d.tsfrom the live PostHog OpenAPI spec viapnpm codegen.Drift size: 140 lines (+129 / −11) — schema enrichment only. No paths or operationIds added or removed in the filtered output, so
openapi-filter.yamlis unchanged.Notable additions in the regenerated schema:
TeamCustomerAnalyticsConfigfilled out (previouslyRecord<string, never>) withactivity_event,signup_event,payment_event,account_group_type_index, …ParserModeenum referenced from HogQLHogQLQueryModifiers.parserModeresultCustomizations(per-breakdown color customization),cohortLabelStartIndex(retention),useWebAnalyticsPrecompute,usedLazyPrecomputeExperimentSavedMetric/PatchedExperimentSavedMetricgained typedqueryplus property-level descriptionsPatchedTeam/TeamSerializerSkinnygainedtest_account_filters(typed asunknown)prompt_namequery param onexperiments_listaggregationAxisFormat, prefix/postfix,decimalPlaces)Resources touched
None. Existing Zod schemas in
src/resources/*/client.tseither use.loose()or model the affected fields asz.unknown(), so the new optional properties are accepted without any code changes.New operationIds in live spec, not in filter
No action taken. The full list (~1000 operationIds across the live spec) is dominated by auxiliary endpoints for resources we do not currently manage as IaC (annotations, alerts, surveys, error tracking, conversations, warehouse, integrations, …) plus auxiliary operations on managed resources that the IaC tool does not need (e.g.
actions_bulk_update_tags_create,cohorts_activity_retrieve,feature_flags_my_flags_retrieve,experiments_duplicate_create, …). These have always existed; they are excluded by design.A handful of full-PUT variants exist for resources where we deliberately use PATCH:
actions_update,cohorts_update,event_definitions_update,experiment_holdouts_update,experiment_saved_metrics_update,experiments_update,schema_property_groups_update,event_schemas_update,event_schemas_partial_update. Skipped — the resource clients use*_partial_update(PATCH) only.Unresolved drift
None. All operationIds currently in
openapi-filter.yamlare still present in the live spec — no removals to flag for human review.Test plan
pnpm install --frozen-lockfilepnpm codegenpnpm typecheckpnpm test— 291/291 pass (one flaky 500 ms timeout insrc/pull/run.test.tscleared on rerun; pre-existing, unrelated to this diff)TaskRun:
61496ec2-ab3b-4580-a649-1e3dfba8b127