:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore: hide the retired project environments route from the schema (#95171)
Alex Lider39faf7c3538a
diff --git a/posthog/api/documentation.py b/posthog/api/documentation.pyindex d3771886a726..b76b904fac3f 100644--- a/posthog/api/documentation.py+++ b/posthog/api/documentation.py@@ -714,7 +714,6 @@ _HTTP_METHODS = frozenset({"get", "put", "post", "delete", "options", "head", "p# Match finalized paths (after {parent_lookup_*} substitution) for postprocessing._ORG_PROJECTS_FINAL_RE = re.compile(r"^/api/organizations/[^/]+/projects/")-_PROJECT_ENVS_FINAL_RE = re.compile(r"^/api/projects/[^/]+/environments/")def _get_product_from_module(module: str) -> str | None:@@ -1198,12 +1197,9 @@ def custom_postprocessing_hook(result, generator, request, public):# - /api/organizations/{id}/projects/… paths must NOT have projects_ stripped — that# segment is the resource name, not a router namespace, and stripping it collapses# everything to e.g. "list"/"create" which then collides with top-level org paths.- # - /api/projects/{id}/environments/… paths must NOT have environments_ stripped for the- # same reason — those are sub-resources, not the main /api/environments/ router.# - Everything else: strip projects_/environments_ (router-namespace noise).is_org_dup = (path, method.upper()) in _org_paths_with_project_dupis_org_projects = bool(_ORG_PROJECTS_FINAL_RE.match(path))- is_project_envs = bool(_PROJECT_ENVS_FINAL_RE.match(path))if is_org_dup:definition["deprecated"] = True@@ -1224,8 +1220,7 @@ def custom_postprocessing_hook(result, generator, request, public):op_id = definition["operationId"]if not is_org_projects:op_id = op_id.replace("projects_", "", 1)- if not is_project_envs:- op_id = op_id.replace("environments_", "", 1)+ op_id = op_id.replace("environments_", "", 1)definition["operationId"] = op_idif "parameters" in definition:diff --git a/posthog/api/team.py b/posthog/api/team.pyindex dfe4a2df0700..6280eb9aaddd 100644--- a/posthog/api/team.py+++ b/posthog/api/team.py@@ -14,7 +14,7 @@ from django.utils.dateparse import parse_datetimeimport re2import posthoganalyticsfrom drf_spectacular.types import OpenApiTypes-from drf_spectacular.utils import OpenApiParameter, extend_schema, extend_schema_field, extend_schema_view+from drf_spectacular.utils import OpenApiParameter, extend_schema, extend_schema_fieldfrom opentelemetry import tracefrom pydantic import (RootModel as PydanticRootModel,@@ -2841,16 +2841,13 @@ class RootTeamViewSet(TeamViewSet):hide_api_docs = True-@extend_schema_view(- list=extend_schema(deprecated=True),- retrieve=extend_schema(deprecated=True),- create=extend_schema(deprecated=True),- update=extend_schema(deprecated=True),- partial_update=extend_schema(deprecated=True),- destroy=extend_schema(deprecated=True),-)class ProjectEnvironmentsViewSet(TeamViewSet):- """Deprecated: use /api/environments/{id}/ instead."""+ """Deprecated: use /api/environments/{id}/ instead.++ Hidden from the API docs, so the actions it inherits from TeamViewSet do not reach the+ generated types and MCP tools under a route that rejects every request."""++ hide_api_docs = Truedef initial(self, request: request.Request, *args, **kwargs) -> None:raise exceptions.PermissionDenied(diff --git a/posthog/api/test/test_api_docs.py b/posthog/api/test/test_api_docs.pyindex 78a0158c0afa..6f9521e917f3 100644--- a/posthog/api/test/test_api_docs.py+++ b/posthog/api/test/test_api_docs.py@@ -1,7 +1,24 @@+import re+from posthog.test.base import APIBaseTestclass TestAPIDocsSchema(APIBaseTest):+ def test_retired_project_environments_route_is_not_in_schema(self) -> None:+ self.client.logout()++ schema_response = self.client.get("/api/schema/")++ assert schema_response.status_code == 200+ assert isinstance(schema_response.data, dict)++ paths = schema_response.data["paths"]+ # The route 403s every request. Its viewset inherits every TeamViewSet action, so a hidden+ # viewset is the only thing keeping those actions out of the generated types and MCP tools+ assert not [p for p in paths if re.match(r"^/api/projects/[^/]+/environments/", p)]+ # The same action survives under the live project route+ assert any(p.endswith("/tracing_config/") for p in paths)+def test_can_generate_api_docs_schema(self) -> None:self.client.logout()diff --git a/products/desktop/packages/api-client/endpoint-allowlist.json b/products/desktop/packages/api-client/endpoint-allowlist.jsonindex f62f551eab19..eb72ecf06fb5 100644--- a/products/desktop/packages/api-client/endpoint-allowlist.json+++ b/products/desktop/packages/api-client/endpoint-allowlist.json@@ -77,6 +77,7 @@"PatchedHogFlowUpdate","PatchedTaskWrite","PersonRecord",+ "ProjectBackwardCompat","SessionRecording","Survey","TaskCreate",@@ -85,7 +86,6 @@"TaskRunDetailDTO","TaskSummariesRequest","TaskSummaryDTO",- "Team","Ticket","User","UserBasic",diff --git a/products/desktop/packages/api-client/src/evidence-previews.test.ts b/products/desktop/packages/api-client/src/evidence-previews.test.tsindex 1fe73f7070fa..aafe1b127af8 100644--- a/products/desktop/packages/api-client/src/evidence-previews.test.ts+++ b/products/desktop/packages/api-client/src/evidence-previews.test.ts@@ -909,6 +909,7 @@ describe("evidence preview shaping", () => {{status: "stale",reason: "Rolled out to 100% for at least 30 days",+ reason_states_rollout: false,rollout: {effectively_full_rollout: true,has_targeting_conditions: false,diff --git a/products/desktop/packages/api-client/src/generated.ts b/products/desktop/packages/api-client/src/generated.tsindex 9287f929e8f5..f4df2f128d5f 100644--- a/products/desktop/packages/api-client/src/generated.ts+++ b/products/desktop/packages/api-client/src/generated.ts@@ -82,6 +82,39 @@ export namespace Schemas {| "count_pageviews"| "uniq_urls"| "uniq_page_screen_autocaptures";+ export type CustomBotField =+ | "$raw_user_agent"+ | "$ip"+ | "$lib"+ | "$host"+ | "$pathname"+ | "$current_url"+ | "$browser"+ | "$os"+ | "$browser_language"+ | "$screen_width"+ | "$screen_height"+ | "$geoip_country_code"+ | "$referrer"+ | "$referring_domain";+ export type CustomBotMatcher = "contains" | "regex" | "cidr";+ export type CustomBotDefinition = {+ category?: (string | null) | undefined;+ id: string;+ /**+ * The event property this rule reads.+ */+ key: CustomBotField;+ matcher: CustomBotMatcher;+ /**+ * Reported by `$virt_bot_name` and `$virt_bot_operator` when the rule matches.+ */+ name: string;+ /**+ * Matched against the property named by `key`.+ */+ pattern: string;+ };export type FilterLogicalOperator = "AND" | "OR";export type CustomChannelField =| "utm_source"@@ -152,6 +185,7 @@ export namespace Schemas {bounceRateDurationSeconds: number | null;bounceRatePageViewMode: BounceRatePageViewMode | null;convertToProjectTimezone: boolean | null;+ customBotDefinitions: Array<CustomBotDefinition> | null;customChannelTypeRules: Array<CustomChannelRule> | null;dataWarehouseEventsModifiers: Array<DataWarehouseEventsModifier> | null;debug: boolean | null;@@ -8580,7 +8614,7 @@ export namespace Schemas {}| {/**- * Hog source code. Must return true (pass), false (fail), or null for N/A.+ * Hog source code. Must return true or false, or null for N/A. Output settings determine which boolean counts as a failure.*/source: string;}@@ -8608,6 +8642,10 @@ export namespace Schemas {* Whether the evaluation can return N/A for non-applicable generations.*/allows_na: boolean;+ /**+ * Whether a true result means the evaluation found a problem. False (the default) suits pass/fail evaluations, where a true result satisfied the criteria. Set it to true for detector-style evaluations, so a true result is counted and labeled as a fail.+ */+ true_is_failure: boolean;}>| undefined;/**@@ -11258,6 +11296,9 @@ export namespace Schemas {* * `Medusa` - Medusa* * `Membrain` - Membrain* * `RecallAI` - RecallAI+ * * `Tenjin` - Tenjin+ * * `Folk` - Folk+ * * `Cybersource` - Cybersource*/export type ExternalDataSourceTypeEnum =| "Ashby"@@ -12588,7 +12629,10 @@ export namespace Schemas {| "Strato"| "Medusa"| "Membrain"- | "RecallAI";+ | "RecallAI"+ | "Tenjin"+ | "Folk"+ | "Cybersource";/*** * `web` - web* * `api` - api@@ -13928,6 +13972,9 @@ export namespace Schemas {* * `Medusa` - Medusa* * `Membrain` - Membrain* * `RecallAI` - RecallAI+ * * `Tenjin` - Tenjin+ * * `Folk` - Folk+ * * `Cybersource` - Cybersource*/source_type: ExternalDataSourceTypeEnum;/**@@ -14231,11 +14278,11 @@ export namespace Schemas {*/effectively_full_rollout: boolean;/**- * True if any release condition has property filters, i.e. the flag is conditionally targeted rather than a blanket rollout. When true, `max_rollout_percentage` is a percentage within the targeted segment, not of the whole user base.+ * True if any release condition has property filters, i.e. the flag is conditionally targeted rather than a blanket rollout. This says nothing about which condition produced `max_rollout_percentage`: the two fields are computed independently over the whole condition list.*/has_targeting_conditions: boolean;/**- * Highest rollout percentage (0-100) across the flag's release conditions, treating a missing percentage as 100. Null when the flag has no release conditions. Interpret together with `has_targeting_conditions`.+ * Highest rollout percentage (0-100) across the flag's release conditions, treating a missing percentage as 100. Null when the flag has no release conditions. The maximum can come from an untargeted condition even when `has_targeting_conditions` is true, so it cannot be attributed to a targeted condition or read as a share of a targeted segment.*/max_rollout_percentage: number | null;/**@@ -14252,6 +14299,10 @@ export namespace Schemas {* Human-readable explanation of the status*/reason: string;+ /**+ * True when `reason` already describes the flag's rollout, which happens when the status was reached from the configuration rather than from evaluation data. A caller that narrates the rollout separately should stay quiet rather than repeat it.+ */+ reason_states_rollout: boolean;/*** Summary of the flag's rollout configuration, for determining whether it is fully rolled out.*/@@ -17634,7 +17685,10 @@ export namespace Schemas {| { source: string }| Partial<{ source: "user_messages" }>;output_type: OutputTypeEnum;- output_config: Partial<{ allows_na: boolean }>;+ output_config: Partial<{+ allows_na: boolean;+ true_is_failure: boolean;+ }>;conditions: Array<EvaluationCondition>;target: EvaluationTargetEnum;target_config:@@ -18123,13 +18177,6 @@ export namespace Schemas {| "auto"| "read-only"| "full-access";- /**- * Request body for creating or updating a task.- *- * Field required/default semantics match the ``Task`` model. The view passes- * ``validated_data`` (integration/report PK fields already resolved to instances) to the- * facade ``create_task`` / ``update_task`` functions.- */export type PatchedTaskWrite = Partial<{title: string;title_manually_set: boolean;@@ -18267,115 +18314,6 @@ export namespace Schemas {pending_invites: Array<PendingInvite>;requires_credential_review: boolean;}>;- /**- * * `exact` - exact- * * `is_not` - is_not- * * `icontains` - icontains- * * `not_icontains` - not_icontains- * * `starts_with` - starts_with- * * `not_starts_with` - not_starts_with- * * `ends_with` - ends_with- * * `not_ends_with` - not_ends_with- * * `regex` - regex- * * `not_regex` - not_regex- * * `gt` - gt- * * `lt` - lt- * * `gte` - gte- * * `lte` - lte- * * `is_set` - is_set- * * `is_not_set` - is_not_set- * * `is_date_exact` - is_date_exact- * * `is_date_after` - is_date_after- * * `is_date_before` - is_date_before- * * `in` - in- * * `not_in` - not_in- */- export type PropertyItemOperatorEnum =- | "exact"- | "is_not"- | "icontains"- | "not_icontains"- | "starts_with"- | "not_starts_with"- | "ends_with"- | "not_ends_with"- | "regex"- | "not_regex"- | "gt"- | "lt"- | "gte"- | "lte"- | "is_set"- | "is_not_set"- | "is_date_exact"- | "is_date_after"- | "is_date_before"- | "in"- | "not_in";- export type PropertyItem = {- /**- * Key of the property you're filtering on. For example `email` or `$current_url`- */- key: string;- /**- * Value of your filter. For example `[email protected]` or `https://example.com/test/`. Can be an array for an OR query, like `["[email protected]","[email protected]"]`- */- value: string | number | boolean | Array<string | number>;- operator?:- | (PropertyItemOperatorEnum | BlankEnum | NullEnum)- | undefined;- type?: (PropertyFilterTypeEnum | BlankEnum) | undefined;- };- export type Property = {- type?: (PropertyGroupOperatorEnum & unknown) | undefined;- values: Array<PropertyItem>;- };- /**- * One desktop-only MCP server relayed into the run — a name only, never configuration.- */- export type RelayedMcpServer = { name: string };- export type SessionRecording = {- id: string;- distinct_id: string | null;- viewed: boolean;- viewers: Array<string>;- recording_duration: number;- active_seconds: number | null;- inactive_seconds: number | null;- start_time: string | null;- end_time: string | null;- click_count: number | null;- keypress_count: number | null;- mouse_activity_count: number | null;- console_log_count: number | null;- console_warn_count: number | null;- console_error_count: number | null;- start_url: string | null;- person?: MinimalPerson | undefined;- retention_period_days: number | null;- expiry_time: string | null;- recording_ttl: number | null;- snapshot_source: string | null;- snapshot_library: string | null;- ongoing: boolean;- activity_score: number | null;- /**- * Load external references (linked issues) for this recording- */- external_references: Array<Record<string, unknown>>;- /**- * Whether this recording matched the filters of the listing query that returned it. False only when a recording requested via session_recording_id was included despite not matching the filters.- */- matches_filters: boolean;- /**- * Total stored size of the recording's snapshot data in bytes. Only populated when the recording's metadata is loaded, e.g. on retrieve; null in list responses.- */- total_size: number | null;- /**- * Number of captured rrweb events in the recording. Only populated when the recording's metadata is loaded, e.g. on retrieve; null in list responses.- */- event_count: number | null;- };/*** * `30d` - 30 Days* * `90d` - 90 Days@@ -18388,95 +18326,791 @@ export namespace Schemas {| "1y"| "5y";/**- * Mixin for serializers to add user access control fields+ * * `0` - Sunday+ * * `1` - Monday*/- export type Survey = {- id: string;- name: string;+ export type WeekStartDayEnum = 0 | 1;+ export type TeamRevenueAnalyticsConfig = Partial<{+ base_currency: BaseCurrencyEnum;+ events: unknown;+ filter_test_accounts: boolean;+ }>;+ export type TeamMarketingAnalyticsConfig = Partial<{+ sources_map: MarketingAnalyticsSourceMapping;+ conversion_goals: MarketingAnalyticsConversionGoalList;+ attribution_window_days: number;+ attribution_mode: AttributionModeEnum;+ filter_test_accounts: boolean;+ campaign_name_mappings: MarketingAnalyticsCampaignNameMappings;+ custom_source_mappings: MarketingAnalyticsCustomSourceMappings;+ campaign_field_preferences: MarketingAnalyticsCampaignFieldPreferences;+ }>;+ export type TeamCustomerAnalyticsConfig = Partial<{+ activity_event: unknown;+ signup_pageview_event: unknown;+ signup_event: unknown;+ subscription_event: unknown;+ payment_event: unknown;+ account_group_type_index: number | null;+ }>;+ export type TeamWorkflowsConfig = Partial<{+ capture_workflows_engagement_events: boolean;+ email_tracking_consent_mode: EmailTrackingConsentModeEnum;+ }>;+ export type TeamFeatureFlagPolicyConfig = Partial<{+ require_tags: boolean;+ }>;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ export type ProjectBackwardCompat = {+ id: number;+ organization: string;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- description?: string | undefined;- type: SurveyTypeEnum;+ name?: string | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- schedule?: (string | null) | undefined;- linked_flag: MinimalFeatureFlag & unknown;+ product_description?: (string | null) | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- linked_flag_id?: (number | null) | undefined;+ tags?: Array<string> | undefined;+ created_at: string;+ effective_membership_level: OrganizationMembershipLevelEnum & unknown;+ has_group_types: boolean;+ group_types: Array<Record<string, unknown>>;+ live_events_token: string | null;+ updated_at: string | null;+ uuid: string;+ api_token: string;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- linked_insight_id?: (number | null) | undefined;- targeting_flag: MinimalFeatureFlag & unknown;- internal_targeting_flag: MinimalFeatureFlag & unknown;+ app_urls?: Array<string | null> | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- questions?: unknown | undefined;- conditions: Record<string, unknown> | null;+ anonymize_ips?: boolean | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- appearance?: unknown | undefined;- created_at: string;- created_by: UserBasic & unknown;+ completed_snippet_onboarding?: boolean | undefined;+ ingested_event: boolean;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- start_date?: (string | null) | undefined;+ test_account_filters?: unknown | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- end_date?: (string | null) | undefined;+ test_account_filters_default_checked?: (boolean | null) | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- archived?: boolean | undefined;+ path_cleaning_filters?: unknown | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- responses_limit?: (number | null) | undefined;- feature_flag_keys: Array<Record<string, string | null>>;+ is_demo?: boolean | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- iteration_count?: (number | null) | undefined;+ timezone?: TimezoneEnum | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- iteration_frequency_days?: (number | null) | undefined;+ data_attributes?: unknown | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- iteration_start_dates?: (Array<string | null> | null) | undefined;+ person_display_name_properties?: (Array<string> | null) | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- current_iteration?: (number | null) | undefined;+ correlation_config?: unknown | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- current_iteration_start_date?: (string | null) | undefined;+ autocapture_opt_out?: (boolean | null) | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- response_sampling_start_date?: (string | null) | undefined;+ autocapture_exceptions_opt_in?: (boolean | null) | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- response_sampling_interval_type?:- | (SurveySamplingIntervalTypeEnum | BlankEnum | NullEnum)- | undefined;+ autocapture_web_vitals_opt_in?: (boolean | null) | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.*/- response_sampling_interval?: (number | null) | undefined;+ autocapture_web_vitals_allowed_metrics?: unknown | undefined;/**- * Mixin for serializers to add user access control fields+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ autocapture_exceptions_errors_to_ignore?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ capture_console_log_opt_in?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ capture_performance_opt_in?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_opt_in?: boolean | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_sample_rate?: (string | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_minimum_duration_milliseconds?:+ | (number | null)+ | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_linked_flag?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_network_payload_capture_config?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_masking_config?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_url_trigger_config?:+ | (Array<unknown> | null)+ | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_url_blocklist_config?:+ | (Array<unknown> | null)+ | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_event_trigger_config?:+ | (Array<string | null> | null)+ | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_trigger_match_type_config?:+ | (string | null)+ | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_trigger_groups?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_recording_retention_period?:+ | SessionRecordingRetentionPeriodEnum+ | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ session_replay_config?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ survey_config?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ access_control?: boolean | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ week_start_day?: (WeekStartDayEnum | NullEnum) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ primary_dashboard?: (number | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ live_events_columns?: (Array<string> | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ recording_domains?: (Array<string | null> | null) | undefined;+ person_on_events_querying_enabled: boolean;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ inject_web_apps?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ extra_settings?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ modifiers?: unknown | undefined;+ default_modifiers: Record<string, unknown>;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ has_completed_onboarding_for?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ surveys_opt_in?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ heatmaps_opt_in?: (boolean | null) | undefined;+ product_intents: Array<+ Partial<{+ product_type: string;+ created_at: string;+ onboarding_completed_at: string | null;+ updated_at: string;+ }>+ >;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ flags_persistence_default?: (boolean | null) | undefined;+ secret_api_token: string | null;+ secret_api_token_backup: string | null;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ receive_org_level_activity_logs?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ business_model?: (BusinessModelEnum | BlankEnum | NullEnum) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ conversations_enabled?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ conversations_settings?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ logs_settings?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ proactive_tasks_enabled?: (boolean | null) | undefined;+ available_setup_task_ids: Array<AvailableSetupTaskIdsEnum>;+ /**+ * Set to True when project deletion has been initiated. Blocks UI access to this project until the async task completes.+ */+ is_pending_deletion: boolean | null;+ /**+ * ID of the project this environment belongs to.+ */+ project_id: number;+ /**+ * The effective access level the user has for this object+ */+ user_access_level: string | null;+ managed_viewsets: Record<string, boolean>;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ revenue_analytics_config?: TeamRevenueAnalyticsConfig | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ marketing_analytics_config?: TeamMarketingAnalyticsConfig | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ customer_analytics_config?: TeamCustomerAnalyticsConfig | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ workflows_config?: TeamWorkflowsConfig | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ feature_flag_policy_config?: TeamFeatureFlagPolicyConfig | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ base_currency?: BaseCurrencyEnum | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ capture_dead_clicks?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ cookieless_server_hash_mode?:+ | (CookielessServerHashModeEnum | NullEnum)+ | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ human_friendly_comparison_periods?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ feature_flag_confirmation_enabled?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ feature_flag_confirmation_message?: (string | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ default_evaluation_contexts_enabled?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ require_evaluation_contexts?: (boolean | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ default_data_theme?: (number | null) | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ onboarding_tasks?: unknown | undefined;+ /**+ * A project and its settings, including the settings that live on its passthrough Team.+ *+ * This shape is a superset of TeamSerializer's, so a request rewritten from /api/environments/+ * onto /api/projects/ never loses a field.+ */+ web_analytics_pre_aggregated_tables_enabled?:+ | (boolean | null)+ | undefined;+ /**+ * The team's events data retention window in months (plan-derived, synced from billing). When retention enforcement is active for the team, queries do not return events older than this many months. Read-only: this value follows your plan's data retention entitlement, so neither you nor PostHog support can change it unless your organization is on the enterprise plan. Background and discussion: https://github.com/PostHog/posthog/issues/17031+ */+ event_retention_months: number;+ /**+ * Whether events data retention is currently enforced for this team (cohort/flag gated). Read-only: neither you nor PostHog support can turn enforcement off, and the retention window itself only changes with your plan. Background and discussion: https://github.com/PostHog/posthog/issues/17031+ */+ events_retention_enforced: boolean;+ };+ /**+ * * `exact` - exact+ * * `is_not` - is_not+ * * `icontains` - icontains+ * * `not_icontains` - not_icontains+ * * `starts_with` - starts_with+ * * `not_starts_with` - not_starts_with+ * * `ends_with` - ends_with+ * * `not_ends_with` - not_ends_with+ * * `regex` - regex+ * * `not_regex` - not_regex+ * * `gt` - gt+ * * `lt` - lt+ * * `gte` - gte+ * * `lte` - lte+ * * `is_set` - is_set+ * * `is_not_set` - is_not_set+ * * `is_date_exact` - is_date_exact+ * * `is_date_after` - is_date_after+ * * `is_date_before` - is_date_before+ * * `in` - in+ * * `not_in` - not_in+ */+ export type PropertyItemOperatorEnum =+ | "exact"+ | "is_not"+ | "icontains"+ | "not_icontains"+ | "starts_with"+ | "not_starts_with"+ | "ends_with"+ | "not_ends_with"+ | "regex"+ | "not_regex"+ | "gt"+ | "lt"+ | "gte"+ | "lte"+ | "is_set"+ | "is_not_set"+ | "is_date_exact"+ | "is_date_after"+ | "is_date_before"+ | "in"+ | "not_in";+ export type PropertyItem = {+ /**+ * Key of the property you're filtering on. For example `email` or `$current_url`+ */+ key: string;+ /**+ * Value of your filter. For example `[email protected]` or `https://example.com/test/`. Can be an array for an OR query, like `["[email protected]","[email protected]"]`+ */+ value: string | number | boolean | Array<string | number>;+ operator?:+ | (PropertyItemOperatorEnum | BlankEnum | NullEnum)+ | undefined;+ type?: (PropertyFilterTypeEnum | BlankEnum) | undefined;+ };+ export type Property = {+ type?: (PropertyGroupOperatorEnum & unknown) | undefined;+ values: Array<PropertyItem>;+ };+ /**+ * One desktop-only MCP server relayed into the run — a name only, never configuration.+ */+ export type RelayedMcpServer = { name: string };+ export type SessionRecording = {+ id: string;+ distinct_id: string | null;+ viewed: boolean;+ viewers: Array<string>;+ recording_duration: number;+ active_seconds: number | null;+ inactive_seconds: number | null;+ start_time: string | null;+ end_time: string | null;+ click_count: number | null;+ keypress_count: number | null;+ mouse_activity_count: number | null;+ console_log_count: number | null;+ console_warn_count: number | null;+ console_error_count: number | null;+ start_url: string | null;+ person?: MinimalPerson | undefined;+ retention_period_days: number | null;+ expiry_time: string | null;+ recording_ttl: number | null;+ snapshot_source: string | null;+ snapshot_library: string | null;+ ongoing: boolean;+ activity_score: number | null;+ /**+ * Load external references (linked issues) for this recording+ */+ external_references: Array<Record<string, unknown>>;+ /**+ * Whether this recording matched the filters of the listing query that returned it. False only when a recording requested via session_recording_id was included despite not matching the filters.+ */+ matches_filters: boolean;+ /**+ * Total stored size of the recording's snapshot data in bytes. Only populated when the recording's metadata is loaded, e.g. on retrieve; null in list responses.+ */+ total_size: number | null;+ /**+ * Number of captured rrweb events in the recording. Only populated when the recording's metadata is loaded, e.g. on retrieve; null in list responses.+ */+ event_count: number | null;+ };+ /**+ * Mixin for serializers to add user access control fields+ */+ export type Survey = {+ id: string;+ name: string;+ /**+ * Mixin for serializers to add user access control fields+ */+ description?: string | undefined;+ type: SurveyTypeEnum;+ /**+ * Mixin for serializers to add user access control fields+ */+ schedule?: (string | null) | undefined;+ linked_flag: MinimalFeatureFlag & unknown;+ /**+ * Mixin for serializers to add user access control fields+ */+ linked_flag_id?: (number | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ linked_insight_id?: (number | null) | undefined;+ targeting_flag: MinimalFeatureFlag & unknown;+ internal_targeting_flag: MinimalFeatureFlag & unknown;+ /**+ * Mixin for serializers to add user access control fields+ */+ questions?: unknown | undefined;+ conditions: Record<string, unknown> | null;+ /**+ * Mixin for serializers to add user access control fields+ */+ appearance?: unknown | undefined;+ created_at: string;+ created_by: UserBasic & unknown;+ /**+ * Mixin for serializers to add user access control fields+ */+ start_date?: (string | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ end_date?: (string | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ archived?: boolean | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ responses_limit?: (number | null) | undefined;+ feature_flag_keys: Array<Record<string, string | null>>;+ /**+ * Mixin for serializers to add user access control fields+ */+ iteration_count?: (number | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ iteration_frequency_days?: (number | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ iteration_start_dates?: (Array<string | null> | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ current_iteration?: (number | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ current_iteration_start_date?: (string | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ response_sampling_start_date?: (string | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ response_sampling_interval_type?:+ | (SurveySamplingIntervalTypeEnum | BlankEnum | NullEnum)+ | undefined;+ /**+ * Mixin for serializers to add user access control fields+ */+ response_sampling_interval?: (number | null) | undefined;+ /**+ * Mixin for serializers to add user access control fields*/response_sampling_limit?: (number | null) | undefined;/**@@ -18804,13 +19438,6 @@ export namespace Schemas {rates: Record<string, unknown>;per_question_stats?: Array<unknown> | undefined;};- /**- * Request body for creating or updating a task.- *- * Field required/default semantics match the ``Task`` model. The view passes- * ``validated_data`` (integration/report PK fields already resolved to instances) to the- * facade ``create_task`` / ``update_task`` functions.- */export type TaskCreate = Partial<{title: string;title_manually_set: boolean;@@ -18836,6 +19463,7 @@ export namespace Schemas {pending_user_artifact_ids: Array<string>;auto_publish: boolean | null;channel: string | null;+ signal_report_discussion_question: string;naming_source: string;sandbox_environment_id: string | null;custom_image_id: string | null;@@ -18885,13 +19513,6 @@ export namespace Schemas {*/ids: Array<string>;};- /**- * Request body for creating or updating a task.- *- * Field required/default semantics match the ``Task`` model. The view passes- * ``validated_data`` (integration/report PK fields already resolved to instances) to the- * facade ``create_task`` / ``update_task`` functions.- */export type TaskWrite = Partial<{title: string;title_manually_set: boolean;@@ -18918,152 +19539,6 @@ export namespace Schemas {auto_publish: boolean | null;channel: string | null;}>;- /**- * * `0` - Sunday- * * `1` - Monday- */- export type WeekStartDayEnum = 0 | 1;- export type TeamRevenueAnalyticsConfig = Partial<{- base_currency: BaseCurrencyEnum;- events: unknown;- filter_test_accounts: boolean;- }>;- export type TeamMarketingAnalyticsConfig = Partial<{- sources_map: MarketingAnalyticsSourceMapping;- conversion_goals: MarketingAnalyticsConversionGoalList;- attribution_window_days: number;- attribution_mode: AttributionModeEnum;- campaign_name_mappings: MarketingAnalyticsCampaignNameMappings;- custom_source_mappings: MarketingAnalyticsCustomSourceMappings;- campaign_field_preferences: MarketingAnalyticsCampaignFieldPreferences;- }>;- export type TeamCustomerAnalyticsConfig = Partial<{- activity_event: unknown;- signup_pageview_event: unknown;- signup_event: unknown;- subscription_event: unknown;- payment_event: unknown;- account_group_type_index: number | null;- }>;- export type TeamWorkflowsConfig = Partial<{- capture_workflows_engagement_events: boolean;- email_tracking_consent_mode: EmailTrackingConsentModeEnum;- }>;- export type Team = {- id: number;- uuid: string;- name?: string | undefined;- access_control?: boolean | undefined;- organization: string;- project_id: number;- api_token: string;- secret_api_token: string | null;- secret_api_token_backup: string | null;- created_at: string;- updated_at: string;- ingested_event: boolean;- default_modifiers: Record<string, unknown>;- person_on_events_querying_enabled: boolean;- /**- * The effective access level the user has for this object- */- user_access_level: string | null;- app_urls?: Array<string | null> | undefined;- anonymize_ips?: boolean | undefined;- completed_snippet_onboarding?: boolean | undefined;- test_account_filters?: unknown | undefined;- test_account_filters_default_checked?: (boolean | null) | undefined;- path_cleaning_filters?: unknown | undefined;- is_demo?: boolean | undefined;- timezone?: TimezoneEnum | undefined;- data_attributes?: unknown | undefined;- person_display_name_properties?: (Array<string> | null) | undefined;- correlation_config?: unknown | undefined;- autocapture_opt_out?: (boolean | null) | undefined;- autocapture_exceptions_opt_in?: (boolean | null) | undefined;- autocapture_web_vitals_opt_in?: (boolean | null) | undefined;- autocapture_web_vitals_allowed_metrics?: unknown | undefined;- autocapture_exceptions_errors_to_ignore?: unknown | undefined;- capture_console_log_opt_in?: (boolean | null) | undefined;- logs_settings?: unknown | undefined;- capture_performance_opt_in?: (boolean | null) | undefined;- session_recording_opt_in?: boolean | undefined;- session_recording_sample_rate?: (string | null) | undefined;- session_recording_minimum_duration_milliseconds?:- | (number | null)- | undefined;- session_recording_linked_flag?: unknown | undefined;- session_recording_network_payload_capture_config?: unknown | undefined;- session_recording_masking_config?: unknown | undefined;- session_recording_url_trigger_config?:- | (Array<unknown> | null)- | undefined;- session_recording_url_blocklist_config?:- | (Array<unknown> | null)- | undefined;- session_recording_event_trigger_config?:- | (Array<string | null> | null)- | undefined;- session_recording_trigger_match_type_config?:- | (string | null)- | undefined;- session_recording_trigger_groups?: unknown | undefined;- session_recording_retention_period?:- | SessionRecordingRetentionPeriodEnum- | undefined;- session_replay_config?: unknown | undefined;- survey_config?: unknown | undefined;- week_start_day?: (WeekStartDayEnum | NullEnum) | undefined;- primary_dashboard?: (number | null) | undefined;- live_events_columns?: (Array<string> | null) | undefined;- recording_domains?: (Array<string | null> | null) | undefined;- cookieless_server_hash_mode?:- | (CookielessServerHashModeEnum | NullEnum)- | undefined;- human_friendly_comparison_periods?: (boolean | null) | undefined;- inject_web_apps?: (boolean | null) | undefined;- extra_settings?: unknown | undefined;- modifiers?: unknown | undefined;- has_completed_onboarding_for?: unknown | undefined;- surveys_opt_in?: (boolean | null) | undefined;- heatmaps_opt_in?: (boolean | null) | undefined;- flags_persistence_default?: (boolean | null) | undefined;- feature_flag_confirmation_enabled?: (boolean | null) | undefined;- feature_flag_confirmation_message?: (string | null) | undefined;- default_evaluation_contexts_enabled?: (boolean | null) | undefined;- require_evaluation_contexts?: (boolean | null) | undefined;- capture_dead_clicks?: (boolean | null) | undefined;- default_data_theme?: (number | null) | undefined;- revenue_analytics_config?: TeamRevenueAnalyticsConfig | undefined;- marketing_analytics_config?: TeamMarketingAnalyticsConfig | undefined;- customer_analytics_config?: TeamCustomerAnalyticsConfig | undefined;- onboarding_tasks?: unknown | undefined;- base_currency?: (BaseCurrencyEnum & unknown) | undefined;- web_analytics_pre_aggregated_tables_enabled?:- | (boolean | null)- | undefined;- receive_org_level_activity_logs?: (boolean | null) | undefined;- business_model?: (BusinessModelEnum | BlankEnum | NullEnum) | undefined;- conversations_enabled?: (boolean | null) | undefined;- conversations_settings?: unknown | undefined;- proactive_tasks_enabled?: (boolean | null) | undefined;- workflows_config?: TeamWorkflowsConfig | undefined;- effective_membership_level: OrganizationMembershipLevelEnum & unknown;- has_group_types: boolean;- group_types: Array<Record<string, unknown>>;- live_events_token: string | null;- product_intents: Array<Record<string, unknown>>;- managed_viewsets: Record<string, boolean>;- available_setup_task_ids: Array<AvailableSetupTaskIdsEnum>;- /**- * The team's events data retention window in months (plan-derived, synced from billing). When retention enforcement is active for the team, queries do not return events older than this many months. Read-only: this value follows your plan's data retention entitlement, so neither you nor PostHog support can change it unless your organization is on the enterprise plan. Background and discussion: https://github.com/PostHog/posthog/issues/17031- */- event_retention_months: number;- /**- * Whether events data retention is currently enforced for this team (cohort/flag gated). Read-only: neither you nor PostHog support can turn enforcement off, and the retention window itself only changes with your plan. Background and discussion: https://github.com/PostHog/posthog/issues/17031- */- events_retention_enforced: boolean;- };/*** Serializer for ticket assignment (user or role).*/diff --git a/products/desktop/packages/api-client/src/posthog-client.ts b/products/desktop/packages/api-client/src/posthog-client.tsindex 3c7f35dbc328..8a6c8479f451 100644--- a/products/desktop/packages/api-client/src/posthog-client.ts+++ b/products/desktop/packages/api-client/src/posthog-client.ts@@ -2276,7 +2276,7 @@ export class PostHogAPIClient {const data = await this.api.get("/api/projects/{project_id}/", {path: { project_id: projectId.toString() },});- return data as Schemas.Team;+ return data as Schemas.ProjectBackwardCompat;}/**@@ -5169,7 +5169,7 @@ export class PostHogAPIClient {async updateTeam(updates: {session_recording_opt_in?: boolean;autocapture_exceptions_opt_in?: boolean;- }): Promise<Schemas.Team> {+ }): Promise<Schemas.ProjectBackwardCompat> {const teamId = await this.getTeamId();const url = new URL(`${this.api.baseUrl}/api/projects/${teamId}/`);const response = await this.api.fetcher.fetch({@@ -5209,7 +5209,7 @@ export class PostHogAPIClient {);}- return (await response.json()) as Schemas.Team;+ return (await response.json()) as Schemas.ProjectBackwardCompat;}async getSignalReport(reportId: string): Promise<SignalReport | null> {diff --git a/products/feature_flags/frontend/generated/api.schemas.ts b/products/feature_flags/frontend/generated/api.schemas.tsindex a834dac744d4..83bac7d8784e 100644--- a/products/feature_flags/frontend/generated/api.schemas.ts+++ b/products/feature_flags/frontend/generated/api.schemas.ts@@ -1910,13 +1910,6 @@ export type OrganizationsProjectsEvaluationContextSuggestionsDestroyParams = {context_name: string}-export type EnvironmentsEvaluationContextSuggestionsDestroyParams = {- /**- * Name of the evaluation context to restore to suggestions.- */- context_name: string-}-export type FeatureFlagRequestUsageListParams = {/*** Inclusive start of the usage period.diff --git a/products/feature_flags/frontend/generated/api.ts b/products/feature_flags/frontend/generated/api.tsindex 53266a77899d..39ef4e3c1387 100644--- a/products/feature_flags/frontend/generated/api.ts+++ b/products/feature_flags/frontend/generated/api.ts@@ -21,7 +21,6 @@ import type {CopyFlagsRequestApi,CopyFlagsResponseApi,DependentFlagApi,- EnvironmentsEvaluationContextSuggestionsDestroyParams,EvaluationContextSuggestionRequestApi,EvaluationContextSuggestionResponseApi,FeatureFlagApi,@@ -501,74 +500,6 @@ export const organizationsProjectsEvaluationContextSuggestionsDestroy = async ()}-export const getEnvironmentsEvaluationContextSuggestionsCreateUrl = (projectId: string, id: number) => {- return `/api/projects/${projectId}/environments/${id}/evaluation_context_suggestions/`-}--/**- * Hide an evaluation context name from the flag editor's suggestion list, or restore it.- *- * POST hides the name; DELETE restores it. The underlying context row and any flags already- * using it are never modified — this only controls what gets suggested.- */-export const environmentsEvaluationContextSuggestionsCreate = async (- projectId: string,- id: number,- evaluationContextSuggestionRequestApi: EvaluationContextSuggestionRequestApi,- options?: RequestInit-): Promise<EvaluationContextSuggestionResponseApi> => {- return apiMutator<EvaluationContextSuggestionResponseApi>(- getEnvironmentsEvaluationContextSuggestionsCreateUrl(projectId, id),- {- ...options,- method: 'POST',- headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(evaluationContextSuggestionRequestApi),- }- )-}--export const getEnvironmentsEvaluationContextSuggestionsDestroyUrl = (- projectId: string,- id: number,- params: EnvironmentsEvaluationContextSuggestionsDestroyParams-) => {- const normalizedParams = new URLSearchParams()-- Object.entries(params || {}).forEach(([key, value]) => {- if (value !== undefined) {- normalizedParams.append(key, value === null ? 'null' : String(value))- }- })-- const stringifiedParams = normalizedParams.toString()-- return stringifiedParams.length > 0- ? `/api/projects/${projectId}/environments/${id}/evaluation_context_suggestions/?${stringifiedParams}`- : `/api/projects/${projectId}/environments/${id}/evaluation_context_suggestions/`-}--/**- * Hide an evaluation context name from the flag editor's suggestion list, or restore it.- *- * POST hides the name; DELETE restores it. The underlying context row and any flags already- * using it are never modified — this only controls what gets suggested.- */-export const environmentsEvaluationContextSuggestionsDestroy = async (- projectId: string,- id: number,- params: EnvironmentsEvaluationContextSuggestionsDestroyParams,- options?: RequestInit-): Promise<EvaluationContextSuggestionResponseApi> => {- return apiMutator<EvaluationContextSuggestionResponseApi>(- getEnvironmentsEvaluationContextSuggestionsDestroyUrl(projectId, id, params),- {- ...options,- method: 'DELETE',- }- )-}-export const getFeatureFlagRequestUsageListUrl = (projectId: string, params: FeatureFlagRequestUsageListParams) => {const normalizedParams = new URLSearchParams()diff --git a/products/feature_flags/frontend/generated/api.zod.ts b/products/feature_flags/frontend/generated/api.zod.tsindex d4a30e07aad8..47b3a6fce466 100644--- a/products/feature_flags/frontend/generated/api.zod.ts+++ b/products/feature_flags/frontend/generated/api.zod.ts@@ -167,23 +167,6 @@ export const OrganizationsProjectsEvaluationContextSuggestionsCreateBody = /* @_),})-/**- * Hide an evaluation context name from the flag editor's suggestion list, or restore it.- *- * POST hides the name; DELETE restores it. The underlying context row and any flags already- * using it are never modified — this only controls what gets suggested.- */-export const environmentsEvaluationContextSuggestionsCreateBodyContextNameMax = 255--export const EnvironmentsEvaluationContextSuggestionsCreateBody = /* @__PURE__ */ zod.object({- context_name: zod- .string()- .max(environmentsEvaluationContextSuggestionsCreateBodyContextNameMax)- .describe(- "Name of the evaluation context to hide from (POST) or restore to (DELETE) the flag editor's suggestion list. Case-insensitive and whitespace-trimmed."- ),-})-/*** Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) for more information on feature flags.*diff --git a/products/feature_flags/mcp/tools.yaml b/products/feature_flags/mcp/tools.yamlindex 818e70f0208c..0eb60edbd986 100644--- a/products/feature_flags/mcp/tools.yaml+++ b/products/feature_flags/mcp/tools.yaml@@ -87,12 +87,6 @@ tools:id:cast: string-intsoft_delete: true- environments-evaluation-context-suggestions-create:- operation: environments_evaluation_context_suggestions_create- enabled: false- environments-evaluation-context-suggestions-destroy:- operation: environments_evaluation_context_suggestions_destroy- enabled: falsefeature-flag-archive:operation: feature_flags_archive_createenabled: truediff --git a/products/tracing/frontend/generated/api.ts b/products/tracing/frontend/generated/api.tsindex 125708d11e63..618fd6e4b2d9 100644--- a/products/tracing/frontend/generated/api.ts+++ b/products/tracing/frontend/generated/api.ts@@ -99,47 +99,6 @@ export const organizationsProjectsTracingConfigPartialUpdate = async (})}-export const getEnvironmentsTracingConfigRetrieveUrl = (projectId: string, id: number) => {- return `/api/projects/${projectId}/environments/${id}/tracing_config/`-}--/**- * Manage tracing product configuration for this environment. Members can read;- * writing requires project admin, matching the admin-only settings UI.- */-export const environmentsTracingConfigRetrieve = async (- projectId: string,- id: number,- options?: RequestInit-): Promise<TeamTracingConfigApi> => {- return apiMutator<TeamTracingConfigApi>(getEnvironmentsTracingConfigRetrieveUrl(projectId, id), {- ...options,- method: 'GET',- })-}--export const getEnvironmentsTracingConfigPartialUpdateUrl = (projectId: string, id: number) => {- return `/api/projects/${projectId}/environments/${id}/tracing_config/`-}--/**- * Manage tracing product configuration for this environment. Members can read;- * writing requires project admin, matching the admin-only settings UI.- */-export const environmentsTracingConfigPartialUpdate = async (- projectId: string,- id: number,- patchedTeamTracingConfigApi?: PatchedTeamTracingConfigApi,- options?: RequestInit-): Promise<TeamTracingConfigApi> => {- return apiMutator<TeamTracingConfigApi>(getEnvironmentsTracingConfigPartialUpdateUrl(projectId, id), {- ...options,- method: 'PATCH',- headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(patchedTeamTracingConfigApi),- })-}-export const getTracingSpansAggregateCreateUrl = (projectId: string) => {return `/api/projects/${projectId}/tracing/spans/aggregate/`}diff --git a/products/tracing/frontend/generated/api.zod.ts b/products/tracing/frontend/generated/api.zod.tsindex 043edb30bff9..cc1b58e9bab2 100644--- a/products/tracing/frontend/generated/api.zod.ts+++ b/products/tracing/frontend/generated/api.zod.ts@@ -44,35 +44,6 @@ export const OrganizationsProjectsTracingConfigPartialUpdateBody = /* @__PURE__),})-/**- * Manage tracing product configuration for this environment. Members can read;- * writing requires project admin, matching the admin-only settings UI.- */-export const environmentsTracingConfigPartialUpdateBodyTracingDistinctIdAttributeKeysItemMax = 200--export const environmentsTracingConfigPartialUpdateBodyTracingDistinctIdAttributeKeysMax = 10--export const environmentsTracingConfigPartialUpdateBodyTracingSessionIdAttributeKeysItemMax = 200--export const environmentsTracingConfigPartialUpdateBodyTracingSessionIdAttributeKeysMax = 10--export const EnvironmentsTracingConfigPartialUpdateBody = /* @__PURE__ */ zod.object({- tracing_distinct_id_attribute_keys: zod- .array(zod.string().max(environmentsTracingConfigPartialUpdateBodyTracingDistinctIdAttributeKeysItemMax))- .max(environmentsTracingConfigPartialUpdateBodyTracingDistinctIdAttributeKeysMax)- .optional()- .describe(- "Span or resource attribute keys whose values should match a person's distinct_id — a span links to a person when any of these attributes holds one of their distinct IDs. Defaults to ['posthogDistinctId'], the key the posthog-js \/ posthog-react-native SDKs attach to the OTel signals they emit. Add keys only if your pipeline emits the person identifier under different attributes."- ),- tracing_session_id_attribute_keys: zod- .array(zod.string().max(environmentsTracingConfigPartialUpdateBodyTracingSessionIdAttributeKeysItemMax))- .max(environmentsTracingConfigPartialUpdateBodyTracingSessionIdAttributeKeysMax)- .optional()- .describe(- "Ordered list of span or resource attribute keys whose values hold the PostHog session ID. Detection checks keys in order, then falls back to common session ID attribute conventions; the first key with a value wins. Defaults to ['sessionId'], the key the posthog-js \/ posthog-react-native SDKs attach to the OTel signals they emit. Add keys only if your pipeline emits the session ID under different attributes."- ),-})-export const tracingSpansAggregateCreateBodyQueryOneCompareFilterOneCompareDefault = falseexport const tracingSpansAggregateCreateBodyQueryOneFilterGroupDefault = []export const tracingSpansAggregateCreateBodyQueryOneLimitMax = 5000diff --git a/products/tracing/mcp/tools.yaml b/products/tracing/mcp/tools.yamlindex b82006890089..ec10aa87df10 100644--- a/products/tracing/mcp/tools.yaml+++ b/products/tracing/mcp/tools.yaml@@ -205,12 +205,6 @@ tools:response:include:- results- environments-tracing-config-partial-update:- operation: environments_tracing_config_partial_update- enabled: false- environments-tracing-config-retrieve:- operation: environments_tracing_config_retrieve- enabled: falseorganizations-projects-tracing-config-partial-update:operation: organizations_projects_tracing_config_partial_updateenabled: falsediff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 8cd0f630afbd..f78e042af1f0 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -59761,38 +59761,6 @@ export namespace Schemas {results: TaskThreadMessageDTO[];}- /**- * Serializer for `Team` model with minimal attributes to speeed up loading and transfer times.- * Also used for nested serializers.- */- export interface TeamBasic {- readonly id: number;- readonly uuid: string;- readonly organization: string;- /**- * @minimum -2147483648- * @maximum 2147483647- */- readonly project_id: number;- readonly api_token: string;- readonly name: string;- readonly completed_snippet_onboarding: boolean;- readonly has_completed_onboarding_for: unknown;- readonly ingested_event: boolean;- readonly is_demo: boolean;- readonly timezone: string;- readonly access_control: boolean;- }-- export interface PaginatedTeamBasicList {- count: number;- /** @nullable */- next?: string | null;- /** @nullable */- previous?: string | null;- results: TeamBasic[];- }-export interface ThresholdWithAlert {readonly id: string;readonly created_at: string;@@ -60521,6 +60489,29 @@ export namespace Schemas {Toolbar: 'toolbar',} as const;+ /**+ * Serializer for `Team` model with minimal attributes to speeed up loading and transfer times.+ * Also used for nested serializers.+ */+ export interface TeamBasic {+ readonly id: number;+ readonly uuid: string;+ readonly organization: string;+ /**+ * @minimum -2147483648+ * @maximum 2147483647+ */+ readonly project_id: number;+ readonly api_token: string;+ readonly name: string;+ readonly completed_snippet_onboarding: boolean;+ readonly has_completed_onboarding_for: unknown;+ readonly ingested_event: boolean;+ readonly is_demo: boolean;+ readonly timezone: string;+ readonly access_control: boolean;+ }+export interface ScenePersonalisationBasic {/** @maxLength 200 */scene: string;@@ -68881,207 +68872,6 @@ export namespace Schemas {channel?: string | null;}- export type PatchedTeamDefaultModifiers = { [key: string]: unknown };-- export type PatchedTeamGroupTypesItem = { [key: string]: unknown };-- export type PatchedTeamProductIntentsItem = { [key: string]: unknown };-- export type PatchedTeamManagedViewsets = {[key: string]: boolean};-- export interface PatchedTeam {- readonly id?: number;- readonly uuid?: string;- /**- * @minLength 1- * @maxLength 200- */- name?: string;- access_control?: boolean;- readonly organization?: string;- /**- * @minimum -2147483648- * @maximum 2147483647- */- readonly project_id?: number;- readonly api_token?: string;- /** @nullable */- readonly secret_api_token?: string | null;- /** @nullable */- readonly secret_api_token_backup?: string | null;- readonly created_at?: string;- readonly updated_at?: string;- readonly ingested_event?: boolean;- readonly default_modifiers?: PatchedTeamDefaultModifiers;- readonly person_on_events_querying_enabled?: boolean;- /**- * The effective access level the user has for this object- * @nullable- */- readonly user_access_level?: string | null;- /** @items.maxLength 200 */- app_urls?: (string | null)[];- anonymize_ips?: boolean;- completed_snippet_onboarding?: boolean;- /** Filters used to identify internal/test users. Each entry is a property filter.- *- * Supported entry types and the exact shape each accepts:- *- * # Person property — match (or exclude) by a person property- * {"key": "email", "type": "person", "value": "@example.com", "operator": "ends_with"}- *- * # Event property — match by an event property- * {"key": "$host", "type": "event", "value": "localhost", "operator": "icontains"}- *- * # Cohort membership — match (or exclude) members of a cohort.- * # Use operator "in" for inclusion and "not_in" for exclusion. Do NOT use a- * # `negation` field here — `negation` is specific to cohort *definitions*- * # (the inner sub-filters that build a cohort) and is rejected by the- * # property-filter schema.- * {"key": "id", "type": "cohort", "value": 8814, "operator": "not_in"}- *- * Common operators: "exact", "is_not", "icontains", "not_icontains", "starts_with",- * "not_starts_with", "ends_with", "not_ends_with", "regex", "not_regex", "gt", "lt",- * "gte", "lte", "is_set", "is_not_set", "in", "not_in". */- test_account_filters?: unknown;- /** @nullable */- test_account_filters_default_checked?: boolean | null;- path_cleaning_filters?: unknown;- is_demo?: boolean;- timezone?: string;- data_attributes?: unknown;- /**- * @nullable- * @items.maxLength 400- */- person_display_name_properties?: string[] | null;- correlation_config?: unknown;- /** @nullable */- autocapture_opt_out?: boolean | null;- /** @nullable */- autocapture_exceptions_opt_in?: boolean | null;- /** @nullable */- autocapture_web_vitals_opt_in?: boolean | null;- autocapture_web_vitals_allowed_metrics?: unknown;- autocapture_exceptions_errors_to_ignore?: unknown;- /** @nullable */- capture_console_log_opt_in?: boolean | null;- logs_settings?: unknown;- /** @nullable */- capture_performance_opt_in?: boolean | null;- session_recording_opt_in?: boolean;- /**- * @nullable- * @pattern ^-?\d{0,1}(?:\.\d{0,2})?$- */- session_recording_sample_rate?: string | null;- /**- * @minimum 0- * @maximum 30000- * @nullable- */- session_recording_minimum_duration_milliseconds?: number | null;- session_recording_linked_flag?: unknown;- session_recording_network_payload_capture_config?: unknown;- session_recording_masking_config?: unknown;- /** @nullable */- session_recording_url_trigger_config?: unknown[] | null;- /** @nullable */- session_recording_url_blocklist_config?: unknown[] | null;- /** @nullable */- session_recording_event_trigger_config?: (string | null)[] | null;- /**- * @maxLength 24- * @nullable- */- session_recording_trigger_match_type_config?: string | null;- /** V2 trigger groups configuration for session recording. If present, takes precedence over legacy trigger fields. */- session_recording_trigger_groups?: unknown;- session_recording_retention_period?: SessionRecordingRetentionPeriodEnum;- session_replay_config?: unknown;- survey_config?: unknown;- week_start_day?: WeekStartDayEnum | null;- /** @nullable */- primary_dashboard?: number | null;- /** @nullable */- live_events_columns?: string[] | null;- /**- * @nullable- * @items.maxLength 200- */- recording_domains?: (string | null)[] | null;- cookieless_server_hash_mode?: CookielessServerHashModeEnum | null;- /** @nullable */- human_friendly_comparison_periods?: boolean | null;- /** @nullable */- inject_web_apps?: boolean | null;- extra_settings?: unknown;- modifiers?: unknown;- has_completed_onboarding_for?: unknown;- /** @nullable */- surveys_opt_in?: boolean | null;- /** @nullable */- heatmaps_opt_in?: boolean | null;- /** @nullable */- flags_persistence_default?: boolean | null;- /** @nullable */- feature_flag_confirmation_enabled?: boolean | null;- /** @nullable */- feature_flag_confirmation_message?: string | null;- /**- * Whether to automatically apply default evaluation contexts to new feature flags- * @nullable- */- default_evaluation_contexts_enabled?: boolean | null;- /**- * Whether to require at least one evaluation context tag when creating new feature flags- * @nullable- */- require_evaluation_contexts?: boolean | null;- feature_flag_policy_config?: TeamFeatureFlagPolicyConfig;- /** @nullable */- capture_dead_clicks?: boolean | null;- /**- * @minimum -2147483648- * @maximum 2147483647- * @nullable- */- default_data_theme?: number | null;- revenue_analytics_config?: TeamRevenueAnalyticsConfig;- marketing_analytics_config?: TeamMarketingAnalyticsConfig;- customer_analytics_config?: TeamCustomerAnalyticsConfig;- onboarding_tasks?: unknown;- base_currency?: BaseCurrencyEnum;- /** @nullable */- web_analytics_pre_aggregated_tables_enabled?: boolean | null;- /** @nullable */- receive_org_level_activity_logs?: boolean | null;- /** Whether this project serves B2B or B2C customers, used to optimize the UI layout.- *- * * `b2b` - B2B- * * `b2c` - B2C- * * `other` - Other */- business_model?: BusinessModelEnum | BlankEnum | null;- /** @nullable */- conversations_enabled?: boolean | null;- conversations_settings?: unknown;- /** @nullable */- proactive_tasks_enabled?: boolean | null;- workflows_config?: TeamWorkflowsConfig;- readonly effective_membership_level?: OrganizationMembershipLevelEnum;- readonly has_group_types?: boolean;- readonly group_types?: readonly PatchedTeamGroupTypesItem[];- /** @nullable */- readonly live_events_token?: string | null;- readonly product_intents?: readonly PatchedTeamProductIntentsItem[];- readonly managed_viewsets?: PatchedTeamManagedViewsets;- readonly available_setup_task_ids?: readonly AvailableSetupTaskIdsEnum[];- /** The team's events data retention window in months (plan-derived, synced from billing). When retention enforcement is active for the team, queries do not return events older than this many months. Read-only: this value follows your plan's data retention entitlement, so neither you nor PostHog support can change it unless your organization is on the enterprise plan. Background and discussion: https://github.com/PostHog/posthog/issues/17031 */- readonly event_retention_months?: number;- /** Whether events data retention is currently enforced for this team (cohort/flag gated). Read-only: neither you nor PostHog support can turn enforcement off, and the retention window itself only changes with your plan. Background and discussion: https://github.com/PostHog/posthog/issues/17031 */- readonly events_retention_enforced?: boolean;- }-export interface PatchedTeamTracingConfig {/*** Span or resource attribute keys whose values should match a person's distinct_id — a span links to a person when any of these attributes holds one of their distinct IDs. Defaults to ['posthogDistinctId'], the key the posthog-js / posthog-react-native SDKs attach to the OTel signals they emit. Add keys only if your pipeline emits the person identifier under different attributes.@@ -87119,207 +86909,6 @@ export namespace Schemas {channel_id: string;}- export type TeamDefaultModifiers = { [key: string]: unknown };-- export type TeamGroupTypesItem = { [key: string]: unknown };-- export type TeamProductIntentsItem = { [key: string]: unknown };-- export type TeamManagedViewsets = {[key: string]: boolean};-- export interface Team {- readonly id: number;- readonly uuid: string;- /**- * @minLength 1- * @maxLength 200- */- name?: string;- access_control?: boolean;- readonly organization: string;- /**- * @minimum -2147483648- * @maximum 2147483647- */- readonly project_id: number;- readonly api_token: string;- /** @nullable */- readonly secret_api_token: string | null;- /** @nullable */- readonly secret_api_token_backup: string | null;- readonly created_at: string;- readonly updated_at: string;- readonly ingested_event: boolean;- readonly default_modifiers: TeamDefaultModifiers;- readonly person_on_events_querying_enabled: boolean;- /**- * The effective access level the user has for this object- * @nullable- */- readonly user_access_level: string | null;- /** @items.maxLength 200 */- app_urls?: (string | null)[];- anonymize_ips?: boolean;- completed_snippet_onboarding?: boolean;- /** Filters used to identify internal/test users. Each entry is a property filter.- *- * Supported entry types and the exact shape each accepts:- *- * # Person property — match (or exclude) by a person property- * {"key": "email", "type": "person", "value": "@example.com", "operator": "ends_with"}- *- * # Event property — match by an event property- * {"key": "$host", "type": "event", "value": "localhost", "operator": "icontains"}- *- * # Cohort membership — match (or exclude) members of a cohort.- * # Use operator "in" for inclusion and "not_in" for exclusion. Do NOT use a- * # `negation` field here — `negation` is specific to cohort *definitions*- * # (the inner sub-filters that build a cohort) and is rejected by the- * # property-filter schema.- * {"key": "id", "type": "cohort", "value": 8814, "operator": "not_in"}- *- * Common operators: "exact", "is_not", "icontains", "not_icontains", "starts_with",- * "not_starts_with", "ends_with", "not_ends_with", "regex", "not_regex", "gt", "lt",- * "gte", "lte", "is_set", "is_not_set", "in", "not_in". */- test_account_filters?: unknown;- /** @nullable */- test_account_filters_default_checked?: boolean | null;- path_cleaning_filters?: unknown;- is_demo?: boolean;- timezone?: string;- data_attributes?: unknown;- /**- * @nullable- * @items.maxLength 400- */- person_display_name_properties?: string[] | null;- correlation_config?: unknown;- /** @nullable */- autocapture_opt_out?: boolean | null;- /** @nullable */- autocapture_exceptions_opt_in?: boolean | null;- /** @nullable */- autocapture_web_vitals_opt_in?: boolean | null;- autocapture_web_vitals_allowed_metrics?: unknown;- autocapture_exceptions_errors_to_ignore?: unknown;- /** @nullable */- capture_console_log_opt_in?: boolean | null;- logs_settings?: unknown;- /** @nullable */- capture_performance_opt_in?: boolean | null;- session_recording_opt_in?: boolean;- /**- * @nullable- * @pattern ^-?\d{0,1}(?:\.\d{0,2})?$- */- session_recording_sample_rate?: string | null;- /**- * @minimum 0- * @maximum 30000- * @nullable- */- session_recording_minimum_duration_milliseconds?: number | null;- session_recording_linked_flag?: unknown;- session_recording_network_payload_capture_config?: unknown;- session_recording_masking_config?: unknown;- /** @nullable */- session_recording_url_trigger_config?: unknown[] | null;- /** @nullable */- session_recording_url_blocklist_config?: unknown[] | null;- /** @nullable */- session_recording_event_trigger_config?: (string | null)[] | null;- /**- * @maxLength 24- * @nullable- */- session_recording_trigger_match_type_config?: string | null;- /** V2 trigger groups configuration for session recording. If present, takes precedence over legacy trigger fields. */- session_recording_trigger_groups?: unknown;- session_recording_retention_period?: SessionRecordingRetentionPeriodEnum;- session_replay_config?: unknown;- survey_config?: unknown;- week_start_day?: WeekStartDayEnum | null;- /** @nullable */- primary_dashboard?: number | null;- /** @nullable */- live_events_columns?: string[] | null;- /**- * @nullable- * @items.maxLength 200- */- recording_domains?: (string | null)[] | null;- cookieless_server_hash_mode?: CookielessServerHashModeEnum | null;- /** @nullable */- human_friendly_comparison_periods?: boolean | null;- /** @nullable */- inject_web_apps?: boolean | null;- extra_settings?: unknown;- modifiers?: unknown;- has_completed_onboarding_for?: unknown;- /** @nullable */- surveys_opt_in?: boolean | null;- /** @nullable */- heatmaps_opt_in?: boolean | null;- /** @nullable */- flags_persistence_default?: boolean | null;- /** @nullable */- feature_flag_confirmation_enabled?: boolean | null;- /** @nullable */- feature_flag_confirmation_message?: string | null;- /**- * Whether to automatically apply default evaluation contexts to new feature flags- * @nullable- */- default_evaluation_contexts_enabled?: boolean | null;- /**- * Whether to require at least one evaluation context tag when creating new feature flags- * @nullable- */- require_evaluation_contexts?: boolean | null;- feature_flag_policy_config?: TeamFeatureFlagPolicyConfig;- /** @nullable */- capture_dead_clicks?: boolean | null;- /**- * @minimum -2147483648- * @maximum 2147483647- * @nullable- */- default_data_theme?: number | null;- revenue_analytics_config?: TeamRevenueAnalyticsConfig;- marketing_analytics_config?: TeamMarketingAnalyticsConfig;- customer_analytics_config?: TeamCustomerAnalyticsConfig;- onboarding_tasks?: unknown;- base_currency?: BaseCurrencyEnum;- /** @nullable */- web_analytics_pre_aggregated_tables_enabled?: boolean | null;- /** @nullable */- receive_org_level_activity_logs?: boolean | null;- /** Whether this project serves B2B or B2C customers, used to optimize the UI layout.- *- * * `b2b` - B2B- * * `b2c` - B2C- * * `other` - Other */- business_model?: BusinessModelEnum | BlankEnum | null;- /** @nullable */- conversations_enabled?: boolean | null;- conversations_settings?: unknown;- /** @nullable */- proactive_tasks_enabled?: boolean | null;- workflows_config?: TeamWorkflowsConfig;- readonly effective_membership_level: OrganizationMembershipLevelEnum;- readonly has_group_types: boolean;- readonly group_types: readonly TeamGroupTypesItem[];- /** @nullable */- readonly live_events_token: string | null;- readonly product_intents: readonly TeamProductIntentsItem[];- readonly managed_viewsets: TeamManagedViewsets;- readonly available_setup_task_ids: readonly AvailableSetupTaskIdsEnum[];- /** The team's events data retention window in months (plan-derived, synced from billing). When retention enforcement is active for the team, queries do not return events older than this many months. Read-only: this value follows your plan's data retention entitlement, so neither you nor PostHog support can change it unless your organization is on the enterprise plan. Background and discussion: https://github.com/PostHog/posthog/issues/17031 */- readonly event_retention_months: number;- /** Whether events data retention is currently enforced for this team (cohort/flag gated). Read-only: neither you nor PostHog support can turn enforcement off, and the retention window itself only changes with your plan. Background and discussion: https://github.com/PostHog/posthog/issues/17031 */- readonly events_retention_enforced: boolean;- }-export interface TeamTestSignal {/** Test runner that emitted this signal: 'pytest' or 'jest'.*@@ -95721,24 +95310,6 @@ export namespace Schemas {PullRequest: 'pull_request',} as const;- export type EnvironmentsListParams = {- /**- * Number of results to return per page.- */- limit?: number;- /**- * The initial index from which to return the results.- */- offset?: number;- };-- export type EnvironmentsEvaluationContextSuggestionsDestroyParams = {- /**- * Name of the evaluation context to restore to suggestions.- */- context_name: string;- };-export type ErrorTrackingAlertsListParams = {/*** Number of results to return per page.